src: replace mkdir() with g_mkdir()

g_mkdir() provides portability to Windows platforms.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2020-01-29 14:51:40 +00:00
parent 3aab3362f6
commit c58edd05f7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -3029,7 +3029,7 @@ virFileMakePathHelper(char *path, mode_t mode)
*p = '/';
}
if (mkdir(path, mode) < 0 && errno != EEXIST)
if (g_mkdir(path, mode) < 0 && errno != EEXIST)
return -1;
return 0;
+1 -1
View File
@@ -300,7 +300,7 @@ static int testLockSpaceResourceLockPath(const void *args G_GNUC_UNUSED)
if (!(lockspace = virLockSpaceNew(NULL)))
goto cleanup;
if (mkdir(LOCKSPACE_DIR, 0700) < 0)
if (g_mkdir(LOCKSPACE_DIR, 0700) < 0)
goto cleanup;
if (virLockSpaceCreateResource(lockspace, LOCKSPACE_DIR "/foo") < 0)