From dba8e83739c331962250b92187a5e6dbd07f1568 Mon Sep 17 00:00:00 2001
From: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Date: Sun, 16 Jan 2011 15:38:51 +0100
Subject: [PATCH] skip sysfs fingerprinting on systems without drm

---
 autorandr | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/autorandr b/autorandr
index 6d1f91f..c603473 100755
--- a/autorandr
+++ b/autorandr
@@ -80,6 +80,8 @@ setup_fp_sysfs_edid() {
 	$XRANDR -q > /dev/null
 	# hash the EDIDs of all _connected_ devices
 	for P in /sys/class/drm/card*-*/; do
+		# nothing found
+		[ ! -d "$P" ] && continue
 		if grep -q "^connected$" < "${P}status"; then
 			echo -n "$(basename "$P") "
 			md5sum ${P}edid | awk '{print $1}'
-- 
2.39.5