The directory that readdir() and closedir() work on is BUS_PATH ("/sys/bus/virtio/drivers/9pnet_virtio"), not "/sys/block". Fix the error messages that are sent when readdir() or closedir() fails. (The invalid "sys/block" pathname could be a leftover from when the directory reading logic was (perhaps) copied from "daemon/sync.c".) Fixes: 5f10c3350338bbca735a74db26f98da968957bd9 Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- Notes: v2: - new patch: unrelated fix for a wart I'd come across while working the BZ daemon/9p.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/9p.c b/daemon/9p.c index 743a96abd449..9a3a5cfdf274 100644 --- a/daemon/9p.c +++ b/daemon/9p.c @@ -106,14 +106,14 @@ do_list_9p (void) /* Check readdir didn't fail */ if (errno != 0) { - reply_with_perror ("readdir: /sys/block"); + reply_with_perror ("readdir: " BUS_PATH); closedir (dir); return NULL; } /* Close the directory handle */ if (closedir (dir) == -1) { - reply_with_perror ("closedir: /sys/block"); + reply_with_perror ("closedir: " BUS_PATH); return NULL; } -- 2.19.1.3.g30247aa5d201