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