Changeset 3146:8cf9e98e55f1 in roaraudio


Ignore:
Timestamp:
01/15/10 13:30:23 (10 years ago)
Author:
phi
Branch:
default
Message:

implemented pass-to-os ioctl()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaross/libroaross.c

    r3145 r3146  
    9393 ssize_t (*write)(int fd, const void *buf, size_t count); 
    9494 ssize_t (*read)(int fd, void *buf, size_t count); 
     95 int     (*ioctl)(int d, int request, ...); 
    9596} _os; 
    9697 
     
    107108 _os.write = dlsym(REAL_LIBC, "write"); 
    108109 _os.read  = dlsym(REAL_LIBC, "read"); 
     110 _os.ioctl = dlsym(REAL_LIBC, "ioctl"); 
    109111} 
    110112 
     
    412414} 
    413415 
     416extern int ioctl (int __fd, unsigned long int __request, ...) { 
     417 va_list args; 
     418 void *argp; 
     419 
     420 _init(); 
     421 
     422 va_start (args, __request); 
     423 argp = va_arg (args, void *); 
     424 va_end (args); 
     425 
     426 return _os.ioctl(__fd, __request, argp); 
     427} 
     428 
    414429#endif 
    415430 
Note: See TracChangeset for help on using the changeset viewer.