qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 3dd698: include: move qemu_*_exec_dir() to cu


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 3dd698: include: move qemu_*_exec_dir() to cutils
Date: Fri, 27 May 2022 08:27:03 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 3dd698b3228b104c1c5e673190dd5ed9ec4842bf
      
https://github.com/qemu/qemu/commit/3dd698b3228b104c1c5e673190dd5ed9ec4842bf
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M include/qemu/cutils.h
    M include/qemu/osdep.h
    M qemu-io.c
    M storage-daemon/qemu-storage-daemon.c
    M tests/qtest/fuzz/fuzz.c
    M util/cutils.c
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  include: move qemu_*_exec_dir() to cutils

The function is required by get_relocated_path() (already in cutils),
and used by qemu-ga and may be generally useful.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220525144140.591926-2-marcandre.lureau@redhat.com>


  Commit: 99c6d328ccc8714242e5a2b11aad0b391d8c5848
      
https://github.com/qemu/qemu/commit/99c6d328ccc8714242e5a2b11aad0b391d8c5848
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M util/oslib-win32.c

  Log Message:
  -----------
  util/win32: simplify qemu_get_local_state_dir()

SHGetFolderPath() is a deprecated API:
https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha

It is a wrapper for SHGetKnownFolderPath() and CSIDL_COMMON_PATH is
mapped to FOLDERID_ProgramData:
https://docs.microsoft.com/en-us/windows/win32/shell/csidl

g_get_system_data_dirs() is a suitable replacement, as it will have
FOLDERID_ProgramData in the returned list. However, it follows the XDG
Base Directory Specification, if `XDG_DATA_DIRS` is defined, it will be
returned instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Message-Id: <20220525144140.591926-3-marcandre.lureau@redhat.com>


  Commit: db15af9e695c1ed4e0bf656c145c05bead35c085
      
https://github.com/qemu/qemu/commit/db15af9e695c1ed4e0bf656c145c05bead35c085
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M tests/qtest/libqmp.c
    M tests/qtest/libqmp.h

  Log Message:
  -----------
  tests: make libqmp buildable for win32

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220525144140.591926-4-marcandre.lureau@redhat.com>


  Commit: 71764c9e21bb2aafb30af12a05d4f4814d8a198c
      
https://github.com/qemu/qemu/commit/71764c9e21bb2aafb30af12a05d4f4814d8a198c
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/commands-posix.c

  Log Message:
  -----------
  qga: flatten safe_open_or_create()

There is a bit too much nesting in the function, this can be simplified
a bit to improve readability.

This also helps with the following error handling changes.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220525144140.591926-5-marcandre.lureau@redhat.com>


  Commit: 88cd6fb606c2e108fba672e5be6ce0ad452e2e49
      
https://github.com/qemu/qemu/commit/88cd6fb606c2e108fba672e5be6ce0ad452e2e49
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    A qga/cutils.c
    A qga/cutils.h
    M qga/meson.build

  Log Message:
  -----------
  qga: add qga_open_cloexec() helper

QGA calls qemu_open_old() in various places. Calling qemu_open() instead
isn't a great alternative, as it has special "/dev/fdset" handling and
depends on QEMU internal monitor data structures.

Instead, provide a simple helper for QGA needs, with Error* support. The
following patches will make use of it.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220525144140.591926-6-marcandre.lureau@redhat.com>


  Commit: 034bf1d162ded5f2b1ddfb8e7128b154222a9884
      
https://github.com/qemu/qemu/commit/034bf1d162ded5f2b1ddfb8e7128b154222a9884
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/commands-posix.c

  Log Message:
  -----------
  qga: use qga_open_cloexec() for safe_open_or_create()

The function takes care of setting CLOEXEC.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220525144140.591926-7-marcandre.lureau@redhat.com>


  Commit: 8d9c2695d7b44a24600dffcf04f79f139dcfd0b4
      
https://github.com/qemu/qemu/commit/8d9c2695d7b44a24600dffcf04f79f139dcfd0b4
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/channel-posix.c

  Log Message:
  -----------
  qga: throw an Error in ga_channel_open()

Allow for a single point of error reporting, and further refactoring.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220525144140.591926-8-marcandre.lureau@redhat.com>


  Commit: 35659923906ad0b2f90fdbe9d076ee111e7dc885
      
https://github.com/qemu/qemu/commit/35659923906ad0b2f90fdbe9d076ee111e7dc885
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/channel-posix.c
    M qga/commands-posix.c

  Log Message:
  -----------
  qga: replace qemu_open_old() with qga_open_cloexec()

qemu_open_old() uses qemu_open_internal() which handles special
"/dev/fdset/" path for monitor fd sets, set CLOEXEC, and uses Error
reporting (and some O_DIRECT special error casing).

The monitor fdset handling is unnecessary for qga, use
qga_open_cloexec() instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20220525144140.591926-9-marcandre.lureau@redhat.com>


  Commit: 8ff03ec1f92bdeda0121f7058ccb946c7a1d83c0
      
https://github.com/qemu/qemu/commit/8ff03ec1f92bdeda0121f7058ccb946c7a1d83c0
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/commands-posix.c

  Log Message:
  -----------
  qga: make build_fs_mount_list() return a bool

Change build_fs_mount_list() to return bool, in accordance
with the guidance under = Rules = in include/qapi/error.h

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Suggested-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220525144140.591926-10-marcandre.lureau@redhat.com>


  Commit: a134754abbbc8ea6eabe40d24d9d401bab1ae098
      
https://github.com/qemu/qemu/commit/a134754abbbc8ea6eabe40d24d9d401bab1ae098
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M tests/unit/test-qga.c

  Log Message:
  -----------
  test/qga: use G_TEST_DIR to locate os-release test file

This a more accurate way to lookup the test data, and will allow to move
the test in a subproject.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20220525144140.591926-11-marcandre.lureau@redhat.com>


  Commit: e5e7d30dfd791444eeab0ac69990922fd0a4d871
      
https://github.com/qemu/qemu/commit/e5e7d30dfd791444eeab0ac69990922fd0a4d871
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/installer/qemu-ga.wxs
    M qga/meson.build

  Log Message:
  -----------
  qga/wixl: prefer variables over environment

No need to setup an environment or to check if the variable is undefined
manually.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20220525144140.591926-12-marcandre.lureau@redhat.com>


  Commit: 5b5517f0329abf717a555e141ad67919a2f51d87
      
https://github.com/qemu/qemu/commit/5b5517f0329abf717a555e141ad67919a2f51d87
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/installer/qemu-ga.wxs

  Log Message:
  -----------
  qga/wixl: require Mingw_bin

No clear reason to make guesses here.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20220525144140.591926-13-marcandre.lureau@redhat.com>


  Commit: 73b4014a94125d9ef0823b8378c28282a964a753
      
https://github.com/qemu/qemu/commit/73b4014a94125d9ef0823b8378c28282a964a753
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M qga/installer/qemu-ga.wxs

  Log Message:
  -----------
  qga/wixl: simplify some pre-processing

Sadly, wixl doesn't have 'elif'.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20220525144140.591926-14-marcandre.lureau@redhat.com>


  Commit: 013566fcbc22d984c68b6e9443edcc95f74844d9
      
https://github.com/qemu/qemu/commit/013566fcbc22d984c68b6e9443edcc95f74844d9
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M configure
    M meson.build
    M qga/installer/qemu-ga.wxs
    M qga/meson.build

  Log Message:
  -----------
  qga/wixl: replace QEMU_GA_MSI_MINGW_BIN_PATH with glib bindir

Use more conventional variables to set the location of pre-built
DLL/bin.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20220525144140.591926-15-marcandre.lureau@redhat.com>


  Commit: 71a56d6afc28b4175fedb0892e088e67f1d603f1
      
