Lines 84-91
Link Here
|
84 |
int dm_version_nr = 0; |
84 |
int dm_version_nr = 0; |
85 |
#endif |
85 |
#endif |
86 |
|
86 |
|
87 |
int dm_major_list[16]; |
87 |
int dm_major_list[32]; /* increased from 16 to allow for nvme disks */ |
88 |
int dm_major_nr; |
88 |
int dm_major_nr; |
|
|
89 |
int nvme_pr = 0; /* set to none zero after geo_init if nvme disk present */ |
89 |
|
90 |
|
90 |
#ifdef LCF_LVM |
91 |
#ifdef LCF_LVM |
91 |
struct lv_bmap { |
92 |
struct lv_bmap { |
Lines 200-205
Link Here
|
200 |
|
201 |
|
201 |
while(fgets(line, (sizeof line)-1, file)) { |
202 |
while(fgets(line, (sizeof line)-1, file)) { |
202 |
if (sscanf(line, "%d %31s\n", &major, major_name) != 2) continue; |
203 |
if (sscanf(line, "%d %31s\n", &major, major_name) != 2) continue; |
|
|
204 |
if (strcmp(major_name, "nvme") !=0) { /* set if nvme drive is present */ |
205 |
nvme_pr=-1; |
206 |
} |
203 |
if (strcmp(major_name, "device-mapper") != 0) continue; |
207 |
if (strcmp(major_name, "device-mapper") != 0) continue; |
204 |
dm_major_list[dm_major_nr] = major; |
208 |
dm_major_list[dm_major_nr] = major; |
205 |
if (verbose >= 3) { |
209 |
if (verbose >= 3) { |
Lines 708-713
Link Here
|
708 |
geo->start = hdprm.start; |
712 |
geo->start = hdprm.start; |
709 |
break; |
713 |
break; |
710 |
case MAJOR_SATA1: |
714 |
case MAJOR_SATA1: |
|
|
715 |
/* check for nvme device and assume boot/this device is nvme if present */ |
716 |
if (nvme_pr != 0) { |
717 |
geo->device = 0x80 + last_dev(MAJOR_IDE,64) + (MINOR(device) >> 4); |
718 |
if (!get_all) break; |
719 |
if (ioctl(fd,HDIO_GETGEO,&hdprm) < 0) |
720 |
die("geo_query_dev HDIO_GETGEO (dev 0x%04x): %s",device, |
721 |
strerror(errno)); |
722 |
if (all && !hdprm.sectors) |
723 |
die("HDIO_REQ not supported for your NVME controller. Please " |
724 |
"use a DISK section"); |
725 |
geo->heads = hdprm.heads; |
726 |
geo->cylinders = hdprm.cylinders; |
727 |
geo->sectors = hdprm.sectors; |
728 |
geo->start = hdprm.start; |
729 |
break; |
730 |
} |
711 |
case MAJOR_SATA2: |
731 |
case MAJOR_SATA2: |
712 |
printf("WARNING: SATA partition in the high region (>15):\n"); |
732 |
printf("WARNING: SATA partition in the high region (>15):\n"); |
713 |
printf("LILO needs the kernel in one of the first 15 SATA partitions. If \n"); |
733 |
printf("LILO needs the kernel in one of the first 15 SATA partitions. If \n"); |