Synchronize usage() and SYNOPSIS, and fix them (flags are not

optional here).  Sort options.  Print the file name on error.
This commit is contained in:
Ruslan Ermilov 2003-06-28 22:30:46 +00:00
parent e84d313489
commit 73e57b801f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117009
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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);
}