diff options
author | David Airlie <airlied@asimov.stargames.com.au> | 2007-04-10 16:25:31 +1000 |
---|---|---|
committer | David Airlie <airlied@asimov.stargames.com.au> | 2007-04-10 16:25:31 +1000 |
commit | 1e39dc43230ba1827eedc29ab422464281ec3e1b (patch) | |
tree | 9bfe37ff67dd9a0e1462b4d602d2d7e8db754b2c /libdrm/xf86drmMode.c | |
parent | 40bd6dcd86d554ca426deccd4fbada693c4be8a6 (diff) |
export output name to userspace
Diffstat (limited to 'libdrm/xf86drmMode.c')
-rw-r--r-- | libdrm/xf86drmMode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c index df8ea8ee..c0444e65 100644 --- a/libdrm/xf86drmMode.c +++ b/libdrm/xf86drmMode.c @@ -40,6 +40,7 @@ #include "xf86drmMode.h" #include "xf86drm.h" #include <drm.h> +#include <string.h> /* * Util functions @@ -385,7 +386,8 @@ drmModeOutputPtr drmModeGetOutput(int fd, uint32_t output_id) r->crtcs = out.crtcs; r->clones = out.clones; r->modes = drmAllocCpy(out.modes, out.count_modes, sizeof(uint32_t)); - + strncpy(r->name, out.name, DRM_OUTPUT_NAME_LEN); + r->name[DRM_OUTPUT_NAME_LEN-1] = 0; return r; err_allocs: |