From: Mauro Carvalho Chehab Date: Thu, 23 May 2013 13:24:03 +0000 (-0300) Subject: edac-fake-inject: Check if the Kernel supports error injection X-Git-Tag: v0.4.0~34 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8d62a1ca5efd566a7d405b51efaad78f7f3b9027;p=users%2Fmchehab%2Frasdaemon.git edac-fake-inject: Check if the Kernel supports error injection Signed-off-by: Mauro Carvalho Chehab --- diff --git a/contrib/edac-fake-inject b/contrib/edac-fake-inject index 57a4286..e0bbae7 100755 --- a/contrib/edac-fake-inject +++ b/contrib/edac-fake-inject @@ -4,6 +4,12 @@ MC="$(ls -d /sys/devices/system/edac/mc/mc? |sed -e s,.*/mc,,)" SYSFS="$(cat /proc/mounts|grep debugfs|cut -d' ' -f 2)" +if [ ! -e $SYSFS/edac/ ]; then + echo "$SYSFS/edac not found." + echo " It seems that your Kernel was not compiled with CONFIG_EDAC_DEBUG."; + exit -1; +fi + for i in $MC; do LAYER1=$(cat /sys/devices/system/edac/mc/mc$i/max_location |cut -d ' ' -f 1) LAYER2=$(cat /sys/devices/system/edac/mc/mc$i/max_location |cut -d ' ' -f 3)