summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2003-04-23 14:21:17 +0000
committerMichel Daenzer <michel@daenzer.net>2003-04-23 14:21:17 +0000
commit23a76c37594d3d423963c7b8610b64367e3ff9d8 (patch)
tree53ea10a142d356f2ce641ff48d975c9657725a79 /libdrm
parentd5db1144dd5cb96b7e25d0e08a209b38e0afdc9b (diff)
deal correctly with read() from the DRM failing
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index e1280921..a5bb8050 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -1460,7 +1460,7 @@ static void drmSIGIOHandler(int interrupt, void *closure)
#if 0
fprintf(stderr, "Trying %d\n", entry->fd);
#endif
- if ((count = read(entry->fd, buf, sizeof(buf)))) {
+ if ((count = read(entry->fd, buf, sizeof(buf))) > 0) {
buf[count] = '\0';
#if 0
fprintf(stderr, "Got %s\n", buf);