summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/include/rtems/bdpart.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2010-04-30 08:42:13 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2010-04-30 08:42:13 +0000
commit67808290370e184f5a4fb7e1bff0402e5104d016 (patch)
tree59733050629d923611f226d2a5c49ff1f9b0f2fa /cpukit/libblock/include/rtems/bdpart.h
parent2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-67808290370e184f5a4fb7e1bff0402e5104d016.tar.bz2
2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libblock/src/bdpart.c: Removed file. * libblock/src/bdpart-create.c, libblock/src/bdpart-dump.c, libblock/src/bdpart-mount.c, libblock/src/bdpart-read.c, libblock/src/bdpart-register.c, libblock/src/bdpart-sort.c, libblock/src/bdpart-write.c: New files. * libblock/include/rtems/bdpart.h: Moved some definitions from bdpart.c. * libblock/Makefile.am: Update for file changes.
Diffstat (limited to 'cpukit/libblock/include/rtems/bdpart.h')
-rw-r--r--cpukit/libblock/include/rtems/bdpart.h46
1 files changed, 45 insertions, 1 deletions
diff --git a/cpukit/libblock/include/rtems/bdpart.h b/cpukit/libblock/include/rtems/bdpart.h
index 56e6363e5a..3a4422db94 100644
--- a/cpukit/libblock/include/rtems/bdpart.h
+++ b/cpukit/libblock/include/rtems/bdpart.h
@@ -7,7 +7,7 @@
*/
/*
- * Copyright (c) 2009
+ * Copyright (c) 2009, 2010
* embedded brains GmbH
* Obere Lagerstr. 30
* D-82178 Puchheim
@@ -355,6 +355,50 @@ bool rtems_bdpart_to_mbr_partition_type(
/** @} */
+#define RTEMS_BDPART_MBR_CYLINDER_SIZE 63
+
+#define RTEMS_BDPART_NUMBER_SIZE 4
+
+#define RTEMS_BDPART_BLOCK_SIZE 512
+
+#define RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE 16
+
+#define RTEMS_BDPART_MBR_OFFSET_TABLE_0 446
+
+#define RTEMS_BDPART_MBR_OFFSET_TABLE_1 \
+ (RTEMS_BDPART_MBR_OFFSET_TABLE_0 + RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE)
+
+#define RTEMS_BDPART_MBR_OFFSET_DISK_ID 440
+
+#define RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0 510
+
+#define RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1 511
+
+#define RTEMS_BDPART_MBR_SIGNATURE_0 0x55U
+
+#define RTEMS_BDPART_MBR_SIGNATURE_1 0xaaU
+
+#define RTEMS_BDPART_MBR_OFFSET_BEGIN 8
+
+#define RTEMS_BDPART_MBR_OFFSET_SIZE 12
+
+#define RTEMS_BDPART_MBR_OFFSET_TYPE 4
+
+#define RTEMS_BDPART_MBR_OFFSET_FLAGS 0
+
+static inline uint8_t rtems_bdpart_mbr_partition_type(
+ const uuid_t type
+)
+{
+ return type [0];
+}
+
+rtems_status_code rtems_bdpart_get_disk_data(
+ const char *disk_name,
+ dev_t *disk,
+ rtems_blkdev_bnum *disk_end
+);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */