X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Fguestfs-internal.h;h=99a04045705b7144baadcb2fec111720d21fb6a8;hb=a548c9668315844763456c15e89e35e9702b851a;hp=1730f6886602963d59fbe7a0dfcd891e742c4dfa;hpb=a986e8dadb0c70634f6d1d89dd3e7bb5d9af3078;p=libguestfs.git diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 1730f68..99a0404 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -82,8 +82,15 @@ */ #define MAX_REGISTRY_SIZE (100 * 1000 * 1000) -/* Maximum RPM or dpkg database we will download to /tmp. */ -#define MAX_PKG_DB_SIZE (10 * 1000 * 1000) +/* Maximum RPM or dpkg database we will download to /tmp. RPM + * 'Packages' database can get very large: 70 MB is roughly the + * standard size for a new Fedora install, and after lots of package + * installation/removal I have seen well over 100 MB databases. + */ +#define MAX_PKG_DB_SIZE (300 * 1000 * 1000) + +/* Maximum size of Windows explorer.exe. 2.6MB on Windows 7. */ +#define MAX_WINDOWS_EXPLORER_SIZE (4 * 1000 * 1000) /* Network configuration of the appliance. Note these addresses are * only meaningful within the context of the running appliance. QEMU @@ -143,7 +150,7 @@ struct guestfs_h char *qemu_help, *qemu_version; /* Output of qemu -help, qemu -version. */ char **cmdline; /* Qemu command line. */ - int cmdline_size; + size_t cmdline_size; int verbose; int trace; @@ -163,6 +170,8 @@ struct guestfs_h int selinux; /* selinux enabled? */ + int pgroup; /* Create process group for children? */ + char *last_error; int last_errnum; /* errno, or 0 if there was no errno */ @@ -191,6 +200,11 @@ struct guestfs_h FILE *trace_fp; char *trace_buf; size_t trace_len; + + /* User cancelled transfer. Not signal-atomic, but it doesn't + * matter for this case because we only care if it is != 0. + */ + int user_cancel; }; /* Per-filesystem data stored for inspect_os. */ @@ -237,6 +251,8 @@ enum inspect_os_distro { OS_DISTRO_LINUX_MINT, OS_DISTRO_MANDRIVA, OS_DISTRO_SLACKWARE, + OS_DISTRO_CENTOS, + OS_DISTRO_SCIENTIFIC_LINUX, }; enum inspect_os_package_format { @@ -340,14 +356,14 @@ extern int guestfs___match3 (guestfs_h *g, const char *str, const pcre *re, char #endif extern int guestfs___feature_available (guestfs_h *g, const char *feature); extern void guestfs___free_string_list (char **); -extern int guestfs___checkpoint_cmdline (guestfs_h *g); -extern void guestfs___rollback_cmdline (guestfs_h *g, int pos); +extern size_t guestfs___checkpoint_cmdline (guestfs_h *g); +extern void guestfs___rollback_cmdline (guestfs_h *g, size_t pos); extern void guestfs___call_callbacks_void (guestfs_h *g, uint64_t event); extern void guestfs___call_callbacks_message (guestfs_h *g, uint64_t event, const char *buf, size_t buf_len); extern void guestfs___call_callbacks_array (guestfs_h *g, uint64_t event, const uint64_t *array, size_t array_len); #if defined(HAVE_PCRE) && defined(HAVE_HIVEX) extern int guestfs___check_for_filesystem_on (guestfs_h *g, const char *device, int is_block, int is_partnum); -extern int guestfs___download_to_tmp (guestfs_h *g, const char *filename, const char *basename, int64_t max_size); +extern char *guestfs___download_to_tmp (guestfs_h *g, struct inspect_fs *fs, const char *filename, const char *basename, int64_t max_size); extern char *guestfs___case_sensitive_path_silently (guestfs_h *g, const char *); extern struct inspect_fs *guestfs___search_for_root (guestfs_h *g, const char *root); extern int guestfs___parse_unsigned_int (guestfs_h *g, const char *str);