diff options
-rw-r--r-- | dselect/main.cc | 7 | ||||
-rw-r--r-- | dselect/pkgcmds.cc | 12 | ||||
-rw-r--r-- | dselect/pkgdepcon.cc | 2 | ||||
-rw-r--r-- | dselect/pkgdisplay.cc | 13 | ||||
-rw-r--r-- | dselect/pkglist.cc | 14 | ||||
-rw-r--r-- | dselect/pkgtop.cc | 2 | ||||
-rw-r--r-- | lib/dpkg/compress.c | 2 | ||||
-rw-r--r-- | lib/dpkg/parse.c | 2 | ||||
-rw-r--r-- | lib/dpkg/pkg-db.c | 2 | ||||
-rw-r--r-- | lib/dpkg/varbuf.c | 4 | ||||
-rw-r--r-- | src/help.c | 3 | ||||
-rw-r--r-- | src/main.c | 2 |
12 files changed, 39 insertions, 26 deletions
diff --git a/dselect/main.cc b/dselect/main.cc index 39a9c37f6..12c715ab8 100644 --- a/dselect/main.cc +++ b/dselect/main.cc @@ -463,7 +463,10 @@ urqresult urq_menu(void) { dme(cursor,0); cursor+= entries-1; cursor %= entries; dme(cursor,1); } else if (c=='\n' || c=='\r' || c==KEY_ENTER) { clear(); refresh(); - switch (menuentries[cursor].fn()) { /* FIXME: trap errors in urq_... */ + + /* FIXME: trap errors in urq_... */ + urqresult res = menuentries[cursor].fn(); + switch (res) { case urqr_quitmenu: return urqr_quitmenu; case urqr_normal: @@ -471,7 +474,7 @@ urqresult urq_menu(void) { case urqr_fail: break; default: - internerr("unknown menufn"); + internerr("unknown menufn %d", res); } refreshmenu(); dme(cursor,1); } else if (c==C('l')) { diff --git a/dselect/pkgcmds.cc b/dselect/pkgcmds.cc index 275d59599..3fe71c4df 100644 --- a/dselect/pkgcmds.cc +++ b/dselect/pkgcmds.cc @@ -44,7 +44,7 @@ packagelist::affectedmatches(struct pkginfo *pkg, struct pkginfo *comparewith) { case sso_unsorted: break; default: - internerr("unknown statsortorder in affectedmatches"); + internerr("unknown statsortorder %d in affectedmatches", statsortorder); } if (comparewith->priority != pkginfo::pri_unset && (comparewith->priority != pkg->priority || @@ -168,7 +168,8 @@ void packagelist::kd_swapstatorder() { case sso_avail: statsortorder= sso_state; break; case sso_state: statsortorder= sso_unsorted; break; case sso_unsorted: statsortorder= sso_avail; break; - default: internerr("unknown statsort in kd_swapstatorder"); + default: + internerr("unknown statsort %d in kd_swapstatorder", statsortorder); } resortredisplay(); } @@ -179,7 +180,8 @@ void packagelist::kd_swaporder() { case so_section: sortorder= so_alpha; break; case so_alpha: sortorder= so_priority; break; case so_unsorted: return; - default: internerr("unknown sort in kd_swaporder"); + default: + internerr("unknown sort %d in kd_swaporder", sortorder); } resortredisplay(); } @@ -216,7 +218,9 @@ void packagelist::kd_versiondisplay() { case vdo_both: versiondisplayopt= vdo_none; break; case vdo_none: versiondisplayopt= vdo_available; break; case vdo_available: versiondisplayopt= vdo_both; break; - default: internerr("unknown versiondisplayopt in kd_versiondisplay"); + default: + internerr("unknown versiondisplayopt %d in kd_versiondisplay", + versiondisplayopt); } setwidths(); leftofscreen= 0; diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc index 9290dfb1d..eb0a75cdc 100644 --- a/dselect/pkgdepcon.cc +++ b/dselect/pkgdepcon.cc @@ -356,7 +356,7 @@ int packagelist::resolvedepcon(dependency *depends) { return 0; default: - internerr("unknown deptype"); + internerr("unknown deptype %d", depends->type); } /* never reached, make gcc happy */ return 1; diff --git a/dselect/pkgdisplay.cc b/dselect/pkgdisplay.cc index cfd9b2755..8c2412e9e 100644 --- a/dselect/pkgdisplay.cc +++ b/dselect/pkgdisplay.cc @@ -180,7 +180,7 @@ void packagelist::setwidths() { description_column= versionavailable_column + versionavailable_width + gap_width; break; default: - internerr("unknown versiondisplayopt in setwidths"); + internerr("unknown versiondisplayopt %d in setwidths", versiondisplayopt); } total_width= TOTAL_LIST_WIDTH; @@ -215,7 +215,8 @@ void packagelist::redrawtitle() { waddnstr(titlewin, _(" (status, section)"), xmax-x); break; default: - internerr("bad statsort in redrawtitle/so_section"); + internerr("bad statsort %d in redrawtitle/so_section", + statsortorder); } break; case so_priority: @@ -230,7 +231,8 @@ void packagelist::redrawtitle() { waddnstr(titlewin, _(" (status, priority)"), xmax-x); break; default: - internerr("bad statsort in redrawtitle/so_priority"); + internerr("bad statsort %d in redrawtitle/so_priority", + statsortorder); } break; case so_alpha: @@ -245,13 +247,14 @@ void packagelist::redrawtitle() { waddnstr(titlewin, _(" (by status)"), xmax-x); break; default: - internerr("bad statsort in redrawtitle/so_priority"); + internerr("bad statsort %d in redrawtitle/so_priority", + statsortorder); } break; case so_unsorted: break; default: - internerr("bad sort in redrawtitle"); + internerr("bad sort %d in redrawtitle", sortorder); } } const char *helpstring; diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc index 855c87d70..f150648e9 100644 --- a/dselect/pkglist.cc +++ b/dselect/pkglist.cc @@ -47,7 +47,7 @@ int packagelist::compareentries(const struct perpackagestate *a, case sso_unsorted: break; default: - internerr("unknown statsortorder in compareentries"); + internerr("unknown statsortorder %d in compareentries", statsortorder); } const char *asection= a->pkg->section; @@ -80,7 +80,7 @@ int packagelist::compareentries(const struct perpackagestate *a, return c_name; case so_unsorted: default: - internerr("unsorted or unknown in compareentries"); + internerr("unsorted or unknown sort %d in compareentries", sortorder); } /* never reached, make gcc happy */ return 1; @@ -214,7 +214,8 @@ void packagelist::ensurestatsortinfo() { } break; default: - internerr("unknown stat in ensurestatsortinfo sso_avail"); + internerr("unknown status %d in ensurestatsortinfo sso_avail", + pkg->status); } debug(dbg_general, "packagelist[%p]::ensurestatsortinfos() i=%d ssavail=%d", @@ -247,7 +248,8 @@ void packagelist::ensurestatsortinfo() { table[index]->ssstate= sss_installed; break; default: - internerr("unknown stat in ensurestatsortinfo sso_state"); + internerr("unknown status %d in ensurestatsortinfo sso_state", + table[index]->pkg->status); } debug(dbg_general, "packagelist[%p]::ensurestatsortinfos() i=%d ssstate=%d", @@ -256,7 +258,7 @@ void packagelist::ensurestatsortinfo() { calcsssdone= 1; break; default: - internerr("unknown statsortorder in ensurestatsortinfo"); + internerr("unknown statsortorder %d in ensurestatsortinfo", statsortorder); } } @@ -301,7 +303,7 @@ void packagelist::sortmakeheads() { case sso_unsorted: break; default: - internerr("unknown statsortorder in sortmakeheads"); + internerr("unknown statsortorder %d in sortmakeheads", statsortorder); } int prioritydiff= (!lastpkg || diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc index 45d82b764..900763819 100644 --- a/dselect/pkgtop.cc +++ b/dselect/pkgtop.cc @@ -71,7 +71,7 @@ int packagelist::describemany(char buf[], const char *prioritystring, case sso_unsorted: break; default: - internerr("unknown statsortrder in describemany all"); + internerr("unknown statsortrder %d in describemany all", statsortorder); } if (!prioritystring) { diff --git a/lib/dpkg/compress.c b/lib/dpkg/compress.c index 2f4d302cb..673bc7db0 100644 --- a/lib/dpkg/compress.c +++ b/lib/dpkg/compress.c @@ -462,7 +462,7 @@ compressor_get(enum compressor_type type) const enum compressor_type max_type = array_count(compressor_array); if (type < 0 || type >= max_type) - internerr("compressor_type is out of range"); + internerr("compressor_type %d is out of range", type); return compressor_array[type]; } diff --git a/lib/dpkg/parse.c b/lib/dpkg/parse.c index 4b6fe91cf..f301ab4fd 100644 --- a/lib/dpkg/parse.c +++ b/lib/dpkg/parse.c @@ -348,7 +348,7 @@ parse_find_set_slot(struct parsedb_state *ps, "instances present")); if (pkgset_installed_instances(set) != count.total) - internerr("in-core pkgset %s with inconsistent number of instances", + internerr("in-core pkgset '%s' with inconsistent number of instances", set->name); return set; diff --git a/lib/dpkg/pkg-db.c b/lib/dpkg/pkg-db.c index f91d34c7b..79fb9ba71 100644 --- a/lib/dpkg/pkg-db.c +++ b/lib/dpkg/pkg-db.c @@ -138,7 +138,7 @@ pkg_db_get_singleton(struct pkgset *set) if (pkg->status > stat_notinstalled) return pkg; } - internerr("pkgset %s should have one installed instance", set->name); + internerr("pkgset '%s' should have one installed instance", set->name); default: return NULL; } diff --git a/lib/dpkg/varbuf.c b/lib/dpkg/varbuf.c index 575e5aab4..a6f855108 100644 --- a/lib/dpkg/varbuf.c +++ b/lib/dpkg/varbuf.c @@ -129,7 +129,7 @@ varbuf_grow(struct varbuf *v, size_t need_size) { /* Make sure the varbuf is in a sane state. */ if (v->size < v->used) - internerr("inconsistent varbuf: size(%zu) < used(%zu)", v->size, v->used); + internerr("varbuf used(%zu) > size(%zu)", v->used, v->size); /* Check if we already have enough room. */ if ((v->size - v->used) >= need_size) @@ -144,7 +144,7 @@ varbuf_trunc(struct varbuf *v, size_t used_size) { /* Make sure the caller does not claim more than available. */ if (v->size < used_size) - internerr("varbuf: claimed used(%zu) > size(%zu)", v->used, v->size); + internerr("varbuf new_used(%zu) > size(%zu)", used_size, v->size); v->used = used_size; } diff --git a/src/help.c b/src/help.c index 9618b9b6e..8c818fbea 100644 --- a/src/help.c +++ b/src/help.c @@ -646,7 +646,8 @@ void ensure_pathname_nonexisting(const char *pathname) { execlp(RM, "rm", "-rf", "--", pathname, NULL); ohshite(_("unable to execute %s (%s)"), _("rm command for cleanup"), RM); } - debug(dbg_eachfile,"ensure_pathname_nonexisting running rm -rf"); + debug(dbg_eachfile, "ensure_pathname_nonexisting running rm -rf '%s'", + pathname); subproc_wait_check(pid, "rm cleanup", 0); } diff --git a/src/main.c b/src/main.c index 62a3455b4..43019b96f 100644 --- a/src/main.c +++ b/src/main.c @@ -211,7 +211,7 @@ forcetype_str(char type) case '!': return "[!]"; default: - internerr("unknown force type %c", type); + internerr("unknown force type '%c'", type); } } |