Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 152293 | Differences between
and this patch

Collapse All | Expand All

(-)evms-2.5.5/plugins/disk/localdskmgr.c (-5 / +14 lines)
Lines 1552-1567 Link Here
1552
1552
1553
	LOG_ENTRY();
1553
	LOG_ENTRY();
1554
1554
1555
	/* Set defaults */
1556
	disk->geometry.heads = 255;
1557
	disk->geometry.sectors_per_track = 63;
1558
1559
	rc = get_partition_table_geometry(disk);
1555
	rc = get_partition_table_geometry(disk);
1560
1556
1561
	if (rc != 0) {
1557
	if (rc != 0) {
1562
		get_kernel_geometry(disk);
1558
		rc = get_kernel_geometry(disk);
1559
	}
1560
1561
	/* Set defaults if no valid geometry was found. */
1562
	if (disk->geometry.heads == 0) {
1563
		LOG_DEBUG("Disk %s: Heads is zero - setting to 255.\n",
1564
			  disk->name);
1565
		disk->geometry.heads = 255;
1566
	}
1567
	if (disk->geometry.sectors_per_track == 0) {
1568
		LOG_DEBUG("Disk %s: Sectors-per-track is zero - "
1569
			  "setting to 63.\n", disk->name);
1570
		disk->geometry.sectors_per_track = 63;
1563
	}
1571
	}
1564
1572
1573
	/* Calculate number of cylinders based on other geometry fields. */
1565
	disk->geometry.cylinders = disk->size /
1574
	disk->geometry.cylinders = disk->size /
1566
				   (disk->geometry.heads *
1575
				   (disk->geometry.heads *
1567
				    disk->geometry.sectors_per_track *
1576
				    disk->geometry.sectors_per_track *

Return to bug 152293