1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-03 15:26:39 +02:00
Commit Graph

5430 Commits

Author SHA1 Message Date
Jim Meyering c837e0038d (fchown) [!HAVE_FCHOWN]: Define fchown(...) to -1.
(set_owner, preserve_author): New functions, factored out of copy_reg.
(copy_reg): Use them.
(copy_internal): Use them here, too.
From Andreas Gruenbacher.
2005-12-04 23:34:14 +00:00
Jim Meyering f390052b80 (usage): Say what happens with two or more arguments. 2005-12-04 09:58:34 +00:00
Jim Meyering a936ac291c (print_uptime): Move decl of local `upsecs' into scope where it's used. 2005-12-03 23:24:46 +00:00
Jim Meyering b3e300393e . 2005-12-03 23:19:58 +00:00
Jim Meyering 08a0a7291f (long_options): Change the name of each undocumented, for-
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
2005-12-03 22:23:23 +00:00
Jim Meyering 43233c319e (long_opts): Change the name of each undocumented, for-
testing-only option to start with `-', so that it cannot render
ambiguous any prefix it happens to share with some other option name.
2005-12-03 22:23:09 +00:00
Paul Eggert e9c8be100e (show_point): Ignore inaccessible file systems.
(usage): -a includes dummy file systems, not size-0 file systems.
2005-11-26 07:51:45 +00:00
Paul Eggert 9b539d8634 (unsigned_long_long_int): Renamed from ulonglong_t,
to avoid collision with POSIX name space.  All uses changed.
2005-11-26 07:29:48 +00:00
Paul Eggert 25719a3315 Improve performance a bit by optimizing away
unnecessary system calls and going to a block size of at least
8192 (on normal hosts, anyway).  This improved performance 5% on my
Debian stable host (2.4.27 kernel, x86, copying from root
ext3 file system to itself).
Include "buffer-lcm.h".
(copy_reg): Omit last argument.  All callers changed.
Use xmalloc to allocate rather than trusting alloca
(which is unwise with large block sizes).
Declare locals more locally, if possible.
Use uintptr_t words instead of int words, for a bit more speed
when looking for null blocks on 64-bit hosts.
Optimize away reads of zero bytes on regular files.
In the typical case, insist on 8 KiB buffers, at least.
Avoid unnecessary extra call to fstat when checking for sparse files.
Avoid now-unnecessary cast to off_t, and "0L".
Avoid unnecessary test of *new_dst when checking for same owner
and group.
2005-11-24 06:49:44 +00:00
Paul Eggert 1000eb18b6 (rm): Don't assume C99 for-loop syntax. 2005-11-23 04:52:48 +00:00
Jim Meyering 32034e05b7 whoops. Add back decl/definition of n_lengths. 2005-11-22 21:12:28 +00:00
Jim Meyering f076895070 (AD_push): Remove debugging cruft. 2005-11-22 21:03:36 +00:00
Jim Meyering 5ff678924e tweak comments 2005-11-22 20:05:48 +00:00
Jim Meyering 66878248f6 . 2005-11-22 15:33:39 +00:00
Jim Meyering b8616748f2 Rewrite. Now, this module is reentrant on systems
that provide openat (Solaris), and on systems like Linux+procfs
where our openat emulation code is reentrant.  This also fixes a
few low-probability leaks and eliminates some code that could,
in very unusual circumstances, cause rm() (via a callee) to exit.
2005-11-22 15:04:51 +00:00
Jim Meyering fd907a33bd . 2005-11-18 23:12:06 +00:00
Jim Meyering ca7cafb093 (AD_mark_helper): Make a char *' parameter const'.
(AD_mark_current_as_unremovable): Likewise, but for a local.
(rm_1): Likewise.
2005-11-17 20:17:47 +00:00
Jim Meyering 97de3a32b6 (basename_is_dot_or_dotdot): Correct wording in comment. 2005-11-17 12:28:34 +00:00
Paul Eggert 24ce72f635 (do_link, usage): Improve quality of ln's diagnostics.
(do_link): Don't use alloca on a buffer of unbounded size.
2005-11-16 22:32:45 +00:00
Jim Meyering fd13239884 remove now-unused file 2005-11-12 08:39:27 +00:00
Jim Meyering 38a1bfa703 . 2005-11-12 08:29:35 +00:00
Paul Eggert 6837183d42 (decode_switches): ls now defaults to --time-style='locale', which in
turn acts like --time-style='posix-long-iso' if the locale settings
are messed up.
2005-11-08 20:59:49 +00:00
Jim Meyering 1ab59b0b84 (usage): Fix descriptions of --sort, --time. 2005-11-07 21:42:23 +00:00
Jim Meyering a8d0fd4c1b Include filenamecat.c.
(FILE_BASENAME_CONCAT): Remove.
(do_link): Remove last arg DEST_IS_DIR.  All callers changed.
(main): Use file_name_concat, base_name, and strip_trailing_slashes
instead of FILE_BASENAME_CONCAT.  This simplifies the code, and avoids
the use of alloca.
2005-11-05 09:34:57 +00:00
Jim Meyering 933576b440 (process_file): Don't overflow for files of size >= 2^31
on systems with stat.st_blocks of a signed 32-bit type.
This bug causes trouble on some AIX 5.1 systems.
Report and trivial patch from Paul Townsend:
<http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00033.html>
2005-11-04 10:08:51 +00:00
Paul Eggert b38883ea2f (usage): Don't mention rm -d. 2005-11-02 21:53:20 +00:00
Paul Eggert ce1d20289c (rm_option_init): Don't initialize unlink_dirs member, which went away. 2005-11-02 21:52:33 +00:00
Paul Eggert 11fc9bca5f (struct rm_options): Remove unlink_dirs. 2005-11-02 21:51:57 +00:00
Jim Meyering 588df316d9 (remove_entry): Emit a better diagnostic when rm
(without -r) fails to remove a directory on a non-Linux system.
This change affects only newer Solaris systems (with priv_*
functions like priv_allocset).  Reported by Keith Thompson.
2005-11-02 09:47:39 +00:00
Paul Eggert a2bacbdc9c (main): Pass PDS_PRE_2000 to posixtime. 2005-11-01 23:42:36 +00:00
Paul Eggert 99f09784cc (parse_obsolete_option): Implement fix for "tail -c 2 FILE". 2005-11-01 23:05:29 +00:00
Paul Eggert 91f8e15bff (skip): Fix off-by-one error reported by Theodoros V. Kalamatianos. 2005-10-31 08:39:14 +00:00
Paul Eggert 50a6da201b (FILE_BASENAME_CONCAT): Omit unnecessary slashes in the
boundary between DEST and SOURCE in the result.
2005-10-28 22:17:00 +00:00
Jim Meyering 84131ca42b (main) [!O_BINARY]: Changed default read mode
back to text, to sync with documentation and for backwards compatibility.
2005-10-27 16:27:04 +00:00
Jim Meyering 9793cca908 Add these: sha224sum sha256sum sha384sum sha512sum 2005-10-26 21:46:24 +00:00
Jim Meyering 91795f6fa2 (tac_file): When determining whether a file is seekable,
also test whether it is a tty.  Using only the lseek-based test would
give a false positive on Solaris.  Reported by Peter Fales.
2005-10-24 16:07:36 +00:00
Jim Meyering 30bf08a3da rename array_cardinality to array_len 2005-10-24 10:39:46 +00:00
Jim Meyering 295bdba02c (ls_codes): Add missing comma.
Anonymous report and patch from
http://savannah.gnu.org/bugs/?func=detailitem&item_id=14849
2005-10-24 09:55:00 +00:00
Jim Meyering b648b4af3d Add a compile-time assertion that the slack_codes
and ls_codes arrays have the same number of elements.  This would
have prevented the above-fixed bug.
2005-10-24 09:43:01 +00:00
Jim Meyering 57d5938b17 * src/expand.c (parse_tab_stops): Add comment to make this function
identical to the one in unexpand.c.

