Print provider's ident when in verbose mode.
This commit is contained in:
parent
f64462a8f2
commit
f4c884f8df
@ -57,7 +57,7 @@ int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int i, ch, fd, error;
|
||||
char buf[BUFSIZ];
|
||||
char buf[BUFSIZ], ident[DISK_IDENT_SIZE];
|
||||
off_t mediasize;
|
||||
u_int sectorsize, fwsectors, fwheads;
|
||||
|
||||
@ -104,6 +104,9 @@ main(int argc, char **argv)
|
||||
error = ioctl(fd, DIOCGFWHEADS, &fwheads);
|
||||
if (error)
|
||||
fwheads = 0;
|
||||
error = ioctl(fd, DIOCGIDENT, ident);
|
||||
if (error)
|
||||
ident[0] = '\0';
|
||||
if (!opt_v) {
|
||||
printf("%s", argv[i]);
|
||||
printf("\t%u", sectorsize);
|
||||
@ -130,6 +133,8 @@ main(int argc, char **argv)
|
||||
printf("\t%-12u\t# Heads according to firmware.\n", fwheads);
|
||||
printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors);
|
||||
}
|
||||
if (ident[0] != '\0')
|
||||
printf("\t%-12s\t# Disk ident.\n", ident);
|
||||
}
|
||||
printf("\n");
|
||||
if (opt_c)
|
||||
|
Loading…
Reference in New Issue
Block a user