Age | Commit message (Collapse) | Author |
|
<cjwatson@debian.org> on busybox mailing list 08/11/04
|
|
|
|
and with multiple files SuSv3 says it should only trigger at the end of the
LAST file.
The trivial fix I tried first broke if the last file is empty. Fixing this
properly required restructuring things to create a file list (actually a
FILE * list), and then processing it all in one go. (There's probably a
smaller way to do this, merging with append_list perhaps. But let's get
the behavior correct first.)
Note that editing files in place (-i) needs the _old_ behavior, with $
triggering at the end of each file.
Here's a test of all the things this patch fixed. gnu and busybox seds produce
the same results with this patch, and different without it.
echo -n -e "1one\n1two\n1three" > ../test1
echo -n > ../test2
echo -e "3one\n3two\n3three" > ../test3
sed -n "$ p" ../test1 ../test2 ../test3
sed -n "$ p" ../test1 ../test2
sed -i -n "$ p" ../test1 ../test2 ../test3
|
|
|
|
for the install target.
|
|
|
|
to not put a newline at the end (which was backwards, it should have been
hardwired _to_ put a newline at the end, whether or not the input line
ended with a newline). Test case for that:
echo | sed -e '$ctest'
And then this would segfault:
echo | sed -e 'g'
Because pattern_space got freed but the dead pointer was only overwritten
in an if statement that didn't trigger if the hold space was empty. Oops.
While debugging it, I found out that the hold space is persistent between
multiple input files, so I promoted it to a global and added it to the
memory cleanup. The relevant test case (to compare with That Other Sed) is:
echo -n woo > woo
sed -e h -e g woo
echo "fish" | sed -e '/woo/h' -e "izap" -e 's/woo/thingy/' -e '/fish/g' woo -
And somebody gratuitously stuck in a c99 int8_t type for something that's just
a flag, so I grouped the darn ints.
|
|
|
|
|
|
egor duda wrote:
>Ok, here's an updated patch.
>'make check' should work now, and one make creates Makefile in build
>directory, so one can run 'make' in build directory after that.
ahem. It looks like i'm slightly late with it but... Here's a little
addition to make 'make O=/some/where PREFIX=/some/where/else install'
work. Sorry for delay :(
egor
|
|
|
|
|
|
Erik,
Attached is a patch for the udhcpc sample scripts, to correct the order in
which routers are applied if the DHCP server provides more than one (as per
section 3.5 of RFC2132).
Apologies for not being on the mailing list and thanks for your continued
efforts.
Simon.
|
|
the user's umask
|
|
It seems that date -s MMDDHHMMYYYY.ss
will ignore the .ss part. This patch tries to fix the problem.
David Daney.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the hard coded limit on the number of mounts
|
|
Hello,
Here's a patch for a first attempt at static leases for udhcpd.
Included in the tarball are 2 files (static_leases.c, static_leases.h)
and a patch against the latest cvs.
In the config file you can configure static leases with the following
format:
static_lease 00:60:08:11:CE:4E 192.168.0.54
static_lease 00:60:08:11:CE:3E 192.168.0.44
Comments/suggestions/improvements are welcome.
Wade
|
|
wget http://1.2.3.4/abc/ loses last '/'
|
|
Hello, all.
Busybox init does not handle removed inittab entry correctly.
# I'm sorry about my poor english, but you can find
# what I would like to say from patch, isn't it?
even if you apply this path,
when yoy try to change a command line option in inittab,
you have to do following steps.
1. remove old line from initrd
2. send HUP signal to init
3. kill old proces which is invoked from init.
4. append new line to inittab
5. send HUP signal to init, again
patch is against current CVS + last patch witch I send it last.
|
|
"kill -HUP 1" reloads inittab, and when I append one line to inittab
and send HUP signal two times, It will starts 2 process.
patch against current CVS is attached.
|
|
ash
"unset OLDPWD; cd -" causes segmentation fault.
( OLDPWD is not set when sh is invoked from getty. )
patch against current CVS is attached.
|
|
Hello
I'm using busy box on mipsel machine.
"grep -f file" will cause segmentation fault.
Vladimir N. Oleynik writes:
Hiroshi,
Thank for bug report, but your patch is full broken.
Worked patch attached.
(really changes is zero initialize, and indent correcting).
--w
vodz
|
|
Hi to all,
This patch contains just some fixes for some misleading
comments in my_getpwuid.c and my_getug.c.
The code is untouched so this patch will not
cause troubles.
Please apply.
Thanks in advance and Ciao,
Tito
|
|
>I also don't mean to disagree about leaving 30x status codes until after
>1.0. In fact, although redirecting http://host/dir to http://host/dir/
>with a 301 is common practice (e.g. Apache, IIS), AFAIK it isn't
>actually required (or mentioned) by the HTTP specs.
Ok.
Attached patch have 302 and 408 implemented features.
--w
vodz
|
|
*current_menu;' in scripts/config/lkc.h line 63, and this conflicts with
static definition in mconf.c.
|
|
Hi!
I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.
That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.
I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.
'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.
One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.
egor
|
|
Scenario:
touch x -- creates plain file name `x'
mkdir x -- exits successefully
libbb/make_directory.c, bb_make_directory(), contains
the following code:
if (mkdir(path, 0777) < 0) {
/* If we failed for any other reason than the directory
* already exists, output a diagnostic and return -1.*/
if (errno != EEXIST) {
fail_msg = "create";
umask(mask);
break;
}
/* Since the directory exists, don't attempt to change
* permissions if it was the full target. Note that
* this is not an error conditon. */
if (!c) {
umask(mask);
return 0;
}
}
The assumption that EEXIST error is due to that the *directory*
already exists is wrong: any file type with that name will cause
this error to be returned. Proper way IMHO will be is to stat()
the path and check whenever this is really a directory. Below
(attached) is a patch to fix this issue.
|
|
|
|
|
|
|
|
Attached patch prevents modprobe from trying to call 'insmod (null)'
whenever nonexistent module is either passed to modprobe via command
line or mentioned in modules.dep
this replaces cryptic error
sh: Syntax error: word unexpected (expecting ")")
with
modprobe: module some-module not found.
egor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"This patch fixes all the bugs in id previously spotted by vodz and me.
The binary size increased a bit, but now it should work as expected."
|
|
modified by myself to retain check for shadow file access.
|
|
remove some unused code.
|
|
|
|
I reversed the result of the sort functions to make the big numbers go to the top.
|
|
a condition around the remote logging, also adds some comments.
|
|
extra const's also.
|