Changeset 4081:b30bb022564c in roaraudio for libroaross


Ignore:
Timestamp:
07/23/10 19:09:40 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added a lot debug lions, fixed broken locking on GNU systems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroaross/libroaross.c

    r4080 r4081  
    614614 */ 
    615615 
     616 if ( (ptr = _get_device(pathname)) == NULL ) { 
     617  ROAR_DBG("_open_file(pathname='%s', flags=0x%x) = -2", pathname, flags); 
     618  return -2; 
     619 } 
     620 
     621 ROAR_DBG("_open_file(pathname='%s', flags=0x%x) = ?", pathname, flags); 
     622 
     623 
    616624#ifdef O_ASYNC 
    617625 if ( flags & O_ASYNC ) { 
     
    627635  return -1; 
    628636 } 
    629  
    630  ROAR_DBG("_open_file(pathname='%s', flags=0x%x) = ?", pathname, flags); 
    631  
    632  if ( (ptr = _get_device(pathname)) == NULL ) 
    633   return -2; 
    634637 
    635638 ROAR_DBG("_open_file(pathname='%s', flags=0x%x) = ?", pathname, flags); 
     
    11581161 switch (ret) { 
    11591162  case -2:       // continue as normal, use _op.open() 
     1163    ROAR_DBG("open(pathname='%s', flags=%x, ...): is not handled by us, pass to kernel\n", pathname, flags); 
    11601164   break; 
    11611165  case -1:       // pass error to caller 
     
    11881192 } 
    11891193 
    1190  ROAR_DBG("open64(__file='%s', __oflags=%x, ...) = ?\n", __file, __oflag); 
     1194 ROAR_DBG("open64(__file='%s', __oflags=%x, ...) = ?", __file, __oflag); 
    11911195 ret = _open_file(__file, __oflag); 
    11921196 
    11931197 switch (ret) { 
    11941198  case -2:       // continue as normal, use _op.open() 
     1199    ROAR_DBG("open64(__file='%s', __oflags=%x, ...): not for us, passing to kernel", __file, __oflag); 
    11951200   break; 
    11961201  case -1:       // pass error to caller 
     
    11981203   break; 
    11991204  default:       // return successfully opened pointer to caller 
     1205    ROAR_DBG("open64(__file='%s', __oflags=%x, ...) = %i", __file, __oflag, ret); 
    12001206    return ret; 
    12011207   break; 
     
    15701576 return -1; 
    15711577#else 
     1578 ROAR_DBG("ioctl(__fd=%i, __request=0x%lX, argp=%p): not for us, passing to kernel", __fd, (long unsigned int) __request, argp); 
    15721579 return _os.ioctl(__fd, __request, argp); 
    15731580#endif 
     
    18151822  case F_SETLK: 
    18161823  case F_SETLKW: 
     1824#ifdef F_GETLK64 
     1825  case F_GETLK64: 
     1826#endif 
     1827#ifdef F_SETLK64 
     1828  case F_SETLK64: 
     1829#endif 
     1830#ifdef F_SETLKW64 
     1831  case F_SETLKW64: 
     1832#endif 
    18171833    type = POINTER; 
    18181834   break; 
     
    18311847 
    18321848 if ( type == UNKNOWN ) { 
     1849  ROAR_DBG("fcntl(fd=%i, cmd=%i, ...): unknown data type!", fd, cmd); 
     1850  ROAR_DBG("fcntl(fd=%i, cmd=%i, ...) = -1 // errno = EINVAL", fd, cmd); 
    18331851  errno = EINVAL; 
    18341852  return -1; 
     
    20802098 switch (ret) { 
    20812099  case -2:       // continue as normal, use _op.open() 
     2100    ROAR_DBG("fopen(path='%s', mode='%s'): not for us, passing to libc", path, mode); 
    20822101   break; 
    20832102  case -1:       // pass error to caller 
Note: See TracChangeset for help on using the changeset viewer.