qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] qga: report disk size and free space


From: Tomáš Golembiovský
Subject: Re: [Qemu-devel] [PATCH] qga: report disk size and free space
Date: Tue, 3 Jul 2018 12:54:08 +0200

On Tue,  3 Jul 2018 10:31:20 +0200
Tomáš Golembiovský <address@hidden> wrote:

> diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> index 70ee5379f6..6d6ca05281 100644
> --- a/qga/commands-win32.c
> +++ b/qga/commands-win32.c
> @@ -706,6 +706,22 @@ static GuestFilesystemInfo *build_guest_fsinfo(char 
> *guid, Error **errp)
>      }
>      fs->type = g_strdup(fs_name);
>      fs->disk = build_guest_disk_info(guid, errp);
> +
> +    if (len > 0) {
> +        if (GetDiskFreeSpaceEx(mnt_point, 0, (PULARGE_INTEGER)&fs->size,
> +                (PULARGE_INTEGER)&fs->free) != 0) {

Btw, it seems to me that checkpatch.pl returns some false positives
here. See:

    ERROR: spaces required around that '&' (ctx:VxV)                            
                                                                                
                
    #72: FILE: qga/commands-win32.c:711:
    +        if (GetDiskFreeSpaceEx(mnt_point, 0, (PULARGE_INTEGER)&fs->size,
                                                                ^

    ERROR: spaces required around that '&' (ctx:VxV)
    #73: FILE: qga/commands-win32.c:712:
    +                (PULARGE_INTEGER)&fs->free) != 0) {
                                    ^

Seems that & is mistakenly interpreted as bitwise-AND operator. 
Or am I expected to format that as

  ..., (PULARGE_INTEGER) & fs->size, ...

because that looks... weird.


Also, checkpatch.pl itself suggest to look into MAINTAINERS to find out
whom to report false positives, but there is no maintainer there. :)

    Tomas


-- 
Tomáš Golembiovský <address@hidden>



reply via email to

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