Changeset 331d9e3b in rtems


Ignore:
Timestamp:
Nov 8, 1996, 8:08:52 PM (25 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f4b7e297
Parents:
9e406d9
Message:

Added asserts for unhandled conditions which need to result in error
statuses being returned to gnat runtime in order for it to raise
use_errors. This was needed to identify the places in gnat's runtime
which needed to be addressed.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libcsupport/src/libio.c

    r9e406d9 r331d9e3b  
    1111#include <stdio.h>                      /* O_RDONLY, et.al. */
    1212#include <fcntl.h>                      /* O_RDONLY, et.al. */
     13#include <assert.h>
    1314
    1415#if ! defined(O_NDELAY)
     
    253254    rtems_libio_open_close_args_t args;
    254255
    255     if ((rc = rtems_io_lookup_name(pathname, &np)) != RTEMS_SUCCESSFUL)
     256    if ((rc = rtems_io_lookup_name(pathname, &np)) != RTEMS_SUCCESSFUL) {
     257      if ( rc == RTEMS_UNSATISFIED ) {
     258        puts( "open -- ENOSYS case" );
     259        assert( 0 );
     260      }
    256261        goto done;
     262    }
    257263
    258264    iop = rtems_libio_allocate();
     
    274280   
    275281done:
     282 
    276283    if (rc != RTEMS_SUCCESSFUL)
    277284    {
  • c/src/lib/libc/libio.c

    r9e406d9 r331d9e3b  
    1111#include <stdio.h>                      /* O_RDONLY, et.al. */
    1212#include <fcntl.h>                      /* O_RDONLY, et.al. */
     13#include <assert.h>
    1314
    1415#if ! defined(O_NDELAY)
     
    253254    rtems_libio_open_close_args_t args;
    254255
    255     if ((rc = rtems_io_lookup_name(pathname, &np)) != RTEMS_SUCCESSFUL)
     256    if ((rc = rtems_io_lookup_name(pathname, &np)) != RTEMS_SUCCESSFUL) {
     257      if ( rc == RTEMS_UNSATISFIED ) {
     258        puts( "open -- ENOSYS case" );
     259        assert( 0 );
     260      }
    256261        goto done;
     262    }
    257263
    258264    iop = rtems_libio_allocate();
     
    274280   
    275281done:
     282 
    276283    if (rc != RTEMS_SUCCESSFUL)
    277284    {
  • c/src/lib/libc/syscalls.c

    r9e406d9 r331d9e3b  
    2323#include <sys/types.h>
    2424#include <sys/stat.h>
     25#include <assert.h>
    2526
    2627/*
     
    3132int __fstat(int _fd, struct stat* _sbuf)
    3233{
     34  if ( _fd > 2 ) {
     35    puts( "__fstat -- only stdio supported" );
     36    assert( 0 );
     37  }
    3338  _sbuf->st_mode = S_IFCHR;
    3439#ifdef HAVE_BLKSIZE
     
    4550int stat( const char *path, struct stat *buf )
    4651{
     52  if ( strncmp( "/dev/", path, 5 ) ) {
     53    puts( "stat -- non-devices not supported" );
     54    assert( 0 );
     55  }
    4756  return __fstat( 0, buf );
    4857}
  • cpukit/libcsupport/src/libio.c

    r9e406d9 r331d9e3b  
    1111#include <stdio.h>                      /* O_RDONLY, et.al. */
    1212#include <fcntl.h>                      /* O_RDONLY, et.al. */
     13#include <assert.h>
    1314
    1415#if ! defined(O_NDELAY)
     
    253254    rtems_libio_open_close_args_t args;
    254255
    255     if ((rc = rtems_io_lookup_name(pathname, &np)) != RTEMS_SUCCESSFUL)
     256    if ((rc = rtems_io_lookup_name(pathname, &np)) != RTEMS_SUCCESSFUL) {
     257      if ( rc == RTEMS_UNSATISFIED ) {
     258        puts( "open -- ENOSYS case" );
     259        assert( 0 );
     260      }
    256261        goto done;
     262    }
    257263
    258264    iop = rtems_libio_allocate();
     
    274280   
    275281done:
     282 
    276283    if (rc != RTEMS_SUCCESSFUL)
    277284    {
Note: See TracChangeset for help on using the changeset viewer.