Lines Matching defs:bsd_statfs

348 bsd_to_linux_statfs(struct statfs *bsd_statfs, struct l_statfs *linux_statfs)
352 statfs_scale_blocks(bsd_statfs, INT32_MAX);
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];
369 linux_statfs->f_frsize = bsd_statfs->f_bsize;
370 linux_statfs->f_flags = bsd_to_linux_mnt_flags(bsd_statfs->f_flags);
380 struct statfs *bsd_statfs;
383 bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
384 error = kern_statfs(td, args->path, UIO_USERSPACE, bsd_statfs);
386 error = bsd_to_linux_statfs(bsd_statfs, &linux_statfs);
387 free(bsd_statfs, M_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];
408 linux_statfs->f_frsize = bsd_statfs->f_bsize;
409 linux_statfs->f_flags = bsd_to_linux_mnt_flags(bsd_statfs->f_flags);
417 struct statfs *bsd_statfs;
423 bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
424 error = kern_statfs(td, args->path, UIO_USERSPACE, bsd_statfs);
426 bsd_to_linux_statfs64(bsd_statfs, &linux_statfs);
427 free(bsd_statfs, M_STATFS);
437 struct statfs *bsd_statfs;
443 bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
444 error = kern_fstatfs(td, args->fd, bsd_statfs);
446 bsd_to_linux_statfs64(bsd_statfs, &linux_statfs);
447 free(bsd_statfs, M_STATFS);
458 struct statfs *bsd_statfs;
461 bsd_statfs = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK);
462 error = kern_fstatfs(td, args->fd, bsd_statfs);
464 error = bsd_to_linux_statfs(bsd_statfs, &linux_statfs);
465 free(bsd_statfs, M_STATFS);