From c105fc3384ed411d92bb70f0cc54b38880d4d06d Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Sat, 1 Jan 2011 21:17:30 +0100
Subject: [PATCH] libdrm: Remove driver date from drm version calls
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
include/drm/drm.h | 2 --
tests/dristat.c | 1 -
tests/drmstat.c | 1 -
tests/getversion.c | 1 -
xf86drm.c | 9 ---------
xf86drm.h | 2 --
6 files changed, 0 insertions(+), 16 deletions(-)
@@ -131,8 +131,6 @@ struct drm_version {
int version_patchlevel; /**< Patch level */
size_t name_len; /**< Length of name buffer */
char *name; /**< Name of driver */
- size_t date_len; /**< Length of date buffer */
- char *date; /**< User-space buffer to hold date */
size_t desc_len; /**< Length of desc buffer */
char *desc; /**< User-space buffer to hold desc */
};
@@ -53,7 +53,6 @@ static void getversion(int fd)
version->version_major,
version->version_minor,
version->version_patchlevel);
- printf(" Date: %s\n", version->date ? version->date : "?");
printf(" Desc: %s\n", version->desc ? version->desc : "?");
drmFreeVersion(version);
} else {
@@ -72,7 +72,6 @@ static void getversion(int fd)
version->version_major,
version->version_minor,
version->version_patchlevel );
- printf( " Date: %s\n", version->date ? version->date : "?" );
printf( " Desc: %s\n", version->desc ? version->desc : "?" );
drmFreeVersion(version);
} else {
@@ -38,7 +38,6 @@ int main(int argc, char **argv)
fd = drm_open_any();
v = drmGetVersion(fd);
assert(strlen(v->name) != 0);
- assert(strlen(v->date) != 0);
assert(strlen(v->desc) != 0);
if (strcmp(v->name, "i915") == 0)
assert(v->version_major >= 1);
@@ -669,7 +669,6 @@ void drmFreeVersion(drmVersionPtr v)
if (!v)
return;
drmFree(v->name);
- drmFree(v->date);
drmFree(v->desc);
drmFree(v);
}
@@ -689,7 +688,6 @@ static void drmFreeKernelVersion(drm_version_t *v)
if (!v)
return;
drmFree(v->name);
- drmFree(v->date);
drmFree(v->desc);
drmFree(v);
}
@@ -712,8 +710,6 @@ static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s)
d->version_patchlevel = s->version_patchlevel;
d->name_len = s->name_len;
d->name = strdup(s->name);
- d->date_len = s->date_len;
- d->date = strdup(s->date);
d->desc_len = s->desc_len;
d->desc = strdup(s->desc);
}
@@ -741,8 +737,6 @@ drmVersionPtr drmGetVersion(int fd)
version->name_len = 0;
version->name = NULL;
- version->date_len = 0;
- version->date = NULL;
version->desc_len = 0;
version->desc = NULL;
@@ -753,8 +747,6 @@ drmVersionPtr drmGetVersion(int fd)
if (version->name_len)
version->name = drmMalloc(version->name_len + 1);
- if (version->date_len)
- version->date = drmMalloc(version->date_len + 1);
if (version->desc_len)
version->desc = drmMalloc(version->desc_len + 1);
@@ -766,7 +758,6 @@ drmVersionPtr drmGetVersion(int fd)
/* The results might not be null-terminated strings, so terminate them. */
if (version->name_len) version->name[version->name_len] = '\0';
- if (version->date_len) version->date[version->date_len] = '\0';
if (version->desc_len) version->desc[version->desc_len] = '\0';
retval = drmMalloc(sizeof(*retval));
@@ -115,8 +115,6 @@ typedef struct _drmVersion {
int version_patchlevel; /**< Patch level */
int name_len; /**< Length of name buffer */
char *name; /**< Name of driver */
- int date_len; /**< Length of date buffer */
- char *date; /**< User-space buffer to hold date */
int desc_len; /**< Length of desc buffer */
char *desc; /**< User-space buffer to hold desc */
} drmVersion, *drmVersionPtr;
--
1.7.4.rc0