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

commit 2486310c09a6155d6aae85bdf09e5970565d7003
Author: James Buren <[email protected]>
Date:   Mon Aug 13 07:31:14 2012 -0500

cache partition flags. needed for active boot partition (dos) or attributes 
(gpt)

diff --git a/fwsetup.h b/fwsetup.h
index dc2300f..dabe510 100644
--- a/fwsetup.h
+++ b/fwsetup.h
@@ -83,8 +83,8 @@ struct partition
{
struct partition *prev;
struct partition *next;
-  char *name;
uint64_t num;
+  char *name;
uint64_t start;
uint64_t end;
uint64_t sectors;
@@ -93,6 +93,7 @@ struct partition
uint8_t type_n;
char *type_s;
};
+  uint64_t flags;
};

struct device
diff --git a/utility.c b/utility.c
index 3556ece..9b784f5 100644
--- a/utility.c
+++ b/utility.c
@@ -226,6 +226,7 @@ extern struct device *read_device_data(const char *path)
blkid_loff_t partsize = 0;
int parttype_n = 0;
const char *parttype_s = 0;
+  unsigned long long partflags = 0;

memzero(&st,sizeof(struct stat));

@@ -300,6 +301,8 @@ extern struct device *read_device_data(const char *path)

parttype_s = blkid_partition_get_type_string(partition);

+            partflags = blkid_partition_get_flags(partition);
+
partitions->num = partnum;

partitions->name = (partname != 0) ? strdup(partname) : 0;
@@ -315,6 +318,8 @@ extern struct device *read_device_data(const char *path)
else if(strcmp(label,"gpt") == 0)
partitions->type_s = strdup(parttype_s);

+            partitions->flags = partflags;
+
++i;
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to