Lines Matching defs:map

140 get_drive_geometry (struct geometry *geom, char **map, int drive)
146 fd = open (map[drive], O_RDONLY);
522 read_device_map (FILE *fp, char **map, const char *map_file)
542 /* If there is the device map file, use the data in it instead of
627 if (map[drive])
633 map[drive] = strdup (ptr);
634 assert (map[drive]);
640 /* Initialize the device map MAP. *MAP will be allocated from the heap
647 init_device_map (char ***map, const char *map_file, int floppy_disks)
653 assert (map);
654 assert (*map == 0);
655 *map = malloc (NUM_DISKS * sizeof (char *));
656 assert (*map);
658 /* Probe devices for creating the device map. */
662 (*map)[i] = 0;
666 /* Open the device map file. */
672 ret = read_device_map (fp, *map, map_file);
685 /* Try to open the device map file to write the probed data. */
694 /* In floppies, write the map, whether check_device succeeds
701 (*map)[i] = strdup (name);
702 assert ((*map)[i]);
724 (*map)[num_hd + 0x80] = strdup (name);
725 assert ((*map)[num_hd + 0x80]);
727 /* If the device map file is opened, write the map. */
735 /* OK, close the device map file if opened. */
751 (*map)[num_hd + 0x80] = strdup (name);
752 assert ((*map)[num_hd + 0x80]);
754 /* If the device map file is opened, write the map. */
771 (*map)[num_hd + 0x80] = strdup (name);
772 assert ((*map)[num_hd + 0x80]);
774 /* If the device map file is opened, write the map. */
791 (*map)[num_hd + 0x80] = strdup (name);
792 assert ((*map)[num_hd + 0x80]);
794 /* If the device map file is opened, write the map. */
820 (*map)[num_hd + 0x80] = strdup (name);
821 assert ((*map)[num_hd + 0x80]);
823 /* If the device map file is opened, write the map. */
834 /* OK, close the device map file if opened. */
843 restore_device_map (char **map)
848 if (map[i])
849 free (map[i]);
851 free (map);
859 is_disk_device (char **map, int drive)
863 assert (map[drive] != 0);
864 assert (stat (map[drive], &st) == 0);
870 write_to_partition (char **map, int drive, int partition,
884 assert (map[drive] != 0);
886 strcpy (dev, map[drive]);