summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm_tty.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2014-03-10 08:24:08 +0000
committerChris Michael <cp.michael@samsung.com>2014-03-10 12:40:30 +0000
commitfe7206d334dcbbbe02bfc6083a22be8e382a5cc9 (patch)
tree1e3ce438132a62141f4f3d913d04a830ba4490d9 /src/lib/ecore_drm/ecore_drm_tty.c
parent2fe6c88cf0d7563bb63c0b3f3a7ea76269b2c767 (diff)
ecore-drm: Add API function to return the vt fd
@feature: Added API function to return the file descriptor from the opened virtual terminal. This is needed for use in ecore_evas. When it sets up the canvas, we pass this fd to the canvas for use in setting up the vt framebuffers Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm_tty.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm_tty.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_tty.c b/src/lib/ecore_drm/ecore_drm_tty.c
index 41a0561fb7..b9cd1ebf86 100644
--- a/src/lib/ecore_drm/ecore_drm_tty.c
+++ b/src/lib/ecore_drm/ecore_drm_tty.c
@@ -295,3 +295,23 @@ ecore_drm_tty_acquire(Ecore_Drm_Device *dev)
295 295
296 return EINA_TRUE; 296 return EINA_TRUE;
297} 297}
298
299/**
300 * Get the opened virtual terminal file descriptor
301 *
302 * @param dev The Ecore_Drm_Device which owns this tty.
303 *
304 * @return The tty fd opened from previous call to ecore_drm_tty_open
305 *
306 * @ingroup Ecore_Drm_Tty_Group
307 *
308 * @since 1.10
309 */
310EAPI int
311ecore_drm_tty_get(Ecore_Drm_Device *dev)
312{
313 /* check for valid device */
314 if ((!dev) || (!dev->drm.name) || (dev->tty.fd < 0)) return -1;
315
316 return dev->tty.fd;
317}