[RTEMS Project] #2786: Remove the devfs in favor of a stripped down IMFS configuration

RTEMS trac trac at rtems.org
Tue Sep 20 05:38:08 UTC 2016

#2786: Remove the devfs in favor of a stripped down IMFS configuration
 Reporter:  sebastian.huber  |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  4.12
Component:  filesystem       |     Version:  4.12
 Severity:  normal           |  Resolution:
 Keywords:                   |

Comment (by sebastian.huber):

 The devfs has some design flaws.

 * It uses a link-time configured fixed-size table to store the devices.

 * It uses the standard RTEMS drivers.

 The standard RTEMS drivers have some design flaws

 * They use a link-time configured fixed-size table.  A const array of
 handlers is copied into one of the table entries via
 rtems_io_register_driver(), e.g. size is doubled.

 * They are not able to fully support the handlers available via the
 filesystem layer (rtems_filesystem_file_handlers_r), e.g. no kqueue(),

 * There is a considerable layering before you reach the device handler
 with a parameter pack/unpack, e.g.

 #0  rtems_termios_write (arg=0x2046a50) at
 #1  0x0201ad48 in rtems_io_write (major=major at entry=0,
 minor=minor at entry=0, argument=argument at entry=0x2046a50) at
 #2  0x0201aa84 in rtems_deviceio_write (iop=0x2027bb0
 <rtems_libio_iops+112>, buf=0x2021550 <_rodata_start+128>, nbyte=20,
 major=0, minor=0) at
 #3  0x02021310 in write (fd=<optimized out>, buffer=0x2021550
 <_rodata_start+128>, count=20) at


 #0  rtems_termios_imfs_write (iop=0x20c1d0 <rtems_libio_iops+112>,
 buffer=0x1300a0, count=20) at
 #1  0x0012fbcc in write (fd=2, buffer=0x1300a0, count=20) at

 For an example how IMFS can be configured, see fstests/fsimfsconfig0[123].

Ticket URL: <http://devel.rtems.org/ticket/2786#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project

More information about the bugs mailing list