Add worker for each disk image specified

Remove loading the drive, that is the job of the worker.
This commit is contained in:
2024-03-02 21:34:16 -05:00
parent 06c9f25f77
commit c17ae09fb6

View File

@@ -5,18 +5,12 @@
int main(int argc, char **argv) {
if (argc < 2) {
printf("Usage: %s <disk-path>\n", argv[0]);
printf("Usage: %s <disk-path> ...\n", argv[0]);
return EXIT_FAILURE;
}
guestfs_h *g = guestfs_create();
for (int i = 1; i < argc; i++) {
printf("Loading drive %s...\n", argv[i]);
guestfs_add_drive(g, argv[i]);
}
guestfs_launch(g);
// One worker per disk image.
zactor_t *workers[argc-1];
char **filesystems = guestfs_list_filesystems(g);
if (filesystems == NULL)