]> git.ipfire.org Git - pakfire.git/commitdiff
mount: Don't return error in foreach when there are no mountpoints
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2022 14:29:32 +0000 (14:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 19 Jul 2022 14:29:32 +0000 (14:29 +0000)
The loop returned 1 by default when there were no mountpoints to process
which is not what we need here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/mount.c

index e671a69552cb0709371450ebac86c69d1415024d..ae87aa660cd1617850979c1a854a79f36d514617 100644 (file)
@@ -106,7 +106,7 @@ static int pakfire_mount_foreach(struct pakfire* pakfire, int direction,
                int (*callback)(struct pakfire* pakfire, struct libmnt_fs* fs, const void* data),
                const void* data) {
        const char* root = pakfire_get_path(pakfire);
-       int r = 1;
+       int r = 0;
 
        struct libmnt_iter* iterator = NULL;
        struct libmnt_table* tab = NULL;