mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-23 17:19:32 +08:00
2011-02-10 Ralf Corsépius <ralf.corsepius@rtems.org>
* libblock/include/rtems/bdpart.h (rtems_bdpart_format): Eliminate unnamed union (Non c99-compliant). * libblock/src/bdpart-create.c, libblock/src/bdpart-read.c, libblock/src/bdpart-write.c: Reflect changes above.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2011-02-10 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* libblock/include/rtems/bdpart.h (rtems_bdpart_format):
|
||||
Eliminate unnamed union (Non c99-compliant).
|
||||
* libblock/src/bdpart-create.c, libblock/src/bdpart-read.c,
|
||||
libblock/src/bdpart-write.c: Reflect changes above.
|
||||
|
||||
2011-02-09 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* sapi/include/confdefs.h: Fix typo.
|
||||
|
||||
@@ -197,7 +197,7 @@ typedef struct {
|
||||
*/
|
||||
uuid_t disk_id;
|
||||
} gpt;
|
||||
};
|
||||
} u;
|
||||
} rtems_bdpart_format;
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ rtems_status_code rtems_bdpart_create(
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
bool dos_compatibility = format != NULL
|
||||
&& format->type == RTEMS_BDPART_FORMAT_MBR
|
||||
&& format->mbr.dos_compatibility;
|
||||
&& format->u.mbr.dos_compatibility;
|
||||
rtems_blkdev_bnum disk_end = 0;
|
||||
rtems_blkdev_bnum pos = 0;
|
||||
rtems_blkdev_bnum dist_sum = 0;
|
||||
|
||||
@@ -261,10 +261,10 @@ rtems_status_code rtems_bdpart_read(
|
||||
|
||||
/* Set format */
|
||||
format->type = RTEMS_BDPART_FORMAT_MBR;
|
||||
format->mbr.disk_id = rtems_uint32_from_little_endian(
|
||||
format->u.mbr.disk_id = rtems_uint32_from_little_endian(
|
||||
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
|
||||
);
|
||||
format->mbr.dos_compatibility = true;
|
||||
format->u.mbr.dos_compatibility = true;
|
||||
|
||||
/* Iterate through the rest of the primary partition table */
|
||||
for (i = 1; i < 4; ++i) {
|
||||
|
||||
@@ -94,7 +94,7 @@ rtems_status_code rtems_bdpart_write(
|
||||
rtems_status_code esc = RTEMS_SUCCESSFUL;
|
||||
bool dos_compatibility = format != NULL
|
||||
&& format->type == RTEMS_BDPART_FORMAT_MBR
|
||||
&& format->mbr.dos_compatibility;
|
||||
&& format->u.mbr.dos_compatibility;
|
||||
rtems_bdbuf_buffer *block = NULL;
|
||||
rtems_blkdev_bnum disk_end = 0;
|
||||
rtems_blkdev_bnum record_space =
|
||||
@@ -219,7 +219,7 @@ rtems_status_code rtems_bdpart_write(
|
||||
|
||||
/* Write disk ID */
|
||||
rtems_uint32_to_little_endian(
|
||||
format->mbr.disk_id,
|
||||
format->u.mbr.disk_id,
|
||||
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user