misc: remove %p from debug messages
From libs where suid program may be executed by non-root user. Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
117d079199
commit
63c9c05d35
|
@ -380,8 +380,7 @@ static blkid_partlist partitions_init_data(struct blkid_chain *chn)
|
|||
|
||||
reset_partlist(ls);
|
||||
|
||||
DBG(LOWPROBE, ul_debug("parts: initialized partitions list (%p, size=%d)",
|
||||
ls, ls->nparts_max));
|
||||
DBG(LOWPROBE, ul_debug("parts: initialized partitions list (size=%d)", ls->nparts_max));
|
||||
return ls;
|
||||
}
|
||||
|
||||
|
@ -416,7 +415,7 @@ blkid_parttable blkid_partlist_new_parttable(blkid_partlist ls,
|
|||
list_add_tail(&tab->t_tabs, &ls->l_tabs);
|
||||
|
||||
DBG(LOWPROBE, ul_debug("parts: create a new partition table "
|
||||
"(%p, type=%s, offset=%"PRId64")", tab, type, offset));
|
||||
"(type=%s, offset=%"PRId64")", type, offset));
|
||||
return tab;
|
||||
}
|
||||
|
||||
|
@ -457,9 +456,9 @@ blkid_partition blkid_partlist_add_partition(blkid_partlist ls,
|
|||
par->start = start;
|
||||
par->size = size;
|
||||
|
||||
DBG(LOWPROBE, ul_debug("parts: add partition (%p start=%"
|
||||
PRIu64 ", size=%" PRIu64 ", table=%p)",
|
||||
par, par->start, par->size, tab));
|
||||
DBG(LOWPROBE, ul_debug("parts: add partition (start=%"
|
||||
PRIu64 ", size=%" PRIu64 ")",
|
||||
par->start, par->size));
|
||||
return par;
|
||||
}
|
||||
|
||||
|
@ -666,8 +665,8 @@ int blkid_partitions_do_subprobe(blkid_probe pr, blkid_partition parent,
|
|||
uint64_t sz, off;
|
||||
|
||||
DBG(LOWPROBE, ul_debug(
|
||||
"parts: ----> %s subprobe requested (parent=%p)",
|
||||
id->name, parent));
|
||||
"parts: ----> %s subprobe requested)",
|
||||
id->name));
|
||||
|
||||
if (!pr || !parent || !parent->size)
|
||||
return -EINVAL;
|
||||
|
@ -713,8 +712,8 @@ int blkid_partitions_do_subprobe(blkid_probe pr, blkid_partition parent,
|
|||
blkid_free_probe(prc); /* free cloned prober */
|
||||
|
||||
DBG(LOWPROBE, ul_debug(
|
||||
"parts: <---- %s subprobe done (parent=%p, rc=%d)",
|
||||
id->name, parent, rc));
|
||||
"parts: <---- %s subprobe done (rc=%d)",
|
||||
id->name, rc));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ blkid_probe blkid_new_probe(void)
|
|||
if (!pr)
|
||||
return NULL;
|
||||
|
||||
DBG(LOWPROBE, ul_debug("allocate a new probe %p", pr));
|
||||
DBG(LOWPROBE, ul_debug("allocate a new probe"));
|
||||
|
||||
/* initialize chains */
|
||||
for (i = 0; i < BLKID_NCHAINS; i++) {
|
||||
|
@ -251,7 +251,7 @@ void blkid_free_probe(blkid_probe pr)
|
|||
blkid_probe_reset_values(pr);
|
||||
blkid_free_probe(pr->disk_probe);
|
||||
|
||||
DBG(LOWPROBE, ul_debug("free probe %p", pr));
|
||||
DBG(LOWPROBE, ul_debug("free probe"));
|
||||
free(pr);
|
||||
}
|
||||
|
||||
|
@ -561,8 +561,8 @@ static struct blkid_bufinfo *read_buffer(blkid_probe pr, uint64_t real_off, uint
|
|||
bf->off = real_off;
|
||||
INIT_LIST_HEAD(&bf->bufs);
|
||||
|
||||
DBG(LOWPROBE, ul_debug("\tread %p: off=%"PRIu64" len=%"PRIu64"",
|
||||
bf->data, real_off, len));
|
||||
DBG(LOWPROBE, ul_debug("\tread: off=%"PRIu64" len=%"PRIu64"",
|
||||
real_off, len));
|
||||
|
||||
ret = read(pr->fd, bf->data, len);
|
||||
if (ret != (ssize_t) len) {
|
||||
|
@ -592,8 +592,8 @@ static struct blkid_bufinfo *get_cached_buffer(blkid_probe pr, uint64_t off, uin
|
|||
list_entry(p, struct blkid_bufinfo, bufs);
|
||||
|
||||
if (real_off >= x->off && real_off + len <= x->off + x->len) {
|
||||
DBG(BUFFER, ul_debug("\treuse %p: off=%"PRIu64" len=%"PRIu64" (for off=%"PRIu64" len=%"PRIu64")",
|
||||
x->data, x->off, x->len, real_off, len));
|
||||
DBG(BUFFER, ul_debug("\treuse: off=%"PRIu64" len=%"PRIu64" (for off=%"PRIu64" len=%"PRIu64")",
|
||||
x->off, x->len, real_off, len));
|
||||
return x;
|
||||
}
|
||||
}
|
||||
|
@ -625,8 +625,8 @@ static int hide_buffer(blkid_probe pr, uint64_t off, uint64_t len)
|
|||
|
||||
data = real_off ? x->data + (real_off - x->off) : x->data;
|
||||
|
||||
DBG(BUFFER, ul_debug("\thidding %p: off=%"PRIu64" len=%"PRIu64,
|
||||
x->data, off, len));
|
||||
DBG(BUFFER, ul_debug("\thidding: off=%"PRIu64" len=%"PRIu64,
|
||||
off, len));
|
||||
memset(data, 0, len);
|
||||
ct++;
|
||||
}
|
||||
|
@ -712,7 +712,7 @@ int blkid_probe_reset_buffers(blkid_probe pr)
|
|||
if (list_empty(&pr->buffers))
|
||||
return 0;
|
||||
|
||||
DBG(BUFFER, ul_debug("Resetting probing buffers pr=%p", pr));
|
||||
DBG(BUFFER, ul_debug("Resetting probing buffers"));
|
||||
|
||||
while (!list_empty(&pr->buffers)) {
|
||||
struct blkid_bufinfo *bf = list_entry(pr->buffers.next,
|
||||
|
@ -721,8 +721,8 @@ int blkid_probe_reset_buffers(blkid_probe pr)
|
|||
len += bf->len;
|
||||
list_del(&bf->bufs);
|
||||
|
||||
DBG(BUFFER, ul_debug(" remove buffer: %p [off=%"PRIu64", len=%"PRIu64"]",
|
||||
bf->data, bf->off, bf->len));
|
||||
DBG(BUFFER, ul_debug(" remove buffer: [off=%"PRIu64", len=%"PRIu64"]",
|
||||
bf->off, bf->len));
|
||||
free(bf);
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,7 @@ static void blkid_probe_reset_values(blkid_probe pr)
|
|||
if (list_empty(&pr->values))
|
||||
return;
|
||||
|
||||
DBG(LOWPROBE, ul_debug("resetting results pr=%p", pr));
|
||||
DBG(LOWPROBE, ul_debug("resetting results"));
|
||||
|
||||
while (!list_empty(&pr->values)) {
|
||||
struct blkid_prval *v = list_entry(pr->values.next,
|
||||
|
@ -964,9 +964,9 @@ int blkid_probe_get_dimension(blkid_probe pr, uint64_t *off, uint64_t *size)
|
|||
int blkid_probe_set_dimension(blkid_probe pr, uint64_t off, uint64_t size)
|
||||
{
|
||||
DBG(LOWPROBE, ul_debug(
|
||||
"changing probing area pr=%p: size=%"PRIu64", off=%"PRIu64" "
|
||||
"changing probing area: size=%"PRIu64", off=%"PRIu64" "
|
||||
"-to-> size=%"PRIu64", off=%"PRIu64"",
|
||||
pr, pr->size, pr->off, size, off));
|
||||
pr->size, pr->off, size, off));
|
||||
|
||||
pr->off = off;
|
||||
pr->size = size;
|
||||
|
@ -1029,7 +1029,7 @@ int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id,
|
|||
|
||||
static inline void blkid_probe_start(blkid_probe pr)
|
||||
{
|
||||
DBG(LOWPROBE, ul_debug("%p: start probe", pr));
|
||||
DBG(LOWPROBE, ul_debug("start probe"));
|
||||
pr->cur_chain = NULL;
|
||||
pr->prob_flags = 0;
|
||||
blkid_probe_set_wiper(pr, 0, 0);
|
||||
|
@ -1037,7 +1037,7 @@ static inline void blkid_probe_start(blkid_probe pr)
|
|||
|
||||
static inline void blkid_probe_end(blkid_probe pr)
|
||||
{
|
||||
DBG(LOWPROBE, ul_debug("%p: end probe", pr));
|
||||
DBG(LOWPROBE, ul_debug("end probe"));
|
||||
pr->cur_chain = NULL;
|
||||
pr->prob_flags = 0;
|
||||
blkid_probe_set_wiper(pr, 0, 0);
|
||||
|
|
|
@ -185,8 +185,6 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/*DBG(FS, ul_debugobj(dest, "copy from %p", src));*/
|
||||
|
||||
dest->id = src->id;
|
||||
dest->parent = src->parent;
|
||||
dest->devno = src->devno;
|
||||
|
@ -299,8 +297,6 @@ void *mnt_fs_get_userdata(struct libmnt_fs *fs)
|
|||
{
|
||||
if (!fs)
|
||||
return NULL;
|
||||
|
||||
/*DBG(FS, ul_debugobj(fs, "get userdata [%p]", fs->userdata));*/
|
||||
return fs->userdata;
|
||||
}
|
||||
|
||||
|
@ -317,8 +313,6 @@ int mnt_fs_set_userdata(struct libmnt_fs *fs, void *data)
|
|||
{
|
||||
if (!fs)
|
||||
return -EINVAL;
|
||||
|
||||
/*DBG(FS, ul_debugobj(fs, "set userdata [%p]", fs->userdata));*/
|
||||
fs->userdata = data;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1477,7 +1471,7 @@ int mnt_fs_print_debug(struct libmnt_fs *fs, FILE *file)
|
|||
{
|
||||
if (!fs || !file)
|
||||
return -EINVAL;
|
||||
fprintf(file, "------ fs: %p\n", fs);
|
||||
fprintf(file, "------ fs\n");
|
||||
fprintf(file, "source: %s\n", mnt_fs_get_source(fs));
|
||||
fprintf(file, "target: %s\n", mnt_fs_get_target(fs));
|
||||
fprintf(file, "fstype: %s\n", mnt_fs_get_fstype(fs));
|
||||
|
|
|
@ -237,9 +237,9 @@ int mnt_diff_tables(struct libmnt_tabdiff *df, struct libmnt_table *old_tab,
|
|||
if (!no && !nn) /* both tables are empty */
|
||||
return 0;
|
||||
|
||||
DBG(DIFF, ul_debugobj(df, "analyze new=%p (%d entries), "
|
||||
"old=%p (%d entries)",
|
||||
new_tab, nn, old_tab, no));
|
||||
DBG(DIFF, ul_debugobj(df, "analyze new (%d entries), "
|
||||
"old (%d entries)",
|
||||
nn, no));
|
||||
|
||||
mnt_reset_iter(&itr, MNT_ITER_FORWARD);
|
||||
|
||||
|
|
|
@ -169,8 +169,8 @@ int mnt_update_set_fs(struct libmnt_update *upd, unsigned long mountflags,
|
|||
return -EINVAL;
|
||||
|
||||
DBG(UPDATE, ul_debugobj(upd,
|
||||
"resetting FS [fs=0x%p, target=%s, flags=0x%08lx]",
|
||||
fs, target, mountflags));
|
||||
"resetting FS [target=%s, flags=0x%08lx]",
|
||||
target, mountflags));
|
||||
if (fs) {
|
||||
DBG(UPDATE, ul_debugobj(upd, "FS template:"));
|
||||
DBG(UPDATE, mnt_fs_print_debug(fs, stderr));
|
||||
|
|
|
@ -252,6 +252,6 @@ int scols_cell_copy_content(struct libscols_cell *dest,
|
|||
if (!rc)
|
||||
dest->userdata = src->userdata;
|
||||
|
||||
DBG(CELL, ul_debugobj(src, "copy into %p", dest));
|
||||
DBG(CELL, ul_debugobj(src, "copy"));
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ struct libscols_column *scols_copy_column(const struct libscols_column *cl)
|
|||
if (!ret)
|
||||
return NULL;
|
||||
|
||||
DBG(COL, ul_debugobj(cl, "copy to %p", ret));
|
||||
DBG(COL, ul_debugobj(cl, "copy"));
|
||||
|
||||
if (scols_column_set_color(ret, cl->color))
|
||||
goto err;
|
||||
|
|
|
@ -217,7 +217,7 @@ int scols_line_remove_child(struct libscols_line *ln, struct libscols_line *chil
|
|||
if (!ln || !child)
|
||||
return -EINVAL;
|
||||
|
||||
DBG(LINE, ul_debugobj(ln, "remove child %p", child));
|
||||
DBG(LINE, ul_debugobj(ln, "remove child"));
|
||||
|
||||
list_del_init(&child->ln_children);
|
||||
child->parent = NULL;
|
||||
|
@ -241,7 +241,7 @@ int scols_line_add_child(struct libscols_line *ln, struct libscols_line *child)
|
|||
if (!ln || !child)
|
||||
return -EINVAL;
|
||||
|
||||
DBG(LINE, ul_debugobj(ln, "add child %p", child));
|
||||
DBG(LINE, ul_debugobj(ln, "add child"));
|
||||
scols_ref_line(child);
|
||||
scols_ref_line(ln);
|
||||
|
||||
|
@ -503,7 +503,7 @@ struct libscols_line *scols_copy_line(const struct libscols_line *ln)
|
|||
ret->ncells = ln->ncells;
|
||||
ret->seqnum = ln->seqnum;
|
||||
|
||||
DBG(LINE, ul_debugobj(ln, "copy to %p", ret));
|
||||
DBG(LINE, ul_debugobj(ln, "copy"));
|
||||
|
||||
for (i = 0; i < ret->ncells; ++i) {
|
||||
if (scols_cell_copy_content(&ret->cells[i], &ln->cells[i]))
|
||||
|
|
|
@ -185,7 +185,7 @@ int scols_table_add_column(struct libscols_table *tb, struct libscols_column *cl
|
|||
if (cl->flags & SCOLS_FL_TREE)
|
||||
tb->ntreecols++;
|
||||
|
||||
DBG(TAB, ul_debugobj(tb, "add column %p", cl));
|
||||
DBG(TAB, ul_debugobj(tb, "add column"));
|
||||
list_add_tail(&cl->cl_columns, &tb->tb_columns);
|
||||
cl->seqnum = tb->ncols++;
|
||||
cl->table = tb;
|
||||
|
@ -225,7 +225,7 @@ int scols_table_remove_column(struct libscols_table *tb,
|
|||
if (cl->flags & SCOLS_FL_TREE)
|
||||
tb->ntreecols--;
|
||||
|
||||
DBG(TAB, ul_debugobj(tb, "remove column %p", cl));
|
||||
DBG(TAB, ul_debugobj(tb, "remove column"));
|
||||
list_del_init(&cl->cl_columns);
|
||||
tb->ncols--;
|
||||
cl->table = NULL;
|
||||
|
@ -557,7 +557,7 @@ int scols_table_add_line(struct libscols_table *tb, struct libscols_line *ln)
|
|||
return rc;
|
||||
}
|
||||
|
||||
DBG(TAB, ul_debugobj(tb, "add line %p", ln));
|
||||
DBG(TAB, ul_debugobj(tb, "add line"));
|
||||
list_add_tail(&ln->ln_lines, &tb->tb_lines);
|
||||
ln->seqnum = tb->nlines++;
|
||||
scols_ref_line(ln);
|
||||
|
@ -580,7 +580,7 @@ int scols_table_remove_line(struct libscols_table *tb,
|
|||
if (!tb || !ln)
|
||||
return -EINVAL;
|
||||
|
||||
DBG(TAB, ul_debugobj(tb, "remove line %p", ln));
|
||||
DBG(TAB, ul_debugobj(tb, "remove line"));
|
||||
list_del_init(&ln->ln_lines);
|
||||
tb->nlines--;
|
||||
scols_unref_line(ln);
|
||||
|
@ -724,7 +724,7 @@ struct libscols_table *scols_copy_table(struct libscols_table *tb)
|
|||
if (!ret)
|
||||
return NULL;
|
||||
|
||||
DBG(TAB, ul_debugobj(tb, "copy into %p", ret));
|
||||
DBG(TAB, ul_debugobj(tb, "copy"));
|
||||
|
||||
if (tb->symbols)
|
||||
scols_table_set_symbols(ret, tb->symbols);
|
||||
|
@ -838,14 +838,14 @@ int scols_table_set_symbols(struct libscols_table *tb,
|
|||
|
||||
/* remove old */
|
||||
if (tb->symbols) {
|
||||
DBG(TAB, ul_debugobj(tb, "remove symbols %p reference", tb->symbols));
|
||||
DBG(TAB, ul_debugobj(tb, "remove symbols reference"));
|
||||
scols_unref_symbols(tb->symbols);
|
||||
tb->symbols = NULL;
|
||||
}
|
||||
|
||||
/* set new */
|
||||
if (sy) { /* ref user defined */
|
||||
DBG(TAB, ul_debugobj(tb, "set symbols so %p", sy));
|
||||
DBG(TAB, ul_debugobj(tb, "set symbols"));
|
||||
tb->symbols = sy;
|
||||
scols_ref_symbols(sy);
|
||||
}
|
||||
|
|
|
@ -441,10 +441,6 @@ static int print_data(struct libscols_table *tb,
|
|||
assert(tb);
|
||||
assert(cl);
|
||||
|
||||
DBG(TAB, ul_debugobj(tb,
|
||||
" -> data, column=%p, line=%p, cell=%p, buff=%p",
|
||||
cl, ln, ce, buf));
|
||||
|
||||
data = buffer_get_data(buf);
|
||||
if (!data)
|
||||
data = "";
|
||||
|
@ -720,7 +716,7 @@ static int print_line(struct libscols_table *tb,
|
|||
|
||||
assert(ln);
|
||||
|
||||
DBG(TAB, ul_debugobj(tb, "printing line, line=%p, buff=%p", ln, buf));
|
||||
DBG(TAB, ul_debugobj(tb, "printing line"));
|
||||
|
||||
/* regular line */
|
||||
scols_reset_iter(&itr, SCOLS_ITER_FORWARD);
|
||||
|
|
Loading…
Reference in New Issue