Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/puffs/mount_psshfs Make error message more userfrie...
details: https://anonhg.NetBSD.org/src/rev/82c86065f039
branches: trunk
changeset: 758262:82c86065f039
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Oct 29 16:13:51 2010 +0000
description:
Make error message more userfriendly in cases where server does
not support sftp.
diffstat:
usr.sbin/puffs/mount_psshfs/fs.c | 8 +++-----
usr.sbin/puffs/mount_psshfs/node.c | 7 ++++---
usr.sbin/puffs/mount_psshfs/psshfs.c | 6 +++---
3 files changed, 10 insertions(+), 11 deletions(-)
diffs (92 lines):
diff -r c73a22ed9095 -r 82c86065f039 usr.sbin/puffs/mount_psshfs/fs.c
--- a/usr.sbin/puffs/mount_psshfs/fs.c Fri Oct 29 15:38:15 2010 +0000
+++ b/usr.sbin/puffs/mount_psshfs/fs.c Fri Oct 29 16:13:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fs.c,v 1.22 2010/04/01 02:34:09 pooka Exp $ */
+/* $NetBSD: fs.c,v 1.23 2010/10/29 16:13:51 pooka Exp $ */
/*
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: fs.c,v 1.22 2010/04/01 02:34:09 pooka Exp $");
+__RCSID("$NetBSD: fs.c,v 1.23 2010/10/29 16:13:51 pooka Exp $");
#endif /* !lint */
#include <err.h>
@@ -47,8 +47,6 @@
*(a4) = 0; \
rv = fname(a1, a2, a3, a4); \
if (rv || a4 == 0) { \
- fprintf(stderr, "psshfs_handshake failed %d (%s) %d\n", \
- rv, strerror(rv), *a4); \
return rv ? rv : EPROTO; \
} \
} while (/*CONSTCOND*/0)
@@ -82,7 +80,7 @@
NULL,
0
}};
-
+
int
psshfs_handshake(struct puffs_usermount *pu, int fd)
{
diff -r c73a22ed9095 -r 82c86065f039 usr.sbin/puffs/mount_psshfs/node.c
--- a/usr.sbin/puffs/mount_psshfs/node.c Fri Oct 29 15:38:15 2010 +0000
+++ b/usr.sbin/puffs/mount_psshfs/node.c Fri Oct 29 16:13:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: node.c,v 1.61 2010/04/01 02:34:09 pooka Exp $ */
+/* $NetBSD: node.c,v 1.62 2010/10/29 16:13:51 pooka Exp $ */
/*
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: node.c,v 1.61 2010/04/01 02:34:09 pooka Exp $");
+__RCSID("$NetBSD: node.c,v 1.62 2010/10/29 16:13:51 pooka Exp $");
#endif /* !lint */
#include <assert.h>
@@ -362,8 +362,9 @@
*ncookies = 0;
rv = sftp_readdir(pu, pctx, pn);
- if (rv)
+ if (rv) {
goto out;
+ }
/* find next dirent */
for (i = *readoff;;i++) {
diff -r c73a22ed9095 -r 82c86065f039 usr.sbin/puffs/mount_psshfs/psshfs.c
--- a/usr.sbin/puffs/mount_psshfs/psshfs.c Fri Oct 29 15:38:15 2010 +0000
+++ b/usr.sbin/puffs/mount_psshfs/psshfs.c Fri Oct 29 16:13:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: psshfs.c,v 1.61 2010/02/17 15:54:10 pooka Exp $ */
+/* $NetBSD: psshfs.c,v 1.62 2010/10/29 16:13:51 pooka Exp $ */
/*
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
@@ -41,7 +41,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: psshfs.c,v 1.61 2010/02/17 15:54:10 pooka Exp $");
+__RCSID("$NetBSD: psshfs.c,v 1.62 2010/10/29 16:13:51 pooka Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -415,7 +415,7 @@
}
if (psshfs_handshake(pu, *sshfd) != 0)
- errx(1, "psshfs_handshake %d", which);
+ errx(1, "handshake failed, server does not support sftp?");
x = 1;
if (ioctl(*sshfd, FIONBIO, &x) == -1)
err(1, "nonblocking descriptor %d", which);
Home |
Main Index |
Thread Index |
Old Index