projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f210cff
)
ash: fix bug 571 (jobs %string misbehaving)
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 17 Aug 2009 00:12:20 +0000
(
02:12
+0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 17 Aug 2009 00:12:20 +0000
(
02:12
+0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index 3755202eb8277bcf78affb76bbec552c0df4eab6..077f5e5fc0e82daade0581c0b034d72e386dd88a 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-3510,7
+3510,7
@@
getjob(const char *name, int getctl)
{
struct job *jp;
struct job *found;
- const char *err_msg = "
No such job: %s
";
+ const char *err_msg = "
%s: no such job
";
unsigned num;
int c;
const char *p;
@@
-3562,10
+3562,8
@@
getjob(const char *name, int getctl)
p++;
}
- found = 0;
- while (1) {
- if (!jp)
- goto err;
+ found = NULL;
+ while (jp) {
if (match(jp->ps[0].cmd, p)) {
if (found)
goto err;
@@
-3574,6
+3572,9
@@
getjob(const char *name, int getctl)
}
jp = jp->prev_job;
}
+ if (!found)
+ goto err;
+ jp = found;
gotit:
#if JOBS