Remove local LIBGUESTFS_PATH detection from guestfish and guestmount.
[libguestfs.git] / src / guestfs-internal.h
index b75aee8..c6d7c87 100644 (file)
  */
 #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)
 
 /* Network configuration of the appliance.  Note these addresses are
  * only meaningful within the context of the running appliance.  QEMU
@@ -355,6 +359,8 @@ extern int guestfs___parse_unsigned_int_ignore_trailing (guestfs_h *g, const cha
 extern int guestfs___parse_major_minor (guestfs_h *g, struct inspect_fs *fs);
 extern char *guestfs___first_line_of_file (guestfs_h *g, const char *filename);
 extern int guestfs___first_egrep_of_file (guestfs_h *g, const char *filename, const char *eregex, int iflag, char **ret);
+typedef int (*guestfs___db_dump_callback) (guestfs_h *g, const unsigned char *key, size_t keylen, const unsigned char *value, size_t valuelen, void *opaque);
+extern int guestfs___read_db_dump (guestfs_h *g, const char *dumpfile, void *opaque, guestfs___db_dump_callback callback);
 extern int guestfs___check_installer_root (guestfs_h *g, struct inspect_fs *fs);
 extern int guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs);
 extern int guestfs___check_freebsd_root (guestfs_h *g, struct inspect_fs *fs);