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) {
|
int main(int argc, char **argv) {
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
printf("Usage: %s <disk-path>\n", argv[0]);
|
printf("Usage: %s <disk-path> ...\n", argv[0]);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
guestfs_h *g = guestfs_create();
|
// One worker per disk image.
|
||||||
|
zactor_t *workers[argc-1];
|
||||||
for (int i = 1; i < argc; i++) {
|
|
||||||
printf("Loading drive %s...\n", argv[i]);
|
|
||||||
guestfs_add_drive(g, argv[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
guestfs_launch(g);
|
|
||||||
|
|
||||||
char **filesystems = guestfs_list_filesystems(g);
|
char **filesystems = guestfs_list_filesystems(g);
|
||||||
if (filesystems == NULL)
|
if (filesystems == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user