libfstools: fix matching device name
authorDaniel Golle <daniel@makrotopia.org>
Fri, 30 Jun 2017 15:20:22 +0000 (17:20 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 30 Jun 2017 15:20:22 +0000 (17:20 +0200)
commitf038a610bdee22da308a64c9e225de72dd4dd75e
treee29289cb264682f3036b07d7b50820aade33b75d
parentc43ae11e71abf607a1998800f8ced489ec5d1e88
libfstools: fix matching device name

compare strlen()+1 characters to make sure we match the trailing \0 as
well. Otherwise things get fishy when using lvm2, see this example:

/dev/mapper/data: UUID="xxxxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxxxx" MOUNT="/mnt" TYPE="LVM2_member"
/dev/mapper/data-fs: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" LABEL="xxxxxxxx" VERSION="1.0" MOUNT="/mnt" TYPE="ext4"

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
libfstools/find.c