1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: check syscall result

This commit is contained in:
Zdenek Kabelac 2023-04-26 16:36:42 +02:00
parent f038fc3b17
commit 58293173cf

View File

@ -233,7 +233,8 @@ int vgimportdevices(struct cmd_context *cmd, int argc, char **argv)
log_print("Added %u devices to devices file.", vp.added_devices);
out:
if ((ret == ECMD_FAILED) && created_file)
unlink(cmd->devices_file_path);
if (unlink(cmd->devices_file_path) < 0)
log_sys_debug("unlink", cmd->devices_file_path);
destroy_processing_handle(cmd, handle);
return ret;
}