diff options
author | Eric Andersen <andersen@codepoet.org> | 2005-07-18 23:51:27 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2005-07-18 23:51:27 +0000 |
commit | 164a716f964bba247c660bc70149234f95146871 (patch) | |
tree | 95a8a6f75cb2ed1bb07cb6019088db7348ebf4d4 /busybox/util-linux | |
parent | 8c59a0bf0e9e2d87b0ff273ea3f0bf05bbbf6373 (diff) | |
download | busybox-w32-164a716f964bba247c660bc70149234f95146871.tar.gz busybox-w32-164a716f964bba247c660bc70149234f95146871.tar.bz2 busybox-w32-164a716f964bba247c660bc70149234f95146871.zip |
busybox-1.0.1-rc1.patch
http://busybox.net/lists/busybox/2005-July/014974.html
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 24d548726..db7c8bd7d 100644 --- a/busybox/util-linux/Config.in +++ b/busybox/util-linux/Config.in | |||
@@ -221,6 +221,7 @@ config CONFIG_LOSETUP | |||
221 | config CONFIG_MKSWAP | 221 | config CONFIG_MKSWAP |
222 | bool "mkswap" | 222 | bool "mkswap" |
223 | default n | 223 | default n |
224 | select CONFIG_FEATURE_SUID | ||
224 | help | 225 | help |
225 | The mkswap utility is used to configure a file or disk partition as | 226 | The mkswap utility is used to configure a file or disk partition as |
226 | Linux swap space. This allows Linux to use the entire file or | 227 | Linux swap space. This allows Linux to use the entire file or |
@@ -234,6 +235,7 @@ config CONFIG_MKSWAP | |||
234 | config CONFIG_MORE | 235 | config CONFIG_MORE |
235 | bool "more" | 236 | bool "more" |
236 | default n | 237 | default n |
238 | select CONFIG_FEATURE_SUID | ||
237 | help | 239 | help |
238 | more is a simple utility which allows you to read text one screen | 240 | more is a simple utility which allows you to read text one screen |
239 | sized page at a time. If you want to read text that is larger than | 241 | 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 4401fd1ed..efcf6e3bb 100644 --- a/busybox/util-linux/Makefile +++ b/busybox/util-linux/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2005 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 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 | 6 | # it under the terms of the GNU General Public License as published by |
@@ -18,7 +18,7 @@ | |||
18 | # | 18 | # |
19 | 19 | ||
20 | top_srcdir=.. | 20 | top_srcdir=.. |
21 | top_buildddir=.. | 21 | top_builddir=.. |
22 | srcdir=$(top_srcdir)/util-linux | 22 | srcdir=$(top_srcdir)/util-linux |
23 | UTILLINUX_DIR:=./ | 23 | UTILLINUX_DIR:=./ |
24 | include $(top_builddir)/Rules.mak | 24 | include $(top_builddir)/Rules.mak |
@@ -29,4 +29,3 @@ all: $(libraries-y) | |||
29 | 29 | ||
30 | clean: | 30 | clean: |
31 | rm -f *.o *.a $(AR_TARGET) | 31 | rm -f *.o *.a $(AR_TARGET) |
32 | |||
diff --git a/busybox/util-linux/hwclock.c b/busybox/util-linux/hwclock.c index a260d7448..3c2683953 100644 --- a/busybox/util-linux/hwclock.c +++ b/busybox/util-linux/hwclock.c | |||
@@ -46,7 +46,7 @@ struct linux_rtc_time { | |||
46 | int tm_yday; | 46 | int tm_yday; |
47 | int tm_isdst; | 47 | int tm_isdst; |
48 | }; | 48 | }; |
49 | 49 | ||
50 | #define RTC_SET_TIME _IOW('p', 0x0a, struct linux_rtc_time) /* Set RTC time */ | 50 | #define RTC_SET_TIME _IOW('p', 0x0a, struct linux_rtc_time) /* Set RTC time */ |
51 | #define RTC_RD_TIME _IOR('p', 0x09, struct linux_rtc_time) /* Read RTC time */ | 51 | #define RTC_RD_TIME _IOR('p', 0x09, struct linux_rtc_time) /* Read RTC time */ |
52 | 52 | ||
@@ -182,11 +182,11 @@ static int check_utc(void) | |||
182 | return utc; | 182 | return utc; |
183 | } | 183 | } |
184 | 184 | ||
185 | #define HWCLOCK_OPT_LOCALTIME 1 | 185 | #define HWCLOCK_OPT_LOCALTIME 0x01 |
186 | #define HWCLOCK_OPT_UTC 2 | 186 | #define HWCLOCK_OPT_UTC 0x02 |
187 | #define HWCLOCK_OPT_SHOW 4 | 187 | #define HWCLOCK_OPT_SHOW 0x04 |
188 | #define HWCLOCK_OPT_HCTOSYS 8 | 188 | #define HWCLOCK_OPT_HCTOSYS 0x08 |
189 | #define HWCLOCK_OPT_SYSTOHC 16 | 189 | #define HWCLOCK_OPT_SYSTOHC 0x10 |
190 | 190 | ||
191 | extern int hwclock_main ( int argc, char **argv ) | 191 | extern int hwclock_main ( int argc, char **argv ) |
192 | { | 192 | { |
@@ -208,16 +208,16 @@ static const struct option hwclock_long_options[] = { | |||
208 | bb_opt_complementaly = "r~ws:w~rs:s~wr:l~u:u~l"; | 208 | bb_opt_complementaly = "r~ws:w~rs:s~wr:l~u:u~l"; |
209 | opt = bb_getopt_ulflags(argc, argv, "lursw"); | 209 | opt = bb_getopt_ulflags(argc, argv, "lursw"); |
210 | /* Check only one mode was given */ | 210 | /* Check only one mode was given */ |
211 | if(opt & 0x80000000UL) { | 211 | if(opt & BB_GETOPT_ERROR) { |
212 | bb_show_usage(); | 212 | bb_show_usage(); |
213 | } | 213 | } |
214 | 214 | ||
215 | /* If -u or -l wasn't given check if we are using utc */ | 215 | /* If -u or -l wasn't given check if we are using utc */ |
216 | if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) | 216 | if (opt & (HWCLOCK_OPT_UTC | HWCLOCK_OPT_LOCALTIME)) |
217 | utc = opt & HWCLOCK_OPT_UTC; | 217 | utc = opt & HWCLOCK_OPT_UTC; |
218 | else | 218 | else |
219 | utc = check_utc(); | 219 | utc = check_utc(); |
220 | 220 | ||
221 | if (opt & HWCLOCK_OPT_HCTOSYS) { | 221 | if (opt & HWCLOCK_OPT_HCTOSYS) { |
222 | return to_sys_clock ( utc ); | 222 | return to_sys_clock ( utc ); |
223 | } | 223 | } |