Skip to contentSkip to conversation

virtiofsd: fix typo in error message in fv_queue_thread

PATCH In review Liu Bo 2 participants 3 messages Jun 14, 2019

lore
Share & tools
lore

Liu Bo

author
#0 lore raw

PATCH 1/1 virtiofsd: fix typo in error message in fv_queue_thread

It's misleading that pf[0].revents is printed when there is something wrong with pf[1].revents.

---
 contrib/virtiofsd/fuse_virtio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/virtiofsd/fuse_virtio.c +1 -1
index ed6ba57..bec4105 100644
@@ -472,7 +472,7 @@ static void *fv_queue_thread(void *opaque)
                }
                if (pf[1].revents & (POLLERR | POLLHUP | POLLNVAL)) {
                        fprintf(stderr, "%s: Unexpected poll revents %x Queue %d killfd\n",
-                                __func__, pf[0].revents, qi->qidx);
+                                __func__, pf[1].revents, qi->qidx);
                        break;
                }
                if (pf[1].revents) {
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 4 lines · * Liu Bo ([email protected]) wrote:

It's misleading that pf[0].revents is printed when there is something wrong with pf[1].revents.

Ah well spotted; that's a copy-paste problem on my half.

For this, I've just fixed up the original patch.

Dave

Quoted 20 lines
---
 contrib/virtiofsd/fuse_virtio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/virtiofsd/fuse_virtio.c +1 -1
index ed6ba57..bec4105 100644
@@ -472,7 +472,7 @@ static void *fv_queue_thread(void *opaque)
                }
                if (pf[1].revents & (POLLERR | POLLHUP | POLLNVAL)) {
                        fprintf(stderr, "%s: Unexpected poll revents %x Queue %d killfd\n",
-                                __func__, pf[0].revents, qi->qidx);
+                                __func__, pf[1].revents, qi->qidx);
                        break;
                }
                if (pf[1].revents) {
Signature · 1 line
1.8.3.1

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK

author
#2 lore raw
Quoted 9 lines · Dr. David Alan Gilbert
Quoted 4 lines · * Liu Bo ([email protected]) wrote:

It's misleading that pf[0].revents is printed when there is something wrong with pf[1].revents.

Ah well spotted; that's a copy-paste problem on my half.

For this, I've just fixed up the original patch.

Sure, that's fine.

thanks,
-liubo

Quoted 25 lines

Dave

Quoted 20 lines
---
 contrib/virtiofsd/fuse_virtio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/virtiofsd/fuse_virtio.c +1 -1
index ed6ba57..bec4105 100644
@@ -472,7 +472,7 @@ static void *fv_queue_thread(void *opaque)
                }
                if (pf[1].revents & (POLLERR | POLLHUP | POLLNVAL)) {
                        fprintf(stderr, "%s: Unexpected poll revents %x Queue %d killfd\n",
-                                __func__, pf[0].revents, qi->qidx);
+                                __func__, pf[1].revents, qi->qidx);
                        break;
                }
                if (pf[1].revents) {
Signature · 1 line
1.8.3.1

--
Dr. David Alan Gilbert / [email protected] / Manchester, UK