]> git.ipfire.org Git - thirdparty/qemu.git/commit
qemu-img: create: convert img_size to signed, simplify handling
authorMichael Tokarev <mjt@tls.msk.ru>
Sat, 31 May 2025 17:15:44 +0000 (20:15 +0300)
committerKevin Wolf <kwolf@redhat.com>
Tue, 15 Jul 2025 18:49:01 +0000 (20:49 +0200)
commit443761ab3874d0ffc2df0a0cd73dd1ca833b277e
treed0fc5b62a41bcd84e152c1acbfebb694f55a04ff
parent1c47abc5779dfaaee303f0bff144e88dc8fb74d5
qemu-img: create: convert img_size to signed, simplify handling

Initializing an unsigned as -1, or using temporary
sval for conversion is awkward.  Since we don't allow
other "negative" values anyway, use signed value and
pass it to bdrv_img_create() (where it is properly
converted to unsigned), simplifying code.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20250531171609.197078-3-mjt@tls.msk.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c