1*ace5b9b5Schristos /* $NetBSD: compat_mount.c,v 1.3 2024/01/20 14:52:46 christos Exp $ */
24d098989Sdsl
34d098989Sdsl
44d098989Sdsl #include <sys/cdefs.h>
54d098989Sdsl #if defined(LIBC_SCCS) && !defined(lint)
6*ace5b9b5Schristos __RCSID("$NetBSD: compat_mount.c,v 1.3 2024/01/20 14:52:46 christos Exp $");
74d098989Sdsl #endif /* LIBC_SCCS and not lint */
84d098989Sdsl
94d098989Sdsl #define __LIBC12_SOURCE__
104d098989Sdsl
114d098989Sdsl #include <sys/types.h>
124d098989Sdsl #include <sys/mount.h>
13*ace5b9b5Schristos #include <compat/sys/mount.h>
144d098989Sdsl
154d098989Sdsl __warn_references(mount,
164d098989Sdsl "warning: reference to compatibility mount(); include <sys/mount.h> to generate correct reference")
174d098989Sdsl
184d098989Sdsl /*
194d098989Sdsl * Convert old mount() call to new calling convention
204d098989Sdsl * The kernel will treat length 0 as 'default for the fs'.
219145137aSdsl * We need to throw away the +ve response for MNT_GETARGS.
224d098989Sdsl */
234d098989Sdsl int
mount(const char * type,const char * dir,int flags,void * data)244d098989Sdsl mount(const char *type, const char *dir, int flags, void *data)
254d098989Sdsl {
269145137aSdsl return __mount50(type, dir, flags, data, 0) == -1 ? -1 : 0;
274d098989Sdsl }
28