Print provider's ident when in verbose mode.
This commit is contained in:
parent
6114cd961a
commit
c5791aae52
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169296
@ -57,7 +57,7 @@ int
|
|||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int i, ch, fd, error;
|
int i, ch, fd, error;
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ], ident[DISK_IDENT_SIZE];
|
||||||
off_t mediasize;
|
off_t mediasize;
|
||||||
u_int sectorsize, fwsectors, fwheads;
|
u_int sectorsize, fwsectors, fwheads;
|
||||||
|
|
||||||
@ -104,6 +104,9 @@ main(int argc, char **argv)
|
|||||||
error = ioctl(fd, DIOCGFWHEADS, &fwheads);
|
error = ioctl(fd, DIOCGFWHEADS, &fwheads);
|
||||||
if (error)
|
if (error)
|
||||||
fwheads = 0;
|
fwheads = 0;
|
||||||
|
error = ioctl(fd, DIOCGIDENT, ident);
|
||||||
|
if (error)
|
||||||
|
ident[0] = '\0';
|
||||||
if (!opt_v) {
|
if (!opt_v) {
|
||||||
printf("%s", argv[i]);
|
printf("%s", argv[i]);
|
||||||
printf("\t%u", sectorsize);
|
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# Heads according to firmware.\n", fwheads);
|
||||||
printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors);
|
printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors);
|
||||||
}
|
}
|
||||||
|
if (ident[0] != '\0')
|
||||||
|
printf("\t%-12s\t# Disk ident.\n", ident);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
if (opt_c)
|
if (opt_c)
|
||||||
|
Loading…
Reference in New Issue
Block a user