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