From: Thomas Weißschuh Date: Sun, 25 Jun 2023 07:58:43 +0000 (+0200) Subject: lib/loopdev: document function return values X-Git-Tag: v2.40-rc1~369^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af5efcd810ae92740ac15bbba8dfb334e1440ece;p=thirdparty%2Futil-linux.git lib/loopdev: document function return values Signed-off-by: Thomas Weißschuh --- 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;