[Frugalware-darcs] setup: formatdisk: hide swap partitions when selecting partitions to mount

VMiklos vmiklos at frugalware.org
Sat Jul 14 22:04:16 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=setup;a=darcs_commitdiff;h=20070714195832-e2957-d9b295e059e19f0400221c1ed733b468b5d71326.gz;

[formatdisk: hide swap partitions when selecting partitions to mount
VMiklos <vmiklos at frugalware.org>**20070714195832
 closes #1248
] {
hunk ./src/plugins/formatdisk.c 57
-int partdetails(PedPartition *part)
+int partdetails(PedPartition *part, int noswap)
hunk ./src/plugins/formatdisk.c 68
+	if(noswap && !strncmp("linux-swap", ptype, 10))
+		return(0);
+
hunk ./src/plugins/formatdisk.c 88
-int listparts(PedDisk *disk)
+int listparts(PedDisk *disk, int noswap)
hunk ./src/plugins/formatdisk.c 100
-			partdetails(part);
+			partdetails(part, noswap);
hunk ./src/plugins/formatdisk.c 105
-					partdetails(extpart);
+					partdetails(extpart, noswap);
hunk ./src/plugins/formatdisk.c 139
-				partdetails(part);
+				partdetails(part, 0);
hunk ./src/plugins/formatdisk.c 292
+	// re-detect parts so that new swap partitions will recognized as swap
+	// partitions
+	detect_parts(1);
hunk ./src/plugins/formatdisk.c 472
-int detect_parts()
+int detect_parts(int noswap)
hunk ./src/plugins/formatdisk.c 487
+	ped_device_free_all();
hunk ./src/plugins/formatdisk.c 505
-			listparts(disk);
+			listparts(disk, noswap);
hunk ./src/plugins/formatdisk.c 519
-	detect_parts();
+	detect_parts(0);
}


More information about the Frugalware-darcs mailing list