SASC
DVBSoftCAM

scanwrap.c File Reference

#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>

Go to the source code of this file.

Defines

#define _GNU_SOURCE
#define O_SYNC   010000
#define O_ASYNC   020000

Functions

void _init (void)
int open (__const char *__file, int __oflag, mode_t __mode)
int open64 (__const char *__file, int __oflag, mode_t __mode)

Variables

static int(* realopen )(__const char *__file, int __oflag,...)
static int(* realopen64 )(__const char *__file, int __oflag,...)

Define Documentation

#define _GNU_SOURCE

Definition at line 1 of file scanwrap.c.

#define O_ASYNC   020000

Definition at line 10 of file scanwrap.c.

Referenced by fe_close(), fe_open_post(), fe_open_pre(), open(), and open64().

#define O_SYNC   010000

Definition at line 9 of file scanwrap.c.

Referenced by fe_close(), fe_open_post(), fe_open_pre(), log_rotate(), open(), and open64().


Function Documentation

void _init ( void  )

Definition at line 14 of file scanwrap.c.

References dlsym(), realopen, and realopen64.

                 {
        realopen = dlsym(RTLD_NEXT, "open");
        realopen64 = dlsym(RTLD_NEXT, "open64");
}
int open ( __const char *  __file,
int  __oflag,
mode_t  __mode 
)
int open64 ( __const char *  __file,
int  __oflag,
mode_t  __mode 
)

Definition at line 26 of file scanwrap.c.

References O_ASYNC, O_SYNC, and realopen64.

                                                             {
  if(strncmp(__file, "/dev/dvb/adapter", 16) == 0)
    __oflag |= (O_SYNC | O_ASYNC);
  return realopen64(__file, __oflag, __mode);
}

Variable Documentation

int(* realopen)(__const char *__file, int __oflag,...) [static]

Definition at line 12 of file scanwrap.c.

Referenced by _init(), and open().

int(* realopen64)(__const char *__file, int __oflag,...) [static]

Definition at line 13 of file scanwrap.c.

Referenced by _init(), and open64().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines