<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src, branch v8.18</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.18</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2012-08-05T08:05:13Z</updated>
<entry>
<title>build: avoid sort link failure on Solaris 10</title>
<updated>2012-08-05T08:05:13Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-08-05T08:05:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f1b85e3ca7265b3ced70f573fcfe02ce0ed6e189'/>
<id>urn:sha1:f1b85e3ca7265b3ced70f573fcfe02ce0ed6e189</id>
<content type='text'>
* src/Makefile.am (sort_LDADD): Sort uses euidaccess, which may require
whatever library configure deemed necessary to resolve the eaccess
function, but no one told sort to link with that library.
(sort_LDADD): Add $(LIB_EACCESS).
</content>
</entry>
<entry>
<title>df: fix exit code and error messages with --total</title>
<updated>2012-08-04T16:30:07Z</updated>
<author>
<name>Bernhard Voelker</name>
<email>mail@bernhard-voelker.de</email>
</author>
<published>2012-08-03T23:09:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3b8139e85f3a96dfefaba94d0764135376135ae8'/>
<id>urn:sha1:3b8139e85f3a96dfefaba94d0764135376135ae8</id>
<content type='text'>
When the combination of the file system options with given files or
devices does not lead to output, "df --total" would exit successfully
although it should not.

Examples:
  $ df --total --type=xfs /          # when / is not an XFS file system
  $ df --total --local -t nfs  DIR   # nfs is remote per se ...
  $ df --total -t qwerty /dev/sdb5   # typo in file system type

Furthermore, "df --total" would not print the error message "no file
systems processed" when the file argument does not exist or is otherwise
not accessible.

Example:
  $ df --total __not_exist__

These 2 bugs are present since --total was added by commit
v6.12-166-gea2887b.

* src/df.c (get_dev): Do not set file_systems_processed to true when
force_fsu is true, i.e. when the row for the "total" line is processed.
(main): Don't print totals unless we've processed a file system.
Also only print the "no FS processed" message if there was no
preceding diagnostic.
* tests/df/total-unprocessed: Add a new test.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the fix.

Improved-by: Jim Meyering
</content>
</entry>
<entry>
<title>truncate: don't leak a file descriptor with --ref=PIPE</title>
<updated>2012-08-04T10:27:20Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-08-04T09:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=cbd1cffa3eb9e6e5ca82ec67d3c4211a019dd1ed'/>
<id>urn:sha1:cbd1cffa3eb9e6e5ca82ec67d3c4211a019dd1ed</id>
<content type='text'>
* src/truncate.c (main): For a user who makes the mistake of
using a non-seekable file as a reference for the desired length,
truncate would open that file, attempt to seek to its end, but
upon seek failure would neglect to close the file descriptor.
Close the file descriptor even when lseek fails.
In addition, ignore failure to close that reference FD, since as
long as the lseek succeeds, a close failure doesn't matter.
Coverity spotted the potential FD leak.

Improved-by: Pádraig Brady.
</content>
</entry>
<entry>
<title>split: plug nominal leaks</title>
<updated>2012-08-04T09:32:01Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-08-02T17:31:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=4abec7ef9a3e162098b6b4c1e19a8235023130d4'/>
<id>urn:sha1:4abec7ef9a3e162098b6b4c1e19a8235023130d4</id>
<content type='text'>
* src/split.c (lines_rr) [IF_LINT]: Plug a harmless leak.
(main) [IF_LINT]: Free a usually-small (~70KB) buffer
just before exit, mainly to take this off the radar of
leak-detecting tools.

