Commit Graph

5394 Commits

Author SHA1 Message Date
Jim Meyering
837a447ba4 *** empty log message *** 1998-06-30 14:32:33 +00:00
Jim Meyering
5d2bbddf97 . 1998-06-30 03:57:55 +00:00
Jim Meyering
6dda2aaa52 (read_filesystem_list) [MOUNTED_GETMNTENT2]:
Always close stream and file descriptor before returning.
1998-06-30 03:56:57 +00:00
Jim Meyering
3fa1d4bb24 (main): Move the test of the result of the read_filesystem_list call
up out of if-block -- code in the else-block depends on it too.
1998-06-30 02:27:51 +00:00
Jim Meyering
1c84606b56 (read_filesystem_list): If SVR4, lock /etc/.mnttab.lock if available,
to avoid race conditions (e.g. with the automounter on Solaris 2.6).

Include <errno.h>, <fcntl.h>, <unistd.h>.
1998-06-30 02:15:43 +00:00
Jim Meyering
b1b273f24f *** empty log message *** 1998-06-29 20:34:02 +00:00
Jim Meyering
e211d3960f . 1998-06-29 20:33:24 +00:00
Jim Meyering
9282f5f8a6 . 1998-06-29 20:32:36 +00:00
Jim Meyering
1d2074e02a protoize 1998-06-29 20:29:28 +00:00
Jim Meyering
8dce8df49a . 1998-06-29 17:35:28 +00:00
Jim Meyering
4d4b2c8e5e *** empty log message *** 1998-06-29 17:31:11 +00:00
Jim Meyering
a72bab1a32 *** empty log message *** 1998-06-29 17:19:30 +00:00
Jim Meyering
affbb977af . 1998-06-29 17:03:13 +00:00
Jim Meyering
aa1c5467ec (fstype_to_string): Guard with #if ! HAVE_F_FSTYPENAME_IN_STATFS. 1998-06-29 17:01:48 +00:00
Jim Meyering
435fa5a7dd Include sys/param.h. NetBSD 1.3.1 requires this
for the definition of NGROUPS (used in a system header included
by sys/mount.h).
1998-06-29 16:57:09 +00:00
Jim Meyering
b7441176e3 *** empty log message *** 1998-06-29 16:24:37 +00:00
Jim Meyering
f3c14cb59f revert back to using lower case _unlocked wrapper names 1998-06-29 16:24:01 +00:00
Jim Meyering
8ba97d963e Include system.h only after error.h and readutmp.h
so we don't get redefinition warnings about getc, etc.
Revert back to using lower case _unlocked wrapper names.
1998-06-29 16:23:15 +00:00
Jim Meyering
223e88f957 *** empty log message *** 1998-06-29 16:16:58 +00:00
Jim Meyering
83d4b736d2 revert back to using lower case _unlocked wrapper names 1998-06-29 15:59:39 +00:00
Jim Meyering
257c5c4737 revert back to using lower case _unlocked wrapper names 1998-06-29 15:57:45 +00:00
Jim Meyering
391c960cba Update call to human_readable -- now there's one fewer arg. 1998-06-29 15:56:23 +00:00
Jim Meyering
62f208d493 . 1998-06-29 15:38:09 +00:00
Jim Meyering
60ae0b81a5 (__xstrtol), src/dd.c (parse_integer):
Add support for SI-like suffixes like "GB" and "TD".
(usage): Describe it.
1998-06-29 15:36:28 +00:00
Jim Meyering
09d344df5b (human_readable_base, output_units): Remove;
replace with new variable output_block_size.  All uses changed.
(long_options, usage, main): Add --block-size.
(main, decode_switches): Use new human_block_size function to
initialize output block size consistently with other programs.

From Paul Eggert.
1998-06-29 15:34:54 +00:00
Jim Meyering
43f4099c95 (human_readable_base, output_units): Remove;
replace with new variable output_block_size.  All uses changed.
(long_options, usage, main): Add --block-size.
(main, decode_switches): Use new human_block_size function to
initialize output block size consistently with other programs.

