tools-utils: Support kernel stablelist
authorDodji Seketeli <dodji@redhat.com>
Wed, 15 Feb 2023 15:26:20 +0000 (16:26 +0100)
committerDodji Seketeli <dodji@redhat.com>
Thu, 2 Mar 2023 17:31:43 +0000 (18:31 +0100)
Up until now, a kernel whitelist was expected to be a ini file with a
section having a name ending with the word "whitelist".  Nowadays,
they are called "stablelist", so the name of the section ends up with
"stablelist".  This patch makes
gen_suppr_spec_from_kernel_abi_whitelists support that.

* src/abg-tools-utils.cc
(gen_suppr_spec_from_kernel_abi_whitelists): Support section name
that ends with the word 'stablelist'.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-tools-utils.cc

index 85719cdc69ae965ee1730ea39cb2b3d8d2964f7d..94dd8d0504187a8dfe63496e8fd521f85884b302 100644 (file)
@@ -2151,7 +2151,8 @@ gen_suppr_spec_from_kernel_abi_whitelists
           ++section_iter)
        {
          std::string section_name = (*section_iter)->get_name();
-         if (!string_ends_with(section_name, "whitelist"))
+         if (!string_ends_with(section_name, "whitelist")
+             && !string_ends_with(section_name, "stablelist"))
            continue;
          for (ini::config::properties_type::const_iterator
                   prop_iter = (*section_iter)->get_properties().begin(),