If g_remove() fails, use warn_report() to log an error. Signed-off-by: Laurent Vivier <lviv...@redhat.com> --- net/passt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/passt.c b/net/passt.c index ef59d0682be1..43c336e5968c 100644 --- a/net/passt.c +++ b/net/passt.c @@ -103,7 +103,10 @@ static void net_passt_cleanup(NetClientState *nc) #endif kill(s->pid, SIGTERM); - g_remove(s->pidfile); + if (g_remove(s->pidfile) != 0) { + warn_report("Failed to remove passt pidfile %s: %s", + s->pidfile, strerror(errno)); + } g_free(s->pidfile); g_ptr_array_free(s->args, TRUE); } -- 2.49.0