diff options
author | Eric Andersen | 1999-10-19 20:52:57 +0000 |
---|---|---|
committer | Eric Andersen | 1999-10-19 20:52:57 +0000 |
commit | e674eb78e4cbd52d4b044d8e67d1620b32244e8f (patch) | |
tree | 8751bdd6f866ef10ad0131961256a62bc50772c6 /internal.h | |
parent | e494fdd2c73f7f2979f7e02d65e46a50bd86a59f (diff) | |
download | busybox-e674eb78e4cbd52d4b044d8e67d1620b32244e8f.zip busybox-e674eb78e4cbd52d4b044d8e67d1620b32244e8f.tar.gz |
Made em work.
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -138,5 +138,30 @@ extern int parse_mode( const char* s, mode_t* theMode); extern volatile void usage(const char *usage); + +#if defined (BB_FSCK_MINIX) || defined (BB_MKFS_MINIX) + +static inline int bit(char * addr,unsigned int nr) +{ + return (addr[nr >> 3] & (1<<(nr & 7))) != 0; +} + +static inline int setbit(char * addr,unsigned int nr) +{ + int __res = bit(addr, nr); + addr[nr >> 3] |= (1<<(nr & 7)); + return __res != 0; \ +} + +static inline int clrbit(char * addr,unsigned int nr) +{ + int __res = bit(addr, nr); + addr[nr >> 3] &= ~(1<<(nr & 7)); + return __res != 0; +} + +#endif + + #endif |