Fix amd64 build for compat sys_stat() changes.
This file isn't included in amd64:GENERIC
This commit is contained in:
parent
5959b4cbc7
commit
6803111cb3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: linux32_stat.c,v 1.4 2007/03/10 21:40:25 dsl Exp $ */
|
||||
/* $NetBSD: linux32_stat.c,v 1.5 2007/03/11 19:36:37 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.4 2007/03/10 21:40:25 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.5 2007/03/11 19:36:37 dsl Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.4 2007/03/10 21:40:25 dsl Exp $")
|
|||
#include <sys/kernel.h>
|
||||
#include <sys/namei.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/filedesc.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ucred.h>
|
||||
|
@ -122,12 +123,12 @@ linux32_sys_stat64(l, v, retval)
|
|||
int error;
|
||||
struct stat st;
|
||||
struct linux32_stat64 st32;
|
||||
struct stat *stp;
|
||||
struct linux32_stat64 *st32p;
|
||||
const char *path = (void *)(uintptr_t)SCARG(uap, path);
|
||||
|
||||
CHECK_ALT_EXIST(l, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(l, &sg, path);
|
||||
|
||||
error = do_sys_stat(l, SCARG(&ua, path), FOLLOW, &st);
|
||||
error = do_sys_stat(l, path, FOLLOW, &st);
|
||||
if (error != 0)
|
||||
return error;
|
||||
|
||||
|
@ -148,15 +149,16 @@ linux32_sys_lstat64(l, v, retval)
|
|||
syscallarg(netbsd32_charp) path;
|
||||
syscallarg(linux32_stat64p) sp;
|
||||
} */ *uap = v;
|
||||
void *sg = stackgap_init(l->l_proc, 0);
|
||||
int error;
|
||||
struct stat st;
|
||||
struct linux32_stat64 st32;
|
||||
struct stat *stp;
|
||||
struct linux32_stat64 *st32p;
|
||||
const char *path = (void *)(uintptr_t)SCARG(uap, path);
|
||||
|
||||
CHECK_ALT_EXIST(l, &sg, SCARG(&ua, path));
|
||||
CHECK_ALT_EXIST(l, &sg, path);
|
||||
|
||||
error = do_sys_stat(l, SCARG(&ua, path), NOFOLLOW, &st);
|
||||
error = do_sys_stat(l, path, NOFOLLOW, &st);
|
||||
if (error != 0)
|
||||
return error;
|
||||
|
||||
|
@ -180,10 +182,9 @@ linux32_sys_fstat64(l, v, retval)
|
|||
int error;
|
||||
struct stat st;
|
||||
struct linux32_stat64 st32;
|
||||
struct stat *stp;
|
||||
struct linux32_stat64 *st32p;
|
||||
|
||||
error = do_sys_fstat(l, SCARG(&ua, fd), &st);
|
||||
error = do_sys_fstat(l, SCARG(uap, fd), &st);
|
||||
if (error != 0)
|
||||
return error;
|
||||
|
||||
|
|
Loading…
Reference in New Issue