Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sbin/mount_nfs Pull up revision 1.23:
details: https://anonhg.NetBSD.org/src/rev/f10597fd4edc
branches: netbsd-1-4
changeset: 469339:f10597fd4edc
user: he <he%NetBSD.org@localhost>
date: Sun Sep 05 15:15:11 1999 +0000
description:
Pull up revision 1.23:
Regularize error reporting of mount_* commands for failure of
mount(2) to the form "mount_xxx: dev on dir: reason for failure"
(as opposed to the old "mount_xxx: : reason for failure").
(perseant)
diffstat:
sbin/mount_nfs/mount_nfs.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r 28a118dbfe38 -r f10597fd4edc sbin/mount_nfs/mount_nfs.c
--- a/sbin/mount_nfs/mount_nfs.c Sun Sep 05 15:13:49 1999 +0000
+++ b/sbin/mount_nfs/mount_nfs.c Sun Sep 05 15:15:11 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mount_nfs.c,v 1.22 1998/05/14 07:44:09 tron Exp $ */
+/* $NetBSD: mount_nfs.c,v 1.22.2.1 1999/09/05 15:15:11 he Exp $ */
/*
* Copyright (c) 1992, 1993, 1994
@@ -46,7 +46,7 @@
#if 0
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: mount_nfs.c,v 1.22 1998/05/14 07:44:09 tron Exp $");
+__RCSID("$NetBSD: mount_nfs.c,v 1.22.2.1 1999/09/05 15:15:11 he Exp $");
#endif
#endif /* not lint */
@@ -205,7 +205,7 @@
struct nfs_args nfsargs;
struct nfsd_cargs ncd;
int mntflags, altflags, i, nfssvc_flag, num;
- char *name, *p, *spec;
+ char *name, *p, *spec, *ospec;
#ifdef NFSKERB
uid_t last_ruid;
@@ -431,11 +431,14 @@
spec = *argv++;
name = *argv;
+ if((ospec = strdup(spec))==NULL) {
+ err(1,"strdup");
+ }
if (!getnfsargs(spec, nfsargsp))
exit(1);
if (mount(MOUNT_NFS, name, mntflags, nfsargsp))
- err(1, "%s", name);
+ err(1, "%s on %s", ospec, name);
if (nfsargsp->flags & (NFSMNT_NQNFS | NFSMNT_KERB)) {
if ((opflags & ISBGRND) == 0) {
if ((i = fork()) != 0) {
Home |
Main Index |
Thread Index |
Old Index