forked from Imagelibrary/rtems
2001-01-05 Joel Sherrill <joel@OARcorp.com>
* devnull: New addition. Moved from libcpu/sh. * devnull/devnull.c, devnull/devnull.h, devnull/.cvsignore, devnull/Makefile.am: New files. * Makefile.am, configure.in, wrapup/Makefile.am: Modified to reflect addition of above.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2001-01-05 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* devnull: New addition. Moved from libcpu/sh.
|
||||||
|
* devnull/devnull.c, devnull/devnull.h, devnull/.cvsignore,
|
||||||
|
devnull/Makefile.am: New files.
|
||||||
|
* Makefile.am, configure.in, wrapup/Makefile.am: Modified to reflect
|
||||||
|
addition of above.
|
||||||
|
|
||||||
2000-11-30 Joel Sherrill <joel@OARcorp.com>
|
2000-11-30 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* mw-fb/mw_uid.c: Removed unnecessary dependency on <bsp.h>.
|
* mw-fb/mw_uid.c: Removed unnecessary dependency on <bsp.h>.
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign 1.4
|
AUTOMAKE_OPTIONS = foreign 1.4
|
||||||
ACLOCAL_AMFLAGS = -I ../../../aclocal
|
ACLOCAL_AMFLAGS = -I ../../../aclocal
|
||||||
|
|
||||||
SUBDIRS = dummy dumpbuf stackchk monitor cpuuse rtmonuse untar mw-fb wrapup
|
SUBDIRS = devnull dummy dumpbuf stackchk monitor cpuuse rtmonuse untar \
|
||||||
|
mw-fb wrapup
|
||||||
|
|
||||||
EXTRA_DIST = README
|
EXTRA_DIST = README
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes")
|
|||||||
AC_OUTPUT(
|
AC_OUTPUT(
|
||||||
Makefile
|
Makefile
|
||||||
cpuuse/Makefile
|
cpuuse/Makefile
|
||||||
|
devnull/Makefile
|
||||||
dummy/Makefile
|
dummy/Makefile
|
||||||
dumpbuf/Makefile
|
dumpbuf/Makefile
|
||||||
monitor/Makefile
|
monitor/Makefile
|
||||||
|
|||||||
2
c/src/libmisc/devnull/.cvsignore
Normal file
2
c/src/libmisc/devnull/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
43
c/src/libmisc/devnull/Makefile.am
Normal file
43
c/src/libmisc/devnull/Makefile.am
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
##
|
||||||
|
## $Id$
|
||||||
|
##
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign 1.4
|
||||||
|
|
||||||
|
LIBNAME = libdevnull-tmp
|
||||||
|
LIB = $(ARCH)/$(LIBNAME).a
|
||||||
|
|
||||||
|
|
||||||
|
C_FILES = devnull.c
|
||||||
|
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
|
||||||
|
|
||||||
|
H_FILES = devnull.h
|
||||||
|
|
||||||
|
OBJS = $(C_O_FILES)
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||||
|
include $(top_srcdir)/../../../automake/compile.am
|
||||||
|
include $(top_srcdir)/../../../automake/lib.am
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/rtems:
|
||||||
|
@$(mkinstalldirs) $@
|
||||||
|
$(PROJECT_INCLUDE)/rtems/%.h: %.h
|
||||||
|
$(INSTALL_DATA) $< $@
|
||||||
|
|
||||||
|
#
|
||||||
|
# (OPTIONAL) Add local stuff here using +=
|
||||||
|
#
|
||||||
|
|
||||||
|
$(LIB): $(OBJS)
|
||||||
|
$(make-library)
|
||||||
|
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
|
||||||
|
$(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
|
||||||
|
|
||||||
|
all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
|
||||||
|
|
||||||
|
.PRECIOUS: $(LIB)
|
||||||
|
|
||||||
|
EXTRA_DIST = devnull.c
|
||||||
|
|
||||||
|
include $(top_srcdir)/../../../automake/local.am
|
||||||
174
c/src/libmisc/devnull/devnull.c
Normal file
174
c/src/libmisc/devnull/devnull.c
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
/* /dev/null
|
||||||
|
*
|
||||||
|
* Derived from rtems' stub driver.
|
||||||
|
*
|
||||||
|
* Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-2000.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <rtems.h>
|
||||||
|
#include <rtems/devnull.h>
|
||||||
|
#include <rtems/libio.h>
|
||||||
|
|
||||||
|
/* null_initialize
|
||||||
|
*
|
||||||
|
* This routine is the null device driver init routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_unsigned32 NULL_major;
|
||||||
|
|
||||||
|
rtems_device_driver null_initialize(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_device_driver status ;
|
||||||
|
|
||||||
|
status = rtems_io_register_name(
|
||||||
|
"/dev/null",
|
||||||
|
major,
|
||||||
|
(rtems_device_minor_number) 0
|
||||||
|
);
|
||||||
|
|
||||||
|
if (status != RTEMS_SUCCESSFUL)
|
||||||
|
rtems_fatal_error_occurred(status);
|
||||||
|
|
||||||
|
NULL_major = major;
|
||||||
|
|
||||||
|
return RTEMS_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* null_open
|
||||||
|
*
|
||||||
|
* This routine is the null device driver open routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargb - pointer to open parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_open(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_close
|
||||||
|
*
|
||||||
|
* This routine is the null device driver close routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargb - pointer to close parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_close(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_read
|
||||||
|
*
|
||||||
|
* This routine is the null device driver read routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to read parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_read(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_write
|
||||||
|
*
|
||||||
|
* This routine is the null device driver write routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to write parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_write(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp ;
|
||||||
|
|
||||||
|
rw_args->bytes_moved = rw_args->count ;
|
||||||
|
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_control
|
||||||
|
*
|
||||||
|
* This routine is the null device driver control routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to cntrl parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_control(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
71
c/src/libmisc/devnull/devnull.h
Normal file
71
c/src/libmisc/devnull/devnull.h
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/* devnull.h
|
||||||
|
*
|
||||||
|
* Null device driver, derived from rtems' stub driver.
|
||||||
|
*
|
||||||
|
* Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-2000.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __NULL_DRIVER_h
|
||||||
|
#define __NULL_DRIVER_h
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DEVNULL_DRIVER_TABLE_ENTRY \
|
||||||
|
{ null_initialize, null_open, null_close, null_read, \
|
||||||
|
null_write, null_control }
|
||||||
|
|
||||||
|
#define NULL_SUCCESSFUL RTEMS_SUCCESSFUL
|
||||||
|
|
||||||
|
rtems_device_driver null_initialize(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_open(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_close(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_read(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_write(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_control(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
/* end of include file */
|
||||||
@@ -14,7 +14,8 @@ include $(top_srcdir)/../../../automake/lib.am
|
|||||||
TMP_LIBS = ../monitor/$(ARCH)/libmonitor-tmp.a \
|
TMP_LIBS = ../monitor/$(ARCH)/libmonitor-tmp.a \
|
||||||
../untar/$(ARCH)/libuntar-tmp.a ../stackchk/$(ARCH)/libstackchk-tmp.a \
|
../untar/$(ARCH)/libuntar-tmp.a ../stackchk/$(ARCH)/libstackchk-tmp.a \
|
||||||
../cpuuse/$(ARCH)/libcpuuse-tmp.a ../rtmonuse/$(ARCH)/librtmonuse-tmp.a \
|
../cpuuse/$(ARCH)/libcpuuse-tmp.a ../rtmonuse/$(ARCH)/librtmonuse-tmp.a \
|
||||||
../dumpbuf/$(ARCH)/libdumpbuf-tmp.a ../mw-fb/$(ARCH)/libmw-fb-tmp.a
|
../dumpbuf/$(ARCH)/libdumpbuf-tmp.a ../devnull/$(ARCH)/libdevnull-tmp.a \
|
||||||
|
../mw-fb/$(ARCH)/libmw-fb-tmp.a
|
||||||
|
|
||||||
$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
|
$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
|
||||||
$(INSTALL_DATA) $< $@
|
$(INSTALL_DATA) $< $@
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
2001-01-05 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
|
* devnull: New addition. Moved from libcpu/sh.
|
||||||
|
* devnull/devnull.c, devnull/devnull.h, devnull/.cvsignore,
|
||||||
|
devnull/Makefile.am: New files.
|
||||||
|
* Makefile.am, configure.in, wrapup/Makefile.am: Modified to reflect
|
||||||
|
addition of above.
|
||||||
|
|
||||||
2000-11-30 Joel Sherrill <joel@OARcorp.com>
|
2000-11-30 Joel Sherrill <joel@OARcorp.com>
|
||||||
|
|
||||||
* mw-fb/mw_uid.c: Removed unnecessary dependency on <bsp.h>.
|
* mw-fb/mw_uid.c: Removed unnecessary dependency on <bsp.h>.
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
AUTOMAKE_OPTIONS = foreign 1.4
|
AUTOMAKE_OPTIONS = foreign 1.4
|
||||||
ACLOCAL_AMFLAGS = -I ../../../aclocal
|
ACLOCAL_AMFLAGS = -I ../../../aclocal
|
||||||
|
|
||||||
SUBDIRS = dummy dumpbuf stackchk monitor cpuuse rtmonuse untar mw-fb wrapup
|
SUBDIRS = devnull dummy dumpbuf stackchk monitor cpuuse rtmonuse untar \
|
||||||
|
mw-fb wrapup
|
||||||
|
|
||||||
EXTRA_DIST = README
|
EXTRA_DIST = README
|
||||||
|
|
||||||
|
|||||||
2
cpukit/libmisc/devnull/.cvsignore
Normal file
2
cpukit/libmisc/devnull/.cvsignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
43
cpukit/libmisc/devnull/Makefile.am
Normal file
43
cpukit/libmisc/devnull/Makefile.am
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
##
|
||||||
|
## $Id$
|
||||||
|
##
|
||||||
|
|
||||||
|
AUTOMAKE_OPTIONS = foreign 1.4
|
||||||
|
|
||||||
|
LIBNAME = libdevnull-tmp
|
||||||
|
LIB = $(ARCH)/$(LIBNAME).a
|
||||||
|
|
||||||
|
|
||||||
|
C_FILES = devnull.c
|
||||||
|
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
|
||||||
|
|
||||||
|
H_FILES = devnull.h
|
||||||
|
|
||||||
|
OBJS = $(C_O_FILES)
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
|
||||||
|
include $(top_srcdir)/../../../automake/compile.am
|
||||||
|
include $(top_srcdir)/../../../automake/lib.am
|
||||||
|
|
||||||
|
$(PROJECT_INCLUDE)/rtems:
|
||||||
|
@$(mkinstalldirs) $@
|
||||||
|
$(PROJECT_INCLUDE)/rtems/%.h: %.h
|
||||||
|
$(INSTALL_DATA) $< $@
|
||||||
|
|
||||||
|
#
|
||||||
|
# (OPTIONAL) Add local stuff here using +=
|
||||||
|
#
|
||||||
|
|
||||||
|
$(LIB): $(OBJS)
|
||||||
|
$(make-library)
|
||||||
|
|
||||||
|
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems \
|
||||||
|
$(H_FILES:%=$(PROJECT_INCLUDE)/rtems/%)
|
||||||
|
|
||||||
|
all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
|
||||||
|
|
||||||
|
.PRECIOUS: $(LIB)
|
||||||
|
|
||||||
|
EXTRA_DIST = devnull.c
|
||||||
|
|
||||||
|
include $(top_srcdir)/../../../automake/local.am
|
||||||
174
cpukit/libmisc/devnull/devnull.c
Normal file
174
cpukit/libmisc/devnull/devnull.c
Normal file
@@ -0,0 +1,174 @@
|
|||||||
|
/* /dev/null
|
||||||
|
*
|
||||||
|
* Derived from rtems' stub driver.
|
||||||
|
*
|
||||||
|
* Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-2000.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <rtems.h>
|
||||||
|
#include <rtems/devnull.h>
|
||||||
|
#include <rtems/libio.h>
|
||||||
|
|
||||||
|
/* null_initialize
|
||||||
|
*
|
||||||
|
* This routine is the null device driver init routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_unsigned32 NULL_major;
|
||||||
|
|
||||||
|
rtems_device_driver null_initialize(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_device_driver status ;
|
||||||
|
|
||||||
|
status = rtems_io_register_name(
|
||||||
|
"/dev/null",
|
||||||
|
major,
|
||||||
|
(rtems_device_minor_number) 0
|
||||||
|
);
|
||||||
|
|
||||||
|
if (status != RTEMS_SUCCESSFUL)
|
||||||
|
rtems_fatal_error_occurred(status);
|
||||||
|
|
||||||
|
NULL_major = major;
|
||||||
|
|
||||||
|
return RTEMS_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* null_open
|
||||||
|
*
|
||||||
|
* This routine is the null device driver open routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargb - pointer to open parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_open(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_close
|
||||||
|
*
|
||||||
|
* This routine is the null device driver close routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargb - pointer to close parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_close(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_read
|
||||||
|
*
|
||||||
|
* This routine is the null device driver read routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to read parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_read(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_write
|
||||||
|
*
|
||||||
|
* This routine is the null device driver write routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to write parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_write(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp ;
|
||||||
|
|
||||||
|
rw_args->bytes_moved = rw_args->count ;
|
||||||
|
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* null_control
|
||||||
|
*
|
||||||
|
* This routine is the null device driver control routine.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* major - device major number
|
||||||
|
* minor - device minor number
|
||||||
|
* pargp - pointer to cntrl parameter block
|
||||||
|
*
|
||||||
|
* Output parameters:
|
||||||
|
* rval - NULL_SUCCESSFUL
|
||||||
|
*/
|
||||||
|
|
||||||
|
rtems_device_driver null_control(
|
||||||
|
rtems_device_major_number major,
|
||||||
|
rtems_device_minor_number minor,
|
||||||
|
void *pargp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return NULL_SUCCESSFUL;
|
||||||
|
}
|
||||||
71
cpukit/libmisc/devnull/devnull.h
Normal file
71
cpukit/libmisc/devnull/devnull.h
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
/* devnull.h
|
||||||
|
*
|
||||||
|
* Null device driver, derived from rtems' stub driver.
|
||||||
|
*
|
||||||
|
* Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
|
||||||
|
*
|
||||||
|
* COPYRIGHT (c) 1989-2000.
|
||||||
|
* On-Line Applications Research Corporation (OAR).
|
||||||
|
*
|
||||||
|
* The license and distribution terms for this file may be
|
||||||
|
* found in the file LICENSE in this distribution or at
|
||||||
|
* http://www.OARcorp.com/rtems/license.html.
|
||||||
|
*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __NULL_DRIVER_h
|
||||||
|
#define __NULL_DRIVER_h
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DEVNULL_DRIVER_TABLE_ENTRY \
|
||||||
|
{ null_initialize, null_open, null_close, null_read, \
|
||||||
|
null_write, null_control }
|
||||||
|
|
||||||
|
#define NULL_SUCCESSFUL RTEMS_SUCCESSFUL
|
||||||
|
|
||||||
|
rtems_device_driver null_initialize(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_open(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_close(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_read(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_write(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
rtems_device_driver null_control(
|
||||||
|
rtems_device_major_number,
|
||||||
|
rtems_device_minor_number,
|
||||||
|
void *
|
||||||
|
);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
/* end of include file */
|
||||||
@@ -14,7 +14,8 @@ include $(top_srcdir)/../../../automake/lib.am
|
|||||||
TMP_LIBS = ../monitor/$(ARCH)/libmonitor-tmp.a \
|
TMP_LIBS = ../monitor/$(ARCH)/libmonitor-tmp.a \
|
||||||
../untar/$(ARCH)/libuntar-tmp.a ../stackchk/$(ARCH)/libstackchk-tmp.a \
|
../untar/$(ARCH)/libuntar-tmp.a ../stackchk/$(ARCH)/libstackchk-tmp.a \
|
||||||
../cpuuse/$(ARCH)/libcpuuse-tmp.a ../rtmonuse/$(ARCH)/librtmonuse-tmp.a \
|
../cpuuse/$(ARCH)/libcpuuse-tmp.a ../rtmonuse/$(ARCH)/librtmonuse-tmp.a \
|
||||||
../dumpbuf/$(ARCH)/libdumpbuf-tmp.a ../mw-fb/$(ARCH)/libmw-fb-tmp.a
|
../dumpbuf/$(ARCH)/libdumpbuf-tmp.a ../devnull/$(ARCH)/libdevnull-tmp.a \
|
||||||
|
../mw-fb/$(ARCH)/libmw-fb-tmp.a
|
||||||
|
|
||||||
$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
|
$(PROJECT_RELEASE)/lib/$(LIBNAME)$(LIB_VARIANT).a: $(LIB)
|
||||||
$(INSTALL_DATA) $< $@
|
$(INSTALL_DATA) $< $@
|
||||||
|
|||||||
Reference in New Issue
Block a user