diff options
Diffstat (limited to 'busybox/util-linux')
-rw-r--r-- | busybox/util-linux/Config.in | 2 | ||||
-rw-r--r-- | busybox/util-linux/Makefile | 5 | ||||
-rw-r--r-- | busybox/util-linux/hwclock.c | 18 |
3 files changed, 13 insertions, 12 deletions
diff --git a/busybox/util-linux/Config.in b/busybox/util-linux/Config.in index 24d5487..db7c8bd 100644 --- a/busybox/util-linux/Config.in +++ b/busybox/util-linux/Config.in @@ -221,6 +221,7 @@ config CONFIG_LOSETUP config CONFIG_MKSWAP bool "mkswap" default n + select CONFIG_FEATURE_SUID help The mkswap utility is used to configure a file or disk partition as Linux swap space. This allows Linux to use the entire file or @@ -234,6 +235,7 @@ config CONFIG_MKSWAP config CONFIG_MORE bool "more" default n + select CONFIG_FEATURE_SUID help more is a simple utility which allows you to read text one screen sized page at a time. If you want to read text that is larger than diff --git a/busybox/util-linux/Makefile b/busybox/util-linux/Makefile index 4401fd1..efcf6e3 100644 --- a/busybox/util-linux/Makefile +++ b/busybox/util-linux/Makefile @@ -1,6 +1,6 @@ # Makefile for busybox # -# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> +# Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.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 @@ -18,7 +18,7 @@ # top_srcdir=.. -top_buildddir=.. +top_builddir=.. srcdir=$(top_srcdir)/util-linux UTILLINUX_DIR:=./ include $(top_builddir)/Rules.mak @@ -29,4 +29,3 @@ all: $(libraries-y) clean: rm -f *.o *.a $(AR_TARGET) - diff --git a/busybox/util-linux/hwclock.c b/busybox/util-linux/hwclock.c index a260d74..3c26839 100644 --- a/busybox/util-linux/hwclock.c +++ b/busybox/util-linux/hwclock.c @@ -46,7 +46,7 @@ struct linux_rtc_time { int tm_yday; int tm_isdst; }; - + #define RTC_SET_TIME _IOW('p', 0x0a, struct linux_rtc_time) /* Set RTC time */ #define RTC_RD_TIME _IOR('p', 0x09, struct linux_rtc_time) /* Read RTC time */ @@ -182,11 +182,11 @@ static int check_utc(void) return utc; } -#define HWCLOCK_OPT_LOCALTIME 1 -#define HWCLOCK_OPT_UTC 2 -#define HWCLOCK_OPT_SHOW 4 -#define HWCLOCK_OPT_HCTOSYS 8 -#define HWCLOCK_OPT_SYSTOHC 16 +#define HWCLOCK_OPT_LOCALTIME 0x01 +#define HWCLOCK_OPT_UTC 0x02 +#define HWCLOCK_OPT_SHOW 0x04 +#define HWCLOCK_OPT_HCTOSYS 0x08 +#define HWCLOCK_OPT_SYSTOHC 0x10 extern int hwclock_main ( int argc, char **argv ) { @@ -208,16 +208,16 @@ static const struct option hwclock_long_options[] = { bb_opt_complementaly = "r~ws:w~rs:s~wr:l~u:u~l"; opt = bb_getopt_ulflags(argc, argv, "lursw"); /* Check only one mode was given */ - if(opt & 0x80000000UL) { + if(opt & BB_GETOPT_ERROR) { bb_show_usage(); } /* If -u or -l wasn't given check if we are using utc */ - if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) + if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) utc = opt & HWCLOCK_OPT_UTC; else utc = check_utc(); - + if (opt & HWCLOCK_OPT_HCTOSYS) { return to_sys_clock ( utc ); } |