Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwsetup-ng.git;a=commitdiff;h=4413e48e01b77f603e366397ab85725c6a785076

commit 4413e48e01b77f603e366397ab85725c6a785076
Author: James Buren <[email protected]>
Date:   Tue Oct 9 07:14:45 2012 -0500

add function for retrieiving total number of partitions

diff --git a/src/block.c b/src/block.c
index 640522b..08751bc 100644
--- a/src/block.c
+++ b/src/block.c
@@ -472,7 +472,7 @@ extern int disk_create_partition(struct disk *disk,long 
long size)
part.size = (part.end - part.start) + 1;

if(
-    (disk->type == DISKTYPE_DOS && part.number > 60)  ||
+    (disk->type == DISKTYPE_DOS && part.number > 4)   ||
(disk->type == DISKTYPE_GPT && part.number > 128) ||
part.size >= disk->sectors                        ||
(last != 0 && last->end >= disk->sectors)
@@ -586,6 +586,11 @@ extern void disk_partition_set_active(struct disk 
*disk,int n,bool active)
disk->modified = true;
}

+extern int disk_partition_get_count(struct disk *disk)
+{
+  return disk->size;
+}
+
extern const char *disk_partition_get_purpose(struct disk *disk,int n)
{
struct partition *part = 0;
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to