Add worker for each disk image specified
Remove loading the drive, that is the job of the worker.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user