Command line editing give a wrong result for me on hush shell 1.9.1
Martinb_ARM_NOMMU_KISSDVD
martinb at zeelandnet.nl
Mon Feb 18 21:36:37 UTC 2008
sorry, bug still there
a{backspace}
/hdd/newscript # ahush:
bbbb=20 25 73 00 (0x1559bf7)
- hush:
bbbb=20 25 73 00 (0x1559bf7)
-
ab{backspace}
/hdd/newscript # abhush:
bbbb=20 25 73 00 (0x1559cc3)
- hush:
bbbb=20 25 73 00 (0x1559cc3)
-
abc{backspace}
/hdd/newscript # abchush:
bbbb=20 25 73 00 (0x1559cc3)
- hush:
bbbb=20 25 73 00 (0x1559cc3)
-
abcd{backspace}
/hdd/newscript # abcdhush:
bbbb=20 25 73 00 (0x1559cc3)
- hush:
bbbb=20 25 73 00 (0x1559cc3)
-
if i DONT restart the hush then the 2e time a get a other result
(i did restart hush on the above tests)
abcd{backspace} (without restarting hush)
/hdd/newscript # abcdhush:
bbbb=20 25 73 00 (0x1559cc3)
0 hush:
bbbb=20 25 73 00 (0x1559cc3)
0
some other strange thing is that the "garbage" is not random
if i see the garbage (cant paste, its not normal ascii) and i reboot ,
recompile, whatever i do get the exact same "garbage"
i did post a screenshot
http://stage2h.googlepages.com/hush_putty.JPG
(that is on the original 1.9.1 hush)
so if i reboot my dvdplayer its the same output (so i dont think its random
memory)
> -----Oorspronkelijk bericht-----
> Van: Denys Vlasenko [mailto:vda.linux at googlemail.com]
> Verzonden: maandag 18 februari 2008 10:51
> Aan: Martinb_ARM_NOMMU_KISSDVD
> CC: busybox at busybox.net
> Onderwerp: Re: Command line editing give a wrong result for me on
> hush shell 1.9.1
>
>
> On Monday 18 February 2008 01:50, Martinb_ARM_NOMMU_KISSDVD wrote:
> > this is "asdf{backspace}"
> >
> > /hdd/newscript # ./hush
> > /hdd/newscript # asdfhush:
> > bbbb=00 08 08 08 (0x15b4c7f)
> > hush:
> > bbbb=00 08 08 08 (0x15b4c7f)
> >
> > this is "asdf{cursor left}"
> > /hdd/newscript # asdfhush:
> > bbbb=00 08 08 08 (0x15b4c7f)
> >
> > this is "asdf{home}"
> > /hdd/newscript # asdfhush:
> > bbbb=2a 73 00 00 (0x15b4c7c)
> > *s
> >
> > (yes, the *s is also from console)
> >
> > i also did compile with new toolchain (its the same but now i use)
> > it has the same results
>
> Here we see that correct pointer is given to printf now, sans my bug.
> I had a bug there (forgot to advance bbbb 4 bytes forward first).
>
> So, this should work. Can you try this:
>
> if (cmdedit_x >= num) {
> const char *bbbb = "\b\b\b\b";
> cmdedit_x -= num;
> bbbb += 4;
> if (num <= 4) {
> bbbb -= num;
> asm volatile("# HERE");
> bb_error_msg("\n bbbb=%02x %02x %02x %02x (%p)", bbbb[0],
> bbbb[1], bbbb[2], bbbb[3], bbbb);
> printf(bbbb);
> return;
> }
> printf("\033[%uD", num);
> return;
> }
>
> Show me results of "a{backspace}", "ab{backspace}", "abc{backspace}",
> "abcd{backspace}" (separate runs of hush). You may also try removing
> bb_error_msg() - it might work now.
> --
> vda
More information about the busybox
mailing list