Skip to content

Commit

Permalink
Replace xxd to cut for google_nvme_id
Browse files Browse the repository at this point in the history
`google_nvme_id` script currently uses `xxd` to parse nvme device
info, but we need to install additional package `xxd` for fedora,
`vim-common` and `vim-filesystem` for centos (or rhel) before
using it. Replace it with `cut` and we do not need to install
additional packages.
See coreos/fedora-coreos-config#2412 (comment)
  • Loading branch information
HuijingHei committed May 12, 2023
1 parent 18fbc05 commit 5cf92b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/udev/google_nvme_id
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function err() {
#######################################
function get_namespace_device_name() {
local nvme_json
nvme_json="$("$nvme_cli_bin" id-ns -b "$1" | xxd -p -seek 384 | xxd -p -r)"
nvme_json="$("$nvme_cli_bin" id-ns -b "$1" | cut -b 384-)"
if [[ $? -ne 0 ]]; then
return 1
fi
Expand Down

0 comments on commit 5cf92b5

Please sign in to comment.