diff options
| author | dsl <dsl@NetBSD.org> | 2007-07-18 20:10:47 +0000 |
|---|---|---|
| committer | dsl <dsl@NetBSD.org> | 2007-07-18 20:10:47 +0000 |
| commit | 9145137adce3e9a4e72bd65522c8aec2fee478c9 (patch) | |
| tree | a792e2a9eb934b31b0d037da265eaaf678043c11 /lib/libc | |
| parent | fe7e9a002c43f254668d7805f104a2b101adec27 (diff) | |
Fix the return value so the MNT_GETARGS returns 0, not the buffer length.
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/compat/sys/compat_mount.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/compat/sys/compat_mount.c b/lib/libc/compat/sys/compat_mount.c index 658665c8fa8..83f8f3c3f22 100644 --- a/lib/libc/compat/sys/compat_mount.c +++ b/lib/libc/compat/sys/compat_mount.c @@ -1,9 +1,9 @@ -/* $NetBSD: compat_mount.c,v 1.1 2007/07/14 15:53:04 dsl Exp $ */ +/* $NetBSD: compat_mount.c,v 1.2 2007/07/18 20:10:47 dsl Exp $ */ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: compat_mount.c,v 1.1 2007/07/14 15:53:04 dsl Exp $"); +__RCSID("$NetBSD: compat_mount.c,v 1.2 2007/07/18 20:10:47 dsl Exp $"); #endif /* LIBC_SCCS and not lint */ #define __LIBC12_SOURCE__ @@ -20,9 +20,10 @@ int __mount50(const char *, const char *, int, void *, size_t); /* * Convert old mount() call to new calling convention * The kernel will treat length 0 as 'default for the fs'. + * We need to throw away the +ve response for MNT_GETARGS. */ int mount(const char *type, const char *dir, int flags, void *data) { - return __mount50(type, dir, flags, data, 0); + return __mount50(type, dir, flags, data, 0) == -1 ? -1 : 0; } |
