Remove compiler warning

Copy the device name (/dev/dri/card*) into a buffer so we can pass it
to the send function.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-12-03 14:22:31 +00:00
parent 3058e2f6bc
commit 79e42237f0
1 changed files with 6 additions and 2 deletions

View File

@ -185,12 +185,16 @@ ecore_drm_device_free(Ecore_Drm_Device *dev)
EAPI Eina_Bool
ecore_drm_device_open(Ecore_Drm_Device *dev)
{
char devpath[PATH_MAX];
/* check for valid device */
if ((!dev) || (!dev->devpath)) return EINA_FALSE;
if ((!dev) || (!dev->devname)) return EINA_FALSE;
strcpy(devpath, dev->devname);
/* send message for ecore_drm_launch to open this device */
_ecore_drm_message_send(ECORE_DRM_OP_OPEN_FD,
dev->devname, strlen(dev->devname));
devpath, strlen(devpath));
return EINA_TRUE;
}