Deleted Added
full compact
df.c (169112) df.c (169177)
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 169112 2007-04-30 04:29:17Z ache $");
47__FBSDID("$FreeBSD: head/bin/df/df.c 169177 2007-05-01 16:02:44Z ache $");
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>

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

126 /*
127 * POSIX specifically discusses the the behavior of
128 * both -k and -P. It states that the blocksize should
129 * be set to 1024. Thus, if this occurs, simply break
130 * rather than clobbering the old blocksize.
131 */
132 if (kflag)
133 break;
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>

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

126 /*
127 * POSIX specifically discusses the the behavior of
128 * both -k and -P. It states that the blocksize should
129 * be set to 1024. Thus, if this occurs, simply break
130 * rather than clobbering the old blocksize.
131 */
132 if (kflag)
133 break;
134 putenv(strdup("BLOCKSIZE=512"));
134 putenv("BLOCKSIZE=512");
135 hflag = 0;
136 break;
137 case 'c':
138 cflag = 1;
139 break;
140 case 'g':
135 hflag = 0;
136 break;
137 case 'c':
138 cflag = 1;
139 break;
140 case 'g':
141 putenv(strdup("BLOCKSIZE=1g"));
141 putenv("BLOCKSIZE=1g");
142 hflag = 0;
143 break;
144 case 'H':
145 hflag = UNITS_SI;
146 break;
147 case 'h':
148 hflag = UNITS_2;
149 break;
150 case 'i':
151 iflag = 1;
152 break;
153 case 'k':
154 kflag++;
142 hflag = 0;
143 break;
144 case 'H':
145 hflag = UNITS_SI;
146 break;
147 case 'h':
148 hflag = UNITS_2;
149 break;
150 case 'i':
151 iflag = 1;
152 break;
153 case 'k':
154 kflag++;
155 putenv(strdup("BLOCKSIZE=1024"));
155 putenv("BLOCKSIZE=1024");
156 hflag = 0;
157 break;
158 case 'l':
159 if (vfslist != NULL)
160 errx(1, "-l and -t are mutually exclusive.");
161 vfslist = makevfslist(makenetvfslist());
162 lflag = 1;
163 break;
164 case 'm':
156 hflag = 0;
157 break;
158 case 'l':
159 if (vfslist != NULL)
160 errx(1, "-l and -t are mutually exclusive.");
161 vfslist = makevfslist(makenetvfslist());
162 lflag = 1;
163 break;
164 case 'm':
165 putenv(strdup("BLOCKSIZE=1m"));
165 putenv("BLOCKSIZE=1m");
166 hflag = 0;
167 break;
168 case 'n':
169 nflag = 1;
170 break;
171 case 't':
172 if (lflag)
173 errx(1, "-l and -t are mutually exclusive.");

--- 404 unchanged lines hidden ---
166 hflag = 0;
167 break;
168 case 'n':
169 nflag = 1;
170 break;
171 case 't':
172 if (lflag)
173 errx(1, "-l and -t are mutually exclusive.");

--- 404 unchanged lines hidden ---