1 /* libguestfs generated file
2 * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
3 * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
5 * Copyright (C) 2009 Red Hat Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
36 get_handle (PyObject *obj)
39 assert (obj != Py_None);
40 return ((Pyguestfs_Object *) obj)->g;
44 put_handle (guestfs_h *g)
48 PyCObject_FromVoidPtrAndDesc ((void *) g, (char *) "guestfs_h", NULL);
51 /* This list should be freed (but not the strings) after use. */
53 get_string_list (PyObject *obj)
60 if (!PyList_Check (obj)) {
61 PyErr_SetString (PyExc_RuntimeError, "expecting a list parameter");
65 len = PyList_Size (obj);
66 r = malloc (sizeof (char *) * (len+1));
68 PyErr_SetString (PyExc_RuntimeError, "get_string_list: out of memory");
72 for (i = 0; i < len; ++i)
73 r[i] = PyString_AsString (PyList_GetItem (obj, i));
80 put_string_list (char * const * const argv)
85 for (argc = 0; argv[argc] != NULL; ++argc)
88 list = PyList_New (argc);
89 for (i = 0; i < argc; ++i)
90 PyList_SetItem (list, i, PyString_FromString (argv[i]));
96 put_table (char * const * const argv)
98 PyObject *list, *item;
101 for (argc = 0; argv[argc] != NULL; ++argc)
104 list = PyList_New (argc >> 1);
105 for (i = 0; i < argc; i += 2) {
106 item = PyTuple_New (2);
107 PyTuple_SetItem (item, 0, PyString_FromString (argv[i]));
108 PyTuple_SetItem (item, 1, PyString_FromString (argv[i+1]));
109 PyList_SetItem (list, i >> 1, item);
116 free_strings (char **argv)
120 for (argc = 0; argv[argc] != NULL; ++argc)
126 py_guestfs_create (PyObject *self, PyObject *args)
130 g = guestfs_create ();
132 PyErr_SetString (PyExc_RuntimeError,
133 "guestfs.create: failed to allocate handle");
136 guestfs_set_error_handler (g, NULL, NULL);
137 return put_handle (g);
141 py_guestfs_close (PyObject *self, PyObject *args)
146 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_close", &py_g))
148 g = get_handle (py_g);
157 put_lvm_pv (struct guestfs_lvm_pv *pv)
161 dict = PyDict_New ();
162 PyDict_SetItemString (dict, "pv_name",
163 PyString_FromString (pv->pv_name));
164 PyDict_SetItemString (dict, "pv_uuid",
165 PyString_FromStringAndSize (pv->pv_uuid, 32));
166 PyDict_SetItemString (dict, "pv_fmt",
167 PyString_FromString (pv->pv_fmt));
168 PyDict_SetItemString (dict, "pv_size",
169 PyLong_FromUnsignedLongLong (pv->pv_size));
170 PyDict_SetItemString (dict, "dev_size",
171 PyLong_FromUnsignedLongLong (pv->dev_size));
172 PyDict_SetItemString (dict, "pv_free",
173 PyLong_FromUnsignedLongLong (pv->pv_free));
174 PyDict_SetItemString (dict, "pv_used",
175 PyLong_FromUnsignedLongLong (pv->pv_used));
176 PyDict_SetItemString (dict, "pv_attr",
177 PyString_FromString (pv->pv_attr));
178 PyDict_SetItemString (dict, "pv_pe_count",
179 PyLong_FromLongLong (pv->pv_pe_count));
180 PyDict_SetItemString (dict, "pv_pe_alloc_count",
181 PyLong_FromLongLong (pv->pv_pe_alloc_count));
182 PyDict_SetItemString (dict, "pv_tags",
183 PyString_FromString (pv->pv_tags));
184 PyDict_SetItemString (dict, "pe_start",
185 PyLong_FromUnsignedLongLong (pv->pe_start));
186 PyDict_SetItemString (dict, "pv_mda_count",
187 PyLong_FromLongLong (pv->pv_mda_count));
188 PyDict_SetItemString (dict, "pv_mda_free",
189 PyLong_FromUnsignedLongLong (pv->pv_mda_free));
194 put_lvm_pv_list (struct guestfs_lvm_pv_list *pvs)
199 list = PyList_New (pvs->len);
200 for (i = 0; i < pvs->len; ++i)
201 PyList_SetItem (list, i, put_lvm_pv (&pvs->val[i]));
206 put_lvm_vg (struct guestfs_lvm_vg *vg)
210 dict = PyDict_New ();
211 PyDict_SetItemString (dict, "vg_name",
212 PyString_FromString (vg->vg_name));
213 PyDict_SetItemString (dict, "vg_uuid",
214 PyString_FromStringAndSize (vg->vg_uuid, 32));
215 PyDict_SetItemString (dict, "vg_fmt",
216 PyString_FromString (vg->vg_fmt));
217 PyDict_SetItemString (dict, "vg_attr",
218 PyString_FromString (vg->vg_attr));
219 PyDict_SetItemString (dict, "vg_size",
220 PyLong_FromUnsignedLongLong (vg->vg_size));
221 PyDict_SetItemString (dict, "vg_free",
222 PyLong_FromUnsignedLongLong (vg->vg_free));
223 PyDict_SetItemString (dict, "vg_sysid",
224 PyString_FromString (vg->vg_sysid));
225 PyDict_SetItemString (dict, "vg_extent_size",
226 PyLong_FromUnsignedLongLong (vg->vg_extent_size));
227 PyDict_SetItemString (dict, "vg_extent_count",
228 PyLong_FromLongLong (vg->vg_extent_count));
229 PyDict_SetItemString (dict, "vg_free_count",
230 PyLong_FromLongLong (vg->vg_free_count));
231 PyDict_SetItemString (dict, "max_lv",
232 PyLong_FromLongLong (vg->max_lv));
233 PyDict_SetItemString (dict, "max_pv",
234 PyLong_FromLongLong (vg->max_pv));
235 PyDict_SetItemString (dict, "pv_count",
236 PyLong_FromLongLong (vg->pv_count));
237 PyDict_SetItemString (dict, "lv_count",
238 PyLong_FromLongLong (vg->lv_count));
239 PyDict_SetItemString (dict, "snap_count",
240 PyLong_FromLongLong (vg->snap_count));
241 PyDict_SetItemString (dict, "vg_seqno",
242 PyLong_FromLongLong (vg->vg_seqno));
243 PyDict_SetItemString (dict, "vg_tags",
244 PyString_FromString (vg->vg_tags));
245 PyDict_SetItemString (dict, "vg_mda_count",
246 PyLong_FromLongLong (vg->vg_mda_count));
247 PyDict_SetItemString (dict, "vg_mda_free",
248 PyLong_FromUnsignedLongLong (vg->vg_mda_free));
253 put_lvm_vg_list (struct guestfs_lvm_vg_list *vgs)
258 list = PyList_New (vgs->len);
259 for (i = 0; i < vgs->len; ++i)
260 PyList_SetItem (list, i, put_lvm_vg (&vgs->val[i]));
265 put_lvm_lv (struct guestfs_lvm_lv *lv)
269 dict = PyDict_New ();
270 PyDict_SetItemString (dict, "lv_name",
271 PyString_FromString (lv->lv_name));
272 PyDict_SetItemString (dict, "lv_uuid",
273 PyString_FromStringAndSize (lv->lv_uuid, 32));
274 PyDict_SetItemString (dict, "lv_attr",
275 PyString_FromString (lv->lv_attr));
276 PyDict_SetItemString (dict, "lv_major",
277 PyLong_FromLongLong (lv->lv_major));
278 PyDict_SetItemString (dict, "lv_minor",
279 PyLong_FromLongLong (lv->lv_minor));
280 PyDict_SetItemString (dict, "lv_kernel_major",
281 PyLong_FromLongLong (lv->lv_kernel_major));
282 PyDict_SetItemString (dict, "lv_kernel_minor",
283 PyLong_FromLongLong (lv->lv_kernel_minor));
284 PyDict_SetItemString (dict, "lv_size",
285 PyLong_FromUnsignedLongLong (lv->lv_size));
286 PyDict_SetItemString (dict, "seg_count",
287 PyLong_FromLongLong (lv->seg_count));
288 PyDict_SetItemString (dict, "origin",
289 PyString_FromString (lv->origin));
290 if (lv->snap_percent >= 0)
291 PyDict_SetItemString (dict, "snap_percent",
292 PyFloat_FromDouble ((double) lv->snap_percent));
295 PyDict_SetItemString (dict, "snap_percent", Py_None); }
296 if (lv->copy_percent >= 0)
297 PyDict_SetItemString (dict, "copy_percent",
298 PyFloat_FromDouble ((double) lv->copy_percent));
301 PyDict_SetItemString (dict, "copy_percent", Py_None); }
302 PyDict_SetItemString (dict, "move_pv",
303 PyString_FromString (lv->move_pv));
304 PyDict_SetItemString (dict, "lv_tags",
305 PyString_FromString (lv->lv_tags));
306 PyDict_SetItemString (dict, "mirror_log",
307 PyString_FromString (lv->mirror_log));
308 PyDict_SetItemString (dict, "modules",
309 PyString_FromString (lv->modules));
314 put_lvm_lv_list (struct guestfs_lvm_lv_list *lvs)
319 list = PyList_New (lvs->len);
320 for (i = 0; i < lvs->len; ++i)
321 PyList_SetItem (list, i, put_lvm_lv (&lvs->val[i]));
326 put_stat (struct guestfs_stat *stat)
330 dict = PyDict_New ();
331 PyDict_SetItemString (dict, "dev",
332 PyLong_FromLongLong (stat->dev));
333 PyDict_SetItemString (dict, "ino",
334 PyLong_FromLongLong (stat->ino));
335 PyDict_SetItemString (dict, "mode",
336 PyLong_FromLongLong (stat->mode));
337 PyDict_SetItemString (dict, "nlink",
338 PyLong_FromLongLong (stat->nlink));
339 PyDict_SetItemString (dict, "uid",
340 PyLong_FromLongLong (stat->uid));
341 PyDict_SetItemString (dict, "gid",
342 PyLong_FromLongLong (stat->gid));
343 PyDict_SetItemString (dict, "rdev",
344 PyLong_FromLongLong (stat->rdev));
345 PyDict_SetItemString (dict, "size",
346 PyLong_FromLongLong (stat->size));
347 PyDict_SetItemString (dict, "blksize",
348 PyLong_FromLongLong (stat->blksize));
349 PyDict_SetItemString (dict, "blocks",
350 PyLong_FromLongLong (stat->blocks));
351 PyDict_SetItemString (dict, "atime",
352 PyLong_FromLongLong (stat->atime));
353 PyDict_SetItemString (dict, "mtime",
354 PyLong_FromLongLong (stat->mtime));
355 PyDict_SetItemString (dict, "ctime",
356 PyLong_FromLongLong (stat->ctime));
361 put_statvfs (struct guestfs_statvfs *statvfs)
365 dict = PyDict_New ();
366 PyDict_SetItemString (dict, "bsize",
367 PyLong_FromLongLong (statvfs->bsize));
368 PyDict_SetItemString (dict, "frsize",
369 PyLong_FromLongLong (statvfs->frsize));
370 PyDict_SetItemString (dict, "blocks",
371 PyLong_FromLongLong (statvfs->blocks));
372 PyDict_SetItemString (dict, "bfree",
373 PyLong_FromLongLong (statvfs->bfree));
374 PyDict_SetItemString (dict, "bavail",
375 PyLong_FromLongLong (statvfs->bavail));
376 PyDict_SetItemString (dict, "files",
377 PyLong_FromLongLong (statvfs->files));
378 PyDict_SetItemString (dict, "ffree",
379 PyLong_FromLongLong (statvfs->ffree));
380 PyDict_SetItemString (dict, "favail",
381 PyLong_FromLongLong (statvfs->favail));
382 PyDict_SetItemString (dict, "fsid",
383 PyLong_FromLongLong (statvfs->fsid));
384 PyDict_SetItemString (dict, "flag",
385 PyLong_FromLongLong (statvfs->flag));
386 PyDict_SetItemString (dict, "namemax",
387 PyLong_FromLongLong (statvfs->namemax));
392 py_guestfs_test0 (PyObject *self, PyObject *args)
400 PyObject *py_strlist;
401 const char **strlist;
407 if (!PyArg_ParseTuple (args, (char *) "OszOiiss:guestfs_test0",
408 &py_g, &str, &optstr, &py_strlist, &b, &integer, &filein, &fileout))
410 g = get_handle (py_g);
411 strlist = get_string_list (py_strlist);
412 if (!strlist) return NULL;
414 r = guestfs_test0 (g, str, optstr, strlist, b, integer, filein, fileout);
417 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
427 py_guestfs_test0rint (PyObject *self, PyObject *args)
435 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rint",
438 g = get_handle (py_g);
440 r = guestfs_test0rint (g, val);
442 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
446 py_r = PyInt_FromLong ((long) r);
451 py_guestfs_test0rinterr (PyObject *self, PyObject *args)
458 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rinterr",
461 g = get_handle (py_g);
463 r = guestfs_test0rinterr (g);
465 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
469 py_r = PyInt_FromLong ((long) r);
474 py_guestfs_test0rint64 (PyObject *self, PyObject *args)
482 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rint64",
485 g = get_handle (py_g);
487 r = guestfs_test0rint64 (g, val);
489 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
493 py_r = PyLong_FromLongLong (r);
498 py_guestfs_test0rint64err (PyObject *self, PyObject *args)
505 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rint64err",
508 g = get_handle (py_g);
510 r = guestfs_test0rint64err (g);
512 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
516 py_r = PyLong_FromLongLong (r);
521 py_guestfs_test0rbool (PyObject *self, PyObject *args)
529 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rbool",
532 g = get_handle (py_g);
534 r = guestfs_test0rbool (g, val);
536 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
540 py_r = PyInt_FromLong ((long) r);
545 py_guestfs_test0rboolerr (PyObject *self, PyObject *args)
552 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rboolerr",
555 g = get_handle (py_g);
557 r = guestfs_test0rboolerr (g);
559 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
563 py_r = PyInt_FromLong ((long) r);
568 py_guestfs_test0rconststring (PyObject *self, PyObject *args)
576 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rconststring",
579 g = get_handle (py_g);
581 r = guestfs_test0rconststring (g, val);
583 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
587 py_r = PyString_FromString (r);
592 py_guestfs_test0rconststringerr (PyObject *self, PyObject *args)
599 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rconststringerr",
602 g = get_handle (py_g);
604 r = guestfs_test0rconststringerr (g);
606 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
610 py_r = PyString_FromString (r);
615 py_guestfs_test0rstring (PyObject *self, PyObject *args)
623 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rstring",
626 g = get_handle (py_g);
628 r = guestfs_test0rstring (g, val);
630 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
634 py_r = PyString_FromString (r);
640 py_guestfs_test0rstringerr (PyObject *self, PyObject *args)
647 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rstringerr",
650 g = get_handle (py_g);
652 r = guestfs_test0rstringerr (g);
654 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
658 py_r = PyString_FromString (r);
664 py_guestfs_test0rstringlist (PyObject *self, PyObject *args)
672 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rstringlist",
675 g = get_handle (py_g);
677 r = guestfs_test0rstringlist (g, val);
679 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
683 py_r = put_string_list (r);
689 py_guestfs_test0rstringlisterr (PyObject *self, PyObject *args)
696 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rstringlisterr",
699 g = get_handle (py_g);
701 r = guestfs_test0rstringlisterr (g);
703 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
707 py_r = put_string_list (r);
713 py_guestfs_test0rintbool (PyObject *self, PyObject *args)
718 struct guestfs_int_bool *r;
721 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rintbool",
724 g = get_handle (py_g);
726 r = guestfs_test0rintbool (g, val);
728 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
732 py_r = PyTuple_New (2);
733 PyTuple_SetItem (py_r, 0, PyInt_FromLong ((long) r->i));
734 PyTuple_SetItem (py_r, 1, PyInt_FromLong ((long) r->b));
735 guestfs_free_int_bool (r);
740 py_guestfs_test0rintboolerr (PyObject *self, PyObject *args)
745 struct guestfs_int_bool *r;
747 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rintboolerr",
750 g = get_handle (py_g);
752 r = guestfs_test0rintboolerr (g);
754 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
758 py_r = PyTuple_New (2);
759 PyTuple_SetItem (py_r, 0, PyInt_FromLong ((long) r->i));
760 PyTuple_SetItem (py_r, 1, PyInt_FromLong ((long) r->b));
761 guestfs_free_int_bool (r);
766 py_guestfs_test0rpvlist (PyObject *self, PyObject *args)
771 struct guestfs_lvm_pv_list *r;
774 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rpvlist",
777 g = get_handle (py_g);
779 r = guestfs_test0rpvlist (g, val);
781 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
785 py_r = put_lvm_pv_list (r);
786 guestfs_free_lvm_pv_list (r);
791 py_guestfs_test0rpvlisterr (PyObject *self, PyObject *args)
796 struct guestfs_lvm_pv_list *r;
798 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rpvlisterr",
801 g = get_handle (py_g);
803 r = guestfs_test0rpvlisterr (g);
805 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
809 py_r = put_lvm_pv_list (r);
810 guestfs_free_lvm_pv_list (r);
815 py_guestfs_test0rvglist (PyObject *self, PyObject *args)
820 struct guestfs_lvm_vg_list *r;
823 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rvglist",
826 g = get_handle (py_g);
828 r = guestfs_test0rvglist (g, val);
830 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
834 py_r = put_lvm_vg_list (r);
835 guestfs_free_lvm_vg_list (r);
840 py_guestfs_test0rvglisterr (PyObject *self, PyObject *args)
845 struct guestfs_lvm_vg_list *r;
847 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rvglisterr",
850 g = get_handle (py_g);
852 r = guestfs_test0rvglisterr (g);
854 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
858 py_r = put_lvm_vg_list (r);
859 guestfs_free_lvm_vg_list (r);
864 py_guestfs_test0rlvlist (PyObject *self, PyObject *args)
869 struct guestfs_lvm_lv_list *r;
872 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rlvlist",
875 g = get_handle (py_g);
877 r = guestfs_test0rlvlist (g, val);
879 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
883 py_r = put_lvm_lv_list (r);
884 guestfs_free_lvm_lv_list (r);
889 py_guestfs_test0rlvlisterr (PyObject *self, PyObject *args)
894 struct guestfs_lvm_lv_list *r;
896 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rlvlisterr",
899 g = get_handle (py_g);
901 r = guestfs_test0rlvlisterr (g);
903 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
907 py_r = put_lvm_lv_list (r);
908 guestfs_free_lvm_lv_list (r);
913 py_guestfs_test0rstat (PyObject *self, PyObject *args)
918 struct guestfs_stat *r;
921 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rstat",
924 g = get_handle (py_g);
926 r = guestfs_test0rstat (g, val);
928 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
938 py_guestfs_test0rstaterr (PyObject *self, PyObject *args)
943 struct guestfs_stat *r;
945 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rstaterr",
948 g = get_handle (py_g);
950 r = guestfs_test0rstaterr (g);
952 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
962 py_guestfs_test0rstatvfs (PyObject *self, PyObject *args)
967 struct guestfs_statvfs *r;
970 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rstatvfs",
973 g = get_handle (py_g);
975 r = guestfs_test0rstatvfs (g, val);
977 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
981 py_r = put_statvfs (r);
987 py_guestfs_test0rstatvfserr (PyObject *self, PyObject *args)
992 struct guestfs_statvfs *r;
994 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rstatvfserr",
997 g = get_handle (py_g);
999 r = guestfs_test0rstatvfserr (g);
1001 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1005 py_r = put_statvfs (r);
1011 py_guestfs_test0rhashtable (PyObject *self, PyObject *args)
1019 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_test0rhashtable",
1022 g = get_handle (py_g);
1024 r = guestfs_test0rhashtable (g, val);
1026 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1030 py_r = put_table (r);
1036 py_guestfs_test0rhashtableerr (PyObject *self, PyObject *args)
1043 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_test0rhashtableerr",
1046 g = get_handle (py_g);
1048 r = guestfs_test0rhashtableerr (g);
1050 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1054 py_r = put_table (r);
1060 py_guestfs_launch (PyObject *self, PyObject *args)
1067 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_launch",
1070 g = get_handle (py_g);
1072 r = guestfs_launch (g);
1074 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1078 Py_INCREF (Py_None);
1084 py_guestfs_wait_ready (PyObject *self, PyObject *args)
1091 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_wait_ready",
1094 g = get_handle (py_g);
1096 r = guestfs_wait_ready (g);
1098 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1102 Py_INCREF (Py_None);
1108 py_guestfs_kill_subprocess (PyObject *self, PyObject *args)
1115 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_kill_subprocess",
1118 g = get_handle (py_g);
1120 r = guestfs_kill_subprocess (g);
1122 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1126 Py_INCREF (Py_None);
1132 py_guestfs_add_drive (PyObject *self, PyObject *args)
1138 const char *filename;
1140 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_add_drive",
1143 g = get_handle (py_g);
1145 r = guestfs_add_drive (g, filename);
1147 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1151 Py_INCREF (Py_None);
1157 py_guestfs_add_cdrom (PyObject *self, PyObject *args)
1163 const char *filename;
1165 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_add_cdrom",
1168 g = get_handle (py_g);
1170 r = guestfs_add_cdrom (g, filename);
1172 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1176 Py_INCREF (Py_None);
1182 py_guestfs_add_drive_ro (PyObject *self, PyObject *args)
1188 const char *filename;
1190 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_add_drive_ro",
1193 g = get_handle (py_g);
1195 r = guestfs_add_drive_ro (g, filename);
1197 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1201 Py_INCREF (Py_None);
1207 py_guestfs_config (PyObject *self, PyObject *args)
1213 const char *qemuparam;
1214 const char *qemuvalue;
1216 if (!PyArg_ParseTuple (args, (char *) "Osz:guestfs_config",
1217 &py_g, &qemuparam, &qemuvalue))
1219 g = get_handle (py_g);
1221 r = guestfs_config (g, qemuparam, qemuvalue);
1223 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1227 Py_INCREF (Py_None);
1233 py_guestfs_set_qemu (PyObject *self, PyObject *args)
1241 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_set_qemu",
1244 g = get_handle (py_g);
1246 r = guestfs_set_qemu (g, qemu);
1248 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1252 Py_INCREF (Py_None);
1258 py_guestfs_get_qemu (PyObject *self, PyObject *args)
1265 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_get_qemu",
1268 g = get_handle (py_g);
1270 r = guestfs_get_qemu (g);
1272 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1276 py_r = PyString_FromString (r);
1281 py_guestfs_set_path (PyObject *self, PyObject *args)
1289 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_set_path",
1292 g = get_handle (py_g);
1294 r = guestfs_set_path (g, path);
1296 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1300 Py_INCREF (Py_None);
1306 py_guestfs_get_path (PyObject *self, PyObject *args)
1313 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_get_path",
1316 g = get_handle (py_g);
1318 r = guestfs_get_path (g);
1320 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1324 py_r = PyString_FromString (r);
1329 py_guestfs_set_append (PyObject *self, PyObject *args)
1337 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_set_append",
1340 g = get_handle (py_g);
1342 r = guestfs_set_append (g, append);
1344 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1348 Py_INCREF (Py_None);
1354 py_guestfs_get_append (PyObject *self, PyObject *args)
1361 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_get_append",
1364 g = get_handle (py_g);
1366 r = guestfs_get_append (g);
1368 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1372 py_r = PyString_FromString (r);
1377 py_guestfs_set_autosync (PyObject *self, PyObject *args)
1385 if (!PyArg_ParseTuple (args, (char *) "Oi:guestfs_set_autosync",
1388 g = get_handle (py_g);
1390 r = guestfs_set_autosync (g, autosync);
1392 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1396 Py_INCREF (Py_None);
1402 py_guestfs_get_autosync (PyObject *self, PyObject *args)
1409 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_get_autosync",
1412 g = get_handle (py_g);
1414 r = guestfs_get_autosync (g);
1416 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1420 py_r = PyInt_FromLong ((long) r);
1425 py_guestfs_set_verbose (PyObject *self, PyObject *args)
1433 if (!PyArg_ParseTuple (args, (char *) "Oi:guestfs_set_verbose",
1436 g = get_handle (py_g);
1438 r = guestfs_set_verbose (g, verbose);
1440 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1444 Py_INCREF (Py_None);
1450 py_guestfs_get_verbose (PyObject *self, PyObject *args)
1457 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_get_verbose",
1460 g = get_handle (py_g);
1462 r = guestfs_get_verbose (g);
1464 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1468 py_r = PyInt_FromLong ((long) r);
1473 py_guestfs_is_ready (PyObject *self, PyObject *args)
1480 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_is_ready",
1483 g = get_handle (py_g);
1485 r = guestfs_is_ready (g);
1487 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1491 py_r = PyInt_FromLong ((long) r);
1496 py_guestfs_is_config (PyObject *self, PyObject *args)
1503 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_is_config",
1506 g = get_handle (py_g);
1508 r = guestfs_is_config (g);
1510 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1514 py_r = PyInt_FromLong ((long) r);
1519 py_guestfs_is_launching (PyObject *self, PyObject *args)
1526 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_is_launching",
1529 g = get_handle (py_g);
1531 r = guestfs_is_launching (g);
1533 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1537 py_r = PyInt_FromLong ((long) r);
1542 py_guestfs_is_busy (PyObject *self, PyObject *args)
1549 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_is_busy",
1552 g = get_handle (py_g);
1554 r = guestfs_is_busy (g);
1556 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1560 py_r = PyInt_FromLong ((long) r);
1565 py_guestfs_get_state (PyObject *self, PyObject *args)
1572 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_get_state",
1575 g = get_handle (py_g);
1577 r = guestfs_get_state (g);
1579 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1583 py_r = PyInt_FromLong ((long) r);
1588 py_guestfs_set_busy (PyObject *self, PyObject *args)
1595 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_set_busy",
1598 g = get_handle (py_g);
1600 r = guestfs_set_busy (g);
1602 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1606 Py_INCREF (Py_None);
1612 py_guestfs_set_ready (PyObject *self, PyObject *args)
1619 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_set_ready",
1622 g = get_handle (py_g);
1624 r = guestfs_set_ready (g);
1626 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1630 Py_INCREF (Py_None);
1636 py_guestfs_end_busy (PyObject *self, PyObject *args)
1643 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_end_busy",
1646 g = get_handle (py_g);
1648 r = guestfs_end_busy (g);
1650 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1654 Py_INCREF (Py_None);
1660 py_guestfs_mount (PyObject *self, PyObject *args)
1667 const char *mountpoint;
1669 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_mount",
1670 &py_g, &device, &mountpoint))
1672 g = get_handle (py_g);
1674 r = guestfs_mount (g, device, mountpoint);
1676 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1680 Py_INCREF (Py_None);
1686 py_guestfs_sync (PyObject *self, PyObject *args)
1693 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_sync",
1696 g = get_handle (py_g);
1698 r = guestfs_sync (g);
1700 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1704 Py_INCREF (Py_None);
1710 py_guestfs_touch (PyObject *self, PyObject *args)
1718 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_touch",
1721 g = get_handle (py_g);
1723 r = guestfs_touch (g, path);
1725 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1729 Py_INCREF (Py_None);
1735 py_guestfs_cat (PyObject *self, PyObject *args)
1743 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_cat",
1746 g = get_handle (py_g);
1748 r = guestfs_cat (g, path);
1750 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1754 py_r = PyString_FromString (r);
1760 py_guestfs_ll (PyObject *self, PyObject *args)
1766 const char *directory;
1768 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_ll",
1771 g = get_handle (py_g);
1773 r = guestfs_ll (g, directory);
1775 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1779 py_r = PyString_FromString (r);
1785 py_guestfs_ls (PyObject *self, PyObject *args)
1791 const char *directory;
1793 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_ls",
1796 g = get_handle (py_g);
1798 r = guestfs_ls (g, directory);
1800 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1804 py_r = put_string_list (r);
1810 py_guestfs_list_devices (PyObject *self, PyObject *args)
1817 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_list_devices",
1820 g = get_handle (py_g);
1822 r = guestfs_list_devices (g);
1824 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1828 py_r = put_string_list (r);
1834 py_guestfs_list_partitions (PyObject *self, PyObject *args)
1841 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_list_partitions",
1844 g = get_handle (py_g);
1846 r = guestfs_list_partitions (g);
1848 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1852 py_r = put_string_list (r);
1858 py_guestfs_pvs (PyObject *self, PyObject *args)
1865 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_pvs",
1868 g = get_handle (py_g);
1870 r = guestfs_pvs (g);
1872 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1876 py_r = put_string_list (r);
1882 py_guestfs_vgs (PyObject *self, PyObject *args)
1889 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_vgs",
1892 g = get_handle (py_g);
1894 r = guestfs_vgs (g);
1896 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1900 py_r = put_string_list (r);
1906 py_guestfs_lvs (PyObject *self, PyObject *args)
1913 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_lvs",
1916 g = get_handle (py_g);
1918 r = guestfs_lvs (g);
1920 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1924 py_r = put_string_list (r);
1930 py_guestfs_pvs_full (PyObject *self, PyObject *args)
1935 struct guestfs_lvm_pv_list *r;
1937 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_pvs_full",
1940 g = get_handle (py_g);
1942 r = guestfs_pvs_full (g);
1944 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1948 py_r = put_lvm_pv_list (r);
1949 guestfs_free_lvm_pv_list (r);
1954 py_guestfs_vgs_full (PyObject *self, PyObject *args)
1959 struct guestfs_lvm_vg_list *r;
1961 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_vgs_full",
1964 g = get_handle (py_g);
1966 r = guestfs_vgs_full (g);
1968 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1972 py_r = put_lvm_vg_list (r);
1973 guestfs_free_lvm_vg_list (r);
1978 py_guestfs_lvs_full (PyObject *self, PyObject *args)
1983 struct guestfs_lvm_lv_list *r;
1985 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_lvs_full",
1988 g = get_handle (py_g);
1990 r = guestfs_lvs_full (g);
1992 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
1996 py_r = put_lvm_lv_list (r);
1997 guestfs_free_lvm_lv_list (r);
2002 py_guestfs_read_lines (PyObject *self, PyObject *args)
2010 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_read_lines",
2013 g = get_handle (py_g);
2015 r = guestfs_read_lines (g, path);
2017 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2021 py_r = put_string_list (r);
2027 py_guestfs_aug_init (PyObject *self, PyObject *args)
2036 if (!PyArg_ParseTuple (args, (char *) "Osi:guestfs_aug_init",
2037 &py_g, &root, &flags))
2039 g = get_handle (py_g);
2041 r = guestfs_aug_init (g, root, flags);
2043 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2047 Py_INCREF (Py_None);
2053 py_guestfs_aug_close (PyObject *self, PyObject *args)
2060 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_aug_close",
2063 g = get_handle (py_g);
2065 r = guestfs_aug_close (g);
2067 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2071 Py_INCREF (Py_None);
2077 py_guestfs_aug_defvar (PyObject *self, PyObject *args)
2086 if (!PyArg_ParseTuple (args, (char *) "Osz:guestfs_aug_defvar",
2087 &py_g, &name, &expr))
2089 g = get_handle (py_g);
2091 r = guestfs_aug_defvar (g, name, expr);
2093 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2097 py_r = PyInt_FromLong ((long) r);
2102 py_guestfs_aug_defnode (PyObject *self, PyObject *args)
2107 struct guestfs_int_bool *r;
2112 if (!PyArg_ParseTuple (args, (char *) "Osss:guestfs_aug_defnode",
2113 &py_g, &name, &expr, &val))
2115 g = get_handle (py_g);
2117 r = guestfs_aug_defnode (g, name, expr, val);
2119 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2123 py_r = PyTuple_New (2);
2124 PyTuple_SetItem (py_r, 0, PyInt_FromLong ((long) r->i));
2125 PyTuple_SetItem (py_r, 1, PyInt_FromLong ((long) r->b));
2126 guestfs_free_int_bool (r);
2131 py_guestfs_aug_get (PyObject *self, PyObject *args)
2139 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_aug_get",
2142 g = get_handle (py_g);
2144 r = guestfs_aug_get (g, path);
2146 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2150 py_r = PyString_FromString (r);
2156 py_guestfs_aug_set (PyObject *self, PyObject *args)
2165 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_aug_set",
2166 &py_g, &path, &val))
2168 g = get_handle (py_g);
2170 r = guestfs_aug_set (g, path, val);
2172 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2176 Py_INCREF (Py_None);
2182 py_guestfs_aug_insert (PyObject *self, PyObject *args)
2192 if (!PyArg_ParseTuple (args, (char *) "Ossi:guestfs_aug_insert",
2193 &py_g, &path, &label, &before))
2195 g = get_handle (py_g);
2197 r = guestfs_aug_insert (g, path, label, before);
2199 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2203 Py_INCREF (Py_None);
2209 py_guestfs_aug_rm (PyObject *self, PyObject *args)
2217 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_aug_rm",
2220 g = get_handle (py_g);
2222 r = guestfs_aug_rm (g, path);
2224 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2228 py_r = PyInt_FromLong ((long) r);
2233 py_guestfs_aug_mv (PyObject *self, PyObject *args)
2242 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_aug_mv",
2243 &py_g, &src, &dest))
2245 g = get_handle (py_g);
2247 r = guestfs_aug_mv (g, src, dest);
2249 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2253 Py_INCREF (Py_None);
2259 py_guestfs_aug_match (PyObject *self, PyObject *args)
2267 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_aug_match",
2270 g = get_handle (py_g);
2272 r = guestfs_aug_match (g, path);
2274 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2278 py_r = put_string_list (r);
2284 py_guestfs_aug_save (PyObject *self, PyObject *args)
2291 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_aug_save",
2294 g = get_handle (py_g);
2296 r = guestfs_aug_save (g);
2298 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2302 Py_INCREF (Py_None);
2308 py_guestfs_aug_load (PyObject *self, PyObject *args)
2315 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_aug_load",
2318 g = get_handle (py_g);
2320 r = guestfs_aug_load (g);
2322 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2326 Py_INCREF (Py_None);
2332 py_guestfs_aug_ls (PyObject *self, PyObject *args)
2340 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_aug_ls",
2343 g = get_handle (py_g);
2345 r = guestfs_aug_ls (g, path);
2347 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2351 py_r = put_string_list (r);
2357 py_guestfs_rm (PyObject *self, PyObject *args)
2365 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_rm",
2368 g = get_handle (py_g);
2370 r = guestfs_rm (g, path);
2372 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2376 Py_INCREF (Py_None);
2382 py_guestfs_rmdir (PyObject *self, PyObject *args)
2390 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_rmdir",
2393 g = get_handle (py_g);
2395 r = guestfs_rmdir (g, path);
2397 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2401 Py_INCREF (Py_None);
2407 py_guestfs_rm_rf (PyObject *self, PyObject *args)
2415 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_rm_rf",
2418 g = get_handle (py_g);
2420 r = guestfs_rm_rf (g, path);
2422 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2426 Py_INCREF (Py_None);
2432 py_guestfs_mkdir (PyObject *self, PyObject *args)
2440 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_mkdir",
2443 g = get_handle (py_g);
2445 r = guestfs_mkdir (g, path);
2447 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2451 Py_INCREF (Py_None);
2457 py_guestfs_mkdir_p (PyObject *self, PyObject *args)
2465 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_mkdir_p",
2468 g = get_handle (py_g);
2470 r = guestfs_mkdir_p (g, path);
2472 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2476 Py_INCREF (Py_None);
2482 py_guestfs_chmod (PyObject *self, PyObject *args)
2491 if (!PyArg_ParseTuple (args, (char *) "Ois:guestfs_chmod",
2492 &py_g, &mode, &path))
2494 g = get_handle (py_g);
2496 r = guestfs_chmod (g, mode, path);
2498 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2502 Py_INCREF (Py_None);
2508 py_guestfs_chown (PyObject *self, PyObject *args)
2518 if (!PyArg_ParseTuple (args, (char *) "Oiis:guestfs_chown",
2519 &py_g, &owner, &group, &path))
2521 g = get_handle (py_g);
2523 r = guestfs_chown (g, owner, group, path);
2525 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2529 Py_INCREF (Py_None);
2535 py_guestfs_exists (PyObject *self, PyObject *args)
2543 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_exists",
2546 g = get_handle (py_g);
2548 r = guestfs_exists (g, path);
2550 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2554 py_r = PyInt_FromLong ((long) r);
2559 py_guestfs_is_file (PyObject *self, PyObject *args)
2567 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_is_file",
2570 g = get_handle (py_g);
2572 r = guestfs_is_file (g, path);
2574 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2578 py_r = PyInt_FromLong ((long) r);
2583 py_guestfs_is_dir (PyObject *self, PyObject *args)
2591 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_is_dir",
2594 g = get_handle (py_g);
2596 r = guestfs_is_dir (g, path);
2598 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2602 py_r = PyInt_FromLong ((long) r);
2607 py_guestfs_pvcreate (PyObject *self, PyObject *args)
2615 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_pvcreate",
2618 g = get_handle (py_g);
2620 r = guestfs_pvcreate (g, device);
2622 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2626 Py_INCREF (Py_None);
2632 py_guestfs_vgcreate (PyObject *self, PyObject *args)
2638 const char *volgroup;
2639 PyObject *py_physvols;
2640 const char **physvols;
2642 if (!PyArg_ParseTuple (args, (char *) "OsO:guestfs_vgcreate",
2643 &py_g, &volgroup, &py_physvols))
2645 g = get_handle (py_g);
2646 physvols = get_string_list (py_physvols);
2647 if (!physvols) return NULL;
2649 r = guestfs_vgcreate (g, volgroup, physvols);
2652 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2656 Py_INCREF (Py_None);
2662 py_guestfs_lvcreate (PyObject *self, PyObject *args)
2669 const char *volgroup;
2672 if (!PyArg_ParseTuple (args, (char *) "Ossi:guestfs_lvcreate",
2673 &py_g, &logvol, &volgroup, &mbytes))
2675 g = get_handle (py_g);
2677 r = guestfs_lvcreate (g, logvol, volgroup, mbytes);
2679 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2683 Py_INCREF (Py_None);
2689 py_guestfs_mkfs (PyObject *self, PyObject *args)
2698 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_mkfs",
2699 &py_g, &fstype, &device))
2701 g = get_handle (py_g);
2703 r = guestfs_mkfs (g, fstype, device);
2705 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2709 Py_INCREF (Py_None);
2715 py_guestfs_sfdisk (PyObject *self, PyObject *args)
2728 if (!PyArg_ParseTuple (args, (char *) "OsiiiO:guestfs_sfdisk",
2729 &py_g, &device, &cyls, &heads, §ors, &py_lines))
2731 g = get_handle (py_g);
2732 lines = get_string_list (py_lines);
2733 if (!lines) return NULL;
2735 r = guestfs_sfdisk (g, device, cyls, heads, sectors, lines);
2738 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2742 Py_INCREF (Py_None);
2748 py_guestfs_write_file (PyObject *self, PyObject *args)
2755 const char *content;
2758 if (!PyArg_ParseTuple (args, (char *) "Ossi:guestfs_write_file",
2759 &py_g, &path, &content, &size))
2761 g = get_handle (py_g);
2763 r = guestfs_write_file (g, path, content, size);
2765 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2769 Py_INCREF (Py_None);
2775 py_guestfs_umount (PyObject *self, PyObject *args)
2781 const char *pathordevice;
2783 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_umount",
2784 &py_g, &pathordevice))
2786 g = get_handle (py_g);
2788 r = guestfs_umount (g, pathordevice);
2790 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2794 Py_INCREF (Py_None);
2800 py_guestfs_mounts (PyObject *self, PyObject *args)
2807 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_mounts",
2810 g = get_handle (py_g);
2812 r = guestfs_mounts (g);
2814 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2818 py_r = put_string_list (r);
2824 py_guestfs_umount_all (PyObject *self, PyObject *args)
2831 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_umount_all",
2834 g = get_handle (py_g);
2836 r = guestfs_umount_all (g);
2838 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2842 Py_INCREF (Py_None);
2848 py_guestfs_lvm_remove_all (PyObject *self, PyObject *args)
2855 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_lvm_remove_all",
2858 g = get_handle (py_g);
2860 r = guestfs_lvm_remove_all (g);
2862 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2866 Py_INCREF (Py_None);
2872 py_guestfs_file (PyObject *self, PyObject *args)
2880 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_file",
2883 g = get_handle (py_g);
2885 r = guestfs_file (g, path);
2887 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2891 py_r = PyString_FromString (r);
2897 py_guestfs_command (PyObject *self, PyObject *args)
2903 PyObject *py_arguments;
2904 const char **arguments;
2906 if (!PyArg_ParseTuple (args, (char *) "OO:guestfs_command",
2907 &py_g, &py_arguments))
2909 g = get_handle (py_g);
2910 arguments = get_string_list (py_arguments);
2911 if (!arguments) return NULL;
2913 r = guestfs_command (g, arguments);
2916 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2920 py_r = PyString_FromString (r);
2926 py_guestfs_command_lines (PyObject *self, PyObject *args)
2932 PyObject *py_arguments;
2933 const char **arguments;
2935 if (!PyArg_ParseTuple (args, (char *) "OO:guestfs_command_lines",
2936 &py_g, &py_arguments))
2938 g = get_handle (py_g);
2939 arguments = get_string_list (py_arguments);
2940 if (!arguments) return NULL;
2942 r = guestfs_command_lines (g, arguments);
2945 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2949 py_r = put_string_list (r);
2955 py_guestfs_stat (PyObject *self, PyObject *args)
2960 struct guestfs_stat *r;
2963 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_stat",
2966 g = get_handle (py_g);
2968 r = guestfs_stat (g, path);
2970 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2974 py_r = put_stat (r);
2980 py_guestfs_lstat (PyObject *self, PyObject *args)
2985 struct guestfs_stat *r;
2988 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_lstat",
2991 g = get_handle (py_g);
2993 r = guestfs_lstat (g, path);
2995 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
2999 py_r = put_stat (r);
3005 py_guestfs_statvfs (PyObject *self, PyObject *args)
3010 struct guestfs_statvfs *r;
3013 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_statvfs",
3016 g = get_handle (py_g);
3018 r = guestfs_statvfs (g, path);
3020 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3024 py_r = put_statvfs (r);
3030 py_guestfs_tune2fs_l (PyObject *self, PyObject *args)
3038 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_tune2fs_l",
3041 g = get_handle (py_g);
3043 r = guestfs_tune2fs_l (g, device);
3045 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3049 py_r = put_table (r);
3055 py_guestfs_blockdev_setro (PyObject *self, PyObject *args)
3063 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_setro",
3066 g = get_handle (py_g);
3068 r = guestfs_blockdev_setro (g, device);
3070 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3074 Py_INCREF (Py_None);
3080 py_guestfs_blockdev_setrw (PyObject *self, PyObject *args)
3088 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_setrw",
3091 g = get_handle (py_g);
3093 r = guestfs_blockdev_setrw (g, device);
3095 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3099 Py_INCREF (Py_None);
3105 py_guestfs_blockdev_getro (PyObject *self, PyObject *args)
3113 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_getro",
3116 g = get_handle (py_g);
3118 r = guestfs_blockdev_getro (g, device);
3120 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3124 py_r = PyInt_FromLong ((long) r);
3129 py_guestfs_blockdev_getss (PyObject *self, PyObject *args)
3137 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_getss",
3140 g = get_handle (py_g);
3142 r = guestfs_blockdev_getss (g, device);
3144 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3148 py_r = PyInt_FromLong ((long) r);
3153 py_guestfs_blockdev_getbsz (PyObject *self, PyObject *args)
3161 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_getbsz",
3164 g = get_handle (py_g);
3166 r = guestfs_blockdev_getbsz (g, device);
3168 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3172 py_r = PyInt_FromLong ((long) r);
3177 py_guestfs_blockdev_setbsz (PyObject *self, PyObject *args)
3186 if (!PyArg_ParseTuple (args, (char *) "Osi:guestfs_blockdev_setbsz",
3187 &py_g, &device, &blocksize))
3189 g = get_handle (py_g);
3191 r = guestfs_blockdev_setbsz (g, device, blocksize);
3193 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3197 Py_INCREF (Py_None);
3203 py_guestfs_blockdev_getsz (PyObject *self, PyObject *args)
3211 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_getsz",
3214 g = get_handle (py_g);
3216 r = guestfs_blockdev_getsz (g, device);
3218 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3222 py_r = PyLong_FromLongLong (r);
3227 py_guestfs_blockdev_getsize64 (PyObject *self, PyObject *args)
3235 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_getsize64",
3238 g = get_handle (py_g);
3240 r = guestfs_blockdev_getsize64 (g, device);
3242 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3246 py_r = PyLong_FromLongLong (r);
3251 py_guestfs_blockdev_flushbufs (PyObject *self, PyObject *args)
3259 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_flushbufs",
3262 g = get_handle (py_g);
3264 r = guestfs_blockdev_flushbufs (g, device);
3266 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3270 Py_INCREF (Py_None);
3276 py_guestfs_blockdev_rereadpt (PyObject *self, PyObject *args)
3284 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_blockdev_rereadpt",
3287 g = get_handle (py_g);
3289 r = guestfs_blockdev_rereadpt (g, device);
3291 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3295 Py_INCREF (Py_None);
3301 py_guestfs_upload (PyObject *self, PyObject *args)
3307 const char *filename;
3308 const char *remotefilename;
3310 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_upload",
3311 &py_g, &filename, &remotefilename))
3313 g = get_handle (py_g);
3315 r = guestfs_upload (g, filename, remotefilename);
3317 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3321 Py_INCREF (Py_None);
3327 py_guestfs_download (PyObject *self, PyObject *args)
3333 const char *remotefilename;
3334 const char *filename;
3336 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_download",
3337 &py_g, &remotefilename, &filename))
3339 g = get_handle (py_g);
3341 r = guestfs_download (g, remotefilename, filename);
3343 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3347 Py_INCREF (Py_None);
3353 py_guestfs_checksum (PyObject *self, PyObject *args)
3359 const char *csumtype;
3362 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_checksum",
3363 &py_g, &csumtype, &path))
3365 g = get_handle (py_g);
3367 r = guestfs_checksum (g, csumtype, path);
3369 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3373 py_r = PyString_FromString (r);
3379 py_guestfs_tar_in (PyObject *self, PyObject *args)
3385 const char *tarfile;
3386 const char *directory;
3388 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_tar_in",
3389 &py_g, &tarfile, &directory))
3391 g = get_handle (py_g);
3393 r = guestfs_tar_in (g, tarfile, directory);
3395 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3399 Py_INCREF (Py_None);
3405 py_guestfs_tar_out (PyObject *self, PyObject *args)
3411 const char *directory;
3412 const char *tarfile;
3414 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_tar_out",
3415 &py_g, &directory, &tarfile))
3417 g = get_handle (py_g);
3419 r = guestfs_tar_out (g, directory, tarfile);
3421 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3425 Py_INCREF (Py_None);
3431 py_guestfs_tgz_in (PyObject *self, PyObject *args)
3437 const char *tarball;
3438 const char *directory;
3440 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_tgz_in",
3441 &py_g, &tarball, &directory))
3443 g = get_handle (py_g);
3445 r = guestfs_tgz_in (g, tarball, directory);
3447 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3451 Py_INCREF (Py_None);
3457 py_guestfs_tgz_out (PyObject *self, PyObject *args)
3463 const char *directory;
3464 const char *tarball;
3466 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_tgz_out",
3467 &py_g, &directory, &tarball))
3469 g = get_handle (py_g);
3471 r = guestfs_tgz_out (g, directory, tarball);
3473 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3477 Py_INCREF (Py_None);
3483 py_guestfs_mount_ro (PyObject *self, PyObject *args)
3490 const char *mountpoint;
3492 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_mount_ro",
3493 &py_g, &device, &mountpoint))
3495 g = get_handle (py_g);
3497 r = guestfs_mount_ro (g, device, mountpoint);
3499 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3503 Py_INCREF (Py_None);
3509 py_guestfs_mount_options (PyObject *self, PyObject *args)
3515 const char *options;
3517 const char *mountpoint;
3519 if (!PyArg_ParseTuple (args, (char *) "Osss:guestfs_mount_options",
3520 &py_g, &options, &device, &mountpoint))
3522 g = get_handle (py_g);
3524 r = guestfs_mount_options (g, options, device, mountpoint);
3526 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3530 Py_INCREF (Py_None);
3536 py_guestfs_mount_vfs (PyObject *self, PyObject *args)
3542 const char *options;
3543 const char *vfstype;
3545 const char *mountpoint;
3547 if (!PyArg_ParseTuple (args, (char *) "Ossss:guestfs_mount_vfs",
3548 &py_g, &options, &vfstype, &device, &mountpoint))
3550 g = get_handle (py_g);
3552 r = guestfs_mount_vfs (g, options, vfstype, device, mountpoint);
3554 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3558 Py_INCREF (Py_None);
3564 py_guestfs_debug (PyObject *self, PyObject *args)
3571 PyObject *py_extraargs;
3572 const char **extraargs;
3574 if (!PyArg_ParseTuple (args, (char *) "OsO:guestfs_debug",
3575 &py_g, &subcmd, &py_extraargs))
3577 g = get_handle (py_g);
3578 extraargs = get_string_list (py_extraargs);
3579 if (!extraargs) return NULL;
3581 r = guestfs_debug (g, subcmd, extraargs);
3584 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3588 py_r = PyString_FromString (r);
3594 py_guestfs_lvremove (PyObject *self, PyObject *args)
3602 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_lvremove",
3605 g = get_handle (py_g);
3607 r = guestfs_lvremove (g, device);
3609 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3613 Py_INCREF (Py_None);
3619 py_guestfs_vgremove (PyObject *self, PyObject *args)
3627 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_vgremove",
3630 g = get_handle (py_g);
3632 r = guestfs_vgremove (g, vgname);
3634 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3638 Py_INCREF (Py_None);
3644 py_guestfs_pvremove (PyObject *self, PyObject *args)
3652 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_pvremove",
3655 g = get_handle (py_g);
3657 r = guestfs_pvremove (g, device);
3659 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3663 Py_INCREF (Py_None);
3669 py_guestfs_set_e2label (PyObject *self, PyObject *args)
3678 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_set_e2label",
3679 &py_g, &device, &label))
3681 g = get_handle (py_g);
3683 r = guestfs_set_e2label (g, device, label);
3685 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3689 Py_INCREF (Py_None);
3695 py_guestfs_get_e2label (PyObject *self, PyObject *args)
3703 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_get_e2label",
3706 g = get_handle (py_g);
3708 r = guestfs_get_e2label (g, device);
3710 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3714 py_r = PyString_FromString (r);
3720 py_guestfs_set_e2uuid (PyObject *self, PyObject *args)
3729 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_set_e2uuid",
3730 &py_g, &device, &uuid))
3732 g = get_handle (py_g);
3734 r = guestfs_set_e2uuid (g, device, uuid);
3736 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3740 Py_INCREF (Py_None);
3746 py_guestfs_get_e2uuid (PyObject *self, PyObject *args)
3754 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_get_e2uuid",
3757 g = get_handle (py_g);
3759 r = guestfs_get_e2uuid (g, device);
3761 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3765 py_r = PyString_FromString (r);
3771 py_guestfs_fsck (PyObject *self, PyObject *args)
3780 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_fsck",
3781 &py_g, &fstype, &device))
3783 g = get_handle (py_g);
3785 r = guestfs_fsck (g, fstype, device);
3787 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3791 py_r = PyInt_FromLong ((long) r);
3796 py_guestfs_zero (PyObject *self, PyObject *args)
3804 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_zero",
3807 g = get_handle (py_g);
3809 r = guestfs_zero (g, device);
3811 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3815 Py_INCREF (Py_None);
3821 py_guestfs_grub_install (PyObject *self, PyObject *args)
3830 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_grub_install",
3831 &py_g, &root, &device))
3833 g = get_handle (py_g);
3835 r = guestfs_grub_install (g, root, device);
3837 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3841 Py_INCREF (Py_None);
3847 py_guestfs_cp (PyObject *self, PyObject *args)
3856 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_cp",
3857 &py_g, &src, &dest))
3859 g = get_handle (py_g);
3861 r = guestfs_cp (g, src, dest);
3863 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3867 Py_INCREF (Py_None);
3873 py_guestfs_cp_a (PyObject *self, PyObject *args)
3882 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_cp_a",
3883 &py_g, &src, &dest))
3885 g = get_handle (py_g);
3887 r = guestfs_cp_a (g, src, dest);
3889 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3893 Py_INCREF (Py_None);
3899 py_guestfs_mv (PyObject *self, PyObject *args)
3908 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_mv",
3909 &py_g, &src, &dest))
3911 g = get_handle (py_g);
3913 r = guestfs_mv (g, src, dest);
3915 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3919 Py_INCREF (Py_None);
3925 py_guestfs_drop_caches (PyObject *self, PyObject *args)
3933 if (!PyArg_ParseTuple (args, (char *) "Oi:guestfs_drop_caches",
3934 &py_g, &whattodrop))
3936 g = get_handle (py_g);
3938 r = guestfs_drop_caches (g, whattodrop);
3940 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3944 Py_INCREF (Py_None);
3950 py_guestfs_dmesg (PyObject *self, PyObject *args)
3957 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_dmesg",
3960 g = get_handle (py_g);
3962 r = guestfs_dmesg (g);
3964 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3968 py_r = PyString_FromString (r);
3974 py_guestfs_ping_daemon (PyObject *self, PyObject *args)
3981 if (!PyArg_ParseTuple (args, (char *) "O:guestfs_ping_daemon",
3984 g = get_handle (py_g);
3986 r = guestfs_ping_daemon (g);
3988 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
3992 Py_INCREF (Py_None);
3998 py_guestfs_equal (PyObject *self, PyObject *args)
4007 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_equal",
4008 &py_g, &file1, &file2))
4010 g = get_handle (py_g);
4012 r = guestfs_equal (g, file1, file2);
4014 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4018 py_r = PyInt_FromLong ((long) r);
4023 py_guestfs_strings (PyObject *self, PyObject *args)
4031 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_strings",
4034 g = get_handle (py_g);
4036 r = guestfs_strings (g, path);
4038 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4042 py_r = put_string_list (r);
4048 py_guestfs_strings_e (PyObject *self, PyObject *args)
4054 const char *encoding;
4057 if (!PyArg_ParseTuple (args, (char *) "Oss:guestfs_strings_e",
4058 &py_g, &encoding, &path))
4060 g = get_handle (py_g);
4062 r = guestfs_strings_e (g, encoding, path);
4064 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4068 py_r = put_string_list (r);
4074 py_guestfs_hexdump (PyObject *self, PyObject *args)
4082 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_hexdump",
4085 g = get_handle (py_g);
4087 r = guestfs_hexdump (g, path);
4089 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4093 py_r = PyString_FromString (r);
4099 py_guestfs_zerofree (PyObject *self, PyObject *args)
4107 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_zerofree",
4110 g = get_handle (py_g);
4112 r = guestfs_zerofree (g, device);
4114 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4118 Py_INCREF (Py_None);
4124 py_guestfs_pvresize (PyObject *self, PyObject *args)
4132 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_pvresize",
4135 g = get_handle (py_g);
4137 r = guestfs_pvresize (g, device);
4139 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4143 Py_INCREF (Py_None);
4149 py_guestfs_sfdisk_N (PyObject *self, PyObject *args)
4162 if (!PyArg_ParseTuple (args, (char *) "Osiiiis:guestfs_sfdisk_N",
4163 &py_g, &device, &n, &cyls, &heads, §ors, &line))
4165 g = get_handle (py_g);
4167 r = guestfs_sfdisk_N (g, device, n, cyls, heads, sectors, line);
4169 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4173 Py_INCREF (Py_None);
4179 py_guestfs_sfdisk_l (PyObject *self, PyObject *args)
4187 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_sfdisk_l",
4190 g = get_handle (py_g);
4192 r = guestfs_sfdisk_l (g, device);
4194 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4198 py_r = PyString_FromString (r);
4204 py_guestfs_sfdisk_kernel_geometry (PyObject *self, PyObject *args)
4212 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_sfdisk_kernel_geometry",
4215 g = get_handle (py_g);
4217 r = guestfs_sfdisk_kernel_geometry (g, device);
4219 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4223 py_r = PyString_FromString (r);
4229 py_guestfs_sfdisk_disk_geometry (PyObject *self, PyObject *args)
4237 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_sfdisk_disk_geometry",
4240 g = get_handle (py_g);
4242 r = guestfs_sfdisk_disk_geometry (g, device);
4244 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4248 py_r = PyString_FromString (r);
4254 py_guestfs_vg_activate_all (PyObject *self, PyObject *args)
4262 if (!PyArg_ParseTuple (args, (char *) "Oi:guestfs_vg_activate_all",
4265 g = get_handle (py_g);
4267 r = guestfs_vg_activate_all (g, activate);
4269 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4273 Py_INCREF (Py_None);
4279 py_guestfs_vg_activate (PyObject *self, PyObject *args)
4286 PyObject *py_volgroups;
4287 const char **volgroups;
4289 if (!PyArg_ParseTuple (args, (char *) "OiO:guestfs_vg_activate",
4290 &py_g, &activate, &py_volgroups))
4292 g = get_handle (py_g);
4293 volgroups = get_string_list (py_volgroups);
4294 if (!volgroups) return NULL;
4296 r = guestfs_vg_activate (g, activate, volgroups);
4299 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4303 Py_INCREF (Py_None);
4309 py_guestfs_lvresize (PyObject *self, PyObject *args)
4318 if (!PyArg_ParseTuple (args, (char *) "Osi:guestfs_lvresize",
4319 &py_g, &device, &mbytes))
4321 g = get_handle (py_g);
4323 r = guestfs_lvresize (g, device, mbytes);
4325 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4329 Py_INCREF (Py_None);
4335 py_guestfs_resize2fs (PyObject *self, PyObject *args)
4343 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_resize2fs",
4346 g = get_handle (py_g);
4348 r = guestfs_resize2fs (g, device);
4350 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4354 Py_INCREF (Py_None);
4360 py_guestfs_find (PyObject *self, PyObject *args)
4366 const char *directory;
4368 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_find",
4371 g = get_handle (py_g);
4373 r = guestfs_find (g, directory);
4375 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4379 py_r = put_string_list (r);
4385 py_guestfs_e2fsck_f (PyObject *self, PyObject *args)
4393 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_e2fsck_f",
4396 g = get_handle (py_g);
4398 r = guestfs_e2fsck_f (g, device);
4400 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4404 Py_INCREF (Py_None);
4410 py_guestfs_sleep (PyObject *self, PyObject *args)
4418 if (!PyArg_ParseTuple (args, (char *) "Oi:guestfs_sleep",
4421 g = get_handle (py_g);
4423 r = guestfs_sleep (g, secs);
4425 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4429 Py_INCREF (Py_None);
4435 py_guestfs_ntfs_3g_probe (PyObject *self, PyObject *args)
4444 if (!PyArg_ParseTuple (args, (char *) "Ois:guestfs_ntfs_3g_probe",
4445 &py_g, &rw, &device))
4447 g = get_handle (py_g);
4449 r = guestfs_ntfs_3g_probe (g, rw, device);
4451 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4455 py_r = PyInt_FromLong ((long) r);
4460 py_guestfs_sh (PyObject *self, PyObject *args)
4466 const char *command;
4468 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_sh",
4471 g = get_handle (py_g);
4473 r = guestfs_sh (g, command);
4475 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4479 py_r = PyString_FromString (r);
4485 py_guestfs_sh_lines (PyObject *self, PyObject *args)
4491 const char *command;
4493 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_sh_lines",
4496 g = get_handle (py_g);
4498 r = guestfs_sh_lines (g, command);
4500 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4504 py_r = put_string_list (r);
4510 py_guestfs_glob_expand (PyObject *self, PyObject *args)
4516 const char *pattern;
4518 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_glob_expand",
4521 g = get_handle (py_g);
4523 r = guestfs_glob_expand (g, pattern);
4525 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4529 py_r = put_string_list (r);
4535 py_guestfs_scrub_device (PyObject *self, PyObject *args)
4543 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_scrub_device",
4546 g = get_handle (py_g);
4548 r = guestfs_scrub_device (g, device);
4550 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4554 Py_INCREF (Py_None);
4560 py_guestfs_scrub_file (PyObject *self, PyObject *args)
4568 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_scrub_file",
4571 g = get_handle (py_g);
4573 r = guestfs_scrub_file (g, file);
4575 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4579 Py_INCREF (Py_None);
4585 py_guestfs_scrub_freespace (PyObject *self, PyObject *args)
4593 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_scrub_freespace",
4596 g = get_handle (py_g);
4598 r = guestfs_scrub_freespace (g, dir);
4600 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4604 Py_INCREF (Py_None);
4610 py_guestfs_mkdtemp (PyObject *self, PyObject *args)
4616 const char *template;
4618 if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_mkdtemp",
4621 g = get_handle (py_g);
4623 r = guestfs_mkdtemp (g, template);
4625 PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g));
4629 py_r = PyString_FromString (r);
4634 static PyMethodDef methods[] = {
4635 { (char *) "create", py_guestfs_create, METH_VARARGS, NULL },
4636 { (char *) "close", py_guestfs_close, METH_VARARGS, NULL },
4637 { (char *) "test0", py_guestfs_test0, METH_VARARGS, NULL },
4638 { (char *) "test0rint", py_guestfs_test0rint, METH_VARARGS, NULL },
4639 { (char *) "test0rinterr", py_guestfs_test0rinterr, METH_VARARGS, NULL },
4640 { (char *) "test0rint64", py_guestfs_test0rint64, METH_VARARGS, NULL },
4641 { (char *) "test0rint64err", py_guestfs_test0rint64err, METH_VARARGS, NULL },
4642 { (char *) "test0rbool", py_guestfs_test0rbool, METH_VARARGS, NULL },
4643 { (char *) "test0rboolerr", py_guestfs_test0rboolerr, METH_VARARGS, NULL },
4644 { (char *) "test0rconststring", py_guestfs_test0rconststring, METH_VARARGS, NULL },
4645 { (char *) "test0rconststringerr", py_guestfs_test0rconststringerr, METH_VARARGS, NULL },
4646 { (char *) "test0rstring", py_guestfs_test0rstring, METH_VARARGS, NULL },
4647 { (char *) "test0rstringerr", py_guestfs_test0rstringerr, METH_VARARGS, NULL },
4648 { (char *) "test0rstringlist", py_guestfs_test0rstringlist, METH_VARARGS, NULL },
4649 { (char *) "test0rstringlisterr", py_guestfs_test0rstringlisterr, METH_VARARGS, NULL },
4650 { (char *) "test0rintbool", py_guestfs_test0rintbool, METH_VARARGS, NULL },
4651 { (char *) "test0rintboolerr", py_guestfs_test0rintboolerr, METH_VARARGS, NULL },
4652 { (char *) "test0rpvlist", py_guestfs_test0rpvlist, METH_VARARGS, NULL },
4653 { (char *) "test0rpvlisterr", py_guestfs_test0rpvlisterr, METH_VARARGS, NULL },
4654 { (char *) "test0rvglist", py_guestfs_test0rvglist, METH_VARARGS, NULL },
4655 { (char *) "test0rvglisterr", py_guestfs_test0rvglisterr, METH_VARARGS, NULL },
4656 { (char *) "test0rlvlist", py_guestfs_test0rlvlist, METH_VARARGS, NULL },
4657 { (char *) "test0rlvlisterr", py_guestfs_test0rlvlisterr, METH_VARARGS, NULL },
4658 { (char *) "test0rstat", py_guestfs_test0rstat, METH_VARARGS, NULL },
4659 { (char *) "test0rstaterr", py_guestfs_test0rstaterr, METH_VARARGS, NULL },
4660 { (char *) "test0rstatvfs", py_guestfs_test0rstatvfs, METH_VARARGS, NULL },
4661 { (char *) "test0rstatvfserr", py_guestfs_test0rstatvfserr, METH_VARARGS, NULL },
4662 { (char *) "test0rhashtable", py_guestfs_test0rhashtable, METH_VARARGS, NULL },
4663 { (char *) "test0rhashtableerr", py_guestfs_test0rhashtableerr, METH_VARARGS, NULL },
4664 { (char *) "launch", py_guestfs_launch, METH_VARARGS, NULL },
4665 { (char *) "wait_ready", py_guestfs_wait_ready, METH_VARARGS, NULL },
4666 { (char *) "kill_subprocess", py_guestfs_kill_subprocess, METH_VARARGS, NULL },
4667 { (char *) "add_drive", py_guestfs_add_drive, METH_VARARGS, NULL },
4668 { (char *) "add_cdrom", py_guestfs_add_cdrom, METH_VARARGS, NULL },
4669 { (char *) "add_drive_ro", py_guestfs_add_drive_ro, METH_VARARGS, NULL },
4670 { (char *) "config", py_guestfs_config, METH_VARARGS, NULL },
4671 { (char *) "set_qemu", py_guestfs_set_qemu, METH_VARARGS, NULL },
4672 { (char *) "get_qemu", py_guestfs_get_qemu, METH_VARARGS, NULL },
4673 { (char *) "set_path", py_guestfs_set_path, METH_VARARGS, NULL },
4674 { (char *) "get_path", py_guestfs_get_path, METH_VARARGS, NULL },
4675 { (char *) "set_append", py_guestfs_set_append, METH_VARARGS, NULL },
4676 { (char *) "get_append", py_guestfs_get_append, METH_VARARGS, NULL },
4677 { (char *) "set_autosync", py_guestfs_set_autosync, METH_VARARGS, NULL },
4678 { (char *) "get_autosync", py_guestfs_get_autosync, METH_VARARGS, NULL },
4679 { (char *) "set_verbose", py_guestfs_set_verbose, METH_VARARGS, NULL },
4680 { (char *) "get_verbose", py_guestfs_get_verbose, METH_VARARGS, NULL },
4681 { (char *) "is_ready", py_guestfs_is_ready, METH_VARARGS, NULL },
4682 { (char *) "is_config", py_guestfs_is_config, METH_VARARGS, NULL },
4683 { (char *) "is_launching", py_guestfs_is_launching, METH_VARARGS, NULL },
4684 { (char *) "is_busy", py_guestfs_is_busy, METH_VARARGS, NULL },
4685 { (char *) "get_state", py_guestfs_get_state, METH_VARARGS, NULL },
4686 { (char *) "set_busy", py_guestfs_set_busy, METH_VARARGS, NULL },
4687 { (char *) "set_ready", py_guestfs_set_ready, METH_VARARGS, NULL },
4688 { (char *) "end_busy", py_guestfs_end_busy, METH_VARARGS, NULL },
4689 { (char *) "mount", py_guestfs_mount, METH_VARARGS, NULL },
4690 { (char *) "sync", py_guestfs_sync, METH_VARARGS, NULL },
4691 { (char *) "touch", py_guestfs_touch, METH_VARARGS, NULL },
4692 { (char *) "cat", py_guestfs_cat, METH_VARARGS, NULL },
4693 { (char *) "ll", py_guestfs_ll, METH_VARARGS, NULL },
4694 { (char *) "ls", py_guestfs_ls, METH_VARARGS, NULL },
4695 { (char *) "list_devices", py_guestfs_list_devices, METH_VARARGS, NULL },
4696 { (char *) "list_partitions", py_guestfs_list_partitions, METH_VARARGS, NULL },
4697 { (char *) "pvs", py_guestfs_pvs, METH_VARARGS, NULL },
4698 { (char *) "vgs", py_guestfs_vgs, METH_VARARGS, NULL },
4699 { (char *) "lvs", py_guestfs_lvs, METH_VARARGS, NULL },
4700 { (char *) "pvs_full", py_guestfs_pvs_full, METH_VARARGS, NULL },
4701 { (char *) "vgs_full", py_guestfs_vgs_full, METH_VARARGS, NULL },
4702 { (char *) "lvs_full", py_guestfs_lvs_full, METH_VARARGS, NULL },
4703 { (char *) "read_lines", py_guestfs_read_lines, METH_VARARGS, NULL },
4704 { (char *) "aug_init", py_guestfs_aug_init, METH_VARARGS, NULL },
4705 { (char *) "aug_close", py_guestfs_aug_close, METH_VARARGS, NULL },
4706 { (char *) "aug_defvar", py_guestfs_aug_defvar, METH_VARARGS, NULL },
4707 { (char *) "aug_defnode", py_guestfs_aug_defnode, METH_VARARGS, NULL },
4708 { (char *) "aug_get", py_guestfs_aug_get, METH_VARARGS, NULL },
4709 { (char *) "aug_set", py_guestfs_aug_set, METH_VARARGS, NULL },
4710 { (char *) "aug_insert", py_guestfs_aug_insert, METH_VARARGS, NULL },
4711 { (char *) "aug_rm", py_guestfs_aug_rm, METH_VARARGS, NULL },
4712 { (char *) "aug_mv", py_guestfs_aug_mv, METH_VARARGS, NULL },
4713 { (char *) "aug_match", py_guestfs_aug_match, METH_VARARGS, NULL },
4714 { (char *) "aug_save", py_guestfs_aug_save, METH_VARARGS, NULL },
4715 { (char *) "aug_load", py_guestfs_aug_load, METH_VARARGS, NULL },
4716 { (char *) "aug_ls", py_guestfs_aug_ls, METH_VARARGS, NULL },
4717 { (char *) "rm", py_guestfs_rm, METH_VARARGS, NULL },
4718 { (char *) "rmdir", py_guestfs_rmdir, METH_VARARGS, NULL },
4719 { (char *) "rm_rf", py_guestfs_rm_rf, METH_VARARGS, NULL },
4720 { (char *) "mkdir", py_guestfs_mkdir, METH_VARARGS, NULL },
4721 { (char *) "mkdir_p", py_guestfs_mkdir_p, METH_VARARGS, NULL },
4722 { (char *) "chmod", py_guestfs_chmod, METH_VARARGS, NULL },
4723 { (char *) "chown", py_guestfs_chown, METH_VARARGS, NULL },
4724 { (char *) "exists", py_guestfs_exists, METH_VARARGS, NULL },
4725 { (char *) "is_file", py_guestfs_is_file, METH_VARARGS, NULL },
4726 { (char *) "is_dir", py_guestfs_is_dir, METH_VARARGS, NULL },
4727 { (char *) "pvcreate", py_guestfs_pvcreate, METH_VARARGS, NULL },
4728 { (char *) "vgcreate", py_guestfs_vgcreate, METH_VARARGS, NULL },
4729 { (char *) "lvcreate", py_guestfs_lvcreate, METH_VARARGS, NULL },
4730 { (char *) "mkfs", py_guestfs_mkfs, METH_VARARGS, NULL },
4731 { (char *) "sfdisk", py_guestfs_sfdisk, METH_VARARGS, NULL },
4732 { (char *) "write_file", py_guestfs_write_file, METH_VARARGS, NULL },
4733 { (char *) "umount", py_guestfs_umount, METH_VARARGS, NULL },
4734 { (char *) "mounts", py_guestfs_mounts, METH_VARARGS, NULL },
4735 { (char *) "umount_all", py_guestfs_umount_all, METH_VARARGS, NULL },
4736 { (char *) "lvm_remove_all", py_guestfs_lvm_remove_all, METH_VARARGS, NULL },
4737 { (char *) "file", py_guestfs_file, METH_VARARGS, NULL },
4738 { (char *) "command", py_guestfs_command, METH_VARARGS, NULL },
4739 { (char *) "command_lines", py_guestfs_command_lines, METH_VARARGS, NULL },
4740 { (char *) "stat", py_guestfs_stat, METH_VARARGS, NULL },
4741 { (char *) "lstat", py_guestfs_lstat, METH_VARARGS, NULL },
4742 { (char *) "statvfs", py_guestfs_statvfs, METH_VARARGS, NULL },
4743 { (char *) "tune2fs_l", py_guestfs_tune2fs_l, METH_VARARGS, NULL },
4744 { (char *) "blockdev_setro", py_guestfs_blockdev_setro, METH_VARARGS, NULL },
4745 { (char *) "blockdev_setrw", py_guestfs_blockdev_setrw, METH_VARARGS, NULL },
4746 { (char *) "blockdev_getro", py_guestfs_blockdev_getro, METH_VARARGS, NULL },
4747 { (char *) "blockdev_getss", py_guestfs_blockdev_getss, METH_VARARGS, NULL },
4748 { (char *) "blockdev_getbsz", py_guestfs_blockdev_getbsz, METH_VARARGS, NULL },
4749 { (char *) "blockdev_setbsz", py_guestfs_blockdev_setbsz, METH_VARARGS, NULL },
4750 { (char *) "blockdev_getsz", py_guestfs_blockdev_getsz, METH_VARARGS, NULL },
4751 { (char *) "blockdev_getsize64", py_guestfs_blockdev_getsize64, METH_VARARGS, NULL },
4752 { (char *) "blockdev_flushbufs", py_guestfs_blockdev_flushbufs, METH_VARARGS, NULL },
4753 { (char *) "blockdev_rereadpt", py_guestfs_blockdev_rereadpt, METH_VARARGS, NULL },
4754 { (char *) "upload", py_guestfs_upload, METH_VARARGS, NULL },
4755 { (char *) "download", py_guestfs_download, METH_VARARGS, NULL },
4756 { (char *) "checksum", py_guestfs_checksum, METH_VARARGS, NULL },
4757 { (char *) "tar_in", py_guestfs_tar_in, METH_VARARGS, NULL },
4758 { (char *) "tar_out", py_guestfs_tar_out, METH_VARARGS, NULL },
4759 { (char *) "tgz_in", py_guestfs_tgz_in, METH_VARARGS, NULL },
4760 { (char *) "tgz_out", py_guestfs_tgz_out, METH_VARARGS, NULL },
4761 { (char *) "mount_ro", py_guestfs_mount_ro, METH_VARARGS, NULL },
4762 { (char *) "mount_options", py_guestfs_mount_options, METH_VARARGS, NULL },
4763 { (char *) "mount_vfs", py_guestfs_mount_vfs, METH_VARARGS, NULL },
4764 { (char *) "debug", py_guestfs_debug, METH_VARARGS, NULL },
4765 { (char *) "lvremove", py_guestfs_lvremove, METH_VARARGS, NULL },
4766 { (char *) "vgremove", py_guestfs_vgremove, METH_VARARGS, NULL },
4767 { (char *) "pvremove", py_guestfs_pvremove, METH_VARARGS, NULL },
4768 { (char *) "set_e2label", py_guestfs_set_e2label, METH_VARARGS, NULL },
4769 { (char *) "get_e2label", py_guestfs_get_e2label, METH_VARARGS, NULL },
4770 { (char *) "set_e2uuid", py_guestfs_set_e2uuid, METH_VARARGS, NULL },
4771 { (char *) "get_e2uuid", py_guestfs_get_e2uuid, METH_VARARGS, NULL },
4772 { (char *) "fsck", py_guestfs_fsck, METH_VARARGS, NULL },
4773 { (char *) "zero", py_guestfs_zero, METH_VARARGS, NULL },
4774 { (char *) "grub_install", py_guestfs_grub_install, METH_VARARGS, NULL },
4775 { (char *) "cp", py_guestfs_cp, METH_VARARGS, NULL },
4776 { (char *) "cp_a", py_guestfs_cp_a, METH_VARARGS, NULL },
4777 { (char *) "mv", py_guestfs_mv, METH_VARARGS, NULL },
4778 { (char *) "drop_caches", py_guestfs_drop_caches, METH_VARARGS, NULL },
4779 { (char *) "dmesg", py_guestfs_dmesg, METH_VARARGS, NULL },
4780 { (char *) "ping_daemon", py_guestfs_ping_daemon, METH_VARARGS, NULL },
4781 { (char *) "equal", py_guestfs_equal, METH_VARARGS, NULL },
4782 { (char *) "strings", py_guestfs_strings, METH_VARARGS, NULL },
4783 { (char *) "strings_e", py_guestfs_strings_e, METH_VARARGS, NULL },
4784 { (char *) "hexdump", py_guestfs_hexdump, METH_VARARGS, NULL },
4785 { (char *) "zerofree", py_guestfs_zerofree, METH_VARARGS, NULL },
4786 { (char *) "pvresize", py_guestfs_pvresize, METH_VARARGS, NULL },
4787 { (char *) "sfdisk_N", py_guestfs_sfdisk_N, METH_VARARGS, NULL },
4788 { (char *) "sfdisk_l", py_guestfs_sfdisk_l, METH_VARARGS, NULL },
4789 { (char *) "sfdisk_kernel_geometry", py_guestfs_sfdisk_kernel_geometry, METH_VARARGS, NULL },
4790 { (char *) "sfdisk_disk_geometry", py_guestfs_sfdisk_disk_geometry, METH_VARARGS, NULL },
4791 { (char *) "vg_activate_all", py_guestfs_vg_activate_all, METH_VARARGS, NULL },
4792 { (char *) "vg_activate", py_guestfs_vg_activate, METH_VARARGS, NULL },
4793 { (char *) "lvresize", py_guestfs_lvresize, METH_VARARGS, NULL },
4794 { (char *) "resize2fs", py_guestfs_resize2fs, METH_VARARGS, NULL },
4795 { (char *) "find", py_guestfs_find, METH_VARARGS, NULL },
4796 { (char *) "e2fsck_f", py_guestfs_e2fsck_f, METH_VARARGS, NULL },
4797 { (char *) "sleep", py_guestfs_sleep, METH_VARARGS, NULL },
4798 { (char *) "ntfs_3g_probe", py_guestfs_ntfs_3g_probe, METH_VARARGS, NULL },
4799 { (char *) "sh", py_guestfs_sh, METH_VARARGS, NULL },
4800 { (char *) "sh_lines", py_guestfs_sh_lines, METH_VARARGS, NULL },
4801 { (char *) "glob_expand", py_guestfs_glob_expand, METH_VARARGS, NULL },
4802 { (char *) "scrub_device", py_guestfs_scrub_device, METH_VARARGS, NULL },
4803 { (char *) "scrub_file", py_guestfs_scrub_file, METH_VARARGS, NULL },
4804 { (char *) "scrub_freespace", py_guestfs_scrub_freespace, METH_VARARGS, NULL },
4805 { (char *) "mkdtemp", py_guestfs_mkdtemp, METH_VARARGS, NULL },
4806 { NULL, NULL, 0, NULL }
4810 initlibguestfsmod (void)
4812 static int initialized = 0;
4814 if (initialized) return;
4815 Py_InitModule ((char *) "libguestfsmod", methods);