diff options
Diffstat (limited to 'sysdeps/mach/hurd/lxstat.c')
-rw-r--r-- | sysdeps/mach/hurd/lxstat.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/sysdeps/mach/hurd/lxstat.c b/sysdeps/mach/hurd/lxstat.c index 3d6f981345..9987e25f9b 100644 --- a/sysdeps/mach/hurd/lxstat.c +++ b/sysdeps/mach/hurd/lxstat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 93, 94, 95, 96, 97, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1992,93,94,95,96,97,2002 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,28 +19,16 @@ #include <errno.h> #include <sys/stat.h> #include <stddef.h> -#include <fcntl.h> -#include <hurd.h> + +#include "xstatconv.c" #undef __lxstat int __lxstat (int vers, const char *file, struct stat *buf) { - error_t err; - file_t port; - - if (vers != _STAT_VER) - return __hurd_fail (EINVAL); - - port = __file_name_lookup (file, O_NOLINK, 0); - if (port == MACH_PORT_NULL) - return -1; - err = __io_stat (port, buf); - __mach_port_deallocate (__mach_task_self (), port); - if (err) - return __hurd_fail (err); - return 0; + struct stat64 buf64; + return __lxstat64 (vers, file, &buf64) ?: xstat64_conv (buf, &buf64); } INTDEF(__lxstat) |