Sync signature wipes in tools_wipe_all_signutares.

This commit is contained in:
Ondrej Kozina
2022-06-16 15:51:12 +02:00
parent 4892b24d6a
commit daa2b60d62

View File

@@ -309,7 +309,7 @@ int tools_wipe_all_signatures(const char *path, bool exclusive, bool only_luks)
if (blk_is_superblock(h)) if (blk_is_superblock(h))
log_verbose(_("Existing '%s' superblock signature on device %s will be wiped."), log_verbose(_("Existing '%s' superblock signature on device %s will be wiped."),
blk_get_superblock_type(h), path); blk_get_superblock_type(h), path);
if (blk_do_wipe(h)) { if (blk_do_wipe(h) || fsync(fd)) {
log_err(_("Failed to wipe device signature.")); log_err(_("Failed to wipe device signature."));
r = -EINVAL; r = -EINVAL;
goto out; goto out;