1 /* $NetBSD: compat_mount.c,v 1.3 2024/01/20 14:52:46 christos Exp $ */ 2 3 4 #include <sys/cdefs.h> 5 #if defined(LIBC_SCCS) && !defined(lint) 6 __RCSID("$NetBSD: compat_mount.c,v 1.3 2024/01/20 14:52:46 christos 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 #include <compat/sys/mount.h> 14 15 __warn_references(mount, 16 "warning: reference to compatibility mount(); include <sys/mount.h> to generate correct reference") 17 18 /* 19 * Convert old mount() call to new calling convention 20 * The kernel will treat length 0 as 'default for the fs'. 21 * We need to throw away the +ve response for MNT_GETARGS. 22 */ 23 int 24 mount(const char *type, const char *dir, int flags, void *data) 25 { 26 return __mount50(type, dir, flags, data, 0) == -1 ? -1 : 0; 27 } 28