Lines Matching defs:linux_statfs
348 bsd_to_linux_statfs(struct statfs *bsd_statfs, struct l_statfs *linux_statfs)
354 linux_statfs->f_type = bsd_to_linux_ftype(bsd_statfs->f_fstypename);
355 linux_statfs->f_bsize = bsd_statfs->f_bsize;
356 linux_statfs->f_blocks = bsd_statfs->f_blocks;
357 linux_statfs->f_bfree = bsd_statfs->f_bfree;
358 linux_statfs->f_bavail = bsd_statfs->f_bavail;
360 linux_statfs->f_ffree = MIN(bsd_statfs->f_ffree, INT32_MAX);
361 linux_statfs->f_files = MIN(bsd_statfs->f_files, INT32_MAX);
363 linux_statfs->f_ffree = bsd_statfs->f_ffree;
364 linux_statfs->f_files = bsd_statfs->f_files;
366 linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
367 linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
368 linux_statfs->f_namelen = MAXNAMLEN;
369 linux_statfs->f_frsize = bsd_statfs->f_bsize;
370 linux_statfs->f_flags = bsd_to_linux_mnt_flags(bsd_statfs->f_flags);
371 memset(linux_statfs->f_spare, 0, sizeof(linux_statfs->f_spare));
377 linux_statfs(struct thread *td, struct linux_statfs_args *args)
379 struct l_statfs linux_statfs;
386 error = bsd_to_linux_statfs(bsd_statfs, &linux_statfs);
390 return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
395 bsd_to_linux_statfs64(struct statfs *bsd_statfs, struct l_statfs64 *linux_statfs)
398 linux_statfs->f_type = bsd_to_linux_ftype(bsd_statfs->f_fstypename);
399 linux_statfs->f_bsize = bsd_statfs->f_bsize;
400 linux_statfs->f_blocks = bsd_statfs->f_blocks;
401 linux_statfs->f_bfree = bsd_statfs->f_bfree;
402 linux_statfs->f_bavail = bsd_statfs->f_bavail;
403 linux_statfs->f_ffree = bsd_statfs->f_ffree;
404 linux_statfs->f_files = bsd_statfs->f_files;
405 linux_statfs->f_fsid.val[0] = bsd_statfs->f_fsid.val[0];
406 linux_statfs->f_fsid.val[1] = bsd_statfs->f_fsid.val[1];
407 linux_statfs->f_namelen = MAXNAMLEN;
408 linux_statfs->f_frsize = bsd_statfs->f_bsize;
409 linux_statfs->f_flags = bsd_to_linux_mnt_flags(bsd_statfs->f_flags);
410 memset(linux_statfs->f_spare, 0, sizeof(linux_statfs->f_spare));
416 struct l_statfs64 linux_statfs;
426 bsd_to_linux_statfs64(bsd_statfs, &linux_statfs);
430 return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
436 struct l_statfs64 linux_statfs;
446 bsd_to_linux_statfs64(bsd_statfs, &linux_statfs);
450 return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));
457 struct l_statfs linux_statfs;
464 error = bsd_to_linux_statfs(bsd_statfs, &linux_statfs);
468 return (copyout(&linux_statfs, args->buf, sizeof(linux_statfs)));