mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00: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:
parent
3aab3362f6
commit
c58edd05f7
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user