-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Labels
Component: Userspaceuser space functionalityuser space functionalityStatus: StaleNo recent activity for issueNo recent activity for issueStatus: UnderstoodThe root cause of the issue is knownThe root cause of the issue is knownType: DefectIncorrect behavior (e.g. crash, hang)Incorrect behavior (e.g. crash, hang)good first issueIndicates a good issue for first-time contributorsIndicates a good issue for first-time contributors
Description
I was using -A to work around an assertion failure for zdb and keep going but it wouldn't work (but -AA would).
The reason was the following looking in main()
of zdb.c
:
int dump_all = 1;
int verbose = 0;
...
while ((c = getopt(argc, argv,
"AbcCdDeEFGhiI:klLmMo:Op:PqRsSt:uU:vVx:XY")) != -1) {
switch (c) {
...
case 'A':
...
dump_opt[c]++; // <---- dump_opt['A'] set to 1
break;
...
default:
usage();
break;
}
}
...
if (dump_all)
verbose = MAX(verbose, 1); // by default verbose is 1
...
for (c = 0; c < 256; c++) {
if (dump_all && strchr("AeEFklLOPRSX", c) == NULL) // we skip this if clause
dump_opt[c] = 1;
if (dump_opt[c]) // we do go into this one though
dump_opt[c] += verbose; // now dump_opt['A'] is 2
}
aok = (dump_opt['A'] == 1) || (dump_opt['A'] > 2); // aok is false because dump_opt['A'] is 2.
...
Metadata
Metadata
Assignees
Labels
Component: Userspaceuser space functionalityuser space functionalityStatus: StaleNo recent activity for issueNo recent activity for issueStatus: UnderstoodThe root cause of the issue is knownThe root cause of the issue is knownType: DefectIncorrect behavior (e.g. crash, hang)Incorrect behavior (e.g. crash, hang)good first issueIndicates a good issue for first-time contributorsIndicates a good issue for first-time contributors