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.
19 int mktemp_main(int argc, char **argv)
21 unsigned long flags = getopt32(argc, argv, "dqt");
24 if (optind + 1 != argc)
30 char *dir = getenv("TMPDIR");
31 if (dir && *dir != '\0')
32 chp = concat_path_file(dir, chp);
34 chp = concat_path_file("/tmp/", chp);
38 if (mkdtemp(chp) == NULL)