Commit 5d3b2c4e authored by hpi1's avatar hpi1

Fixed debug message format strings

parent c5224a9c
......@@ -35,7 +35,7 @@ uint8_t *configfile_record(CONFIGFILE *kf, enum configfile_types type, uint16_t
}
if (kf->buf[pos] == type) {
DEBUG(DBG_CONFIGFILE, "Retrieved CONFIGFILE record 0x%02x (0x%08x)\n", type, kf->buf + pos + 10);
DEBUG(DBG_CONFIGFILE, "Retrieved CONFIGFILE record 0x%02x (%p)\n", type, kf->buf + pos + 10);
return kf->buf + pos + 10; // only return ptr to first byte of entry
}
......@@ -51,7 +51,7 @@ CONFIGFILE *configfile_open(const char *path)
FILE_H *fp = NULL;
CONFIGFILE *kf = malloc(sizeof(CONFIGFILE));
DEBUG(DBG_CONFIGFILE, "Opening configfile %s... (0x%08x)\n", path, kf);
DEBUG(DBG_CONFIGFILE, "Opening configfile %s... (%p)\n", path, kf);
if ((fp = file_open(path, "rb"))) {
file_seek(fp, 0, SEEK_END);
......@@ -72,7 +72,7 @@ CONFIGFILE *configfile_open(const char *path)
void configfile_close(CONFIGFILE *kf)
{
DEBUG(DBG_CONFIGFILE, "configfile closed (0x%08x)\n", kf);
DEBUG(DBG_CONFIGFILE, "configfile closed (%p)\n", kf);
X_FREE(kf->buf);
X_FREE(kf);
......
......@@ -25,7 +25,7 @@ void dir_close_posix(DIR_H *dir)
if (dir) {
closedir((DIR *)dir->internal);
DEBUG(DBG_DIR, "Closed POSIX dir (0x%08x)\n", dir);
DEBUG(DBG_DIR, "Closed POSIX dir (%p)\n", dir);
X_FREE(dir);
}
......@@ -51,7 +51,7 @@ DIR_H *dir_open_posix(const char* dirname)
DIR *dp = NULL;
DIR_H *dir = malloc(sizeof(DIR_H));
DEBUG(DBG_CONFIGFILE, "Opening POSIX dir %s... (0x%08x)\n", dirname, dir);
DEBUG(DBG_DIR, "Opening POSIX dir %s... (%p)\n", dirname, dir);
dir->close = dir_close_posix;
dir->read = dir_read_posix;
......@@ -61,7 +61,7 @@ DIR_H *dir_open_posix(const char* dirname)
return dir;
}
DEBUG(DBG_DIR, "Error opening dir! (0x%08x)\n", dir);
DEBUG(DBG_DIR, "Error opening dir! (%p)\n", dir);
X_FREE(dir);
......
......@@ -46,7 +46,7 @@ void *dl_dlopen ( const char* name )
DEBUG(DBG_BDPLUS, "searching for library '%s' ...\n", path);
result = dlopen(path, RTLD_LAZY);
if (!result) {
DEBUG(DBG_FILE | DBG_CRIT, "can't open library '%s'\n", path);
DEBUG(DBG_FILE | DBG_CRIT, "can't open library '%s': %s\n", path, dlerror());
}
free(path);
return result;
......@@ -57,7 +57,7 @@ void *dl_dlsym ( void* handle, const char* symbol )
void *result = dlsym(handle, symbol);
if (!result) {
DEBUG(DBG_FILE | DBG_CRIT, "dlsym(%p, '%s') failed\n", handle, symbol);
DEBUG(DBG_FILE | DBG_CRIT, "dlsym(%p, '%s') failed: %s\n", handle, symbol, dlerror());
}
return result;
......
......@@ -29,7 +29,7 @@ void file_close_linux(FILE_H *file)
if (file) {
fclose((FILE *)file->internal);
DEBUG(DBG_FILE, "Closed LINUX file (0x%08x)\n", file);
DEBUG(DBG_FILE, "Closed LINUX file (%p)\n", file);
X_FREE(file);
}
......@@ -65,7 +65,7 @@ FILE_H *file_open_linux(const char* filename, const char *mode)
FILE *fp = NULL;
FILE_H *file = malloc(sizeof(FILE_H));
DEBUG(DBG_CONFIGFILE, "Opening LINUX file %s... (0x%08x)\n", filename, file);
DEBUG(DBG_FILE, "Opening LINUX file %s... (%p)\n", filename, file);
file->close = file_close_linux;
file->seek = file_seek_linux;
file->read = file_read_linux;
......@@ -79,7 +79,7 @@ FILE_H *file_open_linux(const char* filename, const char *mode)
return file;
}
DEBUG(DBG_FILE, "Error opening file! (0x%08x)\n", file);
DEBUG(DBG_FILE, "Error opening file! (%p)\n", file);
X_FREE(file);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment