From a9ddf316c86cf5cd40d38f1d456ccd614b0ce351 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 2 Feb 2012 14:39:02 +0100 Subject: [PATCH] libmount: don't ignore chmod/own errors Signed-off-by: Karel Zak --- libmount/src/tab_update.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmount/src/tab_update.c b/libmount/src/tab_update.c index 7238faf687..56e87cf0eb 100644 --- a/libmount/src/tab_update.c +++ b/libmount/src/tab_update.c @@ -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); -- 2.47.2