#1419 closed defect (fixed)

IMFS stat st_dev and st_rdev wrong

Reported by: Chris Johns Owned by: Chris Johns
Priority: normal Milestone: 4.10
Component: fs Version: unknown
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The IMFS code does:

case IMFS_DEVICE:

io = &the_jnode->info.device;
buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;

to fill in the node, how-ever the SUS states[1]:

dev_t st_dev Device ID of device containing file.
dev_t st_rdev Device ID (if file is character or block special).

This can be seen with the BSD ls command where the nodes are not display correctly. Changing the IMFS to support rdev will break code which is wrong and should be fixed. The MSDOS file system has this code:

vol->dev = stat_buf.st_dev;

I have changed the IMFS to also fill in the st_redev field, but what is the device number for the IMFS itself ?

[1]

http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/stat.h.html

Change History (3)

comment:1 Changed on May 14, 2010 at 10:05:16 AM by Chris Johns

Owner: changed from Joel Sherrill to Chris Johns
Status: newassigned

comment:2 Changed on May 15, 2010 at 5:30:50 AM by Chris Johns

Resolution: fixed
Status: assignedclosed

comment:3 Changed on May 15, 2010 at 5:31:21 AM by Chris Johns

Closed.

Note: See TracTickets for help on using tickets.