diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2003-06-28 22:30:46 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2003-06-28 22:30:46 +0000 |
commit | 73e57b801f838815af23e40718634893640031d2 (patch) | |
tree | f1811295ed36d40db4812c58effbc5c205cf29c2 /usr.bin | |
parent | e84d313489f04bbb7a820bd6996d3a683dccb73d (diff) | |
download | src-73e57b801f838815af23e40718634893640031d2.tar.gz src-73e57b801f838815af23e40718634893640031d2.zip |
Synchronize usage() and SYNOPSIS, and fix them (flags are not
optional here). Sort options. Print the file name on error.
Notes
Notes:
svn path=/head/; revision=117009
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/elfdump/elfdump.1 | 6 | ||||
-rw-r--r-- | usr.bin/elfdump/elfdump.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/elfdump/elfdump.1 b/usr.bin/elfdump/elfdump.1 index f310cdb894fb..c159c7db7948 100644 --- a/usr.bin/elfdump/elfdump.1 +++ b/usr.bin/elfdump/elfdump.1 @@ -34,7 +34,7 @@ files .Sh SYNOPSIS .Nm -.Op Fl a | cdeiGhnprs +.Fl a | cdeGhinprs .Op Fl w Ar file .Ar file .Sh DESCRIPTION @@ -55,12 +55,12 @@ Dump shared headers. Dump dynamic symbols. .It Fl e Dump ELF header. -.It Fl i -Dump the dynamic interpreter. .It Fl G Dump the GOT. .It Fl h Dump the hash values. +.It Fl i +Dump the dynamic interpreter. .It Fl n Dump note sections. .It Fl p diff --git a/usr.bin/elfdump/elfdump.c b/usr.bin/elfdump/elfdump.c index fd92c2db8134..89b24e909830 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); } |