[Bug 1679] New: semantic error on "cpukit/libfs/src/imfs/imfs_create.c"
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Wed Aug 18 09:39:13 UTC 2010
https://www.rtems.org/bugzilla/show_bug.cgi?id=1679
Summary: semantic error on
"cpukit/libfs/src/imfs/imfs_create.c"
Product: RTEMS
Version: 4.10
Platform: All
OS/Version: RTEMS
Status: NEW
Severity: normal
Priority: P3
Component: filesystem
AssignedTo: chrisj at rtems.org
ReportedBy: cyden at ms8.url.com.tw
(rtems-cvs-20100814)
line 67:
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
if ( type == IMFS_MEMORY_FILE ) { // bug!!!
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
}
} else if ( type == IMFS_FIFO ) {
node->info.fifo.pipe = NULL;
} else {
IMFS_assert(0);
}
It should be:
if ( type == IMFS_DIRECTORY ) {
rtems_chain_initialize_empty(&node->info.directory.Entries);
} else if ( type == IMFS_HARD_LINK ) {
node->info.hard_link.link_node = info->hard_link.link_node;
} else if ( type == IMFS_SYM_LINK ) {
node->info.sym_link.name = info->sym_link.name;
} else if ( type == IMFS_DEVICE ) {
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
} else if ( type == IMFS_LINEAR_FILE ) {
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
} else if ( type == IMFS_MEMORY_FILE ) {
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
} else if ( type == IMFS_FIFO ) {
node->info.fifo.pipe = NULL;
} else {
IMFS_assert(0);
}
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list