You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/qga
Michael Tokarev b217d987a3 qga: correctly write to /sys/power/state on linux
Commit v9.0.0-343-g2048129625 introduced usage of
g_file_set_contents() function to write to /sys/power/state.
This function uses G_FILE_SET_CONTENTS_CONSISTENT flag to
g_file_set_contents_full(), which is implemented by creating
a temp file in the same directory and renaming it to the final
destination.  Which is not how sysfs works.

Here, there's not a big deal to do open/write/close - it becomes
almost the same as using g_file_set_contents[_full]().  But it
does not have surprises like this.

Also, since this is linux code, it should be ok to use %m in
the error reporting function.

Fixes: 2048129625 "qga/commands-posix: don't do fork()/exec() when suspending via sysfs"
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3057
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20250801115316.6845-1-mjt@tls.msk.ru>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
6 days ago
..
installer qga/win/installer: add VssOption to installer 2 years ago
vss-win32 qga/vss-win32: Add VSS provider unregistration retry 1 month ago
channel-posix.c qga/: spelling fixes 2 years ago
channel-win32.c qga: Add spaces around operator 4 years ago
channel.h qga: add systemd socket activation support 9 years ago
commands-bsd.c error: Drop superfluous #include "qapi/qmp/qerror.h" 10 months ago
commands-common-ssh.c qga: Refactor common SSH functions 1 year ago
commands-common-ssh.h qga: Refactor common SSH functions 1 year ago
commands-common.h qga: move CONFIG_FSFREEZE/TRIM to be meson defined options 1 year ago
commands-linux.c qga: correctly write to /sys/power/state on linux 6 days ago
commands-posix-ssh.c Remove glib compatibility code that is not required anymore 1 year ago
commands-posix.c qga: Add log to guest-fsfreeze-thaw command 6 months ago
commands-win32.c qga-win: implement a 'guest-get-load' command 2 months ago
commands-windows-ssh.c qga: fix -Wsometimes-uninitialized windows warning 9 months ago
commands-windows-ssh.h qga: Implement SSH commands for Windows 1 year ago
commands.c qga: Shorten several error messages 1 year ago
cutils.c qga: Clean up includes 3 years ago
cutils.h qga: Clean up includes 3 years ago
guest-agent-command-state.c qga: use local path for local headers 7 years ago
guest-agent-core.h qga-win: implement a 'guest-get-load' command 2 months ago
main.c qga-win: implement a 'guest-get-load' command 2 months ago
meson.build qga-win: implement a 'guest-get-load' command 2 months ago
messages-win32.mc qga-win: add logging to Windows event log 3 years ago
qapi-schema.json qga: Add cross-references 2 weeks ago
service-win32.c qga: Remove unnecessary glib.h includes 9 years ago
service-win32.h qga-win: changing --retry-path option behavior 7 years ago
vss-win32.c qga-win: add support for qmp_guest_fsfreeze_freeze_list 7 years ago
vss-win32.h qga-win: add support for qmp_guest_fsfreeze_freeze_list 7 years ago