diff mbox series

[v2,09/39] fsdev/virtfs-proxy-helper: Use g_mkdir()

Message ID 20220920103159.1865256-10-bmeng.cn@gmail.com (mailing list archive)
State New, archived
Headers show
Series tests/qtest: Enable running qtest on Windows | expand

Commit Message

Bin Meng Sept. 20, 2022, 10:31 a.m. UTC
From: Bin Meng <bin.meng@windriver.com>

Use g_mkdir() to create a directory on all platforms.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
---

Changes in v2:
- Change to use g_mkdir()

 fsdev/virtfs-proxy-helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Christian Schoenebeck Sept. 20, 2022, 1:42 p.m. UTC | #1
On Dienstag, 20. September 2022 12:31:29 CEST Bin Meng wrote:
> From: Bin Meng <bin.meng@windriver.com>
> 
> Use g_mkdir() to create a directory on all platforms.
> 
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> ---

Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>

> 
> Changes in v2:
> - Change to use g_mkdir()
> 
>  fsdev/virtfs-proxy-helper.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
> index 2dde27922f..5cafcd7703 100644
> --- a/fsdev/virtfs-proxy-helper.c
> +++ b/fsdev/virtfs-proxy-helper.c
> @@ -10,6 +10,7 @@
>   */
> 
>  #include "qemu/osdep.h"
> +#include <glib/gstdio.h>
>  #include <sys/resource.h>
>  #include <getopt.h>
>  #include <syslog.h>
> @@ -639,7 +640,7 @@ static int do_create_others(int type, struct iovec
> *iovec) if (retval < 0) {
>              goto err_out;
>          }
> -        retval = mkdir(path.data, mode);
> +        retval = g_mkdir(path.data, mode);
>          break;
>      case T_SYMLINK:
>          retval = proxy_unmarshal(iovec, offset, "ss", &oldpath, &path);
diff mbox series

Patch

diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index 2dde27922f..5cafcd7703 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -10,6 +10,7 @@ 
  */
 
 #include "qemu/osdep.h"
+#include <glib/gstdio.h>
 #include <sys/resource.h>
 #include <getopt.h>
 #include <syslog.h>
@@ -639,7 +640,7 @@  static int do_create_others(int type, struct iovec *iovec)
         if (retval < 0) {
             goto err_out;
         }
-        retval = mkdir(path.data, mode);
+        retval = g_mkdir(path.data, mode);
         break;
     case T_SYMLINK:
         retval = proxy_unmarshal(iovec, offset, "ss", &oldpath, &path);