forked from Imagelibrary/rtems
Modifications for RTEMS_UNIX.
This commit is contained in:
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#include <fcntl.h> /* O_RDONLY, et.al. */
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if ! defined(O_NDELAY)
|
||||
# if defined(solaris2)
|
||||
@@ -36,6 +37,10 @@ extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(ENOTSUP)
|
||||
#define ENOTSUP EOPNOTSUPP
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef _RTEMS_LIBIO_H
|
||||
#define _RTEMS_LIBIO_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#include <fcntl.h> /* O_RDONLY, et.al. */
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if ! defined(O_NDELAY)
|
||||
# if defined(solaris2)
|
||||
@@ -36,6 +37,10 @@ extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(ENOTSUP)
|
||||
#define ENOTSUP EOPNOTSUPP
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -40,6 +40,7 @@ mode_t rtems_filesystem_umask;
|
||||
|
||||
void rtems_filesystem_initialize( void )
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
int status;
|
||||
rtems_filesystem_mount_table_entry_t *first_entry;
|
||||
|
||||
@@ -78,4 +79,5 @@ void rtems_filesystem_initialize( void )
|
||||
status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
|
||||
if ( status != 0 )
|
||||
rtems_fatal_error_occurred( 0xABCD0003 );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -24,6 +26,10 @@
|
||||
#include "libio_.h"
|
||||
#include "imfs.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
#define S_IFCHR __S_IFCHR
|
||||
#endif
|
||||
|
||||
/*
|
||||
* rtems_io_register_name
|
||||
*
|
||||
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
|
||||
rtems_device_minor_number minor
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
int status;
|
||||
dev_t dev;
|
||||
|
||||
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
|
||||
if ( status )
|
||||
return RTEMS_TOO_MANY;
|
||||
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
|
||||
rtems_driver_name_t **device_info
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
IMFS_jnode_t *the_jnode;
|
||||
rtems_filesystem_location_info_t temp_loc;
|
||||
static rtems_driver_name_t device;
|
||||
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
|
||||
device.major = the_jnode->info.device.major;
|
||||
device.minor = the_jnode->info.device.minor;
|
||||
*device_info = &device;
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef _RTEMS_LIBIO_H
|
||||
#define _RTEMS_LIBIO_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#include <fcntl.h> /* O_RDONLY, et.al. */
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if ! defined(O_NDELAY)
|
||||
# if defined(solaris2)
|
||||
@@ -36,6 +37,10 @@ extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(ENOTSUP)
|
||||
#define ENOTSUP EOPNOTSUPP
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -40,6 +40,7 @@ mode_t rtems_filesystem_umask;
|
||||
|
||||
void rtems_filesystem_initialize( void )
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
int status;
|
||||
rtems_filesystem_mount_table_entry_t *first_entry;
|
||||
|
||||
@@ -78,4 +79,5 @@ void rtems_filesystem_initialize( void )
|
||||
status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
|
||||
if ( status != 0 )
|
||||
rtems_fatal_error_occurred( 0xABCD0003 );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -24,6 +26,10 @@
|
||||
#include "libio_.h"
|
||||
#include "imfs.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
#define S_IFCHR __S_IFCHR
|
||||
#endif
|
||||
|
||||
/*
|
||||
* rtems_io_register_name
|
||||
*
|
||||
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
|
||||
rtems_device_minor_number minor
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
int status;
|
||||
dev_t dev;
|
||||
|
||||
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
|
||||
if ( status )
|
||||
return RTEMS_TOO_MANY;
|
||||
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
|
||||
rtems_driver_name_t **device_info
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
IMFS_jnode_t *the_jnode;
|
||||
rtems_filesystem_location_info_t temp_loc;
|
||||
static rtems_driver_name_t device;
|
||||
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
|
||||
device.major = the_jnode->info.device.major;
|
||||
device.minor = the_jnode->info.device.minor;
|
||||
*device_info = &device;
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef _RTEMS_LIBIO_H
|
||||
#define _RTEMS_LIBIO_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#include <fcntl.h> /* O_RDONLY, et.al. */
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if ! defined(O_NDELAY)
|
||||
# if defined(solaris2)
|
||||
@@ -36,6 +37,10 @@ extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(ENOTSUP)
|
||||
#define ENOTSUP EOPNOTSUPP
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -24,6 +26,10 @@
|
||||
#include "libio_.h"
|
||||
#include "imfs.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
#define S_IFCHR __S_IFCHR
|
||||
#endif
|
||||
|
||||
/*
|
||||
* rtems_io_register_name
|
||||
*
|
||||
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
|
||||
rtems_device_minor_number minor
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
int status;
|
||||
dev_t dev;
|
||||
|
||||
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
|
||||
if ( status )
|
||||
return RTEMS_TOO_MANY;
|
||||
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
|
||||
rtems_driver_name_t **device_info
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
IMFS_jnode_t *the_jnode;
|
||||
rtems_filesystem_location_info_t temp_loc;
|
||||
static rtems_driver_name_t device;
|
||||
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
|
||||
device.major = the_jnode->info.device.major;
|
||||
device.minor = the_jnode->info.device.minor;
|
||||
*device_info = &device;
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#include <fcntl.h> /* O_RDONLY, et.al. */
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if ! defined(O_NDELAY)
|
||||
# if defined(solaris2)
|
||||
@@ -36,6 +37,10 @@ extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(ENOTSUP)
|
||||
#define ENOTSUP EOPNOTSUPP
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#ifndef _RTEMS_LIBIO_H
|
||||
#define _RTEMS_LIBIO_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -27,6 +27,7 @@ extern "C" {
|
||||
#include <fcntl.h> /* O_RDONLY, et.al. */
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if ! defined(O_NDELAY)
|
||||
# if defined(solaris2)
|
||||
@@ -36,6 +37,10 @@ extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(ENOTSUP)
|
||||
#define ENOTSUP EOPNOTSUPP
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h> /* strcmp */
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -40,6 +40,7 @@ mode_t rtems_filesystem_umask;
|
||||
|
||||
void rtems_filesystem_initialize( void )
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
int status;
|
||||
rtems_filesystem_mount_table_entry_t *first_entry;
|
||||
|
||||
@@ -78,4 +79,5 @@ void rtems_filesystem_initialize( void )
|
||||
status = mkdir( "/dev", S_IRWXU | S_IRWXG | S_IRWXO );
|
||||
if ( status != 0 )
|
||||
rtems_fatal_error_occurred( 0xABCD0003 );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -24,6 +26,10 @@
|
||||
#include "libio_.h"
|
||||
#include "imfs.h"
|
||||
|
||||
#if defined(__linux__)
|
||||
#define S_IFCHR __S_IFCHR
|
||||
#endif
|
||||
|
||||
/*
|
||||
* rtems_io_register_name
|
||||
*
|
||||
@@ -36,6 +42,7 @@ rtems_status_code rtems_io_register_name(
|
||||
rtems_device_minor_number minor
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
int status;
|
||||
dev_t dev;
|
||||
|
||||
@@ -46,6 +53,7 @@ rtems_status_code rtems_io_register_name(
|
||||
if ( status )
|
||||
return RTEMS_TOO_MANY;
|
||||
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -60,6 +68,7 @@ rtems_status_code rtems_io_lookup_name(
|
||||
rtems_driver_name_t **device_info
|
||||
)
|
||||
{
|
||||
#if !defined(RTEMS_UNIX)
|
||||
IMFS_jnode_t *the_jnode;
|
||||
rtems_filesystem_location_info_t temp_loc;
|
||||
static rtems_driver_name_t device;
|
||||
@@ -78,6 +87,6 @@ rtems_status_code rtems_io_lookup_name(
|
||||
device.major = the_jnode->info.device.major;
|
||||
device.minor = the_jnode->info.device.minor;
|
||||
*device_info = &device;
|
||||
#endif
|
||||
return RTEMS_SUCCESSFUL;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user