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