mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
497a5cf465 | ||
|
|
1efc5bda6c | ||
|
|
0cafba44bb | ||
|
|
1a0333565f | ||
|
|
a73fdeb2ce | ||
|
|
751f6acf54 | ||
|
|
8b139ff78c | ||
|
|
b6b438c45d | ||
|
|
fc9b802e3d | ||
|
|
e189a79efd | ||
|
|
56206ccb80 | ||
|
|
3ef2f939f7 | ||
|
|
1b00a69ff2 | ||
|
|
7932d2e2d4 | ||
|
|
2061f04847 | ||
|
|
d5d00c7f9f | ||
|
|
84268dae4e | ||
|
|
78a1d22aa0 | ||
|
|
597bfeb851 | ||
|
|
c24e93d926 | ||
|
|
75be540f7d | ||
|
|
28c7ef509e | ||
|
|
7c96936a04 | ||
|
|
e24ce7c58d | ||
|
|
876e46bce7 | ||
|
|
a0db0def2d | ||
|
|
0766fb8b54 | ||
|
|
b40b5b6917 | ||
|
|
95954ad583 | ||
|
|
e81a82b74f | ||
|
|
3e9cc76189 | ||
|
|
693311a5c3 | ||
|
|
5e42576c01 | ||
|
|
ba6b1acefd | ||
|
|
a3c4e0b94c | ||
|
|
7e4eef7e40 | ||
|
|
a002111341 | ||
|
|
0fdbf2e8c7 | ||
|
|
9b17e1d7d4 |
@@ -1 +1 @@
|
||||
6.3
|
||||
6.4
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
ChangeLog(-[0-9]+)?$
|
||||
^old/
|
||||
^src/c99-to-c98\.diff$
|
||||
^gl/.*
|
||||
|
||||
234
ChangeLog
234
ChangeLog
@@ -1,3 +1,237 @@
|
||||
2006-11-19 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Version 6.5.
|
||||
* NEWS: Record release date. Remove "-cvs" suffix.
|
||||
* configure.ac (AC_INIT): Remove "-cvs" suffix from version string.
|
||||
|
||||
2006-11-18 Jim Meyering <jim@meyering.net>
|
||||
|
||||
"ln --backup f f" produces a misleading diagnostic:
|
||||
ln: creating hard link `f' => `f': No such file or directory
|
||||
* src/ln.c (do_link): Give a better diagnostic in this unusual case.
|
||||
(do_link): Rename local: s/lstat_ok/dest_lstat_ok/.
|
||||
* tests/ln/Makefile.am (TESTS): Add hard-backup.
|
||||
* tests/ln/hard-backup: New test for the above.
|
||||
* NEWS: Mention this fix.
|
||||
|
||||
2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* bootstrap.conf (gnulib_modules): Add sys_stat, since we use it
|
||||
directly too.
|
||||
* lib/.cvsignore, lib/.gitignore: Add root-dev-ino.c, root-dev-ino.h.
|
||||
* m4/.cvsignore, m4/.gitignore: Add root-dev-ino.m4.
|
||||
* src/ls.c (DIRED_FPUTS_LITERAL, PUSH_CURRENT_DIRED_POS):
|
||||
Omit unnecessary parenthesization of args.
|
||||
* src/od.c (EQUAL_BLOCKS): Likewise.
|
||||
* src/system.h (STREQ, ASSIGN_STRDUPA): Likewise.
|
||||
|
||||
2006-11-16 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/tail-2/append-only: If chattr +a fails, exit 77 (to tell
|
||||
automake we're skipping this test), and give a diagnostic to tell
|
||||
the user the same thing. Reported by Mike Grayson.
|
||||
|
||||
2006-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* man/Makefile.am (dist_man_MANS): Replace all optional manpages
|
||||
with `$(MAN)', computed at configure time; also, list them ...
|
||||
(optional_mans): ... in this new variable.
|
||||
(max_aux, EXTRA_DIST): Ensure that we distribute all manpages.
|
||||
|
||||
2006-11-16 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Help valgrind see that there is no leak in dd.c.
|
||||
* src/dd.c (dd_copy): Declare real_buf and real_obuf to be static,
|
||||
so we need not free them at all. This is easier than freeing
|
||||
both buffers at each of the early "return"s.
|
||||
|
||||
* src/csplit.c (load_buffer): Plug an inconsequential leak.
|
||||
|
||||
2006-11-15 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* .x-po-check: Exclude gl/ files. Otherwise, po-check would
|
||||
complain that some of gl/lib/*.[ch] are not listed in POTFILES.in.
|
||||
|
||||
2006-11-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* gl/m4/root-dev-ino.m4: Now that this is part of a real "module",
|
||||
remove the now-unnecessary use of AC_LIBSOURCES.
|
||||
|
||||
Adapt to new version of gnulib-tool.
|
||||
* gl/modules/root-dev-ino: New file.
|
||||
* lib/root-dev-ino.c, lib/root-dev-ino.h: Move these files ...
|
||||
* gl/lib/root-dev-ino.c, gl/lib/root-dev-ino.h: ... to here.
|
||||
* m4/root-dev-ino.m4: Move this file ...
|
||||
* gl/m4/root-dev-ino.m4: ... to here.
|
||||
|
||||
* bootstrap.conf (gnulib_modules): Add root-dev-ino.
|
||||
|
||||
2006-11-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/sort.c (insertkey): Use xmemdup, rather than xmalloc+assignment.
|
||||
From Paul Eggert.
|
||||
|
||||
Plug another technically-unimportant leak in sort.
|
||||
* src/sort.c (main): Don't allocate memory for each new key here.
|
||||
(insertkey): Allocate memory for each key here, instead.
|
||||
(key_init): Rename from new_key. Don't allocate.
|
||||
|
||||
* src/sort.c (main): Plug a tiny memory leak.
|
||||
Move declaration of local "minus" down to be nearer point of use.
|
||||
|
||||
2006-11-12 Jim Meyering <jim@meyering.net>
|
||||
|
||||
du would exit early, when encountering an inaccessible directory
|
||||
Reported by Mike Frysinger, in
|
||||
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/8831
|
||||
* tests/du/inacc-dest: New test, based on an example from Mike Frysinger.
|
||||
* tests/chgrp/no-x: Remove the "fts_read failed: ..."
|
||||
diagnostic from the expected output when using native fdopendir.
|
||||
* tests/chmod/no-x: Likewise.
|
||||
* tests/du/no-x: Likewise.
|
||||
* NEWS: Mention this bug fix.
|
||||
* tests/du/Makefile.am (TESTS): Add inacc-dest.
|
||||
|
||||
* Makefile.maint (sc_cast_of_x_alloc_return_value): Add an exclusion
|
||||
for xalloc.h itself.
|
||||
|
||||
Avoid false-positive when testing via valgrind.
|
||||
* tests/mv/atomic: Grep strace output for a more specific pattern
|
||||
than just "unlink", since that got a false positive when testing
|
||||
under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0
|
||||
* tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP.
|
||||
|
||||
2006-10-28 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* Makefile.maint (patch-check): Make it easier to regenerate
|
||||
the src/c99-to-c89.diff file. E.g., I do this:
|
||||
make patch-check REGEN_PATCH=1; ediff src/c99-to-c89.diff new-diff
|
||||
|
||||
* src/c99-to-c89.diff: Update to reflect new offsets in rm.c.
|
||||
|
||||
2006-10-26 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/system.h (ftello): Add a compile-time check for the highly
|
||||
unlikely condition of off_t narrower than long int, rather than
|
||||
handling it at run time. Based on a patch from Paul Eggert.
|
||||
|
||||
2006-10-25 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* tests/chmod/c-option: When double-quoting part of a word, prefer
|
||||
to double-quote the whole word. This is a bit easier to read (at
|
||||
least for me), and in some cases it avoids a shell bug with Tru64
|
||||
4.0 sh reported by Nelson H. F. Beebe. For example, instead of
|
||||
"$abs_srcdir"/../setgid-check we now write
|
||||
"$abs_srcdir/../setgid-check".
|
||||
* tests/cp/cp-parents: Likewise.
|
||||
* tests/du/inaccessible-cwd: Likewise.
|
||||
* tests/du/long-from-unreadable: Likewise.
|
||||
* tests/install/basic-1: Likewise.
|
||||
* tests/install/trap: Likewise.
|
||||
* tests/misc/close-stdout: Likewise.
|
||||
* tests/mkdir/concurrent-1: Likewise.
|
||||
* tests/mkdir/p-1: Likewise.
|
||||
* tests/mkdir/p-3: Likewise.
|
||||
* tests/mkdir/parents: Likewise.
|
||||
* tests/mkdir/perm: Likewise.
|
||||
* tests/readlink/can-e: Likewise.
|
||||
* tests/readlink/can-f: Likewise.
|
||||
* tests/readlink/can-m: Likewise.
|
||||
* tests/rm/inaccessible: Likewise.
|
||||
* tests/rm/unread3: Likewise.
|
||||
* tests/touch/no-create-missing: Likewise.
|
||||
|
||||
* lib/.cvsignore: Add uinttostr.c.
|
||||
|
||||
2006-10-25 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Portability to Tru64 V4.0.
|
||||
* src/system.h (ftello) [!HAVE_FSEEKO && !defined ftello]:
|
||||
Define inline replacement function.
|
||||
This (along with a yesterday's fix for autoconf's
|
||||
_AC_SYS_LARGEFILE_MACRO_VALUE macro) makes it so coreutils
|
||||
now builds once more on Tru64 V4.0. Reported by Nelson Beebe.
|
||||
|
||||
2006-10-25 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* src/cat.c (infile): Add "const" to declaration.
|
||||
* src/csplit.c (prefix): Likewise.
|
||||
* src/printf.c (cfcc_msg): Likewise.
|
||||
* src/tail.c (valid_file_spec): Likewise.
|
||||
* src/cut.c (cut_file): Likewise, for a parameter.
|
||||
* src/expr.c (str_value): Likewise.
|
||||
* src/fold.c (fold_file): Likewise.
|
||||
* src/pr.c (init_header): Likewise.
|
||||
* src/dircolors.c (dc_parse_stream): Likewise, for a local.
|
||||
* src/tr.c (make_printable_str): Likewise.
|
||||
* src/nl.c (body_type, header_type, footer_type, current_type):
|
||||
(separator_str, build_type_arg, nl_file): Likewise, for many.
|
||||
* src/paste.c (main): Don't assign a read-only string to 'optarg'.
|
||||
* src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
|
||||
|
||||
2006-10-25 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/sample-test: Update copyright year list to include only
|
||||
the current year, since this is what I'll want in any new test.
|
||||
|
||||
2006-10-24 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* src/c99-to-c89.diff: Update to reflect new offsets.
|
||||
|
||||
* NEWS: new feature: rm accepts new option: --one-file-system
|
||||
Suggested by Steve McIntyre in <http://bugs.debian.org/392925>.
|
||||
* src/remove.h (struct rm_options) [one_file_system]: New member.
|
||||
* src/rm.c (rm_option_init): Initialize it.
|
||||
(usage): Document the option.
|
||||
* src/mv.c (rm_option_init): Likewise.
|
||||
* src/remove.c (remove_dir): With --one-file-system and --recursive,
|
||||
for each directory command line argument, do not affect a file system
|
||||
different from that of the starting directory. And give a diagnostic.
|
||||
* src/rm.c (ONE_FILE_SYSTEM): New enum.
|
||||
(main): Handle new option.
|
||||
* tests/rm/one-file-system: Test the above.
|
||||
* tests/rm/Makefile.am (TESTS): Add one-file-system.
|
||||
* tests/Makefile.am (check-root): Add the rm/one-file-system
|
||||
test to the list.
|
||||
(EXTRA_DIST): Add other-fs-tmpdir.
|
||||
|
||||
* tests/mv/setup: Removed. Renamed to...
|
||||
* tests/other-fs-tmpdir: ...this new file.
|
||||
* tests/mv/Makefile.am (EXTRA_DIST): Remove setup.
|
||||
* tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir.
|
||||
* tests/mv/backup-is-src: Likewise.
|
||||
* tests/mv/hard-link-1: Likewise.
|
||||
* tests/mv/leak-fd: Likewise.
|
||||
* tests/mv/mv-special-1: Likewise.
|
||||
* tests/mv/part-fail: Likewise.
|
||||
* tests/mv/part-hardlink: Likewise.
|
||||
* tests/mv/part-rename: Likewise.
|
||||
* tests/mv/part-symlink: Likewise.
|
||||
* tests/mv/partition-perm: Likewise.
|
||||
* tests/mv/to-symlink: Likewise.
|
||||
* tests/mv/into-self-2: Likewise.
|
||||
|
||||
Don't let a failure in one test stop "make -k" from running the others.
|
||||
* tests/Makefile.am (t1 t2 t3 t4 t5): New targets.
|
||||
(check-root): Depend on them, rather than executing the five
|
||||
commands in a single rule. Reported by Greg Schafer.
|
||||
|
||||
2006-10-23 Bob Proulx <bob@proulx.com> (tiny change)
|
||||
|
||||
* Makefile.maint (alpha beta major): Use a better log message for
|
||||
the automatic commit of .prev-version.
|
||||
|
||||
2006-10-23 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* tests/misc/pwd-long: Undo last change, since it made Perl invoke
|
||||
pwd via a shell. Instead, ensure that the absolute name of the
|
||||
pwd binary consists solely of reasonable characters.
|
||||
Whoops. Don't exec the perl script. Otherwise, the sh-trap-based
|
||||
clean-up code isn't run.
|
||||
|
||||
* NEWS: Add a line for 6.5-cvs.
|
||||
* configure.ac (AC_INIT): Bump to 6.5 and add "-cvs" suffix.
|
||||
|
||||
2006-10-22 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Version 6.4.
|
||||
|
||||
@@ -102,7 +102,8 @@ sc_cast_of_argument_to_free:
|
||||
exit 1; } || :
|
||||
|
||||
sc_cast_of_x_alloc_return_value:
|
||||
@grep -nE --exclude=$(srcdir)/lib/regex.c \
|
||||
@grep -nE --exclude=$(srcdir)/lib/xalloc.h \
|
||||
--exclude=$(srcdir)/lib/regex.c \
|
||||
'\*\) *x(m|c|re)alloc\>' \
|
||||
$(srcdir)/{lib,src}/*.[chy] && \
|
||||
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
|
||||
@@ -330,6 +331,8 @@ patch-check:
|
||||
(cd src-c89; patch -V never --fuzz=0) < src/c99-to-c89.diff \
|
||||
> $@.1 2>&1
|
||||
grep -v '^patching file ' $@.1 > $@.2 || :
|
||||
if test "$${REGEN_PATCH+set}" = set; then \
|
||||
diff -upr src src-c89 > new-diff || : ; fi
|
||||
fail=0; test -s $@.2 && fail=1 || : ; \
|
||||
rm -rf src-c89 $@.1 $@.2; \
|
||||
test $$fail = 0
|
||||
@@ -591,4 +594,6 @@ alpha beta major: news-date-check changelog-check $(local-check)
|
||||
chmod a-w $(rel-files)
|
||||
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
$(VC) commit -m. $(prev_version_file)
|
||||
$(VC) commit -m \
|
||||
'$(prev_version_file): Record previous version: $(VERSION).' \
|
||||
$(prev_version_file)
|
||||
|
||||
17
NEWS
17
NEWS
@@ -1,5 +1,22 @@
|
||||
GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
* Major changes in release 6.5 (2006-11-19) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
du (and the other fts clients: chmod, chgrp, chown) would exit early
|
||||
when encountering an inaccessible directory on a system with native
|
||||
openat support (i.e., linux-2.6.16 or newer along with glibc-2.4
|
||||
or newer). This bug was introduced with the switch to gnulib's
|
||||
openat-based variant of fts, for coreutils-6.0.
|
||||
|
||||
"ln --backup f f" now produces a sensible diagnostic
|
||||
|
||||
** New features
|
||||
|
||||
rm accepts a new option: --one-file-system
|
||||
|
||||
|
||||
* Major changes in release 6.4 (2006-10-22) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
@@ -53,11 +53,13 @@ gnulib_modules="
|
||||
memrchr mkancesdirs mkdir mkdir-p mkstemp mktime modechange
|
||||
mountlist obstack pathmax perl physmem posixtm posixver putenv
|
||||
quote quotearg raise readlink readtokens readtokens0 readutmp
|
||||
realloc regex rename-dest-slash rmdir rmdir-errno rpmatch
|
||||
realloc regex rename-dest-slash rmdir rmdir-errno
|
||||
root-dev-ino
|
||||
rpmatch
|
||||
safe-read same
|
||||
save-cwd savedir savewd settime sha1 sig2str ssize_t stat-macros
|
||||
stat-time stdbool stdlib-safer stpcpy strcase strftime
|
||||
strpbrk strtoimax strtoumax strverscmp timespec tzset
|
||||
strpbrk strtoimax strtoumax strverscmp sys_stat timespec tzset
|
||||
unicodeio unistd-safer unlink-busy unlinkdir unlocked-io
|
||||
uptime userspec utimecmp utimens vasprintf verify version-etc-fsf
|
||||
wcwidth winsz-ioctl winsz-termios xalloc xgetcwd xgethostname
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
dnl Written by Jim Meyering.
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([GNU coreutils],[6.4],[bug-coreutils@gnu.org])
|
||||
AC_INIT([GNU coreutils],[6.5],[bug-coreutils@gnu.org])
|
||||
AC_CONFIG_SRCDIR(src/ls.c)
|
||||
|
||||
AC_CONFIG_AUX_DIR(build-aux)
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
2006-10-27 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (wc invocation): When giving the order in which
|
||||
the various "counts" are listed, also mention "maximum line length".
|
||||
Prompted by a report from Vincent LeFevre.
|
||||
|
||||
2006-10-23 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* coreutils.texi (rm invocation): Describe --one-file-system.
|
||||
|
||||
2006-09-26 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* coreutils.texi (groups invocation): "groups" no longer prefixes
|
||||
|
||||
@@ -2950,7 +2950,8 @@ wc [@var{option}]@dots{} [@var{file}]@dots{}
|
||||
given as an argument, it prints the file name following the counts. If
|
||||
more than one @var{file} is given, @command{wc} prints a final line
|
||||
containing the cumulative counts, with the file name @file{total}. The
|
||||
counts are printed in this order: newlines, words, characters, bytes.
|
||||
counts are printed in this order: newlines, words, characters, bytes,
|
||||
maximum line length.
|
||||
Each count is printed right-justified in a field with at least one
|
||||
space between fields so that the numbers and file names normally line
|
||||
up nicely in columns. The width of the count fields varies depending
|
||||
@@ -7772,6 +7773,24 @@ removal is requested. Equivalent to @option{-I}.
|
||||
Specifying @option{--interactive} and no @var{when} is equivalent to
|
||||
@option{--interactive=always}.
|
||||
|
||||
@itemx --one-file-system
|
||||
@opindex --one-file-system
|
||||
@cindex one file system, restricting @command{rm} to
|
||||
When removing a hierarchy recursively, skip any directory that is on a
|
||||
file system different from that of the corresponding command line argument.
|
||||
|
||||
This option is useful when removing a build ``chroot'' hierarchy,
|
||||
which normally contains no valuable data. However, it is not uncommon
|
||||
to bind-mount @file{/home} into such a hierarchy, to make it easier to
|
||||
use one's start-up file. The catch is that it's easy to forget to
|
||||
unmount @file{/home}. Then, when you use @command{rm -rf} to remove
|
||||
your normally throw-away chroot, that command will remove everything
|
||||
under @file{/home}, too.
|
||||
Use the @option{--one-file-system} option, and it will
|
||||
warn about and skip directories on other file systems.
|
||||
Of course, this will not save your @file{/home} if it and your
|
||||
chroot happen to be on the same file system.
|
||||
|
||||
@itemx --preserve-root
|
||||
@opindex --preserve-root
|
||||
@cindex root directory, disallow recursive destruction
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#serial 2
|
||||
#serial 3
|
||||
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
@@ -6,7 +6,6 @@ dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_ROOT_DEV_INO],
|
||||
[
|
||||
AC_LIBSOURCES([root-dev-ino.c, root-dev-ino.h, dev-ino.h, same-inode.h])
|
||||
AC_LIBOBJ([root-dev-ino])
|
||||
|
||||
dnl Prerequisites
|
||||
25
gl/modules/root-dev-ino
Normal file
25
gl/modules/root-dev-ino
Normal file
@@ -0,0 +1,25 @@
|
||||
Description:
|
||||
Root device and inode number checking.
|
||||
|
||||
Files:
|
||||
lib/root-dev-ino.h
|
||||
lib/root-dev-ino.c
|
||||
m4/root-dev-ino.m4
|
||||
|
||||
Depends-on:
|
||||
dev-ino
|
||||
same-inode
|
||||
|
||||
configure.ac:
|
||||
gl_ROOT_DEV_INO
|
||||
|
||||
Makefile.am:
|
||||
|
||||
Include:
|
||||
"root-dev-ino.h"
|
||||
|
||||
License:
|
||||
GPL
|
||||
|
||||
Maintainer:
|
||||
Jim Meyering
|
||||
@@ -145,6 +145,8 @@ hash.c
|
||||
hash.h
|
||||
human.c
|
||||
human.h
|
||||
i-ring.c
|
||||
i-ring.h
|
||||
idcache.c
|
||||
imaxtostr.c
|
||||
inet_ntop.c
|
||||
@@ -251,6 +253,8 @@ regexec.c
|
||||
rename-dest-slash.c
|
||||
rename.c
|
||||
rmdir.c
|
||||
root-dev-ino.c
|
||||
root-dev-ino.h
|
||||
rpmatch.c
|
||||
safe-read.c
|
||||
safe-read.h
|
||||
@@ -318,9 +322,11 @@ strverscmp.c
|
||||
strverscmp.h
|
||||
t-fpending
|
||||
tempname.c
|
||||
tempname.h
|
||||
time_r.c
|
||||
time_r.h
|
||||
timespec.h
|
||||
uinttostr.c
|
||||
umaxtostr.c
|
||||
unicodeio.h
|
||||
unistd--.h
|
||||
|
||||
5
lib/.gitignore
vendored
5
lib/.gitignore
vendored
@@ -135,6 +135,8 @@ hash.c
|
||||
hash.h
|
||||
human.c
|
||||
human.h
|
||||
i-ring.c
|
||||
i-ring.h
|
||||
idcache.c
|
||||
imaxtostr.c
|
||||
inet_ntop.c
|
||||
@@ -241,6 +243,8 @@ regexec.c
|
||||
rename-dest-slash.c
|
||||
rename.c
|
||||
rmdir.c
|
||||
root-dev-ino.c
|
||||
root-dev-ino.h
|
||||
rpmatch.c
|
||||
safe-read.c
|
||||
safe-read.h
|
||||
@@ -305,6 +309,7 @@ strverscmp.c
|
||||
strverscmp.h
|
||||
t-fpending
|
||||
tempname.c
|
||||
tempname.h
|
||||
time_r.c
|
||||
time_r.h
|
||||
timespec.h
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2006-11-14 Jim Meyering <jim@meyering.net>
|
||||
|
||||
* readlink-stub.c, lstat-stub.c: Remove now-unused files.
|
||||
|
||||
2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Port sha512sum to hosts where uintmax_t is only 32 bits, e.g.,
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#include <config.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* A trivial substitute for `lstat'.
|
||||
|
||||
DJGPP 2.03 and earlier don't have `lstat' and don't support
|
||||
symlinks. */
|
||||
|
||||
int
|
||||
lstat (const char *fname, struct stat *st_buf)
|
||||
{
|
||||
return stat (fname, st_buf);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#include <config.h>
|
||||
#include <stddef.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* A trivial substitute for `readlink'.
|
||||
|
||||
DJGPP 2.03 and earlier don't have `readlink' and don't support
|
||||
symlinks. */
|
||||
|
||||
int
|
||||
readlink (const char *file, char *buffer, size_t size)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
@@ -43,6 +43,7 @@ file-type.m4
|
||||
fileblocks.m4
|
||||
filemode.m4
|
||||
filenamecat.m4
|
||||
flexmember.m4
|
||||
fnmatch.m4
|
||||
fpending.m4
|
||||
fprintftime.m4
|
||||
@@ -81,11 +82,15 @@ hard-locale.m4
|
||||
hash.m4
|
||||
host-os.m4
|
||||
human.m4
|
||||
i-ring.m4
|
||||
iconv.m4
|
||||
idcache.m4
|
||||
include_next.m4
|
||||
inet_ntop.m4
|
||||
inline.m4
|
||||
intdiv0.m4
|
||||
intl.m4
|
||||
intldir.m4
|
||||
intmax.m4
|
||||
intmax_t.m4
|
||||
inttostr.m4
|
||||
@@ -156,6 +161,7 @@ rename-dest-slash.m4
|
||||
rename.m4
|
||||
rmdir-errno.m4
|
||||
rmdir.m4
|
||||
root-dev-ino.m4
|
||||
rpmatch.m4
|
||||
safe-read.m4
|
||||
safe-write.m4
|
||||
@@ -200,6 +206,7 @@ strtoumax.m4
|
||||
strverscmp.m4
|
||||
sys_socket_h.m4
|
||||
sys_stat_h.m4
|
||||
tempname.m4
|
||||
time_r.m4
|
||||
timespec.m4
|
||||
tm_gmtoff.m4
|
||||
|
||||
7
m4/.gitignore
vendored
7
m4/.gitignore
vendored
@@ -42,6 +42,7 @@ file-type.m4
|
||||
fileblocks.m4
|
||||
filemode.m4
|
||||
filenamecat.m4
|
||||
flexmember.m4
|
||||
fnmatch.m4
|
||||
fpending.m4
|
||||
fprintftime.m4
|
||||
@@ -79,9 +80,13 @@ hard-locale.m4
|
||||
hash.m4
|
||||
host-os.m4
|
||||
human.m4
|
||||
i-ring.m4
|
||||
iconv.m4
|
||||
idcache.m4
|
||||
inet_ntop.m4
|
||||
inline.m4
|
||||
intl.m4
|
||||
intldir.m4
|
||||
intmax.m4
|
||||
intmax_t.m4
|
||||
inttostr.m4
|
||||
@@ -149,6 +154,7 @@ rename-dest-slash.m4
|
||||
rename.m4
|
||||
rmdir-errno.m4
|
||||
rmdir.m4
|
||||
root-dev-ino.m4
|
||||
rpmatch.m4
|
||||
safe-read.m4
|
||||
safe-write.m4
|
||||
@@ -192,6 +198,7 @@ strtoumax.m4
|
||||
strverscmp.m4
|
||||
sys_socket_h.m4
|
||||
sys_stat_h.m4
|
||||
tempname.m4
|
||||
time_r.m4
|
||||
timespec.m4
|
||||
tm_gmtoff.m4
|
||||
|
||||
@@ -19,22 +19,25 @@
|
||||
# 02110-1301, USA.
|
||||
|
||||
dist_man_MANS = \
|
||||
base64.1 basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 \
|
||||
base64.1 basename.1 cat.1 chgrp.1 chmod.1 chown.1 cksum.1 comm.1 \
|
||||
cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 \
|
||||
echo.1 env.1 expand.1 expr.1 factor.1 false.1 fmt.1 fold.1 groups.1 \
|
||||
head.1 hostid.1 hostname.1 id.1 install.1 join.1 kill.1 \
|
||||
head.1 hostname.1 id.1 install.1 join.1 kill.1 \
|
||||
link.1 ln.1 logname.1 \
|
||||
ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 \
|
||||
paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
|
||||
ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nl.1 nohup.1 od.1 \
|
||||
paste.1 pathchk.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
|
||||
rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 \
|
||||
shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
|
||||
shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 \
|
||||
su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
|
||||
tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
|
||||
who.1 whoami.1 yes.1
|
||||
tty.1 unexpand.1 uniq.1 unlink.1 vdir.1 wc.1 \
|
||||
whoami.1 yes.1 $(MAN)
|
||||
optional_mans = \
|
||||
chroot.1 hostid.1 nice.1 pinky.1 stty.1 uname.1 uptime.1 users.1 who.1
|
||||
|
||||
man_aux = $(dist_man_MANS:.1=.x)
|
||||
|
||||
EXTRA_DIST = $(man_aux) help2man
|
||||
man_aux = $(dist_man_MANS:.1=.x) $(optional_mans:.1=.x)
|
||||
|
||||
EXTRA_DIST = $(man_aux) help2man $(optional_mans)
|
||||
MAINTAINERCLEANFILES = $(dist_man_MANS)
|
||||
|
||||
# Depend on configure.ac to get version number changes.
|
||||
|
||||
@@ -63,7 +63,7 @@ diff -u -p -u -r1.158 remove.c
|
||||
}
|
||||
|
||||
/* Remove entries in the directory open on DIRP
|
||||
@@ -1372,9 +1377,10 @@ remove_dir (int fd_cwd, Dirstack_state *
|
||||
@@ -1389,9 +1394,10 @@ remove_dir (int fd_cwd, Dirstack_state *
|
||||
/* The name of the directory that we have just processed,
|
||||
nominally removing all of its contents. */
|
||||
char *empty_dir;
|
||||
@@ -75,7 +75,7 @@ diff -u -p -u -r1.158 remove.c
|
||||
assert (dirp != NULL || AD_stack_height (ds) == 1);
|
||||
|
||||
/* Try to remove EMPTY_DIR only if remove_cwd_entries succeeded. */
|
||||
@@ -1386,8 +1392,9 @@ remove_dir (int fd_cwd, Dirstack_state *
|
||||
@@ -1403,8 +1409,9 @@ remove_dir (int fd_cwd, Dirstack_state *
|
||||
But that's no big deal since we're interactive. */
|
||||
struct stat empty_st;
|
||||
Ternary is_empty;
|
||||
@@ -86,7 +86,7 @@ diff -u -p -u -r1.158 remove.c
|
||||
PA_REMOVE_DIR, &is_empty);
|
||||
|
||||
if (s != RM_OK)
|
||||
@@ -1452,6 +1459,7 @@ rm_1 (Dirstack_state *ds, char const *fi
|
||||
@@ -1469,6 +1476,7 @@ rm_1 (Dirstack_state *ds, char const *fi
|
||||
return RM_ERROR;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ diff -u -p -u -r1.158 remove.c
|
||||
struct stat st;
|
||||
cache_stat_init (&st);
|
||||
if (x->root_dev_ino)
|
||||
@@ -1473,6 +1481,7 @@ rm_1 (Dirstack_state *ds, char const *fi
|
||||
@@ -1490,6 +1498,7 @@ rm_1 (Dirstack_state *ds, char const *fi
|
||||
AD_push_initial (ds);
|
||||
AD_INIT_OTHER_MEMBERS ();
|
||||
|
||||
@@ -102,7 +102,7 @@ diff -u -p -u -r1.158 remove.c
|
||||
int fd_cwd = AT_FDCWD;
|
||||
enum RM_status status = remove_entry (fd_cwd, ds, filename, &st, x, NULL);
|
||||
if (status == RM_NONEMPTY_DIR)
|
||||
@@ -1491,6 +1500,8 @@ rm_1 (Dirstack_state *ds, char const *fi
|
||||
@@ -1508,6 +1517,8 @@ rm_1 (Dirstack_state *ds, char const *fi
|
||||
ds_clear (ds);
|
||||
|
||||
return status;
|
||||
@@ -111,7 +111,7 @@ diff -u -p -u -r1.158 remove.c
|
||||
}
|
||||
|
||||
/* Remove all files and/or directories specified by N_FILES and FILE.
|
||||
@@ -1513,9 +1524,11 @@ rm (size_t n_files, char const *const *f
|
||||
@@ -1530,9 +1541,11 @@ rm (size_t n_files, char const *const *f
|
||||
}
|
||||
|
||||
cycle_check_init (&ds->cycle_check_state);
|
||||
@@ -130,7 +130,7 @@ retrieving revision 1.140
|
||||
diff -u -p -u -r1.140 rm.c
|
||||
--- src/rm.c 3 Sep 2006 02:53:58 -0000 1.140
|
||||
+++ src/rm.c 6 Sep 2006 18:57:46 -0000
|
||||
@@ -357,8 +357,10 @@ main (int argc, char **argv)
|
||||
@@ -369,8 +369,10 @@ main (int argc, char **argv)
|
||||
if (!yesno ())
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
char *program_name;
|
||||
|
||||
/* Name of input file. May be "-". */
|
||||
static char *infile;
|
||||
static char const *infile;
|
||||
|
||||
/* Descriptor on which input file is open. */
|
||||
static int input_desc;
|
||||
|
||||
@@ -149,13 +149,13 @@ static uintmax_t current_line = 0;
|
||||
static bool have_read_eof = false;
|
||||
|
||||
/* Name of output files. */
|
||||
static char * volatile filename_space = NULL;
|
||||
static char *volatile filename_space = NULL;
|
||||
|
||||
/* Prefix part of output file names. */
|
||||
static char * volatile prefix = NULL;
|
||||
static char const *volatile prefix = NULL;
|
||||
|
||||
/* Suffix part of output file names. */
|
||||
static char * volatile suffix = NULL;
|
||||
static char *volatile suffix = NULL;
|
||||
|
||||
/* Number of digits to use in output file names. */
|
||||
static int volatile digits = 2;
|
||||
@@ -526,6 +526,8 @@ load_buffer (void)
|
||||
|
||||
if (lines_found)
|
||||
save_buffer (b);
|
||||
else
|
||||
free (b);
|
||||
|
||||
return lines_found != 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* cut - remove parts of lines of files
|
||||
Copyright (C) 1997-2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1984 David M. Ihnat
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -702,7 +702,7 @@ cut_stream (FILE *stream)
|
||||
Return true if successful. */
|
||||
|
||||
static bool
|
||||
cut_file (char *file)
|
||||
cut_file (char const *file)
|
||||
{
|
||||
FILE *stream;
|
||||
|
||||
|
||||
9
src/dd.c
9
src/dd.c
@@ -1377,8 +1377,10 @@ static int
|
||||
dd_copy (void)
|
||||
{
|
||||
char *ibuf, *bufstart; /* Input buffer. */
|
||||
char *real_buf; /* real buffer address before alignment */
|
||||
char *real_obuf;
|
||||
/* These are declared static so that even though we don't free the
|
||||
buffers, valgrind will recognize that there is no "real" leak. */
|
||||
static char *real_buf; /* real buffer address before alignment */
|
||||
static char *real_obuf;
|
||||
ssize_t nread; /* Bytes read in the current block. */
|
||||
|
||||
/* If nonzero, then the previously read block was partial and
|
||||
@@ -1598,9 +1600,6 @@ dd_copy (void)
|
||||
}
|
||||
}
|
||||
|
||||
free (real_buf);
|
||||
free (real_obuf);
|
||||
|
||||
if ((conversions_mask & C_FDATASYNC) && fdatasync (STDOUT_FILENO) != 0)
|
||||
{
|
||||
if (errno != ENOSYS && errno != EINVAL)
|
||||
|
||||
@@ -246,7 +246,7 @@ dc_parse_stream (FILE *fp, const char *filename)
|
||||
char *input_line = NULL;
|
||||
size_t input_line_size = 0;
|
||||
char const *line;
|
||||
char *term;
|
||||
char const *term;
|
||||
bool ok = true;
|
||||
|
||||
/* State for the parser. */
|
||||
|
||||
@@ -236,7 +236,7 @@ int_value (intmax_t i)
|
||||
/* Return a VALUE for S. */
|
||||
|
||||
static VALUE *
|
||||
str_value (char *s)
|
||||
str_value (char const *s)
|
||||
{
|
||||
VALUE *v = xmalloc (sizeof *v);
|
||||
v->type = string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* fold -- wrap each input line to fit in specified width.
|
||||
Copyright (C) 91, 1995-2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 91, 1995-2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -122,7 +122,7 @@ adjust_column (size_t column, char c)
|
||||
Return true if successful. */
|
||||
|
||||
static bool
|
||||
fold_file (char *filename, size_t width)
|
||||
fold_file (char const *filename, size_t width)
|
||||
{
|
||||
FILE *istream;
|
||||
int c;
|
||||
|
||||
18
src/ln.c
18
src/ln.c
@@ -133,7 +133,7 @@ do_link (const char *source, const char *dest)
|
||||
struct stat source_stats;
|
||||
struct stat dest_stats;
|
||||
char *dest_backup = NULL;
|
||||
bool lstat_ok = false;
|
||||
bool dest_lstat_ok = false;
|
||||
bool source_is_dir = false;
|
||||
bool ok;
|
||||
|
||||
@@ -171,8 +171,8 @@ do_link (const char *source, const char *dest)
|
||||
|
||||
if (remove_existing_files || interactive || backup_type != no_backups)
|
||||
{
|
||||
lstat_ok = (lstat (dest, &dest_stats) == 0);
|
||||
if (!lstat_ok && errno != ENOENT)
|
||||
dest_lstat_ok = (lstat (dest, &dest_stats) == 0);
|
||||
if (!dest_lstat_ok && errno != ENOENT)
|
||||
{
|
||||
error (0, errno, _("accessing %s"), quote (dest));
|
||||
return false;
|
||||
@@ -184,8 +184,14 @@ do_link (const char *source, const char *dest)
|
||||
(with --backup, it just renames any existing destination file)
|
||||
But if the source and destination are the same, don't remove
|
||||
anything and fail right here. */
|
||||
if (remove_existing_files
|
||||
&& lstat_ok
|
||||
if ((remove_existing_files
|
||||
/* Ensure that "ln --backup f f" fails here, with the
|
||||
"... same file" diagnostic, below. Otherwise, subsequent
|
||||
code would give a misleading "file not found" diagnostic.
|
||||
This case is different than the others handled here, since
|
||||
the command in question doesn't use --force. */
|
||||
|| (!symbolic_link && backup_type != no_backups))
|
||||
&& dest_lstat_ok
|
||||
/* Allow `ln -sf --backup k k' to succeed in creating the
|
||||
self-referential symlink, but don't allow the hard-linking
|
||||
equivalent: `ln -f k k' (with or without --backup) to get
|
||||
@@ -205,7 +211,7 @@ do_link (const char *source, const char *dest)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lstat_ok)
|
||||
if (dest_lstat_ok)
|
||||
{
|
||||
if (S_ISDIR (dest_stats.st_mode))
|
||||
{
|
||||
|
||||
6
src/ls.c
6
src/ls.c
@@ -863,11 +863,11 @@ static size_t dired_pos;
|
||||
|
||||
/* Write S to STREAM and increment DIRED_POS by S_LEN. */
|
||||
#define DIRED_FPUTS(s, stream, s_len) \
|
||||
do {fputs ((s), (stream)); dired_pos += s_len;} while (0)
|
||||
do {fputs (s, stream); dired_pos += s_len;} while (0)
|
||||
|
||||
/* Like DIRED_FPUTS, but for use when S is a literal string. */
|
||||
#define DIRED_FPUTS_LITERAL(s, stream) \
|
||||
do {fputs ((s), (stream)); dired_pos += sizeof((s)) - 1;} while (0)
|
||||
do {fputs (s, stream); dired_pos += sizeof (s) - 1;} while (0)
|
||||
|
||||
#define DIRED_INDENT() \
|
||||
do \
|
||||
@@ -892,7 +892,7 @@ static struct obstack subdired_obstack;
|
||||
do \
|
||||
{ \
|
||||
if (dired) \
|
||||
obstack_grow ((obs), &dired_pos, sizeof (dired_pos)); \
|
||||
obstack_grow (obs, &dired_pos, sizeof (dired_pos)); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
|
||||
1
src/mv.c
1
src/mv.c
@@ -94,6 +94,7 @@ rm_option_init (struct rm_options *x)
|
||||
x->ignore_missing_files = false;
|
||||
x->root_dev_ino = NULL;
|
||||
x->recursive = true;
|
||||
x->one_file_system = false;
|
||||
|
||||
/* Should we prompt for removal, too? No. Prompting for the `move'
|
||||
part is enough. It implies removal. */
|
||||
|
||||
17
src/nl.c
17
src/nl.c
@@ -64,16 +64,16 @@ enum section
|
||||
char *program_name;
|
||||
|
||||
/* Format of body lines (-b). */
|
||||
static char *body_type = "t";
|
||||
static char const *body_type = "t";
|
||||
|
||||
/* Format of header lines (-h). */
|
||||
static char *header_type = "n";
|
||||
static char const *header_type = "n";
|
||||
|
||||
/* Format of footer lines (-f). */
|
||||
static char *footer_type = "n";
|
||||
static char const *footer_type = "n";
|
||||
|
||||
/* Format currently being used (body, header, or footer). */
|
||||
static char *current_type;
|
||||
static char const *current_type;
|
||||
|
||||
/* Regex for body lines to number (-bp). */
|
||||
static struct re_pattern_buffer body_regex;
|
||||
@@ -93,7 +93,7 @@ static char footer_fastmap[UCHAR_MAX + 1];
|
||||
static struct re_pattern_buffer *current_regex = NULL;
|
||||
|
||||
/* Separator string to print after line number (-s). */
|
||||
static char *separator_str = "\t";
|
||||
static char const *separator_str = "\t";
|
||||
|
||||
/* Input section delimiter string (-d). */
|
||||
static char const *section_del = DEFAULT_SECTION_DELIMITERS;
|
||||
@@ -235,9 +235,10 @@ FORMAT is one of:\n\
|
||||
according to `optarg'. */
|
||||
|
||||
static bool
|
||||
build_type_arg (char **typep, struct re_pattern_buffer *regexp, char *fastmap)
|
||||
build_type_arg (char const **typep,
|
||||
struct re_pattern_buffer *regexp, char *fastmap)
|
||||
{
|
||||
const char *errmsg;
|
||||
char const *errmsg;
|
||||
bool rval = true;
|
||||
|
||||
switch (*optarg)
|
||||
@@ -414,7 +415,7 @@ process_file (FILE *fp)
|
||||
Return true if successful. */
|
||||
|
||||
static bool
|
||||
nl_file (const char *file)
|
||||
nl_file (char const *file)
|
||||
{
|
||||
FILE *stream;
|
||||
|
||||
|
||||
2
src/od.c
2
src/od.c
@@ -1175,7 +1175,7 @@ write_block (uintmax_t current_offset, size_t n_bytes,
|
||||
static bool first = true;
|
||||
static bool prev_pair_equal = false;
|
||||
|
||||
#define EQUAL_BLOCKS(b1, b2) (memcmp ((b1), (b2), bytes_per_block) == 0)
|
||||
#define EQUAL_BLOCKS(b1, b2) (memcmp (b1, b2, bytes_per_block) == 0)
|
||||
|
||||
if (abbreviate_duplicate_blocks
|
||||
&& !first && n_bytes == bytes_per_block
|
||||
|
||||
@@ -463,9 +463,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
case 'd':
|
||||
/* Delimiter character(s). */
|
||||
if (optarg[0] == '\0')
|
||||
optarg = "\\0";
|
||||
delim_arg = optarg;
|
||||
delim_arg = (optarg[0] == '\0' ? "\\0" : optarg);
|
||||
break;
|
||||
|
||||
case 's':
|
||||
|
||||
4
src/pr.c
4
src/pr.c
@@ -430,7 +430,7 @@ static void getoptarg (char *arg, char switch_char, char *character,
|
||||
void usage (int status);
|
||||
static void print_files (int number_of_files, char **av);
|
||||
static void init_parameters (int number_of_files);
|
||||
static void init_header (char *filename, int desc);
|
||||
static void init_header (char const *filename, int desc);
|
||||
static bool init_fps (int number_of_files, char **av);
|
||||
static void init_funcs (void);
|
||||
static void init_store_cols (void);
|
||||
@@ -1653,7 +1653,7 @@ print_files (int number_of_files, char **av)
|
||||
FILENAME for reading. */
|
||||
|
||||
static void
|
||||
init_header (char *filename, int desc)
|
||||
init_header (char const *filename, int desc)
|
||||
{
|
||||
char *buf = NULL;
|
||||
struct stat st;
|
||||
|
||||
@@ -76,7 +76,7 @@ static bool posixly_correct;
|
||||
|
||||
/* This message appears in N_() here rather than just in _() below because
|
||||
the sole use would have been in a #define. */
|
||||
static char *const cfcc_msg =
|
||||
static char const *const cfcc_msg =
|
||||
N_("warning: %s: character(s) following character constant have been ignored");
|
||||
|
||||
/* The name this program was run with. */
|
||||
|
||||
25
src/remove.c
25
src/remove.c
@@ -1298,6 +1298,7 @@ remove_dir (int fd_cwd, Dirstack_state *ds, char const *dir,
|
||||
struct rm_options const *x, int *cwd_errno)
|
||||
{
|
||||
enum RM_status status;
|
||||
dev_t current_dev = dir_st->st_dev;
|
||||
|
||||
/* There is a race condition in that an attacker could replace the nonempty
|
||||
directory, DIR, with a symlink between the preceding call to rmdir
|
||||
@@ -1359,15 +1360,31 @@ remove_dir (int fd_cwd, Dirstack_state *ds, char const *dir,
|
||||
}
|
||||
if (subdir)
|
||||
{
|
||||
AD_push (dirfd (dirp), ds, subdir, &subdir_sb);
|
||||
AD_INIT_OTHER_MEMBERS ();
|
||||
if ( ! x->one_file_system
|
||||
|| subdir_sb.st_dev == current_dev)
|
||||
{
|
||||
AD_push (dirfd (dirp), ds, subdir, &subdir_sb);
|
||||
AD_INIT_OTHER_MEMBERS ();
|
||||
free (subdir);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Here, --one-file-system is in effect, and with remove_cwd_entries'
|
||||
traversal into the current directory, (known as SUBDIR, from ..),
|
||||
DIRP's device number is different from CURRENT_DEV. Arrange not
|
||||
to do anything more with this hierarchy. */
|
||||
error (0, errno, _("skipping %s, since it's on a different device"),
|
||||
quote (full_filename (subdir)));
|
||||
free (subdir);
|
||||
continue;
|
||||
AD_mark_current_as_unremovable (ds);
|
||||
tmp_status = RM_ERROR;
|
||||
UPDATE_STATUS (status, tmp_status);
|
||||
}
|
||||
|
||||
/* Execution reaches this point when we've removed the last
|
||||
removable entry from the current directory. */
|
||||
removable entry from the current directory -- or, with
|
||||
--one-file-system, when the current directory is on a
|
||||
different file system. */
|
||||
{
|
||||
/* The name of the directory that we have just processed,
|
||||
nominally removing all of its contents. */
|
||||
|
||||
@@ -30,6 +30,14 @@ struct rm_options
|
||||
/* If true, query the user about whether to remove each file. */
|
||||
bool interactive;
|
||||
|
||||
/* If true, do not traverse into (or remove) any directory that is
|
||||
on a file system (i.e., that has a different device number) other
|
||||
than that of the corresponding command line argument. Note that
|
||||
even without this option, rm will fail in the end, due to its
|
||||
probable inability to remove the mount point. But there, the
|
||||
diagnostic comes too late -- after removing all contents. */
|
||||
bool one_file_system;
|
||||
|
||||
/* If true, recursively remove directories. */
|
||||
bool recursive;
|
||||
|
||||
|
||||
12
src/rm.c
12
src/rm.c
@@ -72,6 +72,7 @@ char *program_name;
|
||||
enum
|
||||
{
|
||||
INTERACTIVE_OPTION = CHAR_MAX + 1,
|
||||
ONE_FILE_SYSTEM,
|
||||
NO_PRESERVE_ROOT,
|
||||
PRESERVE_ROOT,
|
||||
PRESUME_INPUT_TTY_OPTION
|
||||
@@ -90,6 +91,7 @@ static struct option const long_opts[] =
|
||||
{"force", no_argument, NULL, 'f'},
|
||||
{"interactive", optional_argument, NULL, INTERACTIVE_OPTION},
|
||||
|
||||
{"one-file-system", no_argument, NULL, ONE_FILE_SYSTEM},
|
||||
{"no-preserve-root", no_argument, NULL, NO_PRESERVE_ROOT},
|
||||
{"preserve-root", no_argument, NULL, PRESERVE_ROOT},
|
||||
|
||||
@@ -168,6 +170,11 @@ Remove (unlink) the FILE(s).\n\
|
||||
while still giving protection against most mistakes\n\
|
||||
--interactive[=WHEN] prompt according to WHEN: never, once (-I), or\n\
|
||||
always (-i). Without WHEN, prompt always\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
--one-file-system when removing a hierarchy recursively, skip any\n\
|
||||
directory that is on a file system different from\n\
|
||||
that of the corresponding command line argument\n\
|
||||
"), stdout);
|
||||
fputs (_("\
|
||||
--no-preserve-root do not treat `/' specially\n\
|
||||
@@ -207,6 +214,7 @@ rm_option_init (struct rm_options *x)
|
||||
{
|
||||
x->ignore_missing_files = false;
|
||||
x->interactive = false;
|
||||
x->one_file_system = false;
|
||||
x->recursive = false;
|
||||
x->root_dev_ino = NULL;
|
||||
x->stdin_tty = isatty (STDIN_FILENO);
|
||||
@@ -299,6 +307,10 @@ main (int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
|
||||
case ONE_FILE_SYSTEM:
|
||||
x.one_file_system = true;
|
||||
break;
|
||||
|
||||
case NO_PRESERVE_ROOT:
|
||||
preserve_root = false;
|
||||
break;
|
||||
|
||||
18
src/sort.c
18
src/sort.c
@@ -2099,12 +2099,13 @@ sort (char * const *files, size_t nfiles, char const *output_file)
|
||||
}
|
||||
}
|
||||
|
||||
/* Insert key KEY at the end of the key list. */
|
||||
/* Insert a malloc'd copy of key KEY_ARG at the end of the key list. */
|
||||
|
||||
static void
|
||||
insertkey (struct keyfield *key)
|
||||
insertkey (struct keyfield *key_arg)
|
||||
{
|
||||
struct keyfield **p;
|
||||
struct keyfield *key = xmemdup (key_arg, sizeof *key);
|
||||
|
||||
for (p = &keylist; *p; p = &(*p)->next)
|
||||
continue;
|
||||
@@ -2271,9 +2272,9 @@ set_ordering (const char *s, struct keyfield *key, enum blanktype blanktype)
|
||||
}
|
||||
|
||||
static struct keyfield *
|
||||
new_key (void)
|
||||
key_init (struct keyfield *key)
|
||||
{
|
||||
struct keyfield *key = xzalloc (sizeof *key);
|
||||
memset (key, 0, sizeof *key);
|
||||
key->eword = SIZE_MAX;
|
||||
return key;
|
||||
}
|
||||
@@ -2282,6 +2283,7 @@ int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
struct keyfield *key;
|
||||
struct keyfield key_buf;
|
||||
struct keyfield gkey;
|
||||
char const *s;
|
||||
int c = 0;
|
||||
@@ -2292,7 +2294,7 @@ main (int argc, char **argv)
|
||||
size_t nfiles = 0;
|
||||
bool posixly_correct = (getenv ("POSIXLY_CORRECT") != NULL);
|
||||
bool obsolete_usage = (posix2_version () < 200112);
|
||||
char *minus = "-", **files;
|
||||
char **files;
|
||||
char const *outfile = NULL;
|
||||
|
||||
initialize_main (&argc, &argv);
|
||||
@@ -2408,7 +2410,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
/* Treat +POS1 [-POS2] as a key if possible; but silently
|
||||
treat an operand as a file if it is not a valid +POS1. */
|
||||
key = new_key ();
|
||||
key = key_init (&key_buf);
|
||||
s = parse_field_count (optarg + 1, &key->sword, NULL);
|
||||
if (s && *s == '.')
|
||||
s = parse_field_count (s + 1, &key->schar, NULL);
|
||||
@@ -2463,7 +2465,7 @@ main (int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
key = new_key ();
|
||||
key = key_init (&key_buf);
|
||||
|
||||
/* Get POS1. */
|
||||
s = parse_field_count (optarg, &key->sword,
|
||||
@@ -2657,7 +2659,9 @@ main (int argc, char **argv)
|
||||
|
||||
if (nfiles == 0)
|
||||
{
|
||||
static char *minus = "-";
|
||||
nfiles = 1;
|
||||
free (files);
|
||||
files = −
|
||||
}
|
||||
|
||||
|
||||
21
src/system.h
21
src/system.h
@@ -293,7 +293,7 @@ select_plural (uintmax_t n)
|
||||
return (n <= ULONG_MAX ? n : n % PLURAL_REDUCER + PLURAL_REDUCER);
|
||||
}
|
||||
|
||||
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
|
||||
#define STREQ(a, b) (strcmp (a, b) == 0)
|
||||
|
||||
#if !HAVE_DECL_FREE
|
||||
void free ();
|
||||
@@ -506,7 +506,7 @@ enum
|
||||
const char *s_ = (S); \
|
||||
size_t len_ = strlen (s_) + 1; \
|
||||
char *tmp_dest_ = alloca (len_); \
|
||||
DEST = memcpy (tmp_dest_, (s_), len_); \
|
||||
DEST = memcpy (tmp_dest_, s_, len_); \
|
||||
} \
|
||||
while (0)
|
||||
#endif
|
||||
@@ -515,10 +515,19 @@ enum
|
||||
# define EOVERFLOW EINVAL
|
||||
#endif
|
||||
|
||||
#if ! HAVE_FSEEKO && ! defined fseeko
|
||||
# define fseeko(s, o, w) ((o) == (long int) (o) \
|
||||
? fseek (s, o, w) \
|
||||
: (errno = EOVERFLOW, -1))
|
||||
#if ! HAVE_FSEEKO
|
||||
# if ! defined fseeko
|
||||
# define fseeko(s, o, w) ((o) == (long int) (o) \
|
||||
? fseek (s, o, w) \
|
||||
: (errno = EOVERFLOW, -1))
|
||||
# endif
|
||||
# if ! defined ftello
|
||||
static inline off_t ftello (FILE *stream)
|
||||
{
|
||||
verify (sizeof (long int) <= sizeof (off_t));
|
||||
return ftell (stream);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ! HAVE_SYNC
|
||||
|
||||
@@ -78,7 +78,7 @@ tac -r -s '.\|
|
||||
char *program_name;
|
||||
|
||||
/* The string that separates the records of the file. */
|
||||
static char *separator;
|
||||
static char const *separator;
|
||||
|
||||
/* True if we have ever read standard input. */
|
||||
static bool have_read_stdin = false;
|
||||
@@ -211,7 +211,7 @@ tac_seekable (int input_fd, const char *file)
|
||||
Only used when the separator is attached to the preceding record. */
|
||||
bool first_time = true;
|
||||
char first_char = *separator; /* Speed optimization, non-regexp. */
|
||||
char *separator1 = separator + 1; /* Speed optimization, non-regexp. */
|
||||
char const *separator1 = separator + 1; /* Speed optimization, non-regexp. */
|
||||
size_t match_length1 = match_length - 1; /* Speed optimization, non-regexp. */
|
||||
struct re_registers regs;
|
||||
|
||||
@@ -426,7 +426,7 @@ static bool
|
||||
copy_to_temp (FILE **g_tmp, char **g_tempfile, int input_fd, char const *file)
|
||||
{
|
||||
static char *template = NULL;
|
||||
static char *tempdir;
|
||||
static char const *tempdir;
|
||||
char *tempfile;
|
||||
FILE *tmp;
|
||||
int fd;
|
||||
|
||||
@@ -292,7 +292,7 @@ valid_file_spec (struct File_spec const *f)
|
||||
return ((f->fd == -1) ^ (f->errnum == 0));
|
||||
}
|
||||
|
||||
static char *
|
||||
static char const *
|
||||
pretty_name (struct File_spec const *f)
|
||||
{
|
||||
return (STREQ (f->name, "-") ? "standard input" : f->name);
|
||||
|
||||
2
src/tr.c
2
src/tr.c
@@ -601,7 +601,7 @@ make_printable_str (char const *s, size_t len)
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
char buf[5];
|
||||
char *tmp = NULL;
|
||||
char const *tmp = NULL;
|
||||
unsigned char c = s[i];
|
||||
|
||||
switch (c)
|
||||
|
||||
@@ -15,13 +15,13 @@ TESTS_ENVIRONMENT = \
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(TESTS) Coreutils.pm Makefile.am.in README acl envvar-check \
|
||||
expensive group-names input-tty lang-default mk-script priv-check \
|
||||
expensive group-names input-tty lang-default mk-script \
|
||||
other-fs-tmpdir priv-check \
|
||||
rwx-to-mode sample-test setgid-check sparse-file \
|
||||
umask-check very-expensive
|
||||
|
||||
## N O T E :: Please do not add new tests/ directories.
|
||||
## Some people feel that there are too many already.
|
||||
## Put new tests in misc/.
|
||||
## There are too many already. Put new tests in misc/.
|
||||
SUBDIRS = \
|
||||
chgrp chmod chown cp cut dd dircolors du expr factor fmt head \
|
||||
install join ln ls ls-2 md5sum misc mkdir mv od pr readlink rm rmdir \
|
||||
@@ -29,13 +29,22 @@ SUBDIRS = \
|
||||
tsort unexpand uniq wc
|
||||
## N O T E :: Please do not add new directories.
|
||||
|
||||
.PHONY: check-root
|
||||
check-root:
|
||||
all_t = t1 t2 t3 t4 t5 t6
|
||||
.PHONY: check-root $(all_t)
|
||||
check-root: $(all_t)
|
||||
|
||||
t1:
|
||||
cd chown && $(MAKE) check TESTS=basic
|
||||
t2:
|
||||
cd cp && $(MAKE) check TESTS=special-bits
|
||||
t3:
|
||||
cd rm && $(MAKE) check TESTS=no-give-up
|
||||
t4:
|
||||
cd rm && $(MAKE) check TESTS=fail-2eperm
|
||||
t5:
|
||||
cd tail-2 && $(MAKE) check TESTS=append-only
|
||||
t6:
|
||||
cd rm && $(MAKE) check TESTS=one-file-system
|
||||
|
||||
check-recursive: root-hint
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ EOF
|
||||
# With native fdopendir, du uses a different code path.
|
||||
cat <<\EOF > exp-native-fdopendir
|
||||
chgrp: cannot access `d/no-x/y': Permission denied
|
||||
chgrp: fts_read failed: Permission denied
|
||||
EOF
|
||||
|
||||
if cmp out exp >/dev/null 2>&1; then
|
||||
|
||||
@@ -50,7 +50,7 @@ if test $framework_failure = 1; then
|
||||
(exit 1); exit 1
|
||||
fi
|
||||
|
||||
. "$abs_srcdir"/../setgid-check
|
||||
. "$abs_srcdir/../setgid-check"
|
||||
|
||||
fail=0
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ EOF
|
||||
# With native fdopendir, du uses a different code path.
|
||||
cat <<\EOF > exp-native-fdopendir
|
||||
chmod: cannot access `d/no-x/y': Permission denied
|
||||
chmod: fts_read failed: Permission denied
|
||||
EOF
|
||||
|
||||
if cmp out exp >/dev/null 2>&1; then
|
||||
|
||||
@@ -44,7 +44,7 @@ cd "$pwd" || framework_failure=1
|
||||
mkdir -p $tmp || framework_failure=1
|
||||
cd $tmp || framework_failure=1
|
||||
|
||||
. "$abs_srcdir"/../setgid-check
|
||||
. "$abs_srcdir/../setgid-check"
|
||||
|
||||
mkdir foo bar || framework_failure=1
|
||||
mkdir -p a/b/c d e || framework_failure=1
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.4 gnits
|
||||
|
||||
TESTS = \
|
||||
inacc-dest \
|
||||
long-from-unreadable \
|
||||
long-sloop \
|
||||
2g \
|
||||
|
||||
82
tests/du/inacc-dest
Executable file
82
tests/du/inacc-dest
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/bin/sh
|
||||
# Prior to coreutils-6.5, an inaccessible destination dir (chmod a-x)
|
||||
# would cause du to exit prematurely on systems with native openat support.
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
du --version
|
||||
fi
|
||||
|
||||
. $srcdir/../envvar-check
|
||||
. $srcdir/../lang-default
|
||||
|
||||
pwd=`pwd`
|
||||
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
|
||||
trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
|
||||
trap '(exit $?); exit $?' 1 2 13 15
|
||||
|
||||
framework_failure=0
|
||||
mkdir -p $tmp || framework_failure=1
|
||||
cd $tmp || framework_failure=1
|
||||
|
||||
mkdir f && cd f && mkdir a b c d e && touch c/j && chmod a-x c \
|
||||
|| framework_failure=1
|
||||
|
||||
if test $framework_failure = 1; then
|
||||
echo "$0: failure in testing framework" 1>&2
|
||||
(exit 1); exit 1
|
||||
fi
|
||||
|
||||
fail=0
|
||||
|
||||
du > ../t 2>&1 && fail=1
|
||||
|
||||
# Accept either of the following outputs.
|
||||
# You get the first from a system with openat _emulation_ (via /proc),
|
||||
# the second from a system with native openat support.
|
||||
# FIXME: there may well be a third output, for systems with neither
|
||||
# /proc support, nor native openat support.
|
||||
|
||||
sed 's/^[0-9][0-9]* //' ../t | sort -u > out
|
||||
cat <<\EOF > exp || fail=1
|
||||
.
|
||||
./a
|
||||
./b
|
||||
./d
|
||||
./e
|
||||
du: `./c': Permission denied
|
||||
EOF
|
||||
|
||||
cat <<\EOF > exp2 || fail=1
|
||||
.
|
||||
./a
|
||||
./b
|
||||
./c
|
||||
./d
|
||||
./e
|
||||
du: cannot access `./c/j': Permission denied
|
||||
EOF
|
||||
|
||||
cmp out exp > /dev/null 2>&1 || {
|
||||
cmp out exp2 || fail=1
|
||||
}
|
||||
test $fail = 1 && diff out exp 2> /dev/null
|
||||
|
||||
(exit $fail); exit $fail
|
||||
@@ -48,6 +48,6 @@ fi
|
||||
|
||||
fail=0
|
||||
|
||||
du "$pwd"/$tmp/a > /dev/null || fail=1
|
||||
du "$pwd/$tmp/a" > /dev/null || fail=1
|
||||
|
||||
(exit $fail); exit $fail
|
||||
|
||||
@@ -84,6 +84,6 @@ if test $framework_failure = 1; then
|
||||
fi
|
||||
|
||||
fail=0
|
||||
du -s "$pwd"/$tmp/$dir > /dev/null || fail=1
|
||||
du -s "$pwd/$tmp/$dir" > /dev/null || fail=1
|
||||
|
||||
(exit $fail); exit $fail
|
||||
|
||||
@@ -55,7 +55,6 @@ EOF
|
||||
# With native fdopendir, du uses a different code path.
|
||||
cat <<\EOF > exp-native-fdopendir
|
||||
du: cannot access `d/no-x/y': Permission denied
|
||||
du: fts_read failed: Permission denied
|
||||
EOF
|
||||
|
||||
if cmp out exp >/dev/null 2>&1; then
|
||||
|
||||
@@ -117,7 +117,7 @@ test -d newdir3 || fail=1
|
||||
# hence cannot do anything meaningful with the following relative-named dirs.
|
||||
abs=$pwd/$tmp
|
||||
mkdir sub || fail=1
|
||||
(cd sub && chmod 0 . && ginstall -d "$abs"/xx/yy rel/sub1 rel/sub2 2> /dev/null) && fail=1
|
||||
(cd sub && chmod 0 . && ginstall -d "$abs/xx/yy" rel/sub1 rel/sub2 2> /dev/null) && fail=1
|
||||
chmod 755 sub
|
||||
|
||||
# Ensure that the first argument-dir has been created.
|
||||
@@ -132,7 +132,7 @@ test -d xx/rel && fail=1
|
||||
# inaccessible parent. coreutils 5.97 fails this test.
|
||||
mkdir -p sub1/d || fail=1
|
||||
(cd sub1/d && chmod a-rx .. && chmod a-r . &&
|
||||
ginstall -d "$abs"/xx/zz rel/a rel/b 2> /dev/null) || fail=1
|
||||
ginstall -d "$abs/xx/zz" rel/a rel/b 2> /dev/null) || fail=1
|
||||
chmod 755 sub1 sub1/d || fail=1
|
||||
test -d xx/zz || fail=1
|
||||
test -d sub1/d/rel/a || fail=1
|
||||
|
||||
@@ -43,10 +43,10 @@ fail=0
|
||||
# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh.
|
||||
(
|
||||
# ash doesn't support "trap '' CHLD"; it knows only signal numbers.
|
||||
sig=`"$pwd"/../../src/kill -l CHLD 2>/dev/null` && trap '' $sig
|
||||
sig=`"$pwd/../../src/kill" -l CHLD 2>/dev/null` && trap '' $sig
|
||||
|
||||
# Before 2004-04-21, install would infloop, in the `while (wait...' loop:
|
||||
exec ginstall -s "$pwd"/../../src/ginstall$EXEEXT .
|
||||
exec ginstall -s "$pwd/../../src/ginstall$EXEEXT" .
|
||||
)
|
||||
|
||||
(exit $fail); exit $fail
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
|
||||
AUTOMAKE_OPTIONS = 1.2 gnits
|
||||
|
||||
TESTS = target-1 sf-1 misc backup-1
|
||||
TESTS = hard-backup target-1 sf-1 misc backup-1
|
||||
EXTRA_DIST = $(TESTS)
|
||||
TESTS_ENVIRONMENT = \
|
||||
PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
|
||||
|
||||
54
tests/ln/hard-backup
Executable file
54
tests/ln/hard-backup
Executable file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
# Ensure that 'ln --backup F F' gives a proper diagnostic.
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
ln --version
|
||||
fi
|
||||
|
||||
. $srcdir/../envvar-check
|
||||
. $srcdir/../lang-default
|
||||
|
||||
pwd=`pwd`
|
||||
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
|
||||
trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
|
||||
trap '(exit $?); exit $?' 1 2 13 15
|
||||
|
||||
framework_failure=0
|
||||
mkdir -p $tmp || framework_failure=1
|
||||
cd $tmp || framework_failure=1
|
||||
touch f || framework_failure=1
|
||||
|
||||
if test $framework_failure = 1; then
|
||||
echo "$0: failure in testing framework" 1>&2
|
||||
(exit 1); exit 1
|
||||
fi
|
||||
|
||||
fail=0
|
||||
|
||||
ln --backup f f 2> out && fail=1
|
||||
cat <<\EOF > exp || fail=1
|
||||
ln: `f' and `f' are the same file
|
||||
EOF
|
||||
|
||||
cmp out exp || fail=1
|
||||
test $fail = 1 && diff out exp 2> /dev/null
|
||||
|
||||
(exit $fail); exit $fail
|
||||
@@ -56,21 +56,21 @@ mv d e >&- || fail=1
|
||||
rmdir e >&- || fail=1
|
||||
touch e >&- || fail=1
|
||||
sleep 0 >&- || fail=1
|
||||
"$pwd"/../../src/true >&- || fail=1
|
||||
"$pwd"/../../src/printf '' >&- || fail=1
|
||||
"$pwd/../../src/true" >&- || fail=1
|
||||
"$pwd/../../src/printf" '' >&- || fail=1
|
||||
|
||||
# If >&- works, ensure these fail, because stdout is closed and they
|
||||
# *do* generate output. >&- apparently does not work in HP-UX 11.23.
|
||||
# This test is ineffective unless /dev/stdout also works.
|
||||
if "$pwd"/../../src/test -w /dev/stdout >/dev/null &&
|
||||
"$pwd"/../../src/test ! -w /dev/stdout >&-; then
|
||||
"$pwd"/../../src/printf 'foo' >&- 2>/dev/null && fail=1
|
||||
if "$pwd/../../src/test" -w /dev/stdout >/dev/null &&
|
||||
"$pwd/../../src/test" ! -w /dev/stdout >&-; then
|
||||
"$pwd/../../src/printf" 'foo' >&- 2>/dev/null && fail=1
|
||||
cp --verbose a b >&- 2>/dev/null && fail=1
|
||||
fi
|
||||
|
||||
# Likewise for /dev/full, if /dev/full works.
|
||||
if test -w /dev/full && test -c /dev/full; then
|
||||
"$pwd"/../../src/printf 'foo' >/dev/full 2>/dev/null && fail=1
|
||||
"$pwd/../../src/printf" 'foo' >/dev/full 2>/dev/null && fail=1
|
||||
cp --verbose a b >/dev/full 2>/dev/null && fail=1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Check "printf" with long arguments.
|
||||
# Ensure that pwd works even when run from a very deep directory.
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
@@ -46,7 +46,7 @@ export ARGV_0
|
||||
CWD=$pwd/$tmp
|
||||
export CWD
|
||||
|
||||
$PERL -w -- - <<\EOF
|
||||
$PERL -Tw -- - <<\EOF
|
||||
|
||||
# Show that pwd works even when the length of the resulting
|
||||
# directory name is longer than PATH_MAX.
|
||||
@@ -55,6 +55,10 @@ use Cwd;
|
||||
|
||||
(my $ME = $ENV{ARGV_0}) =~ s|.*/||;
|
||||
|
||||
# Set up a safe, well-known environment
|
||||
delete @ENV{qw(BASH_ENV CDPATH ENV PATH)};
|
||||
$ENV{IFS} = '';
|
||||
|
||||
my $cwd = $ENV{CWD};
|
||||
my $z = 'z' x 31;
|
||||
my $n = 256;
|
||||
@@ -72,10 +76,19 @@ until (++$i == $n);
|
||||
my $build_src_dir = $ENV{BUILD_SRC_DIR};
|
||||
$build_src_dir
|
||||
or die "$ME: envvar BUILD_SRC_DIR not defined\n";
|
||||
if ($build_src_dir !~ m!^([-.:/\w]+)$!)
|
||||
{
|
||||
warn "$0: skipping this test; odd build source directory name:\n"
|
||||
. "$build_src_dir\n";
|
||||
exit 77;
|
||||
}
|
||||
$build_src_dir = $1;
|
||||
|
||||
my $pwd_binary = "$build_src_dir/pwd";
|
||||
|
||||
-x $pwd_binary
|
||||
or die "$ME: $pwd_binary is not an executable file\n";
|
||||
chomp (my $actual = `"$pwd_binary"`);
|
||||
chomp (my $actual = `$pwd_binary`);
|
||||
if ($expected ne $actual)
|
||||
{
|
||||
my $e_len = length $expected;
|
||||
|
||||
@@ -32,7 +32,7 @@ tmp=`echo "$0"|sed 's,.*/,,'`.tmp
|
||||
trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
mkdir --parents "$pwd"/$tmp/a/b/c || fail=1
|
||||
mkdir --parents "$pwd/$tmp/a/b/c" || fail=1
|
||||
|
||||
test -d $tmp || fail=1
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ tmp=`echo "$0"|sed 's,.*/,,'`.tmp
|
||||
trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
mkdir --parents "$pwd"/$tmp || fail=1
|
||||
mkdir --parents "$pwd/$tmp" || fail=1
|
||||
|
||||
test -d $tmp || fail=1
|
||||
|
||||
|
||||
@@ -45,20 +45,20 @@ if test $framework_failure = 1; then
|
||||
fi
|
||||
|
||||
p=$pwd/$tmp
|
||||
(cd no-access && chmod 0 . && mkdir -p "$p"/a/b u/v) 2> /dev/null && fail=1
|
||||
test -d "$p"/a/b || fail=1
|
||||
(cd no-access && chmod 0 . && mkdir -p "$p/a/b" u/v) 2> /dev/null && fail=1
|
||||
test -d "$p/a/b" || fail=1
|
||||
|
||||
# Same as above, but with a following *absolute* name, it should succeed
|
||||
(cd no-acce2s && chmod 0 . && mkdir -p "$p"/b/b "$p"/z) || fail=1
|
||||
test -d "$p"/b/b && test -d "$p"/z || fail=1
|
||||
(cd no-acce2s && chmod 0 . && mkdir -p "$p/b/b" "$p/z") || fail=1
|
||||
test -d "$p/b/b" && test -d "$p/z" || fail=1
|
||||
|
||||
# Same as above, but a trailing relative name in an unreadable directory
|
||||
# whose parent is inaccessible. coreutils 5.97 fails this test.
|
||||
(cd no-acce3s/d && chmod a-rx .. && chmod a-r . && mkdir -p a/b "$p"/b/c d/e &&
|
||||
(cd no-acce3s/d && chmod a-rx .. && chmod a-r . && mkdir -p a/b "$p/b/c" d/e &&
|
||||
test -d a/b && test -d d/e) || fail=1
|
||||
test -d "$p"/b/c || fail=1
|
||||
test -d "$p/b/c" || fail=1
|
||||
|
||||
b=`ls "$p"/a|tr -d '\n'`
|
||||
b=`ls "$p/a" | tr -d '\n'`
|
||||
# With coreutils-5.3.0, this would fail with $b=bu.
|
||||
test "x$b" = xb || fail=1
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ if test $framework_failure = 1; then
|
||||
(exit 1); exit 1
|
||||
fi
|
||||
|
||||
. "$abs_srcdir"/../setgid-check
|
||||
. "$abs_srcdir/../setgid-check"
|
||||
|
||||
fail=0
|
||||
|
||||
@@ -56,12 +56,12 @@ mkdir e-dir > /dev/null 2>&1 && fail=1
|
||||
# Create an existing directory.
|
||||
umask 077
|
||||
mode_str=drwxr-x-wx
|
||||
mode_arg=`"$abs_srcdir"/../rwx-to-mode $mode_str`
|
||||
mode_arg=`"$abs_srcdir/../rwx-to-mode" $mode_str`
|
||||
mkdir -m $mode_arg a || fail=1
|
||||
|
||||
# this `mkdir -p ...' shouldn't change perms of existing dir `a'.
|
||||
d_mode_str=drwx-w--wx
|
||||
d_mode_arg=`"$abs_srcdir"/../rwx-to-mode $d_mode_str`
|
||||
d_mode_arg=`"$abs_srcdir/../rwx-to-mode" $d_mode_str`
|
||||
mkdir -p -m $d_mode_arg a/b/c/d
|
||||
|
||||
# Make sure the permissions of `a' haven't been changed.
|
||||
|
||||
@@ -45,8 +45,8 @@ if test $framework_failure = 1; then
|
||||
(exit 1); exit 1
|
||||
fi
|
||||
|
||||
. "$abs_srcdir"/../setgid-check
|
||||
. "$abs_srcdir"/../umask-check
|
||||
. "$abs_srcdir/../setgid-check"
|
||||
. "$abs_srcdir/../umask-check"
|
||||
|
||||
fail=0
|
||||
|
||||
|
||||
@@ -43,8 +43,9 @@ TESTS = \
|
||||
i-1 hard-link-1 force partition-perm to-symlink dir-file diag \
|
||||
part-symlink part-rename trailing-slash
|
||||
|
||||
EXTRA_DIST = $(TESTS) setup vfat
|
||||
EXTRA_DIST = $(TESTS) vfat
|
||||
TESTS_ENVIRONMENT = \
|
||||
PERL="$(PERL)" \
|
||||
EGREP="$(EGREP)" \
|
||||
PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \
|
||||
PROG=mv
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
# 02110-1301, USA.
|
||||
|
||||
. $srcdir/../acl
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
# Make sure we get English translations.
|
||||
. $srcdir/../lang-default
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ fi
|
||||
fail=0
|
||||
|
||||
strace -qe unlink mv -T s1 s2 > out 2>&1 || fail=1
|
||||
grep unlink out && fail=1
|
||||
$EGREP 'unlink.*"s1"' out && fail=1
|
||||
|
||||
# Ensure that the source, s1, is gone.
|
||||
ls -dl s1 > /dev/null 2>&1 && fail=1
|
||||
|
||||
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
|
||||
if test -z "$other_partition_tmpdir"; then
|
||||
|
||||
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
# Make sure we get English translations.
|
||||
. $srcdir/../lang-default
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
|
||||
if test -z "$other_partition_tmpdir"; then
|
||||
|
||||
@@ -30,7 +30,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ tmp=mv-spec.$$
|
||||
trap 'status=$?; cd "$pwd" && exec 1>&2; rm -rf $tmp $other_partition_tmpdir && exit $status' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
# Make sure we get English translations.
|
||||
. $srcdir/../lang-default
|
||||
|
||||
@@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
. $srcdir/../lang-default
|
||||
PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
|
||||
|
||||
@@ -26,7 +26,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
|
||||
pwd=`pwd`
|
||||
|
||||
@@ -25,7 +25,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
|
||||
pwd=`pwd`
|
||||
|
||||
@@ -32,7 +32,7 @@ trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
pwd_tmp=$pwd/$tmp
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
# Make sure the programs use C-locale formats/translations.
|
||||
. $srcdir/../lang-default
|
||||
|
||||
@@ -23,7 +23,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
. $srcdir/../lang-default
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ if test "$VERBOSE" = yes; then
|
||||
mv --version
|
||||
fi
|
||||
|
||||
. $srcdir/setup
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
. $srcdir/../envvar-check
|
||||
|
||||
if test -z "$other_partition_tmpdir"; then
|
||||
|
||||
@@ -31,7 +31,7 @@ trap 'status=$?; (exit $status); exit $status' 1 2 13 15
|
||||
fail=1
|
||||
while :; do
|
||||
bindir=`cd ../../src && pwd`|| break
|
||||
my_pwd=`"$bindir"/pwd` || break
|
||||
my_pwd=`"$bindir/pwd"` || break
|
||||
|
||||
mkdir -p $tmp || break
|
||||
cd $tmp || break
|
||||
|
||||
@@ -31,7 +31,7 @@ trap 'status=$?; (exit $status); exit $status' 1 2 13 15
|
||||
fail=1
|
||||
while :; do
|
||||
bindir=`cd ../../src && pwd`|| break
|
||||
my_pwd=`"$bindir"/pwd` || break
|
||||
my_pwd=`"$bindir/pwd"` || break
|
||||
|
||||
mkdir -p $tmp || break
|
||||
cd $tmp || break
|
||||
|
||||
@@ -31,7 +31,7 @@ trap 'status=$?; (exit $status); exit $status' 1 2 13 15
|
||||
fail=1
|
||||
while :; do
|
||||
bindir=`cd ../../src && pwd`|| break
|
||||
my_pwd=`"$bindir"/pwd` || break
|
||||
my_pwd=`"$bindir/pwd"` || break
|
||||
|
||||
mkdir -p $tmp || break
|
||||
cd $tmp || break
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
AUTOMAKE_OPTIONS = 1.1 gnits
|
||||
|
||||
TESTS = \
|
||||
one-file-system \
|
||||
ignorable \
|
||||
readdir-bug \
|
||||
empty-inacc \
|
||||
|
||||
@@ -56,9 +56,9 @@ fail=0
|
||||
|
||||
p=$pwd/$tmp
|
||||
set +x
|
||||
(cd no-access; chmod 0 . && rm -r "$p"/abs1 rel "$p"/abs2) 2> out && fail=1
|
||||
test -d "$p"/abs1 && fail=1
|
||||
test -d "$p"/abs2 && fail=1
|
||||
(cd no-access; chmod 0 . && rm -r "$p/abs1" rel "$p/abs2") 2> out && fail=1
|
||||
test -d "$p/abs1" && fail=1
|
||||
test -d "$p/abs2" && fail=1
|
||||
|
||||
cat <<\EOF > exp || fail=1
|
||||
rm: cannot remove `rel': Permission denied
|
||||
|
||||
67
tests/rm/one-file-system
Executable file
67
tests/rm/one-file-system
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/bin/sh
|
||||
# Demonstrate rm's new --one-file-system option.
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
if test "$VERBOSE" = yes; then
|
||||
set -x
|
||||
rm --version
|
||||
fi
|
||||
|
||||
PRIV_CHECK_ARG=require-root . $srcdir/../priv-check
|
||||
. $srcdir/../lang-default
|
||||
. $srcdir/../other-fs-tmpdir
|
||||
|
||||
if test -z "$other_partition_tmpdir"; then
|
||||
(exit 77); exit 77
|
||||
fi
|
||||
|
||||
pwd=`pwd`
|
||||
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
|
||||
trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
|
||||
trap '(exit $?); exit $?' 1 2 13 15
|
||||
|
||||
t0="$t0 $other_partition_tmpdir"
|
||||
|
||||
framework_failure=0
|
||||
mkdir -p $tmp || framework_failure=1
|
||||
cd $tmp || framework_failure=1
|
||||
|
||||
t=$other_partition_tmpdir
|
||||
mkdir -p a/b $t/y
|
||||
mount --bind $t a/b || framework_failure=1
|
||||
|
||||
cat <<\EOF > exp || framework_failure=1
|
||||
rm: skipping `a/b', since it's on a different device
|
||||
EOF
|
||||
|
||||
if test $framework_failure = 1; then
|
||||
echo "$0: failure in testing framework" 1>&2
|
||||
(exit 1); exit 1
|
||||
fi
|
||||
|
||||
fail=0
|
||||
|
||||
rm --one-file-system -rf a 2> out && fail=1
|
||||
test -d $t/y || fail=1
|
||||
umount $t
|
||||
|
||||
cmp out exp || fail=1
|
||||
test $fail = 1 && diff out exp 2> /dev/null
|
||||
|
||||
(exit $fail); exit $fail
|
||||
@@ -47,16 +47,16 @@ chmod u=x,go= .
|
||||
t=$pwd/$tmp
|
||||
|
||||
# With coreutils-5.2.1, this would get a failed assertion.
|
||||
rm -r "$t"/a "$t"/b || fail=1
|
||||
rm -r "$t/a" "$t/b" || fail=1
|
||||
|
||||
# With coreutils-5.2.1, this would get the following:
|
||||
# rm: cannot get current directory: Permission denied
|
||||
# rm: failed to return to initial working directory: Bad file descriptor
|
||||
rm -r "$t"/d "$t"/e || fail=1
|
||||
rm -r "$t/d" "$t/e" || fail=1
|
||||
|
||||
test -d "$t"/a && fail=1
|
||||
test -d "$t"/b && fail=1
|
||||
test -d "$t"/d && fail=1
|
||||
test -d "$t"/e && fail=1
|
||||
test -d "$t/a" && fail=1
|
||||
test -d "$t/b" && fail=1
|
||||
test -d "$t/d" && fail=1
|
||||
test -d "$t/e" && fail=1
|
||||
|
||||
(exit $fail); exit $fail
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# FIXME
|
||||
|
||||
# Copyright (C) 2000, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -41,8 +41,8 @@ chattr +a f 2>/dev/null || framework_failure=1
|
||||
echo x >> f || framework_failure=1
|
||||
|
||||
if test $framework_failure = 1; then
|
||||
echo "$0: failure in testing framework" 1>&2
|
||||
(exit 1); exit 1
|
||||
echo "$0: chattr +a doesn't work on this file system; skipping this test " 1>&2
|
||||
(exit 77); exit 77
|
||||
fi
|
||||
|
||||
fail=0
|
||||
|
||||
@@ -46,8 +46,8 @@ touch -ca no-file > /dev/null 2>&1 || fail=1
|
||||
# If >&- works, test "touch -c -" etc.
|
||||
# >&- apparently does not work in HP-UX 11.23.
|
||||
# This test is ineffective unless /dev/stdout also works.
|
||||
if "$pwd"/../../src/test -w /dev/stdout >/dev/null &&
|
||||
"$pwd"/../../src/test ! -w /dev/stdout >&-; then
|
||||
if "$pwd/../../src/test" -w /dev/stdout >/dev/null &&
|
||||
"$pwd/../../src/test" ! -w /dev/stdout >&-; then
|
||||
touch -c - >&- 2> /dev/null || fail=1
|
||||
touch -cm - >&- 2> /dev/null || fail=1
|
||||
touch -ca - >&- 2> /dev/null || fail=1
|
||||
|
||||
Reference in New Issue
Block a user