|
From: | Konstantin Kostiuk |
Subject: | Re: [PATCH 11/51] qga/commands-posix-ssh: Use g_mkdir_with_parents() |
Date: | Wed, 24 Aug 2022 17:41:03 +0300 |
From: Bin Meng <bin.meng@windriver.com>
g_mkdir() is a deprecated API and newer codes should use
g_mkdir_with_parents().
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
qga/commands-posix-ssh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/commands-posix-ssh.c b/qga/commands-posix-ssh.c
index f3a580b8cc..2460112a38 100644
--- a/qga/commands-posix-ssh.c
+++ b/qga/commands-posix-ssh.c
@@ -59,7 +59,7 @@ static bool
mkdir_for_user(const char *path, const struct passwd *p,
mode_t mode, Error **errp)
{
- if (g_mkdir(path, mode) == -1) {
+ if (g_mkdir_with_parents(path, mode) == -1) {
error_setg(errp, "failed to create directory '%s': %s",
path, g_strerror(errno));
return false;
--
2.34.1
[Prev in Thread] | Current Thread | [Next in Thread] |