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