[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v5 1/3] block: include base when checking image
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v5 1/3] block: include base when checking image chain for block allocation |
Date: |
Thu, 25 Apr 2019 18:46:15 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Mon 22 Apr 2019 12:18:58 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
> * Given an image chain: ... -> [BASE] -> [INTER1] -> [INTER2] -> [TOP]
> *
> * Return true if (a prefix of) the given range is allocated in any image
> - * between BASE and TOP (inclusive). BASE can be NULL to check if the given
> - * offset is allocated in any image of the chain. Return false otherwise,
> - * or negative errno on failure.
> + * between BASE and TOP (BASE is only included if include_base is set).
> + * BASE can be NULL to check if the given offset is allocated in any
> + * image of the chain. Return false otherwise, or negative errno on
> + * failure.
This is a pre-existing problem and probably a bit pedantic, but I just
realized that this description is not quite correct. This function does
not return true and false (bool), but 1 and 0 (int). This is so in order
to be able to return < 0 on errors.
I think I'd replace true and false with 1 and 0 on that message.
Berto