forked from Imagelibrary/rtems
2001-04-20 Joel Sherrill <joel@OARcorp.com>
* devnull/devnull.c (null_initialize): Added check to ensure that the driver is only initialized once. Otherwise, it will abort when the device /dev/null is present. (null_write): Do not dereference a NULL pointer.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2001-04-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* devnull/devnull.c (null_initialize): Added check to
|
||||
ensure that the driver is only initialized once. Otherwise,
|
||||
it will abort when the device /dev/null is present.
|
||||
(null_write): Do not dereference a NULL pointer.
|
||||
|
||||
2001-02-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* monitor/mon-command.c: Use #if defined(RTEMS_UNIX).
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
*/
|
||||
|
||||
rtems_unsigned32 NULL_major;
|
||||
static initialized;
|
||||
|
||||
rtems_device_driver null_initialize(
|
||||
rtems_device_major_number major,
|
||||
@@ -41,6 +42,9 @@ rtems_device_driver null_initialize(
|
||||
{
|
||||
rtems_device_driver status;
|
||||
|
||||
if ( !initialized ) {
|
||||
initialized = 1;
|
||||
|
||||
status = rtems_io_register_name(
|
||||
"/dev/null",
|
||||
major,
|
||||
@@ -51,6 +55,7 @@ rtems_device_driver null_initialize(
|
||||
rtems_fatal_error_occurred(status);
|
||||
|
||||
NULL_major = major;
|
||||
}
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
@@ -145,6 +150,7 @@ rtems_device_driver null_write(
|
||||
{
|
||||
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
|
||||
|
||||
if ( rw_args )
|
||||
rw_args->bytes_moved = rw_args->count;
|
||||
|
||||
return NULL_SUCCESSFUL;
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-04-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* devnull/devnull.c (null_initialize): Added check to
|
||||
ensure that the driver is only initialized once. Otherwise,
|
||||
it will abort when the device /dev/null is present.
|
||||
(null_write): Do not dereference a NULL pointer.
|
||||
|
||||
2001-02-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* monitor/mon-command.c: Use #if defined(RTEMS_UNIX).
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
*/
|
||||
|
||||
rtems_unsigned32 NULL_major;
|
||||
static initialized;
|
||||
|
||||
rtems_device_driver null_initialize(
|
||||
rtems_device_major_number major,
|
||||
@@ -41,6 +42,9 @@ rtems_device_driver null_initialize(
|
||||
{
|
||||
rtems_device_driver status;
|
||||
|
||||
if ( !initialized ) {
|
||||
initialized = 1;
|
||||
|
||||
status = rtems_io_register_name(
|
||||
"/dev/null",
|
||||
major,
|
||||
@@ -51,6 +55,7 @@ rtems_device_driver null_initialize(
|
||||
rtems_fatal_error_occurred(status);
|
||||
|
||||
NULL_major = major;
|
||||
}
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
@@ -145,6 +150,7 @@ rtems_device_driver null_write(
|
||||
{
|
||||
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
|
||||
|
||||
if ( rw_args )
|
||||
rw_args->bytes_moved = rw_args->count;
|
||||
|
||||
return NULL_SUCCESSFUL;
|
||||
|
||||
Reference in New Issue
Block a user