<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/ls.c, 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-05-12T14:19:38Z</updated>
<entry>
<title>ls: color each symlink-to-relative-name in / properly</title>
<updated>2012-05-12T14:19:38Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-05-10T17:43:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=6124a3842dfa8484b52e067a8ab8105c3875a4f7'/>
<id>urn:sha1:6124a3842dfa8484b52e067a8ab8105c3875a4f7</id>
<content type='text'>
In order for ls --color to color each symlink, it must form the name
of each referent and then stat it to see if the link is dangling, to
a directory, to a file, etc.  When the symlink is to a relative name,
ls must concatenate the starting directory name and that relative name.
When, in addition, the starting directory was "/" or "/some-name",
the result was ill-formed, and the subsequent stat would usually fail,
making the caller color it as a dangling symlink.
* src/ls.c (make_link_name): Don't botch the case in which
dir_name(NAME) == "/" and LINKNAME is relative.
* tests/ls/root-rel-symlink-color: New file.  Test for the above.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
Reported by Mike Frysinger in http://bugs.gnu.org/11453
Bug introduced by commit v8.16-23-gbcb9078.
</content>
</entry>
<entry>
<title>maint: adjust comments to avoid FP match on binary-operator-at-EOL</title>
<updated>2012-05-02T08:31:53Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-30T08:55:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=57e0a882ef70712f79e7255aa5c1f8ba27b4c33e'/>
<id>urn:sha1:57e0a882ef70712f79e7255aa5c1f8ba27b4c33e</id>
<content type='text'>
* src/ls.c (print_long_format): Reformat comment to avoid "=="
at end of line.
Also, "sortkey" is not a word: s/sortkey/sort key/.
* src/ioblksize.h: Likewise, for "|" from a shell snippet.
* src/runcon.c: Likewise, for "|" in grammar-like usage.
</content>
</entry>
<entry>
<title>maint: ls: use stpncpy/stpcpy, not strncpy/strcpy</title>
<updated>2012-04-19T11:10:36Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-18T12:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bcb9078e380d81be62e8df00c45afc2f57392dc2'/>
<id>urn:sha1:bcb9078e380d81be62e8df00c45afc2f57392dc2</id>
<content type='text'>
* src/ls.c (gobble_file): Move a decl "down".
(make_link_name): Do not hard-code '/'.  Use IS_ABSOLUTE_FILE_NAME
and dir_len instead.
Use stpcpy/stpncpy in place of strncpy/strcpy.
</content>
</entry>
<entry>
<title>maint: modernize/clean-up a small function in ls.c</title>
<updated>2012-04-19T11:10:36Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-04-18T11:36:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=280aa28c4dc82f394d423bfceaac29b5b48c3cd2'/>
<id>urn:sha1:280aa28c4dc82f394d423bfceaac29b5b48c3cd2</id>
<content type='text'>
* src/ls.c (make_link_name): Adjust comment style to refer to VARIABLE
names, not 'variable'.
Move each of two declarations "down" to first use.
Compare pointer to NULL, not to 0.
Don't reuse local, "linkbuf" for a different purpose.
</content>
</entry>
<entry>
<title>ls: adjust errnos indicating device non support for xattrs</title>
<updated>2012-02-20T12:41:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2012-02-20T12:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7f48aa570d93347aa72d86a034e36377db6a22b9'/>
<id>urn:sha1:7f48aa570d93347aa72d86a034e36377db6a22b9</id>
<content type='text'>
* src/ls.c (errno_unsupported): Remove EBUSY, as this caters for
the case where ACLs can't be accessed because the _file_ is locked.
http://lists.gnu.org/archive/html/bug-coreutils/2005-06/msg00191.html
Also ENOENT is not safe to include as you get that if the _file_
is removed between the stat() and subsequent querying of xattrs.
</content>
</entry>
<entry>
<title>ls: cache ACL- and CAP-querying syscall failures</title>
<updated>2012-02-18T09:26:10Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-02-13T11:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8ca2b9659d4fae1d968b8bd4e00fcee7d9d75356'/>
<id>urn:sha1:8ca2b9659d4fae1d968b8bd4e00fcee7d9d75356</id>
<content type='text'>
Like the optimization to avoid always-failing getfilecon calls,
this change avoids always-failing queries for whether a file has
a nontrivial ACL and for whether a file has certain "capabilities".
When such a query fails for one file (indicating no support), we know it
will always fail that way for the affected device.  With this change, we
have thus eliminated nearly all failing-unsupported getxattr syscalls.
* src/ls.c (has_capability) [!HAVE_CAP]: Set errno to ENOTSUP.
(errno_unsupported): Expand the list of E* errno values to match
that of lib/acl-internal.h's ACL_NOT_WELL_SUPPORTED macro.
(file_has_acl_cache, has_capability_cache): New functions.
(gobble_file): Use them in place of non-caching ones.
* NEWS (Improvements): Mention it.
Suggested by Sven Breuner in
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2187
While eliminating most getfilecon calls saved about 33%,
eliminating these other calls can save almost all of the
remaining ~67% cost, on some remote file systems.
</content>
</entry>
<entry>
<title>ls: optimize for when getfilecon would often fail (~33% perf. gain)</title>
<updated>2012-02-18T09:26:10Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-02-11T11:36:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9f237a03c039eb9d71a16e93119dc1fc56152dd6'/>
<id>urn:sha1:9f237a03c039eb9d71a16e93119dc1fc56152dd6</id>
<content type='text'>
On systems or file systems without SELinux support, all getfilecon
and lgetfilecon calls would fail due to lack of support.  We can non-
invasively cache such failure (on most recently accessed device) and
avoid the vast majority of the failing underlying getxattr syscalls.
* src/ls.c (errno_unsupported): New function.
(selinux_challenged_device): New file-scoped global.
(getfilecon_cache, lgetfilecon_cache): New error-caching wrapper
functions.
(gobble_file): Use the caching wrappers, for when many *getfilecon
calls would fail with ENOTSUP or EOPNOTSUPP.
Suggested by Sven Breuner in
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2187
Improved-by: Pádraig Brady.
</content>
</entry>
<entry>
<title>maint: use single copyright year range</title>
<updated>2012-01-27T10:35:24Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-27T10:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d7878454cd02518959b0d6036db3a5b6ff00ca57'/>
<id>urn:sha1:d7878454cd02518959b0d6036db3a5b6ff00ca57</id>
<content type='text'>
Run "make update-copyright".
</content>
</entry>
<entry>
<title>maint: quote 'like this' or "like this", not `like this'</title>
<updated>2012-01-22T23:26:38Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2012-01-22T23:26:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=80bc8651fd6b0a41be00ab4ee82e920287b15cbc'/>
<id>urn:sha1:80bc8651fd6b0a41be00ab4ee82e920287b15cbc</id>
<content type='text'>
* doc/coreutils.texi (Formatting the file names):
coreutils now quotes 'like this'.
* man/help2man:
* src/timeout.c (usage): Quote 'like this' in diagnostics.
* HACKING, Makefile.am, NEWS, README, README-hacking, TODO, cfg.mk:
* doc/Makefile.am, doc/coreutils.texi, m4/jm-macros.m4:
* man/Makefile.am, man/help2man, src/Makefile.am, src/copy.h:
* src/extract-magic, src/ls.c, src/pinky.c, src/pr.c, src/sort.c:
* src/split.c, src/timeout.c, src/who.c, tests/dd/skip-seek-past-file:
* tests/pr/pr-tests: Quote 'like this' in commentary.
* cfg.mk (old_NEWS_hash): Update due to changed old NEWS.
</content>
</entry>
<entry>
<title>maint: src/*.[ch]: convert more `...' to '...'</title>
<updated>2012-01-09T20:51:59Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2012-01-08T20:03:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3ba8b044267a5f7cfa8a7b0d7f19dab3f21431da'/>
<id>urn:sha1:3ba8b044267a5f7cfa8a7b0d7f19dab3f21431da</id>
<content type='text'>
Run this (twice):
  git grep -E -l '`.+'\' src/*.[ch] \
    |xargs perl -pi -e 's/`(.+?'\'')/'\''$1/'
</content>
</entry>
</feed>
