partname: Correct fstools_partname_fallback_scan comparison
authorBrian Norris <computersforpeace@gmail.com>
Thu, 26 Jan 2023 06:18:15 +0000 (22:18 -0800)
committerChristian Marangi <ansuelsmth@gmail.com>
Sat, 4 Feb 2023 18:45:58 +0000 (19:45 +0100)
commit14d535e4485dc030deecbba9ab493c379df5c237
tree7534ff8cdee7ab959cd7e2e0f30de475ccee0c62
parent1ea5855e980cd88766dd9f615e78e7dd6edfbb74
partname: Correct fstools_partname_fallback_scan comparison

Commit 1ea5855e980c ("partname: Introduce fstools_partname_fallback_scan
option") had two problems:

1. The strcmp() aborted when the param *matched* 1; we wanted the
   inverse
2. It was too aggressive about skipping the fallback behavior. For
   devices that had no root= parameter, they would always attempt the
   fallback scan.

Fix both of those.

Fixes: 1ea5855e980c ("partname: Introduce fstools_partname_fallback_scan option")
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
[ add extra spacing between function ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
libfstools/partname.c