Fix the adapter_mask handling for linuxdvb
This commit is contained in:
parent
56a39c5c19
commit
ea526f2340
2 changed files with 8 additions and 0 deletions
|
@ -24,8 +24,12 @@
|
|||
#include "scanfile.h"
|
||||
#include "../dvb_charset.h"
|
||||
|
||||
int linuxdvb_adapter_mask;
|
||||
|
||||
void linuxdvb_init ( int adapter_mask )
|
||||
{
|
||||
linuxdvb_adapter_mask = adapter_mask;
|
||||
|
||||
/* Load scan files */
|
||||
scanfile_init();
|
||||
|
||||
|
|
|
@ -160,6 +160,7 @@ linuxdvb_adapter_create
|
|||
static void
|
||||
linuxdvb_adapter_add ( const char *path )
|
||||
{
|
||||
extern int linuxdvb_adapter_mask;
|
||||
int a, i, j, r, fd;
|
||||
char fe_path[512], dmx_path[512], dvr_path[512], uuid[UUID_STR_LEN];
|
||||
linuxdvb_adapter_t *la = NULL;
|
||||
|
@ -182,6 +183,9 @@ linuxdvb_adapter_add ( const char *path )
|
|||
if (sscanf(path, "/dev/dvb/adapter%d", &a) != 1)
|
||||
return;
|
||||
|
||||
if (a >= 0 && a < 32 && (linuxdvb_adapter_mask & (1 << a)) == 0)
|
||||
return;
|
||||
|
||||
/* Note: some of the below can take a while, so we relinquish the lock
|
||||
* to stop us blocking everyhing else
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue