From: Karel Zak Date: Thu, 2 Feb 2012 13:39:02 +0000 (+0100) Subject: libmount: don't ignore chmod/own errors X-Git-Tag: v2.21-rc2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9ddf316c86cf5cd40d38f1d456ccd614b0ce351;p=thirdparty%2Futil-linux.git libmount: don't ignore chmod/own errors Signed-off-by: Karel Zak --- 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);