Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 689940
Collapse All | Expand All

(-)lilo-24.2/src/common.h (-1 / +1 lines)
Lines 386-392 Link Here
386
extern FILE *errstd;
386
extern FILE *errstd;
387
extern FILE *pp_fd;
387
extern FILE *pp_fd;
388
extern char *identify;	/* in identify.c */
388
extern char *identify;	/* in identify.c */
389
extern int dm_major_list[16];
389
extern int dm_major_list[32];
390
extern int dm_major_nr;
390
extern int dm_major_nr;
391
391
392
#define crc(a,b) (~crc32((a),(b),CRC_POLY1))
392
#define crc(a,b) (~crc32((a),(b),CRC_POLY1))
(-)lilo-24.2/src/geometry.c (-1 / +21 lines)
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");
(-)lilo-24.2/src/lilo.h (+1 lines)
Lines 245-250 Link Here
245
245
246
/* high partitions (>15) on SATA hard disks */
246
/* high partitions (>15) on SATA hard disks */
247
#define MAJOR_SATA1    259    /* high SATA disk partitions (Block Extended Major) */
247
#define MAJOR_SATA1    259    /* high SATA disk partitions (Block Extended Major) */
248
                              /* also used by kernel for nvme disks */
248
#define MAJOR_SATA2    260    /* high SATA disk partitions (Block Extended Major) (obsolete) */
249
#define MAJOR_SATA2    260    /* high SATA disk partitions (Block Extended Major) (obsolete) */
249
250
250
251

Return to bug 689940