summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2007-01-30 09:14:10 +0100
committerAaron Griffin <aaron@archlinux.org>2007-01-30 09:14:10 +0100
commitda648bc24cebcf3fff9073693871183fd95d4c92 (patch)
tree3fbea3f6f396b981f7d4bd3958d0147025d4a191 /lib/libalpm/trans.c
parent195e30e8aa1479bd10bb50de5bd34a69f0a09c9f (diff)
downloadpacman-da648bc24cebcf3fff9073693871183fd95d4c92.tar.gz
pacman-da648bc24cebcf3fff9073693871183fd95d4c92.tar.xz
K. Piche <kevin.piche@cgi.com>
* ALPM_LOG_FUNCTION macro and all the great work to add this macro everywhere
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index 601373d7..12035408 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -43,6 +43,8 @@ pmtrans_t *_alpm_trans_new()
{
pmtrans_t *trans;
+ ALPM_LOG_FUNC;
+
if((trans = (pmtrans_t *)malloc(sizeof(pmtrans_t))) == NULL) {
_alpm_log(PM_LOG_ERROR, _("malloc failure: could not allocate %d bytes"), sizeof(pmtrans_t));
return(NULL);
@@ -65,6 +67,8 @@ void _alpm_trans_free(void *data)
{
pmtrans_t *trans = data;
+ ALPM_LOG_FUNC;
+
if(trans == NULL) {
return;
}
@@ -89,6 +93,8 @@ int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, unsigned int flags,
alpm_trans_cb_event event, alpm_trans_cb_conv conv,
alpm_trans_cb_progress progress)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -104,6 +110,8 @@ int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, unsigned int flags,
int _alpm_trans_sysupgrade(pmtrans_t *trans)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -112,6 +120,8 @@ int _alpm_trans_sysupgrade(pmtrans_t *trans)
int _alpm_trans_addtarget(pmtrans_t *trans, char *target)
{
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
ASSERT(target != NULL, RET_ERR(PM_ERR_WRONG_ARGS, -1));
@@ -151,6 +161,8 @@ int _alpm_trans_prepare(pmtrans_t *trans, alpm_list_t **data)
{
*data = NULL;
+ ALPM_LOG_FUNC;
+
/* Sanity checks */
ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
@@ -188,6 +200,8 @@ int _alpm_trans_prepare(pmtrans_t *trans, alpm_list_t **data)
int _alpm_trans_commit(pmtrans_t *trans, alpm_list_t **data)
{
+ ALPM_LOG_FUNC;
+
if(data!=NULL)
*data = NULL;