https://github.com/qemu/qemu/commit/71a56d6afc28b4175fedb0892e088e67f1d603f1
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M tests/unit/test-qga.c

  Log Message:
  -----------
  test/qga: use g_auto wherever sensible

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Message-Id: <20220525144140.591926-16-marcandre.lureau@redhat.com>


  Commit: 85665e0f474e5a92be8adeb4ee144996419a8c36
      
https://github.com/qemu/qemu/commit/85665e0f474e5a92be8adeb4ee144996419a8c36
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-05-27 (Fri, 27 May 2022)

  Changed paths:
    M configure
    M include/qemu/cutils.h
    M include/qemu/osdep.h
    M meson.build
    M qemu-io.c
    M qga/channel-posix.c
    M qga/commands-posix.c
    A qga/cutils.c
    A qga/cutils.h
    M qga/installer/qemu-ga.wxs
    M qga/meson.build
    M storage-daemon/qemu-storage-daemon.c
    M tests/qtest/fuzz/fuzz.c
    M tests/qtest/libqmp.c
    M tests/qtest/libqmp.h
    M tests/unit/test-qga.c
    M util/cutils.c
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  Merge tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu into staging

Misc cleanups

Mostly qemu-ga related cleanups.

# -----BEGIN PGP SIGNATURE-----
#
# iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmKQ184cHG1hcmNhbmRy
# ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5fGSD/9CGbtBcazFggf9bdxa
# aCBhM0tV2myXKL39d8Og/oEPgXyjz+Zt0h4nFwb4RnlYAAhU1FtpaoJsqaGqR0gH
# H0VjAQpJeUsSrFVR9pWnuv2dG1+mnbMBl3UjzJBhS8YXnZvno+xTc7ye2GAemGfv
# DTrhNvEOJy8LBMdZvZfW8CLSwUs5ERjYqe4ZPVRinwapXP8WAaQkG2CuXxTpCymU
# uH3Sw2eA7Bj20p+eQnY9Gu/2GKrysF7Yj5ykwkZpxlCMceLj8wIEPDJEGj16HFDs
# FM9H+1ZQnDytvkdxl20eCirENXZVvQlfJQLyBvlcCfglwFG+hJcH22ycgafa9QrZ
# l53m7/a5UijLv2PXJpMYmsQF0qre8OrUhf/giOkaScz+EwhiBYYCroIR+rsyko6Z
# 5HVBp/jO50xemqdLYZO8zF7kg1MeGAg6JQ3y7B9fsIrXwodN5OXbn4XkehffqrFf
# 79+ngwRZGYWSl65y/6m0EUKnRtIqPyuO28WSJmlK7nL8JxxpfDpzyHYnw/oi7m8S
# wj/SxWAfiCRDVS69BKrbj4zdFKBPB8GrCGdYBjigoaWr1Dw1tV8uC9bVxxzdsbdi
# ClrT/ud3dQA+10gH1AHhygHFhxnw0YTo9t+bD719usU59Aq0Sj4so1Yyn5t2/D+L
# FBjmxHRq7tM32XeSMYIyqtVcdg==
# =3l6a
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 27 May 2022 06:53:18 AM PDT
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" 
[full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" 
[full]

* tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu:
  test/qga: use g_auto wherever sensible
  qga/wixl: replace QEMU_GA_MSI_MINGW_BIN_PATH with glib bindir
  qga/wixl: simplify some pre-processing
  qga/wixl: require Mingw_bin
  qga/wixl: prefer variables over environment
  test/qga: use G_TEST_DIR to locate os-release test file
  qga: make build_fs_mount_list() return a bool
  qga: replace qemu_open_old() with qga_open_cloexec()
  qga: throw an Error in ga_channel_open()
  qga: use qga_open_cloexec() for safe_open_or_create()
  qga: add qga_open_cloexec() helper
  qga: flatten safe_open_or_create()
  tests: make libqmp buildable for win32
  util/win32: simplify qemu_get_local_state_dir()
  include: move qemu_*_exec_dir() to cutils

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/272be013d3d3...85665e0f474e



reply via email to

[Prev in Thread] Current Thread [Next in Thread]