Don't bother obtaining the ident if we are not going to print it.
This commit is contained in:
parent
1219197b46
commit
18e5fe2840
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196799
@ -104,9 +104,6 @@ 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);
|
||||||
@ -133,7 +130,7 @@ 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')
|
if (ioctl(fd, DIOCGIDENT, ident) == 0)
|
||||||
printf("\t%-12s\t# Disk ident.\n", ident);
|
printf("\t%-12s\t# Disk ident.\n", ident);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user