* disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Add start_sector
parameter. Set its pointer target to 0. * disk/mdraid_linux.c (grub_mdraid_detect): Add start_sector parameter. Set its pointer target to 0 for 0.9 metadata, or to the `data_offset' value from the superblock for 1.x metadata. * disk/raid.c (grub_raid_read): Offset reads by the start sector of data on the device. (insert_array): Record the start sector of data on the device. (grub_raid_register): Pass start_sector parameters to grub_raid_list->detect and insert_array. * include/grub/raid.h (struct grub_raid_array): Add start_sector member. (struct grub_raid): Add start_sector parameter to `detect'.
This commit is contained in:
		
							parent
							
								
									139ab97dc3
								
							
						
					
					
						commit
						1c785436da
					
				
					 5 changed files with 40 additions and 8 deletions
				
			
		|  | @ -51,6 +51,8 @@ struct grub_raid_array | |||
|   char *name;              /* That will be "md<number>". */ | ||||
|   unsigned int nr_devs;    /* The number of devices we've found so far. */ | ||||
|   grub_disk_t device[GRUB_RAID_MAX_DEVICES];  /* Array of total_devs devices. */ | ||||
|   grub_disk_addr_t start_sector[GRUB_RAID_MAX_DEVICES]; | ||||
| 			   /* Start of each device, in 512 byte sectors. */ | ||||
|   struct grub_raid_array *next; | ||||
| }; | ||||
| 
 | ||||
|  | @ -58,7 +60,8 @@ struct grub_raid | |||
| { | ||||
|   const char *name; | ||||
| 
 | ||||
|   grub_err_t (*detect) (grub_disk_t disk, struct grub_raid_array *array); | ||||
|   grub_err_t (*detect) (grub_disk_t disk, struct grub_raid_array *array, | ||||
|                         grub_disk_addr_t *start_sector); | ||||
| 
 | ||||
|   struct grub_raid *next; | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue