df.c (193629) | df.c (194795) |
---|---|
1/*- 2 * Copyright (c) 1980, 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 30 unchanged lines hidden (view full) --- 39 The Regents of the University of California. All rights reserved.\n"; 40#endif /* not lint */ 41 42#ifndef lint 43static char sccsid[] = "@(#)df.c 8.9 (Berkeley) 5/8/95"; 44#endif /* not lint */ 45#endif 46#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1980, 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 30 unchanged lines hidden (view full) --- 39 The Regents of the University of California. All rights reserved.\n"; 40#endif /* not lint */ 41 42#ifndef lint 43static char sccsid[] = "@(#)df.c 8.9 (Berkeley) 5/8/95"; 44#endif /* not lint */ 45#endif 46#include <sys/cdefs.h> |
47__FBSDID("$FreeBSD: head/bin/df/df.c 193629 2009-06-07 09:06:21Z simon $"); | 47__FBSDID("$FreeBSD: head/bin/df/df.c 194795 2009-06-23 23:30:56Z delphij $"); |
48 49#include <sys/param.h> 50#include <sys/stat.h> 51#include <sys/mount.h> 52#include <sys/sysctl.h> 53#include <ufs/ufs/ufsmount.h> 54#include <err.h> 55#include <libutil.h> --- 415 unchanged lines hidden (view full) --- 471 (double)used / (double)inodes * 100.0); 472 } else 473 (void)printf(" "); 474 if (strncmp(sfsp->f_mntfromname, "total", MNAMELEN) != 0) 475 (void)printf(" %s", sfsp->f_mntonname); 476 (void)printf("\n"); 477} 478 | 48 49#include <sys/param.h> 50#include <sys/stat.h> 51#include <sys/mount.h> 52#include <sys/sysctl.h> 53#include <ufs/ufs/ufsmount.h> 54#include <err.h> 55#include <libutil.h> --- 415 unchanged lines hidden (view full) --- 471 (double)used / (double)inodes * 100.0); 472 } else 473 (void)printf(" "); 474 if (strncmp(sfsp->f_mntfromname, "total", MNAMELEN) != 0) 475 (void)printf(" %s", sfsp->f_mntonname); 476 (void)printf("\n"); 477} 478 |
479void | 479static void |
480addstat(struct statfs *totalfsp, struct statfs *statfsp) 481{ 482 uint64_t bsize; 483 484 bsize = statfsp->f_bsize / totalfsp->f_bsize; 485 totalfsp->f_blocks += statfsp->f_blocks * bsize; 486 totalfsp->f_bfree += statfsp->f_bfree * bsize; 487 totalfsp->f_bavail += statfsp->f_bavail * bsize; --- 126 unchanged lines hidden --- | 480addstat(struct statfs *totalfsp, struct statfs *statfsp) 481{ 482 uint64_t bsize; 483 484 bsize = statfsp->f_bsize / totalfsp->f_bsize; 485 totalfsp->f_blocks += statfsp->f_blocks * bsize; 486 totalfsp->f_bfree += statfsp->f_bfree * bsize; 487 totalfsp->f_bavail += statfsp->f_bavail * bsize; --- 126 unchanged lines hidden --- |