Sync manpage's synopsis with usage().
This commit is contained in:
parent
c9b8d77d80
commit
9137d52af5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127610
@ -36,8 +36,7 @@
|
|||||||
.Nd get information about disk device
|
.Nd get information about disk device
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm
|
.Nm
|
||||||
.Op Fl v
|
.Op Fl tv
|
||||||
.Op Fl t
|
|
||||||
.Ar disk ...
|
.Ar disk ...
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
The
|
The
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "Usage: diskinfo [-tv]\n");
|
fprintf(stderr, "usage: diskinfo [-tv] disk ...\n");
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +73,9 @@ main(int argc, char **argv)
|
|||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
|
if (argc < 1)
|
||||||
|
usage();
|
||||||
|
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
fd = open(argv[i], O_RDONLY);
|
fd = open(argv[i], O_RDONLY);
|
||||||
if (fd < 0 && errno == ENOENT && *argv[i] != '/') {
|
if (fd < 0 && errno == ENOENT && *argv[i] != '/') {
|
||||||
|
Loading…
Reference in New Issue
Block a user