Skip to contentSkip to conversation

fix drmSetMaster error reporting

PATCH In review Marcin Slusarz 2 participants 2 messages Feb 13, 2011 – Feb 14, 2011 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix drmSetMaster error reporting

On error, drmSetMaster returns -1 and sets errno.

---
 src/nv_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
src/nv_driver.c +1 -1
index 3e009fc..754739c 100644
@@ -334,7 +334,7 @@ NVEnterVT(int scrnIndex, int flags)
 
 	ret = drmSetMaster(nouveau_device(pNv->dev)->fd);
 	if (ret)
-		ErrorF("Unable to get master: %d\n", ret);
+		ErrorF("Unable to get master: %s\n", strerror(errno));
 
 	if (!xf86SetDesiredModes(pScrn))
 		return FALSE;
Signature · 1 line
1.7.4.rc3
#2 lore raw
In reply to a message not in the archive
Quoted 1 line · Marcin Slusarz

On error, drmSetMaster returns -1 and sets errno.

Pushed.

Quoted 17 lines
---
 src/nv_driver.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
src/nv_driver.c +1 -1
index 3e009fc..754739c 100644
@@ -334,7 +334,7 @@ NVEnterVT(int scrnIndex, int flags)
 
 	ret = drmSetMaster(nouveau_device(pNv->dev)->fd);
 	if (ret)
-		ErrorF("Unable to get master: %d\n", ret);
+		ErrorF("Unable to get master: %s\n", strerror(errno));
 
 	if (!xf86SetDesiredModes(pScrn))
 		return FALSE;