Lines Matching refs:dev
8 static void dump_dev_size(int dev) in dump_dev_size() argument
11 if (ioctl(dev, B_GET_DEVICE_SIZE, &sz, sizeof(sz)) < 0) { in dump_dev_size()
18 static void dump_bios_id(int dev) in dump_bios_id() argument
21 if (ioctl(dev, B_GET_BIOS_DRIVE_ID, &id, sizeof(id)) < 0) { in dump_bios_id()
28 static void dump_media_status(int dev) in dump_media_status() argument
31 if (ioctl(dev, B_GET_MEDIA_STATUS, &st, sizeof(st)) < 0) { in dump_media_status()
53 static void dump_geom(int dev, bool bios) in dump_geom() argument
57 if (ioctl(dev, bios?B_GET_BIOS_GEOMETRY:B_GET_GEOMETRY, &geom, sizeof(geom)) < 0) { in dump_geom()
72 static void dump_partition(int dev) in dump_partition() argument
76 if (ioctl(dev, B_GET_PARTITION_INFO, &partition, sizeof(partition)) < 0) { in dump_partition()
89 static void dump_misc(int dev) in dump_misc() argument
92 if (ioctl(dev, B_GET_DRIVER_FOR_DEVICE, path, sizeof(path)) < 0) { in dump_misc()
98 if (ioctl(dev, B_GET_PATH_FOR_DEVICE, path, sizeof(path)) < 0) { in dump_misc()
108 int dev; in main() local
113 dev = open(argv[1], O_RDONLY); in main()
114 if (dev < 0) { in main()
118 dump_dev_size(dev); in main()
120 dump_bios_id(dev); in main()
122 dump_media_status(dev); in main()
124 dump_geom(dev, false); in main()
126 dump_geom(dev, true); in main()
128 dump_partition(dev); in main()
130 dump_misc(dev); in main()