Changeset c8dcab1e in rtems


Ignore:
Timestamp:
02/17/09 18:32:44 (15 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.9
Children:
3017689
Parents:
35c7648
Message:

2009-02-17 Till Straumann <strauman@…>

PR 1370/bsps

  • console/console.c: mvme167 console driver BSP_output_char fails to convert \n -> \n\r
Location:
c/src/lib/libbsp/m68k/mvme167
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mvme167/ChangeLog

    r35c7648 rc8dcab1e  
     12009-02-17      Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 1370/bsps
     4        * console/console.c: mvme167 console driver BSP_output_char fails to
     5        convert \n -> \n\r
     6
    172008-12-08      Ralf Corsépius <ralf.corsepius@rtems.org>
    28
  • c/src/lib/libbsp/m68k/mvme167/console/console.c

    r35c7648 rc8dcab1e  
    161161static void _BSP_output_char( char c );
    162162BSP_output_char_function_type BSP_output_char = _BSP_output_char;
     163
     164/* '\r' character in memory. This used to live on
     165 * the stack but storing the '\r' character is
     166 * optimized away by gcc-4.3.2 (since it seems to
     167 * be unused [only referenced from inline assembly
     168 * code in _167Bug_pollWrite()]).
     169 * Hence we make it a global constant.
     170 */
     171static const char cr_char = '\r';
    163172
    164173/* Channel info */
     
    13671376  rtems_libio_rw_args_t *rw_args = arg;
    13681377  uint32_t   i;
    1369   char cr ='\r';
    13701378
    13711379  for( i = 0; i < rw_args->count; i++ ) {
    13721380    _167Bug_pollWrite(minor, &(rw_args->buffer[i]), 1);
    13731381    if ( rw_args->buffer[i] == '\n' )
    1374       _167Bug_pollWrite(minor, &cr, 1);
     1382      _167Bug_pollWrite(minor, &cr_char, 1);
    13751383  }
    13761384  rw_args->bytes_moved = i;
     
    13861394{
    13871395  rtems_device_minor_number printk_minor;
    1388   char cr ='\r';
    13891396
    13901397  /*
     
    14001407  _167Bug_pollWrite(printk_minor, &c, 1);
    14011408  if ( c == '\n' )
    1402       _167Bug_pollWrite(printk_minor, &cr, 1);
     1409      _167Bug_pollWrite(printk_minor, &cr_char, 1);
    14031410}
    14041411
Note: See TracChangeset for help on using the changeset viewer.