diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-19 04:05:28 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-19 04:05:28 +0000 |
commit | fc9fc1f9292861cd1621d884338a766289acdf4a (patch) | |
tree | 0a2b0dd81d994e73f77174665dfb3e68e611471e /miscutils | |
parent | 74f8208f1896ceb2828a84d93999584a8407565b (diff) | |
download | busybox-w32-fc9fc1f9292861cd1621d884338a766289acdf4a.tar.gz busybox-w32-fc9fc1f9292861cd1621d884338a766289acdf4a.tar.bz2 busybox-w32-fc9fc1f9292861cd1621d884338a766289acdf4a.zip |
apply all post 1.10.0 fixes
bump version to 1.10.1
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/less.c | 11 | ||||
-rw-r--r-- | miscutils/taskset.c | 5 |
2 files changed, 10 insertions, 6 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index 1a67ca7ce..37ec5d976 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -384,6 +384,10 @@ static void read_lines(void) | |||
384 | linepos = 0; | 384 | linepos = 0; |
385 | } /* end of "read lines until we reach cur_fline" loop */ | 385 | } /* end of "read lines until we reach cur_fline" loop */ |
386 | fill_match_lines(old_max_fline); | 386 | fill_match_lines(old_max_fline); |
387 | #if ENABLE_FEATURE_LESS_REGEXP | ||
388 | /* prevent us from being stuck in search for a match */ | ||
389 | wanted_match = -1; | ||
390 | #endif | ||
387 | #undef readbuf | 391 | #undef readbuf |
388 | } | 392 | } |
389 | 393 | ||
@@ -904,13 +908,8 @@ static void goto_match(int match) | |||
904 | match = 0; | 908 | match = 0; |
905 | /* Try to find next match if eof isn't reached yet */ | 909 | /* Try to find next match if eof isn't reached yet */ |
906 | if (match >= num_matches && eof_error > 0) { | 910 | if (match >= num_matches && eof_error > 0) { |
907 | wanted_match = match; | 911 | wanted_match = match; /* "I want to read until I see N'th match" */ |
908 | read_lines(); | 912 | read_lines(); |
909 | if (wanted_match >= num_matches) { | ||
910 | /* We still failed to find it. Prevent future | ||
911 | * read_lines() from trying... */ | ||
912 | wanted_match = num_matches - 1; | ||
913 | } | ||
914 | } | 913 | } |
915 | if (num_matches) { | 914 | if (num_matches) { |
916 | normalize_match_pos(match); | 915 | normalize_match_pos(match); |
diff --git a/miscutils/taskset.c b/miscutils/taskset.c index 6247aa869..bf98ea15d 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c | |||
@@ -50,6 +50,11 @@ int taskset_main(int argc ATTRIBUTE_UNUSED, char **argv) | |||
50 | char *pid_str; | 50 | char *pid_str; |
51 | char *aff = aff; /* for compiler */ | 51 | char *aff = aff; /* for compiler */ |
52 | 52 | ||
53 | /* NB: we mimic util-linux's taskset: -p does not take | ||
54 | * an argument, i.e., "-pN" is NOT valid, only "-p N"! | ||
55 | * Indeed, util-linux-2.13-pre7 uses: | ||
56 | * getopt_long(argc, argv, "+pchV", ...), not "...p:..." */ | ||
57 | |||
53 | opt_complementary = "-1"; /* at least 1 arg */ | 58 | opt_complementary = "-1"; /* at least 1 arg */ |
54 | opt_p = getopt32(argv, "+p"); | 59 | opt_p = getopt32(argv, "+p"); |
55 | argv += optind; | 60 | argv += optind; |