summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-01-06 12:34:33 +0000
committerRik Faith <faith@alephnull.com>2000-01-06 12:34:33 +0000
commit26256f93c471bced7380d6e9fe884402286f7681 (patch)
tree79186cb0fcd670b69713801e54369a79faf52044
parent6073f0d3e344ae13f14054b28dd7d6eff0ada1e4 (diff)
Fix return values to match documentation. Make all ioctl calls have 3
parameters [Dieter Nützel]
-rw-r--r--libdrm/xf86drm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 51a53a2a..926e80bc 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -747,13 +747,13 @@ int drmDestroyDrawable(int fd, drmDrawable handle)
int drmAgpAcquire(int fd)
{
- if (ioctl(fd, DRM_IOCTL_AGP_ACQUIRE)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_ACQUIRE, NULL)) return -errno;
return 0;
}
int drmAgpRelease(int fd)
{
- if (ioctl(fd, DRM_IOCTL_AGP_RELEASE)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_RELEASE, NULL)) return -errno;
return 0;
}
@@ -826,7 +826,7 @@ unsigned long drmAgpGetMode(int fd)
{
drm_agp_info_t i;
- if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return 0;
return i.mode;
}
@@ -834,7 +834,7 @@ unsigned long drmAgpBase(int fd)
{
drm_agp_info_t i;
- if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return 0;
return i.aperture_base;
}
@@ -842,7 +842,7 @@ unsigned long drmAgpSize(int fd)
{
drm_agp_info_t i;
- if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return 0;
return i.aperture_size;
}
@@ -850,7 +850,7 @@ unsigned long drmAgpMemoryUsed(int fd)
{
drm_agp_info_t i;
- if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return 0;
return i.memory_used;
}
@@ -858,7 +858,7 @@ unsigned long drmAgpMemoryAvail(int fd)
{
drm_agp_info_t i;
- if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return 0;
return i.memory_allowed;
}
@@ -866,7 +866,7 @@ unsigned int drmAgpVendorId(int fd)
{
drm_agp_info_t i;
- if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return 0;
return i.id_vendor;
}
@@ -874,7 +874,7 @@ unsigned int drmAgpDeviceId(int fd)
{
drm_agp_info_t i;
- if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return -errno;
+ if (ioctl(fd, DRM_IOCTL_AGP_INFO, &i)) return 0;
return i.id_device;
}