diff options
author | Dan McGee <dan@archlinux.org> | 2011-09-02 00:16:56 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-03 04:45:03 +0200 |
commit | 37da18aee8d925ee5cd9f526f2c61d07e9db5b66 (patch) | |
tree | 3ed740826f4463c8779080b07b57adbde1fe5c3b /lib/libalpm/diskspace.c | |
parent | d88e524e7c6e902dcf1c0afed52def0d8b430b25 (diff) | |
download | pacman-37da18aee8d925ee5cd9f526f2c61d07e9db5b66.tar.gz pacman-37da18aee8d925ee5cd9f526f2c61d07e9db5b66.tar.xz |
Move all callbacks up to the handle level
This was just disgusting before, unnecessary to limit these to only
usage in a transaction. Still a lot of more room for cleanup but we'll
start by attaching them to the handle rather than the transaction we may
or may not even want to use these callbacks.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/diskspace.c')
-rw-r--r-- | lib/libalpm/diskspace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index ad80304b..f791c07b 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -260,7 +260,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle) for(targ = trans->remove; targ; targ = targ->next, current++) { alpm_pkg_t *local_pkg; int percent = (current * 100) / numtargs; - PROGRESS(trans, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", percent, + PROGRESS(handle, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", percent, numtargs, current); local_pkg = targ->data; @@ -271,7 +271,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle) for(targ = trans->add; targ; targ = targ->next, current++) { alpm_pkg_t *pkg, *local_pkg; int percent = (current * 100) / numtargs; - PROGRESS(trans, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", percent, + PROGRESS(handle, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", percent, numtargs, current); pkg = targ->data; @@ -290,7 +290,7 @@ int _alpm_check_diskspace(alpm_handle_t *handle) } } - PROGRESS(trans, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", 100, + PROGRESS(handle, ALPM_TRANS_PROGRESS_DISKSPACE_START, "", 100, numtargs, current); for(i = mount_points; i; i = i->next) { |