git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ruby: Use RSTRING_PTR, RSTRING_LEN for compat with Ruby 1.9 (RHBZ#760000).
[libguestfs.git]
/
fish
/
prep.c
diff --git
a/fish/prep.c
b/fish/prep.c
index
59fa8a7
..
9863bc9
100644
(file)
--- a/
fish/prep.c
+++ b/
fish/prep.c
@@
-13,7
+13,7
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139,
USA.
+ * Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
*/
#include <config.h>
*/
#include <config.h>
@@
-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);
@@
-116,7
+116,7
@@
Use 'guestfish -N help' 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);
+}