mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
support: Add xstrndup, xunlink, xreadlink, support_create_temp_directory
This commit is contained in:
@@ -46,10 +46,11 @@ support_chroot_create (struct support_chroot_configuration conf)
|
||||
{
|
||||
struct support_chroot *chroot = xmalloc (sizeof (*chroot));
|
||||
|
||||
chroot->path_chroot = xasprintf ("%s/tst-resolv-res_init-XXXXXX", test_dir);
|
||||
if (mkdtemp (chroot->path_chroot) == NULL)
|
||||
FAIL_EXIT1 ("mkdtemp (\"%s\"): %m", chroot->path_chroot);
|
||||
add_temp_file (chroot->path_chroot);
|
||||
{
|
||||
char *template = xasprintf ("%s/tst-resolv-res_init-XXXXXX", test_dir);
|
||||
chroot->path_chroot = support_create_temp_directory (template);
|
||||
free (template);
|
||||
}
|
||||
|
||||
/* Create the /etc directory in the chroot environment. */
|
||||
char *path_etc = xasprintf ("%s/etc", chroot->path_chroot);
|
||||
|
Reference in New Issue
Block a user