summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-07-25 15:12:26 +0000
committerJim Meyering <jim@meyering.net>2006-07-25 15:12:26 +0000
commit1827b515aa666ad00637e3455c67bc41dd056f3e (patch)
treeb5cecc9ef4bac021bb846ce4ed21e97480118bce
parentccb1883fcd243433c4d36e94165cc4730ce7a576 (diff)
downloadcoreutils-1827b515aa666ad00637e3455c67bc41dd056f3e.tar.xz
* src/ls.c [enum filetype] (command_line): Remove member. Not needed.
Replace all occurrences of "type == command_line" with the equivalent, "command_line_arg".
-rw-r--r--ChangeLog4
-rw-r--r--src/ls.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e143aa215..efa9008d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-07-25 Jim Meyering <jim@meyering.net>
+ * src/ls.c [enum filetype] (command_line): Remove member. Not needed.
+ Replace all occurrences of "type == command_line" with the
+ equivalent, "command_line_arg".
+
* src/ls.c: Apply the stat-failed parts of Red Hat's
coreutils-selinux.patch. From Ulrich Drepper.
This makes it so files not mentioned on the command line (e.g.,
diff --git a/src/ls.c b/src/ls.c
index f32c26ddc..30aad77d3 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -163,8 +163,7 @@ enum filetype
symbolic_link DT_INIT (DT_LNK),
sock DT_INIT (DT_SOCK),
arg_directory DT_INIT (2 * (DT_UNKNOWN | DT_FIFO | DT_CHR | DT_DIR | DT_BLK
- | DT_REG | DT_LNK | DT_SOCK)),
- command_line
+ | DT_REG | DT_LNK | DT_SOCK))
};
struct fileinfo
@@ -1263,7 +1262,7 @@ main (int argc, char **argv)
}
else
do
- gobble_file (argv[i++], command_line, NOT_AN_INODE_NUMBER, true, "");
+ gobble_file (argv[i++], unknown, NOT_AN_INODE_NUMBER, true, "");
while (i < argc);
if (files_index)
@@ -2549,7 +2548,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
|| (dereference == DEREF_ALWAYS
&& (type == symbolic_link || type == unknown))))
|| (format_needs_type
- && (type == unknown || type == command_line
+ && (type == unknown || command_line_arg
/* --indicator-style=classify (aka -F)
requires that we stat each regular file
to see if it's executable. */
@@ -2615,7 +2614,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
/* We treat stat failures for files the user named special.
There is no guarantee that these files really exist so
we do not print any information. */
- if (type == command_line)
+ if (command_line_arg)
{
file_failure (1, "%s", absolute_name);
return 0;