Skip to content

Commit

Permalink
Revert unnecesary lcase in ds-identify (#978)
Browse files Browse the repository at this point in the history
This patch reverts an unnecessary lcase optimization in the
ds-identify script. SystemD documents the values produced by
the systemd-detect-virt command are lower case, and the mapping
table used by the FreeBSD check is also lower-case.

The optimization added two new forked processes, needlessly
causing overhead.
  • Loading branch information
akutz committed Aug 13, 2021
1 parent 0404743 commit f516a7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/ds-identify
Expand Up @@ -449,7 +449,7 @@ detect_virt() {
read_virt() {
cached "$DI_VIRT" && return 0
detect_virt
DI_VIRT="$(echo "${_RET}" | tr '[:upper:]' '[:lower:]')"
DI_VIRT="${_RET}"
}

is_container() {
Expand Down

0 comments on commit f516a7d

Please sign in to comment.