aboutsummaryrefslogtreecommitdiff
path: root/bin/ls/print.c
diff options
context:
space:
mode:
authorTim J. Robbins <tjr@FreeBSD.org>2002-11-06 01:18:12 +0000
committerTim J. Robbins <tjr@FreeBSD.org>2002-11-06 01:18:12 +0000
commite09fdabddff1c2a435ff71102df45e80fb0cbaa6 (patch)
tree70cbdb64f034ded5fb88c653a9dbe203f981a3c2 /bin/ls/print.c
parent364bf7afb273f4a0c14f08ff3c25991ff412367d (diff)
downloadsrc-e09fdabddff1c2a435ff71102df45e80fb0cbaa6.tar.gz
src-e09fdabddff1c2a435ff71102df45e80fb0cbaa6.zip
Use warn() instead of perror() or fprintf() where appropriate.
Notes
Notes: svn path=/head/; revision=106479
Diffstat (limited to 'bin/ls/print.c')
-rw-r--r--bin/ls/print.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c
index c09e1d6ad289..841270bbb2e9 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -558,10 +558,9 @@ parsecolors(const char *cs)
if (c[j] >= '0' && c[j] <= '7') {
colors[i].num[j] = c[j] - '0';
if (!legacy_warn) {
- fprintf(stderr,
- "warn: LSCOLORS should use "
+ warnx("LSCOLORS should use "
"characters a-h instead of 0-9 ("
- "see the manual page)\n");
+ "see the manual page)");
}
legacy_warn = 1;
} else if (c[j] >= 'a' && c[j] <= 'h')
@@ -572,9 +571,8 @@ parsecolors(const char *cs)
} else if (tolower((unsigned char)c[j] == 'x'))
colors[i].num[j] = -1;
else {
- fprintf(stderr,
- "error: invalid character '%c' in LSCOLORS"
- " env var\n", c[j]);
+ warnx("invalid character '%c' in LSCOLORS"
+ " env var", c[j]);
colors[i].num[j] = -1;
}
}