Age | Commit message (Collapse) | Author |
|
|
|
Report correct usage for directories, not 0.
(process_file): Return for `file_type == FTW_DPRE'
_before_ recording the dev/ino of a directory.
|
|
listed mount point under `Filesystem'. Before, for an unmounted
block- or character-special file argument, it would display the
command-line argument instead.
(show_disk): Return a value indicating whether
there was a match. Don't try to find a mount point here.
(show_entry): If show_disk doesn't find a match, call show_point.
|
|
(du_files): Add prototype with ATTRIBUTE_NORETURN.
Exit from this function, not from...
(main): ...here.
Instead, if possible, invoke du_files through a macro that
runs it with a large, mmap'd stack.
|
|
use FILENUM instead of `SIDE' and say what FILENUM means.
|
|
string of spaces matching the length of the English `...Type' header,
output the right number of spaces to match the selected translation.
Reported by Yann Dirson and Jean Charles Delepine as Debian bug 131113.
|
|
(bytes_split, lines_split, line_bytes_split): Use full_read,
not safe_read. The way split was using the latter, a short read
could cause split to terminate before EOF.
(bytes_split): Remove unnecessary `else' after break.
(lines_split): Likewise. and correct misleading indentation.
|
|
|
|
(cksum): Exit the loop upon EOF, too.
Patch by Michael Bacarella.
|
|
RUN_WITH_BIG_STACK_*
|
|
Remove declaration of euidaccess.
|
|
in cast to avoid warning from icc. Reported by Alexandre Duret-Lutz.
|
|
|
|
Include euidaccess.h.
(eaccess): Rewrite function to set the real uid and gid temporarily
to the effective uid and gid, then invoke 'access', and then set the
real uid and gid back. On systems that lack setreuid or setregid,
fall back on the kludges in euidaccess. Before, it would not work
for e.g., files with ACLs, files that were marked immutable,
or on file systems mounted read-only.
|
|
when necessary) by the wrapper in lib/stat.c.
|
|
|
|
|
|
|
|
Fix memory allocation arithmetic.
|
|
or for files whose dev/inode we've already seen.
|
|
|
|
the name of the file system on which the file resides, usually `/'.
Before, it would leave the `Mounted on' field blank.
(show_disk): Add parameter: STATP.
If we don't find a matching device name, then resort to calling
find_mount_point.
|
|
|
|
|
|
|
|
|
|
(human_time): Diagnose failed localtime, not failed nstrftime.
(main): Fail if G_fail is set.
|
|
(print_human_type): Remove function.
(human_access): Rename from print_human_access. Return a string.
(human_time): Rename from print_human_time. Return a string.
(print_stat): Arrange so that field width and an alignment specifier
are honored for the %A, %F, %x, %y, and %z formats.
[%F]: Use file_type; this gives slightly different file type strings,
e.g., `directory' instead of `Directory' and `regular file' or
`regular empty file' instead of `Regular file'.
|
|
test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
|
|
|
|
option argument, don't exit right away, in case there are others.
Rather record the failure and exit after processing other options.
|
|
Include "dirname.h", "ftw.h", and "quotearg.h".
(AUTHORS): Add self.
(opt_one_file_system): Move global into `main'.
(path, xstat, exit_status): Remove declarations.
(arg_length, suffix_length): New globals.
(G_fail): New global, sort of like the old `exit_status'.
(IS_FTW_DIR_TYPE): Define.
(print_only_size): New function.
(process_file): New function.
(str_init, ensure_space, str_copyc, str_concatc): Remove functions.
(str_trunc, pop_dir, count_entry): Likewise.
(du_files): Rewrite to use nftw.
|
|
store the screen columns, and return the number of bytes instead.
(print_dir): Pass NULL as fourth parameter of quote_name.
(print_name_with_quoting): Likewise.
(length_of_file_name_and_frills): Get the width from the fourth
parameter of quote_name instead of return value.
|
|
|
|
|
|
`format == long_format', then silently reset dired. This doesn't
change the behavior of ls (all prior uses of dired were protected
by `&& format == long_format'), and lets us...
(DIRED_INDENT): ... remove `format == long_format' conjunct.
(PUSH_CURRENT_DIRED_POS): Likewise.
(main): Likewise.
|
|
has d_type == DT_UNKNOWN it may still be a directory -- or not (e.g., with
FreeBSD on an NFS-mounted file system), so resort to calling lstat to find out.
|
|
|
|
|
|
|
|
(enum) [DEREFERENCE_COMMAND_LINE_SYMLINK_TO_DIR_OPTION]: New member.
(long_options): Add option --dereference-command-line-symlink-to-dir.
(main): Make DEREF_COMMAND_LINE_SYMLINK_TO_DIR be the default,
rather than DEREF_COMMAND_LINE_ARGUMENTS, when none of the
-d, -F, -l options is specified.
(decode_switches): Handle --dereference-command-line-symlink-to-dir.
(gobble_file): Honor DEREF_COMMAND_LINE_SYMLINK_TO_DIR.
Change --dereference-command-line (-H) to dereference *all*
command line arguments, including broken symlinks.
|
|
compatible with FreeBSD and the POSIX spec is confusing
and somewhat contradictory.
(DEREF_COMMAND_LINE_ARGUMENTS): Change name back
from DEREF_COMMAND_LINE_SYMLINK_TO_DIR, updating all uses.
(long_options): Change the long option name back.
(usage): Change the usage back.
(gobble_file): When -H is specified, dereference a top-level
arg even if it points to a non-directory.
|
|
|
|
when --dereference (-L) is not specified, and
- when operating on a dangling symlink
- when operating on command-line-symlink-to-directories
This fixes numerous problems. Here are examples:
- `ls dangling-symlink' would fail with `no such file...'
Now it prints `dangling-symlink'.
- `ls -i symlink' would mistakenly print the inode of the referent.
Now it prints the inode of the symlink. Likewise for --size (-s).
Based on a patch from Michael Stone.
Reported by Deepak Goel as Debian bug #173793.
|
|
option to --dereference-command-line-symlink-to-dir.
[enum Dereference_symlink]
(DEREF_COMMAND_LINE_SYMLINK_TO_DIR): Rename from
DEREF_COMMAND_LINE_ARGUMENTS. Update all uses.
(long_options): Rename the option.
(usage): Say that --dereference-... changes how ls treats
only symlinks to directories specified on the command line.
|
|
so that ls --color would no longer highlight the names of files with
the execute bit set when not specified on the command line.
Patch by Michael Stone. Reported by Stephen Depooter as
Debian bug 175135.
|
|
Patch by Michael Stone.
|
|
(-a).
|
|
Use canonicalize_file_name unconditionally.
|
|
|