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

dmeventd: no log when after unlink file is gone

Check for errno ENOENT.

TODO: there should be global wrapper for this...
This commit is contained in:
Zdenek Kabelac 2024-04-11 23:21:43 +02:00
parent 54840d867e
commit 5e3224c57d

View File

@ -1932,14 +1932,14 @@ out:
static void _remove_files_on_exit(void)
{
if (unlink(DMEVENTD_PIDFILE))
if (unlink(DMEVENTD_PIDFILE) && (errno != ENOENT))
log_sys_debug("unlink", DMEVENTD_PIDFILE);
if (!_systemd_activation) {
if (unlink(DM_EVENT_FIFO_CLIENT))
if (unlink(DM_EVENT_FIFO_CLIENT) && (errno != ENOENT))
log_sys_debug("unlink", DM_EVENT_FIFO_CLIENT);
if (unlink(DM_EVENT_FIFO_SERVER))
if (unlink(DM_EVENT_FIFO_SERVER) && (errno != ENOENT))
log_sys_debug("unlink", DM_EVENT_FIFO_SERVER);
}
}