From f1bd28c9e36502a9e53c200865151a4f7424d129 Mon Sep 17 00:00:00 2001 From: Jan Orel Date: Mon, 16 Dec 2019 14:51:28 +0100 Subject: [PATCH] B #1690: Suppress bash 4.4 nullbyte warnings (#3987) (cherry picked from commit 871ef3e9188ccbe35867b6f934f7d4a7c5d60387) --- src/vmm_mad/remotes/kvm/restore | 2 +- src/vmm_mad/remotes/kvm/save | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmm_mad/remotes/kvm/restore b/src/vmm_mad/remotes/kvm/restore index ef8d1e8d5e..183a1dda9b 100755 --- a/src/vmm_mad/remotes/kvm/restore +++ b/src/vmm_mad/remotes/kvm/restore @@ -40,7 +40,7 @@ if [ ! -t 0 ]; then # The data is the driver message. Extracting the System DS TM_MAD XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin" - TM_MAD=$(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) + IFS= read -r -d '' TM_MAD < <(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) # If there is a specific hook for this TM_MAD call it: RESTORE_TM_FILE="${DRIVER_PATH}/restore.${TM_MAD}" diff --git a/src/vmm_mad/remotes/kvm/save b/src/vmm_mad/remotes/kvm/save index 45409efd76..d1c460449c 100755 --- a/src/vmm_mad/remotes/kvm/save +++ b/src/vmm_mad/remotes/kvm/save @@ -55,7 +55,7 @@ DRV_MESSAGE=$(cat) # The data is the driver message. Extracting the System DS TM_MAD XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin" -TM_MAD=$(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) +IFS= read -r -d '' TM_MAD < <(echo "$DRV_MESSAGE" | $XPATH /VMM_DRIVER_ACTION_DATA/DATASTORE/TM_MAD) # If there is a specific hook for this TM_MAD call it: SAVE_TM_FILE="${DRIVER_PATH}/save.${TM_MAD}"