compat_mount.c revision 1.2.16.2 1 1.2.16.2 dsl /* $NetBSD: compat_mount.c,v 1.2.16.2 2007/07/18 20:10:48 dsl Exp $ */
2 1.2.16.2 dsl
3 1.2.16.2 dsl
4 1.2.16.2 dsl #include <sys/cdefs.h>
5 1.2.16.2 dsl #if defined(LIBC_SCCS) && !defined(lint)
6 1.2.16.2 dsl __RCSID("$NetBSD: compat_mount.c,v 1.2.16.2 2007/07/18 20:10:48 dsl Exp $");
7 1.2.16.2 dsl #endif /* LIBC_SCCS and not lint */
8 1.2.16.2 dsl
9 1.2.16.2 dsl #define __LIBC12_SOURCE__
10 1.2.16.2 dsl
11 1.2.16.2 dsl #include <sys/types.h>
12 1.2.16.2 dsl #include <sys/mount.h>
13 1.2.16.2 dsl
14 1.2.16.2 dsl __warn_references(mount,
15 1.2.16.2 dsl "warning: reference to compatibility mount(); include <sys/mount.h> to generate correct reference")
16 1.2.16.2 dsl
17 1.2.16.2 dsl int mount(const char *, const char *, int, void *);
18 1.2.16.2 dsl int __mount50(const char *, const char *, int, void *, size_t);
19 1.2.16.2 dsl
20 1.2.16.2 dsl /*
21 1.2.16.2 dsl * Convert old mount() call to new calling convention
22 1.2.16.2 dsl * The kernel will treat length 0 as 'default for the fs'.
23 1.2.16.2 dsl * We need to throw away the +ve response for MNT_GETARGS.
24 1.2.16.2 dsl */
25 1.2.16.2 dsl int
26 1.2.16.2 dsl mount(const char *type, const char *dir, int flags, void *data)
27 1.2.16.2 dsl {
28 1.2.16.2 dsl return __mount50(type, dir, flags, data, 0) == -1 ? -1 : 0;
29 1.2.16.2 dsl }
30