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