Improved-by: Pádraig Brady.
</content>
</entry>
<entry>
<title>tail: avoid rare error-path FD leak</title>
<updated>2012-08-03T12:54:01Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-07-27T21:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=e11a2cf3198bcec9a5e10205bf3ebe66dc7edc59'/>
<id>urn:sha1:e11a2cf3198bcec9a5e10205bf3ebe66dc7edc59</id>
<content type='text'>
* src/tail.c (tail_forever): Close FD to avoid leak after a
failed fstat.
</content>
</entry>
<entry>
<title>tail: avoid misleading diagnostic upon fstat failure</title>
<updated>2012-07-25T17:00:22Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-07-25T16:35:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a6e8e3a3e116f2cdaa452eb66032d912092d0026'/>
<id>urn:sha1:a6e8e3a3e116f2cdaa452eb66032d912092d0026</id>
<content type='text'>
* src/tail.c (check_fspec): Save fstat-induced errno *before*
calling close_fd, not after.  Otherwise, the close could well
clobber the global errno, making tail print an invalid diagnostic.
This could happen only with tail -f, and even then, only when
a valid file descriptor were to provoke fstat failure.
</content>
</entry>
<entry>
<title>maint: stzncpy: restrict pointer parameters</title>
<updated>2012-07-21T10:08:31Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-07-21T10:08:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7308099bbc38c64fef2da2f5cf8d32c149400065'/>
<id>urn:sha1:7308099bbc38c64fef2da2f5cf8d32c149400065</id>
<content type='text'>
* src/system.h (stzncpy): Add "restrict" attribute to each pointer
parameter and note in the comment that the buffers must not overlap.
</content>
</entry>
<entry>
<title>maint: rm: remove two more unused static inline functions</title>
<updated>2012-07-20T15:31:40Z</updated>
<author>
<name>Joachim Schmitz</name>
<email>jojo@schmitz-digital.de</email>
</author>
<published>2012-07-20T13:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f24bf0448e88321a01fad18ded110fbb1545ca15'/>
<id>urn:sha1:f24bf0448e88321a01fad18ded110fbb1545ca15</id>
<content type='text'>
* src/remove.c (cache_stat_ok, is_nondir_lstat): Remove unused
functions.
</content>
</entry>
<entry>
<title>maint: rm: remove unused static-inlined functions</title>
<updated>2012-07-20T13:05:38Z</updated>
<author>
<name>Joachim Schmitz</name>
<email>jojo@schmitz-digital.de</email>
</author>
<published>2012-07-20T12:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=05364ffe0d057ac0fbd1d3f2d556132e799ce4e0'/>
<id>urn:sha1:05364ffe0d057ac0fbd1d3f2d556132e799ce4e0</id>
<content type='text'>
* src/remove.c (cache_statted, is_dir_lstat): Remove unused
static-inlined functions.
* THANKS.in: Remove my name from this list, now that (with this
commit) it is included automatically.
Copyright-paperwork-exempt: Yes
</content>
</entry>
<entry>
<title>df: don't output control characters in a mount point name</title>
<updated>2012-07-16T01:48:31Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-07-13T01:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3ed70fd559c3fbed8383b50373e6d23d1857dc52'/>
<id>urn:sha1:3ed70fd559c3fbed8383b50373e6d23d1857dc52</id>
<content type='text'>
It's awkward to read and problematic for scripts when
control characters like '\n' are output.

Note other fields are already handled with mbsalign,
which converts non printable chars to the replacement char.
A caveat to note with that, is the replacement char takes
a place in the field and so possibly truncates the field
if it was the widest field in the records.

Note a more general replacement function, that
handles all printable, or non white space characters,
would require more sophisticated support for various
encodings, and the complexity vs benefit was not
deemed beneficial enough at present.
Perhaps in future a more general replacement function
could be shared between the various utilities.

Note &lt;space&gt; is unaffected in any field,
which could impact scripts processing the output.
However any of the number fields at least could have
spaces considering `LANG=fr_FR df -B\'1`, so it's
probably best to leave spaces, which also allows
scripts to handle mount points with spaces without change.

* src/df.c (hide_problematic_chars): Replace control chars with '?'.
* tests/df/problematic-chars: Add a new root only test.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the fix.
</content>
</entry>
</feed>
