Erik van Konijnenburg
2005-Jun-05 05:09 UTC
[klibc] [PATCH] avoid spurious umount error message
In nfsmount, the function mount_call() is used to invoke both the mount and umount PRC's. These take identical arguments, but umount returns void rather than a file handle, so result should not be checked. This avoids a spurious 'incomplete reply' message if mount(2) system call fails. Signed-off-by: Erik van Konijnenburg <ekonijn@xs4all.nl> Index: klibc-1.0.14/nfsmount/mount.c ==================================================================--- klibc-1.0.14.orig/nfsmount/mount.c 2005-05-27 07:02:31.000000000 +0200 +++ klibc-1.0.14/nfsmount/mount.c 2005-06-04 13:36:33.000000000 +0200 @@ -166,6 +166,10 @@ if (rpc_call(clnt, &rpc) < 0) goto bail; + if (proc != MNTPROC_MNT) { + goto done; + } + if (rpc.reply_len < MNT_REPLY_MINSIZE) { fprintf(stderr, "incomplete reply: %zu < %zu\n", rpc.reply_len, MNT_REPLY_MINSIZE);