From e22aa23c8f5adb0fd4b7ccbee480a4906ede0346 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 16 Nov 2010 16:54:30 +1000 Subject: Add configuration option to control disk space checking Disk space checking is likely to be an unnecessary bottleneck to people with reasonable partition sizes so add a configuration option to allow it to be disabled/enabled as wanted. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- lib/libalpm/handle.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lib/libalpm/handle.c') diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index aa34cf45..ffa5dd67 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -232,6 +232,15 @@ int SYMEXPORT alpm_option_get_usedelta() return handle->usedelta; } +int SYMEXPORT alpm_option_get_checkspace() +{ + if (handle == NULL) { + pm_errno = PM_ERR_HANDLE_NULL; + return -1; + } + return handle->checkspace; +} + pmdb_t SYMEXPORT *alpm_option_get_localdb() { if (handle == NULL) { @@ -550,4 +559,9 @@ void SYMEXPORT alpm_option_set_usedelta(int usedelta) handle->usedelta = usedelta; } +void SYMEXPORT alpm_option_set_checkspace(int checkspace) +{ + handle->checkspace = checkspace; +} + /* vim: set ts=2 sw=2 noet: */ -- cgit v1.2.3-24-g4f1b