Change libc system callstub from 'mount' to '__mount50', add compat call.

This commit is contained in:
dsl 2007-07-14 15:53:04 +00:00
parent 0bfa8b4ee7
commit 4d09898946
3 changed files with 34 additions and 5 deletions

View File

@ -1,11 +1,12 @@
# $NetBSD: Makefile.inc,v 1.6 2006/07/31 16:34:42 martin Exp $
# $NetBSD: Makefile.inc,v 1.7 2007/07/14 15:53:04 dsl Exp $
.PATH: ${COMPATDIR}/sys
SRCS+= compat_getdents.c compat_getdirentries.c compat_msync.c \
compat_ntp_gettime.c \
compat_semctl.c compat_sigaltstack.c compat_stat.c compat___stat13.c \
compat_statfs.c compat_socket.c compat_getfh.c \
compat_fhopen.c compat___fhstat30.c compat_fhstatvfs.c compat_fhstatvfs1.c
compat_fhopen.c compat___fhstat30.c compat_fhstatvfs.c compat_fhstatvfs1.c \
compat_mount.c
MAN+= getdirentries.3
.if ${MKLINT} != "no"

View File

@ -0,0 +1,28 @@
/* $NetBSD: compat_mount.c,v 1.1 2007/07/14 15:53:04 dsl Exp $ */
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: compat_mount.c,v 1.1 2007/07/14 15:53:04 dsl Exp $");
#endif /* LIBC_SCCS and not lint */
#define __LIBC12_SOURCE__
#include <sys/types.h>
#include <sys/mount.h>
__warn_references(mount,
"warning: reference to compatibility mount(); include <sys/mount.h> to generate correct reference")
int mount(const char *, const char *, int, void *);
int __mount50(const char *, const char *, int, void *, size_t);
/*
* Convert old mount() call to new calling convention
* The kernel will treat length 0 as 'default for the fs'.
*/
int
mount(const char *type, const char *dir, int flags, void *data)
{
return __mount50(type, dir, flags, data, 0);
}

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.174 2007/06/03 17:35:24 christos Exp $
# $NetBSD: Makefile.inc,v 1.175 2007/07/14 15:53:04 dsl Exp $
# @(#)Makefile.inc 8.3 (Berkeley) 10/24/94
# sys sources
@ -74,8 +74,8 @@ ASM= access.S acct.S \
_lwp_suspend.S _lwp_continue.S _lwp_wakeup.S _lwp_detach.S \
_lwp_getprivate.S _lwp_setprivate.S \
madvise.S mincore.S minherit.S mkdir.S mkfifo.S mknod.S \
mlock.S mlockall.S mount.S mprotect.S __msgctl13.S msgget.S \
munlock.S munlockall.S munmap.S \
mlock.S mlockall.S __mount50.S mprotect.S __msgctl13.S \
msgget.S munlock.S munlockall.S munmap.S \
nfssvc.S __ntp_gettime30.S \
pathconf.S pmc_get_info.S pmc_control.S __posix_chown.S \
posix_fadvise.S \