summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-09tests: fix false failure due to gdb inline function handlingPádraig Brady
Inline functions are awkward to breakpoint as mentioned at: https://sourceware.org/bugzilla/show_bug.cgi?id=10738 The normal case here was for the breakpoint on the inline function to fail, resulting in a 10s delay before skipping the test. However on GCC 4.7.2 on ppc64 at least it was seen that the test failed erroneously due to the breakpoint being successfully set on an "out of line" function, but an inline function was actually being called. * tests/tail-2/inotify-race.sh: Switch to a line based breakpoint, rather than a symbol base one, which avoids issues with breakpoints on inline functions. Also skip_ on the initial breakpoint check in case the breakpoint is not traversed which would be the case on remote file systems for example.
2013-12-09tail: use consistent diagnostics with and without inotifyPádraig Brady
* src/tail.c: With inotify, when a file is initially absent, we fstat(-1) for that file spec, thus recording an errnum of EBADF, which caused the "has become accessible" diagnostic to be issued, when the file first appears. Instead we avoid the fstat(-1) and thus emit the more natural and consistent "has appeared" diagnostic. * tests/tail-2/retry.sh: Use the new diagnostic which also causes this test to pass on systems without inotify.
2013-12-09tests: avoid false df failure with nfs and lofsBernhard Voelker
* tests/df/total-unprocessed.sh: -t nfs and --local are _not_ mutually exclusive on solaris, with lofs mounts.
2013-12-07tests: avoid problematic $(< file) shell constructPádraig Brady
* tests/cp/link-deref.sh: This was seen to cause an issue with dash v0.5.6 at least, so change to a simpler expression.
2013-12-07tests: fix false failure on platforms using newfstatatPádraig Brady
* tests/ls/stat-free-color.sh: Add newfstatat to the list of syscalls to trace. Also add all "stat" syscalls to the list of syscalls that we verify that strace supports. Also only create a single dangling symlink to check, since we already only check for a single "stat" call. Fixes http://bugs.gnu.org/16075 seen on AArch64
2013-12-07tests: avoid a false memory leak test failurePádraig Brady
* tests/misc/shuf-reservoir.sh: Restrict the valgrind "exit on leak" behavior to developer environments where specific "lint" code is enabled to avoid inconsequential leaks.
2013-12-06tests: fix shuf test verifying that -i and -e can not be combinedBernhard Voelker
Previously, the test triggered another error diagnostic: shuf: invalid input range ‘-e’ and therefore eclipsed the expected one: shuf: cannot combine -e and -i options While at it, reindent a line with more than 80 characters, present since the previous commit to silence sc_long_lines. * tests/misc/shuf.sh: Pass a valid range to the -i option.
2013-12-06shuf: --repeat, not --repetitions; default --head-count is infinityPaul Eggert
Original problem reported by Philipp Thomas in <http://bugs.gnu.org/16061>. * NEWS: shuf --repeat, not shuf --repetitions. * doc/coreutils.texi (shuf invocation): * src/shuf.c (usage, long_opts, main): * tests/misc/shuf.sh: Likewise. Also, the default head-count is infinity.
2013-12-06doc: clarify that df now generally processes special files correctlyBernhard Voelker
Since v8.21-172-g33660b4, df not only treats symbolic link arguments differently, as stated there, but now generally processes special file arguments in a non-canonicalized form correctly: $ cd /dev && df-old sdb Filesystem 1K-blocks Used Available Use% Mounted on devtmpfs 1014572 48 1014524 1% /dev $ cd /dev && df-new sdb Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdb 10190136 6039532 3609932 63% /home Document df's new behavior. * doc/coreutils.texi (df invocation): In the paragraph describing df's behavior regarding special file arguments, relax the condition for such special files from "... is an absolute name of ..." to "... resolves to ...". * NEWS (Bug fixes): Mention the new behavior also here.
2013-12-05tests: fix false failure with disabled SELinux supportPádraig Brady
This could trigger on SELinux systems where we build --qithout-selinux or where the SELinux development libraries are not installed. * init.cfg (require_selinux_enforcing_): Call require_selinux_() to determine if the current build supports SELinux. This avoids a false failure in tests/mkdir/selinux.sh where only mkdir would determine that SELinux was disabled and thus ignore invalid contexts. (require_selinux_): Refactor a little to distinguish whether it's the build or the (file) system that doesn't support SELinux.
2013-12-05selinux: fix --context=CTX for cp and diagnose defaultcon() errorsPádraig Brady
* src/selinux.h (ignorable_ctx_err): A new function used to determine if a warning should be given after a call to defaultcon() or restorecon(). * src/cp.c (main): Fix the setfscreatecon() call to use the argument passed by the user. * src/mkdir.c (make_ancestor): Show all but "ignoreable" errors from defaultcon() and restorecon(). * tests/misc/selinux.sh: Add a test run as root in selinux enforcing mode, to ensure cp --context=invalid is honored and fails immediately.
2013-12-04md5sum, sha*sum: use libcrypto where availablePádraig Brady
libcrypto is generally available and has well optimized crypto hash routines particular to various systems. For example, testing sha1sum with openssl-1.0.0j on an i3-2310M, gives a performance boost of about 40%: $ time sha1sum.old --tag ~/test.iso SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30 real 0m4.692s user 0m4.499s sys 0m0.162s $ time sha1sum.new --tag ~/test.iso SHA1 (/home/padraig/test.iso) = 3c27f7ed01965fd2b89e22128fd62dc51a3bef30 real 0m2.685s user 0m2.512s sys 0m0.170s * configure.ac: By default, enable use of libcrypto if available. * src/local.mk: Link with libcrypto. * NEWS: Mention the md5sum and sha*sum improvements.
2013-12-04df: handle bind mounts when processing device nodesPádraig Brady
* src/df.c (get_disk): Use the same heuristic used in get_point() to select the shortest file system mount point, in an attempt to show the base mounted file system. * NEWS: Mention the bug fix.
2013-12-04df: dereference symlinks to disk device nodesPádraig Brady
This is so the matching for the device is done on the canonical name of the disk node, rather than on the path of the symlink. In any case the user will generally want to use the symlink target. * src/df.c (get_disk): Canonicalize the passed file, before matching against the list of mounted file system devices. Note we pass the original symlink name to the "file" output field, as the symlink target is usually available through the "source" field. * tests/df/df-symlink.sh: Test the dereferencing operation. * tests/local.mk: Mention the new test. * NEWS: Mention the fix. Reported by Ondrej Oprala
2013-12-04build: update gnulib submodule to latestPádraig Brady
Note tests/init.sh and bootstrap are still in sync with gnulib. * gnulib: Sync two configure check fixes. - Avoid generating core dumps from regex configure check - Fix compile error in getcwd configure check
2013-12-04build: update gnulib submodule to latestPádraig Brady
Note tests/init.sh and bootstrap are still in sync with gnulib. * gnulib: Sync many fixes/changes, including the base64 encoding speedup mentioned in commit v8.21-145-g9120845 Also included is support for enabling use of libcrypto hash routines which are generally well optimized for particular systems.
2013-12-03maint: avoid '%s' quoting notation in diagnostic messagesBernhard Voelker
Add a new rule to ensure the use of quote() instead of '%s' or `%s' in format strings of diagnostics messages. * cfg.mk (sc_prohibit_quotes_notation): Add rule. * TODO: Remove the entry regarding the '%s' notation. * src/mkfifo.c (main): Remove the offending and in this case even duplicate quoting in the format string of the error diagnostic. * src/mknod.c (main): Likewise. * src/df.c (decode_output_arg): Change two invocations of error() according to the above new rule. * src/numfmt.c: Fix numerous wrong quote notations to fit the above new rule, mostly in internal debugging diagnostic messages.
2013-12-03doc: remove obsolete info on terminal alignment bugsPádraig Brady
* doc/coreutils.texi (ls invocation): Remove the note about OSX terminals not aligning properly as this is no longer the case. Tested by: Philipp Thomas
2013-11-29build: fix potential factor build failure on arm and powerpcPádraig Brady
* src/longlong.h: Sync with the latest longlong.h from libgmp to: - avoid arm asm when being compiled for the thumb instruction [sub]set - avoid old powerpc assembly that is incompatible with newer GCC - add arm64 optimized count_trailing_zeros() - add sparc64 optimized add_ssaaaa() and umul_ppmm()
2013-11-29tests: add a test for rm -r "/"Bernhard Voelker
* tests/rm/r-root.sh: Add a non-root test. * tests/local.mk (all_tests): Mention the test.
2013-11-29maint: remove various FIXME commentsBernhard Voelker
* src/extent-scan.c (extent_need_sync): Remove the FIXME comment about removing the work around. As discussed in [1], the needed FIEMAP fix never made it into the Linux kernel. * src/realpath.c (longopts): Remove the FIXME comment about deprecating the --strip option as it's a valid alias for --no-symlinks option. Also discussed in [1]. [1] http://lists.gnu.org/archive/html/coreutils/2013-11/msg00103.html
2013-11-29df: remove long-obsolescent --megabytes optionBernhard Voelker
This option has been undocumented for 12 years [1], and warned about for a year [2]. [1] commit FILEUTILS-4_1_4-23-gd177203 [2] commit v8.17-43-g453ce92 * src/df.c (MEGABYTES_OPTION): Remove. (long_options): Remove "megabytes" element. (main): In the option parsing loop, remove the MEGABYTES_OPTION case. * NEWS: Mention the change.
2013-11-28build: fix selinux.c build failure on 32 bitPádraig Brady
* src/selinux.c: Don't include the system "fts.h" as that disallows _FILE_OFFSET_BITS=64 which gnulib auto enables to support large files on 32 bit systems. Instead include our "xfts.h" which includes the less limited gnulib replacement, and also a checked version of xfts_open(). (restorecon): Use the checked xfts_open() rather than the standard fts_open(). Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/6934169
2013-11-27build: avoid more selinux build failuresPádraig Brady
Handle both newer selinux libraries with mode_to_security_class(), and systems without selinux at all. We could easily adjust gnulib to provide the necessary stubs for use by this module, but it's more efficient to just stub out the module completely, when not using selinux. * src/selinux.h: Define stubs for the two module functions, when SELinux is not available. * src/selinux.c: Exclude all logic in preference for the stubs when selinux isn't used. Also when newer selinux libs are used, don't use our conflicting static version of mode_to_security_class(). m4/jm-macros.m4: Check for the system mode_to_security_class().
2013-11-27build: avoid build failure on non selinux systemsPádraig Brady
* src/selinux.c: This module introduced in commit v8.21-159-gd8e27ab doesn't need to include <selinux/flask.h>. That header file isn't catered for by gnulib, but is not needed as we're not explicitly referencing any class IDs. Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/6920020
2013-11-27selinux: adjust utils to run restorecon with -ZPádraig Brady
cp, mv, install, mkdir, mkfifo, mknod are adjusted so that: -Z no longer accepts an argument. -Z or --context without an argument do not warn without SELinux. --context with an argument will warn without SELinux. * src/local.mk: Reference the new selinux module where required. * src/system.h: Make the argument to --context optional. * src/mkdir.c: Likewise. Also handle the SMACK case for --context. Note we currently silently ignore -Z with SMACK. * src/mkfifo.c: Likewise. * src/mknod.c: Likewise. * src/install.c: Likewise. Note install(1) by default already set the context for target files to their system default, albeit with an older method. Use the -Z option to select between the old and new context restoration behavior, and document the differences and details for how context restoration is done in new and old methods, with a view disabling the old method entirely in future. * src/cp.c: Make the argument to --context optional. Note -Z implies --no-preserve=context. I.E. -Z overrides that aspect of -a no matter what order specified. (struct cp_options): Document the context handling options. (main): Check/adjust option combinations after all options are processed, to both simplify processing and to make handling independent of order of options on the command line. Also improve the diagnostics from a failed call to setfscreatecon(). (set_process_security_ctx): A new function, refactored to set the default context from the source file, or with the type adjusted as per the system default for the destination path. (set_file_security_ctx): A new function refactored to set the security context of an existing file, either based on the process context or the default system context for a path. (copy_internal): Use the refactored functions to simplify error handling and consistently fail or warn as needed. (copy_reg): Likewise. (copy_internal): With --preserve=context, also copy context from non regular files. Note for directories this may impact the copying of subsequent files to that directory? (copy_attr): If we're handling SELinux explicitly, then exclude to avoid the redudant copy with --preserve=context, and the problematic copy with -Z. Note SELinux attribute exclusion also now honors cp -a --no-preserve=context. Note there was a very small window over 10 years ago, where attr_copy_file was available, while attr_copy_check_permissions was not, so we don't bother adding an explicit m4 check for the latter function. * src/mv.c: Support --context, but don't allow specifying an argument. * src/chcon.c: Adjust a comment to be specific to SELinux. * src/runcon.c: Likewise. * src/copy.c: Honor the context settings to "restorecon" as appropriate. * src/copy.h: Add a new setting to select "restorecon" functionality. * tests/mkdir/selinux.sh: s/-Z/--context=/ * tests/cp/cp-a-selinux.sh: Augment this test with cases testing basic -Z functionality, and also test the various invalid option combinations and option precedence. * tests/mkdir/restorecon.sh: Add a new test for the more involved mkdir -Z handling, since the directory changing and non existent directories need to be specially handled. Also check the similar but simpler handling of -Z by mk{nod,fifo}. * tests/local.mk: Reference the new test. * doc/coreutils.texi (cp invocation): Update as per interface changes. (mv invocation): Likewise. (install invocation): Likewise. (mkfifo invocation): Likewise. (mknod invocation): Likewise. (mkdir invocation): Likewise. * NEWS: Mention the new feature and change in behavior.
2013-11-27selinux: a new module implementing "restorecon" functionalityDaniel J Walsh
* src/selinux.c: A new module implementing "restorecon" functionality. There are two main functions to adjust the type of the referenced file system item. defaultcon() will setup the process context so that new items will have the required context without races. This is the preferred method. For existing files, the equivalent restorecon() is available which has two modes. With the "local" parameter set to false, restorecon() will adjust the type according to the system configuration for that file, and set to true will update the context as per the context for the current process (disregarding type). * src/selinux.h: Likewise. * po/POTFILES.in: Reference the new module.
2013-11-27shred: provide --remove methods to avoid excessive syncingPádraig Brady
A sync operation is very often expensive. For illustration I timed the following python script which indicated that each ext4 dir sync was taking about 2ms and 12ms, on an SSD and traditional disk respectively. import os d=os.open(".", os.O_DIRECTORY|os.O_RDONLY) for i in range(1000): os.fdatasync(d) So syncing for each character for each file can result in significant delays. Often this overhead is redundant, as only the data is sensitive and not the file name. Even if the names are sensitive, your file system may employ synchronous metadata updates, which also makes explicit syncing redundant. * tests/misc/shred-remove.sh: Ensure all the new parameters actually unlink the file. * doc/coreutils.texi (shred invocation): Describe the new parameters to the --remove option. * src/shred.c (Usage): Likewise. (main): Parse the new options. (wipename): Inspect the new enum to see which of the now optional tasks to perform. * NEWS: Mention the new feature. * THANKS.in: Add reporter Joseph D. Wagner
2013-11-27tail: improve inotify handling of symlinksPádraig Brady
Previous behavior failed to read contents of a (re)appearing file, when symlinked by tail's watched file. Also we now diagnose other edge cases when running in inotify mode, where an initially missing or regular file changes to a symlink. * src/tail.c (main): If any arg is a symlink, use polling mode. (recheck): Diagnose the edge case where a symlink appears during inotify processing. * tests/tail-2/symlink.sh: Test the fix. Mention the edge cases. * tests/local.mk: Reference the new test. * NEWS: Mention the fix. Reported by: Ondrej Oprala
2013-11-27df: add --output=file to directly output specified argumentsPádraig Brady
* src/df.c (usage): Document the new 'file' --output field. (get_dev): Add a new parameter to pass the specified argument from the command line through. Use '-' if a command line parameter is not being used. * doc/coreutils.texi (df invocation): Describe the new 'file' field. * tests/df/df-output.sh: Adjust all fields test, and add a specific test for --output=file. * NEWS: Mention the new feature.
2013-11-27timeout: avoid unlikely issues with --kill-afterPádraig Brady
* src/timeout.c (cleanup): When calling settimeout() from this signal handler, ensure we don't call out to error() or gettext(), which are not async-signal-safe. Also reset the errno which may be cleared by settimeout().
2013-11-27tests: ensure factor tests can be regeneratedPádraig Brady
* tests/local.mk (factor-tests:) Add -f to the mv command that replaces any existing generated tests. This is required to avoid prompts when root initially generates the tests, and they subsequently need to be regenerated by a non root user.
2013-11-27sort: avoid issues when issuing diagnostics from child processesPádraig Brady
* src/sort.c: (async_safe_die): A new limited version of error(), that outputs fixed strings and unconverted errnos to stderr. This is safe to call in the limited context of a signal handler, or in this particular case, between the fork() and exec() of a multithreaded process. (move_fd_or_die): Use the async_safe_die() rather than error(). (maybe_create_temp): Likewise. (open_temp): Likewise. Fixes http://bugs.gnu.org/15970
2013-11-26doc: clarify the operation of ls -kPádraig Brady
* src/ls.c (usage): Mention -k only changes the display for disk usage (directory total, and ls -s), and imply that it can be overridden (by --block-size, and -h). * doc/coreutils.texi (block size): Mention that ls -k handling is different to other utilities. Addresses http://bugs.gnu.org/14525
2013-11-23dircolors: add a new entry to colorize 'lz4' filesJohn
* src/dircolors.hin: Add entry for the speed optimized 'lz4' compressor.
2013-11-22tests: enhance rm test regarding "." and ".."Bernhard Voelker
Recent commit 2da7009d changed the error diagnostic of rm(1) trying to remove "." or "..". Enhance the corresponding test. * tests/rm/r-4.sh: Ensure rm(1) outputs the expected error diagnostic.
2013-11-21maint: avoid perl warning in sc_check-AUTHORSBernhard Voelker
With newer perl, "make syntax-check" issues many warnings like: -i used with no filenames on the command line, reading from STDIN. * cfg.mk (sc_check-AUTHORS): Remove the -i flag in the perl invocation as it is reading from a pipe.
2013-11-21doc: enhance diagnostic when rm skips "." or ".." argumentsBernhard Voelker
The error diagnostic "rm: cannot remove directory: '.'" does not give the user a hint for the reason. Issue a clearer error message. * src/remove.c (rm_fts): Enhance the error diagnostic in the above case to emphasize that skipping is done deliberately. In the corresponding comment, mention that POSIX mandates this behavior. Likewise in the subsequent comment for skipping "/". * doc/coreutils.texi (rm invocation): In the paragraph describing the above behavior, mention that POSIX mandates it.
2013-11-18tests: fix false rm -I test failure when run as rootPádraig Brady
Fix a recent regression introduced in commit v8.21-127-g5ee7d8f Also related to this is the recent query about root run `rm -I` ignoring the mode bits of a file: https://bugzilla.redhat.com/1013171 * tests/rm/interactive-once.sh: Avoid the messages and corresponding file presence checks with write protected files when running as root.
2013-11-17stty: add support for mark/space parityColin Leitner
This adds support for using a constant or "stick" parity bit. * src/stty.c (usage): Mention the new flag. * tests/misc/stty.sh: Adjust for the new flag. * NEWS: Mention the improvement. * docs/coreutils.texi (stty invocation): Mention the new flag.
2013-11-11base64: improve encoding I/O efficiencyPádraig Brady
Since the I/O overhead is significant to the relatively simple processing done by this utility, use fputs() rather than fputc() to output '\n'. Time to process a 100MiB file was measured to decrease from 0.417s to 0.383s, i.e. an 8% improvement. Related to these changes, is a processing improvement in gnulib, which increases throughput by 60% when processing full buffers, which improves processing of a 100MiB file with standard wrapped output, down to 0.256s. http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commit;h=43fd1e7b Also increase the encoding buffer size from 3 to 30KiB. This was seen to give a further 8% improvement, taking processing time down to 0.235s in the wrapped output case. The decoding size buffer is not adjusted, due to the noted caveat with --ignore-garbage. * src/base64.c (BLOCKSIZE): Split into ENC_ and DEC_ variants, with the former increased from 3KiB to 30KiB. (wrap_write): Use the simpler fputc() rather than fputs() to output the '\n' character. Also check against EOF rather than < 0 for errors. (do_encode): Likewise. * NEWS: Mention the large increase in performance, which with the I/O improvements in coreutils and the processing improvement in gnulib, amount to about a 60% throughput increase.
2013-11-08shred: avoid data write pass with --size=0Pádraig Brady
* src/shred.c (dopass): Exit early to avoid redundant heap allocation, and more importantly avoiding a file sync when we're writting no data, as this can have side effects. Also with --verbose, this avoids printing of "pass status" which could be confusing as to whether data was actually written. * tests/misc/shred-passes.sh: Ensure the status for data passes are not written when not doing any data writes.
2013-11-08shred: increase I/O block size for periodic pattern casePádraig Brady
* src/shred.c (dopass): In the periodic pattern case increase the I/O block size from 12KiB to 60KiB (also a multiple of 3 and 4096). * NEWS: Adjust accordingly.
2013-11-08shred: fix direct I/O failures for last write to filePádraig Brady
Since direct I/O is now enabled with commit v8.21-139-gebaf961 we must handle the case where we write an odd size at the end of a file (with --exact), or we specify an odd --size that is larger than 64KiB, or in the very unlikely case of a device with an odd size. This issue was present since direct I/O support was first added in v5.3.0, but latent since v6.0. Theoretically this could have also been an issue after that on systems which didn't have alignment constraints, but did have size constraints for direct I/O. * src/shred.c (dopass): On the first pass for a file, always retry a write that fails with EINVAL, so we handle direct I/O failure at either the start or end of the file. Adjust the comment as the original case is out of date and implicitly handled by this more general fix. * tests/misc/shred-exact.sh: Add a test case. * NEWS: Add a "bug fix" entry for shred since there are two related issues now fixed.
2013-11-07cp: fix --link regarding the dereferencing of symbolic linksGian Piero Carrubba
* src/copy.c (create_hard_link): Add a bool 'dereference' parameter, and pass AT_SYMLINK_FOLLOW as 'flags' to linkat() when dereference is true. (should_dereference): Add new 'bool' function to determine if a file should be dereferenced or not. (copy_internal): Use the above new should_dereference() and remember its return value in a new local bool 'dereference' variable. Use that in all three calls to create_hard_link(). * src/cp.c (main): after parsing the options, if x.dereference is still DEFEF_UNDEFINED and the x.recursive is true, then only set x.dereference to DEREF_NEVER iff --link was not specified. * doc/coreutils.texi (cp invocation): Mention that cp(1) does not follow symbolic links in the source when --link is specified. Likewise in the description of the -R option when used together with that option. * tests/cp/same-file.sh: Adapt the expected results for the -fl, the -bl and the -bfl tests. * tests/cp/link-deref.sh: Add a new test. * tests/local.mk (all_tests): Reference the above new test. * NEWS (Changes in behavior): Mention the change. This fixes http://bugs.gnu.org/15173 Co-authored-by: Bernhard Voelker <mail@bernhard-voelker.de>
2013-11-06shred: write larger chunks when possiblePádraig Brady
* src/shred.c (dopass): When not needing to write periodic patterns, use a 64KiB block size to reduce the number of write system calls.
2013-11-05shred: enable direct I/O when possiblePádraig Brady
Commit v5.92-1057-g43d487b introduced a regression in coreutils 6.0 where it removed the page alignment of the buffer to write, thus disabling direct I/O. We want to use direct I/O when possible to avoid impacting the page cache at least, as we know we don't want to cache the data we're writing. * src/shred.c (dopass): Allocate the buffer on the heap, while using a more general calculation to allow to have the output size independent from the fillpattern() size constraint of a multiple of 3. Also we dispense with the union as it's no longer needed given we're aligning on a page boundary and thus don't need to explicitly handle uint32_t alignment.
2013-11-01md5sum, sha*sum: improve help for --check related optionsPádraig Brady
* src/md5sum.c (usage): s/three/four/ in the message pertaining to the --check related options. Also clarify that --strict is just significant for the formatting of the checksum lines. Also since we're changing both strings, move the --strict description in with the description of the other options and order alphabetically. * THANKS.in: Added reporter: Daniel Mach
2013-11-01maint: simplify printing of md5sum file namesPádraig Brady
* src/md5sum.c (main): Add a comment as to why we continue to escape names that do not have '\n' but do have '\\' chars. (print_filename): Use the predetermined boolean to decide whether to escape or not, so that in the common case we can output the file name directly, rather than inspecting each char. * tests/misc/md5sum.pl: Add case to show '\\' chars cause escaping. * tests/misc/sha1sum.pl: Likewise.
2013-11-01build: fix dependencies of man/sha*sum.1Bernhard Voelker
Although the above man pages depend on src/md5sum.c as a shared source, the build of the man pages directly requires their own executables to exist. * man/local.mk (man/sha1sum.1): Change the dependency from 'src/md5sum' to 'src/sha1sum'. (man/sha224sum.1): s/md5sum/sha224sum/ (man/sha256sum.1): s/md5sum/sha256sum/ (man/sha384sum.1): s/md5sum/sha384sum/ (man/sha512sum.1): s/md5sum/sha512sum/ Reported by Pádraig Brady in http://lists.gnu.org/archive/html/coreutils/2013-11/msg00006.html