diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-10-24 05:00:29 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-10-24 05:00:29 +0000 |
commit | bdfd0d78bc44e73d693510e70087857785b3b521 (patch) | |
tree | 153a573095afac8d8d0ea857759ecabd77fb28b7 /util-linux | |
parent | 9260fc5552a3ee52eb95823aa6689d52a1ffd33c (diff) | |
download | busybox-w32-bdfd0d78bc44e73d693510e70087857785b3b521.tar.gz busybox-w32-bdfd0d78bc44e73d693510e70087857785b3b521.tar.bz2 busybox-w32-bdfd0d78bc44e73d693510e70087857785b3b521.zip |
Major rework of the directory structure and the entire build system.
-Erik
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/Makefile | 48 | ||||
-rw-r--r-- | util-linux/config.in | 27 | ||||
-rw-r--r-- | util-linux/fbset.c | 12 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 42 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 20 | ||||
-rw-r--r-- | util-linux/more.c | 12 | ||||
-rw-r--r-- | util-linux/mount.c | 26 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 5 | ||||
-rw-r--r-- | util-linux/umount.c | 29 |
9 files changed, 147 insertions, 74 deletions
diff --git a/util-linux/Makefile b/util-linux/Makefile new file mode 100644 index 000000000..ddecf50d3 --- /dev/null +++ b/util-linux/Makefile | |||
@@ -0,0 +1,48 @@ | |||
1 | # Makefile for busybox | ||
2 | # | ||
3 | # Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | # | ||
19 | |||
20 | TOPDIR :=.. | ||
21 | L_TARGET := util-linux.a | ||
22 | |||
23 | obj-y := | ||
24 | obj-n := | ||
25 | obj- := | ||
26 | |||
27 | obj-$(CONFIG_DMESG) += dmesg.o | ||
28 | obj-$(CONFIG_FBSET) += fbset.o | ||
29 | obj-$(CONFIG_FDFLUSH) += fdflush.o | ||
30 | obj-$(CONFIG_FREERAMDISK) += freeramdisk.o | ||
31 | obj-$(CONFIG_FSCK_MINIX) += fsck_minix.o | ||
32 | obj-$(CONFIG_GETOPT) += getopt.o | ||
33 | obj-$(CONFIG_MKFS_MINIX) += mkfs_minix.o | ||
34 | obj-$(CONFIG_MKSWAP) += mkswap.o | ||
35 | obj-$(CONFIG_MORE) += more.o | ||
36 | obj-$(CONFIG_MOUNT) += mount.o | ||
37 | obj-$(CONFIG_NFSMOUNT) += nfsmount.o | ||
38 | obj-$(CONFIG_PIVOT_ROOT) += pivot_root.o | ||
39 | obj-$(CONFIG_RDATE) += rdate.o | ||
40 | obj-$(CONFIG_SWAPONOFF) += swaponoff.o | ||
41 | obj-$(CONFIG_UMOUNT) += umount.o | ||
42 | |||
43 | # Hand off to toplevel Rules.mak | ||
44 | include $(TOPDIR)/Rules.mak | ||
45 | |||
46 | clean: | ||
47 | rm -f $(L_TARGET) *.o core | ||
48 | |||
diff --git a/util-linux/config.in b/util-linux/config.in new file mode 100644 index 000000000..3eb8ee0b5 --- /dev/null +++ b/util-linux/config.in | |||
@@ -0,0 +1,27 @@ | |||
1 | # | ||
2 | # For a description of the syntax of this configuration file, | ||
3 | # see scripts/kbuild/config-language.txt. | ||
4 | # | ||
5 | |||
6 | mainmenu_option next_comment | ||
7 | comment 'Linux System Utilities' | ||
8 | |||
9 | |||
10 | bool 'dmesg' CONFIG_DMESG | ||
11 | bool 'fbset' CONFIG_FBSET | ||
12 | bool 'fdflush' CONFIG_FDFLUSH | ||
13 | bool 'freeramdisk' CONFIG_FREERAMDISK | ||
14 | bool 'fsck_minix' CONFIG_FSCK_MINIX | ||
15 | bool 'getopt' CONFIG_GETOPT | ||
16 | bool 'mkfs_minix' CONFIG_MKFS_MINIX | ||
17 | bool 'mkswap' CONFIG_MKSWAP | ||
18 | bool 'more' CONFIG_MORE | ||
19 | bool 'mount' CONFIG_MOUNT | ||
20 | bool 'nfsmount' CONFIG_NFSMOUNT | ||
21 | bool 'pivot_root' CONFIG_PIVOT_ROOT | ||
22 | bool 'rdate' CONFIG_RDATE | ||
23 | bool 'swaponoff' CONFIG_SWAPONOFF | ||
24 | bool 'umount' CONFIG_UMOUNT | ||
25 | |||
26 | endmenu | ||
27 | |||
diff --git a/util-linux/fbset.c b/util-linux/fbset.c index 5ccd80e79..2a959c21c 100644 --- a/util-linux/fbset.c +++ b/util-linux/fbset.c | |||
@@ -56,7 +56,7 @@ enum { | |||
56 | CMD_INFO = 12, | 56 | CMD_INFO = 12, |
57 | CMD_CHANGE = 13, | 57 | CMD_CHANGE = 13, |
58 | 58 | ||
59 | #ifdef BB_FEATURE_FBSET_FANCY | 59 | #ifdef CONFIG_FEATURE_FBSET_FANCY |
60 | CMD_XRES = 100, | 60 | CMD_XRES = 100, |
61 | CMD_YRES = 101, | 61 | CMD_YRES = 101, |
62 | CMD_VXRES = 102, | 62 | CMD_VXRES = 102, |
@@ -149,7 +149,7 @@ static struct cmdoptions_t { | |||
149 | "-laced", 1, CMD_LACED}, { | 149 | "-laced", 1, CMD_LACED}, { |
150 | "-double", 1, CMD_DOUBLE}, { | 150 | "-double", 1, CMD_DOUBLE}, { |
151 | "-n", 0, CMD_CHANGE}, { | 151 | "-n", 0, CMD_CHANGE}, { |
152 | #ifdef BB_FEATURE_FBSET_FANCY | 152 | #ifdef CONFIG_FEATURE_FBSET_FANCY |
153 | "-all", 0, CMD_ALL}, { | 153 | "-all", 0, CMD_ALL}, { |
154 | "-xres", 1, CMD_XRES}, { | 154 | "-xres", 1, CMD_XRES}, { |
155 | "-yres", 1, CMD_YRES}, { | 155 | "-yres", 1, CMD_YRES}, { |
@@ -177,7 +177,7 @@ static struct cmdoptions_t { | |||
177 | 0, 0, 0} | 177 | 0, 0, 0} |
178 | }; | 178 | }; |
179 | 179 | ||
180 | #ifdef BB_FEATURE_FBSET_READMODE | 180 | #ifdef CONFIG_FEATURE_FBSET_READMODE |
181 | /* taken from linux/fb.h */ | 181 | /* taken from linux/fb.h */ |
182 | static const int FB_VMODE_INTERLACED = 1; /* interlaced */ | 182 | static const int FB_VMODE_INTERLACED = 1; /* interlaced */ |
183 | static const int FB_VMODE_DOUBLE = 2; /* double scan */ | 183 | static const int FB_VMODE_DOUBLE = 2; /* double scan */ |
@@ -189,7 +189,7 @@ static const int FB_SYNC_COMP_HIGH_ACT = 8; /* composite sync high active */ | |||
189 | static int readmode(struct fb_var_screeninfo *base, const char *fn, | 189 | static int readmode(struct fb_var_screeninfo *base, const char *fn, |
190 | const char *mode) | 190 | const char *mode) |
191 | { | 191 | { |
192 | #ifdef BB_FEATURE_FBSET_READMODE | 192 | #ifdef CONFIG_FEATURE_FBSET_READMODE |
193 | FILE *f; | 193 | FILE *f; |
194 | char buf[256]; | 194 | char buf[256]; |
195 | char *p = buf; | 195 | char *p = buf; |
@@ -313,7 +313,7 @@ static void showmode(struct fb_var_screeninfo *v) | |||
313 | v->vsync_len); | 313 | v->vsync_len); |
314 | } | 314 | } |
315 | printf("\nmode \"%ux%u-%u\"\n", v->xres, v->yres, (int) (vrate + 0.5)); | 315 | printf("\nmode \"%ux%u-%u\"\n", v->xres, v->yres, (int) (vrate + 0.5)); |
316 | #ifdef BB_FEATURE_FBSET_FANCY | 316 | #ifdef CONFIG_FEATURE_FBSET_FANCY |
317 | printf("\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n", drate / 1e6, | 317 | printf("\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n", drate / 1e6, |
318 | hrate / 1e3, vrate); | 318 | hrate / 1e3, vrate); |
319 | #endif | 319 | #endif |
@@ -377,7 +377,7 @@ extern int fbset_main(int argc, char **argv) | |||
377 | case CMD_CHANGE: | 377 | case CMD_CHANGE: |
378 | g_options |= OPT_CHANGE; | 378 | g_options |= OPT_CHANGE; |
379 | break; | 379 | break; |
380 | #ifdef BB_FEATURE_FBSET_FANCY | 380 | #ifdef CONFIG_FEATURE_FBSET_FANCY |
381 | case CMD_XRES: | 381 | case CMD_XRES: |
382 | varset.xres = strtoul(argv[1], 0, 0); | 382 | varset.xres = strtoul(argv[1], 0, 0); |
383 | break; | 383 | break; |
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 952968d85..dbe4f74b3 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -191,7 +191,7 @@ static const int ROOT_INO = 1; | |||
191 | 191 | ||
192 | #define UPPER(size,n) ((size+((n)-1))/(n)) | 192 | #define UPPER(size,n) ((size+((n)-1))/(n)) |
193 | #define INODE_SIZE (sizeof(struct minix_inode)) | 193 | #define INODE_SIZE (sizeof(struct minix_inode)) |
194 | #ifdef BB_FEATURE_MINIX2 | 194 | #ifdef CONFIG_FEATURE_MINIX2 |
195 | #define INODE_SIZE2 (sizeof(struct minix2_inode)) | 195 | #define INODE_SIZE2 (sizeof(struct minix2_inode)) |
196 | #define INODE_BLOCKS UPPER(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \ | 196 | #define INODE_BLOCKS UPPER(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \ |
197 | : MINIX_INODES_PER_BLOCK)) | 197 | : MINIX_INODES_PER_BLOCK)) |
@@ -232,7 +232,7 @@ static char super_block_buffer[BLOCK_SIZE]; | |||
232 | 232 | ||
233 | #define Super (*(struct minix_super_block *)super_block_buffer) | 233 | #define Super (*(struct minix_super_block *)super_block_buffer) |
234 | #define INODES ((unsigned long)Super.s_ninodes) | 234 | #define INODES ((unsigned long)Super.s_ninodes) |
235 | #ifdef BB_FEATURE_MINIX2 | 235 | #ifdef CONFIG_FEATURE_MINIX2 |
236 | #define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones)) | 236 | #define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones)) |
237 | #else | 237 | #else |
238 | #define ZONES ((unsigned long)(Super.s_nzones)) | 238 | #define ZONES ((unsigned long)(Super.s_nzones)) |
@@ -252,7 +252,7 @@ static unsigned char *inode_count = NULL; | |||
252 | static unsigned char *zone_count = NULL; | 252 | static unsigned char *zone_count = NULL; |
253 | 253 | ||
254 | static void recursive_check(unsigned int ino); | 254 | static void recursive_check(unsigned int ino); |
255 | #ifdef BB_FEATURE_MINIX2 | 255 | #ifdef CONFIG_FEATURE_MINIX2 |
256 | static void recursive_check2(unsigned int ino); | 256 | static void recursive_check2(unsigned int ino); |
257 | #endif | 257 | #endif |
258 | 258 | ||
@@ -408,7 +408,7 @@ static int check_zone_nr(unsigned short *nr, int *corrected) | |||
408 | return 0; | 408 | return 0; |
409 | } | 409 | } |
410 | 410 | ||
411 | #ifdef BB_FEATURE_MINIX2 | 411 | #ifdef CONFIG_FEATURE_MINIX2 |
412 | static int check_zone_nr2(unsigned int *nr, int *corrected) | 412 | static int check_zone_nr2(unsigned int *nr, int *corrected) |
413 | { | 413 | { |
414 | if (!*nr) | 414 | if (!*nr) |
@@ -515,7 +515,7 @@ static int map_block(struct minix_inode *inode, unsigned int blknr) | |||
515 | return result; | 515 | return result; |
516 | } | 516 | } |
517 | 517 | ||
518 | #ifdef BB_FEATURE_MINIX2 | 518 | #ifdef CONFIG_FEATURE_MINIX2 |
519 | static int map_block2(struct minix2_inode *inode, unsigned int blknr) | 519 | static int map_block2(struct minix2_inode *inode, unsigned int blknr) |
520 | { | 520 | { |
521 | unsigned int ind[BLOCK_SIZE >> 2]; | 521 | unsigned int ind[BLOCK_SIZE >> 2]; |
@@ -613,7 +613,7 @@ static void get_dirsize(void) | |||
613 | char blk[BLOCK_SIZE]; | 613 | char blk[BLOCK_SIZE]; |
614 | int size; | 614 | int size; |
615 | 615 | ||
616 | #ifdef BB_FEATURE_MINIX2 | 616 | #ifdef CONFIG_FEATURE_MINIX2 |
617 | if (version2) | 617 | if (version2) |
618 | block = Inode2[ROOT_INO].i_zone[0]; | 618 | block = Inode2[ROOT_INO].i_zone[0]; |
619 | else | 619 | else |
@@ -644,7 +644,7 @@ static void read_superblock(void) | |||
644 | namelen = 30; | 644 | namelen = 30; |
645 | dirsize = 32; | 645 | dirsize = 32; |
646 | version2 = 0; | 646 | version2 = 0; |
647 | #ifdef BB_FEATURE_MINIX2 | 647 | #ifdef CONFIG_FEATURE_MINIX2 |
648 | } else if (MAGIC == MINIX2_SUPER_MAGIC) { | 648 | } else if (MAGIC == MINIX2_SUPER_MAGIC) { |
649 | namelen = 14; | 649 | namelen = 14; |
650 | dirsize = 16; | 650 | dirsize = 16; |
@@ -742,7 +742,7 @@ static struct minix_inode *get_inode(unsigned int nr) | |||
742 | return inode; | 742 | return inode; |
743 | } | 743 | } |
744 | 744 | ||
745 | #ifdef BB_FEATURE_MINIX2 | 745 | #ifdef CONFIG_FEATURE_MINIX2 |
746 | static struct minix2_inode *get_inode2(unsigned int nr) | 746 | static struct minix2_inode *get_inode2(unsigned int nr) |
747 | { | 747 | { |
748 | struct minix2_inode *inode; | 748 | struct minix2_inode *inode; |
@@ -798,7 +798,7 @@ static void check_root(void) | |||
798 | die("root inode isn't a directory"); | 798 | die("root inode isn't a directory"); |
799 | } | 799 | } |
800 | 800 | ||
801 | #ifdef BB_FEATURE_MINIX2 | 801 | #ifdef CONFIG_FEATURE_MINIX2 |
802 | static void check_root2(void) | 802 | static void check_root2(void) |
803 | { | 803 | { |
804 | struct minix2_inode *inode = Inode2 + ROOT_INO; | 804 | struct minix2_inode *inode = Inode2 + ROOT_INO; |
@@ -841,7 +841,7 @@ static int add_zone(unsigned short *znr, int *corrected) | |||
841 | return block; | 841 | return block; |
842 | } | 842 | } |
843 | 843 | ||
844 | #ifdef BB_FEATURE_MINIX2 | 844 | #ifdef CONFIG_FEATURE_MINIX2 |
845 | static int add_zone2(unsigned int *znr, int *corrected) | 845 | static int add_zone2(unsigned int *znr, int *corrected) |
846 | { | 846 | { |
847 | int result; | 847 | int result; |
@@ -892,7 +892,7 @@ static void add_zone_ind(unsigned short *znr, int *corrected) | |||
892 | write_block(block, blk); | 892 | write_block(block, blk); |
893 | } | 893 | } |
894 | 894 | ||
895 | #ifdef BB_FEATURE_MINIX2 | 895 | #ifdef CONFIG_FEATURE_MINIX2 |
896 | static void add_zone_ind2(unsigned int *znr, int *corrected) | 896 | static void add_zone_ind2(unsigned int *znr, int *corrected) |
897 | { | 897 | { |
898 | static char blk[BLOCK_SIZE]; | 898 | static char blk[BLOCK_SIZE]; |
@@ -926,7 +926,7 @@ static void add_zone_dind(unsigned short *znr, int *corrected) | |||
926 | write_block(block, blk); | 926 | write_block(block, blk); |
927 | } | 927 | } |
928 | 928 | ||
929 | #ifdef BB_FEATURE_MINIX2 | 929 | #ifdef CONFIG_FEATURE_MINIX2 |
930 | static void add_zone_dind2(unsigned int *znr, int *corrected) | 930 | static void add_zone_dind2(unsigned int *znr, int *corrected) |
931 | { | 931 | { |
932 | static char blk[BLOCK_SIZE]; | 932 | static char blk[BLOCK_SIZE]; |
@@ -977,7 +977,7 @@ static void check_zones(unsigned int i) | |||
977 | add_zone_dind(8 + inode->i_zone, &changed); | 977 | add_zone_dind(8 + inode->i_zone, &changed); |
978 | } | 978 | } |
979 | 979 | ||
980 | #ifdef BB_FEATURE_MINIX2 | 980 | #ifdef CONFIG_FEATURE_MINIX2 |
981 | static void check_zones2(unsigned int i) | 981 | static void check_zones2(unsigned int i) |
982 | { | 982 | { |
983 | struct minix2_inode *inode; | 983 | struct minix2_inode *inode; |
@@ -1062,7 +1062,7 @@ static void check_file(struct minix_inode *dir, unsigned int offset) | |||
1062 | return; | 1062 | return; |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | #ifdef BB_FEATURE_MINIX2 | 1065 | #ifdef CONFIG_FEATURE_MINIX2 |
1066 | static void check_file2(struct minix2_inode *dir, unsigned int offset) | 1066 | static void check_file2(struct minix2_inode *dir, unsigned int offset) |
1067 | { | 1067 | { |
1068 | static char blk[BLOCK_SIZE]; | 1068 | static char blk[BLOCK_SIZE]; |
@@ -1143,7 +1143,7 @@ static void recursive_check(unsigned int ino) | |||
1143 | check_file(dir, offset); | 1143 | check_file(dir, offset); |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | #ifdef BB_FEATURE_MINIX2 | 1146 | #ifdef CONFIG_FEATURE_MINIX2 |
1147 | static void recursive_check2(unsigned int ino) | 1147 | static void recursive_check2(unsigned int ino) |
1148 | { | 1148 | { |
1149 | struct minix2_inode *dir; | 1149 | struct minix2_inode *dir; |
@@ -1221,7 +1221,7 @@ static void check_counts(void) | |||
1221 | } | 1221 | } |
1222 | } | 1222 | } |
1223 | 1223 | ||
1224 | #ifdef BB_FEATURE_MINIX2 | 1224 | #ifdef CONFIG_FEATURE_MINIX2 |
1225 | static void check_counts2(void) | 1225 | static void check_counts2(void) |
1226 | { | 1226 | { |
1227 | int i; | 1227 | int i; |
@@ -1283,7 +1283,7 @@ static void check(void) | |||
1283 | check_counts(); | 1283 | check_counts(); |
1284 | } | 1284 | } |
1285 | 1285 | ||
1286 | #ifdef BB_FEATURE_MINIX2 | 1286 | #ifdef CONFIG_FEATURE_MINIX2 |
1287 | static void check2(void) | 1287 | static void check2(void) |
1288 | { | 1288 | { |
1289 | memset(inode_count, 0, (INODES + 1) * sizeof(*inode_count)); | 1289 | memset(inode_count, 0, (INODES + 1) * sizeof(*inode_count)); |
@@ -1305,7 +1305,7 @@ static void alloc_name_list(void) | |||
1305 | name_list[i] = xmalloc(sizeof(char) * BUFSIZ + 1); | 1305 | name_list[i] = xmalloc(sizeof(char) * BUFSIZ + 1); |
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | #ifdef BB_FEATURE_CLEAN_UP | 1308 | #ifdef CONFIG_FEATURE_CLEAN_UP |
1309 | /* execute this atexit() to deallocate name_list[] */ | 1309 | /* execute this atexit() to deallocate name_list[] */ |
1310 | /* piptigger was here */ | 1310 | /* piptigger was here */ |
1311 | static void free_name_list(void) | 1311 | static void free_name_list(void) |
@@ -1330,7 +1330,7 @@ extern int fsck_minix_main(int argc, char **argv) | |||
1330 | int retcode = 0; | 1330 | int retcode = 0; |
1331 | 1331 | ||
1332 | alloc_name_list(); | 1332 | alloc_name_list(); |
1333 | #ifdef BB_FEATURE_CLEAN_UP | 1333 | #ifdef CONFIG_FEATURE_CLEAN_UP |
1334 | /* Don't bother to free memory. Exit does | 1334 | /* Don't bother to free memory. Exit does |
1335 | * that automagically, so we can save a few bytes */ | 1335 | * that automagically, so we can save a few bytes */ |
1336 | atexit(free_name_list); | 1336 | atexit(free_name_list); |
@@ -1338,7 +1338,7 @@ extern int fsck_minix_main(int argc, char **argv) | |||
1338 | 1338 | ||
1339 | if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE) | 1339 | if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE) |
1340 | die("bad inode size"); | 1340 | die("bad inode size"); |
1341 | #ifdef BB_FEATURE_MINIX2 | 1341 | #ifdef CONFIG_FEATURE_MINIX2 |
1342 | if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE) | 1342 | if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE) |
1343 | die("bad v2 inode size"); | 1343 | die("bad v2 inode size"); |
1344 | #endif | 1344 | #endif |
@@ -1422,7 +1422,7 @@ extern int fsck_minix_main(int argc, char **argv) | |||
1422 | tcsetattr(0, TCSANOW, &tmp); | 1422 | tcsetattr(0, TCSANOW, &tmp); |
1423 | termios_set = 1; | 1423 | termios_set = 1; |
1424 | } | 1424 | } |
1425 | #ifdef BB_FEATURE_MINIX2 | 1425 | #ifdef CONFIG_FEATURE_MINIX2 |
1426 | if (version2) { | 1426 | if (version2) { |
1427 | check_root2(); | 1427 | check_root2(); |
1428 | check2(); | 1428 | check2(); |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index ccc0e85d7..a388d0ab0 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -180,7 +180,7 @@ struct minix_dir_entry { | |||
180 | 180 | ||
181 | #define UPPER(size,n) (((size)+((n)-1))/(n)) | 181 | #define UPPER(size,n) (((size)+((n)-1))/(n)) |
182 | #define INODE_SIZE (sizeof(struct minix_inode)) | 182 | #define INODE_SIZE (sizeof(struct minix_inode)) |
183 | #ifdef BB_FEATURE_MINIX2 | 183 | #ifdef CONFIG_FEATURE_MINIX2 |
184 | #define INODE_SIZE2 (sizeof(struct minix2_inode)) | 184 | #define INODE_SIZE2 (sizeof(struct minix2_inode)) |
185 | #define INODE_BLOCKS UPPER(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \ | 185 | #define INODE_BLOCKS UPPER(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \ |
186 | : MINIX_INODES_PER_BLOCK)) | 186 | : MINIX_INODES_PER_BLOCK)) |
@@ -208,7 +208,7 @@ static char root_block[BLOCK_SIZE] = "\0"; | |||
208 | static char *inode_buffer = NULL; | 208 | static char *inode_buffer = NULL; |
209 | 209 | ||
210 | #define Inode (((struct minix_inode *) inode_buffer)-1) | 210 | #define Inode (((struct minix_inode *) inode_buffer)-1) |
211 | #ifdef BB_FEATURE_MINIX2 | 211 | #ifdef CONFIG_FEATURE_MINIX2 |
212 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) | 212 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) |
213 | #endif | 213 | #endif |
214 | static char super_block_buffer[BLOCK_SIZE]; | 214 | static char super_block_buffer[BLOCK_SIZE]; |
@@ -216,7 +216,7 @@ static char boot_block_buffer[512]; | |||
216 | 216 | ||
217 | #define Super (*(struct minix_super_block *)super_block_buffer) | 217 | #define Super (*(struct minix_super_block *)super_block_buffer) |
218 | #define INODES ((unsigned long)Super.s_ninodes) | 218 | #define INODES ((unsigned long)Super.s_ninodes) |
219 | #ifdef BB_FEATURE_MINIX2 | 219 | #ifdef CONFIG_FEATURE_MINIX2 |
220 | #define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones)) | 220 | #define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones)) |
221 | #else | 221 | #else |
222 | #define ZONES ((unsigned long)(Super.s_nzones)) | 222 | #define ZONES ((unsigned long)(Super.s_nzones)) |
@@ -436,7 +436,7 @@ static void make_bad_inode(void) | |||
436 | write_block(dind, (char *) dind_block); | 436 | write_block(dind, (char *) dind_block); |
437 | } | 437 | } |
438 | 438 | ||
439 | #ifdef BB_FEATURE_MINIX2 | 439 | #ifdef CONFIG_FEATURE_MINIX2 |
440 | static void make_bad_inode2(void) | 440 | static void make_bad_inode2(void) |
441 | { | 441 | { |
442 | struct minix2_inode *inode = &Inode2[MINIX_BAD_INO]; | 442 | struct minix2_inode *inode = &Inode2[MINIX_BAD_INO]; |
@@ -509,7 +509,7 @@ static void make_root_inode(void) | |||
509 | write_block(inode->i_zone[0], root_block); | 509 | write_block(inode->i_zone[0], root_block); |
510 | } | 510 | } |
511 | 511 | ||
512 | #ifdef BB_FEATURE_MINIX2 | 512 | #ifdef CONFIG_FEATURE_MINIX2 |
513 | static void make_root_inode2(void) | 513 | static void make_root_inode2(void) |
514 | { | 514 | { |
515 | struct minix2_inode *inode = &Inode2[MINIX_ROOT_INO]; | 515 | struct minix2_inode *inode = &Inode2[MINIX_ROOT_INO]; |
@@ -550,7 +550,7 @@ static void setup_tables(void) | |||
550 | else | 550 | else |
551 | inodes = req_nr_inodes; | 551 | inodes = req_nr_inodes; |
552 | /* Round up inode count to fill block size */ | 552 | /* Round up inode count to fill block size */ |
553 | #ifdef BB_FEATURE_MINIX2 | 553 | #ifdef CONFIG_FEATURE_MINIX2 |
554 | if (version2) | 554 | if (version2) |
555 | inodes = ((inodes + MINIX2_INODES_PER_BLOCK - 1) & | 555 | inodes = ((inodes + MINIX2_INODES_PER_BLOCK - 1) & |
556 | ~(MINIX2_INODES_PER_BLOCK - 1)); | 556 | ~(MINIX2_INODES_PER_BLOCK - 1)); |
@@ -699,7 +699,7 @@ extern int mkfs_minix_main(int argc, char **argv) | |||
699 | 699 | ||
700 | if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE) | 700 | if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE) |
701 | error_msg_and_die("bad inode size"); | 701 | error_msg_and_die("bad inode size"); |
702 | #ifdef BB_FEATURE_MINIX2 | 702 | #ifdef CONFIG_FEATURE_MINIX2 |
703 | if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE) | 703 | if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE) |
704 | error_msg_and_die("bad inode size"); | 704 | error_msg_and_die("bad inode size"); |
705 | #endif | 705 | #endif |
@@ -764,7 +764,7 @@ extern int mkfs_minix_main(int argc, char **argv) | |||
764 | break; | 764 | break; |
765 | } | 765 | } |
766 | case 'v': | 766 | case 'v': |
767 | #ifdef BB_FEATURE_MINIX2 | 767 | #ifdef CONFIG_FEATURE_MINIX2 |
768 | version2 = 1; | 768 | version2 = 1; |
769 | #else | 769 | #else |
770 | error_msg("%s: not compiled with minix v2 support", | 770 | error_msg("%s: not compiled with minix v2 support", |
@@ -796,7 +796,7 @@ goodbye: | |||
796 | if (!device_name || BLOCKS < 10) { | 796 | if (!device_name || BLOCKS < 10) { |
797 | show_usage(); | 797 | show_usage(); |
798 | } | 798 | } |
799 | #ifdef BB_FEATURE_MINIX2 | 799 | #ifdef CONFIG_FEATURE_MINIX2 |
800 | if (version2) { | 800 | if (version2) { |
801 | if (namelen == 14) | 801 | if (namelen == 14) |
802 | magic = MINIX2_SUPER_MAGIC; | 802 | magic = MINIX2_SUPER_MAGIC; |
@@ -830,7 +830,7 @@ goodbye: | |||
830 | check_blocks(); | 830 | check_blocks(); |
831 | else if (listfile) | 831 | else if (listfile) |
832 | get_list_blocks(listfile); | 832 | get_list_blocks(listfile); |
833 | #ifdef BB_FEATURE_MINIX2 | 833 | #ifdef CONFIG_FEATURE_MINIX2 |
834 | if (version2) { | 834 | if (version2) { |
835 | make_root_inode2(); | 835 | make_root_inode2(); |
836 | make_bad_inode2(); | 836 | make_bad_inode2(); |
diff --git a/util-linux/more.c b/util-linux/more.c index 780cddf66..5fe1da423 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | static FILE *cin; | 38 | static FILE *cin; |
39 | 39 | ||
40 | #ifdef BB_FEATURE_USE_TERMIOS | 40 | #ifdef CONFIG_FEATURE_USE_TERMIOS |
41 | #include <termios.h> | 41 | #include <termios.h> |
42 | #define setTermSettings(fd,argp) tcsetattr(fd,TCSANOW,argp) | 42 | #define setTermSettings(fd,argp) tcsetattr(fd,TCSANOW,argp) |
43 | #define getTermSettings(fd,argp) tcgetattr(fd, argp); | 43 | #define getTermSettings(fd,argp) tcgetattr(fd, argp); |
@@ -54,7 +54,7 @@ static void gotsig(int sig) | |||
54 | putchar('\n'); | 54 | putchar('\n'); |
55 | exit(EXIT_FAILURE); | 55 | exit(EXIT_FAILURE); |
56 | } | 56 | } |
57 | #endif /* BB_FEATURE_USE_TERMIOS */ | 57 | #endif /* CONFIG_FEATURE_USE_TERMIOS */ |
58 | 58 | ||
59 | 59 | ||
60 | static int terminal_width = 79; /* not 80 in case terminal has linefold bug */ | 60 | static int terminal_width = 79; /* not 80 in case terminal has linefold bug */ |
@@ -69,7 +69,7 @@ extern int more_main(int argc, char **argv) | |||
69 | FILE *file; | 69 | FILE *file; |
70 | int len, page_height; | 70 | int len, page_height; |
71 | 71 | ||
72 | #if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS | 72 | #if defined CONFIG_FEATURE_AUTOWIDTH && defined CONFIG_FEATURE_USE_TERMIOS |
73 | struct winsize win = { 0, 0, 0, 0 }; | 73 | struct winsize win = { 0, 0, 0, 0 }; |
74 | #endif | 74 | #endif |
75 | 75 | ||
@@ -83,7 +83,7 @@ extern int more_main(int argc, char **argv) | |||
83 | if (!cin) | 83 | if (!cin) |
84 | cin = xfopen(CONSOLE_DEV, "r"); | 84 | cin = xfopen(CONSOLE_DEV, "r"); |
85 | please_display_more_prompt = 0; | 85 | please_display_more_prompt = 0; |
86 | #ifdef BB_FEATURE_USE_TERMIOS | 86 | #ifdef CONFIG_FEATURE_USE_TERMIOS |
87 | getTermSettings(fileno(cin), &initial_settings); | 87 | getTermSettings(fileno(cin), &initial_settings); |
88 | new_settings = initial_settings; | 88 | new_settings = initial_settings; |
89 | new_settings.c_lflag &= ~ICANON; | 89 | new_settings.c_lflag &= ~ICANON; |
@@ -114,7 +114,7 @@ extern int more_main(int argc, char **argv) | |||
114 | if(please_display_more_prompt>0) | 114 | if(please_display_more_prompt>0) |
115 | please_display_more_prompt = 0; | 115 | please_display_more_prompt = 0; |
116 | 116 | ||
117 | #if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS | 117 | #if defined CONFIG_FEATURE_AUTOWIDTH && defined CONFIG_FEATURE_USE_TERMIOS |
118 | ioctl(fileno(stdout), TIOCGWINSZ, &win); | 118 | ioctl(fileno(stdout), TIOCGWINSZ, &win); |
119 | if (win.ws_row > 4) | 119 | if (win.ws_row > 4) |
120 | terminal_height = win.ws_row - 2; | 120 | terminal_height = win.ws_row - 2; |
@@ -147,7 +147,7 @@ extern int more_main(int argc, char **argv) | |||
147 | * to get input from the user. | 147 | * to get input from the user. |
148 | */ | 148 | */ |
149 | input = getc(cin); | 149 | input = getc(cin); |
150 | #ifndef BB_FEATURE_USE_TERMIOS | 150 | #ifndef CONFIG_FEATURE_USE_TERMIOS |
151 | printf("\033[A"); /* up cursor */ | 151 | printf("\033[A"); /* up cursor */ |
152 | #endif | 152 | #endif |
153 | /* Erase the "More" message */ | 153 | /* Erase the "More" message */ |
diff --git a/util-linux/mount.c b/util-linux/mount.c index af57a7623..bfa9a3040 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #include <mntent.h> | 52 | #include <mntent.h> |
53 | #include <ctype.h> | 53 | #include <ctype.h> |
54 | #include "busybox.h" | 54 | #include "busybox.h" |
55 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 55 | #if defined CONFIG_FEATURE_USE_DEVPS_PATCH |
56 | # include <linux/devmtab.h> /* For Erik's nifty devmtab device driver */ | 56 | # include <linux/devmtab.h> /* For Erik's nifty devmtab device driver */ |
57 | #endif | 57 | #endif |
58 | 58 | ||
@@ -74,7 +74,7 @@ enum { | |||
74 | }; | 74 | }; |
75 | 75 | ||
76 | 76 | ||
77 | #if defined BB_FEATURE_MOUNT_LOOP | 77 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
78 | #include <fcntl.h> | 78 | #include <fcntl.h> |
79 | #include <sys/ioctl.h> | 79 | #include <sys/ioctl.h> |
80 | static int use_loop = FALSE; | 80 | static int use_loop = FALSE; |
@@ -123,13 +123,13 @@ do_mount(char *specialfile, char *dir, char *filesystemtype, | |||
123 | char *mtab_opts, int mount_all) | 123 | char *mtab_opts, int mount_all) |
124 | { | 124 | { |
125 | int status = 0; | 125 | int status = 0; |
126 | #if defined BB_FEATURE_MOUNT_LOOP | 126 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
127 | char *lofile = NULL; | 127 | char *lofile = NULL; |
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | if (fakeIt == FALSE) | 130 | if (fakeIt == FALSE) |
131 | { | 131 | { |
132 | #if defined BB_FEATURE_MOUNT_LOOP | 132 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
133 | if (use_loop==TRUE) { | 133 | if (use_loop==TRUE) { |
134 | int loro = flags & MS_RDONLY; | 134 | int loro = flags & MS_RDONLY; |
135 | 135 | ||
@@ -162,7 +162,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype, | |||
162 | /* If the mount was sucessful, do anything needed, then return TRUE */ | 162 | /* If the mount was sucessful, do anything needed, then return TRUE */ |
163 | if (status == 0 || fakeIt==TRUE) { | 163 | if (status == 0 || fakeIt==TRUE) { |
164 | 164 | ||
165 | #if defined BB_FEATURE_MTAB_SUPPORT | 165 | #if defined CONFIG_FEATURE_MTAB_SUPPORT |
166 | if (useMtab == TRUE) { | 166 | if (useMtab == TRUE) { |
167 | erase_mtab(specialfile); // Clean any stale entries | 167 | erase_mtab(specialfile); // Clean any stale entries |
168 | write_mtab(specialfile, dir, filesystemtype, flags, mtab_opts); | 168 | write_mtab(specialfile, dir, filesystemtype, flags, mtab_opts); |
@@ -172,7 +172,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype, | |||
172 | } | 172 | } |
173 | 173 | ||
174 | /* Bummer. mount failed. Clean up */ | 174 | /* Bummer. mount failed. Clean up */ |
175 | #if defined BB_FEATURE_MOUNT_LOOP | 175 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
176 | if (lofile != NULL) { | 176 | if (lofile != NULL) { |
177 | del_loop(specialfile); | 177 | del_loop(specialfile); |
178 | } | 178 | } |
@@ -209,7 +209,7 @@ parse_mount_options(char *options, int *flags, char *strflags) | |||
209 | } | 209 | } |
210 | f++; | 210 | f++; |
211 | } | 211 | } |
212 | #if defined BB_FEATURE_MOUNT_LOOP | 212 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
213 | if (gotone == FALSE && !strcasecmp("loop", options)) { /* loop device support */ | 213 | if (gotone == FALSE && !strcasecmp("loop", options)) { /* loop device support */ |
214 | use_loop = TRUE; | 214 | use_loop = TRUE; |
215 | gotone = TRUE; | 215 | gotone = TRUE; |
@@ -240,7 +240,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
240 | { | 240 | { |
241 | int status = 0; | 241 | int status = 0; |
242 | 242 | ||
243 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 243 | #if defined CONFIG_FEATURE_USE_DEVPS_PATCH |
244 | if (strcmp(filesystemType, "auto") == 0) { | 244 | if (strcmp(filesystemType, "auto") == 0) { |
245 | static const char *noauto_array[] = { "tmpfs", "shm", "proc", "ramfs", "devpts", "devfs", "usbdevfs", 0 }; | 245 | static const char *noauto_array[] = { "tmpfs", "shm", "proc", "ramfs", "devpts", "devfs", "usbdevfs", 0 }; |
246 | const char **noauto_fstype; | 246 | const char **noauto_fstype; |
@@ -310,7 +310,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType, | |||
310 | 310 | ||
311 | void show_mounts(void) | 311 | void show_mounts(void) |
312 | { | 312 | { |
313 | #if defined BB_FEATURE_USE_DEVPS_PATCH | 313 | #if defined CONFIG_FEATURE_USE_DEVPS_PATCH |
314 | int fd, i, numfilesystems; | 314 | int fd, i, numfilesystems; |
315 | char device[] = "/dev/mtab"; | 315 | char device[] = "/dev/mtab"; |
316 | struct k_mntent *mntentlist; | 316 | struct k_mntent *mntentlist; |
@@ -337,7 +337,7 @@ void show_mounts(void) | |||
337 | mntentlist[i].mnt_opts, mntentlist[i].mnt_freq, | 337 | mntentlist[i].mnt_opts, mntentlist[i].mnt_freq, |
338 | mntentlist[i].mnt_passno); | 338 | mntentlist[i].mnt_passno); |
339 | } | 339 | } |
340 | #ifdef BB_FEATURE_CLEAN_UP | 340 | #ifdef CONFIG_FEATURE_CLEAN_UP |
341 | /* Don't bother to close files or free memory. Exit | 341 | /* Don't bother to close files or free memory. Exit |
342 | * does that automagically, so we can save a few bytes */ | 342 | * does that automagically, so we can save a few bytes */ |
343 | free( mntentlist); | 343 | free( mntentlist); |
@@ -357,7 +357,7 @@ void show_mounts(void) | |||
357 | } | 357 | } |
358 | printf("%s on %s type %s (%s)\n", blockDevice, m->mnt_dir, | 358 | printf("%s on %s type %s (%s)\n", blockDevice, m->mnt_dir, |
359 | m->mnt_type, m->mnt_opts); | 359 | m->mnt_type, m->mnt_opts); |
360 | #ifdef BB_FEATURE_CLEAN_UP | 360 | #ifdef CONFIG_FEATURE_CLEAN_UP |
361 | if(blockDevice != m->mnt_fsname) | 361 | if(blockDevice != m->mnt_fsname) |
362 | free(blockDevice); | 362 | free(blockDevice); |
363 | #endif | 363 | #endif |
@@ -408,7 +408,7 @@ extern int mount_main(int argc, char **argv) | |||
408 | case 'f': | 408 | case 'f': |
409 | fakeIt = TRUE; | 409 | fakeIt = TRUE; |
410 | break; | 410 | break; |
411 | #ifdef BB_FEATURE_MTAB_SUPPORT | 411 | #ifdef CONFIG_FEATURE_MTAB_SUPPORT |
412 | case 'n': | 412 | case 'n': |
413 | useMtab = FALSE; | 413 | useMtab = FALSE; |
414 | break; | 414 | break; |
@@ -467,7 +467,7 @@ extern int mount_main(int argc, char **argv) | |||
467 | singlemount: | 467 | singlemount: |
468 | string_flags = strdup(string_flags); | 468 | string_flags = strdup(string_flags); |
469 | rc = EXIT_SUCCESS; | 469 | rc = EXIT_SUCCESS; |
470 | #ifdef BB_NFSMOUNT | 470 | #ifdef CONFIG_NFSMOUNT |
471 | if (strchr(device, ':') != NULL) | 471 | if (strchr(device, ':') != NULL) |
472 | filesystemType = "nfs"; | 472 | filesystemType = "nfs"; |
473 | if (strcmp(filesystemType, "nfs") == 0) { | 473 | if (strcmp(filesystemType, "nfs") == 0) { |
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index d9eb5baae..6cc736ab1 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c | |||
@@ -2,9 +2,8 @@ | |||
2 | /* | 2 | /* |
3 | * Mini swapon/swapoff implementation for busybox | 3 | * Mini swapon/swapoff implementation for busybox |
4 | * | 4 | * |
5 | * | 5 | * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen |
6 | * Copyright (C) 1999,2000,2001 by Lineo, inc. | 6 | * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> |
7 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
8 | * | 7 | * |
9 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/util-linux/umount.c b/util-linux/umount.c index 74638d21c..99db3084c 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -2,9 +2,8 @@ | |||
2 | /* | 2 | /* |
3 | * Mini umount implementation for busybox | 3 | * Mini umount implementation for busybox |
4 | * | 4 | * |
5 | * | 5 | * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen |
6 | * Copyright (C) 1999,2000,2001 by Lineo, inc. | 6 | * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org> |
7 | * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org> | ||
8 | * | 7 | * |
9 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
10 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -57,13 +56,13 @@ static struct _mtab_entry_t *mtab_cache = NULL; | |||
57 | 56 | ||
58 | 57 | ||
59 | 58 | ||
60 | #if defined BB_FEATURE_MOUNT_FORCE | 59 | #if defined CONFIG_FEATURE_MOUNT_FORCE |
61 | static int doForce = FALSE; | 60 | static int doForce = FALSE; |
62 | #endif | 61 | #endif |
63 | #if defined BB_FEATURE_MOUNT_LOOP | 62 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
64 | static int freeLoop = TRUE; | 63 | static int freeLoop = TRUE; |
65 | #endif | 64 | #endif |
66 | #if defined BB_FEATURE_MTAB_SUPPORT | 65 | #if defined CONFIG_FEATURE_MTAB_SUPPORT |
67 | static int useMtab = TRUE; | 66 | static int useMtab = TRUE; |
68 | #endif | 67 | #endif |
69 | static int umountAll = FALSE; | 68 | static int umountAll = FALSE; |
@@ -112,7 +111,7 @@ static char *mtab_getinfo(const char *match, const char which) | |||
112 | if (which == MTAB_GETMOUNTPT) { | 111 | if (which == MTAB_GETMOUNTPT) { |
113 | return cur->mountpt; | 112 | return cur->mountpt; |
114 | } else { | 113 | } else { |
115 | #if !defined BB_FEATURE_MTAB_SUPPORT | 114 | #if !defined CONFIG_FEATURE_MTAB_SUPPORT |
116 | if (strcmp(cur->device, "/dev/root") == 0) { | 115 | if (strcmp(cur->device, "/dev/root") == 0) { |
117 | /* Adjusts device to be the real root device, | 116 | /* Adjusts device to be the real root device, |
118 | * or leaves device alone if it can't find it */ | 117 | * or leaves device alone if it can't find it */ |
@@ -151,7 +150,7 @@ static char *mtab_first(void **iter) | |||
151 | 150 | ||
152 | /* Don't bother to clean up, since exit() does that | 151 | /* Don't bother to clean up, since exit() does that |
153 | * automagically, so we can save a few bytes */ | 152 | * automagically, so we can save a few bytes */ |
154 | #ifdef BB_FEATURE_CLEAN_UP | 153 | #ifdef CONFIG_FEATURE_CLEAN_UP |
155 | static void mtab_free(void) | 154 | static void mtab_free(void) |
156 | { | 155 | { |
157 | struct _mtab_entry_t *this, *next; | 156 | struct _mtab_entry_t *this, *next; |
@@ -179,12 +178,12 @@ static int do_umount(const char *name) | |||
179 | 178 | ||
180 | status = umount(name); | 179 | status = umount(name); |
181 | 180 | ||
182 | #if defined BB_FEATURE_MOUNT_LOOP | 181 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
183 | if (freeLoop == TRUE && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9)) | 182 | if (freeLoop == TRUE && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9)) |
184 | /* this was a loop device, delete it */ | 183 | /* this was a loop device, delete it */ |
185 | del_loop(blockDevice); | 184 | del_loop(blockDevice); |
186 | #endif | 185 | #endif |
187 | #if defined BB_FEATURE_MOUNT_FORCE | 186 | #if defined CONFIG_FEATURE_MOUNT_FORCE |
188 | if (status != 0 && doForce == TRUE) { | 187 | if (status != 0 && doForce == TRUE) { |
189 | status = umount2(blockDevice, MNT_FORCE); | 188 | status = umount2(blockDevice, MNT_FORCE); |
190 | if (status != 0) { | 189 | if (status != 0) { |
@@ -202,7 +201,7 @@ static int do_umount(const char *name) | |||
202 | } | 201 | } |
203 | } | 202 | } |
204 | if (status == 0) { | 203 | if (status == 0) { |
205 | #if defined BB_FEATURE_MTAB_SUPPORT | 204 | #if defined CONFIG_FEATURE_MTAB_SUPPORT |
206 | if (useMtab == TRUE) | 205 | if (useMtab == TRUE) |
207 | erase_mtab(name); | 206 | erase_mtab(name); |
208 | #endif | 207 | #endif |
@@ -246,7 +245,7 @@ extern int umount_main(int argc, char **argv) | |||
246 | if (argc < 2) { | 245 | if (argc < 2) { |
247 | show_usage(); | 246 | show_usage(); |
248 | } | 247 | } |
249 | #ifdef BB_FEATURE_CLEAN_UP | 248 | #ifdef CONFIG_FEATURE_CLEAN_UP |
250 | atexit(mtab_free); | 249 | atexit(mtab_free); |
251 | #endif | 250 | #endif |
252 | 251 | ||
@@ -257,17 +256,17 @@ extern int umount_main(int argc, char **argv) | |||
257 | case 'a': | 256 | case 'a': |
258 | umountAll = TRUE; | 257 | umountAll = TRUE; |
259 | break; | 258 | break; |
260 | #if defined BB_FEATURE_MOUNT_LOOP | 259 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
261 | case 'l': | 260 | case 'l': |
262 | freeLoop = FALSE; | 261 | freeLoop = FALSE; |
263 | break; | 262 | break; |
264 | #endif | 263 | #endif |
265 | #ifdef BB_FEATURE_MTAB_SUPPORT | 264 | #ifdef CONFIG_FEATURE_MTAB_SUPPORT |
266 | case 'n': | 265 | case 'n': |
267 | useMtab = FALSE; | 266 | useMtab = FALSE; |
268 | break; | 267 | break; |
269 | #endif | 268 | #endif |
270 | #ifdef BB_FEATURE_MOUNT_FORCE | 269 | #ifdef CONFIG_FEATURE_MOUNT_FORCE |
271 | case 'f': | 270 | case 'f': |
272 | doForce = TRUE; | 271 | doForce = TRUE; |
273 | break; | 272 | break; |