/* * kmputc * * Output a character to the serial console driver via cnputcusr(), * which is exported by that driver. * * Locks: Assumes tp in the calling tty driver code is locked on * entry, remains locked on exit * * Notes: Called from kmoutput(); giving the locking output * assumptions here, this routine should be static (and * inlined, given there is only one call site). */ int kmputc(__unused dev_t dev, char c) { if(!disableConsoleOutput && initialized) { /* OCRNL */ if(c == '\n') cnputcusr('\r'); cnputcusr(c); } return (0); }
int kmputc(__unused dev_t dev, char c) { if( disableConsoleOutput) return( 0); if(!initialized) return( 0); if(c == '\n') cnputcusr('\r'); cnputcusr(c); return 0; }
int kmputc( int c) { if( disableConsoleOutput) return( 0); if(!initialized) return( 0); if(c == '\n') cnputcusr('\r'); cnputcusr(c); return 0; }
int kmgetc(__unused dev_t dev) { int c; c= cngetc(); if (c == '\r') { c = '\n'; } cnputcusr(c); return c; }