Ticket #1479: patch

File patch, 2.5 KB (added by Eric Norum, on 12/08/09 at 15:42:51)

Patch to use strcat as intended.

  • ChangeLog

    RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/m68k/mvme167/ChangeLog,v
    retrieving revision 1.124
    diff -u -r1.124 ChangeLog
     
     12009-12-08      Eric Norum <wenorum@lbl.gov>
     2
     3        PR 1479/bsps
     4        * fatal/bspfatal.c: Complete strcat conversion.
     5
    162009-10-21      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
    38        * make/custom/mvme167.cfg: Remove RTEMS_BSP_FAMILY.
  • fatal/bspfatal.c

    RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/m68k/mvme167/fatal/bspfatal.c,v
    retrieving revision 1.8
    diff -u -r1.8 bspfatal.c
     
    4646    char strbuf[254];   /* In case count is bumped up by one by 167Bug */
    4747  } my_p_str;
    4848
    49   my_p_str.index = 0;
    50   my_p_str.index += strcat(
    51       my_p_str.strbuf + my_p_str.index,
     49  strcat(my_p_str.strbuf,
    5250      "\r\nRTEMS Fatal Error Occurred:\r\n    the_source  = " );
    5351
    5452  switch ( the_source ) {
    5553    case INTERNAL_ERROR_CORE:
    56       my_p_str.index += strcat(
    57           my_p_str.strbuf + my_p_str.index,
     54      strcat(my_p_str.strbuf,
    5855          "INTERNAL_ERROR_CORE\r\n    is_internal = " );
    5956      break;
    6057
    6158    case INTERNAL_ERROR_RTEMS_API:
    62       my_p_str.index += strcat(
    63           my_p_str.strbuf + my_p_str.index,
     59      strcat(my_p_str.strbuf,
    6460          "INTERNAL_ERROR_RTEMS_API\r\n    is_internal = " );
    6561      break;
    6662
    6763    case INTERNAL_ERROR_POSIX_API:
    68       my_p_str.index += strcat(
    69           my_p_str.strbuf + my_p_str.index,
     64      strcat(my_p_str.strbuf,
    7065          "INTERNAL_ERROR_POSIX_API\r\n    is_internal = " );
    7166      break;
    7267
    7368    default:
    74       my_p_str.index += strcat(
    75           my_p_str.strbuf + my_p_str.index,
     69      strcat(my_p_str.strbuf,
    7670          "UNKNOWN\r\n    is_internal = " );
    7771      break;
    7872  }
    7973
    8074  if ( is_internal )
    81     my_p_str.index += strcat(
    82         my_p_str.strbuf + my_p_str.index,
     75    strcat(my_p_str.strbuf,
    8376        "TRUE\r\n    the_error   = 0x|10,8|\r\n" );
    8477  else
    85     my_p_str.index += strcat(
    86         my_p_str.strbuf + my_p_str.index,
     78    strcat(my_p_str.strbuf,
    8779        "FALSE\r\n    the_error   = 0x|10,8|\r\n" );
    8880
     81  my_p_str.index = strlen(my_p_str.strbuf);
    8982  lcsr->intr_ena = 0;               /* disable interrupts */
    9083  m68k_set_vbr(0xFFE00000);         /* restore 167Bug vectors */
    9184