提交 c58edd05 编写于 作者: D Daniel P. Berrangé

src: replace mkdir() with g_mkdir()

g_mkdir() provides portability to Windows platforms.
Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 3aab3362
...@@ -3029,7 +3029,7 @@ virFileMakePathHelper(char *path, mode_t mode) ...@@ -3029,7 +3029,7 @@ virFileMakePathHelper(char *path, mode_t mode)
*p = '/'; *p = '/';
} }
if (mkdir(path, mode) < 0 && errno != EEXIST) if (g_mkdir(path, mode) < 0 && errno != EEXIST)
return -1; return -1;
return 0; return 0;
......
...@@ -300,7 +300,7 @@ static int testLockSpaceResourceLockPath(const void *args G_GNUC_UNUSED) ...@@ -300,7 +300,7 @@ static int testLockSpaceResourceLockPath(const void *args G_GNUC_UNUSED)
if (!(lockspace = virLockSpaceNew(NULL))) if (!(lockspace = virLockSpaceNew(NULL)))
goto cleanup; goto cleanup;
if (mkdir(LOCKSPACE_DIR, 0700) < 0) if (g_mkdir(LOCKSPACE_DIR, 0700) < 0)
goto cleanup; goto cleanup;
if (virLockSpaceCreateResource(lockspace, LOCKSPACE_DIR "/foo") < 0) if (virLockSpaceCreateResource(lockspace, LOCKSPACE_DIR "/foo") < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册