hw/usb/dev-mtp: Correctly report free space
commit283720489fdadadbd99774c2cdeff6635e396415
authorFabio D'Urso <fdurso@google.com>
Tue, 18 Jun 2024 00:36:57 +0000 (18 02:36 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 19 Jun 2024 10:42:03 +0000 (19 12:42 +0200)
treef8c14ed9b124bc1e77b376a857c4bc9e776aada5
parentce5311c47600a246995438e956f0090175e6965a
hw/usb/dev-mtp: Correctly report free space

In order to compute the amount of free space (in bytes), the number
of available blocks (f_bavail) should be multiplied by the block
size (f_frsize) instead of the total number of blocks (f_blocks).

Signed-off-by: Fabio D'Urso <fdurso@google.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240618003657.3344685-1-fdurso@google.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/usb/dev-mtp.c