shell/ash.c
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Sat Jul 11 13:14:26 UTC 2009
On Fri, 10 Jul 2009, Denys Vlasenko wrote:
> On Monday 06 July 2009 23:37, Cristian Ionescu-Idbohrn wrote:
> > Somewhere around line 1000. I don't think we want shtree to output to
> > stdout, do we? That would break a few things, and it does. We might want
> > it to go to stderr or tracefile, but defintely not stdout.
> >
> > ---8<---
> > static void
> > showtree(union node *n)
> > {
> > trace_puts("showtree called\n");
> > shtree(n, 1, NULL, stdout);
> > }
> >
> > #endif /* DEBUG */
> > --->8---
> >
> > And somewhere around line 11847:
> >
> > ---8<---
> > #if DEBUG
> > showtree(n);
> > #endif
> > --->8---
> >
> > We might want to do this instead:
> >
> > #if DEBUG > 2
> > if (debug && (n != NEOF))
> > showtree(n);
> > #endif
> >
> > Without checking on 'debug', we always get output from showtree. I don't
> > think we want that.
> > Without '(n != NEOF)' we may get segfaults.
> > And 'DEBUG > 2' could be a good idea too. What do you say?
> >
> > The other thing is that there are a few places where %x should read 0x%x,
> > maybe; at least for consistancy:
> >
> > -> 254: bb_error_msg("bug on %d: closing %d(%x)", \
> > 3821: TRACE(("dowait(0x%x) called\n", wait_flags));
> > 3828: TRACE(("wait returns pid=%d, status=0x%x, errno=%d(%s)\n",
> > 3846: "from 0x%x to 0x%x\n",
> > -> 3990: TRACE(("showjobs(%x) called\n", mode));
> > -> 4051: TRACE(("getstatus: job %d, nproc %d, status %x, retval %x\n",
> > 5632: TRACE(("evalbackcmd done: fd=%d buf=0x%x nleft=%d jp=0x%x\n",
>
> Please send it as a patch.
Done.
Cheers,
--
Cristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ash.c.patch
Type: text/x-diff
Size: 2211 bytes
Desc:
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090711/3d278a0c/attachment.bin>
More information about the busybox
mailing list