bug#1106: [BusyBox] ln bug!

Kenneth Chalmers chalmers at norscan.com
Tue Feb 13 21:14:51 UTC 2001


> On Mon, Feb 12, 2001 at 10:16:18AM -0800, kent robotti wrote:
> > There's a problem with ln.
> >
> > ln -sf /lib/modules .
> > .//lib/modules: no such file or directory
> >
> > This is the latest cvs bb or v0.49.
>
> Confirmed with latest CVS. Submitting to bug tracking.

Attached is a fix.  Comparison with GNU ln:

ln -sf /lib/modules .
$ ls -ld modules
lrwxrwxrwx    1 chalmers chalmers       12 Feb 13 15:11 modules -> 
/lib/modules
$ rm -f modules
$ ./busybox ln -sf /lib/modules .
$ ls -ld modules
lrwxrwxrwx    1 chalmers chalmers       12 Feb 13 15:11 modules -> 
/lib/modules

A bit ugly, but the dynamic memory allocation is used since 
get_last_path_component() mutates its argument.  Any 
suggestions/improvements welcomed.  I just threw this together quickly 
because I was bored with my current project at work - nice to hack 
BusyBox again for a bit :)

	-Ken

-- 
Kenneth Chalmers     |  Do not meddle in the affairs of dragons, cuz, like,
chalmers at norscan.com |  you are crunchy and taste good with ketchup.
 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: utility.c.patch
Url: http://lists.busybox.net/pipermail/busybox/attachments/20010213/66ad1821/attachment.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ln.c.patch
Url: http://lists.busybox.net/pipermail/busybox/attachments/20010213/66ad1821/attachment-0001.diff 


More information about the busybox mailing list