4.104.114.84.95
Rev | Line | |
---|
[f8b27df9] | 1 | /* null_initialize |
---|
| 2 | * |
---|
| 3 | * This routine is the null device driver init routine. |
---|
| 4 | * |
---|
| 5 | * Derived from rtems' stub driver. |
---|
| 6 | * |
---|
| 7 | * Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
| 8 | * |
---|
| 9 | * Input parameters: |
---|
| 10 | * major - device major number |
---|
| 11 | * minor - device minor number |
---|
| 12 | * pargp - pointer to parameter block |
---|
| 13 | * |
---|
| 14 | * Output parameters: |
---|
| 15 | * rval - NULL_SUCCESSFUL |
---|
| 16 | * |
---|
[08311cc3] | 17 | * COPYRIGHT (c) 1989-1999. |
---|
[f8b27df9] | 18 | * On-Line Applications Research Corporation (OAR). |
---|
| 19 | * |
---|
| 20 | * The license and distribution terms for this file may be |
---|
| 21 | * found in the file LICENSE in this distribution or at |
---|
| 22 | * http://www.OARcorp.com/rtems/license.html. |
---|
| 23 | * |
---|
| 24 | * $Id$ |
---|
| 25 | */ |
---|
| 26 | |
---|
| 27 | #include <rtems.h> |
---|
| 28 | #include <sh/null.h> |
---|
| 29 | |
---|
| 30 | rtems_unsigned32 NULL_major; |
---|
| 31 | |
---|
| 32 | rtems_device_driver null_initialize( |
---|
| 33 | rtems_device_major_number major, |
---|
| 34 | rtems_device_minor_number minor, |
---|
| 35 | void *pargp |
---|
| 36 | ) |
---|
| 37 | { |
---|
| 38 | rtems_device_driver status ; |
---|
| 39 | |
---|
| 40 | status = rtems_io_register_name( |
---|
| 41 | "/dev/null", |
---|
| 42 | major, |
---|
| 43 | (rtems_device_minor_number) 0 |
---|
| 44 | ); |
---|
| 45 | |
---|
| 46 | if (status != RTEMS_SUCCESSFUL) |
---|
| 47 | rtems_fatal_error_occurred(status); |
---|
| 48 | |
---|
| 49 | NULL_major = major; |
---|
| 50 | |
---|
| 51 | return RTEMS_SUCCESSFUL; |
---|
| 52 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.