libfstools: avoid false positives when matching devices and volumes
authorJo-Philipp Wich <jo@mein.io>
Wed, 27 Mar 2019 07:55:07 +0000 (08:55 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 31 Mar 2019 14:09:40 +0000 (16:09 +0200)
commit9b36dc25dd31197681dfcbe4e83879a9b885f451
treee32669cace3e9c173561fdb0a23e3e14dcb77d38
parentff1ded63c51e84e239fb422ac8b9d15251d1221f
libfstools: avoid false positives when matching devices and volumes

Revise matching code using strncmp() in order to avoid returning wrong
items, e.g. /dev/sda1 when /dev/sda was requested.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2196
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libfstools/find.c
libfstools/ubi.c