#if !defined(FLOG)
#define DbgPrint(format, arg...) SECURE_LOGD("[\e[32m%s/%s\e[0m:%d] " format, basename(__FILE__), __func__, __LINE__, ##arg)
#define ErrPrint(format, arg...) SECURE_LOGE("[\e[32m%s/%s\e[0m:%d] " format, basename(__FILE__), __func__, __LINE__, ##arg)
+#define ErrPrintWithConsole(format, arg...) do { fprintf(stderr, "[%s/%s:%d] " format, basename(__FILE__), __func__, __LINE__, ##arg); SECURE_LOGE("[\e[32m%s/%s\e[0m:%d] " format, basename(__FILE__), __func__, __LINE__, ##arg); } while (0)
#endif
/* End of a file */
{
int ret;
+ ErrPrintWithConsole("Remove old package info: appid(%s), pkgid(%s)\n", appid, pkgid);
+
ret = db_remove_box_size((char *)pkgid);
if (ret < 0) {
ErrPrint("Remove box size: %d\n", ret);
if (!s_info.handle) {
if (db_init() < 0) {
- ErrPrint("Failed to init DB\n");
+ ErrPrintWithConsole("Failed to init DB\n");
return -EIO;
}
}
int ret;
if (!s_info.handle) {
- ErrPrint("Failed to init DB\n");
+ ErrPrintWithConsole("Failed to init DB\n");
return -EIO;
}
node = xmlDocGetRootElement(docPtr);
if (!node) {
- ErrPrint("Invalid document\n");
+ ErrPrintWithConsole("Invalid document\n");
return -EINVAL;
}