=============================================================================== 30006c78 : static void CPU_usage_Per_thread_handler( Thread_Control *the_thread ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 30006c78: e3a03000 mov r3, #0 <== NOT EXECUTED 30006c7c: e5803084 str r3, [r0, #132] ; 0x84 <== NOT EXECUTED 30006c80: e5803088 str r3, [r0, #136] ; 0x88 <== NOT EXECUTED #else the_thread->cpu_time_used = 0; #endif } 30006c84: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000da2c : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 3000da2c: e5903000 ldr r3, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 3000da30: e5902010 ldr r2, [r0, #16] switch( node->type ) { 3000da34: e593304c ldr r3, [r3, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 3000da38: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { 3000da3c: e2433001 sub r3, r3, #1 3000da40: e3530006 cmp r3, #6 3000da44: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000da48: ea000008 b 3000da70 <== NOT EXECUTED 3000da4c: 3000da98 .word 0x3000da98 <== NOT EXECUTED 3000da50: 3000daa8 .word 0x3000daa8 <== NOT EXECUTED 3000da54: 3000da88 .word 0x3000da88 <== NOT EXECUTED 3000da58: 3000da88 .word 0x3000da88 <== NOT EXECUTED 3000da5c: 3000da78 .word 0x3000da78 <== NOT EXECUTED 3000da60: 3000da78 .word 0x3000da78 <== NOT EXECUTED 3000da64: 3000da68 .word 0x3000da68 <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 3000da68: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 3000da6c: e5803008 str r3, [r0, #8] <== NOT EXECUTED break; } return 0; } 3000da70: e3a00000 mov r0, #0 <== NOT EXECUTED 3000da74: e12fff1e bx lr <== NOT EXECUTED break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 3000da78: e5923008 ldr r3, [r2, #8] 3000da7c: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000da80: e3a00000 mov r0, #0 3000da84: e12fff1e bx lr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 3000da88: e59f3028 ldr r3, [pc, #40] ; 3000dab8 3000da8c: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000da90: e3a00000 mov r0, #0 3000da94: e12fff1e bx lr IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 3000da98: e592300c ldr r3, [r2, #12] 3000da9c: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000daa0: e3a00000 mov r0, #0 3000daa4: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 3000daa8: e59f300c ldr r3, [pc, #12] ; 3000dabc 3000daac: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000dab0: e3a00000 mov r0, #0 3000dab4: e12fff1e bx lr =============================================================================== 3000d7a8 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000d7a8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 3000d7ac: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 3000d7b0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED 3000d7b4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 3000d7b8: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000d7bc: e1a07821 lsr r7, r1, #16 <== NOT EXECUTED 3000d7c0: e1a06822 lsr r6, r2, #16 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000d7c4: eb0003da bl 3000e734 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3000d7c8: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED 3000d7cc: e3500000 cmp r0, #0 <== NOT EXECUTED 3000d7d0: 11550000 cmpne r5, r0 <== NOT EXECUTED 3000d7d4: 03a05000 moveq r5, #0 <== NOT EXECUTED 3000d7d8: 13a05001 movne r5, #1 <== NOT EXECUTED 3000d7dc: 1a000009 bne 3000d808 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 3000d7e0: e1c473bc strh r7, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; 3000d7e4: e1c463be strh r6, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000d7e8: e1a0000d mov r0, sp <== NOT EXECUTED 3000d7ec: e1a01005 mov r1, r5 <== NOT EXECUTED 3000d7f0: ebffe351 bl 3000653c <== NOT EXECUTED 3000d7f4: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; 3000d7f8: e1a00005 mov r0, r5 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000d7fc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000d800: e28dd008 add sp, sp, #8 <== NOT EXECUTED 3000d804: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 3000d808: eb001219 bl 30012074 <__errno> <== NOT EXECUTED 3000d80c: e3a03001 mov r3, #1 <== NOT EXECUTED 3000d810: e5803000 str r3, [r0] <== NOT EXECUTED 3000d814: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d818: eafffff8 b 3000d800 <== NOT EXECUTED =============================================================================== 3000d89c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000d89c: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 3000d8a0: e3500000 cmp r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000d8a4: e1a04001 mov r4, r1 3000d8a8: e59d7018 ldr r7, [sp, #24] /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; 3000d8ac: 01a08000 moveq r8, r0 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 3000d8b0: 0a00002b beq 3000d964 return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 3000d8b4: e5901010 ldr r1, [r0, #16] /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 3000d8b8: e3540007 cmp r4, #7 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 3000d8bc: e5906000 ldr r6, [r0] fs_info = parent_loc->mt_entry->fs_info; 3000d8c0: e5915034 ldr r5, [r1, #52] ; 0x34 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 3000d8c4: 0a000028 beq 3000d96c return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 3000d8c8: e59f1114 ldr r1, [pc, #276] ; 3000d9e4 3000d8cc: e1a00004 mov r0, r4 3000d8d0: e591c000 ldr ip, [r1] 3000d8d4: e1a01002 mov r1, r2 3000d8d8: e59c202c ldr r2, [ip, #44] ; 0x2c 3000d8dc: e1c32002 bic r2, r3, r2 3000d8e0: ebffffcd bl 3000d81c if ( !node ) 3000d8e4: e2508000 subs r8, r0, #0 3000d8e8: 0a00001d beq 3000d964 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 3000d8ec: e3540001 cmp r4, #1 3000d8f0: 0a00000d beq 3000d92c rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 3000d8f4: e3540003 cmp r4, #3 3000d8f8: 0a000026 beq 3000d998 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 3000d8fc: e3540004 cmp r4, #4 3000d900: 0a000024 beq 3000d998 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 3000d904: e3540002 cmp r4, #2 3000d908: 0a00001e beq 3000d988 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 3000d90c: e3540006 cmp r4, #6 3000d910: 0a000023 beq 3000d9a4 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 3000d914: e3540005 cmp r4, #5 3000d918: 0a000028 beq 3000d9c0 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 ) { 3000d91c: e3540007 cmp r4, #7 <== NOT EXECUTED node->info.fifo.pipe = NULL; 3000d920: 03a03000 moveq r3, #0 <== NOT EXECUTED 3000d924: 05883050 streq r3, [r8, #80] ; 0x50 <== NOT EXECUTED 3000d928: ea000005 b 3000d944 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 3000d92c: e2882054 add r2, r8, #84 ; 0x54 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 3000d930: e2883050 add r3, r8, #80 ; 0x50 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 3000d934: e5882050 str r2, [r8, #80] ; 0x50 head->previous = NULL; 3000d938: e3a02000 mov r2, #0 3000d93c: e5882054 str r2, [r8, #84] ; 0x54 tail->previous = head; 3000d940: e5883058 str r3, [r8, #88] ; 0x58 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 3000d944: e5953004 ldr r3, [r5, #4] 3000d948: e2860050 add r0, r6, #80 ; 0x50 3000d94c: e2833001 add r3, r3, #1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 3000d950: e5886008 str r6, [r8, #8] 3000d954: e1a01008 mov r1, r8 node->st_ino = ++fs_info->ino_count; 3000d958: e5853004 str r3, [r5, #4] 3000d95c: e5883038 str r3, [r8, #56] ; 0x38 3000d960: ebfff2ee bl 3000a520 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 3000d964: e1a00008 mov r0, r8 3000d968: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 3000d96c: e5950010 ldr r0, [r5, #16] 3000d970: e59f1070 ldr r1, [pc, #112] ; 3000d9e8 3000d974: e1500001 cmp r0, r1 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 3000d978: 03a08000 moveq r8, #0 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 3000d97c: 1affffd1 bne 3000d8c8 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 3000d980: e1a00008 mov r0, r8 3000d984: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} } 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; 3000d988: e897000c ldm r7, {r2, r3} 3000d98c: e5882050 str r2, [r8, #80] ; 0x50 node->info.device.minor = info->device.minor; 3000d990: e5883054 str r3, [r8, #84] ; 0x54 3000d994: eaffffea b 3000d944 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; 3000d998: e5973000 ldr r3, [r7] 3000d99c: e5883050 str r3, [r8, #80] ; 0x50 3000d9a0: eaffffe7 b 3000d944 } 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; 3000d9a4: e3a03000 mov r3, #0 3000d9a8: e3a04000 mov r4, #0 3000d9ac: e5883050 str r3, [r8, #80] ; 0x50 3000d9b0: e5884054 str r4, [r8, #84] ; 0x54 node->info.linearfile.direct = 0; 3000d9b4: e3a03000 mov r3, #0 3000d9b8: e5883058 str r3, [r8, #88] ; 0x58 3000d9bc: eaffffe0 b 3000d944 } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; node->info.file.indirect = 0; 3000d9c0: e3a03000 mov r3, #0 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; 3000d9c4: e3a01000 mov r1, #0 3000d9c8: e3a02000 mov r2, #0 3000d9cc: e5881050 str r1, [r8, #80] ; 0x50 3000d9d0: e5882054 str r2, [r8, #84] ; 0x54 node->info.file.indirect = 0; 3000d9d4: e5883058 str r3, [r8, #88] ; 0x58 node->info.file.doubly_indirect = 0; 3000d9d8: e588305c str r3, [r8, #92] ; 0x5c node->info.file.triply_indirect = 0; 3000d9dc: e5883060 str r3, [r8, #96] ; 0x60 3000d9e0: eaffffd7 b 3000d944 =============================================================================== 3000db74 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000db74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 3000db78: e3d25007 bics r5, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000db7c: e24dd040 sub sp, sp, #64 ; 0x40 3000db80: e58d2000 str r2, [sp] 3000db84: e1a0a000 mov sl, r0 3000db88: e1a04001 mov r4, r1 3000db8c: e1a07003 mov r7, r3 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 3000db90: 1a000081 bne 3000dd9c /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000db94: e5936000 ldr r6, [r3] 3000db98: e28d8004 add r8, sp, #4 3000db9c: e28d903c add r9, sp, #60 ; 0x3c * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 3000dba0: e1a02008 mov r2, r8 3000dba4: e1a03009 mov r3, r9 3000dba8: e08a0005 add r0, sl, r5 3000dbac: e1a01004 mov r1, r4 3000dbb0: eb0001df bl 3000e334 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000dbb4: e5973000 ldr r3, [r7] * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 3000dbb8: e1a0b000 mov fp, r0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000dbbc: e3530000 cmp r3, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 3000dbc0: e59d203c ldr r2, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 3000dbc4: 0a00004e beq 3000dd04 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000dbc8: e3500000 cmp r0, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 3000dbcc: e0624004 rsb r4, r2, r4 i += len; 3000dbd0: e0855002 add r5, r5, r2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000dbd4: 1a00000f bne 3000dc18 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 3000dbd8: e593204c ldr r2, [r3, #76] ; 0x4c 3000dbdc: e3520001 cmp r2, #1 3000dbe0: 0a000068 beq 3000dd88 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000dbe4: e1a00007 mov r0, r7 3000dbe8: ebffff8f bl 3000da2c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000dbec: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000dbf0: e1a06000 mov r6, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000dbf4: e1a00007 mov r0, r7 3000dbf8: ebffffb0 bl 3000dac0 3000dbfc: e3500000 cmp r0, #0 3000dc00: 1a000036 bne 3000dce0 rtems_set_errno_and_return_minus_one( EACCES ); 3000dc04: eb00111a bl 30012074 <__errno> <== NOT EXECUTED 3000dc08: e3a0300d mov r3, #13 <== NOT EXECUTED 3000dc0c: e5803000 str r3, [r0] <== NOT EXECUTED 3000dc10: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000dc14: ea000031 b 3000dce0 <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 3000dc18: e596104c ldr r1, [r6, #76] ; 0x4c 3000dc1c: e3510001 cmp r1, #1 3000dc20: 0a000031 beq 3000dcec if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 3000dc24: e35b0003 cmp fp, #3 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 3000dc28: e1a06003 mov r6, r3 switch( type ) { 3000dc2c: 0a000006 beq 3000dc4c 3000dc30: e35b0004 cmp fp, #4 3000dc34: 0a000025 beq 3000dcd0 3000dc38: e35b0002 cmp fp, #2 3000dc3c: 0a000013 beq 3000dc90 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 3000dc40: e35b0004 cmp fp, #4 3000dc44: 1affffd5 bne 3000dba0 3000dc48: eaffffe2 b 3000dbd8 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 3000dc4c: e593304c ldr r3, [r3, #76] ; 0x4c 3000dc50: e3530003 cmp r3, #3 3000dc54: 0a00002f beq 3000dd18 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 3000dc58: e3530004 cmp r3, #4 3000dc5c: 0a000058 beq 3000ddc4 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000dc60: e3530001 cmp r3, #1 3000dc64: 1a000051 bne 3000ddb0 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 3000dc68: e596e05c ldr lr, [r6, #92] ; 0x5c 3000dc6c: e35e0000 cmp lr, #0 3000dc70: 1a000047 bne 3000dd94 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000dc74: e1a00006 mov r0, r6 3000dc78: e1a01008 mov r1, r8 3000dc7c: eb00018b bl 3000e2b0 if ( !node ) 3000dc80: e2506000 subs r6, r0, #0 3000dc84: 0a00001e beq 3000dd04 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 3000dc88: e5876000 str r6, [r7] 3000dc8c: eaffffc3 b 3000dba0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 3000dc90: e59f1154 ldr r1, [pc, #340] ; 3000ddec 3000dc94: e5912000 ldr r2, [r1] 3000dc98: e5922018 ldr r2, [r2, #24] 3000dc9c: e1520003 cmp r2, r3 3000dca0: 0affffbe beq 3000dba0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 3000dca4: e597e010 ldr lr, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 3000dca8: e59e201c ldr r2, [lr, #28] 3000dcac: e1520003 cmp r2, r3 3000dcb0: 0a00001e beq 3000dd30 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 3000dcb4: e5936008 ldr r6, [r3, #8] 3000dcb8: e3560000 cmp r6, #0 3000dcbc: 1afffff1 bne 3000dc88 rtems_set_errno_and_return_minus_one( ENOENT ); 3000dcc0: eb0010eb bl 30012074 <__errno> <== NOT EXECUTED 3000dcc4: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000dcc8: e580b000 str fp, [r0] <== NOT EXECUTED 3000dccc: ea000003 b 3000dce0 <== NOT EXECUTED case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000dcd0: eb0010e7 bl 30012074 <__errno> <== NOT EXECUTED 3000dcd4: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000dcd8: e5803000 str r3, [r0] <== NOT EXECUTED 3000dcdc: e3e06000 mvn r6, #0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 3000dce0: e1a00006 mov r0, r6 3000dce4: e28dd040 add sp, sp, #64 ; 0x40 3000dce8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 3000dcec: e1a00007 mov r0, r7 3000dcf0: ebffff72 bl 3000dac0 3000dcf4: e3500000 cmp r0, #0 3000dcf8: 0affffc1 beq 3000dc04 3000dcfc: e5973000 ldr r3, [r7] 3000dd00: eaffffc7 b 3000dc24 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); 3000dd04: eb0010da bl 30012074 <__errno> 3000dd08: e3a03002 mov r3, #2 3000dd0c: e5803000 str r3, [r0] 3000dd10: e3e06000 mvn r6, #0 3000dd14: eafffff1 b 3000dce0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 3000dd18: e1a00007 mov r0, r7 <== NOT EXECUTED 3000dd1c: e3a01000 mov r1, #0 <== NOT EXECUTED 3000dd20: ebffff80 bl 3000db28 <== NOT EXECUTED node = pathloc->node_access; 3000dd24: e5976000 ldr r6, [r7] <== NOT EXECUTED 3000dd28: e596304c ldr r3, [r6, #76] ; 0x4c <== NOT EXECUTED 3000dd2c: eaffffcb b 3000dc60 <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 3000dd30: e28ee008 add lr, lr, #8 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000dd34: e28d6028 add r6, sp, #40 ; 0x28 3000dd38: e8be000f ldm lr!, {r0, r1, r2, r3} 3000dd3c: e8a6000f stmia r6!, {r0, r1, r2, r3} *pathloc = newloc; 3000dd40: e28dc028 add ip, sp, #40 ; 0x28 3000dd44: e8bc000f ldm ip!, {r0, r1, r2, r3} * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000dd48: e59ec000 ldr ip, [lr] *pathloc = newloc; 3000dd4c: e1a0e007 mov lr, r7 3000dd50: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000dd54: e59d103c ldr r1, [sp, #60] ; 0x3c */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 3000dd58: e58ec000 str ip, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000dd5c: e0610005 rsb r0, r1, r5 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000dd60: e586c000 str ip, [r6] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000dd64: e08a0000 add r0, sl, r0 3000dd68: e597c00c ldr ip, [r7, #12] 3000dd6c: e0841001 add r1, r4, r1 3000dd70: e59d2000 ldr r2, [sp] 3000dd74: e1a03007 mov r3, r7 3000dd78: e1a0e00f mov lr, pc 3000dd7c: e59cf000 ldr pc, [ip] 3000dd80: e1a06000 mov r6, r0 3000dd84: eaffffd5 b 3000dce0 * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 3000dd88: e593e05c ldr lr, [r3, #92] ; 0x5c 3000dd8c: e35e0000 cmp lr, #0 3000dd90: 0affff93 beq 3000dbe4 newloc = node->info.directory.mt_fs->mt_fs_root; 3000dd94: e28ee01c add lr, lr, #28 3000dd98: eaffffe5 b 3000dd34 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); 3000dd9c: eb0010b4 bl 30012074 <__errno> <== NOT EXECUTED 3000dda0: e3a03005 mov r3, #5 <== NOT EXECUTED 3000dda4: e5803000 str r3, [r0] <== NOT EXECUTED 3000dda8: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000ddac: eaffffcb b 3000dce0 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000ddb0: eb0010af bl 30012074 <__errno> <== NOT EXECUTED 3000ddb4: e3a03014 mov r3, #20 <== NOT EXECUTED 3000ddb8: e5803000 str r3, [r0] <== NOT EXECUTED 3000ddbc: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000ddc0: eaffffc6 b 3000dce0 <== NOT EXECUTED * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 3000ddc4: e1a00007 mov r0, r7 <== NOT EXECUTED 3000ddc8: e3a01000 mov r1, #0 <== NOT EXECUTED 3000ddcc: eb000007 bl 3000ddf0 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 3000ddd0: e3700001 cmn r0, #1 <== NOT EXECUTED * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 3000ddd4: e1a06000 mov r6, r0 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 3000ddd8: e5973000 ldr r3, [r7] <== NOT EXECUTED if ( result == -1 ) 3000dddc: 0affffbf beq 3000dce0 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 3000dde0: e1a06003 mov r6, r3 <== NOT EXECUTED 3000dde4: e593304c ldr r3, [r3, #76] ; 0x4c <== NOT EXECUTED 3000dde8: eaffff9c b 3000dc60 <== NOT EXECUTED =============================================================================== 3000df58 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 3000df58: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000df5c: e24dd040 sub sp, sp, #64 ; 0x40 3000df60: e1a06001 mov r6, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000df64: e5915000 ldr r5, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 3000df68: e1a0a000 mov sl, r0 3000df6c: e58d2000 str r2, [sp] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 3000df70: eb001429 bl 3001301c const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 3000df74: e3a07000 mov r7, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 3000df78: e1a04000 mov r4, r0 3000df7c: e28d8004 add r8, sp, #4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 3000df80: e1a01004 mov r1, r4 3000df84: e28d303c add r3, sp, #60 ; 0x3c 3000df88: e08a0007 add r0, sl, r7 3000df8c: e1a02008 mov r2, r8 3000df90: eb0000e7 bl 3000e334 pathlen -= len; i += len; if ( !pathloc->node_access ) 3000df94: e5963000 ldr r3, [r6] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 3000df98: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 3000df9c: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 3000dfa0: e1a09000 mov r9, r0 pathlen -= len; 3000dfa4: e06b4004 rsb r4, fp, r4 i += len; if ( !pathloc->node_access ) 3000dfa8: 0a000035 beq 3000e084 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000dfac: e3500000 cmp r0, #0 3000dfb0: 1a000006 bne 3000dfd0 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 3000dfb4: eb00102e bl 30012074 <__errno> 3000dfb8: e3a03011 mov r3, #17 3000dfbc: e5803000 str r3, [r0] 3000dfc0: e3e05000 mvn r5, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 3000dfc4: e1a00005 mov r0, r5 3000dfc8: e28dd040 add sp, sp, #64 ; 0x40 3000dfcc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 3000dfd0: e595104c ldr r1, [r5, #76] ; 0x4c 3000dfd4: e3510001 cmp r1, #1 3000dfd8: 0a000044 beq 3000e0f0 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 3000dfdc: e087700b add r7, r7, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 3000dfe0: e1a05003 mov r5, r3 switch( type ) { 3000dfe4: e3590004 cmp r9, #4 3000dfe8: 979ff109 ldrls pc, [pc, r9, lsl #2] 3000dfec: eaffffe3 b 3000df80 <== NOT EXECUTED 3000dff0: 3000dfb4 .word 0x3000dfb4 <== NOT EXECUTED 3000dff4: 3000df80 .word 0x3000df80 <== NOT EXECUTED 3000dff8: 3000e054 .word 0x3000e054 <== NOT EXECUTED 3000dffc: 3000e004 .word 0x3000e004 <== NOT EXECUTED 3000e000: 3000e098 .word 0x3000e098 <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 3000e004: e593304c ldr r3, [r3, #76] ; 0x4c 3000e008: e3530003 cmp r3, #3 3000e00c: 0a00006a beq 3000e1bc result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 3000e010: e3530004 cmp r3, #4 3000e014: 0a000068 beq 3000e1bc if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 3000e018: e3550000 cmp r5, #0 3000e01c: 0a00005f beq 3000e1a0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000e020: e595304c ldr r3, [r5, #76] ; 0x4c 3000e024: e3530001 cmp r3, #1 3000e028: 1a00005c bne 3000e1a0 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 3000e02c: e595c05c ldr ip, [r5, #92] ; 0x5c 3000e030: e35c0000 cmp ip, #0 3000e034: 1a00005e bne 3000e1b4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000e038: e1a00005 mov r0, r5 3000e03c: e1a01008 mov r1, r8 3000e040: eb00009a bl 3000e2b0 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 3000e044: e2505000 subs r5, r0, #0 3000e048: 0a000017 beq 3000e0ac done = true; else pathloc->node_access = node; 3000e04c: e5865000 str r5, [r6] 3000e050: eaffffca b 3000df80 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 3000e054: e59f1180 ldr r1, [pc, #384] ; 3000e1dc 3000e058: e5912000 ldr r2, [r1] 3000e05c: e5922018 ldr r2, [r2, #24] 3000e060: e1530002 cmp r3, r2 3000e064: 0affffc5 beq 3000df80 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 3000e068: e596c010 ldr ip, [r6, #16] 3000e06c: e59c201c ldr r2, [ip, #28] 3000e070: e1530002 cmp r3, r2 3000e074: 0a000023 beq 3000e108 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 3000e078: e5935008 ldr r5, [r3, #8] 3000e07c: e3550000 cmp r5, #0 3000e080: 1afffff1 bne 3000e04c * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); 3000e084: eb000ffa bl 30012074 <__errno> <== NOT EXECUTED 3000e088: e3a03002 mov r3, #2 <== NOT EXECUTED 3000e08c: e5803000 str r3, [r0] <== NOT EXECUTED 3000e090: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000e094: eaffffca b 3000dfc4 <== NOT EXECUTED case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000e098: eb000ff5 bl 30012074 <__errno> <== NOT EXECUTED 3000e09c: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000e0a0: e5803000 str r3, [r0] <== NOT EXECUTED 3000e0a4: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000e0a8: eaffffc5 b 3000dfc4 <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 3000e0ac: e59d303c ldr r3, [sp, #60] ; 0x3c 3000e0b0: e59d1000 ldr r1, [sp] 3000e0b4: e0633007 rsb r3, r3, r7 3000e0b8: e08a3003 add r3, sl, r3 3000e0bc: e5813000 str r3, [r1] /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 3000e0c0: e7da0007 ldrb r0, [sl, r7] 3000e0c4: e08a4007 add r4, sl, r7 3000e0c8: e3500000 cmp r0, #0 3000e0cc: 1a000003 bne 3000e0e0 3000e0d0: ea000021 b 3000e15c 3000e0d4: e5f40001 ldrb r0, [r4, #1]! <== NOT EXECUTED 3000e0d8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000e0dc: 0a00001e beq 3000e15c <== NOT EXECUTED if ( !IMFS_is_separator( path[ i ] ) ) 3000e0e0: ebffe4ad bl 3000739c <== NOT EXECUTED 3000e0e4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000e0e8: 1afffff9 bne 3000e0d4 <== NOT EXECUTED 3000e0ec: eaffffe4 b 3000e084 <== NOT EXECUTED * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 3000e0f0: e1a00006 mov r0, r6 3000e0f4: ebfffe71 bl 3000dac0 3000e0f8: e3500000 cmp r0, #0 3000e0fc: 0a000022 beq 3000e18c 3000e100: e5963000 ldr r3, [r6] 3000e104: eaffffb4 b 3000dfdc if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 3000e108: e28cc008 add ip, ip, #8 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000e10c: e28d4028 add r4, sp, #40 ; 0x28 3000e110: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000e114: e8a4000f stmia r4!, {r0, r1, r2, r3} *pathloc = newloc; 3000e118: e28de028 add lr, sp, #40 ; 0x28 3000e11c: e8be000f ldm lr!, {r0, r1, r2, r3} 3000e120: e1a0e006 mov lr, r6 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000e124: e59cc000 ldr ip, [ip] *pathloc = newloc; 3000e128: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000e12c: e59d003c ldr r0, [sp, #60] ; 0x3c * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 3000e130: e58ec000 str ip, [lr] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000e134: e0600007 rsb r0, r0, r7 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000e138: e584c000 str ip, [r4] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000e13c: e596300c ldr r3, [r6, #12] 3000e140: e08a0000 add r0, sl, r0 3000e144: e1a01006 mov r1, r6 3000e148: e59d2000 ldr r2, [sp] 3000e14c: e1a0e00f mov lr, pc 3000e150: e593f004 ldr pc, [r3, #4] 3000e154: e1a05000 mov r5, r0 3000e158: eaffff99 b 3000dfc4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000e15c: e1a00006 mov r0, r6 3000e160: ebfffe31 bl 3000da2c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000e164: e5963000 ldr r3, [r6] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000e168: e1a05000 mov r5, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000e16c: e593304c ldr r3, [r3, #76] ; 0x4c 3000e170: e3530001 cmp r3, #1 3000e174: 1a000009 bne 3000e1a0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 3000e178: e1a00006 mov r0, r6 3000e17c: e3a01003 mov r1, #3 3000e180: ebfffe4e bl 3000dac0 3000e184: e3500000 cmp r0, #0 3000e188: 1affff8d bne 3000dfc4 rtems_set_errno_and_return_minus_one( EACCES ); 3000e18c: eb000fb8 bl 30012074 <__errno> 3000e190: e3a0300d mov r3, #13 3000e194: e5803000 str r3, [r0] 3000e198: e3e05000 mvn r5, #0 3000e19c: eaffff88 b 3000dfc4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000e1a0: eb000fb3 bl 30012074 <__errno> <== NOT EXECUTED 3000e1a4: e3a03014 mov r3, #20 <== NOT EXECUTED 3000e1a8: e5803000 str r3, [r0] <== NOT EXECUTED 3000e1ac: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000e1b0: eaffff83 b 3000dfc4 <== NOT EXECUTED * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 3000e1b4: e28cc01c add ip, ip, #28 3000e1b8: eaffffd3 b 3000e10c if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 3000e1bc: e1a00006 mov r0, r6 <== NOT EXECUTED 3000e1c0: e3a01000 mov r1, #0 <== NOT EXECUTED 3000e1c4: ebffff2e bl 3000de84 <== NOT EXECUTED if ( result == -1 ) 3000e1c8: e3700001 cmn r0, #1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 3000e1cc: e1a05000 mov r5, r0 <== NOT EXECUTED if ( result == -1 ) 3000e1d0: 0affff7b beq 3000dfc4 <== NOT EXECUTED 3000e1d4: e5965000 ldr r5, [r6] <== NOT EXECUTED 3000e1d8: eaffff8e b 3000e018 <== NOT EXECUTED =============================================================================== 3000db28 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000db28: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000db2c: e5903000 ldr r3, [r0] <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000db30: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000db34: e5933050 ldr r3, [r3, #80] ; 0x50 <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000db38: e1a05001 mov r5, r1 <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000db3c: e5803000 str r3, [r0] <== NOT EXECUTED IMFS_Set_handlers( node ); 3000db40: ebffffb9 bl 3000da2c <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000db44: e1a00004 mov r0, r4 <== NOT EXECUTED 3000db48: e1a01005 mov r1, r5 <== NOT EXECUTED 3000db4c: ebffffdb bl 3000dac0 <== NOT EXECUTED 3000db50: e3500000 cmp r0, #0 <== NOT EXECUTED 3000db54: 0a000001 beq 3000db60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; 3000db58: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000db5c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 3000db60: eb001143 bl 30012074 <__errno> <== NOT EXECUTED 3000db64: e3a0300d mov r3, #13 <== NOT EXECUTED 3000db68: e5803000 str r3, [r0] <== NOT EXECUTED 3000db6c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000db70: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000de84 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000de84: e92d40f0 push {r4, r5, r6, r7, lr} */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 3000de88: e59f60c4 ldr r6, [pc, #196] ; 3000df54 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000de8c: e1a05000 mov r5, r0 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 3000de90: e5963000 ldr r3, [r6] */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000de94: e1a07001 mov r7, r1 3000de98: ea000004 b 3000deb0 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 3000de9c: e3520004 cmp r2, #4 3000dea0: 0a00001b beq 3000df14 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 3000dea4: e2422003 sub r2, r2, #3 3000dea8: e3520001 cmp r2, #1 3000deac: 8a000014 bhi 3000df04 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000deb0: e1d323b0 ldrh r2, [r3, #48] ; 0x30 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 3000deb4: e5954000 ldr r4, [r5] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000deb8: e2822001 add r2, r2, #1 3000debc: e1a02802 lsl r2, r2, #16 3000dec0: e1a02822 lsr r2, r2, #16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000dec4: e3520005 cmp r2, #5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000dec8: e1c323b0 strh r2, [r3, #48] ; 0x30 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000decc: 8a000019 bhi 3000df38 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 3000ded0: e594204c ldr r2, [r4, #76] ; 0x4c 3000ded4: e3520003 cmp r2, #3 3000ded8: 1affffef bne 3000de9c result = IMFS_evaluate_hard_link( node, flags ); 3000dedc: e1a00005 mov r0, r5 <== NOT EXECUTED 3000dee0: e1a01007 mov r1, r7 <== NOT EXECUTED 3000dee4: ebffff0f bl 3000db28 <== NOT EXECUTED else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 3000dee8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000deec: 1a00000d bne 3000df28 <== NOT EXECUTED 3000def0: e594204c ldr r2, [r4, #76] ; 0x4c 3000def4: e5963000 ldr r3, [r6] result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 3000def8: e2422003 sub r2, r2, #3 3000defc: e3520001 cmp r2, #1 3000df00: 9affffea bls 3000deb0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000df04: e3a02000 mov r2, #0 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 3000df08: e3a00000 mov r0, #0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000df0c: e1c323b0 strh r2, [r3, #48] ; 0x30 return result; } 3000df10: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 3000df14: e1a00005 mov r0, r5 3000df18: e1a01007 mov r1, r7 3000df1c: ebffffb3 bl 3000ddf0 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 3000df20: e3500000 cmp r0, #0 3000df24: 0afffff1 beq 3000def0 3000df28: e5963000 ldr r3, [r6] <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000df2c: e3a02000 mov r2, #0 <== NOT EXECUTED 3000df30: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED return result; } 3000df34: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; 3000df38: e3a02000 mov r2, #0 <== NOT EXECUTED 3000df3c: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); 3000df40: eb00104b bl 30012074 <__errno> <== NOT EXECUTED 3000df44: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED 3000df48: e5803000 str r3, [r0] <== NOT EXECUTED 3000df4c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000df50: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 3000dac0 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000dac0: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 3000dac4: e92d4070 push {r4, r5, r6, lr} 3000dac8: e1a05001 mov r5, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000dacc: 1a000010 bne 3000db14 rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 3000dad0: e5904000 ldr r4, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000dad4: eb000316 bl 3000e734 3000dad8: e1a06000 mov r6, r0 st_gid = getegid(); 3000dadc: eb00030f bl 3000e720 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 3000dae0: e1d433bc ldrh r3, [r4, #60] ; 0x3c 3000dae4: e1530006 cmp r3, r6 flags_to_test <<= 6; 3000dae8: 01a05305 lsleq r5, r5, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 3000daec: 0a000002 beq 3000dafc flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 3000daf0: e1d433be ldrh r3, [r4, #62] ; 0x3e <== NOT EXECUTED 3000daf4: e1530000 cmp r3, r0 <== NOT EXECUTED flags_to_test <<= 3; 3000daf8: 01a05185 lsleq r5, r5, #3 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 3000dafc: e5940030 ldr r0, [r4, #48] ; 0x30 3000db00: e0050000 and r0, r5, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 3000db04: e1550000 cmp r5, r0 3000db08: 13a00000 movne r0, #0 3000db0c: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 3000db10: e8bd8070 pop {r4, r5, r6, pc} gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 3000db14: eb001156 bl 30012074 <__errno> <== NOT EXECUTED 3000db18: e3a03001 mov r3, #1 <== NOT EXECUTED 3000db1c: e5803000 str r3, [r0] <== NOT EXECUTED 3000db20: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000db24: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 3000ddf0 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000ddf0: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 3000ddf4: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000ddf8: e24dd004 sub sp, sp, #4 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 3000ddfc: e5963008 ldr r3, [r6, #8] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000de00: e1a04000 mov r4, r0 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 3000de04: e5803000 str r3, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000de08: e1a05001 mov r5, r1 * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 3000de0c: e5960050 ldr r0, [r6, #80] ; 0x50 3000de10: e1a0100d mov r1, sp 3000de14: e1a02004 mov r2, r4 3000de18: eb0003b5 bl 3000ecf4 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 3000de1c: e59d3000 ldr r3, [sp] 3000de20: e5966050 ldr r6, [r6, #80] ; 0x50 3000de24: e0866003 add r6, r6, r3 3000de28: e1a00006 mov r0, r6 3000de2c: eb00147a bl 3001301c 3000de30: e1a02005 mov r2, r5 3000de34: e1a01000 mov r1, r0 3000de38: e1a03004 mov r3, r4 3000de3c: e1a00006 mov r0, r6 3000de40: ebffff4b bl 3000db74 3000de44: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 3000de48: e1a00004 mov r0, r4 3000de4c: ebfffef6 bl 3000da2c /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000de50: e1a00004 mov r0, r4 3000de54: e1a01005 mov r1, r5 3000de58: ebffff18 bl 3000dac0 3000de5c: e3500000 cmp r0, #0 3000de60: 0a000002 beq 3000de70 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 3000de64: e1a00006 mov r0, r6 3000de68: e28dd004 add sp, sp, #4 3000de6c: e8bd8070 pop {r4, r5, r6, pc} /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 3000de70: eb00107f bl 30012074 <__errno> <== NOT EXECUTED 3000de74: e3a0300d mov r3, #13 <== NOT EXECUTED 3000de78: e5803000 str r3, [r0] <== NOT EXECUTED 3000de7c: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000de80: eafffff7 b 3000de64 <== NOT EXECUTED =============================================================================== 3001163c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 3001163c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 30011640: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 30011644: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 30011648: e1a06001 mov r6, r1 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3001164c: ebfff438 bl 3000e734 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 30011650: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED 30011654: e3500000 cmp r0, #0 <== NOT EXECUTED 30011658: 11550000 cmpne r5, r0 <== NOT EXECUTED 3001165c: 03a05000 moveq r5, #0 <== NOT EXECUTED 30011660: 13a05001 movne r5, #1 <== NOT EXECUTED 30011664: 1a00000d bne 300116a0 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 30011668: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3001166c: e1a06a06 lsl r6, r6, #20 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 30011670: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 30011674: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 30011678: e1836a26 orr r6, r3, r6, lsr #20 <== NOT EXECUTED 3001167c: e5846030 str r6, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); 30011680: e1a0000d mov r0, sp <== NOT EXECUTED 30011684: e1a01005 mov r1, r5 <== NOT EXECUTED 30011688: ebffd3ab bl 3000653c <== NOT EXECUTED 3001168c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; 30011690: e1a00005 mov r0, r5 <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 30011694: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 30011698: e28dd008 add sp, sp, #8 <== NOT EXECUTED 3001169c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 300116a0: eb000273 bl 30012074 <__errno> <== NOT EXECUTED 300116a4: e3a03001 mov r3, #1 <== NOT EXECUTED 300116a8: e5803000 str r3, [r0] <== NOT EXECUTED 300116ac: e3e00000 mvn r0, #0 <== NOT EXECUTED 300116b0: eafffff8 b 30011698 <== NOT EXECUTED =============================================================================== 300116b4 : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } 300116b4: e3a00000 mov r0, #0 <== NOT EXECUTED 300116b8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 300072d8 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 300072d8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED int err = 0; IMFS_jnode_t *jnode = iop->pathinfo.node_access; 300072dc: e5905018 ldr r5, [r0, #24] <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 300072e0: e1a04000 mov r4, r0 <== NOT EXECUTED int err = 0; IMFS_jnode_t *jnode = iop->pathinfo.node_access; pipe_release(&JNODE2PIPE(jnode), iop); 300072e4: e1a01000 mov r1, r0 <== NOT EXECUTED 300072e8: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED 300072ec: eb002549 bl 30010818 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 300072f0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED IMFS_check_node_remove(jnode); 300072f4: e1a00005 mov r0, r5 <== NOT EXECUTED int err = 0; IMFS_jnode_t *jnode = iop->pathinfo.node_access; pipe_release(&JNODE2PIPE(jnode), iop); iop->flags &= ~LIBIO_FLAGS_OPEN; 300072f8: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 300072fc: e5843014 str r3, [r4, #20] <== NOT EXECUTED IMFS_check_node_remove(jnode); 30007300: eb00018b bl 30007934 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 30007304: e3a00000 mov r0, #0 <== NOT EXECUTED 30007308: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000719c : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 3000719c: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 300071a0: e59f0070 ldr r0, [pc, #112] ; 30007218 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 300071a4: e92d4010 push {r4, lr} <== NOT EXECUTED int err; if (command == FIONBIO) { 300071a8: e1510000 cmp r1, r0 <== NOT EXECUTED 300071ac: 0a000007 beq 300071d0 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 300071b0: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED 300071b4: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 300071b8: eb0027e2 bl 30011148 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 300071bc: e2502000 subs r2, r0, #0 <== NOT EXECUTED 300071c0: b2624000 rsblt r4, r2, #0 <== NOT EXECUTED 300071c4: ba00000f blt 30007208 <== NOT EXECUTED } 300071c8: e1a00002 mov r0, r2 <== NOT EXECUTED 300071cc: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 300071d0: e3520000 cmp r2, #0 <== NOT EXECUTED 300071d4: 0a00000a beq 30007204 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 300071d8: e5922000 ldr r2, [r2] <== NOT EXECUTED 300071dc: e3520000 cmp r2, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 300071e0: 15931014 ldrne r1, [r3, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300071e4: 05931014 ldreq r1, [r3, #20] <== NOT EXECUTED return 0; 300071e8: 13a02000 movne r2, #0 <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 300071ec: 13811001 orrne r1, r1, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300071f0: 03c11001 biceq r1, r1, #1 <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 300071f4: 15831014 strne r1, [r3, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300071f8: 05831014 streq r1, [r3, #20] <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 300071fc: e1a00002 mov r0, r2 <== NOT EXECUTED 30007200: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 30007204: e3a0400e mov r4, #14 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 30007208: eb0034e7 bl 300145ac <__errno> <== NOT EXECUTED 3000720c: e3e02000 mvn r2, #0 <== NOT EXECUTED 30007210: e5804000 str r4, [r0] <== NOT EXECUTED 30007214: eaffffeb b 300071c8 <== NOT EXECUTED =============================================================================== 3000713c : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 3000713c: e92d4010 push {r4, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30007140: e590c018 ldr ip, [r0, #24] <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 30007144: e24dd004 sub sp, sp, #4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30007148: e59cc050 ldr ip, [ip, #80] ; 0x50 <== NOT EXECUTED 3000714c: e58d0000 str r0, [sp] <== NOT EXECUTED 30007150: e1a0000c mov r0, ip <== NOT EXECUTED 30007154: eb002814 bl 300111ac <== NOT EXECUTED 30007158: e1a02000 mov r2, r0 <== NOT EXECUTED 3000715c: e1a03fc2 asr r3, r2, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30007160: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30007164: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30007168: a1a04003 movge r4, r3 <== NOT EXECUTED 3000716c: a1a03002 movge r3, r2 <== NOT EXECUTED 30007170: ba000003 blt 30007184 <== NOT EXECUTED } 30007174: e1a00003 mov r0, r3 <== NOT EXECUTED 30007178: e1a01004 mov r1, r4 <== NOT EXECUTED 3000717c: e28dd004 add sp, sp, #4 <== NOT EXECUTED 30007180: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 30007184: eb003508 bl 300145ac <__errno> <== NOT EXECUTED 30007188: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 3000718c: e5804000 str r4, [r0] <== NOT EXECUTED 30007190: e3e03000 mvn r3, #0 <== NOT EXECUTED 30007194: e3e04000 mvn r4, #0 <== NOT EXECUTED 30007198: eafffff5 b 30007174 <== NOT EXECUTED =============================================================================== 3000730c : uint32_t mode ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 3000730c: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30007310: e92d4010 push {r4, lr} <== NOT EXECUTED 30007314: e1a01000 mov r1, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 30007318: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED 3000731c: eb002573 bl 300108f0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30007320: e2504000 subs r4, r0, #0 <== NOT EXECUTED 30007324: ba000001 blt 30007330 <== NOT EXECUTED } 30007328: e1a00004 mov r0, r4 <== NOT EXECUTED 3000732c: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 30007330: eb00349d bl 300145ac <__errno> <== NOT EXECUTED 30007334: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30007338: e5804000 str r4, [r0] <== NOT EXECUTED 3000733c: e3e04000 mvn r4, #0 <== NOT EXECUTED 30007340: eafffff8 b 30007328 <== NOT EXECUTED =============================================================================== 3000727c : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000727c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; 30007280: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 30007284: e1a03000 mov r3, r0 <== NOT EXECUTED 30007288: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 3000728c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 30007290: eb0026b9 bl 30010d7c <== NOT EXECUTED if (err > 0) 30007294: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30007298: da000007 ble 300072bc <== NOT EXECUTED IMFS_update_atime(jnode); 3000729c: e1a0000d mov r0, sp <== NOT EXECUTED 300072a0: e3a01000 mov r1, #0 <== NOT EXECUTED 300072a4: eb000404 bl 300082bc <== NOT EXECUTED 300072a8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300072ac: e1a00005 mov r0, r5 <== NOT EXECUTED 300072b0: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 300072b4: e28dd008 add sp, sp, #8 <== NOT EXECUTED 300072b8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 300072bc: 01a00005 moveq r0, r5 <== NOT EXECUTED 300072c0: 0afffffb beq 300072b4 <== NOT EXECUTED 300072c4: eb0034b8 bl 300145ac <__errno> <== NOT EXECUTED 300072c8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 300072cc: e5805000 str r5, [r0] <== NOT EXECUTED 300072d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 300072d4: eafffff6 b 300072b4 <== NOT EXECUTED =============================================================================== 3000721c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 3000721c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; 30007220: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 30007224: e1a03000 mov r3, r0 <== NOT EXECUTED 30007228: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 3000722c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 30007230: eb00273e bl 30010f30 <== NOT EXECUTED if (err > 0) { 30007234: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30007238: da000008 ble 30007260 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 3000723c: e1a0000d mov r0, sp <== NOT EXECUTED 30007240: e3a01000 mov r1, #0 <== NOT EXECUTED 30007244: eb00041c bl 300082bc <== NOT EXECUTED 30007248: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000724c: e1a00005 mov r0, r5 <== NOT EXECUTED 30007250: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 30007254: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 30007258: e28dd008 add sp, sp, #8 <== NOT EXECUTED 3000725c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 30007260: 01a00005 moveq r0, r5 <== NOT EXECUTED 30007264: 0afffffb beq 30007258 <== NOT EXECUTED 30007268: eb0034cf bl 300145ac <__errno> <== NOT EXECUTED 3000726c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 30007270: e5805000 str r5, [r0] <== NOT EXECUTED 30007274: e3e00000 mvn r0, #0 <== NOT EXECUTED 30007278: eafffff6 b 30007258 <== NOT EXECUTED =============================================================================== 3000e1e0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000e1e0: e92d4070 push {r4, r5, r6, lr} /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 3000e1e4: e1a0c000 mov ip, r0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000e1e8: e24dd014 sub sp, sp, #20 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 3000e1ec: e5bc401c ldr r4, [ip, #28]! loc = temp_mt_entry->mt_fs_root; 3000e1f0: e1a0600d mov r6, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000e1f4: e1a0e000 mov lr, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 3000e1f8: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000e1fc: e8a6000f stmia r6!, {r0, r1, r2, r3} 3000e200: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000e204: e3a03000 mov r3, #0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 3000e208: e1a0500d mov r5, sp 3000e20c: e5862000 str r2, [r6] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000e210: e58e301c str r3, [lr, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3000e214: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3000e218: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 3000e21c: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 3000e220: ebfffe01 bl 3000da2c if ( jnode->type != IMFS_DIRECTORY ) { 3000e224: e594304c ldr r3, [r4, #76] ; 0x4c RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 3000e228: e2842054 add r2, r4, #84 ; 0x54 3000e22c: e3530001 cmp r3, #1 3000e230: 1a000010 bne 3000e278 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3000e234: e5943050 ldr r3, [r4, #80] ; 0x50 3000e238: e1530002 cmp r3, r2 3000e23c: 0a000014 beq 3000e294 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 3000e240: e3540000 cmp r4, #0 3000e244: 0a000008 beq 3000e26c if ( jnode->type == IMFS_DIRECTORY ) { 3000e248: e594304c ldr r3, [r4, #76] ; 0x4c 3000e24c: e3530001 cmp r3, #1 3000e250: 1affffef bne 3000e214 } } } while (jnode != NULL); return 0; } 3000e254: e5943050 ldr r3, [r4, #80] ; 0x50 3000e258: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 3000e25c: e1530002 cmp r3, r2 3000e260: 0affffeb beq 3000e214 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3000e264: e2534000 subs r4, r3, #0 3000e268: 1affffe9 bne 3000e214 return 0; 3000e26c: e1a00004 mov r0, r4 } 3000e270: e28dd014 add sp, sp, #20 3000e274: e8bd8070 pop {r4, r5, r6, pc} next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); 3000e278: e1a0100d mov r1, sp 3000e27c: e3a00000 mov r0, #0 3000e280: ebffdf48 bl 30005fa8 if (result != 0) 3000e284: e3500000 cmp r0, #0 3000e288: 1a000006 bne 3000e2a8 jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; 3000e28c: e1a04006 mov r4, r6 3000e290: eaffffea b 3000e240 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 3000e294: e3a00000 mov r0, #0 3000e298: e1a0100d mov r1, sp 3000e29c: ebffdf41 bl 30005fa8 if (result != 0) 3000e2a0: e3500000 cmp r0, #0 3000e2a4: 0afffff8 beq 3000e28c return -1; 3000e2a8: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000e2ac: eaffffef b 3000e270 <== NOT EXECUTED =============================================================================== 3000e334 : const char *path, int pathlen, char *token, int *token_len ) { 3000e334: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000e338: e1a05001 mov r5, r1 3000e33c: e1a04002 mov r4, r2 3000e340: e1a0a003 mov sl, r3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 3000e344: e5d07000 ldrb r7, [r0] 3000e348: e1a08000 mov r8, r0 int pathlen, char *token, int *token_len ) { register int i = 0; 3000e34c: e3a06000 mov r6, #0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 3000e350: ea000006 b 3000e370 3000e354: e1560005 cmp r6, r5 3000e358: aa000008 bge 3000e380 token[i] = c; if ( i == IMFS_NAME_MAX ) 3000e35c: e3560020 cmp r6, #32 * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; 3000e360: e7c47006 strb r7, [r4, r6] if ( i == IMFS_NAME_MAX ) 3000e364: 0a00001b beq 3000e3d8 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 3000e368: e5f87001 ldrb r7, [r8, #1]! 3000e36c: e2866001 add r6, r6, #1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 3000e370: e1a00007 mov r0, r7 3000e374: ebffe408 bl 3000739c 3000e378: e3500000 cmp r0, #0 3000e37c: 0afffff4 beq 3000e354 /* * Copy a seperator into token. */ if ( i == 0 ) { 3000e380: e3560000 cmp r6, #0 3000e384: 1a000006 bne 3000e3a4 token[i] = c; if ( (token[i] != '\0') && pathlen ) { 3000e388: e3570000 cmp r7, #0 3000e38c: 13550000 cmpne r5, #0 i++; type = IMFS_CURRENT_DIR; 3000e390: 13a06001 movne r6, #1 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 3000e394: e5c47000 strb r7, [r4] if ( (token[i] != '\0') && pathlen ) { i++; 3000e398: e1a00006 mov r0, r6 /* * Set token_len to the number of characters copied. */ *token_len = i; 3000e39c: e58a6000 str r6, [sl] 3000e3a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 3000e3a4: e0843006 add r3, r4, r6 3000e3a8: e5533001 ldrb r3, [r3, #-1] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 3000e3ac: e1a00004 mov r0, r4 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 3000e3b0: e3530000 cmp r3, #0 token[i] = '\0'; 3000e3b4: 13a03000 movne r3, #0 3000e3b8: 17c43006 strbne r3, [r4, r6] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 3000e3bc: e59f1038 ldr r1, [pc, #56] ; 3000e3fc /* * Set token_len to the number of characters copied. */ *token_len = i; 3000e3c0: e58a6000 str r6, [sl] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 3000e3c4: eb001238 bl 30012cac 3000e3c8: e3500000 cmp r0, #0 3000e3cc: 1a000003 bne 3000e3e0 type = IMFS_UP_DIR; 3000e3d0: e3a00002 mov r0, #2 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 3000e3d4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 3000e3d8: e3a00004 mov r0, #4 <== NOT EXECUTED 3000e3dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 3000e3e0: e1a00004 mov r0, r4 3000e3e4: e59f1014 ldr r1, [pc, #20] ; 3000e400 3000e3e8: eb00122f bl 30012cac 3000e3ec: e3500000 cmp r0, #0 3000e3f0: 03a00001 moveq r0, #1 3000e3f4: 13a00003 movne r0, #3 3000e3f8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 30005b90 : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30005b90: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30005b94: e1a04000 mov r4, r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30005b98: e59f00e0 ldr r0, [pc, #224] ; 30005c80 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30005b9c: e1a08001 mov r8, r1 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30005ba0: e5900000 ldr r0, [r0] const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30005ba4: e1a0a002 mov sl, r2 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 30005ba8: e3500010 cmp r0, #16 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30005bac: e1a07003 mov r7, r3 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 30005bb0: 0a00000a beq 30005be0 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 30005bb4: e350000f cmp r0, #15 30005bb8: c3a02005 movgt r2, #5 30005bbc: c3a03020 movgt r3, #32 30005bc0: da000005 ble 30005bdc /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 30005bc4: e1500003 cmp r0, r3 30005bc8: 0a000004 beq 30005be0 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 30005bcc: ba000002 blt 30005bdc int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 30005bd0: e2522001 subs r2, r2, #1 30005bd4: e1a03083 lsl r3, r3, #1 30005bd8: 1afffff9 bne 30005bc4 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 30005bdc: e3a00080 mov r0, #128 ; 0x80 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 30005be0: e59f509c ldr r5, [pc, #156] ; 30005c84 30005be4: e5850000 str r0, [r5] /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 30005be8: eb001f7f bl 3000d9ec temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30005bec: e59fe094 ldr lr, [pc, #148] ; 30005c88 30005bf0: e284c038 add ip, r4, #56 ; 0x38 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 30005bf4: e1a06000 mov r6, r0 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30005bf8: e8be000f ldm lr!, {r0, r1, r2, r3} 30005bfc: e8ac000f stmia ip!, {r0, r1, r2, r3} 30005c00: e8be000f ldm lr!, {r0, r1, r2, r3} 30005c04: e8ac000f stmia ip!, {r0, r1, r2, r3} 30005c08: e89e000f ldm lr, {r0, r1, r2, r3} /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 30005c0c: e584601c str r6, [r4, #28] temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30005c10: e88c000f stm ip, {r0, r1, r2, r3} * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 30005c14: e5847024 str r7, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = op_table; 30005c18: e5848028 str r8, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 30005c1c: e3a00001 mov r0, #1 30005c20: e3a01014 mov r1, #20 30005c24: eb0001ae bl 300062e4 if ( !fs_info ) { 30005c28: e3500000 cmp r0, #0 30005c2c: 0a00000c beq 30005c64 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30005c30: e5952004 ldr r2, [r5, #4] fs_info->ino_count = 1; 30005c34: e3a03001 mov r3, #1 fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 30005c38: e5840034 str r0, [r4, #52] ; 0x34 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30005c3c: e0821003 add r1, r2, r3 30005c40: e5802000 str r2, [r0] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 30005c44: e59d201c ldr r2, [sp, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 30005c48: e9800408 stmib r0, {r3, sl} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 30005c4c: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; 30005c50: e5802010 str r2, [r0, #16] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30005c54: e5851004 str r1, [r5, #4] fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; 30005c58: e3a00000 mov r0, #0 fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 30005c5c: e5863038 str r3, [r6, #56] ; 0x38 return 0; } 30005c60: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); 30005c64: e1a00006 mov r0, r6 <== NOT EXECUTED 30005c68: eb00020a bl 30006498 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30005c6c: eb003100 bl 30012074 <__errno> <== NOT EXECUTED 30005c70: e3a0300c mov r3, #12 <== NOT EXECUTED 30005c74: e5803000 str r3, [r0] <== NOT EXECUTED 30005c78: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005c7c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 30005c8c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005c8c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30005c90: e5903000 ldr r3, [r0] <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005c94: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005c98: e1d313b4 ldrh r1, [r3, #52] ; 0x34 <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005c9c: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005ca0: e3510007 cmp r1, #7 <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005ca4: e1a06002 mov r6, r2 <== NOT EXECUTED int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30005ca8: e58d3028 str r3, [sp, #40] ; 0x28 <== NOT EXECUTED if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005cac: 8a00001d bhi 30005d28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 30005cb0: e1a00002 mov r0, r2 <== NOT EXECUTED 30005cb4: eb0034d8 bl 3001301c <== NOT EXECUTED 30005cb8: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30005cbc: e1a01000 mov r1, r0 <== NOT EXECUTED 30005cc0: e1a02004 mov r2, r4 <== NOT EXECUTED 30005cc4: e28d3044 add r3, sp, #68 ; 0x44 <== NOT EXECUTED 30005cc8: e1a00006 mov r0, r6 <== NOT EXECUTED 30005ccc: eb002198 bl 3000e334 <== NOT EXECUTED new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30005cd0: e28d3028 add r3, sp, #40 ; 0x28 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 30005cd4: e58d3000 str r3, [sp] <== NOT EXECUTED 30005cd8: e3a01003 mov r1, #3 <== NOT EXECUTED 30005cdc: e1a00005 mov r0, r5 <== NOT EXECUTED 30005ce0: e1a02004 mov r2, r4 <== NOT EXECUTED 30005ce4: e59f3064 ldr r3, [pc, #100] ; 30005d50 <== NOT EXECUTED 30005ce8: eb001eeb bl 3000d89c <== NOT EXECUTED new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 30005cec: e3500000 cmp r0, #0 <== NOT EXECUTED 30005cf0: 0a000011 beq 30005d3c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005cf4: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005cf8: e28d003c add r0, sp, #60 ; 0x3c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005cfc: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005d00: e3a01000 mov r1, #0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005d04: e2822001 add r2, r2, #1 <== NOT EXECUTED 30005d08: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005d0c: eb00020a bl 3000653c <== NOT EXECUTED 30005d10: e59d203c ldr r2, [sp, #60] ; 0x3c <== NOT EXECUTED 30005d14: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED return 0; 30005d18: e3a00000 mov r0, #0 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 30005d1c: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED return 0; } 30005d20: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED 30005d24: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 30005d28: eb0030d1 bl 30012074 <__errno> <== NOT EXECUTED 30005d2c: e3a0301f mov r3, #31 <== NOT EXECUTED 30005d30: e5803000 str r3, [r0] <== NOT EXECUTED 30005d34: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005d38: eafffff8 b 30005d20 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 30005d3c: eb0030cc bl 30012074 <__errno> <== NOT EXECUTED 30005d40: e3a0300c mov r3, #12 <== NOT EXECUTED 30005d44: e5803000 str r3, [r0] <== NOT EXECUTED 30005d48: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005d4c: eafffff3 b 30005d20 <== NOT EXECUTED =============================================================================== 30010c1c : IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30010c1c: e59f3128 ldr r3, [pc, #296] ; 30010d4c */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30010c20: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr} IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30010c24: e593b000 ldr fp, [r3] */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30010c28: e1a06002 mov r6, r2 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30010c2c: e1a0312b lsr r3, fp, #2 30010c30: e0223393 mla r2, r3, r3, r3 30010c34: e0233392 mla r3, r2, r3, r3 30010c38: e3a02000 mov r2, #0 30010c3c: e2433001 sub r3, r3, #1 30010c40: e1520006 cmp r2, r6 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30010c44: e24dd004 sub sp, sp, #4 30010c48: e1a04000 mov r4, r0 30010c4c: e1a08001 mov r8, r1 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30010c50: e003039b mul r3, fp, r3 30010c54: da000034 ble 30010d2c rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 30010c58: e5947054 ldr r7, [r4, #84] ; 0x54 30010c5c: e594a050 ldr sl, [r4, #80] ; 0x50 30010c60: e1560007 cmp r6, r7 30010c64: da000027 ble 30010d08 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010c68: e1a0cfcb asr ip, fp, #31 30010c6c: e1a0300c mov r3, ip 30010c70: e1a0200b mov r2, fp 30010c74: e1a00008 mov r0, r8 30010c78: e1a01006 mov r1, r6 30010c7c: e58dc000 str ip, [sp] 30010c80: eb001564 bl 30016218 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010c84: e59dc000 ldr ip, [sp] return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010c88: e1a05000 mov r5, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010c8c: e1a01007 mov r1, r7 30010c90: e1a0000a mov r0, sl 30010c94: e1a0200b mov r2, fp 30010c98: e1a0300c mov r3, ip 30010c9c: eb00155d bl 30016218 <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 30010ca0: e1550000 cmp r5, r0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010ca4: e1a0a000 mov sl, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 30010ca8: 3a00001b bcc 30010d1c 30010cac: e1a07000 mov r7, r0 30010cb0: ea000002 b 30010cc0 30010cb4: e2877001 add r7, r7, #1 30010cb8: e1550007 cmp r5, r7 30010cbc: 3a000016 bcc 30010d1c if ( IMFS_memfile_addblock( the_jnode, block ) ) { 30010cc0: e1a01007 mov r1, r7 30010cc4: e1a00004 mov r0, r4 30010cc8: ebffff4e bl 30010a08 30010ccc: e3500000 cmp r0, #0 30010cd0: 0afffff7 beq 30010cb4 30010cd4: ea000003 b 30010ce8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 30010cd8: e1a01007 mov r1, r7 <== NOT EXECUTED 30010cdc: e1a00004 mov r0, r4 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 30010ce0: e2477001 sub r7, r7, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 30010ce4: ebffffc2 bl 30010bf4 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 30010ce8: e15a0007 cmp sl, r7 <== NOT EXECUTED 30010cec: 9afffff9 bls 30010cd8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 30010cf0: eb0004df bl 30012074 <__errno> <== NOT EXECUTED 30010cf4: e3a0301c mov r3, #28 <== NOT EXECUTED 30010cf8: e5803000 str r3, [r0] <== NOT EXECUTED 30010cfc: e3e00000 mvn r0, #0 <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 30010d00: e28dd004 add sp, sp, #4 30010d04: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc} rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 30010d08: 1a000001 bne 30010d14 30010d0c: e158000a cmp r8, sl 30010d10: 8affffd4 bhi 30010c68 return 0; 30010d14: e3a00000 mov r0, #0 30010d18: eafffff8 b 30010d00 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 30010d1c: e5848050 str r8, [r4, #80] ; 0x50 30010d20: e5846054 str r6, [r4, #84] ; 0x54 return 0; 30010d24: e3a00000 mov r0, #0 30010d28: eafffff4 b 30010d00 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30010d2c: 1a000001 bne 30010d38 30010d30: e1530001 cmp r3, r1 30010d34: 8affffc7 bhi 30010c58 rtems_set_errno_and_return_minus_one( EINVAL ); 30010d38: eb0004cd bl 30012074 <__errno> <== NOT EXECUTED 30010d3c: e3a03016 mov r3, #22 <== NOT EXECUTED 30010d40: e5803000 str r3, [r0] <== NOT EXECUTED 30010d44: e3e00000 mvn r0, #0 <== NOT EXECUTED 30010d48: eaffffec b 30010d00 <== NOT EXECUTED =============================================================================== 300105bc : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 300105bc: e59f3200 ldr r3, [pc, #512] ; 300107c4 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 300105c0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 300105c4: e5934000 ldr r4, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 300105c8: e24dd004 sub sp, sp, #4 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 300105cc: e1a04124 lsr r4, r4, #2 300105d0: e2443001 sub r3, r4, #1 300105d4: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 300105d8: e1a05000 mov r5, r0 300105dc: e1a06002 mov r6, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 300105e0: 8a000007 bhi 30010604 p = info->indirect; if ( malloc_it ) { 300105e4: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 300105e8: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 300105ec: 0a00001c beq 30010664 if ( !p ) { 300105f0: e3500000 cmp r0, #0 300105f4: 0a000041 beq 30010700 } if ( !p ) return 0; return &info->indirect[ my_block ]; 300105f8: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } 300105fc: e28dd004 add sp, sp, #4 30010600: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 30010604: e0274494 mla r7, r4, r4, r4 30010608: e2473001 sub r3, r7, #1 3001060c: e1510003 cmp r1, r3 30010610: 8a000016 bhi 30010670 my_block -= FIRST_DOUBLY_INDIRECT; 30010614: e0647001 rsb r7, r4, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30010618: e1a00007 mov r0, r7 3001061c: e1a01004 mov r1, r4 30010620: eb00149c bl 30015898 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30010624: e1a01004 mov r1, r4 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30010628: e1a08000 mov r8, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3001062c: e1a00007 mov r0, r7 30010630: eb001452 bl 30015780 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 30010634: e3560000 cmp r6, #0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30010638: e1a04000 mov r4, r0 p = info->doubly_indirect; 3001063c: e595305c ldr r3, [r5, #92] ; 0x5c if ( malloc_it ) { 30010640: 0a00003f beq 30010744 if ( !p ) { 30010644: e3530000 cmp r3, #0 30010648: 0a000045 beq 30010764 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 3001064c: e7930104 ldr r0, [r3, r4, lsl #2] 30010650: e0834104 add r4, r3, r4, lsl #2 if ( !p1 ) { 30010654: e3500000 cmp r0, #0 30010658: 0a00002f beq 3001071c p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 3001065c: e0800108 add r0, r0, r8, lsl #2 30010660: eaffffe5 b 300105fc info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 30010664: e3500000 cmp r0, #0 30010668: 1affffe2 bne 300105f8 3001066c: eaffffe2 b 300105fc <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 30010670: e0234497 mla r3, r7, r4, r4 <== NOT EXECUTED 30010674: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30010678: e1510003 cmp r1, r3 <== NOT EXECUTED } /* * This means the requested block number is out of range. */ return 0; 3001067c: 83a00000 movhi r0, #0 <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 30010680: 8affffdd bhi 300105fc <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 30010684: e0677001 rsb r7, r7, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30010688: e1a00007 mov r0, r7 <== NOT EXECUTED 3001068c: e1a01004 mov r1, r4 <== NOT EXECUTED 30010690: eb001480 bl 30015898 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30010694: e1a01004 mov r1, r4 <== NOT EXECUTED * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30010698: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3001069c: e1a00007 mov r0, r7 <== NOT EXECUTED 300106a0: eb001436 bl 30015780 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 300106a4: e1a01004 mov r1, r4 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 300106a8: e1a08000 mov r8, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 300106ac: eb001433 bl 30015780 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 300106b0: e1a01004 mov r1, r4 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 300106b4: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 300106b8: e1a00008 mov r0, r8 <== NOT EXECUTED 300106bc: eb001475 bl 30015898 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 300106c0: e3560000 cmp r6, #0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 300106c4: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->triply_indirect; 300106c8: e5950060 ldr r0, [r5, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 300106cc: 0a000029 beq 30010778 <== NOT EXECUTED if ( !p ) { 300106d0: e3500000 cmp r0, #0 <== NOT EXECUTED 300106d4: 0a000035 beq 300107b0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 300106d8: e7903107 ldr r3, [r0, r7, lsl #2] <== NOT EXECUTED 300106dc: e0807107 add r7, r0, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { 300106e0: e3530000 cmp r3, #0 <== NOT EXECUTED 300106e4: 0a00002c beq 3001079c <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 300106e8: e7930104 ldr r0, [r3, r4, lsl #2] <== NOT EXECUTED 300106ec: e0834104 add r4, r3, r4, lsl #2 <== NOT EXECUTED if ( !p2 ) { 300106f0: e3500000 cmp r0, #0 <== NOT EXECUTED 300106f4: 0a00000d beq 30010730 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 300106f8: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 300106fc: eaffffbe b 300105fc <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 30010700: e58d1000 str r1, [sp] 30010704: ebffff9f bl 30010588 if ( !p ) 30010708: e3500000 cmp r0, #0 3001070c: e59d1000 ldr r1, [sp] return 0; info->indirect = p; 30010710: 15850058 strne r0, [r5, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 30010714: 1affffb7 bne 300105f8 30010718: eaffffb7 b 300105fc <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 3001071c: ebffff99 bl 30010588 if ( !p1 ) 30010720: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 30010724: 15840000 strne r0, [r4] p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 30010728: 10800108 addne r0, r0, r8, lsl #2 3001072c: eaffffb2 b 300105fc p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 30010730: ebffff94 bl 30010588 <== NOT EXECUTED if ( !p2 ) 30010734: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 30010738: 15840000 strne r0, [r4] <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 3001073c: 1080010a addne r0, r0, sl, lsl #2 <== NOT EXECUTED 30010740: eaffffad b 300105fc <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 30010744: e3530000 cmp r3, #0 30010748: 1a000001 bne 30010754 p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; 3001074c: e1a00003 mov r0, r3 <== NOT EXECUTED 30010750: eaffffa9 b 300105fc <== NOT EXECUTED } if ( !p ) return 0; p = (block_p *)p[ doubly ]; 30010754: e7930100 ldr r0, [r3, r0, lsl #2] if ( !p ) 30010758: e3500000 cmp r0, #0 return 0; return (block_p *)&p[ singly ]; 3001075c: 10800108 addne r0, r0, r8, lsl #2 30010760: eaffffa5 b 300105fc p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 30010764: ebffff87 bl 30010588 if ( !p ) 30010768: e2503000 subs r3, r0, #0 3001076c: 0afffff6 beq 3001074c return 0; info->doubly_indirect = p; 30010770: e585305c str r3, [r5, #92] ; 0x5c 30010774: eaffffb4 b 3001064c p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 30010778: e3500000 cmp r0, #0 <== NOT EXECUTED 3001077c: 0affff9e beq 300105fc <== NOT EXECUTED return 0; p1 = (block_p *) p[ triply ]; 30010780: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) 30010784: e3500000 cmp r0, #0 <== NOT EXECUTED 30010788: 0affff9b beq 300105fc <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 3001078c: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED if ( !p2 ) 30010790: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 30010794: 1080010a addne r0, r0, sl, lsl #2 <== NOT EXECUTED 30010798: eaffff97 b 300105fc <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 3001079c: ebffff79 bl 30010588 <== NOT EXECUTED if ( !p1 ) 300107a0: e2503000 subs r3, r0, #0 <== NOT EXECUTED 300107a4: 0affffe8 beq 3001074c <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 300107a8: e5873000 str r3, [r7] <== NOT EXECUTED 300107ac: eaffffcd b 300106e8 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 300107b0: ebffff74 bl 30010588 <== NOT EXECUTED if ( !p ) 300107b4: e3500000 cmp r0, #0 <== NOT EXECUTED 300107b8: 0affff8f beq 300105fc <== NOT EXECUTED return 0; info->triply_indirect = p; 300107bc: e5850060 str r0, [r5, #96] ; 0x60 <== NOT EXECUTED 300107c0: eaffffc4 b 300106d8 <== NOT EXECUTED =============================================================================== 300089dc : * using the IMFS memory file type. * */ int IMFS_memfile_maximum_size( void ) { return IMFS_MEMFILE_MAXIMUM_SIZE; 300089dc: e59f3018 ldr r3, [pc, #24] ; 300089fc <== NOT EXECUTED 300089e0: e5932000 ldr r2, [r3] <== NOT EXECUTED 300089e4: e1a03122 lsr r3, r2, #2 <== NOT EXECUTED 300089e8: e0203393 mla r0, r3, r3, r3 <== NOT EXECUTED 300089ec: e0233390 mla r3, r0, r3, r3 <== NOT EXECUTED 300089f0: e2430001 sub r0, r3, #1 <== NOT EXECUTED } 300089f4: e0000092 mul r0, r2, r0 <== NOT EXECUTED 300089f8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 300107c8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 300107c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 300107cc: e1a09000 mov r9, r0 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 300107d0: e590004c ldr r0, [r0, #76] ; 0x4c IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 300107d4: e24dd014 sub sp, sp, #20 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 300107d8: e3500006 cmp r0, #6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 300107dc: e1a07001 mov r7, r1 300107e0: e1a08002 mov r8, r2 300107e4: e1a0b003 mov fp, r3 300107e8: e59d5038 ldr r5, [sp, #56] ; 0x38 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { 300107ec: 0a00005c beq 30010964 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 300107f0: e5992054 ldr r2, [r9, #84] ; 0x54 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 300107f4: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 300107f8: e3a01000 mov r1, #0 300107fc: e1510002 cmp r1, r2 30010800: e5992050 ldr r2, [r9, #80] ; 0x50 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 30010804: e0851007 add r1, r5, r7 if ( last_byte > the_jnode->info.file.size ) 30010808: da00003d ble 30010904 my_length = the_jnode->info.file.size - start; 3001080c: e0635002 rsb r5, r3, r2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010810: e59f61b8 ldr r6, [pc, #440] ; 300109d0 30010814: e1a00007 mov r0, r7 30010818: e5964000 ldr r4, [r6] 3001081c: e1a01008 mov r1, r8 30010820: e1a02004 mov r2, r4 30010824: e1a03fc2 asr r3, r2, #31 30010828: e98d000c stmib sp, {r2, r3} 3001082c: eb0017a6 bl 300166cc <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010830: e99d000c ldmib sp, {r2, r3} */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010834: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010838: e1a01008 mov r1, r8 3001083c: e1a00007 mov r0, r7 30010840: eb001674 bl 30016218 <__divdi3> if ( start_offset ) { 30010844: e35a0000 cmp sl, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010848: e1a07000 mov r7, r0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 3001084c: 01a0800b moveq r8, fp /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 30010850: 0a000014 beq 300108a8 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010854: e1a00009 mov r0, r9 30010858: e1a01007 mov r1, r7 3001085c: e3a02000 mov r2, #0 30010860: ebffff55 bl 300105bc if ( !block_ptr ) 30010864: e3500000 cmp r0, #0 30010868: 0a000023 beq 300108fc return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 3001086c: e5901000 ldr r1, [r0] * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 30010870: e06a3004 rsb r3, sl, r4 30010874: e1550003 cmp r5, r3 30010878: 31a03005 movcc r3, r5 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 3001087c: e081100a add r1, r1, sl 30010880: e1a02003 mov r2, r3 30010884: e1a0000b mov r0, fp 30010888: e58d3000 str r3, [sp] 3001088c: eb000826 bl 3001292c dest += to_copy; 30010890: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; 30010894: e5964000 ldr r4, [r6] to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; 30010898: e08b8003 add r8, fp, r3 block++; 3001089c: e2877001 add r7, r7, #1 my_length -= to_copy; 300108a0: e0635005 rsb r5, r3, r5 copied += to_copy; 300108a4: e1a0a003 mov sl, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300108a8: e1550004 cmp r5, r4 300108ac: 2a000008 bcs 300108d4 300108b0: ea000017 b 30010914 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 300108b4: e5931000 ldr r1, [r3] 300108b8: eb00081b bl 3001292c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300108bc: e5963000 ldr r3, [r6] block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 300108c0: e0888004 add r8, r8, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300108c4: e1530005 cmp r3, r5 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 300108c8: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; 300108cc: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 300108d0: 8a00000f bhi 30010914 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 300108d4: e3a02000 mov r2, #0 300108d8: e1a01007 mov r1, r7 300108dc: e1a00009 mov r0, r9 300108e0: ebffff35 bl 300105bc if ( !block_ptr ) 300108e4: e2503000 subs r3, r0, #0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 300108e8: e1a02004 mov r2, r4 dest += to_copy; block++; my_length -= to_copy; 300108ec: e0645005 rsb r5, r4, r5 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 300108f0: e1a00008 mov r0, r8 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 300108f4: 1affffee bne 300108b4 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; 300108f8: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 300108fc: e28dd014 add sp, sp, #20 30010900: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 30010904: 1affffc1 bne 30010810 30010908: e1510002 cmp r1, r2 3001090c: 9affffbf bls 30010810 30010910: eaffffbd b 3001080c /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 30010914: e3550000 cmp r5, #0 30010918: 0a00000a beq 30010948 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3001091c: e1a00009 mov r0, r9 30010920: e1a01007 mov r1, r7 30010924: e3a02000 mov r2, #0 30010928: ebffff23 bl 300105bc if ( !block_ptr ) 3001092c: e2503000 subs r3, r0, #0 30010930: 0afffff0 beq 300108f8 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 30010934: e1a00008 mov r0, r8 30010938: e5931000 ldr r1, [r3] 3001093c: e1a02005 mov r2, r5 30010940: eb0007f9 bl 3001292c copied += my_length; 30010944: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); 30010948: e28d000c add r0, sp, #12 3001094c: e3a01000 mov r1, #0 30010950: ebffd6f9 bl 3000653c 30010954: e59d300c ldr r3, [sp, #12] return copied; 30010958: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 3001095c: e5893040 str r3, [r9, #64] ; 0x40 return copied; 30010960: eaffffe5 b 300108fc if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 30010964: e2894050 add r4, r9, #80 ; 0x50 30010968: e8940018 ldm r4, {r3, r4} 3001096c: e1a00003 mov r0, r3 30010970: e1a01004 mov r1, r4 30010974: e3a02000 mov r2, #0 30010978: e0500007 subs r0, r0, r7 3001097c: e0c11008 sbc r1, r1, r8 30010980: e1520001 cmp r2, r1 my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 30010984: e5992058 ldr r2, [r9, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) 30010988: da00000b ble 300109bc my_length = the_jnode->info.linearfile.size - start; 3001098c: e067a003 rsb sl, r7, r3 memcpy(dest, &file_ptr[start], my_length); 30010990: e0821007 add r1, r2, r7 30010994: e1a0000b mov r0, fp 30010998: e1a0200a mov r2, sl 3001099c: eb0007e2 bl 3001292c return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 300109a0: e28d000c add r0, sp, #12 300109a4: e3a01000 mov r1, #0 300109a8: ebffd6e3 bl 3000653c 300109ac: e59d300c ldr r3, [sp, #12] return copied; 300109b0: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 300109b4: e5893040 str r3, [r9, #64] ; 0x40 300109b8: eaffffcf b 300108fc if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 300109bc: 1a000001 bne 300109c8 300109c0: e1550000 cmp r5, r0 300109c4: 8afffff0 bhi 3001098c /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 300109c8: e1a0a005 mov sl, r5 <== NOT EXECUTED 300109cc: eaffffef b 30010990 <== NOT EXECUTED =============================================================================== 30010ab4 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 30010ab4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 30010ab8: e59f6130 ldr r6, [pc, #304] ; 30010bf0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30010abc: e5903058 ldr r3, [r0, #88] ; 0x58 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 30010ac0: e5967000 ldr r7, [r6] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30010ac4: e3530000 cmp r3, #0 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 30010ac8: e1a0a000 mov sl, r0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 30010acc: e1a07127 lsr r7, r7, #2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 30010ad0: 12800058 addne r0, r0, #88 ; 0x58 30010ad4: 11a01007 movne r1, r7 30010ad8: 1bffffe0 blne 30010a60 } if ( info->doubly_indirect ) { 30010adc: e59a305c ldr r3, [sl, #92] ; 0x5c 30010ae0: e3530000 cmp r3, #0 30010ae4: 0a000014 beq 30010b3c for ( i=0 ; i <== NOT EXECUTED 30010af4: e3a02000 mov r2, #0 <== NOT EXECUTED 30010af8: e1a04002 mov r4, r2 <== NOT EXECUTED 30010afc: ea000000 b 30010b04 <== NOT EXECUTED 30010b00: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 30010b04: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED 30010b08: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED 30010b0c: e3510000 cmp r1, #0 <== NOT EXECUTED if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( 30010b14: e1a01007 mov r1, r7 <== NOT EXECUTED 30010b18: e0830002 add r0, r3, r2 <== NOT EXECUTED 30010b1c: 1bffffcf blne 30010a60 <== NOT EXECUTED if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 30010b30: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 30010b34: e1a01007 mov r1, r7 <== NOT EXECUTED 30010b38: ebffffc8 bl 30010a60 <== NOT EXECUTED } if ( info->triply_indirect ) { 30010b3c: e59a0060 ldr r0, [sl, #96] ; 0x60 30010b40: e3500000 cmp r0, #0 30010b44: 0a000027 beq 30010be8 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 30010b54: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30010b58: e3550000 cmp r5, #0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 30010b5c: 13a09000 movne r9, #0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30010b60: 11a08009 movne r8, r9 <== NOT EXECUTED 30010b64: 0a00001c beq 30010bdc <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 30010b70: e3a00000 mov r0, #0 <== NOT EXECUTED 30010b74: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { 30010b78: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED 30010b7c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED 30010b80: e3530000 cmp r3, #0 <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 30010ba4: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 30010ba8: e0800009 add r0, r0, r9 <== NOT EXECUTED 30010bac: e1a01007 mov r1, r7 <== NOT EXECUTED 30010bb0: ebffffaa bl 30010a60 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 30010bc8: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30010bcc: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 30010bd0: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30010bd4: e3550000 cmp r5, #0 <== NOT EXECUTED 30010bd8: 1affffe2 bne 30010b68 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 30010bdc: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED 30010be0: e1a01007 mov r1, r7 <== NOT EXECUTED 30010be4: ebffff9d bl 30010a60 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 30010be8: e3a00000 mov r0, #0 30010bec: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 30010bf4 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 30010bf4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010bf8: e3a02000 mov r2, #0 <== NOT EXECUTED 30010bfc: ebfffe6e bl 300105bc <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; 30010c00: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010c04: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 30010c08: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; 30010c0c: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 30010c10: ebffff8a bl 30010a40 <== NOT EXECUTED return 1; } 30010c14: e3a00001 mov r0, #1 <== NOT EXECUTED 30010c18: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 30010d50 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010d50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30010d54: e1a09000 mov r9, r0 30010d58: e24dd010 sub sp, sp, #16 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 30010d5c: e5900054 ldr r0, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010d60: e59db034 ldr fp, [sp, #52] ; 0x34 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 30010d64: e3500000 cmp r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010d68: e1a06001 mov r6, r1 30010d6c: e1a07002 mov r7, r2 30010d70: e1a08003 mov r8, r3 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; 30010d74: e08b1001 add r1, fp, r1 if ( last_byte > the_jnode->info.file.size ) { 30010d78: ba000054 blt 30010ed0 30010d7c: 0a000050 beq 30010ec4 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010d80: e59f5170 ldr r5, [pc, #368] ; 30010ef8 30010d84: e1a00006 mov r0, r6 30010d88: e5954000 ldr r4, [r5] 30010d8c: e1a01007 mov r1, r7 30010d90: e1a02004 mov r2, r4 30010d94: e1a03fc2 asr r3, r2, #31 30010d98: e88d000c stm sp, {r2, r3} 30010d9c: eb00164a bl 300166cc <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010da0: e89d000c ldm sp, {r2, r3} */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010da4: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010da8: e1a01007 mov r1, r7 30010dac: e1a00006 mov r0, r6 30010db0: eb001518 bl 30016218 <__divdi3> if ( start_offset ) { 30010db4: e35a0000 cmp sl, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010db8: e1a07000 mov r7, r0 if ( start_offset ) { 30010dbc: 01a0600b moveq r6, fp 30010dc0: 1a000016 bne 30010e20 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010dc4: e1560004 cmp r6, r4 30010dc8: 2a000008 bcs 30010df0 30010dcc: ea000027 b 30010e70 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 30010dd0: e5900000 ldr r0, [r0] 30010dd4: eb0006d4 bl 3001292c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010dd8: e5953000 ldr r3, [r5] return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; 30010ddc: e0888004 add r8, r8, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010de0: e1530006 cmp r3, r6 #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; 30010de4: e2877001 add r7, r7, #1 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 30010de8: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010dec: 8a00001f bhi 30010e70 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010df0: e1a01007 mov r1, r7 30010df4: e3a02000 mov r2, #0 30010df8: e1a00009 mov r0, r9 30010dfc: ebfffdee bl 300105bc if ( !block_ptr ) 30010e00: e3500000 cmp r0, #0 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 30010e04: e1a01008 mov r1, r8 30010e08: e1a02004 mov r2, r4 src += to_copy; block++; my_length -= to_copy; 30010e0c: e0646006 rsb r6, r4, r6 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 30010e10: 1affffee bne 30010dd0 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 30010e14: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 30010e18: e28dd010 add sp, sp, #16 30010e1c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010e20: e1a00009 mov r0, r9 <== NOT EXECUTED 30010e24: e1a01007 mov r1, r7 <== NOT EXECUTED 30010e28: e3a02000 mov r2, #0 <== NOT EXECUTED 30010e2c: ebfffde2 bl 300105bc <== NOT EXECUTED if ( !block_ptr ) 30010e30: e3500000 cmp r0, #0 <== NOT EXECUTED 30010e34: 0afffff7 beq 30010e18 <== NOT EXECUTED * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 30010e38: e06a4004 rsb r4, sl, r4 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 30010e3c: e5900000 ldr r0, [r0] <== NOT EXECUTED * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 30010e40: e154000b cmp r4, fp <== NOT EXECUTED 30010e44: 21a0400b movcs r4, fp <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 30010e48: e080000a add r0, r0, sl <== NOT EXECUTED 30010e4c: e1a01008 mov r1, r8 <== NOT EXECUTED 30010e50: e1a02004 mov r2, r4 <== NOT EXECUTED 30010e54: eb0006b4 bl 3001292c <== NOT EXECUTED src += to_copy; 30010e58: e0888004 add r8, r8, r4 <== NOT EXECUTED block++; my_length -= to_copy; 30010e5c: e064600b rsb r6, r4, fp <== NOT EXECUTED copied += to_copy; 30010e60: e1a0a004 mov sl, r4 <== NOT EXECUTED src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 30010e64: e2877001 add r7, r7, #1 <== NOT EXECUTED my_length -= to_copy; copied += to_copy; 30010e68: e5954000 ldr r4, [r5] <== NOT EXECUTED 30010e6c: eaffffd4 b 30010dc4 <== NOT EXECUTED * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 30010e70: e3560000 cmp r6, #0 30010e74: 0a00000a beq 30010ea4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010e78: e1a00009 mov r0, r9 30010e7c: e1a01007 mov r1, r7 30010e80: e3a02000 mov r2, #0 30010e84: ebfffdcc bl 300105bc if ( !block_ptr ) 30010e88: e3500000 cmp r0, #0 30010e8c: 0affffe0 beq 30010e14 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 30010e90: e5900000 ldr r0, [r0] 30010e94: e1a01008 mov r1, r8 30010e98: e1a02006 mov r2, r6 30010e9c: eb0006a2 bl 3001292c my_length = 0; copied += to_copy; 30010ea0: e08aa006 add sl, sl, r6 } IMFS_mtime_ctime_update( the_jnode ); 30010ea4: e28d0008 add r0, sp, #8 30010ea8: e3a01000 mov r1, #0 30010eac: ebffd5a2 bl 3000653c 30010eb0: e59d3008 ldr r3, [sp, #8] return copied; 30010eb4: e1a0000a mov r0, sl memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 30010eb8: e5893044 str r3, [r9, #68] ; 0x44 30010ebc: e5893048 str r3, [r9, #72] ; 0x48 return copied; 30010ec0: eaffffd4 b 30010e18 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 30010ec4: e5993050 ldr r3, [r9, #80] ; 0x50 30010ec8: e1530001 cmp r3, r1 30010ecc: 2affffab bcs 30010d80 status = IMFS_memfile_extend( the_jnode, last_byte ); 30010ed0: e1a00009 mov r0, r9 30010ed4: e3a02000 mov r2, #0 30010ed8: ebffff4f bl 30010c1c if ( status ) 30010edc: e3500000 cmp r0, #0 30010ee0: 0affffa6 beq 30010d80 rtems_set_errno_and_return_minus_one( ENOSPC ); 30010ee4: eb000462 bl 30012074 <__errno> <== NOT EXECUTED 30010ee8: e3a0301c mov r3, #28 <== NOT EXECUTED 30010eec: e5803000 str r3, [r0] <== NOT EXECUTED 30010ef0: e3e00000 mvn r0, #0 <== NOT EXECUTED 30010ef4: eaffffc7 b 30010e18 <== NOT EXECUTED =============================================================================== 30005e0c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30005e0c: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30005e10: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30005e14: e593204c ldr r2, [r3, #76] ; 0x4c 30005e18: e3520001 cmp r2, #1 30005e1c: 1a000002 bne 30005e2c /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 30005e20: e583005c str r0, [r3, #92] ; 0x5c return 0; 30005e24: e3a00000 mov r0, #0 } 30005e28: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 30005e2c: eb003090 bl 30012074 <__errno> <== NOT EXECUTED 30005e30: e3a03014 mov r3, #20 <== NOT EXECUTED 30005e34: e5803000 str r3, [r0] <== NOT EXECUTED 30005e38: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005e3c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 300087b0 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 300087b0: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 300087b4: e59f50f8 ldr r5, [pc, #248] ; 300088b4 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 300087b8: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 300087bc: e5953000 ldr r3, [r5] 300087c0: e280000c add r0, r0, #12 300087c4: e5931008 ldr r1, [r3, #8] 300087c8: eb003866 bl 30016968 switch( the_jnode->type ) { 300087cc: e594204c ldr r2, [r4, #76] ; 0x4c 300087d0: e2423001 sub r3, r2, #1 300087d4: e3530006 cmp r3, #6 300087d8: 979ff103 ldrls pc, [pc, r3, lsl #2] 300087dc: ea000023 b 30008870 <== NOT EXECUTED 300087e0: 30008884 .word 0x30008884 <== NOT EXECUTED 300087e4: 30008898 .word 0x30008898 <== NOT EXECUTED 300087e8: 300087fc .word 0x300087fc <== NOT EXECUTED 300087ec: 300087fc .word 0x300087fc <== NOT EXECUTED 300087f0: 30008834 .word 0x30008834 <== NOT EXECUTED 300087f4: 30008854 .word 0x30008854 <== NOT EXECUTED 300087f8: 30008818 .word 0x30008818 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 300087fc: e5953000 ldr r3, [r5] <== NOT EXECUTED 30008800: e59f00b0 ldr r0, [pc, #176] ; 300088b8 <== NOT EXECUTED 30008804: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 30008808: e3a01001 mov r1, #1 <== NOT EXECUTED 3000880c: e3a02013 mov r2, #19 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 30008810: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 30008814: ea003b83 b 30017628 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 30008818: e5953000 ldr r3, [r5] <== NOT EXECUTED 3000881c: e59f0098 ldr r0, [pc, #152] ; 300088bc <== NOT EXECUTED 30008820: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 30008824: e3a01001 mov r1, #1 <== NOT EXECUTED 30008828: e3a02012 mov r2, #18 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 3000882c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 30008830: ea003b7c b 30017628 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 30008834: e5953000 ldr r3, [r5] <== NOT EXECUTED 30008838: e59f1080 ldr r1, [pc, #128] ; 300088c0 <== NOT EXECUTED 3000883c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30008840: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 30008844: eb0037f2 bl 30016814 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 30008848: e59f0074 ldr r0, [pc, #116] ; 300088c4 } 3000884c: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 30008850: ea003f56 b 300185b0 fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 30008854: e5953000 ldr r3, [r5] 30008858: e59f1068 ldr r1, [pc, #104] ; 300088c8 3000885c: e5930008 ldr r0, [r3, #8] 30008860: e5942050 ldr r2, [r4, #80] ; 0x50 30008864: e5943058 ldr r3, [r4, #88] ; 0x58 30008868: eb0037e9 bl 30016814 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 3000886c: eafffff5 b 30008848 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 30008870: e5953000 ldr r3, [r5] <== NOT EXECUTED 30008874: e59f1050 ldr r1, [pc, #80] ; 300088cc <== NOT EXECUTED 30008878: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 3000887c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 30008880: ea0037e3 b 30016814 <== NOT EXECUTED IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 30008884: e5953000 ldr r3, [r5] 30008888: e3a0002f mov r0, #47 ; 0x2f 3000888c: e5931008 ldr r1, [r3, #8] 30008890: eb0037ff bl 30016894 break; 30008894: eaffffeb b 30008848 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 30008898: e5953000 ldr r3, [r5] 3000889c: e59f102c ldr r1, [pc, #44] ; 300088d0 300088a0: e5930008 ldr r0, [r3, #8] 300088a4: e5942050 ldr r2, [r4, #80] ; 0x50 300088a8: e5943054 ldr r3, [r4, #84] ; 0x54 300088ac: eb0037d8 bl 30016814 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 300088b0: eaffffe4 b 30008848 =============================================================================== 30005e4c : node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30005e4c: e3520000 cmp r2, #0 <== NOT EXECUTED ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 30005e50: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 30005e54: e5904000 ldr r4, [r0] <== NOT EXECUTED IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30005e58: 01a00002 moveq r0, r2 <== NOT EXECUTED 30005e5c: 0a000010 beq 30005ea4 <== NOT EXECUTED 30005e60: e5943050 ldr r3, [r4, #80] ; 0x50 <== NOT EXECUTED 30005e64: e5d33000 ldrb r3, [r3] <== NOT EXECUTED 30005e68: e3530000 cmp r3, #0 <== NOT EXECUTED 30005e6c: 01a00003 moveq r0, r3 <== NOT EXECUTED 30005e70: 0a00000b beq 30005ea4 <== NOT EXECUTED 30005e74: e3a0c000 mov ip, #0 <== NOT EXECUTED 30005e78: e1a0000c mov r0, ip <== NOT EXECUTED 30005e7c: ea000003 b 30005e90 <== NOT EXECUTED 30005e80: e5943050 ldr r3, [r4, #80] ; 0x50 <== NOT EXECUTED 30005e84: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED 30005e88: e3530000 cmp r3, #0 <== NOT EXECUTED 30005e8c: 0a000004 beq 30005ea4 <== NOT EXECUTED 30005e90: e2800001 add r0, r0, #1 <== NOT EXECUTED 30005e94: e1500002 cmp r0, r2 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; 30005e98: e7c1300c strb r3, [r1, ip] <== NOT EXECUTED node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30005e9c: e1a0c000 mov ip, r0 <== NOT EXECUTED 30005ea0: 3afffff6 bcc 30005e80 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 30005ea4: e8bd0010 pop {r4} <== NOT EXECUTED 30005ea8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30005eac : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 30005eac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 30005eb0: e5914000 ldr r4, [r1] <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 30005eb4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 30005eb8: e1a01003 mov r1, r3 <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 30005ebc: e1a05002 mov r5, r2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 30005ec0: e284000c add r0, r4, #12 <== NOT EXECUTED 30005ec4: e3a02020 mov r2, #32 <== NOT EXECUTED 30005ec8: eb00346b bl 3001307c <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 30005ecc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30005ed0: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30005ed4: 11a00004 movne r0, r4 <== NOT EXECUTED 30005ed8: 1b00119b blne 3000a54c <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 30005edc: e5953000 ldr r3, [r5] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 30005ee0: e1a01004 mov r1, r4 <== NOT EXECUTED 30005ee4: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 30005ee8: e5843008 str r3, [r4, #8] <== NOT EXECUTED 30005eec: eb00118b bl 3000a520 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 30005ef0: e1a0000d mov r0, sp <== NOT EXECUTED 30005ef4: e3a01000 mov r1, #0 <== NOT EXECUTED 30005ef8: eb00018f bl 3000653c <== NOT EXECUTED 30005efc: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 30005f00: e3a00000 mov r0, #0 <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 30005f04: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 30005f08: e28dd008 add sp, sp, #8 <== NOT EXECUTED 30005f0c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000e4e0 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 3000e4e0: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e4e4: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 3000e4e8: e593204c ldr r2, [r3, #76] ; 0x4c 3000e4ec: e2422002 sub r2, r2, #2 3000e4f0: e3520005 cmp r2, #5 3000e4f4: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000e4f8: ea000026 b 3000e598 <== NOT EXECUTED 3000e4fc: 3000e584 .word 0x3000e584 <== NOT EXECUTED 3000e500: 3000e598 .word 0x3000e598 <== NOT EXECUTED 3000e504: 3000e514 .word 0x3000e514 <== NOT EXECUTED 3000e508: 3000e5ac .word 0x3000e5ac <== NOT EXECUTED 3000e50c: 3000e5ac .word 0x3000e5ac <== NOT EXECUTED 3000e510: 3000e514 .word 0x3000e514 <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 3000e514: e3a04000 mov r4, #0 <== NOT EXECUTED 3000e518: e3a05000 mov r5, #0 <== NOT EXECUTED 3000e51c: e5814020 str r4, [r1, #32] <== NOT EXECUTED 3000e520: e5815024 str r5, [r1, #36] ; 0x24 <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 3000e524: e5902010 ldr r2, [r0, #16] buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 3000e528: e1d373b4 ldrh r7, [r3, #52] ; 0x34 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 3000e52c: e5922034 ldr r2, [r2, #52] ; 0x34 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 3000e530: e5930044 ldr r0, [r3, #68] ; 0x44 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 3000e534: e5935030 ldr r5, [r3, #48] ; 0x30 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 3000e538: e5934038 ldr r4, [r3, #56] ; 0x38 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 3000e53c: e5926000 ldr r6, [r2] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 3000e540: e593c040 ldr ip, [r3, #64] ; 0x40 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 3000e544: e5932048 ldr r2, [r3, #72] ; 0x48 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 3000e548: e1c171b0 strh r7, [r1, #16] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 3000e54c: e59f706c ldr r7, [pc, #108] ; 3000e5c0 3000e550: e5817000 str r7, [r1] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 3000e554: e1d373bc ldrh r7, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; 3000e558: e1d333be ldrh r3, [r3, #62] ; 0x3e rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 3000e55c: e1c171b2 strh r7, [r1, #18] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 3000e560: e5810030 str r0, [r1, #48] ; 0x30 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 3000e564: e5816004 str r6, [r1, #4] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 3000e568: e1c131b4 strh r3, [r1, #20] */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 3000e56c: e581500c str r5, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 3000e570: e5814008 str r4, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 3000e574: e581c028 str ip, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 3000e578: e5812038 str r2, [r1, #56] ; 0x38 return 0; 3000e57c: e3a00000 mov r0, #0 } 3000e580: e8bd80f0 pop {r4, r5, r6, r7, pc} switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 3000e584: e593c054 ldr ip, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 3000e588: e5932050 ldr r2, [r3, #80] ; 0x50 3000e58c: e581c01c str ip, [r1, #28] 3000e590: e5812018 str r2, [r1, #24] break; 3000e594: eaffffe2 b 3000e524 case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000e598: eb000eb5 bl 30012074 <__errno> <== NOT EXECUTED 3000e59c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000e5a0: e5803000 str r3, [r0] <== NOT EXECUTED 3000e5a4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000e5a8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 3000e5ac: e2835050 add r5, r3, #80 ; 0x50 3000e5b0: e8950030 ldm r5, {r4, r5} 3000e5b4: e5814020 str r4, [r1, #32] 3000e5b8: e5815024 str r5, [r1, #36] ; 0x24 break; 3000e5bc: eaffffd8 b 3000e524 =============================================================================== 30005f10 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30005f10: e92d40f0 push {r4, r5, r6, r7, lr} 30005f14: e1a06000 mov r6, r0 30005f18: e24dd040 sub sp, sp, #64 ; 0x40 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 30005f1c: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30005f20: e1a07002 mov r7, r2 30005f24: e1a05001 mov r5, r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 30005f28: eb00343b bl 3001301c 30005f2c: e28d4004 add r4, sp, #4 30005f30: e1a01000 mov r1, r0 30005f34: e1a02004 mov r2, r4 30005f38: e28d303c add r3, sp, #60 ; 0x3c 30005f3c: e1a00007 mov r0, r7 30005f40: eb0020fb bl 3000e334 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30005f44: e1a00005 mov r0, r5 30005f48: eb00341f bl 30012fcc if (info.sym_link.name == NULL) { 30005f4c: e3500000 cmp r0, #0 IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30005f50: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 30005f54: 0a00000d beq 30005f90 new_node = IMFS_create_node( parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30005f58: e28d3028 add r3, sp, #40 ; 0x28 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 30005f5c: e58d3000 str r3, [sp] 30005f60: e3a01004 mov r1, #4 30005f64: e1a00006 mov r0, r6 30005f68: e1a02004 mov r2, r4 30005f6c: e59f3030 ldr r3, [pc, #48] ; 30005fa4 30005f70: eb001e49 bl 3000d89c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30005f74: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 30005f78: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30005f7c: 0a000001 beq 30005f88 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 30005f80: e28dd040 add sp, sp, #64 ; 0x40 30005f84: e8bd80f0 pop {r4, r5, r6, r7, pc} ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 30005f88: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 30005f8c: eb000141 bl 30006498 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30005f90: eb003037 bl 30012074 <__errno> <== NOT EXECUTED 30005f94: e3a0300c mov r3, #12 <== NOT EXECUTED 30005f98: e5803000 str r3, [r0] <== NOT EXECUTED 30005f9c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005fa0: eafffff6 b 30005f80 <== NOT EXECUTED =============================================================================== 30005fa8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005fa8: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 30005fac: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005fb0: e24dd01c sub sp, sp, #28 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005fb4: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005fb8: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005fbc: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005fc0: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005fc4: 0a000006 beq 30005fe4 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 30005fc8: e5943008 ldr r3, [r4, #8] 30005fcc: e1a00006 mov r0, r6 30005fd0: e1a01004 mov r1, r4 30005fd4: e1a0e00f mov lr, pc 30005fd8: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 30005fdc: e28dd01c add sp, sp, #28 30005fe0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 30005fe4: e595e050 ldr lr, [r5, #80] ; 0x50 <== NOT EXECUTED 30005fe8: e35e0000 cmp lr, #0 <== NOT EXECUTED 30005fec: 0a00001f beq 30006070 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 30005ff0: e1a0c00d mov ip, sp <== NOT EXECUTED 30005ff4: e1a07001 mov r7, r1 <== NOT EXECUTED 30005ff8: e8b7000f ldm r7!, {r0, r1, r2, r3} <== NOT EXECUTED 30005ffc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30006000: e5973000 ldr r3, [r7] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; 30006004: e28d801c add r8, sp, #28 <== NOT EXECUTED IMFS_Set_handlers( &the_link ); 30006008: e1a0000d mov r0, sp <== NOT EXECUTED if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 3000600c: e58c3000 str r3, [ip] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; 30006010: e528e01c str lr, [r8, #-28]! <== NOT EXECUTED IMFS_Set_handlers( &the_link ); 30006014: eb001e84 bl 3000da2c <== NOT EXECUTED /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 30006018: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED 3000601c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED 30006020: e3520001 cmp r2, #1 <== NOT EXECUTED 30006024: 0a000008 beq 3000604c <== NOT EXECUTED if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 30006028: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3000602c: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( node->info.hard_link.link_node ); 30006030: e28d0014 add r0, sp, #20 <== NOT EXECUTED 30006034: e3a01000 mov r1, #0 <== NOT EXECUTED 30006038: eb00013f bl 3000653c <== NOT EXECUTED 3000603c: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED 30006040: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 30006044: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED 30006048: eaffffde b 30005fc8 <== NOT EXECUTED * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 3000604c: e1a00006 mov r0, r6 <== NOT EXECUTED 30006050: e1a0100d mov r1, sp <== NOT EXECUTED 30006054: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30006058: e1a0e00f mov lr, pc <== NOT EXECUTED 3000605c: e593f034 ldr pc, [r3, #52] ; 0x34 <== NOT EXECUTED if ( result != 0 ) 30006060: e3500000 cmp r0, #0 <== NOT EXECUTED 30006064: 0affffd7 beq 30005fc8 <== NOT EXECUTED return -1; 30006068: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000606c: eaffffda b 30005fdc <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 30006070: eb002fff bl 30012074 <__errno> <== NOT EXECUTED 30006074: e3a03016 mov r3, #22 <== NOT EXECUTED 30006078: e5803000 str r3, [r0] <== NOT EXECUTED 3000607c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30006080: eaffffd5 b 30005fdc <== NOT EXECUTED =============================================================================== 30006084 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30006084: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30006088: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 3000608c: e593204c ldr r2, [r3, #76] ; 0x4c 30006090: e3520001 cmp r2, #1 30006094: 1a000005 bne 300060b0 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 30006098: e593205c ldr r2, [r3, #92] ; 0x5c 3000609c: e3520000 cmp r2, #0 300060a0: 0a000007 beq 300060c4 /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 300060a4: e3a00000 mov r0, #0 300060a8: e583005c str r0, [r3, #92] ; 0x5c return 0; } 300060ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 300060b0: eb002fef bl 30012074 <__errno> <== NOT EXECUTED 300060b4: e3a03014 mov r3, #20 <== NOT EXECUTED 300060b8: e5803000 str r3, [r0] <== NOT EXECUTED 300060bc: e3e00000 mvn r0, #0 <== NOT EXECUTED 300060c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 300060c4: eb002fea bl 30012074 <__errno> <== NOT EXECUTED 300060c8: e3a03016 mov r3, #22 <== NOT EXECUTED 300060cc: e5803000 str r3, [r0] <== NOT EXECUTED 300060d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 300060d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 300060d8 : int IMFS_utime( rtems_filesystem_location_info_t *pathloc, /* IN */ time_t actime, /* IN */ time_t modtime /* IN */ ) { 300060d8: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 300060dc: e5904000 ldr r4, [r0] <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; the_jnode->stat_ctime = time( NULL ); 300060e0: e3a00000 mov r0, #0 <== NOT EXECUTED { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; the_jnode->stat_atime = actime; 300060e4: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_jnode->stat_mtime = modtime; 300060e8: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED the_jnode->stat_ctime = time( NULL ); 300060ec: eb00341d bl 30013168