X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Fopkg_state.c;h=f094de7a5385a5d0127475988beb61127e6e9193;hp=d83b96b22e26bf8d6d38f0bed4b80b0703a72538;hb=f0f991d840b00e43f09bfa363ac1e7350098c180;hpb=db0e8730f2e7b2c584c4c16bf8c32170c5b372e4 diff --git a/libopkg/opkg_state.c b/libopkg/opkg_state.c index d83b96b..f094de7 100644 --- a/libopkg/opkg_state.c +++ b/libopkg/opkg_state.c @@ -39,7 +39,7 @@ static opkg_state_t opkg_state = 0; static char *opkg_state_data = NULL; void -opkg_set_current_state (opkg_state_t state, const char *data) +opkg_set_current_state (opkg_conf_t *conf, opkg_state_t state, const char *data) { if (opkg_state_data) free (opkg_state_data); @@ -60,7 +60,10 @@ opkg_set_current_state (opkg_state_t state, const char *data) } - printf ("opkg state set to %s: %s\n", state_strings[state], data); + if (data == NULL) + opkg_message (conf, OPKG_INFO, "opkg state set to %s\n", state_strings[state]); + else + opkg_message (conf, OPKG_INFO, "opkg state set to %s: %s\n", state_strings[state], data); } void