Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /nouveau-pm/init-trace.sh [d1bba6] .. [131335] Maximize Restore

  Switch to side-by-side view

--- a/nouveau-pm/init-trace.sh
+++ b/nouveau-pm/init-trace.sh
@@ -1,19 +1,11 @@
 #!/bin/bash
 
-error() {
-     echo "ERROR - $1"
-     exit 1
-}
-
 if [ $UID -ne 0 ]; then
-	error "The script must be run as root"
+	echo "The script must be run as root"
+	exit 1
 fi
 
-# XXX: Add a check if debugfs is already mounted if it is
-# - parse the information and use it
-# - or unmount/mount again at the currently selected place
-
-mount -t debugfs debugfs /sys/kernel/debug 2>/dev/null
+mount -t debugfs debugfs /sys/kernel/debug
 for TRACER in `cat /sys/kernel/debug/tracing/available_tracers`
 do
 	if test "x$TRACER" = xmmiotrace; then
@@ -22,4 +14,7 @@
 		exit 0
 	fi
 done
-error "Cannot find mmiotrace in the list of available tracers"
+
+echo "ERROR - Cannot find mmiotrace in the list of available tracers"
+echo "Please ensure that you are using the correct kernel/kernel has been built with CONFIG_MMIOTRACE"
+