diff --git a/guestfs-inspectd.c b/guestfs-inspectd.c index a5444c3..3487000 100644 --- a/guestfs-inspectd.c +++ b/guestfs-inspectd.c @@ -145,13 +145,18 @@ int main(int argc, char **argv) { // Find the worker with the given name. zactor_t *worker = NULL; + struct guestfs_inpsect_command *cmd = (struct guestfs_inpsect_command *) zmsg_last(msg); for (int i = 0; i < worker_count; i++) { - + if (STREQ(cmd->name, worker_map[i].name)) { + worker = worker_map[i].name; + break; + } } if (worker) { zmsg_send(&msg, zactor_sock(worker)); } else { // The name specified does not exist. + printf("There is no drive with the name %s\n.", cmd->name); } } return EXIT_SUCCESS;