abidiff: Fix handling of linux-kernel-mode
authorPetr Pavlu <petr.pavlu@suse.com>
Tue, 3 Jan 2023 10:28:55 +0000 (11:28 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 5 Jan 2023 12:07:30 +0000 (13:07 +0100)
commit250346cacea6e7f47efe93bad389d3447a0021dd
treee58460f8d370ee3c1f0f1c81a9ec71d0e012adcc
parent24a219d905ad61710d2a04a1a5e94bb15d3687dd
abidiff: Fix handling of linux-kernel-mode

This fixes 08e76022 ("Support Linux Kernel ABI whitelist files") and
8fd02e0a ("Use the CTF reader by default when applicable").

The first commit removed handling of option --no-linux-kernel-mode. The
second one stopped passing opts.linux_kernel_mode down to the library
which also caused changing the default linux-kernel-mode of abidiff from
true to false. Both changes look unintentional as they are not mentioned
in either commit message.

Restore handling of the linux-kernel-mode in abidiff to match what is
described in doc/manuals/abidiff.rst and make it again consistent with
abidw.

* tools/abidiff.cc (parse_command_line): Recognize
  --no-linux-kernel-mode.
  (main): Pass opts.linux_kernel_mode down to the library.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
tools/abidiff.cc