1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

support_create_temp_directory: Align behavior with create_temp_file

create_temp_file automatically supplies the test directory and the
XXXXXX suffix.  support_create_temp_directory required the caller to
specify them, which was confusing.

Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
This commit is contained in:
Florian Weimer
2017-11-18 14:11:09 +01:00
parent df0c40ee3a
commit 8adfb0eeff
5 changed files with 19 additions and 15 deletions

View File

@@ -45,12 +45,7 @@ struct support_chroot *
support_chroot_create (struct support_chroot_configuration conf)
{
struct support_chroot *chroot = xmalloc (sizeof (*chroot));
{
char *template = xasprintf ("%s/tst-resolv-res_init-XXXXXX", test_dir);
chroot->path_chroot = support_create_temp_directory (template);
free (template);
}
chroot->path_chroot = support_create_temp_directory ("tst-resolv-res_init-");
/* Create the /etc directory in the chroot environment. */
char *path_etc = xasprintf ("%s/etc", chroot->path_chroot);