fi
i915_dfs_path=x
-for dir in `ls $debugfs_path` ; do
- if [ -f $debugfs_path/$dir/i915_error_state ] ; then
- i915_dfs_path=$debugfs_path/$dir
+for minor in `seq 0 16`; do
+ if [ -f $debugfs_path/$minor/i915_error_state ] ; then
+ i915_dfs_path=$debugfs_path/$minor
break
fi
done
die "ERROR: other drm clients running"
fi
+i915_sfs_path=
if [ -d /sys/class/drm ] ; then
sysfs_path=/sys/class/drm
-fi
-
-i915_sfs_path=
-for dir in `ls $sysfs_path` ; do
- if [ -f $sysfs_path/$dir/error ] ; then
- i915_sfs_path=$sysfs_path/$dir
- break
+ if [ -f $sysfs_path/card$minor/error ] ; then
+ i915_sfs_path="$sysfs_path/card$minor"
fi
-done
+fi
# sysfs may not exist as the 'error' is a new interface in 3.11