From c14c03825bb617d8923d1c677a64a5a44ab48d4e Mon Sep 17 00:00:00 2001
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Date: Wed, 10 Mar 2021 13:10:59 +0200
Subject: kflash: Use lsblk instead of blkid

lsblk doesn't require root permisions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 kflash.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kflash.sh b/kflash.sh
index e5f59ee..41dacb5 100755
--- a/kflash.sh
+++ b/kflash.sh
@@ -193,9 +193,9 @@ probe_device() {
 		local part_label=${flash_part[1]}
 		local part_dev=/dev/${partdev}${part_idx}
 
-		local label=$(blkid ${part_dev} -o value -s PARTLABEL)
+		local label=$(lsblk -n -o PARTLABEL ${part_dev})
 		if [[ -z "$label" ]] ; then
-			label=$(blkid ${part_dev} -o value -s LABEL)
+			label=$(lsblk -n -o LABEL ${part_dev})
 		fi
 
 		if [[ "$label" != ${part_label} ]] ; then
-- 
cgit v1.2.3