summaryrefslogtreecommitdiff
path: root/src/common_vgaarb.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-07-31 11:17:21 +1000
committerDave Airlie <airlied@redhat.com>2009-07-31 11:17:21 +1000
commit453928b8485bc7beff69996abe12628efc09405f (patch)
tree6df3c8b98f3908c423777501f9afd6362229c0e2 /src/common_vgaarb.c
parentd22d7c0d5e48d130c89282514e378819e0b98636 (diff)
downloadlibpciaccess-453928b8485bc7beff69996abe12628efc09405f.tar.gz
libpciaccess-453928b8485bc7beff69996abe12628efc09405f.tar.bz2
libpciaccess-453928b8485bc7beff69996abe12628efc09405f.zip
vgaarb: clean up debug output
Diffstat (limited to 'src/common_vgaarb.c')
-rw-r--r--src/common_vgaarb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
index 55b3868..302b89d 100644
--- a/src/common_vgaarb.c
+++ b/src/common_vgaarb.c
@@ -42,7 +42,6 @@ int
pci_device_vgaarb_init(void)
{
if ((pci_sys->vgaarb_fd = open ("/dev/vga_arbiter", O_RDWR)) < 0) {
- fprintf(stderr, "device open failed");
return errno;
}
@@ -52,8 +51,7 @@ pci_device_vgaarb_init(void)
void
pci_device_vgaarb_fini(void)
{
- if (close(pci_sys->vgaarb_fd) != 0)
- fprintf(stderr, "device close failed");
+ close(pci_sys->vgaarb_fd);
}
/**
@@ -82,12 +80,16 @@ vgaarb_write(int fd, char *buf, int len)
if (errno == EBUSY)
return 2;
+#ifdef DEBUG
fprintf(stderr, "write error");
+#endif
return 1;
}
else if (ret != len) {
/* it's need to receive the exactly amount required. */
+#ifdef DEBUG
fprintf(stderr, "write error: wrote different than expected\n");
+#endif
return 1;
}