summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-01-19 09:28:44 +0000
committerAaron Griffin <aaron@archlinux.org>2007-01-19 09:28:44 +0000
commit616701726425417989ef1dca145b805deae6fe93 (patch)
tree2da68e080703c61a2c2116c0346b2dd58025015f /lib/libalpm/util.c
parent6d6ab5ed188d98fa057dbe2c83e8ce5126854426 (diff)
downloadpacman-616701726425417989ef1dca145b805deae6fe93.tar.xz
Preliminary checkin for alpm_list conversion
* renamed pmlist_t -> alpm_list_t * made alpm_list_t a public type (alpm_list.h header) * removed additional storage for registered DBs in pacman source * some code cleanup * removed duplicate (pm)list_display functions from pacman source * misc code cleanup
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 074d16f1..ad7bf8ee 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -55,8 +55,8 @@
#endif
/* pacman */
+#include "alpm_list.h"
#include "log.h"
-#include "list.h"
#include "trans.h"
#include "sync.h"
#include "util.h"
@@ -563,9 +563,9 @@ static long long get_freespace()
return(ret);
}
-int _alpm_check_freespace(pmtrans_t *trans, pmlist_t **data)
+int _alpm_check_freespace(pmtrans_t *trans, alpm_list_t **data)
{
- pmlist_t *i;
+ alpm_list_t *i;
long long pkgsize=0, freespace;
for(i = trans->packages; i; i = i->next) {
@@ -594,7 +594,7 @@ int _alpm_check_freespace(pmtrans_t *trans, pmlist_t **data)
return(-1);
}
*ptr = pkgsize;
- *data = _alpm_list_add(*data, ptr);
+ *data = alpm_list_add(*data, ptr);
if((ptr = (long long*)malloc(sizeof(long long)))==NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(long long));
FREELIST(*data);
@@ -602,7 +602,7 @@ int _alpm_check_freespace(pmtrans_t *trans, pmlist_t **data)
return(-1);
}
*ptr = freespace;
- *data = _alpm_list_add(*data, ptr);
+ *data = alpm_list_add(*data, ptr);
}
pm_errno = PM_ERR_DISK_FULL;
return(-1);