]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: don't ignore chmod/own errors
authorKarel Zak <kzak@redhat.com>
Thu, 2 Feb 2012 13:39:02 +0000 (14:39 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 2 Feb 2012 13:39:02 +0000 (14:39 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/tab_update.c

index 7238faf687fc7e52515cda098115faee5ead1ddb..56e87cf0eb6879fdf0e9b9fd022145f67c003d3f 100644 (file)
@@ -545,7 +545,9 @@ static int update_table(struct libmnt_update *upd, struct libmnt_table *tb)
 
                fclose(f);
                f = NULL;
-               rc = rename(uq, upd->filename) ? -errno : 0;
+
+               if (!rc)
+                       rc = rename(uq, upd->filename) ? -errno : 0;
        } else {
                rc = -errno;
                close(fd);