aboutsummaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-10-19 20:52:57 +0000
committerEric Andersen <andersen@codepoet.org>1999-10-19 20:52:57 +0000
commite674eb78e4cbd52d4b044d8e67d1620b32244e8f (patch)
tree8751bdd6f866ef10ad0131961256a62bc50772c6 /internal.h
parente494fdd2c73f7f2979f7e02d65e46a50bd86a59f (diff)
downloadbusybox-e674eb78e4cbd52d4b044d8e67d1620b32244e8f.tar.gz
Made em work.
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index ae0148b2e..dcddea05a 100644
--- a/internal.h
+++ b/internal.h
@@ -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