[PATCH] wnaspi32: Print error when device cannot be opened (mostly so that interested users know they need to readjust permissions)

Rok Mandeljc rok.mandeljc at email.si
Thu Nov 1 02:07:18 CDT 2007


---
 dlls/wnaspi32/aspi.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/wnaspi32/aspi.c b/dlls/wnaspi32/aspi.c
index c4bc1bb..fcfc1f8 100644
--- a/dlls/wnaspi32/aspi.c
+++ b/dlls/wnaspi32/aspi.c
@@ -237,7 +237,11 @@ int SCSI_OpenDevice( int h, int c, int t, int d )
 
     TRACE("Opening device %s mode O_RDWR\n",devstr);
     fd = open(devstr, O_RDWR);
-
+    if (fd == -1) {
+        char *errstring = strerror(errno);
+        ERR("Failed to open device %s: %s\n", devstr, errstring);
+    }
+    
     return fd;
 }
 
-- 
1.5.3.3


--------------010808020207080801000804--



More information about the wine-patches mailing list