[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/25] qga: remove pointless 'blockrpcs_key' variable
From: |
Konstantin Kostiuk |
Subject: |
[PULL 20/25] qga: remove pointless 'blockrpcs_key' variable |
Date: |
Mon, 22 Jul 2024 10:01:17 +0300 |
From: Daniel P. Berrangé <berrange@redhat.com>
This variable was used to support back compat for the old config
file key name, and became redundant after the following change:
commit a7a2d636ae4549ef0551134d4bf8e084a14431c4
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: Thu May 30 08:36:43 2024 +0200
qga: Remove deprecated 'blacklist' argument / config key
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240712132459.3974109-21-berrange@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
qga/main.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/qga/main.c b/qga/main.c
index 647d27037c..6ff022a85d 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -1023,7 +1023,6 @@ static void config_load(GAConfig *config)
GError *gerr = NULL;
GKeyFile *keyfile;
g_autofree char *conf = g_strdup(g_getenv("QGA_CONF")) ?:
get_relocated_path(QGA_CONF_DEFAULT);
- const gchar *blockrpcs_key = "block-rpcs";
/* read system config */
keyfile = g_key_file_new();
@@ -1071,9 +1070,9 @@ static void config_load(GAConfig *config)
g_key_file_get_boolean(keyfile, "general", "retry-path", &gerr);
}
- if (g_key_file_has_key(keyfile, "general", blockrpcs_key, NULL)) {
+ if (g_key_file_has_key(keyfile, "general", "block-rpcs", NULL)) {
config->bliststr =
- g_key_file_get_string(keyfile, "general", blockrpcs_key, &gerr);
+ g_key_file_get_string(keyfile, "general", "block-rpcs", &gerr);
config->blockedrpcs = g_list_concat(config->blockedrpcs,
split_list(config->bliststr, ","));
}
@@ -1084,7 +1083,7 @@ static void config_load(GAConfig *config)
split_list(config->aliststr, ","));
}
- if (g_key_file_has_key(keyfile, "general", blockrpcs_key, NULL) &&
+ if (g_key_file_has_key(keyfile, "general", "block-rpcs", NULL) &&
g_key_file_has_key(keyfile, "general", "allow-rpcs", NULL)) {
g_critical("wrong config, using 'block-rpcs' and 'allow-rpcs' keys at"
" the same time is not allowed");
--
2.45.2
- [PULL 07/25] qga: move CONFIG_FSFREEZE/TRIM to be meson defined options, (continued)
- [PULL 07/25] qga: move CONFIG_FSFREEZE/TRIM to be meson defined options, Konstantin Kostiuk, 2024/07/22
- [PULL 15/25] qga: conditionalize schema for commands requiring libudev, Konstantin Kostiuk, 2024/07/22
- [PULL 12/25] qga: conditionalize schema for commands only supported on Windows, Konstantin Kostiuk, 2024/07/22
- [PULL 08/25] qga: conditionalize schema for commands unsupported on Windows, Konstantin Kostiuk, 2024/07/22
- [PULL 21/25] qga: allow configuration file path via the cli, Konstantin Kostiuk, 2024/07/22
- [PULL 17/25] qga: conditionalize schema for commands not supported on other UNIX, Konstantin Kostiuk, 2024/07/22
- [PULL 22/25] qga: centralize logic for disabling/enabling commands, Konstantin Kostiuk, 2024/07/22
- [PULL 09/25] qga: conditionalize schema for commands unsupported on non-Linux POSIX, Konstantin Kostiuk, 2024/07/22
- [PULL 13/25] qga: conditionalize schema for commands requiring fsfreeze, Konstantin Kostiuk, 2024/07/22
- [PULL 16/25] qga: conditionalize schema for commands requiring utmpx, Konstantin Kostiuk, 2024/07/22
- [PULL 20/25] qga: remove pointless 'blockrpcs_key' variable,
Konstantin Kostiuk <=
- [PULL 10/25] qga: conditionalize schema for commands requiring getifaddrs, Konstantin Kostiuk, 2024/07/22
- [PULL 14/25] qga: conditionalize schema for commands requiring fstrim, Konstantin Kostiuk, 2024/07/22
- [PULL 18/25] qga: don't disable fsfreeze commands if vss_init fails, Konstantin Kostiuk, 2024/07/22
- [PULL 25/25] qga/linux: Add new api 'guest-network-get-route', Konstantin Kostiuk, 2024/07/22
- [PULL 24/25] guest-agent: document allow-rpcs in config file section, Konstantin Kostiuk, 2024/07/22
- [PULL 19/25] qga: move declare of QGAConfig struct to top of file, Konstantin Kostiuk, 2024/07/22
- [PULL 23/25] qga/commands-posix: Make ga_wait_child() return boolean, Konstantin Kostiuk, 2024/07/22
- Re: [PULL 00/25] Misc QEMU-GA patches 2024-07-22, Richard Henderson, 2024/07/22