From af5efcd810ae92740ac15bbba8dfb334e1440ece Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Sun, 25 Jun 2023 09:58:43 +0200 Subject: [PATCH] lib/loopdev: document function return values MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- lib/loopdev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/loopdev.c b/lib/loopdev.c index 631a120c4d..fc44ca550a 100644 --- a/lib/loopdev.c +++ b/lib/loopdev.c @@ -580,7 +580,7 @@ static int loopcxt_next_from_sysfs(struct loopdev_cxt *lc) /* * @lc: context, has to initialized by loopcxt_init_iterator() * - * Returns: 0 on success, -1 on error, 1 at the end of scanning. The details + * Returns: 0 on success, < 0 on error, 1 at the end of scanning. The details * about the current loop device are available by * loopcxt_get_{fd,backing_file,device,offset, ...} functions. */ @@ -1681,6 +1681,9 @@ char *loopdev_get_backing_file(const char *device) return res; } +/* + * Returns: TRUE/FALSE + */ int loopdev_has_backing_file(const char *device) { char *tmp = loopdev_get_backing_file(device); @@ -1718,6 +1721,9 @@ int loopdev_is_used(const char *device, const char *filename, return rc; } +/* + * Returns: 0 = success, < 0 error + */ int loopdev_delete(const char *device) { struct loopdev_cxt lc; -- 2.47.2