Lines Matching refs:disk
85 struct disk_info *disk = NULL;
176 * If there was only 1 disk on the command line, mark it
177 * to be the current disk. If it wasn't found, it's an error.
180 disk = disk_list;
181 if (disk == NULL) {
182 err_print("Unable to find specified disk '%s'.\n",
188 * A disk was forced on the command line.
193 * be the current disk.
195 for (disk = disk_list; disk != NULL; disk = disk->disk_next)
196 if (diskname_match(option_d, disk))
201 if (disk == NULL) {
202 err_print("Unable to find specified disk '%s'.\n",
208 * A disk type was forced on the command line.
212 * Only legal if a disk was also forced.
214 if (disk == NULL) {
215 err_print("Must specify disk as well as type.\n");
218 oldtype = disk->disk_type;
221 * for the disk.
223 for (type = disk->disk_ctlr->ctlr_ctype->ctype_dlist;
237 * in the disk label, update the type and nullify the
241 disk->disk_type = type;
242 disk->disk_parts = NULL;
250 * Only legal if both disk and type were also forced.
252 if (disk == NULL || disk->disk_type == NULL) {
253 err_print("Must specify disk and type as well ");
261 for (parts = disk->disk_type->dtype_plist; parts != NULL;
276 disk->disk_parts = parts;
279 * If a disk was marked to become current, initialize the state
282 if (disk != NULL) {
283 init_globals(disk);
292 * if -f command-file is specified, check for disk and disktype
298 err_print("Must specify a disk using -d option.\n");
302 err_print("Must specify disk as well as type.\n");
322 * current disk. There are a zillion state variables that store
323 * information on the current disk, and they must all be updated.
324 * We also tell SunOS about the disk, since it may not know if the
325 * disk wasn't labeled at boot time.
328 init_globals(disk)
329 struct disk_info *disk;
340 * If there was an old current disk, close the file for it.
361 * Fill in the hardware struct pointers for the new disk.
363 cur_disk = disk;
373 * Open a file for the new disk.
378 "Error: can't open selected disk '%s'.\n", cur_disk->disk_name);
383 * If the new disk uses bad-144, initialize the bad block table.
394 * If the type of the new disk is known...
399 * If need disk specs, prompt for undefined disk
426 * out with scan set for the whole disk. Note,
447 * Tell the user which disk (s)he selected.
473 * If the disk does BAD-144, we do an ioctl to
483 fmt_print("[disk formatted");
497 fmt_print("[disk unformatted]");
523 fmt_print("[disk unformatted");
534 * user we don't know what type the disk is.
543 * disk. If there are, print a warning.
565 * Since we can locate the backup label by disk capacity,
577 "Note: capacity in disk label is smaller than the real disk capacity.\n\
585 * Prompt for some undefined disk characteristics.
586 * Used when there is no disk definition, but the
587 * disk has a valid label, so basically we're
594 * The need_spefs flag is used to tell us that this disk