Blame SOURCES/0015-fix-issue-with-logical-names-being-truncated-dev-sda.patch

e67e1d
From 4348e283f8a0bdd40b97c5d0b6e12354576b3113 Mon Sep 17 00:00:00 2001
e67e1d
From: Lyonel Vincent <lyonel@ezix.org>
e67e1d
Date: Mon, 25 May 2020 09:31:05 +0200
e67e1d
Subject: [PATCH 15/17] =?UTF-8?q?fix=20issue=20with=20logical=20names=20be?=
e67e1d
 =?UTF-8?q?ing=20truncated=20(`/dev/sda`=20=E2=86=92=20`sda`)?=
e67e1d
MIME-Version: 1.0
e67e1d
Content-Type: text/plain; charset=UTF-8
e67e1d
Content-Transfer-Encoding: 8bit
e67e1d
e67e1d
---
e67e1d
 src/core/hw.cc | 2 +-
e67e1d
 1 file changed, 1 insertion(+), 1 deletion(-)
e67e1d
e67e1d
diff --git a/src/core/hw.cc b/src/core/hw.cc
e67e1d
index f7da370816c5..aca424c3f221 100644
e67e1d
--- a/src/core/hw.cc
e67e1d
+++ b/src/core/hw.cc
e67e1d
@@ -1083,7 +1083,7 @@ void hwNode::setLogicalName(const string & name)
e67e1d
       This->logicalnames.push_back("/dev/" + n);
e67e1d
     }
e67e1d
     else
e67e1d
-      This->logicalnames.push_back(basename(n.c_str()));
e67e1d
+      This->logicalnames.push_back((n[0]=='/')?n:basename(n.c_str()));
e67e1d
 
e67e1d
     if(This->dev == "")
e67e1d
       This->dev = get_devid(n);
e67e1d
-- 
e67e1d
2.17.1
e67e1d