qga/commands-win32: Declare const qualifier before type
Most of the code base use the 'const' qualifier *before* the type being qualified. Use the same style to unify. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240222152835.72095-2-philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com> Link: https://lore.kernel.org/r/20240304134532.28506-2-kkostiuk@redhat.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
This commit is contained in:
parent
7489f7f3f8
commit
68bc26717e
@ -2120,11 +2120,11 @@ GuestUserList *qmp_guest_get_users(Error **errp)
|
|||||||
typedef struct _ga_matrix_lookup_t {
|
typedef struct _ga_matrix_lookup_t {
|
||||||
int major;
|
int major;
|
||||||
int minor;
|
int minor;
|
||||||
char const *version;
|
const char *version;
|
||||||
char const *version_id;
|
const char *version_id;
|
||||||
} ga_matrix_lookup_t;
|
} ga_matrix_lookup_t;
|
||||||
|
|
||||||
static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][7] = {
|
static const ga_matrix_lookup_t WIN_VERSION_MATRIX[2][7] = {
|
||||||
{
|
{
|
||||||
/* Desktop editions */
|
/* Desktop editions */
|
||||||
{ 5, 0, "Microsoft Windows 2000", "2000"},
|
{ 5, 0, "Microsoft Windows 2000", "2000"},
|
||||||
@ -2148,18 +2148,18 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][7] = {
|
|||||||
|
|
||||||
typedef struct _ga_win_10_0_t {
|
typedef struct _ga_win_10_0_t {
|
||||||
int first_build;
|
int first_build;
|
||||||
char const *version;
|
const char *version;
|
||||||
char const *version_id;
|
const char *version_id;
|
||||||
} ga_win_10_0_t;
|
} ga_win_10_0_t;
|
||||||
|
|
||||||
static ga_win_10_0_t const WIN_10_0_SERVER_VERSION_MATRIX[4] = {
|
static const ga_win_10_0_t WIN_10_0_SERVER_VERSION_MATRIX[4] = {
|
||||||
{14393, "Microsoft Windows Server 2016", "2016"},
|
{14393, "Microsoft Windows Server 2016", "2016"},
|
||||||
{17763, "Microsoft Windows Server 2019", "2019"},
|
{17763, "Microsoft Windows Server 2019", "2019"},
|
||||||
{20344, "Microsoft Windows Server 2022", "2022"},
|
{20344, "Microsoft Windows Server 2022", "2022"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ga_win_10_0_t const WIN_10_0_CLIENT_VERSION_MATRIX[3] = {
|
static const ga_win_10_0_t WIN_10_0_CLIENT_VERSION_MATRIX[3] = {
|
||||||
{10240, "Microsoft Windows 10", "10"},
|
{10240, "Microsoft Windows 10", "10"},
|
||||||
{22000, "Microsoft Windows 11", "11"},
|
{22000, "Microsoft Windows 11", "11"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
@ -2185,16 +2185,16 @@ static void ga_get_win_version(RTL_OSVERSIONINFOEXW *info, Error **errp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *ga_get_win_name(OSVERSIONINFOEXW const *os_version, bool id)
|
static char *ga_get_win_name(const OSVERSIONINFOEXW *os_version, bool id)
|
||||||
{
|
{
|
||||||
DWORD major = os_version->dwMajorVersion;
|
DWORD major = os_version->dwMajorVersion;
|
||||||
DWORD minor = os_version->dwMinorVersion;
|
DWORD minor = os_version->dwMinorVersion;
|
||||||
DWORD build = os_version->dwBuildNumber;
|
DWORD build = os_version->dwBuildNumber;
|
||||||
int tbl_idx = (os_version->wProductType != VER_NT_WORKSTATION);
|
int tbl_idx = (os_version->wProductType != VER_NT_WORKSTATION);
|
||||||
ga_matrix_lookup_t const *table = WIN_VERSION_MATRIX[tbl_idx];
|
const ga_matrix_lookup_t *table = WIN_VERSION_MATRIX[tbl_idx];
|
||||||
ga_win_10_0_t const *win_10_0_table = tbl_idx ?
|
const ga_win_10_0_t *win_10_0_table = tbl_idx ?
|
||||||
WIN_10_0_SERVER_VERSION_MATRIX : WIN_10_0_CLIENT_VERSION_MATRIX;
|
WIN_10_0_SERVER_VERSION_MATRIX : WIN_10_0_CLIENT_VERSION_MATRIX;
|
||||||
ga_win_10_0_t const *win_10_0_version = NULL;
|
const ga_win_10_0_t *win_10_0_version = NULL;
|
||||||
while (table->version != NULL) {
|
while (table->version != NULL) {
|
||||||
if (major == 10 && minor == 0) {
|
if (major == 10 && minor == 0) {
|
||||||
while (win_10_0_table->version != NULL) {
|
while (win_10_0_table->version != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user