diff options
Diffstat (limited to 'util-linux')
-rw-r--r-- | util-linux/freeramdisk.c | 3 | ||||
-rw-r--r-- | util-linux/fsck_minix.c | 9 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 4 | ||||
-rw-r--r-- | util-linux/more.c | 12 | ||||
-rw-r--r-- | util-linux/mount.c | 3 |
5 files changed, 21 insertions, 10 deletions
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c index 9636dbdcf..d373bcbf7 100644 --- a/util-linux/freeramdisk.c +++ b/util-linux/freeramdisk.c @@ -23,7 +23,7 @@ #include <stdio.h> #include <string.h> -#include <sys/mount.h> +#include <linux/fs.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> @@ -32,6 +32,7 @@ #include "internal.h" + static const char freeramdisk_usage[] = "freeramdisk DEVICE\n\n" "Free all memory used by the specified ramdisk.\n"; diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index aa0a82432..c890dff7d 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c @@ -97,7 +97,6 @@ #include <termios.h> #include <mntent.h> #include <sys/stat.h> -#include <sys/param.h> /* for PATH_MAX */ #include <linux/fs.h> #include <linux/minix_fs.h> @@ -145,7 +144,7 @@ static int termios_set = 0; /* File-name data */ #define MAX_DEPTH 32 static int name_depth = 0; -// static char name_list[MAX_DEPTH][PATH_MAX + 1]; +// static char name_list[MAX_DEPTH][BUFSIZ + 1]; static char **name_list = NULL; static char *inode_buffer = NULL; @@ -178,8 +177,8 @@ static unsigned char *zone_count = NULL; static void recursive_check(unsigned int ino); static void recursive_check2(unsigned int ino); -#define inode_in_use(x) (bit(inode_map,(x))) -#define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1)) +#define inode_in_use(x) (isset(inode_map,(x))) +#define zone_in_use(x) (isset(zone_map,(x)-FIRSTZONE+1)) #define mark_inode(x) (setbit(inode_map,(x)),changed=1) #define unmark_inode(x) (clrbit(inode_map,(x)),changed=1) @@ -1239,7 +1238,7 @@ static void alloc_name_list(void) name_list = xmalloc(sizeof(char *) * MAX_DEPTH); for (i = 0; i < MAX_DEPTH; i++) - name_list[i] = xmalloc(sizeof(char) * PATH_MAX + 1); + name_list[i] = xmalloc(sizeof(char) * BUFSIZ + 1); } #if 0 diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index 1ee3d4cfa..be180a46b 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c @@ -154,8 +154,8 @@ static unsigned short good_blocks_table[MAX_GOOD_BLOCKS]; static int used_good_blocks = 0; static unsigned long req_nr_inodes = 0; -#define inode_in_use(x) (bit(inode_map,(x))) -#define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1)) +#define inode_in_use(x) (isset(inode_map,(x))) +#define zone_in_use(x) (isset(zone_map,(x)-FIRSTZONE+1)) #define mark_inode(x) (setbit(inode_map,(x))) #define unmark_inode(x) (clrbit(inode_map,(x))) diff --git a/util-linux/more.c b/util-linux/more.c index 909ed286b..30d2757cd 100644 --- a/util-linux/more.c +++ b/util-linux/more.c @@ -48,6 +48,7 @@ static const char more_usage[] = "more [file ...]\n"; #endif FILE *cin; + struct termios initial_settings, new_settings; void gotsig(int sig) @@ -65,7 +66,10 @@ void gotsig(int sig) #if defined BB_FEATURE_AUTOWIDTH -static int terminal_width = 0, terminal_height = 0; +#ifdef BB_FEATURE_USE_TERMIOS +static int terminal_width = 0; +#endif +static int terminal_height = 0; #else #define terminal_width TERMINAL_WIDTH #define terminal_height TERMINAL_HEIGHT @@ -80,7 +84,7 @@ extern int more_main(int argc, char **argv) struct stat st; FILE *file; -#ifdef BB_FEATURE_AUTOWIDTH +#if defined BB_FEATURE_AUTOWIDTH && defined BB_FEATURE_USE_TERMIOS struct winsize win = { 0, 0 }; #endif @@ -151,7 +155,11 @@ extern int more_main(int argc, char **argv) ); fflush(stdout); +#ifdef BB_FEATURE_USE_TERMIOS input = getc(cin); +#else + input = getc(stdin); +#endif #ifdef BB_FEATURE_USE_TERMIOS /* Erase the "More" message */ diff --git a/util-linux/mount.c b/util-linux/mount.c index 972e5066c..456e45235 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -48,6 +48,9 @@ #if defined BB_FEATURE_USE_DEVPS_PATCH #include <linux/devmtab.h> #endif +#ifndef MS_RDONLY +#include <linux/fs.h> +#endif #if defined BB_FEATURE_MOUNT_LOOP |