Changeset 1237:f7c55376fad3 in roaraudio


Ignore:
Timestamp:
02/25/09 22:50:31 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

test for tty dev

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • configure

    r1232 r1237  
    3232OSS_DEV="none" 
    3333PROC_NET_DECNET="/proc/net/decnet" 
     34TTY_DEV="none" 
    3435 
    3536DEFAULT_GRP='' 
     
    103104   echo 
    104105   echo '--cdrom DEV                 - Set default CDRum device' 
     106   echo '--tty DEV                   - Set default TTY' 
    105107   echo '--proc-net-decnet FILE      - Set DECnet file for DECnet support auto detecting' 
    106108   echo '                              (ignore this on non-Linux)' 
     
    160162  '--cdrom') 
    161163   CDROM="$2" 
     164   shift; 
     165  ;; 
     166  '--tty') 
     167   TTY_DEV="$2" 
    162168   shift; 
    163169  ;; 
     
    755761fi 
    756762 
     763echo -n 'checking for default tty device... ' 
     764if [ -e "$TTY_DEV" ] 
     765then 
     766 echo "$TTY_DEV" 
     767 echo '#define ROAR_DEFAULT_TTY "'"$TTY_DEV"'"' >&3 
     768else 
     769 TTY_DEV=$(ls /dev/tty 2> /dev/null | head -n 1); 
     770 if [ -e "$TTY_DEV" ] 
     771 then 
     772  echo "$TTY_DEV" 
     773  echo '#define ROAR_DEFAULT_TTY "'"$TTY_DEV"'"' >&3 
     774 else 
     775  echo 'none' 
     776 fi 
     777fi 
     778 
    757779echo -n 'checking for OSS device... ' 
    758780if [ -e "$OSS_DEV" ] 
  • libroar/pinentry.c

    r1235 r1237  
    5656 
    5757 if ( tty == NULL ) 
    58   tty = "/dev/tty"; // TODO: make compile time config parameter out of this 
     58#ifdef ROAR_DEFAULT_TTY 
     59  tty = ROAR_DEFAULT_TTY; 
     60#else 
     61  return -1; 
     62#endif 
    5963 
    6064 if ( term == NULL ) 
Note: See TracChangeset for help on using the changeset viewer.