* src/unexpand.c (parse_tab_stops): Adjust syntax to make this function
identical to the one in expand.c.
2005-10-24 07:28:39 +00:00
Jim Meyering 315b42ce8e (next_file): Don't assume fopen cannot return stdin. 2005-10-24 07:18:18 +00:00
Jim Meyering d0889c6d10 . 2005-10-23 20:48:56 +00:00
Jim Meyering 708c4e6682 . 2005-10-23 16:00:59 +00:00
Jim Meyering 1974bccc56 (digest_check, main): Use ptr_align rather than
a dangerous pointer-value-to-`unsigned' cast.
2005-10-23 15:29:25 +00:00
Jim Meyering 3b63180c8c (sha224sum, sha256sum, sha384sum, sha512sum): Rules for compiling sha-2 utilities
(noinst_HEADERS): Remove checksum.h.
2005-10-23 15:23:56 +00:00
Jim Meyering 61fa9f0cfe Provide framework for computing sha-2 hashes. 2005-10-23 15:22:02 +00:00
Jim Meyering 7ac64b812e . 2005-10-23 14:19:22 +00:00
Jim Meyering b2bbe32f13 . 2005-10-22 20:59:27 +00:00
Jim Meyering 7aff553950 . 2005-10-19 07:37:10 +00:00
Jim Meyering dee664c8bb (append_quoted): Quote ' correctly.
Problem reported by Eric Blake.
2005-10-19 07:32:14 +00:00