summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/lndir/lndir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/lndir/lndir.c b/usr.bin/lndir/lndir.c
index e8ccefd5f36..ccc27a67a56 100644
--- a/usr.bin/lndir/lndir.c
+++ b/usr.bin/lndir/lndir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lndir.c,v 1.7 2002/02/16 21:27:47 millert Exp $ */
+/* $OpenBSD: lndir.c,v 1.8 2002/03/28 02:36:03 form Exp $ */
/* $XConsortium: lndir.c /main/15 1995/08/30 10:56:18 gildea $ */
/*
@@ -119,17 +119,17 @@ main (argc, argv)
/* to directory */
if (stat(tn, &ts) < 0)
- errx(1, "%s", tn);
+ err(1, "%s", tn);
if (!(S_ISDIR(ts.st_mode)))
- errx(2, "%s: Not a directory", tn);
+ errx(2, "%s: %s", tn, strerror(ENOTDIR));
if (chdir(tn) < 0)
- errx(1, "%s", tn);
+ err(1, "%s", tn);
/* from directory */
if (stat(fn, &fs) < 0)
- errx(1, "%s", fn);
+ err(1, "%s", fn);
if (!(S_ISDIR(fs.st_mode)))
- errx(2, "%s: Not a directory", fn);
+ err(2, "%s: %s", fn, strerror(ENOTDIR));
exit(dodir (fn, &fs, &ts, 0));
}
@@ -158,10 +158,10 @@ addexcept(name)
new = (struct except *)malloc(sizeof(struct except));
if (new == (struct except *)NULL)
- errx(1, "addexcept");
+ err(1, "addexcept");
new->name = strdup(name);
if (new->name == (char *)NULL)
- errx(1, "addexcept");
+ err(1, "addexcept");
new->next = exceptions;
exceptions = new;
@@ -267,7 +267,7 @@ dodir(fn, fs, ts, rel)
}
dodir(buf, &sb, &sc, (buf[0] != '/'));
if (chdir ("..") < 0)
- errx (1, "..");
+ err (1, "..");
curdir = rcurdir = ocurdir;
continue;
}