Age | Commit message (Collapse) | Author |
|
|
|
when tailing forever and the open failed. Otherwise, we could get
uninitialized memory references of those fields in recheck.
|
|
|
|
|
|
(MAX_ADDRESS_LENGTH): Don't hard-code as a literal.
Rather, define in terms of the type, off_t.
(string_min): Declare to be of type size_t.
(flag_dump_strings): Declare to be of type int.
(print_s_char): Declare the n_bytes parameter and the local, `i',
to be of type off_t.
(print_char): Likewise.
(print_s_short): Likewise.
(print_short): Likewise.
(print_int): Likewise.
(print_long): Likewise.
(print_long_long): Likewise.
(print_float): Likewise.
(print_double): Likewise.
(print_long_double): Likewise.
(dump_hexl_mode_trailer): Likewise.
(print_named_ascii): Likewise.
(print_ascii): Likewise.
(write_block): Likewise.
(print_ascii): Declare local, `print_function' with a prototype.
Change a few `>' comparisons to the equivalent `<' form.
(parse_options): Declare `tmp' to be of type uintmax_t.
Use xstrtoumax, not xstrtoul.
Fail if the specified offset if larger than OFF_T_MAX.
(dump_strings): Declare local `i' to be of type size_t.
Remove the now-unnecessary cast-to-off_t.
(main) [IF_LINT]: Initialize desired_width to avoid a warning.
Declare `tmp' to be of type uintmax_t.
Use xstrtoumax, not xstrtoul.
Fail if minimum string length is larger than SIZE_MAX.
Fail if specified width is larger than ULONG_MAX.
|
|
(OFF_T_MAX): Likewise.
|
|
(OFF_T_MAX): Define.
|
|
(format_address): Use off_t, not long unsigned_int as the
parameter type.
(format_address_none): Likewise. Mark parameter as unused.
(format_address_std): Likewise.
(format_address_label): Likewise.
(print_ascii): Mark format string parameter as unused.
(write_block): Use off_t, not long unsigned_int as offset type.
(expand_address_fmt): New function.
(main): Use it to expand each address format string template.
Reported by Mark Nudelman, via Andreas Jaeger.
|
|
offset. Give a better diagnostic when the requested offset is still
representable but larger than OFF_T_MAX.
|
|
|
|
(main): ...to here.
(usage): Clarify option descriptions.
|
|
|
|
|
|
This should be portable, as we seek before doing any I/O.
(fseeko): Remove; no longer used.
|
|
|
|
fails; POSIX.2 does not allow this. Invoke acl only on
non-symlinks, and only if lstat or stat succeeds.
|
|
bit more readable.
|
|
Reported by Volker Borchert.
|
|
safe_read, to avoid overflow e.g. on 64-bit Solaris sparc.
(dd_copy): Remove unnecessary cast.
|
|
documented a standard way to do it.
(skip_bytes, seek_bytes): Remove.
(usage): Remove B suffix.
(scanargs, skip, dd_copy, main): Remove support for B suffix.
|
|
|
|
(SIZE_MAX): Renamed from SIZE_T_MAX, as C99 uses SIZE_MAX.
All uses changed.
|
|
|
|
e.g. 64-bit Solaris (sparc).
("human.h", "xstrtol.h"): Include.
(struct line): length member is now size_t, not int.
(struct lines): Likewise for used, alloc, limit members.
(struct buffer): Likewise for used, alloc, left, newline_free members.
(struct keyfield): Likewise for sword, schar, eword, echar members.
(sortalloc, mergealloc, linelength): Now size_t, not int.
(initbuf, fillbuf, initlines, begfield, limfield, findlines,
numcompare, getmonth, keycompare, compare, checkfp, mergefps,
sortlines, sort): Accept, return, and use size_t for sizes, not int.
(fillbuf, initlines, findlines, checkfp, sort): Check for overflow
when computing buffer sizes.
(begfield, limfield): Do not index past end of array.
(checkfp): Return a boolean, not a line number, as the line
number may not fit in int. All callers changed. Use
uintmax_t for line numbers, not int.
(sort): Don't allocate tmp until we need it (and know the right size).
(parse_field_count): New function.
(main): Use it to check for overflow in field counts.
"outfile" is now a pointer to const.
|
|
|
|
|
|
|
|
at the top of the loop, not at the bottom.
|
|
bytes, but consider RECORDS to be a byte count if COUNT_BYTES
is nonzero.
|
|
(seek_records): Renamed from seek_record, for consistency with
skip_records and max_records. All uses changed.
(usage, scanargs): Remove bseek=n and bskip=n; instead, use seek=nB
and skip=nB.
(enum Unit, Unit): Remove.
(skip, dd_copy, main): Undo most recent change.
(dd_copy, main): Pass blocksize of 1 as appropriate when
skip_bytes or seek_bytes is nonzero.
(main): Rework ftruncate failure diagnostic to always use byte count.
|
|
Fix a merge bug exposed by new test.
|
|
adapt skip to skip either by bytes or by blocks
|
|
(main): Report failed fstat.
Complain only when ftruncate fails on a regular file,
a directory, or a shared memory object.
|
|
|
|
|
|
Based on a patch from Michael Stone.
Reported by andras@kolumbus.fi at http://bugs.debian.org/77174.
|
|
the mount directory exists and has the required device number.
Before, e.g., `df /floppy' would mistakenly report on the root
partition if /floppy were not listed in /etc/mtab but / was.
Patch from Eirik Fuller (http://bugs.debian.org/76923).
|
|
(change_file_mode): Use it to determine accurately when -c should
make chmod announce there's been a change.
|
|
Handle the case correctly when digits options immediately precede a
non-option.
|
|
INDICATOR_STYLE_OPTION, QUOTING_STYLE_OPTION,
SHOW_CONTROL_CHARS_OPTION, SORT_OPTION, TIME_OPTION): New enum
values, to ensure that option values can't collide with chars.
(long_options, decode_switches): Use them.
|
|
constants rather than macros. Use values that cannot conflict
with C characters or with -1, CHAR_MAX + 1, etc.
|
|
merely because we couldn't `chdir' into it. That would give subtly
different results in some cases. Reported by Mattias Wadenstein
via Michael Stone.
|
|
the output format of `ls -l --full-time'.
|
|
one diagnostic, not two. Reported by Volker Borchert.
|
|
from the argument to the final mkdir call. Required for NetBSD.
|
|
|
|
so join works with 8-bit delimiter characters.
|
|
|
|
|
|
so join works with 8-bit delimiter characters.
Reported by Antonio Rendas.
|