HomeFreeBSD

ddb: reliably fail with ambiguous commands

Description

ddb: reliably fail with ambiguous commands

db_cmd_match had an even/odd bug, where if a third command was partially
matched (or any odd number greater than one) the search result would be
set back from CMD_AMBIGUOUS to CMD_FOUND, causing the last command in
the list to be executed instead of failing the match.

Reported by: mlaier
Reviewed by: markj, mlaier, vangyzen
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28659

(cherry picked from commit d85c9cef1380f4f135aee95ad8c1f4d3eca74c5b)

Details

Provenance
rlibbyAuthored on Feb 24 2021, 11:56 PM
Reviewer
markj
Differential Revision
D28659: ddb: reliably fail with ambiguous commands
Parents
rG65d3d8496536: ofed: quiet gcc -Wint-in-bool-context
Branches
Unknown
Tags
Unknown