46a734
From 0eeec94882779de76c08b1a7faf862e22f21f242 Mon Sep 17 00:00:00 2001
46a734
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
46a734
Date: Fri, 14 Jan 2022 16:42:46 +0100
46a734
Subject: [PATCH 5/6] Revert unnecesary lcase in ds-identify (#978)
46a734
46a734
RH-Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
46a734
RH-MergeRequest: 44: Datasource for VMware
46a734
RH-Commit: [5/6] f7385c15cf17a9c4a2fa15b29afd1b8a96b24d1e
46a734
RH-Bugzilla: 2026587
46a734
RH-Acked-by: Mohamed Gamal Morsy <mmorsy@redhat.com>
46a734
RH-Acked-by: Eduardo Otubo <otubo@redhat.com>
46a734
46a734
commit f516a7d37c1654addc02485e681b4358d7e7c0db
46a734
Author: Andrew Kutz <101085+akutz@users.noreply.github.com>
46a734
Date:   Fri Aug 13 14:30:55 2021 -0500
46a734
46a734
    Revert unnecesary lcase in ds-identify (#978)
46a734
46a734
    This patch reverts an unnecessary lcase optimization in the
46a734
    ds-identify script. SystemD documents the values produced by
46a734
    the systemd-detect-virt command are lower case, and the mapping
46a734
    table used by the FreeBSD check is also lower-case.
46a734
46a734
    The optimization added two new forked processes, needlessly
46a734
    causing overhead.
46a734
46a734
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
46a734
---
46a734
 tools/ds-identify | 2 +-
46a734
 1 file changed, 1 insertion(+), 1 deletion(-)
46a734
46a734
diff --git a/tools/ds-identify b/tools/ds-identify
46a734
index 0e12298f..7b782462 100755
46a734
--- a/tools/ds-identify
46a734
+++ b/tools/ds-identify
46a734
@@ -449,7 +449,7 @@ detect_virt() {
46a734
 read_virt() {
46a734
     cached "$DI_VIRT" && return 0
46a734
     detect_virt
46a734
-    DI_VIRT="$(echo "${_RET}" | tr '[:upper:]' '[:lower:]')"
46a734
+    DI_VIRT="${_RET}"
46a734
 }
46a734
 
46a734
 is_container() {
46a734
-- 
46a734
2.27.0
46a734