From: Karel Zak Date: Tue, 18 Jun 2013 13:06:48 +0000 (+0200) Subject: include/pt-mbr: add functio to store le X-Git-Tag: v2.24-rc1~175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1981115232823b76e0205df226686f0f4f600f9;p=thirdparty%2Futil-linux.git include/pt-mbr: add functio to store le Signed-off-by: Karel Zak --- diff --git a/include/pt-mbr.h b/include/pt-mbr.h index eef940b576..6a6510af40 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]));