From: Lionel Sambuc Date: Tue, 26 Feb 2013 15:18:28 +0000 (+0000) Subject: mkfs.mfs fixup X-Git-Tag: v3.3.0~1061 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=b622d2b795b3a2e31c707edda4cf7f0e0472d898;p=minix.git mkfs.mfs fixup For the special case of crossbuilding minix on minix. --- diff --git a/usr.sbin/mkfs.mfs/mkfs.c b/usr.sbin/mkfs.mfs/mkfs.c index b76f3c7ce..3a1ab3261 100644 --- a/usr.sbin/mkfs.mfs/mkfs.c +++ b/usr.sbin/mkfs.mfs/mkfs.c @@ -35,6 +35,7 @@ #include #include #include +#include #endif #include @@ -64,10 +65,9 @@ #endif #endif -#if !defined(__minix) typedef uint32_t block_t; typedef uint32_t zone_t; -#endif +typedef uint32_t bitchunk_t; extern char *optarg; extern int optind; @@ -1014,26 +1014,13 @@ int bit; { /* Insert 'count' bits in the bitmap */ int w, s; -#if defined(__minix) bitchunk_t *buf; -#else - uint32_t *buf; -#endif -#if defined(__minix) buf = (bitchunk_t *) alloc_block(); -#else - buf = (uint32_t *) alloc_block(); -#endif get_block(block, (char *) buf); -#if defined(__minix) w = bit / (8 * sizeof(bitchunk_t)); s = bit % (8 * sizeof(bitchunk_t)); -#else - w = bit / (8 * sizeof(uint32_t)); - s = bit % (8 * sizeof(uint32_t)); -#endif buf[w] |= (1 << s); put_block(block, (char *) buf);