[Libosinfo] [libosinfo PATCH v2 0/7] Add osinfo_db_identify_tree() API

Fabiano Fidêncio fidencio at redhat.com
Wed Jun 26 11:27:03 UTC 2019


Similarly to osinfo_db_identify_media(), let's add
osinfo_db_identify_tree() API and be more consistent on how the apps
should check whether a media/tree is known.

More than that, this simplifies a little bit the code on the apps side.

Together with this change, let's also deprecate
osinfo_db_guess_os_from_tree() and "force" the apps to use the new and
simpler API for tree detection.

Changes since v1:
- A few patches touching tree, in order to:
  - Remove some useless properties;
  - Set "has-treeinfo" as FALSE by default;
  - Add treeinfo properties;
  - Fixing treeinfo APIs' documentation;
- A test has been added for osinfo_db_identify_tree()
- The osinfo_db_guess_os_from_tree() test has been removed, as the
  function is now deprecated

Fabiano Fidêncio (7):
  tree: Remove useless properties
  tree: Don't set "has-treeinfo" property's default to TRUE
  tree: Add treeinfo-* properties
  tree: Fix treeinfo APIs' documentation
  db: Add identify_tree() API
  tools,detect: Use osinfo_db_identify_tree()
  db: deprecate osinfo_db_guess_os_from_tree()

 osinfo/libosinfo.syms |   2 +
 osinfo/osinfo_db.c    | 140 ++++++++++++++++++++++++++++++++++++----
 osinfo/osinfo_db.h    |   3 +
 osinfo/osinfo_tree.c  | 146 ++++++++++++++++++++----------------------
 tests/test-db.c       |  21 ++----
 tools/osinfo-detect.c |  21 +++---
 6 files changed, 219 insertions(+), 114 deletions(-)

-- 
2.21.0




More information about the Libosinfo mailing list