diff --git a/guestfs-inspectd.c b/guestfs-inspectd.c index 452b56f..e5f74fc 100644 --- a/guestfs-inspectd.c +++ b/guestfs-inspectd.c @@ -109,6 +109,7 @@ static void *worker_task(zsock_t *pipe, char *disk_path) { printf("Size: %zu\tContent size: %zu\n", zmsg_size(msg), zmsg_content_size(msg)); struct guestfs_inpsect_command *command = zmsg_to_command(msg); printf("Name: %s\n", command->name); + printf("path: %s\n", command->args.ls.paths[0]); free(command); diff --git a/libguestfs-inspect.h b/libguestfs-inspect.h index e156b18..00df786 100644 --- a/libguestfs-inspect.h +++ b/libguestfs-inspect.h @@ -33,15 +33,15 @@ static char *endpoint() { static zmsg_t *command_to_zmsg(struct guestfs_inpsect_command *command) { zmsg_t *res = zmsg_new(); - zmsg_pushstr(res, command->name); - zmsg_pushmem(res, &(command->command), sizeof(command->command)); + zmsg_addstr(res, command->name); + zmsg_addmem(res, &(command->command), sizeof(command->command)); switch (command->command) { case GUESTFS_COMMAND_LS: - zmsg_pushmem(res, &(command->args.ls.paths_length), sizeof(command->args.ls.paths_length)); + zmsg_addmem(res, &(command->args.ls.paths_length), sizeof(command->args.ls.paths_length)); for (size_t i = 0; i < (command->args.ls.paths_length); i++) { - zmsg_pushstr(res, command->args.ls.paths[i]); + zmsg_addstr(res, command->args.ls.paths[i]); } break; }