summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-04-17 23:23:11 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-04-17 23:23:11 +0000
commit58d7770a00136e44ec9598a46c3972a03ffbea24 (patch)
tree2dd99a0a2bb3df0072bb9e0fcd44f282d4962697 /src/ls.c
parent137de3d3b6b79c19088e0c15c0157a26dd1dcd57 (diff)
downloadcoreutils-58d7770a00136e44ec9598a46c3972a03ffbea24.tar.xz
(HAVE_ST_DM_MODE): Remove; moved to ../lib/filemode.c.
(print_long_format): Use (new) filemodestring rather than (old) mode_string, so that we get more file types right, at least in theory. Adjust to filemode changes.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/ls.c b/src/ls.c
index 42d6ad057..5c0335a9f 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -152,13 +152,6 @@ int wcwidth ();
# define st_author st_uid
#endif
-/* Cray/Unicos DMF: use the file's migrated, not real, status */
-#if HAVE_ST_DM_MODE
-# define ST_DM_MODE(Stat_buf) ((Stat_buf).st_dm_mode)
-#else
-# define ST_DM_MODE(Stat_buf) ((Stat_buf).st_mode)
-#endif
-
enum filetype
{
unknown DT_INIT (DT_UNKNOWN),
@@ -3270,13 +3263,13 @@ print_long_format (const struct fileinfo *f)
struct timespec when_timespec;
struct tm *when_local;
- /* Compute mode string. On most systems, it's based on st_mode.
- On systems with migration (via the stat.st_dm_mode field), use
- the file's migrated status. */
- mode_string (ST_DM_MODE (f->stat), modebuf);
-
- modebuf[10] = (FILE_HAS_ACL (f) ? '+' : ' ');
- modebuf[10 + any_has_acl] = '\0';
+ /* Compute the mode string, except remove the trailing space if no
+ files in this directory have ACLs. */
+ filemodestring (&f->stat, modebuf);
+ if (! any_has_acl)
+ modebuf[10] = '\0';
+ else if (FILE_HAS_ACL (f))
+ modebuf[10] = '+';
switch (time_type)
{