Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/diskinfo/diskinfo.c
Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Lines | if (!opt_v) { | ||||
printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors); | printf("\t%-12u\t# Sectors according to firmware.\n", fwsectors); | ||||
} | } | ||||
strlcpy(arg.name, "GEOM::descr", sizeof(arg.name)); | strlcpy(arg.name, "GEOM::descr", sizeof(arg.name)); | ||||
arg.len = sizeof(arg.value.str); | arg.len = sizeof(arg.value.str); | ||||
if (ioctl(fd, DIOCGATTR, &arg) == 0) | if (ioctl(fd, DIOCGATTR, &arg) == 0) | ||||
printf("\t%-12s\t# Disk descr.\n", arg.value.str); | printf("\t%-12s\t# Disk descr.\n", arg.value.str); | ||||
if (ioctl(fd, DIOCGIDENT, ident) == 0) | if (ioctl(fd, DIOCGIDENT, ident) == 0) | ||||
printf("\t%-12s\t# Disk ident.\n", ident); | printf("\t%-12s\t# Disk ident.\n", ident); | ||||
strlcpy(arg.name, "GEOM::attachment", sizeof(arg.name)); | |||||
arg.len = sizeof(arg.value.str); | |||||
if (ioctl(fd, DIOCGATTR, &arg) == 0) | |||||
printf("\t%-12s\t# Attachment\n", arg.value.str); | |||||
if (ioctl(fd, DIOCGPHYSPATH, physpath) == 0) | if (ioctl(fd, DIOCGPHYSPATH, physpath) == 0) | ||||
printf("\t%-12s\t# Physical path\n", physpath); | printf("\t%-12s\t# Physical path\n", physpath); | ||||
printf("\t%-12s\t# TRIM/UNMAP support\n", | printf("\t%-12s\t# TRIM/UNMAP support\n", | ||||
candelete(fd) ? "Yes" : "No"); | candelete(fd) ? "Yes" : "No"); | ||||
rotationrate(fd, rrate, sizeof(rrate)); | rotationrate(fd, rrate, sizeof(rrate)); | ||||
printf("\t%-12s\t# Rotation rate in RPM\n", rrate); | printf("\t%-12s\t# Rotation rate in RPM\n", rrate); | ||||
if (zoned != 0) | if (zoned != 0) | ||||
printf("\t%-12s\t# Zone Mode\n", zone_desc); | printf("\t%-12s\t# Zone Mode\n", zone_desc); | ||||
▲ Show 20 Lines • Show All 488 Lines • Show Last 20 Lines |