summaryrefslogtreecommitdiffstats
path: root/src/loader/loader.c
diff options
context:
space:
mode:
authorDerek Foreman <[email protected]>2015-06-17 11:28:49 -0500
committerEmil Velikov <[email protected]>2015-06-23 16:54:51 +0100
commit9c927463492dea14d82ebdd77f711f86b0e6fc5e (patch)
tree8c0345f46bae0a9f8eed508f73e83e24088685fd /src/loader/loader.c
parentaaac913e901229d11a1894f6aaf646de6b1a542c (diff)
loader: Rename drm_open_device() to loader_open_device() and share it
This is already our common idiom for opening files with CLOEXEC and it's a little ugly, so let's share this one implementation. Signed-off-by: Derek Foreman <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 17bf1336005..fc468153425 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -314,8 +314,8 @@ get_id_path_tag_from_fd(struct udev *udev, int fd)
return id_path_tag;
}
-static int
-drm_open_device(const char *device_name)
+int
+loader_open_device(const char *device_name)
{
int fd;
#ifdef O_CLOEXEC
@@ -404,7 +404,7 @@ int loader_get_user_preferred_fd(int default_fd, int *different_device)
goto default_device_clean;
}
- fd = drm_open_device(device_name);
+ fd = loader_open_device(device_name);
if (fd >= 0) {
close(default_fd);
} else {