mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
tests: Use g_mkdir_with_parents()
Use the same g_mkdir_with_parents() call to create a directory on all platforms. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20220824094029.1634519-13-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
3c239aa77e
commit
413bebc046
5 changed files with 12 additions and 12 deletions
|
@ -232,7 +232,7 @@ static void stress(unsigned long long ramsizeGB, int ncpus)
|
|||
|
||||
static int mount_misc(const char *fstype, const char *dir)
|
||||
{
|
||||
if (mkdir(dir, 0755) < 0 && errno != EEXIST) {
|
||||
if (g_mkdir_with_parents(dir, 0755) < 0 && errno != EEXIST) {
|
||||
fprintf(stderr, "%s (%05d): ERROR: cannot create %s: %s\n",
|
||||
argv0, gettid(), dir, strerror(errno));
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue