summaryrefslogtreecommitdiffstats
path: root/libblkid/dos.h
diff options
context:
space:
mode:
authorbigbiff <bigbiff@teamw.in>2015-01-02 01:44:14 +0100
committerDees Troy <dees_troy@teamw.in>2015-01-05 04:38:42 +0100
commit7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de (patch)
treefb69cb515cb4ab675d5850684cc402100b7a2a22 /libblkid/dos.h
parentcrypto: remove unused libs and clean up makefile (diff)
downloadandroid_bootable_recovery-7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de.tar
android_bootable_recovery-7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de.tar.gz
android_bootable_recovery-7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de.tar.bz2
android_bootable_recovery-7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de.tar.lz
android_bootable_recovery-7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de.tar.xz
android_bootable_recovery-7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de.tar.zst
android_bootable_recovery-7b4c7a681cc4c0a53dc8a8baf4853e921cfbf5de.zip
Diffstat (limited to 'libblkid/dos.h')
-rw-r--r--libblkid/dos.h41
1 files changed, 0 insertions, 41 deletions
diff --git a/libblkid/dos.h b/libblkid/dos.h
deleted file mode 100644
index d7588a856..000000000
--- a/libblkid/dos.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef BLKID_PARTITIONS_DOS_H
-#define BLKID_PARTITIONS_DOS_H
-
-struct dos_partition {
- unsigned char boot_ind; /* 0x80 - active */
- unsigned char bh, bs, bc; /* begin CHS */
- unsigned char sys_type;
- unsigned char eh, es, ec; /* end CHS */
- unsigned char start_sect[4];
- unsigned char nr_sects[4];
-} __attribute__((packed));
-
-#define BLKID_MSDOS_PT_OFFSET 0x1be
-
-/* assemble badly aligned little endian integer */
-static inline unsigned int assemble4le(const unsigned char *p)
-{
- return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
-}
-
-static inline unsigned int dos_partition_start(struct dos_partition *p)
-{
- return assemble4le(&(p->start_sect[0]));
-}
-
-static inline unsigned int dos_partition_size(struct dos_partition *p)
-{
- return assemble4le(&(p->nr_sects[0]));
-}
-
-static inline int is_valid_mbr_signature(const unsigned char *mbr)
-{
- return mbr[510] == 0x55 && mbr[511] == 0xaa ? 1 : 0;
-}
-
-static inline unsigned int dos_parttable_id(const unsigned char *mbr)
-{
- return assemble4le(&mbr[440]);
-}
-
-#endif /* BLKID_PARTITIONS_DOS_H */