1 /* vi: set sw=4 ts=4: */
3 * Mini mktemp implementation for busybox
6 * Copyright (C) 2000 by Daniel Jacobowitz
7 * Written by Daniel Jacobowitz <dan@debian.org>
9 * Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
14 int mktemp_main(int argc, char **argv);
15 int mktemp_main(int argc, char **argv)
17 unsigned long flags = getopt32(argv, "dqt");
20 if (optind + 1 != argc)
26 char *dir = getenv("TMPDIR");
27 if (dir && *dir != '\0')
28 chp = concat_path_file(dir, chp);
30 chp = concat_path_file("/tmp/", chp);
34 if (mkdtemp(chp) == NULL)