From 1e8bc8fd34332b503e47068a7294350625a38ba6 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Sat, 25 May 2024 07:19:31 +0200 Subject: [PATCH] isobusfs: do not kill application on error_queue error Kernel may notify us about some error, which may happens if the bus was in the error state. But this is not a good reason to kill application, especially the server side. Signed-off-by: Oleksij Rempel --- isobusfs/isobusfs_cli.c | 4 ++-- isobusfs/isobusfs_srv.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/isobusfs/isobusfs_cli.c b/isobusfs/isobusfs_cli.c index ac2c508..b6bcd77 100644 --- a/isobusfs/isobusfs_cli.c +++ b/isobusfs/isobusfs_cli.c @@ -288,8 +288,8 @@ static int isobusfs_cli_handle_events(struct isobusfs_priv *priv, unsigned int n }; ret = isobusfs_recv_err(priv->sock_ccm, &emsg); - if (ret && ret != -EINTR) - return ret; + if (ret) + pr_warn("error queue reported error: %i", ret); } } else if (ev->data.fd == STDIN_FILENO) { if (!priv->interactive) { diff --git a/isobusfs/isobusfs_srv.c b/isobusfs/isobusfs_srv.c index 4ff4b4b..9429dbb 100644 --- a/isobusfs/isobusfs_srv.c +++ b/isobusfs/isobusfs_srv.c @@ -221,8 +221,8 @@ static int isobusfs_srv_handle_events(struct isobusfs_srv_priv *priv, unsigned i }; ret = isobusfs_recv_err(priv->sock_fss, &emsg); - if (ret && ret != -EINTR) - return ret; + if (ret) + pr_warn("error queue reported error: %i", ret); } }