]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
source-pcap-file: include unlink error in warning message
authorLong Doan <hoanglong7421@gmail.com>
Tue, 6 Jun 2023 22:08:06 +0000 (00:08 +0200)
committerVictor Julien <vjulien@oisf.net>
Thu, 8 Jun 2023 17:30:06 +0000 (19:30 +0200)
src/source-pcap-file-helper.c

index de78fc45f1f233e70f00fcca8fd82da66e05ea9b..8853080e917578f2e14db5649b5faeff7081fbd8 100644 (file)
@@ -47,7 +47,7 @@ void CleanupPcapFileFileVars(PcapFileFileVars *pfv)
             if (pfv->shared != NULL && pfv->shared->should_delete) {
                 SCLogDebug("Deleting pcap file %s", pfv->filename);
                 if (unlink(pfv->filename) != 0) {
-                    SCLogWarning("Failed to delete %s", pfv->filename);
+                    SCLogWarning("Failed to delete %s: %s", pfv->filename, strerror(errno));
                 }
             }
             SCFree(pfv->filename);