mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user