summaryrefslogtreecommitdiffstats
path: root/include/pt-mbr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pt-mbr.h')
-rw-r--r--include/pt-mbr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/pt-mbr.h b/include/pt-mbr.h
index eef940b57..6a6510af4 100644
--- a/include/pt-mbr.h
+++ b/include/pt-mbr.h
@@ -18,6 +18,14 @@ static inline unsigned int __dos_assemble4le(const unsigned char *p)
return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
}
+static inline void __dos_store_4le(unsigned char *p, unsigned int val)
+{
+ p[0] = (val & 0xff);
+ p[1] = ((val >> 8) & 0xff);
+ p[2] = ((val >> 16) & 0xff);
+ p[3] = ((val >> 24) & 0xff);
+}
+
static inline unsigned int dos_partition_start(struct dos_partition *p)
{
return __dos_assemble4le(&(p->start_sect[0]));