summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-01-30copy: tweak variable name; improve a commentJim Meyering
* src/copy.c (copy_reg): Rename a variable to make more sense from caller's perspective: s/require_normal_copy/normal_copy_required/. This is an output-only variable, and the original name could make it look like an input (or i&o) variable.
2011-01-30copy: call extent_copy also when make_holes is false, ...Jim Meyering
so that we benefit from using extents also when reading a sparse input file with --sparse=never. * src/copy.c (copy_reg): Remove erroneous test of "make_holes" so that we call extent_copy also when make_holes is false. Otherwise, what's the point of that parameter?
2011-01-30copy: remove else-after-goto and adjust indentationJim Meyering
* src/copy.c (copy_reg): Remove useless else-after-goto.
2011-01-30extent-scan: adjust naming and formattingJim Meyering
* src/extent-scan.h [struct extent_scan]: Rename member: s/hit_last_extent/hit_final_extent/. "final" is clearer, since "last" can be interpreted as "preceding". Rename extent-scan functions to start with extent_scan_. * src/Makefile.am (copy_sources): Also distribute extent-scan.h. * src/extent-scan.c: Don't include error.h or quote.h. Neither is used. * src/copy.c: shorten a comment to fit in 80 columns * src/extent-scan.c, src/extent-scan.h: Correct formatting.
2011-01-30fiemap copy: don't let write failure go unreported; adjust style, etc.Jim Meyering
* src/copy.c (write_zeros): Add comments. (extent_copy): Move decls of "ok" and "i" down to scope where used. Adjust comments. Rename local: s/holes_len/hole_size/ Print a diagnostic upon failure to write zeros.
2011-01-30fiemap copy: add extent-scan.[ch], avoid a double-free and reorganizejeff.liu
Changes: ======== 1. fix write_zeros() per Jim's comments. 2. remove char const *fname from struct extent_scan. 3. change the signature of open_extent_scan() from "void open_extent_scan(struct extent_scan **scan)" to "void open_extent_scan(struct extent_scan *scan)" to avoid having to malloc the extent_scan variable; instead save it on the stack. 4. move close_extent_scan() from a function defined in extent-scan.c to extent-scan.h as a macro definition, but it does nothing for now, since initial extent scan defined at stack. 5. add a macro "free_extents_info()" defined at extent-scan.h to release the memory allocated to extent info which should be called combine with get_extents_info(), it just one line, so IMHO, define it as macro should be ok. * src/extent-scan.c: New file; functions to read "extents". * src/extent-scan.h: Header file of extent-scan.c. * src/Makefile.am: Reference it and link it to copy_source. * src/copy.c: Use the new functions and avoid double-free.
2011-01-30build: distribute new test script, filefrag-extent-compareJim Meyering
* tests/Makefile.am (EXTRA_DIST): Add filefrag-extent-compare.
2011-01-30build: distribute new file, fiemap.hJim Meyering
* src/Makefile.am (noinst_HEADERS): Add fiemap.h.
2011-01-30copy.c: add FIEMAP_FLAG_SYNC to fiemap ioctlJie Liu
* src/copy.c (fiemap_copy): Force kernel to sync the source file before mapping.
2011-01-30fiemap.h: include <stdint.h>, not <linux/types.h>Jim Meyering
* src/fiemap.h: Include stdint.h, not linux/types.h, now that this file uses only portable type names.
2011-01-30copy.c: ensure proper alignment of fiemap bufferPaul Eggert
* src/copy.c (fiemap_copy): Ensure that our fiemap buffer is large enough and well-aligned. Replace "0LL" with equivalent "0" as 3rd argument to lseek.
2011-01-30copy.c: adjust comments, tweak semanticsJim Meyering
* src/copy.c (fiemap_copy): Rename from fiemap_copy_ok. Add/improve comments. Remove local, "fail". (fiemap_copy): Do not require caller to set "normal_copy_required" before calling fiemap_copy. Report ioctl failure if it's the 2nd or subsequent call.
2011-01-30tests: relax the root-tests cross-checkJim Meyering
* cfg.mk (sc_root_tests): Allow spaces before "require_root_", now that tests/cp/sparse-fiemap has a conditional use.
2011-01-30tests: accommodate varying filefrag -v "flags" outputJim Meyering
* tests/cp/sparse-fiemap: Accommodate values other than "eof" in the "flags" column of filefrag -v output
2011-01-30tests: exercise more of the new FIEMAP copying codeJim Meyering
* tests/cp/sparse-fiemap: Ensure that a file with many extents (more than fit in copy.c's internal buffer) is copied properly. Don't require root access if current partition is btrfs or xfs. Use init.sh, not test-lib.sh. * tests/filefrag-extent-compare: New file.
2011-01-30tests: add a new test for FIEMAP-copyJie Liu
* tests/cp/sparse-fiemap: Add a new test for FIEMAP-copy against a loopbacked ext4 partition. * tests/Makefile.am (sparse-fiemap): Reference the new test.
2011-01-30cp: copy sparse files efficiently using the FIEMAP ioctlJie Liu
* src/fiemap.h: Add fiemap.h for fiemap ioctl(2) support. Copied from linux's include/linux/fiemap.h, with minor formatting changes. * src/copy.c (copy_reg): Now, when `cp' is invoked with --sparse=[WHEN], we will try to do FIEMAP-copy if the underlying file system supports it, and fall back to a normal copy if it fails.
2011-01-29doc: add alternatives for field processing not supported by cutPádraig Brady
* doc/coreutils.texi (cut invocation): Remove the tr -s '[:blank:]' example, as it doesn't handle leading and trailing blanks. Add `awk` examples for common field processing operations often asked about. Also document a `join` hack, to achieve the same thing. Note the join options are ordered so as to be compatible with other systems.
2011-01-29join: don't report disorder against an empty filePádraig Brady
This allows one to use join as a field extractor like: join -a1 -o 1.3,1.1 - /dev/null * src/join.c (join): Don't flag unpairable lines when one of the files is empty. * tests/misc/join: Add a new test for empty input, and adjust a previous test that was only checking against empty input. * doc/coreutils.texi (join invocation): Document the change. * NEWS: Likewise.
2011-01-29join: ensure --header skips the order check with empty filesPádraig Brady
* src/join.c: Skip the header even if one of the files is empty. * tests/misc/join: Add a test case. * NEWS: Mention the fix
2011-01-29join: add -o 'auto' to output a constant number of fields per linePádraig Brady
Lines with a different number of fields than the first line, will be truncated or padded. * src/join.c (prfields): A new function refactored from prjoin(), to output all but the join field. (prjoin): Don't swap line1 and line2 when line1 is blank so that the padding is applied to the right place. (main): Handle the -o 'auto' option. * tests/misc/join: Add 6 new cases to test the auto format. * NEWS: Mention the change in behavior. Suggestion from Assaf Gordon
2011-01-28tests: remove obsolete uses of "$$" in temporary file namesJim Meyering
Those were useful when tests might have been run in the same directory and in parallel. Now, each test is run in a newly- created empty directory. * tests/cp/backup-1: Remove obsolete uses of "$$". * tests/cp/same-file: Likewise. * tests/dd/misc: Likewise. * tests/mv/part-symlink: Likewise. * tests/mv/to-symlink: Likewise. * tests/touch/fail-diag: Likewise.
2011-01-26tests: don't hide all trace of the vc_exe_in_TESTS testJim Meyering
There was a non-negligible delay after running a single test. Now, you'll know why when you see this test's name. * tests/check.mk (vc_exe_in_TESTS): Don't @-hide commands. Use $(AM_V_GEN) instead.
2011-01-25tests: minor correctionAndreas Schwab
* tests/du/move-dir-while-traversing: Ignoring SIGTSTP is enough; don't also attempt to ignore SIGSTOP, it cannot be handled or ignored. Spotted by Andreas Schwab.
2011-01-25tests: avoid FP failure due to suspensionJim Meyering
* tests/du/move-dir-while-traversing: Prohibit suspension, to avoid false-positive failure.
2011-01-25tests: avoid rare FP failure in new du testJim Meyering
* tests/du/move-dir-while-traversing: Create an even larger tree to avoid a false-positive failure due to du terminating before the rename is triggered.
2011-01-24split: avoid a new, spurious warning from gcc-4.6.0Jim Meyering
* src/split.c (lines_rr) [IF_LINT]: Initialize files, now that rawhide's gcc-4.6.0 would otherwise warn about use-uninitialized.
2011-01-24tail: avoid new diagnostic when applying -f to a pipe on linux-2.3.38Jim Meyering
* src/tail.c (fremote): Do not print a diagnostic when fstatfs (pipe_FD, &buf) fails, as it now does on linux-2.3.38. This avoids the spurious failure of tests/misc/tail's f-pipe-1 test, when running in input-from-pipe mode.
2011-01-21doc: fix wording in warning about potential conflict with built-inJim Meyering
* doc/coreutils.texi (mayConflictWithShellBuiltIn): Fix wording.
2011-01-21manual: document floating point betterPaul Eggert
* doc/coreutils.texi (Floating point): New section. (od invocation, tail invocation, sort invocation, printf invocation): (sleep invocation, seq invocation): Refer and defer to it. See <http://lists.gnu.org/archive/html/bug-coreutils/2011-01/msg00031.html>.
2011-01-20build: update gnulib submodule to latestJim Meyering
The previous gnulib submodule reference was *still* to a non-public commit. My submodule had a stray commit, so the reference was always to a local merge commit. Reported by Rob Vermaas.
2011-01-20build: update gnulib submodule to latestJim Meyering
The previous gnulib submodule reference was to a non-public commit. Reported by Rob Vermaas.
2011-01-19maint: use slightly more efficient process in README-releaseJim Meyering
* README-release: Run cheaper root-only tests first. Use half of processing units (not just 1) for the expensive tests.
2011-01-18tests: avoid FP failure in new du testJim Meyering
* tests/du/move-dir-while-traversing: Create a larger tree to avoid a false-positive failure due to du terminating before the rename is triggered.
2011-01-18build: update gnulib submodule to latestJim Meyering
2011-01-18doc: update NEWSJim Meyering
* NEWS: Note when the uniq bug was introduced. It was mine, commit 1d9b3de9, "uniq: remove redundant test".
2011-01-17doc: show how to shred more efficientlyJim Meyering
* doc/coreutils.texi (shred invocation): Give an example showing how to invoke shred in single-pass mode, and warn that -n0 --zero may be inadequate.
2011-01-17uniq: replace a wasteful loop with simple calculationJim Meyering
* src/uniq.c (find_field): Remove the byte-skipping loop altogether. Instead, perform the simple calculation. This results in a 10% performance improvement for large byte offsets.
2011-01-17tests: add a test for today's uniq bugJim Meyering
* tests/misc/uniq-perf: New file. * tests/Makefile.am (TESTS): Add it.
2011-01-17uniq: don't continue field processing after end of lineSami Kerola
* NEWS (Bug fixes): Mention it. * src/uniq.c (find_field): Stop processing loop when end of line is reached. Before this fix, 'uniq -f 10000000000 /etc/passwd' would run for a very long time.
2011-01-15doc: specify how tr, echo, printf treat octal numbersOndřej Vašík
* doc/coreutils.texi (tr's Character sets): Document how a 9-bit octal value is interpreted. tr does not ignore the ninth bit. (echo invocation, printf invocation): Document that any ninth bit in \OOO is ignored. (http://debbugs.gnu.org/7574)
2011-01-14maint: refactor to use read-file from gnulibPádraig Brady
* bootstrap.conf: Add the read-file module * src/ptx.c: Replace the original code which would needlessly read SIZE_MAX bytes of files larger than this. * src/shuf.c: Replace the original code.
2011-01-13maint: trivial system header file cleanupsPádraig Brady
* src/system.h: Note where it should be included, and make ordering check portable to GLIBC > 2 * src/copy.c: Move <sys/ioctl.h> along with other system headers as is done elsewhere. * src/install.c: Move <sys/wait.h> along with other system headers as is done elsewhere. * src/ptx.c: Include <regex.h> rather than "regex.h" as is done elsewhere. Note <regex.h> is kept after "system.h" as per commit dba300a0.
2011-01-12doc: clean up HACKING guidelinesJim Meyering
* HACKING: Remove mention of "indent-tabs-mode: nil", since we've remove all of those directives. No longer needed. Remove dated (pre-emacs-23) reference regarding WhiteSpace mode.
2011-01-11gnulib: Also use dtoastr and ldtoastr modules.Paul Eggert
This adjusts to the recent splitting of the ftoastr module into 3 <http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00199.html>. * bootstrap.conf (gnulib_modules): Add dtoastr, ldtoastr, as coreutils needs all 3 modules now.
2011-01-11build: update gnulib submodule to latestPaul Eggert
2011-01-11rm: ignore errno related to invalid file namesNadav Har'El
* src/remove.c (nonexistent_file_errno): Also skip EINVAL and EILSEQ, for at least smbfs rejection of '*' in file names. * NEWS: Mention the fix.
2011-01-10build: update gnulib submodule to latestJim Meyering
2011-01-10du: don't abort when a subdir is renamed during traversalJim Meyering
* NEWS (Bug fixes): Mention it. * src/du.c (prev_level): Move declaration "up" to file-scope global. (du_files): Reset prev_level to 0 upon abnormal fts_read termination. Reported by Johathan Nieder in http://bugs.debian.org/609049 Also, improve a diagnostic. * tests/du/move-dir-while-traversing: Test for the above. * tests/Makefile.am (TESTS): Add it.
2011-01-07maint: suppress some clang scan-build warningsPádraig Brady
* src/pr.c (char_to_clump): Remove a dead store. * src/remove.c (fts_skip_tree): Likewise. * src/sort.c (key_warnings): Likewise. (sort): Suppress an uninitialized pointer warning.