summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorEric Andersen2001-10-24 05:00:29 +0000
committerEric Andersen2001-10-24 05:00:29 +0000
commitbdfd0d78bc44e73d693510e70087857785b3b521 (patch)
tree153a573095afac8d8d0ea857759ecabd77fb28b7 /util-linux
parent9260fc5552a3ee52eb95823aa6689d52a1ffd33c (diff)
downloadbusybox-bdfd0d78bc44e73d693510e70087857785b3b521.zip
busybox-bdfd0d78bc44e73d693510e70087857785b3b521.tar.gz
Major rework of the directory structure and the entire build system.
-Erik
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/Makefile48
-rw-r--r--util-linux/config.in27
-rw-r--r--util-linux/fbset.c12
-rw-r--r--util-linux/fsck_minix.c42
-rw-r--r--util-linux/mkfs_minix.c20
-rw-r--r--util-linux/more.c12
-rw-r--r--util-linux/mount.c26
-rw-r--r--util-linux/swaponoff.c5
-rw-r--r--util-linux/umount.c29
9 files changed, 147 insertions, 74 deletions
diff --git a/util-linux/Makefile b/util-linux/Makefile
new file mode 100644
index 0000000..ddecf50
--- /dev/null
+++ b/util-linux/Makefile
@@ -0,0 +1,48 @@
+# Makefile for busybox
+#
+# Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+TOPDIR :=..
+L_TARGET := util-linux.a
+
+obj-y :=
+obj-n :=
+obj- :=
+
+obj-$(CONFIG_DMESG) += dmesg.o
+obj-$(CONFIG_FBSET) += fbset.o
+obj-$(CONFIG_FDFLUSH) += fdflush.o
+obj-$(CONFIG_FREERAMDISK) += freeramdisk.o
+obj-$(CONFIG_FSCK_MINIX) += fsck_minix.o
+obj-$(CONFIG_GETOPT) += getopt.o
+obj-$(CONFIG_MKFS_MINIX) += mkfs_minix.o
+obj-$(CONFIG_MKSWAP) += mkswap.o
+obj-$(CONFIG_MORE) += more.o
+obj-$(CONFIG_MOUNT) += mount.o
+obj-$(CONFIG_NFSMOUNT) += nfsmount.o
+obj-$(CONFIG_PIVOT_ROOT) += pivot_root.o
+obj-$(CONFIG_RDATE) += rdate.o
+obj-$(CONFIG_SWAPONOFF) += swaponoff.o
+obj-$(CONFIG_UMOUNT) += umount.o
+
+# Hand off to toplevel Rules.mak
+include $(TOPDIR)/Rules.mak
+
+clean:
+ rm -f $(L_TARGET) *.o core
+
diff --git a/util-linux/config.in b/util-linux/config.in
new file mode 100644
index 0000000..3eb8ee0
--- /dev/null
+++ b/util-linux/config.in
@@ -0,0 +1,27 @@
+#
+# For a description of the syntax of this configuration file,
+# see scripts/kbuild/config-language.txt.
+#
+
+mainmenu_option next_comment
+comment 'Linux System Utilities'
+
+
+bool 'dmesg' CONFIG_DMESG
+bool 'fbset' CONFIG_FBSET
+bool 'fdflush' CONFIG_FDFLUSH
+bool 'freeramdisk' CONFIG_FREERAMDISK
+bool 'fsck_minix' CONFIG_FSCK_MINIX
+bool 'getopt' CONFIG_GETOPT
+bool 'mkfs_minix' CONFIG_MKFS_MINIX
+bool 'mkswap' CONFIG_MKSWAP
+bool 'more' CONFIG_MORE
+bool 'mount' CONFIG_MOUNT
+bool 'nfsmount' CONFIG_NFSMOUNT
+bool 'pivot_root' CONFIG_PIVOT_ROOT
+bool 'rdate' CONFIG_RDATE
+bool 'swaponoff' CONFIG_SWAPONOFF
+bool 'umount' CONFIG_UMOUNT
+
+endmenu
+
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 5ccd80e..2a959c2 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -56,7 +56,7 @@ enum {
CMD_INFO = 12,
CMD_CHANGE = 13,
-#ifdef BB_FEATURE_FBSET_FANCY
+#ifdef CONFIG_FEATURE_FBSET_FANCY
CMD_XRES = 100,
CMD_YRES = 101,
CMD_VXRES = 102,
@@ -149,7 +149,7 @@ static struct cmdoptions_t {
"-laced", 1, CMD_LACED}, {
"-double", 1, CMD_DOUBLE}, {
"-n", 0, CMD_CHANGE}, {
-#ifdef BB_FEATURE_FBSET_FANCY
+#ifdef CONFIG_FEATURE_FBSET_FANCY
"-all", 0, CMD_ALL}, {
"-xres", 1, CMD_XRES}, {
"-yres", 1, CMD_YRES}, {
@@ -177,7 +177,7 @@ static struct cmdoptions_t {
0, 0, 0}
};
-#ifdef BB_FEATURE_FBSET_READMODE
+#ifdef CONFIG_FEATURE_FBSET_READMODE
/* taken from linux/fb.h */
static const int FB_VMODE_INTERLACED = 1; /* interlaced */
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 */
static int readmode(struct fb_var_screeninfo *base, const char *fn,
const char *mode)
{
-#ifdef BB_FEATURE_FBSET_READMODE
+#ifdef CONFIG_FEATURE_FBSET_READMODE
FILE *f;
char buf[256];
char *p = buf;
@@ -313,7 +313,7 @@ static void showmode(struct fb_var_screeninfo *v)
v->vsync_len);
}
printf("\nmode \"%ux%u-%u\"\n", v->xres, v->yres, (int) (vrate + 0.5));
-#ifdef BB_FEATURE_FBSET_FANCY
+#ifdef CONFIG_FEATURE_FBSET_FANCY
printf("\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n", drate / 1e6,
hrate / 1e3, vrate);
#endif
@@ -377,7 +377,7 @@ extern int fbset_main(int argc, char **argv)
case CMD_CHANGE:
g_options |= OPT_CHANGE;
break;
-#ifdef BB_FEATURE_FBSET_FANCY
+#ifdef CONFIG_FEATURE_FBSET_FANCY
case CMD_XRES:
varset.xres = strtoul(argv[1], 0, 0);
break;
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index 952968d..dbe4f74 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -191,7 +191,7 @@ static const int ROOT_INO = 1;
#define UPPER(size,n) ((size+((n)-1))/(n))
#define INODE_SIZE (sizeof(struct minix_inode))
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
#define INODE_SIZE2 (sizeof(struct minix2_inode))
#define INODE_BLOCKS UPPER(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \
: MINIX_INODES_PER_BLOCK))
@@ -232,7 +232,7 @@ static char super_block_buffer[BLOCK_SIZE];
#define Super (*(struct minix_super_block *)super_block_buffer)
#define INODES ((unsigned long)Super.s_ninodes)
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
#define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones))
#else
#define ZONES ((unsigned long)(Super.s_nzones))
@@ -252,7 +252,7 @@ static unsigned char *inode_count = NULL;
static unsigned char *zone_count = NULL;
static void recursive_check(unsigned int ino);
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void recursive_check2(unsigned int ino);
#endif
@@ -408,7 +408,7 @@ static int check_zone_nr(unsigned short *nr, int *corrected)
return 0;
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static int check_zone_nr2(unsigned int *nr, int *corrected)
{
if (!*nr)
@@ -515,7 +515,7 @@ static int map_block(struct minix_inode *inode, unsigned int blknr)
return result;
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static int map_block2(struct minix2_inode *inode, unsigned int blknr)
{
unsigned int ind[BLOCK_SIZE >> 2];
@@ -613,7 +613,7 @@ static void get_dirsize(void)
char blk[BLOCK_SIZE];
int size;
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
if (version2)
block = Inode2[ROOT_INO].i_zone[0];
else
@@ -644,7 +644,7 @@ static void read_superblock(void)
namelen = 30;
dirsize = 32;
version2 = 0;
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
} else if (MAGIC == MINIX2_SUPER_MAGIC) {
namelen = 14;
dirsize = 16;
@@ -742,7 +742,7 @@ static struct minix_inode *get_inode(unsigned int nr)
return inode;
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static struct minix2_inode *get_inode2(unsigned int nr)
{
struct minix2_inode *inode;
@@ -798,7 +798,7 @@ static void check_root(void)
die("root inode isn't a directory");
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void check_root2(void)
{
struct minix2_inode *inode = Inode2 + ROOT_INO;
@@ -841,7 +841,7 @@ static int add_zone(unsigned short *znr, int *corrected)
return block;
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static int add_zone2(unsigned int *znr, int *corrected)
{
int result;
@@ -892,7 +892,7 @@ static void add_zone_ind(unsigned short *znr, int *corrected)
write_block(block, blk);
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void add_zone_ind2(unsigned int *znr, int *corrected)
{
static char blk[BLOCK_SIZE];
@@ -926,7 +926,7 @@ static void add_zone_dind(unsigned short *znr, int *corrected)
write_block(block, blk);
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void add_zone_dind2(unsigned int *znr, int *corrected)
{
static char blk[BLOCK_SIZE];
@@ -977,7 +977,7 @@ static void check_zones(unsigned int i)
add_zone_dind(8 + inode->i_zone, &changed);
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void check_zones2(unsigned int i)
{
struct minix2_inode *inode;
@@ -1062,7 +1062,7 @@ static void check_file(struct minix_inode *dir, unsigned int offset)
return;
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void check_file2(struct minix2_inode *dir, unsigned int offset)
{
static char blk[BLOCK_SIZE];
@@ -1143,7 +1143,7 @@ static void recursive_check(unsigned int ino)
check_file(dir, offset);
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void recursive_check2(unsigned int ino)
{
struct minix2_inode *dir;
@@ -1221,7 +1221,7 @@ static void check_counts(void)
}
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void check_counts2(void)
{
int i;
@@ -1283,7 +1283,7 @@ static void check(void)
check_counts();
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void check2(void)
{
memset(inode_count, 0, (INODES + 1) * sizeof(*inode_count));
@@ -1305,7 +1305,7 @@ static void alloc_name_list(void)
name_list[i] = xmalloc(sizeof(char) * BUFSIZ + 1);
}
-#ifdef BB_FEATURE_CLEAN_UP
+#ifdef CONFIG_FEATURE_CLEAN_UP
/* execute this atexit() to deallocate name_list[] */
/* piptigger was here */
static void free_name_list(void)
@@ -1330,7 +1330,7 @@ extern int fsck_minix_main(int argc, char **argv)
int retcode = 0;
alloc_name_list();
-#ifdef BB_FEATURE_CLEAN_UP
+#ifdef CONFIG_FEATURE_CLEAN_UP
/* Don't bother to free memory. Exit does
* that automagically, so we can save a few bytes */
atexit(free_name_list);
@@ -1338,7 +1338,7 @@ extern int fsck_minix_main(int argc, char **argv)
if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE)
die("bad inode size");
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE)
die("bad v2 inode size");
#endif
@@ -1422,7 +1422,7 @@ extern int fsck_minix_main(int argc, char **argv)
tcsetattr(0, TCSANOW, &tmp);
termios_set = 1;
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
if (version2) {
check_root2();
check2();
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index ccc0e85..a388d0a 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -180,7 +180,7 @@ struct minix_dir_entry {
#define UPPER(size,n) (((size)+((n)-1))/(n))
#define INODE_SIZE (sizeof(struct minix_inode))
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
#define INODE_SIZE2 (sizeof(struct minix2_inode))
#define INODE_BLOCKS UPPER(INODES, (version2 ? MINIX2_INODES_PER_BLOCK \
: MINIX_INODES_PER_BLOCK))
@@ -208,7 +208,7 @@ static char root_block[BLOCK_SIZE] = "\0";
static char *inode_buffer = NULL;
#define Inode (((struct minix_inode *) inode_buffer)-1)
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
#define Inode2 (((struct minix2_inode *) inode_buffer)-1)
#endif
static char super_block_buffer[BLOCK_SIZE];
@@ -216,7 +216,7 @@ static char boot_block_buffer[512];
#define Super (*(struct minix_super_block *)super_block_buffer)
#define INODES ((unsigned long)Super.s_ninodes)
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
#define ZONES ((unsigned long)(version2 ? Super.s_zones : Super.s_nzones))
#else
#define ZONES ((unsigned long)(Super.s_nzones))
@@ -436,7 +436,7 @@ static void make_bad_inode(void)
write_block(dind, (char *) dind_block);
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void make_bad_inode2(void)
{
struct minix2_inode *inode = &Inode2[MINIX_BAD_INO];
@@ -509,7 +509,7 @@ static void make_root_inode(void)
write_block(inode->i_zone[0], root_block);
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
static void make_root_inode2(void)
{
struct minix2_inode *inode = &Inode2[MINIX_ROOT_INO];
@@ -550,7 +550,7 @@ static void setup_tables(void)
else
inodes = req_nr_inodes;
/* Round up inode count to fill block size */
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
if (version2)
inodes = ((inodes + MINIX2_INODES_PER_BLOCK - 1) &
~(MINIX2_INODES_PER_BLOCK - 1));
@@ -699,7 +699,7 @@ extern int mkfs_minix_main(int argc, char **argv)
if (INODE_SIZE * MINIX_INODES_PER_BLOCK != BLOCK_SIZE)
error_msg_and_die("bad inode size");
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
if (INODE_SIZE2 * MINIX2_INODES_PER_BLOCK != BLOCK_SIZE)
error_msg_and_die("bad inode size");
#endif
@@ -764,7 +764,7 @@ extern int mkfs_minix_main(int argc, char **argv)
break;
}
case 'v':
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
version2 = 1;
#else
error_msg("%s: not compiled with minix v2 support",
@@ -796,7 +796,7 @@ goodbye:
if (!device_name || BLOCKS < 10) {
show_usage();
}
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
if (version2) {
if (namelen == 14)
magic = MINIX2_SUPER_MAGIC;
@@ -830,7 +830,7 @@ goodbye:
check_blocks();
else if (listfile)
get_list_blocks(listfile);
-#ifdef BB_FEATURE_MINIX2
+#ifdef CONFIG_FEATURE_MINIX2
if (version2) {
make_root_inode2();
make_bad_inode2();
diff --git a/util-linux/more.c b/util-linux/more.c
index 780cddf..5fe1da4 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -37,7 +37,7 @@
static FILE *cin;
-#ifdef BB_FEATURE_USE_TERMIOS
+#ifdef CONFIG_FEATURE_USE_TERMIOS
#include <termios.h>
#define setTermSettings(fd,argp) tcsetattr(fd,TCSANOW,argp)
#define getTermSettings(fd,argp) tcgetattr(fd, argp);
@@ -54,7 +54,7 @@ static void gotsig(int sig)
putchar('\n');
exit(EXIT_FAILURE);
}
-#endif /* BB_FEATURE_USE_TERMIOS */
+#endif /* CONFIG_FEATURE_USE_TERMIOS */
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)
FILE *file;
int len, page_height;
-#if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS
+#if defined CONFIG_FEATURE_AUTOWIDTH && defined CONFIG_FEATURE_USE_TERMIOS
struct winsize win = { 0, 0, 0, 0 };
#endif
@@ -83,7 +83,7 @@ extern int more_main(int argc, char **argv)
if (!cin)
cin = xfopen(CONSOLE_DEV, "r");
please_display_more_prompt = 0;
-#ifdef BB_FEATURE_USE_TERMIOS
+#ifdef CONFIG_FEATURE_USE_TERMIOS
getTermSettings(fileno(cin), &initial_settings);
new_settings = initial_settings;
new_settings.c_lflag &= ~ICANON;
@@ -114,7 +114,7 @@ extern int more_main(int argc, char **argv)
if(please_display_more_prompt>0)
please_display_more_prompt = 0;
-#if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS
+#if defined CONFIG_FEATURE_AUTOWIDTH && defined CONFIG_FEATURE_USE_TERMIOS
ioctl(fileno(stdout), TIOCGWINSZ, &win);
if (win.ws_row > 4)
terminal_height = win.ws_row - 2;
@@ -147,7 +147,7 @@ extern int more_main(int argc, char **argv)
* to get input from the user.
*/
input = getc(cin);
-#ifndef BB_FEATURE_USE_TERMIOS
+#ifndef CONFIG_FEATURE_USE_TERMIOS
printf("\033[A"); /* up cursor */
#endif
/* Erase the "More" message */
diff --git a/util-linux/mount.c b/util-linux/mount.c
index af57a76..bfa9a30 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -52,7 +52,7 @@
#include <mntent.h>
#include <ctype.h>
#include "busybox.h"
-#if defined BB_FEATURE_USE_DEVPS_PATCH
+#if defined CONFIG_FEATURE_USE_DEVPS_PATCH
# include <linux/devmtab.h> /* For Erik's nifty devmtab device driver */
#endif
@@ -74,7 +74,7 @@ enum {
};
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
#include <fcntl.h>
#include <sys/ioctl.h>
static int use_loop = FALSE;
@@ -123,13 +123,13 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
char *mtab_opts, int mount_all)
{
int status = 0;
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
char *lofile = NULL;
#endif
if (fakeIt == FALSE)
{
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
if (use_loop==TRUE) {
int loro = flags & MS_RDONLY;
@@ -162,7 +162,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
/* If the mount was sucessful, do anything needed, then return TRUE */
if (status == 0 || fakeIt==TRUE) {
-#if defined BB_FEATURE_MTAB_SUPPORT
+#if defined CONFIG_FEATURE_MTAB_SUPPORT
if (useMtab == TRUE) {
erase_mtab(specialfile); // Clean any stale entries
write_mtab(specialfile, dir, filesystemtype, flags, mtab_opts);
@@ -172,7 +172,7 @@ do_mount(char *specialfile, char *dir, char *filesystemtype,
}
/* Bummer. mount failed. Clean up */
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
if (lofile != NULL) {
del_loop(specialfile);
}
@@ -209,7 +209,7 @@ parse_mount_options(char *options, int *flags, char *strflags)
}
f++;
}
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
if (gotone == FALSE && !strcasecmp("loop", options)) { /* loop device support */
use_loop = TRUE;
gotone = TRUE;
@@ -240,7 +240,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
{
int status = 0;
-#if defined BB_FEATURE_USE_DEVPS_PATCH
+#if defined CONFIG_FEATURE_USE_DEVPS_PATCH
if (strcmp(filesystemType, "auto") == 0) {
static const char *noauto_array[] = { "tmpfs", "shm", "proc", "ramfs", "devpts", "devfs", "usbdevfs", 0 };
const char **noauto_fstype;
@@ -310,7 +310,7 @@ mount_one(char *blockDevice, char *directory, char *filesystemType,
void show_mounts(void)
{
-#if defined BB_FEATURE_USE_DEVPS_PATCH
+#if defined CONFIG_FEATURE_USE_DEVPS_PATCH
int fd, i, numfilesystems;
char device[] = "/dev/mtab";
struct k_mntent *mntentlist;
@@ -337,7 +337,7 @@ void show_mounts(void)
mntentlist[i].mnt_opts, mntentlist[i].mnt_freq,
mntentlist[i].mnt_passno);
}
-#ifdef BB_FEATURE_CLEAN_UP
+#ifdef CONFIG_FEATURE_CLEAN_UP
/* Don't bother to close files or free memory. Exit
* does that automagically, so we can save a few bytes */
free( mntentlist);
@@ -357,7 +357,7 @@ void show_mounts(void)
}
printf("%s on %s type %s (%s)\n", blockDevice, m->mnt_dir,
m->mnt_type, m->mnt_opts);
-#ifdef BB_FEATURE_CLEAN_UP
+#ifdef CONFIG_FEATURE_CLEAN_UP
if(blockDevice != m->mnt_fsname)
free(blockDevice);
#endif
@@ -408,7 +408,7 @@ extern int mount_main(int argc, char **argv)
case 'f':
fakeIt = TRUE;
break;
-#ifdef BB_FEATURE_MTAB_SUPPORT
+#ifdef CONFIG_FEATURE_MTAB_SUPPORT
case 'n':
useMtab = FALSE;
break;
@@ -467,7 +467,7 @@ extern int mount_main(int argc, char **argv)
singlemount:
string_flags = strdup(string_flags);
rc = EXIT_SUCCESS;
-#ifdef BB_NFSMOUNT
+#ifdef CONFIG_NFSMOUNT
if (strchr(device, ':') != NULL)
filesystemType = "nfs";
if (strcmp(filesystemType, "nfs") == 0) {
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index d9eb5ba..6cc736a 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -2,9 +2,8 @@
/*
* Mini swapon/swapoff implementation for busybox
*
- *
- * Copyright (C) 1999,2000,2001 by Lineo, inc.
- * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
+ * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
+ * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* 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 74638d2..99db308 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -2,9 +2,8 @@
/*
* Mini umount implementation for busybox
*
- *
- * Copyright (C) 1999,2000,2001 by Lineo, inc.
- * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
+ * Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
+ * Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* 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;
-#if defined BB_FEATURE_MOUNT_FORCE
+#if defined CONFIG_FEATURE_MOUNT_FORCE
static int doForce = FALSE;
#endif
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
static int freeLoop = TRUE;
#endif
-#if defined BB_FEATURE_MTAB_SUPPORT
+#if defined CONFIG_FEATURE_MTAB_SUPPORT
static int useMtab = TRUE;
#endif
static int umountAll = FALSE;
@@ -112,7 +111,7 @@ static char *mtab_getinfo(const char *match, const char which)
if (which == MTAB_GETMOUNTPT) {
return cur->mountpt;
} else {
-#if !defined BB_FEATURE_MTAB_SUPPORT
+#if !defined CONFIG_FEATURE_MTAB_SUPPORT
if (strcmp(cur->device, "/dev/root") == 0) {
/* Adjusts device to be the real root device,
* or leaves device alone if it can't find it */
@@ -151,7 +150,7 @@ static char *mtab_first(void **iter)
/* Don't bother to clean up, since exit() does that
* automagically, so we can save a few bytes */
-#ifdef BB_FEATURE_CLEAN_UP
+#ifdef CONFIG_FEATURE_CLEAN_UP
static void mtab_free(void)
{
struct _mtab_entry_t *this, *next;
@@ -179,12 +178,12 @@ static int do_umount(const char *name)
status = umount(name);
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
if (freeLoop == TRUE && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9))
/* this was a loop device, delete it */
del_loop(blockDevice);
#endif
-#if defined BB_FEATURE_MOUNT_FORCE
+#if defined CONFIG_FEATURE_MOUNT_FORCE
if (status != 0 && doForce == TRUE) {
status = umount2(blockDevice, MNT_FORCE);
if (status != 0) {
@@ -202,7 +201,7 @@ static int do_umount(const char *name)
}
}
if (status == 0) {
-#if defined BB_FEATURE_MTAB_SUPPORT
+#if defined CONFIG_FEATURE_MTAB_SUPPORT
if (useMtab == TRUE)
erase_mtab(name);
#endif
@@ -246,7 +245,7 @@ extern int umount_main(int argc, char **argv)
if (argc < 2) {
show_usage();
}
-#ifdef BB_FEATURE_CLEAN_UP
+#ifdef CONFIG_FEATURE_CLEAN_UP
atexit(mtab_free);
#endif
@@ -257,17 +256,17 @@ extern int umount_main(int argc, char **argv)
case 'a':
umountAll = TRUE;
break;
-#if defined BB_FEATURE_MOUNT_LOOP
+#if defined CONFIG_FEATURE_MOUNT_LOOP
case 'l':
freeLoop = FALSE;
break;
#endif
-#ifdef BB_FEATURE_MTAB_SUPPORT
+#ifdef CONFIG_FEATURE_MTAB_SUPPORT
case 'n':
useMtab = FALSE;
break;
#endif
-#ifdef BB_FEATURE_MOUNT_FORCE
+#ifdef CONFIG_FEATURE_MOUNT_FORCE
case 'f':
doForce = TRUE;
break;