git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 1.10.10.
[libguestfs.git]
/
fish
/
prep.c
diff --git
a/fish/prep.c
b/fish/prep.c
index
369dd6d
..
8ac4b31
100644
(file)
--- a/
fish/prep.c
+++ b/
fish/prep.c
@@
-38,7
+38,7
@@
list_prepared_drives (void)
for (i = 0; i < NR_PREPS; ++i) {
printf (_("\
for (i = 0; i < NR_PREPS; ++i) {
printf (_("\
-guestfish -N %-
16s
%s\n\
+guestfish -N %-
8s -
%s\n\
\n\
%s\n"),
preps[i].name, preps[i].shortdesc, preps[i].longdesc);
\n\
%s\n"),
preps[i].name, preps[i].shortdesc, preps[i].longdesc);
@@
-95,7
+95,7
@@
parse_type_string (const char *type_string)
if (i == NR_PREPS) {
fprintf (stderr, _("\
guestfish: -N parameter '%s': no such prepared disk image known.\n\
if (i == NR_PREPS) {
fprintf (stderr, _("\
guestfish: -N parameter '%s': no such prepared disk image known.\n\
-Use 'guestfish -N
list
' to list possible values for the -N parameter.\n"),
+Use 'guestfish -N
help
' to list possible values for the -N parameter.\n"),
type_string);
exit (EXIT_FAILURE);
}
type_string);
exit (EXIT_FAILURE);
}
@@
-116,7
+116,7
@@
Use 'guestfish -N list' to list possible values for the -N parameter.\n"),
}
for (i = 0; i < data->prep->nr_params; ++i)
}
for (i = 0; i < data->prep->nr_params; ++i)
- data->params[i] =
data->prep->params[i].pdefault
;
+ data->params[i] =
bad_cast (data->prep->params[i].pdefault)
;
/* Parse the optional parameters. */
const char *p = type_string + len;
/* Parse the optional parameters. */
const char *p = type_string + len;
@@
-167,3
+167,16
@@
prep_error (prep_data *data, const char *filename, const char *fs, ...)
exit (EXIT_FAILURE);
}
exit (EXIT_FAILURE);
}
+
+void
+free_prep_data (void *vp)
+{
+ prep_data *data = vp;
+ size_t i;
+
+ for (i = 0; i < data->prep->nr_params; ++i)
+ if (data->params[i] != data->prep->params[i].pdefault)
+ free (data->params[i]);
+ free (data->params);
+ free (data);
+}