Commit 195cf643 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

DVB: ASCII paths, utf8_open() provides close-on-exec

parent 1188e4a5
......@@ -40,6 +40,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/poll.h>
#include <vlc_charset.h>
/* DVB Card Drivers */
#include <linux/dvb/version.h>
......@@ -1333,7 +1334,7 @@ int DMXSetFilter( access_t * p_access, int i_pid, int * pi_fd, int i_type )
}
msg_Dbg( p_access, "Opening device %s", dmx );
if( (*pi_fd = open(dmx, O_RDWR)) < 0 )
if( (*pi_fd = utf8_open(dmx, O_RDWR)) < 0 )
{
msg_Err( p_access, "DMXSetFilter: opening device failed (%m)" );
return VLC_EGENERIC;
......@@ -1490,7 +1491,7 @@ int DVROpen( access_t * p_access )
}
msg_Dbg( p_access, "Opening device %s", dvr );
if( (p_sys->i_handle = open(dvr, O_RDONLY)) < 0 )
if( (p_sys->i_handle = utf8_open(dvr, O_RDONLY)) < 0 )
{
msg_Err( p_access, "DVROpen: opening device failed (%m)" );
return VLC_EGENERIC;
......@@ -1540,7 +1541,7 @@ int CAMOpen( access_t *p_access )
memset( &caps, 0, sizeof( ca_caps_t ));
msg_Dbg( p_access, "Opening device %s", ca );
if( (p_sys->i_ca_handle = open(ca, O_RDWR | O_NONBLOCK)) < 0 )
if( (p_sys->i_ca_handle = utf8_open(ca, O_RDWR | O_NONBLOCK)) < 0 )
{
msg_Warn( p_access, "CAMInit: opening CAM device failed (%m)" );
p_sys->i_ca_handle = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment