Deleted Added
full compact
linux_stats.c (109153) linux_stats.c (111797)
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

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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 *
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

--- 11 unchanged lines hidden (view full) ---

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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 * $FreeBSD: head/sys/compat/linux/linux_stats.c 109153 2003-01-13 00:33:17Z dillon $
28 * $FreeBSD: head/sys/compat/linux/linux_stats.c 111797 2003-03-03 09:14:26Z des $
29 */
30
31#include "opt_mac.h"
32
33#include <sys/param.h>
34#include <sys/conf.h>
35#include <sys/dirent.h>
36#include <sys/file.h>

--- 227 unchanged lines hidden (view full) ---

264 linux_statfs.f_blocks = bsd_statfs->f_blocks;
265 linux_statfs.f_bfree = bsd_statfs->f_bfree;
266 linux_statfs.f_bavail = bsd_statfs->f_bavail;
267 linux_statfs.f_ffree = bsd_statfs->f_ffree;
268 linux_statfs.f_files = bsd_statfs->f_files;
269 linux_statfs.f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
270 linux_statfs.f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
271 linux_statfs.f_namelen = MAXNAMLEN;
29 */
30
31#include "opt_mac.h"
32
33#include <sys/param.h>
34#include <sys/conf.h>
35#include <sys/dirent.h>
36#include <sys/file.h>

--- 227 unchanged lines hidden (view full) ---

264 linux_statfs.f_blocks = bsd_statfs->f_blocks;
265 linux_statfs.f_bfree = bsd_statfs->f_bfree;
266 linux_statfs.f_bavail = bsd_statfs->f_bavail;
267 linux_statfs.f_ffree = bsd_statfs->f_ffree;
268 linux_statfs.f_files = bsd_statfs->f_files;
269 linux_statfs.f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
270 linux_statfs.f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
271 linux_statfs.f_namelen = MAXNAMLEN;
272 return copyout((caddr_t)&linux_statfs, (caddr_t)args->buf,
273 sizeof(linux_statfs));
272 return copyout(&linux_statfs, args->buf, sizeof(linux_statfs));
274}
275
276int
277linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args)
278{
279 struct file *fp;
280 struct mount *mp;
281 struct statfs *bsd_statfs;

--- 27 unchanged lines hidden (view full) ---

309 linux_statfs.f_blocks = bsd_statfs->f_blocks;
310 linux_statfs.f_bfree = bsd_statfs->f_bfree;
311 linux_statfs.f_bavail = bsd_statfs->f_bavail;
312 linux_statfs.f_ffree = bsd_statfs->f_ffree;
313 linux_statfs.f_files = bsd_statfs->f_files;
314 linux_statfs.f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
315 linux_statfs.f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
316 linux_statfs.f_namelen = MAXNAMLEN;
273}
274
275int
276linux_fstatfs(struct thread *td, struct linux_fstatfs_args *args)
277{
278 struct file *fp;
279 struct mount *mp;
280 struct statfs *bsd_statfs;

--- 27 unchanged lines hidden (view full) ---

308 linux_statfs.f_blocks = bsd_statfs->f_blocks;
309 linux_statfs.f_bfree = bsd_statfs->f_bfree;
310 linux_statfs.f_bavail = bsd_statfs->f_bavail;
311 linux_statfs.f_ffree = bsd_statfs->f_ffree;
312 linux_statfs.f_files = bsd_statfs->f_files;
313 linux_statfs.f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
314 linux_statfs.f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
315 linux_statfs.f_namelen = MAXNAMLEN;
317 error = copyout((caddr_t)&linux_statfs, (caddr_t)args->buf,
318 sizeof(linux_statfs));
316 error = copyout(&linux_statfs, args->buf, sizeof(linux_statfs));
319 fdrop(fp, td);
320 return error;
321}
322
323struct l_ustat
324{
325 l_daddr_t f_tfree;
326 l_ino_t f_tinode;

--- 174 unchanged lines hidden ---
317 fdrop(fp, td);
318 return error;
319}
320
321struct l_ustat
322{
323 l_daddr_t f_tfree;
324 l_ino_t f_tinode;

--- 174 unchanged lines hidden ---