(print_header, show_dev): Shrink some columns and expand
others, to squeeze in support for today's larger filesystems.
(print_header): Print output block size using power-of-1024 SI format.
(df_readable): Coalesce last two args into one, for convenience.
All callers changed.
(main): Remove check for portable output format and larger
or human-readable block sizes.

From Paul Eggert.
1998-06-29 15:33:38 +00:00
Jim Meyering
476cb02516 * lib/xstrtol.c (bkm_scale): Don't assume that you can convert
unsigned long to double without losing information.
	(bkm_scale_by_power): New function.

	* lib/xstrtol.c (__xstrtol), src/dd.c (parse_integer):
	Add support for SI-like suffixes like "GB" and "TD".
	* src/dd.c (usage): Describe it.
1998-06-29 15:24:43 +00:00
Jim Meyering
159788fcca (__ZLONG_MAX): Remove. 1998-06-29 15:24:15 +00:00
Jim Meyering
f32dc5a2b0 (human_readable): Coalesce last two args into one, for convenience. 1998-06-29 15:23:45 +00:00
Jim Meyering
ea7102f120 * lib/human.c, lib/human.h (human_readable): Coalesce last two args
into one, for convenience.  All callers changed.
	(human_block_size): New function.
	* lib/human.c: Include <config.h> only if HAVE_CONFIG_H.
	Include <stdlib.h> if HAVE_STDLIB_H;
	declare getenv unless HAVE_DECL_GETENV.
	(_): New macro.
	Include <argmatch.h>, <error.h>, <xstrtoul.h>.
	(DEFAULT_BLOCK_SIZE): New macro.
	(block_size_args, block_size_types): New constants.
	(humblock): New function.
1998-06-29 15:23:04 +00:00
Jim Meyering
41ef62c472 *** empty log message *** 1998-06-29 14:27:03 +00:00
Jim Meyering
26d5ce2f26 . 1998-06-29 03:42:55 +00:00
Jim Meyering
868ed3b0af (usage): Make --kilobytes description consistent with
that in du and df.  From Göran Uddeborg.
1998-06-29 03:42:50 +00:00
Jim Meyering
6552bb980b *** empty log message *** 1998-06-29 03:42:18 +00:00
Jim Meyering
79a6760fe4 . 1998-06-29 02:27:55 +00:00
Jim Meyering
531453d901 . 1998-06-29 02:16:17 +00:00
Jim Meyering
1d94869663 . 1998-06-29 02:15:29 +00:00
Jim Meyering
ce195c7a07 . 1998-06-29 02:14:27 +00:00
Jim Meyering
09a2261919 . 1998-06-29 02:13:56 +00:00
Jim Meyering
c5eb9edf26 Change all uses of unlocked-wrapped functions to their upper case wrapper names. 1998-06-29 02:13:21 +00:00
Jim Meyering
dd9470cb58 Change all uses of unlocked-wrapped functions to their upper case wrapper names. 1998-06-29 02:11:07 +00:00
Jim Meyering
02fc5fa0d0 Change all uses of unlocked-wrapped functions to their upper case wrapper names. 1998-06-29 02:10:24 +00:00
Jim Meyering
b62793b100 . 1998-06-29 01:11:00 +00:00
Jim Meyering
c7af539321 (fsp_to_string): Clean out some crufty #ifdefs
now that we're using the jm_FSTYPENAME autoconf macro.
1998-06-29 01:10:24 +00:00
Jim Meyering
e989012b57 add #undefs, alphabetize 1998-06-29 01:00:51 +00:00
Jim Meyering
7aeda9a4d3 . 1998-06-28 23:51:58 +00:00
Jim Meyering
d51682ef43 *** empty log message *** 1998-06-28 23:51:47 +00:00
Jim Meyering
ab869ed00e . 1998-06-28 23:12:10 +00:00
Jim Meyering
73ab48d4e7 experimental support for -t [optional fd] -- probably soon to be backed out 1998-06-28 21:53:05 +00:00
Jim Meyering
73e6d60538 . 1998-06-28 21:42:37 +00:00