[PATCH v3 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-02-28 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 81 qga/commands-win32.c | 6 qga/qapi-schema.json | 80

[PATCH v3 0/1] Optimize Code

2024-02-28 Thread Dehan Meng
value set v1 -> v2 - Replace snprintf() to g_strdup_printf() to avoid memory problems. - Remove the parameter 'char ipAddress[16]' in function 'char *hexToIPAddress()'. - Add a piece of logic to skip traversing the first line of the file Dehan Meng (1): qga/linux:

Re: [PATCH v2 0/7] qga/commands-posix: replace code duplicating commands with a helper

2024-03-04 Thread Dehan Meng
QE tested this series's patches. qga-related commands worked successfully. Tested-by: Dehan Meng On Mon, Mar 4, 2024 at 8:00 PM Konstantin Kostiuk wrote: > For series > Reviewed-by: Konstantin Kostiuk > > On Fri, Mar 1, 2024 at 7:29 PM Andrey Drobyshev < > andrey.

[PATCH] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-21 Thread Dehan Meng
Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng --- qga/commands-win32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 697c65507c..f3c7e604c9 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c

[PATCH 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-02-21 Thread Dehan Meng
v1 -> v2 - Replace snprintf() to g_strdup_printf() to avoid memory problems. - Remove the parameter 'char ipAddress[16]' in function 'char *hexToIPAddress()'. - Add a piece of logic to skip traversing the first line of the file Dehan Meng (1): qga/linux: Add new api &

[PATCH v2 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-02-21 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 78 ++ qga/commands-win32.c | 6 qga/qapi-schema.json | 80

[PATCH v2 0/1] update the array size

2024-02-21 Thread Dehan Meng
v1 -> v2 update the array size "WIN_10_0_SERVER_VERSION_MATRIX" in case array out of range elements. Dehan Meng (1): qga-win: Add support of Windows Server 2025 in get-osinfo command qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.35.1

[PATCH v2 1/1] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-21 Thread Dehan Meng
Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng --- qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 697c65507c..b37fa7b5ba 100644 --- a/qga/commands-win32.c +++ b/qga

[PATCH v2 1/1] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-21 Thread Dehan Meng
Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng --- qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 697c65507c..b37fa7b5ba 100644 --- a/qga/commands-win32.c +++ b/qga

[PATCH v2 0/1] update the array size

2024-02-21 Thread Dehan Meng
v1 -> v2 update the array size "WIN_10_0_SERVER_VERSION_MATRIX" in case array out of range elements. Dehan Meng (1): qga-win: Add support of Windows Server 2025 in get-osinfo command qga/commands-win32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.35.1

Re: [PATCH] qga-win: Add support of Windows Server 2025 in get-osinfo command

2024-02-21 Thread Dehan Meng
Done. thanks. On Wed, Feb 21, 2024 at 6:00 PM Konstantin Kostiuk wrote: > > > On Wed, Feb 21, 2024 at 11:51 AM Dehan Meng wrote: > >> Add support of Windows Server 2025 in get-osinfo command >> >> Signed-off-by: Dehan Meng >> --- >> qga/commands-win

Re: [PATCH v8 2/2] Implement SSH commands in QEMU GA for Windows

2024-04-24 Thread Dehan Meng
QE tested this series's patches. SSH-relevant commands work and password-free login can be achieved. Tested-by: Dehan Meng On Tue, Apr 23, 2024 at 11:03 PM wrote: > From: aidaleuc > > Signed-off-by: aidaleuc > --- > qga/commands

Re: [PATCH v8 2/2] Implement SSH commands in QEMU GA for Windows

2024-04-24 Thread Dehan Meng
Dehan Meng 4:55 PM (15 minutes ago) to aidaleuc, qemu-devel, kkostiuk QE tested this series's patches. SSH-relevant commands work and password-free login can be achieved. Tested-by: Dehan Meng On Tue, Apr 23, 2024 at 11:03 PM wrote: > From: aidaleuc > > Signed-of

[PATCH] qemu-guest-agent: Update the logfile path of qga-fsfreeze-hook.log

2024-08-12 Thread Dehan Meng
Since '/var/log/qga-fsfreeze-hook.log' is not included to proper selinux context 'system_u:object_r:virt_qemu_ga_log_t:s0', it should be changed to '/var/log/qemu-ga/qga-fsfreeze-hook.log' Jira: https://issues.redhat.com/browse/RHEL-52250 Signed-off-by: Dehan Meng

Re: [PATCH] qemu-guest-agent: Update the logfile path of qga-fsfreeze-hook.log

2024-08-19 Thread Dehan Meng
edHat SELinux configuration. > Is this any reason to move LOGFILE except this? > > Best Regards, > Konstantin Kostiuk. > > > On Tue, Aug 13, 2024 at 6:11 AM Dehan Meng wrote: > >> Since '/var/log/qga-fsfreeze-hook.log' is not included to proper >> selinux cont

[PATCH v4 0/1] qga/linux: Add new api 'guest-network-get-route'

2024-06-11 Thread Dehan Meng
har *hexToIPAddress()'. - Add a piece of logic to skip traversing the first line of the file Dehan Meng (1): qga/linux: Add new api 'guest-network-get-route' qga/commands-posix.c | 73 qga/commands-win32.c | 6 qga/qapi-schema.json | 68 + 3 files changed, 147 insertions(+) -- 2.40.1

[PATCH v4 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-06-11 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 73 qga/commands-win32.c | 6 qga/qapi-schema.json | 68

[PATCH v5 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-06-12 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 81 qga/commands-win32.c | 6 qga/qapi-schema.json | 56

[PATCH v5 0/1] qga/linux: Add new api 'guest-network-get-route'

2024-06-12 Thread Dehan Meng
o g_strdup_printf() to avoid memory problems. - Remove the parameter 'char ipAddress[16]' in function 'char *hexToIPAddress()'. - Add a piece of logic to skip traversing the first line of the file Dehan Meng (1): qga/linux: Add new api 'guest-network-get-route' qga/com

[PATCH v6 1/1] qga/linux: Add new api 'guest-network-get-route'

2024-06-13 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 135 +++ qga/commands-win32.c | 6 ++ qga/qapi-schema.json | 71

[PATCH v6 0/1] Support IPv6 route info

2024-06-13 Thread Dehan Meng
t v1 -> v2 - Replace snprintf() to g_strdup_printf() to avoid memory problems. - Remove the parameter 'char ipAddress[16]' in function 'char *hexToIPAddress()'. - Add a piece of logic to skip traversing the first line of the file Dehan Meng (1): qga/linux: Add new api '

[PATCH] qga/linux: Add new api 'guest-network-get-route'

2023-11-17 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 82 qga/commands-win32.c | 6 qga/qapi-schema.json | 80

[PATCH v2 1/1] qga/linux: Add new api 'guest-network-get-route'

2023-11-23 Thread Dehan Meng
The Route information of the Linux VM needs to be used by administrators and users when debugging network problems and troubleshooting. Signed-off-by: Dehan Meng --- qga/commands-posix.c | 78 ++ qga/commands-win32.c | 6 qga/qapi-schema.json | 80

[PATCH 1/1] qga/linux: Add new api 'guest-network-get-route'

2023-11-23 Thread Dehan Meng
v1 -> v2 - Replace snprintf() to g_strdup_printf() to avoid memory problems. - Remove the parameter 'char ipAddress[16]' in function 'char *hexToIPAddress()'. - Add a piece of logic to skip traversing the first line of the file Dehan Meng (1): qga/linux: Add new api &

[PATCH v1 1/1] qemu-ga: Fix some potential issues find by coverity

2024-10-09 Thread Dehan Meng
ks. 5. Followed the coding style of using snake_case for variable names. 6. Merged redundant route and networkroute variables. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 139 --- 1 file changed, 65 insertions(+), 74 deletions(-) diff --git a/qga/com

[PATCH v2 0/4] qemu-ga: Fix some potential issues find by coverity

2024-10-10 Thread Dehan Meng
v2: Split v1 up to separate commits for each logically independent change Dehan Meng (4): sscanf return values are checked to ensure correct parsing. Proper initialization of n to 0 for getline to function correctly. Avoiding freeing line prematurely. It's now only freed at the e

[PATCH v2 2/4] Proper initialization of n to 0 for getline to function correctly.

2024-10-10 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 2c2b5f4ff2..b905f33a57 100644 --- a/qga/commands-linux.c +++ b/qga/commands-linux.c @@ -2126,7 +2126,7 @@ GuestNetworkRouteList

[PATCH v2 1/4] sscanf return values are checked to ensure correct parsing.

2024-10-10 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 51d5e3d927..2c2b5f4ff2 100644 --- a/qga/commands-linux.c +++ b/qga/commands-linux.c @@ -2103,7 +2103,9 @@ static char

[PATCH v2 3/4] Avoiding freeing line prematurely. It's now only freed at the end of the function.

2024-10-10 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index b905f33a57..4f0e38be81 100644 --- a/qga/commands-linux.c +++ b/qga/commands-linux.c @@ -2137,8 +2137,7

[PATCH v2 4/4] For correcting code style: Variable declarations moved to the beginning of blocks Followed the coding style of using snake_case for variable names. And merged redundant route and networ

2024-10-10 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 116 --- 1 file changed, 53 insertions(+), 63 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 4f0e38be81..c6cca630ef 100644 --- a/qga/commands-linux.c +++ b/qga/commands

[PATCH v2 4/4] For correcting code style: Variable declarations moved to the beginning of blocks Followed the coding style of using snake_case for variable names. And merged redundant route and networ

2024-10-21 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 116 --- 1 file changed, 53 insertions(+), 63 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 4f0e38be81..c6cca630ef 100644 --- a/qga/commands-linux.c +++ b/qga/commands

[PATCH v3 4/4] qemu-ga: For correcting code style

2024-10-21 Thread Dehan Meng
Variable declarations moved to the beginning of blocks Followed the coding style of using snake_case for variable names. And merged redundant route and networkroute variables. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 123 --- 1 file changed

[PATCH v3 0/4] qemu-ga: Modify commits message and make some minor code update

2024-10-21 Thread Dehan Meng
v3: Modify commits message and do some minor update. v2: Split v1 up to separate commits for each logically independent change Dehan Meng (4): 'Null' check for mandatory parameters Initialize correctly so getline works properly Avoiding freeing line prematurely For correcting

[PATCH v3 3/4] qemu-ga: Avoiding freeing line prematurely

2024-10-21 Thread Dehan Meng
It's now only freed at the end of the function. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 32bf1b8ce7..c6bda78de6 100644 --- a/qga/commands-linux.c +++

[PATCH v2 2/4] Proper initialization of n to 0 for getline to function correctly.

2024-10-21 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 2c2b5f4ff2..b905f33a57 100644 --- a/qga/commands-linux.c +++ b/qga/commands-linux.c @@ -2126,7 +2126,7 @@ GuestNetworkRouteList

[PATCH v3 1/4] qemu-ga: 'Null' check for mandatory parameters

2024-10-21 Thread Dehan Meng
sscanf return values are checked and add 'Null' check for mandatory parameters. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 51d5e3d927..f0e9cdd

[PATCH v2 0/4] qemu-ga: Fix some potential issues find by coverity

2024-10-21 Thread Dehan Meng
v2: Split v1 up to separate commits for each logically independent change Dehan Meng (4): sscanf return values are checked to ensure correct parsing. Proper initialization of n to 0 for getline to function correctly. Avoiding freeing line prematurely. It's now only freed at the e

[PATCH v2 1/4] sscanf return values are checked to ensure correct parsing.

2024-10-21 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 51d5e3d927..2c2b5f4ff2 100644 --- a/qga/commands-linux.c +++ b/qga/commands-linux.c @@ -2103,7 +2103,9 @@ static char

[PATCH v3 2/4] qemu-ga: Initialize correctly so getline works properly

2024-10-21 Thread Dehan Meng
Proper initialization of param 'size_t n' to '0' for getline to function correctly. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index f0e9cdd27c..32bf1b8

[PATCH v2 3/4] Avoiding freeing line prematurely. It's now only freed at the end of the function.

2024-10-21 Thread Dehan Meng
Signed-off-by: Dehan Meng --- qga/commands-linux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index b905f33a57..4f0e38be81 100644 --- a/qga/commands-linux.c +++ b/qga/commands-linux.c @@ -2137,8 +2137,7

Re: [PATCH v3 1/4] qemu-ga: 'Null' check for mandatory parameters

2024-10-22 Thread Dehan Meng
at 09:28:36PM +0800, Dehan Meng wrote: >> > sscanf return values are checked and add 'Null' check for >> > mandatory parameters. >> > >> > Signed-off-by: Dehan Meng >> > --- >> > qga/commands-linux.c | 12 +++- >> >

[PATCH v4 0/5] qemu-ga: Hanle memory leak and simplify code

2024-10-22 Thread Dehan Meng
v4: Handle g_autoptr() to simplify code and memory leak v3: Modify commits message and do some minor update. v2: Split v1 up to separate commits for each logically independent change Dehan Meng (5): 'Null' check for mandatory parameters Initialize correctly so getline work

[PATCH v4 1/5] qemu-ga: 'Null' check for mandatory parameters

2024-10-22 Thread Dehan Meng
sscanf return values are checked and add 'Null' check for mandatory parameters. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 51d5e3d927..f0e9cdd

[PATCH v4 5/5] qemu-ga: Replace g_new0() with g_autoptr()

2024-10-22 Thread Dehan Meng
Replace g_new0() with g_autoptr() to simplify the code Signed-off-by: Dehan Meng --- qga/commands-linux.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 9fb31956b4..ee4f345938 100644 --- a/qga/commands

[PATCH v4 2/5] qemu-ga: Initialize correctly so getline works properly

2024-10-22 Thread Dehan Meng
Proper initialization of param 'size_t n' to '0' for getline to function correctly. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index f0e9cdd27c..32bf1b8

[PATCH v4 3/5] qemu-ga: Avoiding freeing line prematurely

2024-10-22 Thread Dehan Meng
It's now only freed at the end of the function. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 32bf1b8ce7..c6bda78de6 100644 --- a/qga/commands-linux.c +++

[PATCH v4 4/5] qemu-ga: For correcting code style

2024-10-22 Thread Dehan Meng
Variable declarations moved to the beginning of blocks Followed the coding style of using snake_case for variable names. And merged redundant route and networkroute variables. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 123 --- 1 file changed

Re: [PATCH v4 1/5] qemu-ga: 'Null' check for mandatory parameters

2024-10-27 Thread Dehan Meng
okay, I'll summarize all of the patches. thanks for reviewing. On Fri, Oct 25, 2024 at 8:48 PM Daniel P. Berrangé wrote: > On Tue, Oct 22, 2024 at 10:29:44PM +0800, Dehan Meng wrote: > > sscanf return values are checked and add 'Null' check for > > mandatory par

Re: [PATCH v4 5/5] qemu-ga: Replace g_new0() with g_autoptr()

2024-10-27 Thread Dehan Meng
Thank you for reviewing, I'll summarize all of the patches. On Fri, Oct 25, 2024 at 8:50 PM Daniel P. Berrangé wrote: > On Tue, Oct 22, 2024 at 10:29:48PM +0800, Dehan Meng wrote: > > Replace g_new0() with g_autoptr() to simplify the code > > > > Signed-off-by: De

[PATCH v5 3/3] qemu-ga: Avoiding freeing line prematurely

2024-11-06 Thread Dehan Meng
It's now only freed at the end of the function. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qga/commands-linux.c b/qga/commands-linux.c index 55c35bfc8f..70020621bf 100644 --- a/qga/commands-linux.c +++

[PATCH v5 0/3] qemu-ga: Summarize and merge commits

2024-11-06 Thread Dehan Meng
v4: Handle g_autoptr() to simplify code and memory leak v3: Modify commits message and do some minor update. v2: Split v1 up to separate commits for each logically independent change Dehan Meng (3): qemu-ga: Add 'Null' check and Redefine 'route' qemu-ga: Optimize

[PATCH v5 1/3] qemu-ga: Add 'Null' check and Redefine 'route'

2024-11-06 Thread Dehan Meng
sscanf return values are checked and add 'Null' check for mandatory parameters. And merged redundant route and networkroute variables. Signed-off-by: Dehan Meng --- qga/commands-linux.c | 86 +++- 1 file changed, 45 insertions(+), 41 deletion

[PATCH v5 2/3] qemu-ga: Optimize var declaration and definition

2024-11-06 Thread Dehan Meng
Variable declarations moved to the beginning of blocks Followed the coding style of using snake_case for variable names. Proper initialization of param 'size_t n' to '0' for Signed-off-by: Dehan Meng --- qga/commands-linux.c | 43 +++

[PATCH] qemu-ga-win: Fix a typo error

2024-12-09 Thread Dehan Meng
There is a typo error for api 'guest-get-osinfo', the win2025's version in WIN_10_0_SERVER_VERSION_MATRIX should be adjusted. Signed-off-by: Dehan Meng --- qga/commands-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/command

[PATCH] qemu-ga: Optimize freeze-hook script logic of logging error

2024-12-25 Thread Dehan Meng
Make sure the error log of fsfreeze hooks when freeze/thaw/snapshot could be logged to system logs if the default logfile of qga can't be written or other situations Signed-off-by: Dehan Meng --- scripts/qemu-guest-agent/fsfreeze-hook | 36 +++--- 1 file change

Re: [PATCH 0/2] qga: Add 'guest-get-load' command

2025-03-18 Thread Dehan Meng
QE tested this series's patches. cpu load will be captured by the new api 'guest-get-load'. Tested-by: Dehan Meng On Fri, Mar 14, 2025 at 7:39 PM Konstantin Kostiuk wrote: > Konstantin Kostiuk (2): > qga-win: implement a 'guest-get-load' command > qga: Ad