lib: move MAX_PKG_DB_SIZE to inspect-apps

It is used only there, so avoid exposing it to all the users of
guestfs-internal.h.

This is just code motion.
This commit is contained in:
Pino Toscano
2018-11-30 11:29:43 +01:00
parent 28bd06227b
commit 8197336a9b
2 changed files with 9 additions and 9 deletions

View File

@@ -122,15 +122,6 @@
*/
#define APPLIANCE_TIMEOUT (20*60) /* 20 mins */
/* Some limits on what the inspection code will read, for safety. */
/* 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)

View File

@@ -45,6 +45,15 @@
#include "guestfs-internal-actions.h"
#include "structs-cleanups.h"
/* Some limits on what the inspection code will read, for safety. */
/* 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)
#ifdef DB_DUMP
static struct guestfs_application2_list *list_applications_rpm (guestfs_h *g, const char *root);
#endif