[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: busybox mkdir implementation

From: Jim Meyering
Subject: Re: busybox mkdir implementation
Date: Sat, 28 Sep 2002 09:45:14 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Glenn McGrath <address@hidden> wrote:
> There is an implementation of mkdir in busybox, the core of which is
> pretty nice code (if i do sayso myself), it work recursively.
> I just quickly skimmed over your ./lib/makepath.c its pretty big.. it
> probably does lots of stuff bb mkdir doesnt need to do, nevertheless i
> think it may be worth your time to look over the following url's

However, I prefer the implementation in makepath.c, because
`mkdir -p' is not subject to file name length or stack size limits.
E.g., this works: mkdir -p $(perl -e 'print "a/" x 40000')
[well, it didn't quite work, but does, now -- fixed in coreutils-4.5.2]

But for busybox, where code size matters, I'm sure your implementation
is fine.

However, when trying this (with busybox-0.60.4)

  busybox mkdir -p $(perl -e 'print "a/" x 10000')

I was surprised to see that it does nothing, yet produces
no diagnostic and exits successfully (0).
strace shows that stat fails with errno == ENAMETOOLONG.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]