add O_RDONLY to open()

SVN revision: 55897
This commit is contained in:
Mike Blumenkrantz 2011-01-05 18:44:55 +00:00
parent d47e3516da
commit 961244f70a
2 changed files with 2 additions and 2 deletions

View File

@ -293,7 +293,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype, const char *name)
{
int devcheck;
devcheck = open(udev_device_get_devnode(device), O_EXCL);
devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
if (errno)
{
if (devcheck >= 0) close(devcheck);

View File

@ -141,7 +141,7 @@ _get_syspath_from_watch(void *data, Ecore_Fd_Handler * fd_handler)
{
int devcheck;
devcheck = open(udev_device_get_devnode(device), O_EXCL);
devcheck = open(udev_device_get_devnode(device), O_RDONLY | O_EXCL);
if ((devcheck < 0) || errno) goto error;
close(devcheck);
}