summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-02-17 16:25:43 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-02-17 16:25:43 +0000
commita8afce3872b98512c83180093cebecb124510d25 (patch)
tree3883bdaaa0a93d1e9f311789045e3e25450e66de /cpukit/libblock/include
parent2011-02-17 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-a8afce3872b98512c83180093cebecb124510d25.tar.bz2
2011-02-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libblock/include/rtems/bdpart.h (rtems_bdpart_format): Preserve previous API. * libblock/src/bdpart-create.c, libblock/src/bdpart-read.c, libblock/src/bdpart-write.c: Reflect changes above. * libmisc/shell/fdisk.c: Reflect changes above.
Diffstat (limited to 'cpukit/libblock/include')
-rw-r--r--cpukit/libblock/include/rtems/bdpart.h55
1 files changed, 29 insertions, 26 deletions
diff --git a/cpukit/libblock/include/rtems/bdpart.h b/cpukit/libblock/include/rtems/bdpart.h
index a834f21059..907866eb43 100644
--- a/cpukit/libblock/include/rtems/bdpart.h
+++ b/cpukit/libblock/include/rtems/bdpart.h
@@ -163,41 +163,44 @@ typedef enum {
/**
* Disk format description.
*/
-typedef struct {
+typedef union {
/**
* Format type.
*/
rtems_bdpart_format_type type;
- union {
+
+ /**
+ * MBR format fields.
+ */
+ struct {
+ rtems_bdpart_format_type type;
+
+ /**
+ * Disk ID in MBR at offset 440.
+ */
+ uint32_t disk_id;
+
/**
- * MBR format fields.
+ * This option is used for partition table creation and validation checks
+ * before a write to the disk. It ensures that the first primary
+ * partition and the logical partitions start at head one and sector one
+ * under the virtual one head and 63 sectors geometry. Each begin and
+ * end of a partition will be aligned to the virtual cylinder boundary.
*/
- struct {
- /**
- * Disk ID in MBR at offset 440.
- */
- uint32_t disk_id;
-
- /**
- * This option is used for partition table creation and validation checks
- * before a write to the disk. It ensures that the first primary
- * partition and the logical partitions start at head one and sector one
- * under the virtual one head and 63 sectors geometry. Each begin and
- * end of a partition will be aligned to the virtual cylinder boundary.
- */
- bool dos_compatibility;
- } mbr;
+ bool dos_compatibility;
+ } mbr;
+
+ /**
+ * GPT format fields.
+ */
+ struct {
+ rtems_bdpart_format_type type;
/**
- * GPT format fields.
+ * Disk ID in GPT header.
*/
- struct {
- /**
- * Disk ID in GPT header.
- */
- uuid_t disk_id;
- } gpt;
- } u;
+ uuid_t disk_id;
+ } gpt;
} rtems_bdpart_format;
/**