main - cov: check syscall result

Zdenek Kabelac <[email protected]>
Newsgroups gmane.linux.lvm.devel
Message-ID <[email protected]>
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=58293173cf4d05d3bffa905875442567e5ca4780
Commit:        58293173cf4d05d3bffa905875442567e5ca4780
Parent:        f038fc3b177c43b9bb0929f5dcc834e24574df03
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Apr 26 16:36:42 2023 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sat May 6 20:38:57 2023 +0200

cov: check syscall result

---
 tools/vgimportdevices.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/vgimportdevices.c b/tools/vgimportdevices.c
index 07d07402a..bccd94f61 100644
--- a/tools/vgimportdevices.c
+++ b/tools/vgimportdevices.c
@@ -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;
 }

--
lvm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/lvm-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.