[patch] include/usage.h

Denys Vlasenko vda.linux at googlemail.com
Sun Jun 8 08:03:50 UTC 2008


On Sunday 08 June 2008 03:23, Cristian Ionescu-Idbohrn wrote:
> On Sat, 7 Jun 2008, Denys Vlasenko wrote:
> 
> > On Thursday 05 June 2008 20:18, Cristian Ionescu-Idbohrn wrote:
> > > Wouldn't this be more in line with the code?
> >
> > Not really. Only last six X's are required and subsequently replaced
> > by random chars.
> 
> Yes, I saw that.  But then I must have missed the point with changing the
> source, but not the documentation :(  Thing is the generated file
> template suffix consists of 10 characters:

Yes, for some strange reason default pattern has ten X chars, only last six
of those are replaced. This matches coreutils.

Help test says nothing about default pattern (in the name of keeping
not-so essential info from bloating it). So where is the lie?

>   # ./busybox mktemp
>   tmp.XXXX8khaJC

I don't see how this contradicts help text -



# ./busybox mktemp --help
BusyBox v1.11.0.svn (2008-06-07 21:53:08 CEST) multi-call binary

Usage: mktemp [-dt] [-p DIR] [TEMPLATE]

Create a temporary file with name based on TEMPLATE and print its name.
TEMPLATE must end with XXXXXX (i.e., /tmp/temp.XXXXXX).

Options:
        -d      Make a directory instead of a file
        -t      Generate a path rooted in temporary directory
        -p DIR  Use DIR as a temporary directory (implies -t)

For -t or -p, directory is chosen as follows:
$TMPDIR if set, else -p DIR, else /tmp



Do you feel that "(i.e., /tmp/temp.XXXXXX)" implies that that is the default?
Will "(e.g. [/dir]/nameXXXXXX)" do better?
--
vda



More information about the busybox mailing list