summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-28 15:51:01 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-05-28 15:51:01 +0000
commitff3f8c85c3f2098af3ffc8330b3a6cf636035edf (patch)
tree2e766ce877f4653a8146538493f464b8f622dea4 /cpukit/libmisc
parent2007-05-28 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-ff3f8c85c3f2098af3ffc8330b3a6cf636035edf.tar.bz2
2007-05-28 Joel Sherrill <joel.sherrill@OARcorp.com>
* libmisc/Makefile.am, libmisc/monitor/mon-object.c, libmisc/monitor/monitor.h, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/io.h, sapi/src/exinit.c, sapi/src/io.c: Eliminate maximum_drivers configuration parameter since it was used to configure a no longer used feature. Device names are now part of the filesystem not in a table. This also eliminated the variables _IO_Number_of_devices and _IO_Driver_name_table from RTEMS as well as the memory allocation used to populate _IO_Driver_name_table. * libmisc/monitor/mon-dname.c: Removed.
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r--cpukit/libmisc/Makefile.am6
-rw-r--r--cpukit/libmisc/monitor/mon-dname.c116
-rw-r--r--cpukit/libmisc/monitor/mon-object.c11
-rw-r--r--cpukit/libmisc/monitor/monitor.h16
4 files changed, 3 insertions, 146 deletions
diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am
index 33ee30182d..32a2f6abce 100644
--- a/cpukit/libmisc/Makefile.am
+++ b/cpukit/libmisc/Makefile.am
@@ -42,9 +42,9 @@ noinst_LIBRARIES += libmonitor.a
libmonitor_a_SOURCES = monitor/mon-command.c monitor/mon-symbols.c \
monitor/mon-prmisc.c monitor/mon-monitor.c monitor/mon-object.c \
monitor/mon-server.c monitor/mon-task.c monitor/mon-queue.c \
- monitor/mon-driver.c monitor/mon-dname.c monitor/mon-itask.c \
- monitor/mon-extension.c monitor/mon-manager.c monitor/mon-config.c \
- monitor/symbols.h monitor/monitor.h
+ monitor/mon-driver.c monitor/mon-itask.c monitor/mon-extension.c \
+ monitor/mon-manager.c monitor/mon-config.c monitor/symbols.h \
+ monitor/monitor.h
if HAS_MP
libmonitor_a_SOURCES += monitor/mon-mpci.c
endif
diff --git a/cpukit/libmisc/monitor/mon-dname.c b/cpukit/libmisc/monitor/mon-dname.c
deleted file mode 100644
index 4f9cc1aef2..0000000000
--- a/cpukit/libmisc/monitor/mon-dname.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * RTEMS monitor driver names support.
- *
- * There are 2 "driver" things the monitor knows about.
- *
- * 1. Regular RTEMS drivers.
- * This is a table indexed by major device number and
- * containing driver entry points only.
- *
- * 2. Driver name table.
- * A separate table of names for drivers.
- * The table converts driver names to a major number
- * as index into the driver table and a minor number
- * for an argument to driver.
- *
- * Drivers are displayed with 'driver' command.
- * Names are displayed with 'dname' command.
- *
- * $Id$
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
-#include <rtems.h>
-
-#include <rtems/monitor.h>
-
-#include <stdio.h>
-#include <stdlib.h> /* strtoul() */
-#include <string.h> /* strncpy() */
-
-#define DATACOL 15
-#define CONTCOL DATACOL /* continued col */
-
-void
-rtems_monitor_dname_canonical(
- rtems_monitor_dname_t *canonical_dname,
- void *dname_void
-)
-{
- rtems_driver_name_t *np = (rtems_driver_name_t *) dname_void;
-
- (void) strncpy(canonical_dname->name_string, np->device_name, sizeof(canonical_dname->name_string));
- canonical_dname->major = np->major;
- canonical_dname->minor = np->minor;
-}
-
-void *
-rtems_monitor_dname_next(
- void *object_information,
- rtems_monitor_dname_t *canonical_dname,
- rtems_id *next_id
-)
-{
- uint32_t n = rtems_get_index(*next_id);
- rtems_driver_name_t *table = _IO_Driver_name_table;
- rtems_driver_name_t *np = 0;
-
-/* XXX should we be using _IO_Number_of_devices */
- for (np = table + n ; n<_IO_Number_of_devices; n++, np++)
- if (np->device_name)
- goto done;
-
- *next_id = RTEMS_OBJECT_ID_FINAL;
- return 0;
-
-done:
- _Thread_Disable_dispatch();
-
- /*
- * dummy up a fake id and name for this item
- */
-
- canonical_dname->id = n;
- canonical_dname->name = rtems_build_name('-', '-', '-', '-');
-
- *next_id += 1;
- return np;
-}
-
-void
-rtems_monitor_dname_dump_header(
- boolean verbose
-)
-{
- fprintf(stdout,"\
- Major:Minor Name\n");
-/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
-0 1 2 3 4 5 6 7 */
- rtems_monitor_separator();
-}
-
-void
-rtems_monitor_dname_dump(
- rtems_monitor_dname_t *monitor_dname,
- boolean verbose
-)
-{
- uint32_t length = 0;
-
- length += rtems_monitor_pad(6, length);
- length += rtems_monitor_dump_hex(monitor_dname->major);
- length += fprintf(stdout,":");
- length += rtems_monitor_dump_hex(monitor_dname->minor);
-
- length += rtems_monitor_pad(16, length);
- length += fprintf(stdout,"%.*s",
- (int) sizeof(monitor_dname->name_string),
- (char *) monitor_dname->name_string);
-
- length += fprintf(stdout,"\n");
- length = 0;
-}
diff --git a/cpukit/libmisc/monitor/mon-object.c b/cpukit/libmisc/monitor/mon-object.c
index 026dfefb33..472b5c2d88 100644
--- a/cpukit/libmisc/monitor/mon-object.c
+++ b/cpukit/libmisc/monitor/mon-object.c
@@ -100,17 +100,6 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
(rtems_monitor_object_dump_header_fn) rtems_monitor_driver_dump_header,
(rtems_monitor_object_dump_fn) rtems_monitor_driver_dump,
},
- { RTEMS_MONITOR_OBJECT_DNAME,
- /* XXX now that the driver name table is allocated from the */
- /* XXX Workspace, this does not work */
- (void *) 0,
- /* (void *) _IO_Driver_name_table, */
- sizeof(rtems_monitor_dname_t),
- (rtems_monitor_object_next_fn) rtems_monitor_dname_next,
- (rtems_monitor_object_canonical_fn) rtems_monitor_dname_canonical,
- (rtems_monitor_object_dump_header_fn) rtems_monitor_dname_dump_header,
- (rtems_monitor_object_dump_fn) rtems_monitor_dname_dump,
- },
};
/*
diff --git a/cpukit/libmisc/monitor/monitor.h b/cpukit/libmisc/monitor/monitor.h
index 81c533f877..581ebc286c 100644
--- a/cpukit/libmisc/monitor/monitor.h
+++ b/cpukit/libmisc/monitor/monitor.h
@@ -168,15 +168,6 @@ typedef struct {
rtems_monitor_symbol_t control; /* special functions procedure */
} rtems_monitor_driver_t;
-typedef struct {
- rtems_id id; /* not used for drivers (yet) */
- rtems_name name; /* not used for drivers (yet) */
- /* end of common portion */
- uint32_t major;
- uint32_t minor;
- char name_string[64];
-} rtems_monitor_dname_t;
-
/*
* System config
*/
@@ -229,7 +220,6 @@ typedef union {
rtems_monitor_queue_t queue;
rtems_monitor_extension_t extension;
rtems_monitor_driver_t driver;
- rtems_monitor_dname_t dname;
rtems_monitor_config_t config;
#if defined(RTEMS_MULTIPROCESSING)
rtems_monitor_mpci_t mpci;
@@ -422,12 +412,6 @@ void rtems_monitor_driver_canonical(rtems_monitor_driver_t *, void *);
void rtems_monitor_driver_dump_header(boolean);
void rtems_monitor_driver_dump(rtems_monitor_driver_t *, boolean);
-/* dname.c */
-void *rtems_monitor_dname_next(void *, rtems_monitor_dname_t *, rtems_id *);
-void rtems_monitor_dname_canonical(rtems_monitor_dname_t *, void *);
-void rtems_monitor_dname_dump_header(boolean);
-void rtems_monitor_dname_dump(rtems_monitor_dname_t *, boolean);
-
/* symbols.c */
rtems_symbol_table_t *rtems_symbol_table_create();
void rtems_symbol_table_destroy(rtems_symbol_table_t *table);