Initialize the path and name from the arguments.
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <czmq.h>
|
#include <czmq.h>
|
||||||
|
#include <zactor.h>
|
||||||
#include <guestfs.h>
|
#include <guestfs.h>
|
||||||
|
|
||||||
|
void *worker_task;
|
||||||
|
|
||||||
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]);
|
||||||
@@ -15,6 +18,8 @@ int main(int argc, char **argv) {
|
|||||||
zactor_t *workers[worker_count];
|
zactor_t *workers[worker_count];
|
||||||
|
|
||||||
for (int i = 0; i < worker_count; i++) {
|
for (int i = 0; i < worker_count; i++) {
|
||||||
|
char *path = strtok(argv[i+1], ":");
|
||||||
|
char *name = strtok(NULL, ":");
|
||||||
workers[i] = zactor_new(worker_task, NULL);
|
workers[i] = zactor_new(worker_task, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user