<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/ls.c, branch v8.0</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.0</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-09-30T14:42:35Z</updated>
<entry>
<title>ls: always print "?" for allocated size of a dereferenced dangling symlink</title>
<updated>2009-09-30T14:42:35Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-29T14:43:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d4c7114bce116aefe28c899f5d0e7dcc39feb103'/>
<id>urn:sha1:d4c7114bce116aefe28c899f5d0e7dcc39feb103</id>
<content type='text'>
Previously for `ls -Ls` (but not `ls -Lsl`), we referenced
the st_blocks returned from the previous failed stat() call.
This undefined value was seen to be 0 for dangling symlinks at least.
* src/ls.c (print_file_name_and_frills, length_of_file_name_and_frills):
Don't use st_blocks if the previous stat() failed
* tests/ls/dangle: Add a test case
* NEWS: Mention the fix, and roll up related items into a single entry.
</content>
</entry>
<entry>
<title>ls: don't use an undefined struct stat after failed stat/lstat</title>
<updated>2009-09-29T12:12:30Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-29T05:28:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b7aaa0da8b47f4f373d3e0876bd540986278c6e2'/>
<id>urn:sha1:b7aaa0da8b47f4f373d3e0876bd540986278c6e2</id>
<content type='text'>
* src/ls.c (format_inode): Access f-&gt;stat only if f-&gt;stat_ok is set.
* NEWS (Bug fixes): Mention it.
Improved-by: Pádraig Brady &lt;P@draigBrady.com&gt;
</content>
</entry>
<entry>
<title>ls: print "?", not "0" as inode of dereferenced dangling symlink</title>
<updated>2009-09-29T09:42:45Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-28T18:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=36edf7bad2ab76720a0bf6519074d23d4b8823a7'/>
<id>urn:sha1:36edf7bad2ab76720a0bf6519074d23d4b8823a7</id>
<content type='text'>
ls prints inode numbers two ways: for long (-l) listings,
and for short ones, e.g., ls -li and ls -i.  The code to print
long listings properly printed "?" when the inode was unknown,
but the code for handling short listings would print 0 instead.
Factor out the formatting code into a new function so ls prints
the right string ("?") from both places:
* NEWS (Bug fixes): Mention it.
* src/ls.c (format_inode): New function.
(print_long_format): Use it here.
(print_file_name_and_frills): Use it here, too.
* tests/ls/dangle: Exercise this fix.
Reported by Yang Ren in http://bugzilla.redhat.com/525400
</content>
</entry>
<entry>
<title>ls: with -LR, exit with status 2 upon detecting a cycle</title>
<updated>2009-09-29T05:28:39Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-28T16:29:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=242689c7f93de72693979f877dd31b3ef7178eea'/>
<id>urn:sha1:242689c7f93de72693979f877dd31b3ef7178eea</id>
<content type='text'>
* src/ls.c (print_dir): Diagnosing the cycle is not enough.
Also set exit status to 2.  This is what Solaris' /bin/ls does, too.
* tests/ls/infloop: Rework test: match both expected stdout and stderr.
Require an exit status of 2 in this case.
* doc/coreutils.texi (ls invocation): Mention that a loop provokes
in an exit status of 2.
* NEWS (Bug fixes): Mention it.
Reported by Yang Ren in http://bugzilla.redhat.com/525402.
* THANKS: Correct ordering of Yang Ren's names.
</content>
</entry>
<entry>
<title>maint: Use logical rather than bitwise operators on bools</title>
<updated>2009-09-23T13:33:40Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-23T09:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a037e838e15c9a698f1634398e0fe2726398d575'/>
<id>urn:sha1:a037e838e15c9a698f1634398e0fe2726398d575</id>
<content type='text'>
This is because bitwise operators are:
- confusing and inconsistent in a boolean context
- non short circuiting
- brittle in C89 where bool can be an int (so &gt; 1)
</content>
</entry>
<entry>
<title>doc: ls: further improve --help message re --color</title>
<updated>2009-09-23T07:11:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-22T18:53:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=38f1c2006eb975f28567a7495faac07e7c44de02'/>
<id>urn:sha1:38f1c2006eb975f28567a7495faac07e7c44de02</id>
<content type='text'>
* src/ls.c (usage): Correct grammar, change voice, shorten.
Inspired by a report from Bruno Schulenberg.
</content>
</entry>
<entry>
<title>ls: fix a performance regression</title>
<updated>2009-09-22T09:07:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-22T09:06:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8c92bb3441c628fe87ccf4a946b1c8b14cb0a0d2'/>
<id>urn:sha1:8c92bb3441c628fe87ccf4a946b1c8b14cb0a0d2</id>
<content type='text'>
* src/ls.c (print_color_indicator): This reinstates commit f3f1ccfd,
21-10-2008, "ls: make it possible to disable file capabilities checking"
which was inadvertently reverted with commit 3a169f4c, 14-09-2009,
"ls: handle disabling of colors consistently ...".
</content>
</entry>
<entry>
<title>doc: ls: add an article, "the"</title>
<updated>2009-09-21T13:30:38Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-21T12:28:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=fee869488654c5b971d27d5e2c6a057c947263d1'/>
<id>urn:sha1:fee869488654c5b971d27d5e2c6a057c947263d1</id>
<content type='text'>
* src/ls.c (usage): Tweak wording.
</content>
</entry>
<entry>
<title>ls: handle disabling of colors consistently for all tile types</title>
<updated>2009-09-21T12:16:44Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-14T12:37:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3a169f4c5d9159283548178668d2fae6fced3030'/>
<id>urn:sha1:3a169f4c5d9159283548178668d2fae6fced3030</id>
<content type='text'>
* src/ls.c (print_color_indicator): Use consistent syntax for
all file and directory subtypes, and fall back to the color
of the base type if there is no enabled color for the subtype.
This allows turning off specific colors for o+w dirs for example.
* tests/ls/color-dtype-dir: Add a case to test that turning off
coloring for o+w directories, falls back to standard dir color.
* NEWS: Mention the fix
Introduced by commit ac467814, 2005-09-05,
"Colorize set-user-ID ... files and sticky ... directories."
</content>
</entry>
<entry>
<title>doc: ls: make help for --color more concise and accurate</title>
<updated>2009-09-21T11:44:35Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-09-10T07:00:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=29ec834c3b076dbc1bd160ef780a58f5b086ce13'/>
<id>urn:sha1:29ec834c3b076dbc1bd160ef780a58f5b086ce13</id>
<content type='text'>
* src/ls.c (usage): Shorten the --color ancillary info by
two lines, while replacing --color=none with --color=never.
Mention "always" is the default parameter of the --color option,
along with the primary help for that option.
Mention the ancillary --color info in the --color primary help.
</content>
</entry>
</feed>
