forked from pool/s390-tools
45 lines
2.1 KiB
Diff
45 lines
2.1 KiB
Diff
|
Subject: [PATCH] [BZ 196072] zdev: modify the lsblk output parser in lszdev
|
||
|
From: Vineeth Vijayan <vneethv@linux.ibm.com>
|
||
|
|
||
|
Description: zdev: modify the lsblk output parser in lszdev
|
||
|
Symptom: lsblk parser function in lszdev not working
|
||
|
Problem: Version 2.37+ of util-linux modified the output
|
||
|
characters of lsblk,which breaks the parser function.
|
||
|
Solution: Align the parser function to support latest changes
|
||
|
Reproduction: execute lszdev --by-path / command
|
||
|
Upstream-ID: ad024c06e16ec4bba31d19fb848b42c67113143d
|
||
|
Problem-ID: 196072
|
||
|
|
||
|
Upstream-Description:
|
||
|
|
||
|
zdev: modify the lsblk output parser in lszdev
|
||
|
|
||
|
Since version 2.37.x, with the commit 58b510e58 ("libsmartcols: sanitize
|
||
|
variable names on export output"), util-linux changes the output
|
||
|
characters of lsblk, where the ":" is replaced with an "_". Align the
|
||
|
lsblk output parser function in lszdev as per this change.
|
||
|
|
||
|
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
|
||
|
Suggested-by: Peter Oberparleiter <oberpar@linux.ibm.com>
|
||
|
Reported-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||
|
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
|
||
|
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||
|
Tested-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
|
||
|
Signed-off-by: Jan Hoeppner <hoeppner@linux.ibm.com>
|
||
|
|
||
|
|
||
|
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
|
||
|
Index: s390-tools-service/zdev/src/blkinfo.c
|
||
|
===================================================================
|
||
|
--- s390-tools-service.orig/zdev/src/blkinfo.c
|
||
|
+++ s390-tools-service/zdev/src/blkinfo.c
|
||
|
@@ -108,6 +108,8 @@ static struct blkinfo *blkinfo_from_line
|
||
|
|
||
|
name = isolate_keyword(&line, "NAME=\"");
|
||
|
majmin = isolate_keyword(&line, "MAJ:MIN=\"");
|
||
|
+ if (!majmin)
|
||
|
+ majmin = isolate_keyword(&line, "MAJ_MIN=\"");
|
||
|
fstype = isolate_keyword(&line, "FSTYPE=\"");
|
||
|
uuid = isolate_keyword(&line, "UUID=\"");
|
||
|
mountpoint = isolate_keyword(&line, "MOUNTPOINT=\"");
|