summaryrefslogtreecommitdiffstats
path: root/usr.bin/elfdump/elfdump.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-06-28 22:30:46 +0000
committerru <ru@FreeBSD.org>2003-06-28 22:30:46 +0000
commitbff3635b312638461e1292b9a3c0427ce7b727f9 (patch)
treef1811295ed36d40db4812c58effbc5c205cf29c2 /usr.bin/elfdump/elfdump.c
parent931338543684c8280f1ecd1d2a2eb4fd7c88b02c (diff)
downloadFreeBSD-src-bff3635b312638461e1292b9a3c0427ce7b727f9.zip
FreeBSD-src-bff3635b312638461e1292b9a3c0427ce7b727f9.tar.gz
Synchronize usage() and SYNOPSIS, and fix them (flags are not
optional here). Sort options. Print the file name on error.
Diffstat (limited to 'usr.bin/elfdump/elfdump.c')
-rw-r--r--usr.bin/elfdump/elfdump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/elfdump/elfdump.c b/usr.bin/elfdump/elfdump.c
index fd92c2d..89b24e9 100644
--- a/usr.bin/elfdump/elfdump.c
+++ b/usr.bin/elfdump/elfdump.c
@@ -441,7 +441,7 @@ main(int ac, char **av)
usage();
if ((fd = open(*av, O_RDONLY)) < 0 ||
fstat(fd, &sb) < 0)
- err(1, NULL);
+ err(1, "%s", *av);
e = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (e == MAP_FAILED)
err(1, NULL);
@@ -1109,6 +1109,6 @@ elf_get_quad(Elf32_Ehdr *e, void *base, elf_member_t member)
void
usage(void)
{
- fprintf(stderr, "usage: elfdump [-acdeiGhnprs] [-w file] filename\n");
+ fprintf(stderr, "usage: elfdump -a | -cdeGhinprs [-w file] file\n");
exit(1);
}
OpenPOWER on IntegriCloud