/* libguestfs - guestfish and guestmount shared option parsing
- * Copyright (C) 2010 Red Hat Inc.
+ * Copyright (C) 2010-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/* Provided by guestfish or guestmount. */
extern guestfs_h *g;
extern int read_only;
+extern int live;
extern int verbose;
extern int inspector;
extern int keys_from_stdin;
struct mp *next;
char *device;
char *mountpoint;
+ char *options;
};
+/* in config.c */
+extern void parse_config (void);
+
/* in inspect.c */
extern void inspect_mount (void);
extern void print_inspect_prompt (void);
perror ("malloc"); \
exit (EXIT_FAILURE); \
} \
+ mp->options = NULL; \
+ mp->mountpoint = bad_cast ("/"); \
p = strchr (optarg, ':'); \
if (p) { \
*p = '\0'; \
- mp->mountpoint = p+1; \
- } else \
- mp->mountpoint = bad_cast ("/"); \
+ p++; \
+ mp->mountpoint = p; \
+ p = strchr (p, ':'); \
+ if (p) { \
+ *p = '\0'; \
+ p++; \
+ mp->options = p; \
+ } \
+ } \
mp->device = optarg; \
mp->next = mps; \
mps = mp