Commit 443e1ea3 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

setup.sh: emit command line to /dev/kmsg on Linux



This can help delineate kernel log messages as result of running
setup.sh vs. other reasons.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: I9b523a0dc54975beca121696ab33c264a430a1d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22673


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent a1264177
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -499,6 +499,12 @@ is_nvme_iommu_shared_with_vmd() {
	# ... and it shares iommu_group with it
}

kmsg() {
	((UID == 0)) || return 0
	[[ -w /dev/kmsg && $(< /proc/sys/kernel/printk_devkmsg) == on ]] || return 0
	echo "$*" > /dev/kmsg
}

if [[ -e "$CONFIG_WPDK_DIR/bin/wpdk_common.sh" ]]; then
	# Adjust uname to report the operating system as WSL, Msys or Cygwin
	# and the kernel name as Windows. Define kill() to invoke the SIGTERM
+4 −0
Original line number Diff line number Diff line
@@ -838,6 +838,8 @@ function set_hp() {
	NRHUGE=${NRHUGE:-$(((HUGEMEM + HUGEPGSZ_MB - 1) / HUGEPGSZ_MB))}
}

kmsg "spdk: $0 $* (start)"

CMD=reset cache_pci_bus

mode=$1
@@ -935,3 +937,5 @@ fi
if [[ -e /proc/$sync_pid/status ]]; then
	wait "$sync_pid"
fi

kmsg "spdk: $0 $* (done)"