Lines Matching defs:disk

74 #include <sys/disk.h>
111 static void read_label(struct sun_disklabel *sl, const char *disk);
112 static void write_label(struct sun_disklabel *sl, const char *disk,
114 static void edit_label(struct sun_disklabel *sl, const char *disk,
117 static void print_label(struct sun_disklabel *sl, const char *disk, FILE *out);
166 const char *disk;
217 disk = av[0];
221 read_label(&sl, disk);
226 write_label(&sl, disk, bootpath);
230 read_label(&sl, disk);
232 errx(1, "%s%s has no sun disklabel", _PATH_DEV, disk);
233 edit_label(&sl, disk, bootpath);
238 read_label(&sl, disk);
241 write_label(&sl, disk, bootpath);
243 read_label(&sl, disk);
245 errx(1, "%s%s has no sun disklabel", _PATH_DEV, disk);
246 write_label(&sl, disk, bootpath);
248 read_label(&sl, disk);
250 errx(1, "%s%s has no sun disklabel", _PATH_DEV, disk);
251 print_label(&sl, disk, stdout);
275 "whole disk");
289 warnx("partition %c extends past end of disk",
329 read_label(struct sun_disklabel *sl, const char *disk)
337 snprintf(path, sizeof(path), "%s%s", _PATH_DEV, disk);
345 err(1, "%s: ioctl(DIOCGMEDIASIZE) failed", disk);
348 err(1, "%s: DIOCGSECTORSIZE failed", disk);
395 write_label(struct sun_disklabel *sl, const char *disk, const char *bootpath)
416 print_label(sl, disk, stdout);
429 snprintf(path, sizeof(path), "%s%s", _PATH_DEV, disk);
435 gctl_ro_param(grq, "geom", -1, disk);
445 gctl_ro_param(grq, "geom", -1, disk);
481 edit_label(struct sun_disklabel *sl, const char *disk, const char *bootpath)
496 print_label(sl, disk, fp);
514 write_label(sl, disk, bootpath);
570 * emulated by this disk.
771 print_label(struct sun_disklabel *sl, const char *disk, FILE *out)
787 disk,
822 "# disk.\n",
877 "\t%s [-r] [-c | -h] disk\n"
879 "\t%s -B [-b boot1] [-n] disk\n"
881 "\t%s -R [-B [-b boot1]] [-r] [-n] [-c] disk protofile\n"
883 "\t%s -e [-B [-b boot1]] [-r] [-n] [-c] disk\n"
885 "\t%s -w [-B [-b boot1]] [-r] [-n] disk type\n"