linux_stats.c (167257) | linux_stats.c (172220) |
---|---|
1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1994-1995 S�ren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_stats.c 167257 2007-03-06 07:39:12Z rwatson $"); | 30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_stats.c 172220 2007-09-18 19:50:33Z dwmalone $"); |
31 32#include "opt_compat.h" 33#include "opt_mac.h" 34 35#include <sys/param.h> 36#include <sys/dirent.h> 37#include <sys/file.h> 38#include <sys/filedesc.h> --- 262 unchanged lines hidden (view full) --- 301 l_int f_bavail; 302 l_int f_files; 303 l_int f_ffree; 304 l_fsid_t f_fsid; 305 l_int f_namelen; 306 l_int f_spare[6]; 307}; 308 | 31 32#include "opt_compat.h" 33#include "opt_mac.h" 34 35#include <sys/param.h> 36#include <sys/dirent.h> 37#include <sys/file.h> 38#include <sys/filedesc.h> --- 262 unchanged lines hidden (view full) --- 301 l_int f_bavail; 302 l_int f_files; 303 l_int f_ffree; 304 l_fsid_t f_fsid; 305 l_int f_namelen; 306 l_int f_spare[6]; 307}; 308 |
309struct l_statfs64 { 310 l_int f_type; 311 l_int f_bsize; 312 uint64_t f_blocks; 313 uint64_t f_bfree; 314 uint64_t f_bavail; 315 uint64_t f_files; 316 uint64_t f_ffree; 317 l_fsid_t f_fsid; 318 l_int f_namelen; 319 l_int f_spare[6]; 320}; 321 | |
322#define LINUX_CODA_SUPER_MAGIC 0x73757245L 323#define LINUX_EXT2_SUPER_MAGIC 0xEF53L 324#define LINUX_HPFS_SUPER_MAGIC 0xf995e849L 325#define LINUX_ISOFS_SUPER_MAGIC 0x9660L 326#define LINUX_MSDOS_SUPER_MAGIC 0x4d44L 327#define LINUX_NCP_SUPER_MAGIC 0x564cL 328#define LINUX_NFS_SUPER_MAGIC 0x6969L 329#define LINUX_NTFS_SUPER_MAGIC 0x5346544EL --- 83 unchanged lines hidden (view full) --- 413int 414linux_statfs64(struct thread *td, struct linux_statfs64_args *args) 415{ 416 struct l_statfs64 linux_statfs; 417 struct statfs bsd_statfs; 418 char *path; 419 int error; 420 | 309#define LINUX_CODA_SUPER_MAGIC 0x73757245L 310#define LINUX_EXT2_SUPER_MAGIC 0xEF53L 311#define LINUX_HPFS_SUPER_MAGIC 0xf995e849L 312#define LINUX_ISOFS_SUPER_MAGIC 0x9660L 313#define LINUX_MSDOS_SUPER_MAGIC 0x4d44L 314#define LINUX_NCP_SUPER_MAGIC 0x564cL 315#define LINUX_NFS_SUPER_MAGIC 0x6969L 316#define LINUX_NTFS_SUPER_MAGIC 0x5346544EL --- 83 unchanged lines hidden (view full) --- 400int 401linux_statfs64(struct thread *td, struct linux_statfs64_args *args) 402{ 403 struct l_statfs64 linux_statfs; 404 struct statfs bsd_statfs; 405 char *path; 406 int error; 407 |
408 if (args->bufsize != sizeof(struct l_statfs64)) 409 return EINVAL; 410 |
|
421 LCONVPATHEXIST(td, args->path, &path); 422 423#ifdef DEBUG 424 if (ldebug(statfs64)) 425 printf(ARGS(statfs64, "%s, *"), path); 426#endif 427 error = kern_statfs(td, path, UIO_SYSSPACE, &bsd_statfs); 428 LFREEPATH(path); --- 153 unchanged lines hidden --- | 411 LCONVPATHEXIST(td, args->path, &path); 412 413#ifdef DEBUG 414 if (ldebug(statfs64)) 415 printf(ARGS(statfs64, "%s, *"), path); 416#endif 417 error = kern_statfs(td, path, UIO_SYSSPACE, &bsd_statfs); 418 LFREEPATH(path); --- 153 unchanged lines hidden --- |