=============================================================================== 30006c80 : 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 ); 30006c80: e3a03000 mov r3, #0 <== NOT EXECUTED 30006c84: e5803084 str r3, [r0, #132] ; 0x84 <== NOT EXECUTED 30006c88: e5803088 str r3, [r0, #136] ; 0x88 <== NOT EXECUTED #else the_thread->cpu_time_used = 0; #endif } 30006c8c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000d8ec : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 3000d8ec: e5903000 ldr r3, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 3000d8f0: e5902010 ldr r2, [r0, #16] switch( node->type ) { 3000d8f4: 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; 3000d8f8: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { 3000d8fc: e2433001 sub r3, r3, #1 3000d900: e3530006 cmp r3, #6 3000d904: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000d908: ea000008 b 3000d930 <== NOT EXECUTED 3000d90c: 3000d958 .word 0x3000d958 <== NOT EXECUTED 3000d910: 3000d968 .word 0x3000d968 <== NOT EXECUTED 3000d914: 3000d948 .word 0x3000d948 <== NOT EXECUTED 3000d918: 3000d948 .word 0x3000d948 <== NOT EXECUTED 3000d91c: 3000d938 .word 0x3000d938 <== NOT EXECUTED 3000d920: 3000d938 .word 0x3000d938 <== NOT EXECUTED 3000d924: 3000d928 .word 0x3000d928 <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 3000d928: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 3000d92c: e5803008 str r3, [r0, #8] <== NOT EXECUTED break; } return 0; } 3000d930: e3a00000 mov r0, #0 <== NOT EXECUTED 3000d934: 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; 3000d938: e5923008 ldr r3, [r2, #8] 3000d93c: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000d940: e3a00000 mov r0, #0 3000d944: 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; 3000d948: e59f3028 ldr r3, [pc, #40] ; 3000d978 3000d94c: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000d950: e3a00000 mov r0, #0 3000d954: 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; 3000d958: e592300c ldr r3, [r2, #12] 3000d95c: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000d960: e3a00000 mov r0, #0 3000d964: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 3000d968: e59f300c ldr r3, [pc, #12] ; 3000d97c 3000d96c: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } 3000d970: e3a00000 mov r0, #0 3000d974: e12fff1e bx lr =============================================================================== 3000d6ac : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000d6ac: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 3000d6b0: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000d6b4: e24dd008 sub sp, sp, #8 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 3000d6b8: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000d6bc: e1a0000d mov r0, sp <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; jnode->st_gid = group; 3000d6c0: e1c423be strh r2, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000d6c4: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d6c8: ebffe39b bl 3000653c <== NOT EXECUTED 3000d6cc: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 3000d6d0: e3a00000 mov r0, #0 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000d6d4: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000d6d8: e28dd008 add sp, sp, #8 <== NOT EXECUTED 3000d6dc: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 3000d75c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000d75c: 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 ) 3000d760: e3500000 cmp r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 3000d764: e1a04001 mov r4, r1 3000d768: e59d7018 ldr r7, [sp, #24] /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; 3000d76c: 01a08000 moveq r8, r0 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 3000d770: 0a00002b beq 3000d824 return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 3000d774: e5901010 ldr r1, [r0, #16] /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 3000d778: e3540007 cmp r4, #7 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 3000d77c: e5906000 ldr r6, [r0] fs_info = parent_loc->mt_entry->fs_info; 3000d780: e5915034 ldr r5, [r1, #52] ; 0x34 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 3000d784: 0a000028 beq 3000d82c return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 3000d788: e59f1114 ldr r1, [pc, #276] ; 3000d8a4 3000d78c: e1a00004 mov r0, r4 3000d790: e591c000 ldr ip, [r1] 3000d794: e1a01002 mov r1, r2 3000d798: e59c202c ldr r2, [ip, #44] ; 0x2c 3000d79c: e1c32002 bic r2, r3, r2 3000d7a0: ebffffce bl 3000d6e0 if ( !node ) 3000d7a4: e2508000 subs r8, r0, #0 3000d7a8: 0a00001d beq 3000d824 return NULL; /* * Set the type specific information */ if ( type == IMFS_DIRECTORY ) { 3000d7ac: e3540001 cmp r4, #1 3000d7b0: 0a00000d beq 3000d7ec rtems_chain_initialize_empty(&node->info.directory.Entries); } else if ( type == IMFS_HARD_LINK ) { 3000d7b4: e3540003 cmp r4, #3 3000d7b8: 0a000026 beq 3000d858 node->info.hard_link.link_node = info->hard_link.link_node; } else if ( type == IMFS_SYM_LINK ) { 3000d7bc: e3540004 cmp r4, #4 3000d7c0: 0a000024 beq 3000d858 node->info.sym_link.name = info->sym_link.name; } else if ( type == IMFS_DEVICE ) { 3000d7c4: e3540002 cmp r4, #2 3000d7c8: 0a00001e beq 3000d848 node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; } else if ( type == IMFS_LINEAR_FILE ) { 3000d7cc: e3540006 cmp r4, #6 3000d7d0: 0a000023 beq 3000d864 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; } else if ( type == IMFS_MEMORY_FILE ) { 3000d7d4: e3540005 cmp r4, #5 3000d7d8: 0a000028 beq 3000d880 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 ) { 3000d7dc: e3540007 cmp r4, #7 <== NOT EXECUTED node->info.fifo.pipe = NULL; 3000d7e0: 03a03000 moveq r3, #0 <== NOT EXECUTED 3000d7e4: 05883050 streq r3, [r8, #80] ; 0x50 <== NOT EXECUTED 3000d7e8: ea000005 b 3000d804 <== 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 ); 3000d7ec: e2882054 add r2, r8, #84 ; 0x54 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 3000d7f0: e2883050 add r3, r8, #80 ; 0x50 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 3000d7f4: e5882050 str r2, [r8, #80] ; 0x50 head->previous = NULL; 3000d7f8: e3a02000 mov r2, #0 3000d7fc: e5882054 str r2, [r8, #84] ; 0x54 tail->previous = head; 3000d800: 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; 3000d804: e5953004 ldr r3, [r5, #4] 3000d808: e2860050 add r0, r6, #80 ; 0x50 3000d80c: e2833001 add r3, r3, #1 } /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 3000d810: e5886008 str r6, [r8, #8] 3000d814: e1a01008 mov r1, r8 node->st_ino = ++fs_info->ino_count; 3000d818: e5853004 str r3, [r5, #4] 3000d81c: e5883038 str r3, [r8, #56] ; 0x38 3000d820: ebfff32b bl 3000a4d4 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 3000d824: e1a00008 mov r0, r8 3000d828: 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 && 3000d82c: e5950010 ldr r0, [r5, #16] 3000d830: e59f1070 ldr r1, [pc, #112] ; 3000d8a8 3000d834: e1500001 cmp r0, r1 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 3000d838: 03a08000 moveq r8, #0 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 3000d83c: 1affffd1 bne 3000d788 node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 3000d840: e1a00008 mov r0, r8 3000d844: 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; 3000d848: e897000c ldm r7, {r2, r3} 3000d84c: e5882050 str r2, [r8, #80] ; 0x50 node->info.device.minor = info->device.minor; 3000d850: e5883054 str r3, [r8, #84] ; 0x54 3000d854: eaffffea b 3000d804 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; 3000d858: e5973000 ldr r3, [r7] 3000d85c: e5883050 str r3, [r8, #80] ; 0x50 3000d860: eaffffe7 b 3000d804 } 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; 3000d864: e3a03000 mov r3, #0 3000d868: e3a04000 mov r4, #0 3000d86c: e5883050 str r3, [r8, #80] ; 0x50 3000d870: e5884054 str r4, [r8, #84] ; 0x54 node->info.linearfile.direct = 0; 3000d874: e3a03000 mov r3, #0 3000d878: e5883058 str r3, [r8, #88] ; 0x58 3000d87c: eaffffe0 b 3000d804 } else if ( type == IMFS_MEMORY_FILE ) { node->info.file.size = 0; node->info.file.indirect = 0; 3000d880: 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; 3000d884: e3a01000 mov r1, #0 3000d888: e3a02000 mov r2, #0 3000d88c: e5881050 str r1, [r8, #80] ; 0x50 3000d890: e5882054 str r2, [r8, #84] ; 0x54 node->info.file.indirect = 0; 3000d894: e5883058 str r3, [r8, #88] ; 0x58 node->info.file.doubly_indirect = 0; 3000d898: e588305c str r3, [r8, #92] ; 0x5c node->info.file.triply_indirect = 0; 3000d89c: e5883060 str r3, [r8, #96] ; 0x60 3000d8a0: eaffffd7 b 3000d804 =============================================================================== 3000da0c : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000da0c: 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 ) ) { 3000da10: e3d25007 bics r5, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000da14: e24dd040 sub sp, sp, #64 ; 0x40 3000da18: e58d2000 str r2, [sp] 3000da1c: e1a0a000 mov sl, r0 3000da20: e1a04001 mov r4, r1 3000da24: 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 ) ) { 3000da28: 1a000081 bne 3000dc34 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000da2c: e5936000 ldr r6, [r3] 3000da30: e28d8004 add r8, sp, #4 3000da34: 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 ); 3000da38: e1a02008 mov r2, r8 3000da3c: e1a03009 mov r3, r9 3000da40: e08a0005 add r0, sl, r5 3000da44: e1a01004 mov r1, r4 3000da48: eb0001df bl 3000e1cc pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000da4c: 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 ); 3000da50: e1a0b000 mov fp, r0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000da54: 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; 3000da58: e59d203c ldr r2, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 3000da5c: 0a00004e beq 3000db9c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000da60: 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; 3000da64: e0624004 rsb r4, r2, r4 i += len; 3000da68: 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 ) 3000da6c: 1a00000f bne 3000dab0 * 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 ) { 3000da70: e593204c ldr r2, [r3, #76] ; 0x4c 3000da74: e3520001 cmp r2, #1 3000da78: 0a000068 beq 3000dc20 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000da7c: e1a00007 mov r0, r7 3000da80: ebffff99 bl 3000d8ec /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000da84: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000da88: e1a06000 mov r6, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000da8c: e1a00007 mov r0, r7 3000da90: ebffffba bl 3000d980 3000da94: e3500000 cmp r0, #0 3000da98: 1a000036 bne 3000db78 rtems_set_errno_and_return_minus_one( EACCES ); 3000da9c: eb000da1 bl 30011128 <__errno> <== NOT EXECUTED 3000daa0: e3a0300d mov r3, #13 <== NOT EXECUTED 3000daa4: e5803000 str r3, [r0] <== NOT EXECUTED 3000daa8: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000daac: ea000031 b 3000db78 <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 3000dab0: e596104c ldr r1, [r6, #76] ; 0x4c 3000dab4: e3510001 cmp r1, #1 3000dab8: 0a000031 beq 3000db84 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 3000dabc: 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; 3000dac0: e1a06003 mov r6, r3 switch( type ) { 3000dac4: 0a000006 beq 3000dae4 3000dac8: e35b0004 cmp fp, #4 3000dacc: 0a000025 beq 3000db68 3000dad0: e35b0002 cmp fp, #2 3000dad4: 0a000013 beq 3000db28 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 3000dad8: e35b0004 cmp fp, #4 3000dadc: 1affffd5 bne 3000da38 3000dae0: eaffffe2 b 3000da70 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 3000dae4: e593304c ldr r3, [r3, #76] ; 0x4c 3000dae8: e3530003 cmp r3, #3 3000daec: 0a00002f beq 3000dbb0 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 3000daf0: e3530004 cmp r3, #4 3000daf4: 0a000058 beq 3000dc5c } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000daf8: e3530001 cmp r3, #1 3000dafc: 1a000051 bne 3000dc48 /* * 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 ) { 3000db00: e596e05c ldr lr, [r6, #92] ; 0x5c 3000db04: e35e0000 cmp lr, #0 3000db08: 1a000047 bne 3000dc2c } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000db0c: e1a00006 mov r0, r6 3000db10: e1a01008 mov r1, r8 3000db14: eb00018b bl 3000e148 if ( !node ) 3000db18: e2506000 subs r6, r0, #0 3000db1c: 0a00001e beq 3000db9c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 3000db20: e5876000 str r6, [r7] 3000db24: eaffffc3 b 3000da38 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 3000db28: e59f1154 ldr r1, [pc, #340] ; 3000dc84 3000db2c: e5912000 ldr r2, [r1] 3000db30: e5922018 ldr r2, [r2, #24] 3000db34: e1520003 cmp r2, r3 3000db38: 0affffbe beq 3000da38 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 3000db3c: e597e010 ldr lr, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 3000db40: e59e201c ldr r2, [lr, #28] 3000db44: e1520003 cmp r2, r3 3000db48: 0a00001e beq 3000dbc8 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 3000db4c: e5936008 ldr r6, [r3, #8] 3000db50: e3560000 cmp r6, #0 3000db54: 1afffff1 bne 3000db20 rtems_set_errno_and_return_minus_one( ENOENT ); 3000db58: eb000d72 bl 30011128 <__errno> <== NOT EXECUTED 3000db5c: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000db60: e580b000 str fp, [r0] <== NOT EXECUTED 3000db64: ea000003 b 3000db78 <== NOT EXECUTED case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000db68: eb000d6e bl 30011128 <__errno> <== NOT EXECUTED 3000db6c: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000db70: e5803000 str r3, [r0] <== NOT EXECUTED 3000db74: e3e06000 mvn r6, #0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 3000db78: e1a00006 mov r0, r6 3000db7c: e28dd040 add sp, sp, #64 ; 0x40 3000db80: 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 ) ) 3000db84: e1a00007 mov r0, r7 3000db88: ebffff7c bl 3000d980 3000db8c: e3500000 cmp r0, #0 3000db90: 0affffc1 beq 3000da9c 3000db94: e5973000 ldr r3, [r7] 3000db98: eaffffc7 b 3000dabc /* * 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 ); 3000db9c: eb000d61 bl 30011128 <__errno> 3000dba0: e3a03002 mov r3, #2 3000dba4: e5803000 str r3, [r0] 3000dba8: e3e06000 mvn r6, #0 3000dbac: eafffff1 b 3000db78 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 3000dbb0: e1a00007 mov r0, r7 <== NOT EXECUTED 3000dbb4: e3a01000 mov r1, #0 <== NOT EXECUTED 3000dbb8: ebffff80 bl 3000d9c0 <== NOT EXECUTED node = pathloc->node_access; 3000dbbc: e5976000 ldr r6, [r7] <== NOT EXECUTED 3000dbc0: e596304c ldr r3, [r6, #76] ; 0x4c <== NOT EXECUTED 3000dbc4: eaffffcb b 3000daf8 <== 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; 3000dbc8: 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; 3000dbcc: e28d6028 add r6, sp, #40 ; 0x28 3000dbd0: e8be000f ldm lr!, {r0, r1, r2, r3} 3000dbd4: e8a6000f stmia r6!, {r0, r1, r2, r3} *pathloc = newloc; 3000dbd8: e28dc028 add ip, sp, #40 ; 0x28 3000dbdc: 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; 3000dbe0: e59ec000 ldr ip, [lr] *pathloc = newloc; 3000dbe4: e1a0e007 mov lr, r7 3000dbe8: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000dbec: 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; 3000dbf0: e58ec000 str ip, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000dbf4: 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; 3000dbf8: e586c000 str ip, [r6] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000dbfc: e08a0000 add r0, sl, r0 3000dc00: e597c00c ldr ip, [r7, #12] 3000dc04: e0841001 add r1, r4, r1 3000dc08: e59d2000 ldr r2, [sp] 3000dc0c: e1a03007 mov r3, r7 3000dc10: e1a0e00f mov lr, pc 3000dc14: e59cf000 ldr pc, [ip] 3000dc18: e1a06000 mov r6, r0 3000dc1c: eaffffd5 b 3000db78 * * 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 ) { 3000dc20: e593e05c ldr lr, [r3, #92] ; 0x5c 3000dc24: e35e0000 cmp lr, #0 3000dc28: 0affff93 beq 3000da7c newloc = node->info.directory.mt_fs->mt_fs_root; 3000dc2c: e28ee01c add lr, lr, #28 3000dc30: eaffffe5 b 3000dbcc 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 ); 3000dc34: eb000d3b bl 30011128 <__errno> <== NOT EXECUTED 3000dc38: e3a03005 mov r3, #5 <== NOT EXECUTED 3000dc3c: e5803000 str r3, [r0] <== NOT EXECUTED 3000dc40: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000dc44: eaffffcb b 3000db78 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000dc48: eb000d36 bl 30011128 <__errno> <== NOT EXECUTED 3000dc4c: e3a03014 mov r3, #20 <== NOT EXECUTED 3000dc50: e5803000 str r3, [r0] <== NOT EXECUTED 3000dc54: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000dc58: eaffffc6 b 3000db78 <== NOT EXECUTED * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 3000dc5c: e1a00007 mov r0, r7 <== NOT EXECUTED 3000dc60: e3a01000 mov r1, #0 <== NOT EXECUTED 3000dc64: eb000007 bl 3000dc88 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 3000dc68: 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 ); 3000dc6c: 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; 3000dc70: e5973000 ldr r3, [r7] <== NOT EXECUTED if ( result == -1 ) 3000dc74: 0affffbf beq 3000db78 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 3000dc78: e1a06003 mov r6, r3 <== NOT EXECUTED 3000dc7c: e593304c ldr r3, [r3, #76] ; 0x4c <== NOT EXECUTED 3000dc80: eaffff9c b 3000daf8 <== NOT EXECUTED =============================================================================== 3000ddf0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 3000ddf0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000ddf4: e24dd040 sub sp, sp, #64 ; 0x40 3000ddf8: e1a06001 mov r6, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000ddfc: 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 */ ) { 3000de00: e1a0a000 mov sl, r0 3000de04: e58d2000 str r2, [sp] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 3000de08: eb0010b0 bl 300120d0 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 3000de0c: e3a07000 mov r7, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 3000de10: e1a04000 mov r4, r0 3000de14: 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 ); 3000de18: e1a01004 mov r1, r4 3000de1c: e28d303c add r3, sp, #60 ; 0x3c 3000de20: e08a0007 add r0, sl, r7 3000de24: e1a02008 mov r2, r8 3000de28: eb0000e7 bl 3000e1cc pathlen -= len; i += len; if ( !pathloc->node_access ) 3000de2c: e5963000 ldr r3, [r6] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 3000de30: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 3000de34: 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 ); 3000de38: e1a09000 mov r9, r0 pathlen -= len; 3000de3c: e06b4004 rsb r4, fp, r4 i += len; if ( !pathloc->node_access ) 3000de40: 0a000035 beq 3000df1c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000de44: e3500000 cmp r0, #0 3000de48: 1a000006 bne 3000de68 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 3000de4c: eb000cb5 bl 30011128 <__errno> 3000de50: e3a03011 mov r3, #17 3000de54: e5803000 str r3, [r0] 3000de58: e3e05000 mvn r5, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 3000de5c: e1a00005 mov r0, r5 3000de60: e28dd040 add sp, sp, #64 ; 0x40 3000de64: 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 ) 3000de68: e595104c ldr r1, [r5, #76] ; 0x4c 3000de6c: e3510001 cmp r1, #1 3000de70: 0a000044 beq 3000df88 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 3000de74: 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; 3000de78: e1a05003 mov r5, r3 switch( type ) { 3000de7c: e3590004 cmp r9, #4 3000de80: 979ff109 ldrls pc, [pc, r9, lsl #2] 3000de84: eaffffe3 b 3000de18 <== NOT EXECUTED 3000de88: 3000de4c .word 0x3000de4c <== NOT EXECUTED 3000de8c: 3000de18 .word 0x3000de18 <== NOT EXECUTED 3000de90: 3000deec .word 0x3000deec <== NOT EXECUTED 3000de94: 3000de9c .word 0x3000de9c <== NOT EXECUTED 3000de98: 3000df30 .word 0x3000df30 <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 3000de9c: e593304c ldr r3, [r3, #76] ; 0x4c 3000dea0: e3530003 cmp r3, #3 3000dea4: 0a00006a beq 3000e054 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 3000dea8: e3530004 cmp r3, #4 3000deac: 0a000068 beq 3000e054 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 3000deb0: e3550000 cmp r5, #0 3000deb4: 0a00005f beq 3000e038 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000deb8: e595304c ldr r3, [r5, #76] ; 0x4c 3000debc: e3530001 cmp r3, #1 3000dec0: 1a00005c bne 3000e038 /* * 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 ) { 3000dec4: e595c05c ldr ip, [r5, #92] ; 0x5c 3000dec8: e35c0000 cmp ip, #0 3000decc: 1a00005e bne 3000e04c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000ded0: e1a00005 mov r0, r5 3000ded4: e1a01008 mov r1, r8 3000ded8: eb00009a bl 3000e148 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 3000dedc: e2505000 subs r5, r0, #0 3000dee0: 0a000017 beq 3000df44 done = true; else pathloc->node_access = node; 3000dee4: e5865000 str r5, [r6] 3000dee8: eaffffca b 3000de18 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 3000deec: e59f1180 ldr r1, [pc, #384] ; 3000e074 3000def0: e5912000 ldr r2, [r1] 3000def4: e5922018 ldr r2, [r2, #24] 3000def8: e1530002 cmp r3, r2 3000defc: 0affffc5 beq 3000de18 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 3000df00: e596c010 ldr ip, [r6, #16] 3000df04: e59c201c ldr r2, [ip, #28] 3000df08: e1530002 cmp r3, r2 3000df0c: 0a000023 beq 3000dfa0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 3000df10: e5935008 ldr r5, [r3, #8] 3000df14: e3550000 cmp r5, #0 3000df18: 1afffff1 bne 3000dee4 * 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 ); 3000df1c: eb000c81 bl 30011128 <__errno> <== NOT EXECUTED 3000df20: e3a03002 mov r3, #2 <== NOT EXECUTED 3000df24: e5803000 str r3, [r0] <== NOT EXECUTED 3000df28: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000df2c: eaffffca b 3000de5c <== 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 ); 3000df30: eb000c7c bl 30011128 <__errno> <== NOT EXECUTED 3000df34: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000df38: e5803000 str r3, [r0] <== NOT EXECUTED 3000df3c: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000df40: eaffffc5 b 3000de5c <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 3000df44: e59d303c ldr r3, [sp, #60] ; 0x3c 3000df48: e59d1000 ldr r1, [sp] 3000df4c: e0633007 rsb r3, r3, r7 3000df50: e08a3003 add r3, sl, r3 3000df54: 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++) { 3000df58: e7da0007 ldrb r0, [sl, r7] 3000df5c: e08a4007 add r4, sl, r7 3000df60: e3500000 cmp r0, #0 3000df64: 1a000003 bne 3000df78 3000df68: ea000021 b 3000dff4 3000df6c: e5f40001 ldrb r0, [r4, #1]! <== NOT EXECUTED 3000df70: e3500000 cmp r0, #0 <== NOT EXECUTED 3000df74: 0a00001e beq 3000dff4 <== NOT EXECUTED if ( !IMFS_is_separator( path[ i ] ) ) 3000df78: ebffe507 bl 3000739c <== NOT EXECUTED 3000df7c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000df80: 1afffff9 bne 3000df6c <== NOT EXECUTED 3000df84: eaffffe4 b 3000df1c <== 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 ) ) 3000df88: e1a00006 mov r0, r6 3000df8c: ebfffe7b bl 3000d980 3000df90: e3500000 cmp r0, #0 3000df94: 0a000022 beq 3000e024 3000df98: e5963000 ldr r3, [r6] 3000df9c: eaffffb4 b 3000de74 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 3000dfa0: 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; 3000dfa4: e28d4028 add r4, sp, #40 ; 0x28 3000dfa8: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000dfac: e8a4000f stmia r4!, {r0, r1, r2, r3} *pathloc = newloc; 3000dfb0: e28de028 add lr, sp, #40 ; 0x28 3000dfb4: e8be000f ldm lr!, {r0, r1, r2, r3} 3000dfb8: 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; 3000dfbc: e59cc000 ldr ip, [ip] *pathloc = newloc; 3000dfc0: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000dfc4: 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; 3000dfc8: e58ec000 str ip, [lr] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000dfcc: 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; 3000dfd0: e584c000 str ip, [r4] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000dfd4: e596300c ldr r3, [r6, #12] 3000dfd8: e08a0000 add r0, sl, r0 3000dfdc: e1a01006 mov r1, r6 3000dfe0: e59d2000 ldr r2, [sp] 3000dfe4: e1a0e00f mov lr, pc 3000dfe8: e593f004 ldr pc, [r3, #4] 3000dfec: e1a05000 mov r5, r0 3000dff0: eaffff99 b 3000de5c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000dff4: e1a00006 mov r0, r6 3000dff8: ebfffe3b bl 3000d8ec /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000dffc: e5963000 ldr r3, [r6] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000e000: e1a05000 mov r5, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000e004: e593304c ldr r3, [r3, #76] ; 0x4c 3000e008: e3530001 cmp r3, #1 3000e00c: 1a000009 bne 3000e038 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 3000e010: e1a00006 mov r0, r6 3000e014: e3a01003 mov r1, #3 3000e018: ebfffe58 bl 3000d980 3000e01c: e3500000 cmp r0, #0 3000e020: 1affff8d bne 3000de5c rtems_set_errno_and_return_minus_one( EACCES ); 3000e024: eb000c3f bl 30011128 <__errno> 3000e028: e3a0300d mov r3, #13 3000e02c: e5803000 str r3, [r0] 3000e030: e3e05000 mvn r5, #0 3000e034: eaffff88 b 3000de5c /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000e038: eb000c3a bl 30011128 <__errno> <== NOT EXECUTED 3000e03c: e3a03014 mov r3, #20 <== NOT EXECUTED 3000e040: e5803000 str r3, [r0] <== NOT EXECUTED 3000e044: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000e048: eaffff83 b 3000de5c <== 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; 3000e04c: e28cc01c add ip, ip, #28 3000e050: eaffffd3 b 3000dfa4 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 3000e054: e1a00006 mov r0, r6 <== NOT EXECUTED 3000e058: e3a01000 mov r1, #0 <== NOT EXECUTED 3000e05c: ebffff2e bl 3000dd1c <== NOT EXECUTED if ( result == -1 ) 3000e060: e3700001 cmn r0, #1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 3000e064: e1a05000 mov r5, r0 <== NOT EXECUTED if ( result == -1 ) 3000e068: 0affff7b beq 3000de5c <== NOT EXECUTED 3000e06c: e5965000 ldr r5, [r6] <== NOT EXECUTED 3000e070: eaffff8e b 3000deb0 <== NOT EXECUTED =============================================================================== 3000d9c0 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d9c0: 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; 3000d9c4: e5903000 ldr r3, [r0] <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d9c8: 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; 3000d9cc: e5933050 ldr r3, [r3, #80] ; 0x50 <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d9d0: 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; 3000d9d4: e5803000 str r3, [r0] <== NOT EXECUTED IMFS_Set_handlers( node ); 3000d9d8: ebffffc3 bl 3000d8ec <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000d9dc: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d9e0: e1a01005 mov r1, r5 <== NOT EXECUTED 3000d9e4: ebffffe5 bl 3000d980 <== NOT EXECUTED 3000d9e8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000d9ec: 0a000001 beq 3000d9f8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); return result; 3000d9f0: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000d9f4: 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 ); 3000d9f8: eb000dca bl 30011128 <__errno> <== NOT EXECUTED 3000d9fc: e3a0300d mov r3, #13 <== NOT EXECUTED 3000da00: e5803000 str r3, [r0] <== NOT EXECUTED 3000da04: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000da08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000dd1c : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000dd1c: 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 ); 3000dd20: e59f60c4 ldr r6, [pc, #196] ; 3000ddec */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000dd24: 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 ); 3000dd28: e5963000 ldr r3, [r6] */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000dd2c: e1a07001 mov r7, r1 3000dd30: ea000004 b 3000dd48 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 3000dd34: e3520004 cmp r2, #4 3000dd38: 0a00001b beq 3000ddac result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 3000dd3c: e2422003 sub r2, r2, #3 3000dd40: e3520001 cmp r2, #1 3000dd44: 8a000014 bhi 3000dd9c /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000dd48: e1d323b0 ldrh r2, [r3, #48] ; 0x30 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 3000dd4c: e5954000 ldr r4, [r5] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000dd50: e2822001 add r2, r2, #1 3000dd54: e1a02802 lsl r2, r2, #16 3000dd58: e1a02822 lsr r2, r2, #16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000dd5c: e3520005 cmp r2, #5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000dd60: e1c323b0 strh r2, [r3, #48] ; 0x30 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000dd64: 8a000019 bhi 3000ddd0 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 3000dd68: e594204c ldr r2, [r4, #76] ; 0x4c 3000dd6c: e3520003 cmp r2, #3 3000dd70: 1affffef bne 3000dd34 result = IMFS_evaluate_hard_link( node, flags ); 3000dd74: e1a00005 mov r0, r5 <== NOT EXECUTED 3000dd78: e1a01007 mov r1, r7 <== NOT EXECUTED 3000dd7c: ebffff0f bl 3000d9c0 <== 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 ) ) ); 3000dd80: e3500000 cmp r0, #0 <== NOT EXECUTED 3000dd84: 1a00000d bne 3000ddc0 <== NOT EXECUTED 3000dd88: e594204c ldr r2, [r4, #76] ; 0x4c 3000dd8c: 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 ) || 3000dd90: e2422003 sub r2, r2, #3 3000dd94: e3520001 cmp r2, #1 3000dd98: 9affffea bls 3000dd48 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000dd9c: 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 ) || 3000dda0: e3a00000 mov r0, #0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000dda4: e1c323b0 strh r2, [r3, #48] ; 0x30 return result; } 3000dda8: 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 ); 3000ddac: e1a00005 mov r0, r5 3000ddb0: e1a01007 mov r1, r7 3000ddb4: ebffffb3 bl 3000dc88 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 3000ddb8: e3500000 cmp r0, #0 3000ddbc: 0afffff1 beq 3000dd88 3000ddc0: e5963000 ldr r3, [r6] <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000ddc4: e3a02000 mov r2, #0 <== NOT EXECUTED 3000ddc8: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED return result; } 3000ddcc: 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; 3000ddd0: e3a02000 mov r2, #0 <== NOT EXECUTED 3000ddd4: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); 3000ddd8: eb000cd2 bl 30011128 <__errno> <== NOT EXECUTED 3000dddc: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED 3000dde0: e5803000 str r3, [r0] <== NOT EXECUTED 3000dde4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000dde8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 3000d980 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000d980: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 3000d984: e52de004 push {lr} ; (str lr, [sp, #-4]!) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000d988: 1a000007 bne 3000d9ac /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 3000d98c: e5903000 ldr r3, [r0] */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 3000d990: e1a01301 lsl r1, r1, #6 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 3000d994: e5930030 ldr r0, [r3, #48] ; 0x30 3000d998: e0010000 and r0, r1, 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 ); 3000d99c: e1510000 cmp r1, r0 3000d9a0: 13a00000 movne r0, #0 3000d9a4: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 3000d9a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 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 ); 3000d9ac: eb000ddd bl 30011128 <__errno> <== NOT EXECUTED 3000d9b0: e3a03001 mov r3, #1 <== NOT EXECUTED 3000d9b4: e5803000 str r3, [r0] <== NOT EXECUTED 3000d9b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d9bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3000dc88 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000dc88: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 3000dc8c: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000dc90: 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; 3000dc94: e5963008 ldr r3, [r6, #8] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000dc98: 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; 3000dc9c: e5803000 str r3, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000dca0: 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( 3000dca4: e5960050 ldr r0, [r6, #80] ; 0x50 3000dca8: e1a0100d mov r1, sp 3000dcac: e1a02004 mov r2, r4 3000dcb0: eb0003ab bl 3000eb64 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 3000dcb4: e59d3000 ldr r3, [sp] 3000dcb8: e5966050 ldr r6, [r6, #80] ; 0x50 3000dcbc: e0866003 add r6, r6, r3 3000dcc0: e1a00006 mov r0, r6 3000dcc4: eb001101 bl 300120d0 3000dcc8: e1a02005 mov r2, r5 3000dccc: e1a01000 mov r1, r0 3000dcd0: e1a03004 mov r3, r4 3000dcd4: e1a00006 mov r0, r6 3000dcd8: ebffff4b bl 3000da0c 3000dcdc: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 3000dce0: e1a00004 mov r0, r4 3000dce4: ebffff00 bl 3000d8ec /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000dce8: e1a00004 mov r0, r4 3000dcec: e1a01005 mov r1, r5 3000dcf0: ebffff22 bl 3000d980 3000dcf4: e3500000 cmp r0, #0 3000dcf8: 0a000002 beq 3000dd08 rtems_set_errno_and_return_minus_one( EACCES ); return result; } 3000dcfc: e1a00006 mov r0, r6 3000dd00: e28dd004 add sp, sp, #4 3000dd04: 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 ); 3000dd08: eb000d06 bl 30011128 <__errno> <== NOT EXECUTED 3000dd0c: e3a0300d mov r3, #13 <== NOT EXECUTED 3000dd10: e5803000 str r3, [r0] <== NOT EXECUTED 3000dd14: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000dd18: eafffff7 b 3000dcfc <== NOT EXECUTED =============================================================================== 30010b78 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 30010b78: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 30010b7c: e5904000 ldr r4, [r0] <== 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); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 30010b80: e1a01a01 lsl r1, r1, #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); 30010b84: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 30010b88: e24dd008 sub sp, sp, #8 <== 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); 30010b8c: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 30010b90: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 30010b94: e1831a21 orr r1, r3, r1, lsr #20 <== NOT EXECUTED 30010b98: e5841030 str r1, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); 30010b9c: e1a0000d mov r0, sp <== NOT EXECUTED 30010ba0: e3a01000 mov r1, #0 <== NOT EXECUTED 30010ba4: ebffd664 bl 3000653c <== NOT EXECUTED 30010ba8: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 30010bac: e3a00000 mov r0, #0 <== 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 ); 30010bb0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 30010bb4: e28dd008 add sp, sp, #8 <== NOT EXECUTED 30010bb8: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 30010bbc : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } 30010bbc: e3a00000 mov r0, #0 <== NOT EXECUTED 30010bc0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30007180 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 30007180: e92d4030 push {r4, r5, lr} <== NOT EXECUTED int err = 0; IMFS_jnode_t *jnode = iop->pathinfo.node_access; 30007184: e5905018 ldr r5, [r0, #24] <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 30007188: e1a04000 mov r4, r0 <== NOT EXECUTED int err = 0; IMFS_jnode_t *jnode = iop->pathinfo.node_access; pipe_release(&JNODE2PIPE(jnode), iop); 3000718c: e1a01000 mov r1, r0 <== NOT EXECUTED 30007190: e2850050 add r0, r5, #80 ; 0x50 <== NOT EXECUTED 30007194: eb002500 bl 3001059c <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 30007198: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED IMFS_check_node_remove(jnode); 3000719c: 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; 300071a0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 300071a4: e5843014 str r3, [r4, #20] <== NOT EXECUTED IMFS_check_node_remove(jnode); 300071a8: eb00018b bl 300077dc <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 300071ac: e3a00000 mov r0, #0 <== NOT EXECUTED 300071b0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 30007044 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 30007044: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 30007048: e59f0070 ldr r0, [pc, #112] ; 300070c0 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 3000704c: e92d4010 push {r4, lr} <== NOT EXECUTED int err; if (command == FIONBIO) { 30007050: e1510000 cmp r1, r0 <== NOT EXECUTED 30007054: 0a000007 beq 30007078 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 30007058: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED 3000705c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 30007060: eb002781 bl 30010e6c <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30007064: e2502000 subs r2, r0, #0 <== NOT EXECUTED 30007068: b2624000 rsblt r4, r2, #0 <== NOT EXECUTED 3000706c: ba00000f blt 300070b0 <== NOT EXECUTED } 30007070: e1a00002 mov r0, r2 <== NOT EXECUTED 30007074: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 30007078: e3520000 cmp r2, #0 <== NOT EXECUTED 3000707c: 0a00000a beq 300070ac <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 30007080: e5922000 ldr r2, [r2] <== NOT EXECUTED 30007084: e3520000 cmp r2, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 30007088: 15931014 ldrne r1, [r3, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 3000708c: 05931014 ldreq r1, [r3, #20] <== NOT EXECUTED return 0; 30007090: 13a02000 movne r2, #0 <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 30007094: 13811001 orrne r1, r1, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 30007098: 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; 3000709c: 15831014 strne r1, [r3, #20] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300070a0: 05831014 streq r1, [r3, #20] <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 300070a4: e1a00002 mov r0, r2 <== NOT EXECUTED 300070a8: e8bd8010 pop {r4, pc} <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 300070ac: e3a0400e mov r4, #14 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 300070b0: eb002fcb bl 30012fe4 <__errno> <== NOT EXECUTED 300070b4: e3e02000 mvn r2, #0 <== NOT EXECUTED 300070b8: e5804000 str r4, [r0] <== NOT EXECUTED 300070bc: eaffffeb b 30007070 <== NOT EXECUTED =============================================================================== 30006fe4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 30006fe4: e92d4010 push {r4, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30006fe8: e590c018 ldr ip, [r0, #24] <== NOT EXECUTED rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 30006fec: e24dd004 sub sp, sp, #4 <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30006ff0: e59cc050 ldr ip, [ip, #80] ; 0x50 <== NOT EXECUTED 30006ff4: e58d0000 str r0, [sp] <== NOT EXECUTED 30006ff8: e1a0000c mov r0, ip <== NOT EXECUTED 30006ffc: eb0027b3 bl 30010ed0 <== NOT EXECUTED 30007000: e1a02000 mov r2, r0 <== NOT EXECUTED 30007004: e1a03fc2 asr r3, r2, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30007008: 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); 3000700c: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30007010: a1a04003 movge r4, r3 <== NOT EXECUTED 30007014: a1a03002 movge r3, r2 <== NOT EXECUTED 30007018: ba000003 blt 3000702c <== NOT EXECUTED } 3000701c: e1a00003 mov r0, r3 <== NOT EXECUTED 30007020: e1a01004 mov r1, r4 <== NOT EXECUTED 30007024: e28dd004 add sp, sp, #4 <== NOT EXECUTED 30007028: 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); 3000702c: eb002fec bl 30012fe4 <__errno> <== NOT EXECUTED 30007030: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30007034: e5804000 str r4, [r0] <== NOT EXECUTED 30007038: e3e03000 mvn r3, #0 <== NOT EXECUTED 3000703c: e3e04000 mvn r4, #0 <== NOT EXECUTED 30007040: eafffff5 b 3000701c <== NOT EXECUTED =============================================================================== 300071b4 : uint32_t mode ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 300071b4: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 300071b8: e92d4010 push {r4, lr} <== NOT EXECUTED 300071bc: e1a01000 mov r1, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 300071c0: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED 300071c4: eb00252a bl 30010674 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 300071c8: e2504000 subs r4, r0, #0 <== NOT EXECUTED 300071cc: ba000001 blt 300071d8 <== NOT EXECUTED } 300071d0: e1a00004 mov r0, r4 <== NOT EXECUTED 300071d4: 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); 300071d8: eb002f81 bl 30012fe4 <__errno> <== NOT EXECUTED 300071dc: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 300071e0: e5804000 str r4, [r0] <== NOT EXECUTED 300071e4: e3e04000 mvn r4, #0 <== NOT EXECUTED 300071e8: eafffff8 b 300071d0 <== NOT EXECUTED =============================================================================== 30007124 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 30007124: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; 30007128: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 3000712c: e1a03000 mov r3, r0 <== NOT EXECUTED 30007130: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 30007134: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 30007138: eb00265e bl 30010ab8 <== NOT EXECUTED if (err > 0) 3000713c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 30007140: da000007 ble 30007164 <== NOT EXECUTED IMFS_update_atime(jnode); 30007144: e1a0000d mov r0, sp <== NOT EXECUTED 30007148: e3a01000 mov r1, #0 <== NOT EXECUTED 3000714c: eb0003fa bl 3000813c <== NOT EXECUTED 30007150: e59d3000 ldr r3, [sp] <== NOT EXECUTED 30007154: e1a00005 mov r0, r5 <== NOT EXECUTED 30007158: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 3000715c: e28dd008 add sp, sp, #8 <== NOT EXECUTED 30007160: 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); 30007164: 01a00005 moveq r0, r5 <== NOT EXECUTED 30007168: 0afffffb beq 3000715c <== NOT EXECUTED 3000716c: eb002f9c bl 30012fe4 <__errno> <== NOT EXECUTED 30007170: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 30007174: e5805000 str r5, [r0] <== NOT EXECUTED 30007178: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000717c: eafffff6 b 3000715c <== NOT EXECUTED =============================================================================== 300070c4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 300070c4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; 300070c8: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 300070cc: e1a03000 mov r3, r0 <== NOT EXECUTED 300070d0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 300070d4: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 300070d8: eb0026e3 bl 30010c6c <== NOT EXECUTED if (err > 0) { 300070dc: e2505000 subs r5, r0, #0 <== NOT EXECUTED 300070e0: da000008 ble 30007108 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 300070e4: e1a0000d mov r0, sp <== NOT EXECUTED 300070e8: e3a01000 mov r1, #0 <== NOT EXECUTED 300070ec: eb000412 bl 3000813c <== NOT EXECUTED 300070f0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300070f4: e1a00005 mov r0, r5 <== NOT EXECUTED 300070f8: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 300070fc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 30007100: e28dd008 add sp, sp, #8 <== NOT EXECUTED 30007104: 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); 30007108: 01a00005 moveq r0, r5 <== NOT EXECUTED 3000710c: 0afffffb beq 30007100 <== NOT EXECUTED 30007110: eb002fb3 bl 30012fe4 <__errno> <== NOT EXECUTED 30007114: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 30007118: e5805000 str r5, [r0] <== NOT EXECUTED 3000711c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30007120: eafffff6 b 30007100 <== NOT EXECUTED =============================================================================== 3000e078 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000e078: 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; 3000e07c: 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 ) { 3000e080: 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; 3000e084: e5bc401c ldr r4, [ip, #28]! loc = temp_mt_entry->mt_fs_root; 3000e088: 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 ) { 3000e08c: 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; 3000e090: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000e094: e8a6000f stmia r6!, {r0, r1, r2, r3} 3000e098: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000e09c: 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; 3000e0a0: e1a0500d mov r5, sp 3000e0a4: e5862000 str r2, [r6] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000e0a8: e58e301c str r3, [lr, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3000e0ac: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3000e0b0: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 3000e0b4: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 3000e0b8: ebfffe0b bl 3000d8ec if ( jnode->type != IMFS_DIRECTORY ) { 3000e0bc: 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 ); 3000e0c0: e2842054 add r2, r4, #84 ; 0x54 3000e0c4: e3530001 cmp r3, #1 3000e0c8: 1a000010 bne 3000e110 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3000e0cc: e5943050 ldr r3, [r4, #80] ; 0x50 3000e0d0: e1530002 cmp r3, r2 3000e0d4: 0a000014 beq 3000e12c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 3000e0d8: e3540000 cmp r4, #0 3000e0dc: 0a000008 beq 3000e104 if ( jnode->type == IMFS_DIRECTORY ) { 3000e0e0: e594304c ldr r3, [r4, #76] ; 0x4c 3000e0e4: e3530001 cmp r3, #1 3000e0e8: 1affffef bne 3000e0ac } } } while (jnode != NULL); return 0; } 3000e0ec: e5943050 ldr r3, [r4, #80] ; 0x50 3000e0f0: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 3000e0f4: e1530002 cmp r3, r2 3000e0f8: 0affffeb beq 3000e0ac jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3000e0fc: e2534000 subs r4, r3, #0 3000e100: 1affffe9 bne 3000e0ac return 0; 3000e104: e1a00004 mov r0, r4 } 3000e108: e28dd014 add sp, sp, #20 3000e10c: 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 ); 3000e110: e1a0100d mov r1, sp 3000e114: e3a00000 mov r0, #0 3000e118: ebffdfa2 bl 30005fa8 if (result != 0) 3000e11c: e3500000 cmp r0, #0 3000e120: 1a000006 bne 3000e140 jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; 3000e124: e1a04006 mov r4, r6 3000e128: eaffffea b 3000e0d8 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 3000e12c: e3a00000 mov r0, #0 3000e130: e1a0100d mov r1, sp 3000e134: ebffdf9b bl 30005fa8 if (result != 0) 3000e138: e3500000 cmp r0, #0 3000e13c: 0afffff8 beq 3000e124 return -1; 3000e140: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000e144: eaffffef b 3000e108 <== NOT EXECUTED =============================================================================== 3000e1cc : const char *path, int pathlen, char *token, int *token_len ) { 3000e1cc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000e1d0: e1a05001 mov r5, r1 3000e1d4: e1a04002 mov r4, r2 3000e1d8: e1a0a003 mov sl, r3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 3000e1dc: e5d07000 ldrb r7, [r0] 3000e1e0: e1a08000 mov r8, r0 int pathlen, char *token, int *token_len ) { register int i = 0; 3000e1e4: 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) ) { 3000e1e8: ea000006 b 3000e208 3000e1ec: e1560005 cmp r6, r5 3000e1f0: aa000008 bge 3000e218 token[i] = c; if ( i == IMFS_NAME_MAX ) 3000e1f4: 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; 3000e1f8: e7c47006 strb r7, [r4, r6] if ( i == IMFS_NAME_MAX ) 3000e1fc: 0a00001b beq 3000e270 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 3000e200: e5f87001 ldrb r7, [r8, #1]! 3000e204: 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) ) { 3000e208: e1a00007 mov r0, r7 3000e20c: ebffe462 bl 3000739c 3000e210: e3500000 cmp r0, #0 3000e214: 0afffff4 beq 3000e1ec /* * Copy a seperator into token. */ if ( i == 0 ) { 3000e218: e3560000 cmp r6, #0 3000e21c: 1a000006 bne 3000e23c token[i] = c; if ( (token[i] != '\0') && pathlen ) { 3000e220: e3570000 cmp r7, #0 3000e224: 13550000 cmpne r5, #0 i++; type = IMFS_CURRENT_DIR; 3000e228: 13a06001 movne r6, #1 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 3000e22c: e5c47000 strb r7, [r4] if ( (token[i] != '\0') && pathlen ) { i++; 3000e230: e1a00006 mov r0, r6 /* * Set token_len to the number of characters copied. */ *token_len = i; 3000e234: e58a6000 str r6, [sl] 3000e238: 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') { 3000e23c: e0843006 add r3, r4, r6 3000e240: 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 ) 3000e244: e1a00004 mov r0, r4 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 3000e248: e3530000 cmp r3, #0 token[i] = '\0'; 3000e24c: 13a03000 movne r3, #0 3000e250: 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 ) 3000e254: e59f1038 ldr r1, [pc, #56] ; 3000e294 /* * Set token_len to the number of characters copied. */ *token_len = i; 3000e258: 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 ) 3000e25c: eb000ebf bl 30011d60 3000e260: e3500000 cmp r0, #0 3000e264: 1a000003 bne 3000e278 type = IMFS_UP_DIR; 3000e268: e3a00002 mov r0, #2 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 3000e26c: 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; 3000e270: e3a00004 mov r0, #4 <== NOT EXECUTED 3000e274: 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 ) 3000e278: e1a00004 mov r0, r4 3000e27c: e59f1014 ldr r1, [pc, #20] ; 3000e298 3000e280: eb000eb6 bl 30011d60 3000e284: e3500000 cmp r0, #0 3000e288: 03a00001 moveq r0, #1 3000e28c: 13a00003 movne r0, #3 3000e290: 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: eb001f2f bl 3000d8ac 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: eb002d2d bl 30011128 <__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: eb003105 bl 300120d0 <== 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: eb00213e bl 3000e1cc <== 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: eb001e9b bl 3000d75c <== 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: eb002cfe bl 30011128 <__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: eb002cf9 bl 30011128 <__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 =============================================================================== 30010158 : IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30010158: e59f3128 ldr r3, [pc, #296] ; 30010288 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3001015c: 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 ) 30010160: e593b000 ldr fp, [r3] */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30010164: 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 ) 30010168: e1a0312b lsr r3, fp, #2 3001016c: e0223393 mla r2, r3, r3, r3 30010170: e0233392 mla r3, r2, r3, r3 30010174: e3a02000 mov r2, #0 30010178: e2433001 sub r3, r3, #1 3001017c: e1520006 cmp r2, r6 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 30010180: e24dd004 sub sp, sp, #4 30010184: e1a04000 mov r4, r0 30010188: 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 ) 3001018c: e003039b mul r3, fp, r3 30010190: da000034 ble 30010268 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 ) 30010194: e5947054 ldr r7, [r4, #84] ; 0x54 30010198: e594a050 ldr sl, [r4, #80] ; 0x50 3001019c: e1560007 cmp r6, r7 300101a0: da000027 ble 30010244 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 300101a4: e1a0cfcb asr ip, fp, #31 300101a8: e1a0300c mov r3, ip 300101ac: e1a0200b mov r2, fp 300101b0: e1a00008 mov r0, r8 300101b4: e1a01006 mov r1, r6 300101b8: e58dc000 str ip, [sp] 300101bc: eb001442 bl 300152cc <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 300101c0: e59dc000 ldr ip, [sp] return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 300101c4: e1a05000 mov r5, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 300101c8: e1a01007 mov r1, r7 300101cc: e1a0000a mov r0, sl 300101d0: e1a0200b mov r2, fp 300101d4: e1a0300c mov r3, ip 300101d8: eb00143b bl 300152cc <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 300101dc: 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; 300101e0: e1a0a000 mov sl, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 300101e4: 3a00001b bcc 30010258 300101e8: e1a07000 mov r7, r0 300101ec: ea000002 b 300101fc 300101f0: e2877001 add r7, r7, #1 300101f4: e1550007 cmp r5, r7 300101f8: 3a000016 bcc 30010258 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 300101fc: e1a01007 mov r1, r7 30010200: e1a00004 mov r0, r4 30010204: ebffff4e bl 3000ff44 30010208: e3500000 cmp r0, #0 3001020c: 0afffff7 beq 300101f0 30010210: ea000003 b 30010224 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 30010214: e1a01007 mov r1, r7 <== NOT EXECUTED 30010218: 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-- ) { 3001021c: e2477001 sub r7, r7, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 30010220: ebffffc2 bl 30010130 <== 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-- ) { 30010224: e15a0007 cmp sl, r7 <== NOT EXECUTED 30010228: 9afffff9 bls 30010214 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 3001022c: eb0003bd bl 30011128 <__errno> <== NOT EXECUTED 30010230: e3a0301c mov r3, #28 <== NOT EXECUTED 30010234: e5803000 str r3, [r0] <== NOT EXECUTED 30010238: e3e00000 mvn r0, #0 <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 3001023c: e28dd004 add sp, sp, #4 30010240: 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 ) 30010244: 1a000001 bne 30010250 30010248: e158000a cmp r8, sl 3001024c: 8affffd4 bhi 300101a4 return 0; 30010250: e3a00000 mov r0, #0 30010254: eafffff8 b 3001023c } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 30010258: e5848050 str r8, [r4, #80] ; 0x50 3001025c: e5846054 str r6, [r4, #84] ; 0x54 return 0; 30010260: e3a00000 mov r0, #0 30010264: eafffff4 b 3001023c IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 30010268: 1a000001 bne 30010274 3001026c: e1530001 cmp r3, r1 30010270: 8affffc7 bhi 30010194 rtems_set_errno_and_return_minus_one( EINVAL ); 30010274: eb0003ab bl 30011128 <__errno> <== NOT EXECUTED 30010278: e3a03016 mov r3, #22 <== NOT EXECUTED 3001027c: e5803000 str r3, [r0] <== NOT EXECUTED 30010280: e3e00000 mvn r0, #0 <== NOT EXECUTED 30010284: eaffffec b 3001023c <== NOT EXECUTED =============================================================================== 3000faf8 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000faf8: e59f3200 ldr r3, [pc, #512] ; 3000fd00 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000fafc: 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 ) { 3000fb00: e5934000 ldr r4, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000fb04: e24dd004 sub sp, sp, #4 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000fb08: e1a04124 lsr r4, r4, #2 3000fb0c: e2443001 sub r3, r4, #1 3000fb10: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000fb14: e1a05000 mov r5, r0 3000fb18: e1a06002 mov r6, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000fb1c: 8a000007 bhi 3000fb40 p = info->indirect; if ( malloc_it ) { 3000fb20: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 3000fb24: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 3000fb28: 0a00001c beq 3000fba0 if ( !p ) { 3000fb2c: e3500000 cmp r0, #0 3000fb30: 0a000041 beq 3000fc3c } if ( !p ) return 0; return &info->indirect[ my_block ]; 3000fb34: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } 3000fb38: e28dd004 add sp, sp, #4 3000fb3c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 3000fb40: e0274494 mla r7, r4, r4, r4 3000fb44: e2473001 sub r3, r7, #1 3000fb48: e1510003 cmp r1, r3 3000fb4c: 8a000016 bhi 3000fbac my_block -= FIRST_DOUBLY_INDIRECT; 3000fb50: e0647001 rsb r7, r4, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fb54: e1a00007 mov r0, r7 3000fb58: e1a01004 mov r1, r4 3000fb5c: eb00137a bl 3001494c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fb60: e1a01004 mov r1, r4 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fb64: e1a08000 mov r8, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fb68: e1a00007 mov r0, r7 3000fb6c: eb001330 bl 30014834 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 3000fb70: 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; 3000fb74: e1a04000 mov r4, r0 p = info->doubly_indirect; 3000fb78: e595305c ldr r3, [r5, #92] ; 0x5c if ( malloc_it ) { 3000fb7c: 0a00003f beq 3000fc80 if ( !p ) { 3000fb80: e3530000 cmp r3, #0 3000fb84: 0a000045 beq 3000fca0 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 3000fb88: e7930104 ldr r0, [r3, r4, lsl #2] 3000fb8c: e0834104 add r4, r3, r4, lsl #2 if ( !p1 ) { 3000fb90: e3500000 cmp r0, #0 3000fb94: 0a00002f beq 3000fc58 p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 3000fb98: e0800108 add r0, r0, r8, lsl #2 3000fb9c: eaffffe5 b 3000fb38 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 3000fba0: e3500000 cmp r0, #0 3000fba4: 1affffe2 bne 3000fb34 3000fba8: eaffffe2 b 3000fb38 <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000fbac: e0234497 mla r3, r7, r4, r4 <== NOT EXECUTED 3000fbb0: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000fbb4: e1510003 cmp r1, r3 <== NOT EXECUTED } /* * This means the requested block number is out of range. */ return 0; 3000fbb8: 83a00000 movhi r0, #0 <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000fbbc: 8affffdd bhi 3000fb38 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 3000fbc0: e0677001 rsb r7, r7, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fbc4: e1a00007 mov r0, r7 <== NOT EXECUTED 3000fbc8: e1a01004 mov r1, r4 <== NOT EXECUTED 3000fbcc: eb00135e bl 3001494c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fbd0: 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; 3000fbd4: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fbd8: e1a00007 mov r0, r7 <== NOT EXECUTED 3000fbdc: eb001314 bl 30014834 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000fbe0: 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; 3000fbe4: e1a08000 mov r8, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000fbe8: eb001311 bl 30014834 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000fbec: 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; 3000fbf0: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000fbf4: e1a00008 mov r0, r8 <== NOT EXECUTED 3000fbf8: eb001353 bl 3001494c <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 3000fbfc: 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; 3000fc00: e1a04000 mov r4, r0 <== NOT EXECUTED p = info->triply_indirect; 3000fc04: e5950060 ldr r0, [r5, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 3000fc08: 0a000029 beq 3000fcb4 <== NOT EXECUTED if ( !p ) { 3000fc0c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fc10: 0a000035 beq 3000fcec <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 3000fc14: e7903107 ldr r3, [r0, r7, lsl #2] <== NOT EXECUTED 3000fc18: e0807107 add r7, r0, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { 3000fc1c: e3530000 cmp r3, #0 <== NOT EXECUTED 3000fc20: 0a00002c beq 3000fcd8 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 3000fc24: e7930104 ldr r0, [r3, r4, lsl #2] <== NOT EXECUTED 3000fc28: e0834104 add r4, r3, r4, lsl #2 <== NOT EXECUTED if ( !p2 ) { 3000fc2c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fc30: 0a00000d beq 3000fc6c <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 3000fc34: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 3000fc38: eaffffbe b 3000fb38 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 3000fc3c: e58d1000 str r1, [sp] 3000fc40: ebffff9f bl 3000fac4 if ( !p ) 3000fc44: e3500000 cmp r0, #0 3000fc48: e59d1000 ldr r1, [sp] return 0; info->indirect = p; 3000fc4c: 15850058 strne r0, [r5, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) 3000fc50: 1affffb7 bne 3000fb34 3000fc54: eaffffb7 b 3000fb38 <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 3000fc58: ebffff99 bl 3000fac4 if ( !p1 ) 3000fc5c: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 3000fc60: 15840000 strne r0, [r4] p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; 3000fc64: 10800108 addne r0, r0, r8, lsl #2 3000fc68: eaffffb2 b 3000fb38 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 3000fc6c: ebffff94 bl 3000fac4 <== NOT EXECUTED if ( !p2 ) 3000fc70: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 3000fc74: 15840000 strne r0, [r4] <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 3000fc78: 1080010a addne r0, r0, sl, lsl #2 <== NOT EXECUTED 3000fc7c: eaffffad b 3000fb38 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 3000fc80: e3530000 cmp r3, #0 3000fc84: 1a000001 bne 3000fc90 p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; 3000fc88: e1a00003 mov r0, r3 <== NOT EXECUTED 3000fc8c: eaffffa9 b 3000fb38 <== NOT EXECUTED } if ( !p ) return 0; p = (block_p *)p[ doubly ]; 3000fc90: e7930100 ldr r0, [r3, r0, lsl #2] if ( !p ) 3000fc94: e3500000 cmp r0, #0 return 0; return (block_p *)&p[ singly ]; 3000fc98: 10800108 addne r0, r0, r8, lsl #2 3000fc9c: eaffffa5 b 3000fb38 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 3000fca0: ebffff87 bl 3000fac4 if ( !p ) 3000fca4: e2503000 subs r3, r0, #0 3000fca8: 0afffff6 beq 3000fc88 return 0; info->doubly_indirect = p; 3000fcac: e585305c str r3, [r5, #92] ; 0x5c 3000fcb0: eaffffb4 b 3000fb88 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3000fcb4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fcb8: 0affff9e beq 3000fb38 <== NOT EXECUTED return 0; p1 = (block_p *) p[ triply ]; 3000fcbc: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) 3000fcc0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fcc4: 0affff9b beq 3000fb38 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 3000fcc8: e7900104 ldr r0, [r0, r4, lsl #2] <== NOT EXECUTED if ( !p2 ) 3000fccc: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 3000fcd0: 1080010a addne r0, r0, sl, lsl #2 <== NOT EXECUTED 3000fcd4: eaffff97 b 3000fb38 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 3000fcd8: ebffff79 bl 3000fac4 <== NOT EXECUTED if ( !p1 ) 3000fcdc: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3000fce0: 0affffe8 beq 3000fc88 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 3000fce4: e5873000 str r3, [r7] <== NOT EXECUTED 3000fce8: eaffffcd b 3000fc24 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 3000fcec: ebffff74 bl 3000fac4 <== NOT EXECUTED if ( !p ) 3000fcf0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fcf4: 0affff8f beq 3000fb38 <== NOT EXECUTED return 0; info->triply_indirect = p; 3000fcf8: e5850060 str r0, [r5, #96] ; 0x60 <== NOT EXECUTED 3000fcfc: eaffffc4 b 3000fc14 <== 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 =============================================================================== 3000fd04 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 3000fd04: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000fd08: 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) { 3000fd0c: e590004c ldr r0, [r0, #76] ; 0x4c IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 3000fd10: 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) { 3000fd14: e3500006 cmp r0, #6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 3000fd18: e1a07001 mov r7, r1 3000fd1c: e1a08002 mov r8, r2 3000fd20: e1a0b003 mov fp, r3 3000fd24: 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) { 3000fd28: 0a00005c beq 3000fea0 /* * 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 ) 3000fd2c: 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; 3000fd30: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 3000fd34: e3a01000 mov r1, #0 3000fd38: e1510002 cmp r1, r2 3000fd3c: 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; 3000fd40: e0851007 add r1, r5, r7 if ( last_byte > the_jnode->info.file.size ) 3000fd44: da00003d ble 3000fe40 my_length = the_jnode->info.file.size - start; 3000fd48: e0635002 rsb r5, r3, r2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fd4c: e59f61b8 ldr r6, [pc, #440] ; 3000ff0c 3000fd50: e1a00007 mov r0, r7 3000fd54: e5964000 ldr r4, [r6] 3000fd58: e1a01008 mov r1, r8 3000fd5c: e1a02004 mov r2, r4 3000fd60: e1a03fc2 asr r3, r2, #31 3000fd64: e98d000c stmib sp, {r2, r3} 3000fd68: eb001684 bl 30015780 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fd6c: e99d000c ldmib sp, {r2, r3} */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fd70: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fd74: e1a01008 mov r1, r8 3000fd78: e1a00007 mov r0, r7 3000fd7c: eb001552 bl 300152cc <__divdi3> if ( start_offset ) { 3000fd80: 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; 3000fd84: e1a07000 mov r7, r0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; 3000fd88: 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 ) { 3000fd8c: 0a000014 beq 3000fde4 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 ); 3000fd90: e1a00009 mov r0, r9 3000fd94: e1a01007 mov r1, r7 3000fd98: e3a02000 mov r2, #0 3000fd9c: ebffff55 bl 3000faf8 if ( !block_ptr ) 3000fda0: e3500000 cmp r0, #0 3000fda4: 0a000023 beq 3000fe38 return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 3000fda8: 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; 3000fdac: e06a3004 rsb r3, sl, r4 3000fdb0: e1550003 cmp r5, r3 3000fdb4: 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 ); 3000fdb8: e081100a add r1, r1, sl 3000fdbc: e1a02003 mov r2, r3 3000fdc0: e1a0000b mov r0, fp 3000fdc4: e58d3000 str r3, [sp] 3000fdc8: eb000704 bl 300119e0 dest += to_copy; 3000fdcc: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; 3000fdd0: 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; 3000fdd4: e08b8003 add r8, fp, r3 block++; 3000fdd8: e2877001 add r7, r7, #1 my_length -= to_copy; 3000fddc: e0635005 rsb r5, r3, r5 copied += to_copy; 3000fde0: 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 ) { 3000fde4: e1550004 cmp r5, r4 3000fde8: 2a000008 bcs 3000fe10 3000fdec: ea000017 b 3000fe50 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 3000fdf0: e5931000 ldr r1, [r3] 3000fdf4: eb0006f9 bl 300119e0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 3000fdf8: 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; 3000fdfc: 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 ) { 3000fe00: 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++; 3000fe04: e2877001 add r7, r7, #1 my_length -= to_copy; copied += to_copy; 3000fe08: 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 ) { 3000fe0c: 8a00000f bhi 3000fe50 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000fe10: e3a02000 mov r2, #0 3000fe14: e1a01007 mov r1, r7 3000fe18: e1a00009 mov r0, r9 3000fe1c: ebffff35 bl 3000faf8 if ( !block_ptr ) 3000fe20: e2503000 subs r3, r0, #0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 3000fe24: e1a02004 mov r2, r4 dest += to_copy; block++; my_length -= to_copy; 3000fe28: 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 ); 3000fe2c: 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 ) 3000fe30: 1affffee bne 3000fdf0 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; 3000fe34: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 3000fe38: e28dd014 add sp, sp, #20 3000fe3c: 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 ) 3000fe40: 1affffc1 bne 3000fd4c 3000fe44: e1510002 cmp r1, r2 3000fe48: 9affffbf bls 3000fd4c 3000fe4c: eaffffbd b 3000fd48 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 3000fe50: e3550000 cmp r5, #0 3000fe54: 0a00000a beq 3000fe84 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000fe58: e1a00009 mov r0, r9 3000fe5c: e1a01007 mov r1, r7 3000fe60: e3a02000 mov r2, #0 3000fe64: ebffff23 bl 3000faf8 if ( !block_ptr ) 3000fe68: e2503000 subs r3, r0, #0 3000fe6c: 0afffff0 beq 3000fe34 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 3000fe70: e1a00008 mov r0, r8 3000fe74: e5931000 ldr r1, [r3] 3000fe78: e1a02005 mov r2, r5 3000fe7c: eb0006d7 bl 300119e0 copied += my_length; 3000fe80: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); 3000fe84: e28d000c add r0, sp, #12 3000fe88: e3a01000 mov r1, #0 3000fe8c: ebffd9aa bl 3000653c 3000fe90: e59d300c ldr r3, [sp, #12] return copied; 3000fe94: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 3000fe98: e5893040 str r3, [r9, #64] ; 0x40 return copied; 3000fe9c: eaffffe5 b 3000fe38 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)) 3000fea0: e2894050 add r4, r9, #80 ; 0x50 3000fea4: e8940018 ldm r4, {r3, r4} 3000fea8: e1a00003 mov r0, r3 3000feac: e1a01004 mov r1, r4 3000feb0: e3a02000 mov r2, #0 3000feb4: e0500007 subs r0, r0, r7 3000feb8: e0c11008 sbc r1, r1, r8 3000febc: 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; 3000fec0: e5992058 ldr r2, [r9, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) 3000fec4: da00000b ble 3000fef8 my_length = the_jnode->info.linearfile.size - start; 3000fec8: e067a003 rsb sl, r7, r3 memcpy(dest, &file_ptr[start], my_length); 3000fecc: e0821007 add r1, r2, r7 3000fed0: e1a0000b mov r0, fp 3000fed4: e1a0200a mov r2, sl 3000fed8: eb0006c0 bl 300119e0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 3000fedc: e28d000c add r0, sp, #12 3000fee0: e3a01000 mov r1, #0 3000fee4: ebffd994 bl 3000653c 3000fee8: e59d300c ldr r3, [sp, #12] return copied; 3000feec: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 3000fef0: e5893040 str r3, [r9, #64] ; 0x40 3000fef4: eaffffcf b 3000fe38 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)) 3000fef8: 1a000001 bne 3000ff04 3000fefc: e1550000 cmp r5, r0 3000ff00: 8afffff0 bhi 3000fec8 /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; 3000ff04: e1a0a005 mov sl, r5 <== NOT EXECUTED 3000ff08: eaffffef b 3000fecc <== NOT EXECUTED =============================================================================== 3000fff0 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000fff0: 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; 3000fff4: e59f6130 ldr r6, [pc, #304] ; 3001012c * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000fff8: 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; 3000fffc: e5967000 ldr r7, [r6] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30010000: e3530000 cmp r3, #0 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 30010004: 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; 30010008: e1a07127 lsr r7, r7, #2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 3001000c: 12800058 addne r0, r0, #88 ; 0x58 30010010: 11a01007 movne r1, r7 30010014: 1bffffe0 blne 3000ff9c } if ( info->doubly_indirect ) { 30010018: e59a305c ldr r3, [sl, #92] ; 0x5c 3001001c: e3530000 cmp r3, #0 30010020: 0a000014 beq 30010078 for ( i=0 ; i <== NOT EXECUTED 30010030: e3a02000 mov r2, #0 <== NOT EXECUTED 30010034: e1a04002 mov r4, r2 <== NOT EXECUTED 30010038: ea000000 b 30010040 <== NOT EXECUTED 3001003c: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 30010040: e7931102 ldr r1, [r3, r2, lsl #2] <== NOT EXECUTED 30010044: e1a02102 lsl r2, r2, #2 <== NOT EXECUTED 30010048: 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( 30010050: e1a01007 mov r1, r7 <== NOT EXECUTED 30010054: e0830002 add r0, r3, r2 <== NOT EXECUTED 30010058: 1bffffcf blne 3000ff9c <== 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 ); 3001006c: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED 30010070: e1a01007 mov r1, r7 <== NOT EXECUTED 30010074: ebffffc8 bl 3000ff9c <== NOT EXECUTED } if ( info->triply_indirect ) { 30010078: e59a0060 ldr r0, [sl, #96] ; 0x60 3001007c: e3500000 cmp r0, #0 30010080: 0a000027 beq 30010124 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 30010090: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30010094: e3550000 cmp r5, #0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 30010098: 13a09000 movne r9, #0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 3001009c: 11a08009 movne r8, r9 <== NOT EXECUTED 300100a0: 0a00001c beq 30010118 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 300100ac: e3a00000 mov r0, #0 <== NOT EXECUTED 300100b0: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { 300100b4: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED 300100b8: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED 300100bc: 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 300100e0: 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( 300100e4: e0800009 add r0, r0, r9 <== NOT EXECUTED 300100e8: e1a01007 mov r1, r7 <== NOT EXECUTED 300100ec: ebffffaa bl 3000ff9c <== 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]; 30010104: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30010108: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 3001010c: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 30010110: e3550000 cmp r5, #0 <== NOT EXECUTED 30010114: 1affffe2 bne 300100a4 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 30010118: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED 3001011c: e1a01007 mov r1, r7 <== NOT EXECUTED 30010120: ebffff9d bl 3000ff9c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 30010124: e3a00000 mov r0, #0 30010128: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 30010130 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 30010130: 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 ); 30010134: e3a02000 mov r2, #0 <== NOT EXECUTED 30010138: ebfffe6e bl 3000faf8 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; 3001013c: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010140: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 30010144: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; 30010148: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 3001014c: ebffff8a bl 3000ff7c <== NOT EXECUTED return 1; } 30010150: e3a00001 mov r0, #1 <== NOT EXECUTED 30010154: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3001028c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3001028c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30010290: e1a09000 mov r9, r0 30010294: 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 ) { 30010298: e5900054 ldr r0, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3001029c: 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 ) { 300102a0: e3500000 cmp r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 300102a4: e1a06001 mov r6, r1 300102a8: e1a07002 mov r7, r2 300102ac: 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; 300102b0: e08b1001 add r1, fp, r1 if ( last_byte > the_jnode->info.file.size ) { 300102b4: ba000054 blt 3001040c 300102b8: 0a000050 beq 30010400 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300102bc: e59f5170 ldr r5, [pc, #368] ; 30010434 300102c0: e1a00006 mov r0, r6 300102c4: e5954000 ldr r4, [r5] 300102c8: e1a01007 mov r1, r7 300102cc: e1a02004 mov r2, r4 300102d0: e1a03fc2 asr r3, r2, #31 300102d4: e88d000c stm sp, {r2, r3} 300102d8: eb001528 bl 30015780 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300102dc: e89d000c ldm sp, {r2, r3} */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 300102e0: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 300102e4: e1a01007 mov r1, r7 300102e8: e1a00006 mov r0, r6 300102ec: eb0013f6 bl 300152cc <__divdi3> if ( start_offset ) { 300102f0: 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; 300102f4: e1a07000 mov r7, r0 if ( start_offset ) { 300102f8: 01a0600b moveq r6, fp 300102fc: 1a000016 bne 3001035c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010300: e1560004 cmp r6, r4 30010304: 2a000008 bcs 3001032c 30010308: ea000027 b 300103ac 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 ); 3001030c: e5900000 ldr r0, [r0] 30010310: eb0005b2 bl 300119e0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010314: 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; 30010318: 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 ) { 3001031c: 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++; 30010320: 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( 30010324: 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 ) { 30010328: 8a00001f bhi 300103ac block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3001032c: e1a01007 mov r1, r7 30010330: e3a02000 mov r2, #0 30010334: e1a00009 mov r0, r9 30010338: ebfffdee bl 3000faf8 if ( !block_ptr ) 3001033c: 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 ); 30010340: e1a01008 mov r1, r8 30010344: e1a02004 mov r2, r4 src += to_copy; block++; my_length -= to_copy; 30010348: 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 ) 3001034c: 1affffee bne 3001030c 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 ) 30010350: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } 30010354: e28dd010 add sp, sp, #16 30010358: 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 ); 3001035c: e1a00009 mov r0, r9 <== NOT EXECUTED 30010360: e1a01007 mov r1, r7 <== NOT EXECUTED 30010364: e3a02000 mov r2, #0 <== NOT EXECUTED 30010368: ebfffde2 bl 3000faf8 <== NOT EXECUTED if ( !block_ptr ) 3001036c: e3500000 cmp r0, #0 <== NOT EXECUTED 30010370: 0afffff7 beq 30010354 <== 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; 30010374: e06a4004 rsb r4, sl, r4 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 30010378: 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; 3001037c: e154000b cmp r4, fp <== NOT EXECUTED 30010380: 21a0400b movcs r4, fp <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 30010384: e080000a add r0, r0, sl <== NOT EXECUTED 30010388: e1a01008 mov r1, r8 <== NOT EXECUTED 3001038c: e1a02004 mov r2, r4 <== NOT EXECUTED 30010390: eb000592 bl 300119e0 <== NOT EXECUTED src += to_copy; 30010394: e0888004 add r8, r8, r4 <== NOT EXECUTED block++; my_length -= to_copy; 30010398: e064600b rsb r6, r4, fp <== NOT EXECUTED copied += to_copy; 3001039c: e1a0a004 mov sl, r4 <== NOT EXECUTED src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; 300103a0: e2877001 add r7, r7, #1 <== NOT EXECUTED my_length -= to_copy; copied += to_copy; 300103a4: e5954000 ldr r4, [r5] <== NOT EXECUTED 300103a8: eaffffd4 b 30010300 <== 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 ) { 300103ac: e3560000 cmp r6, #0 300103b0: 0a00000a beq 300103e0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 300103b4: e1a00009 mov r0, r9 300103b8: e1a01007 mov r1, r7 300103bc: e3a02000 mov r2, #0 300103c0: ebfffdcc bl 3000faf8 if ( !block_ptr ) 300103c4: e3500000 cmp r0, #0 300103c8: 0affffe0 beq 30010350 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 ); 300103cc: e5900000 ldr r0, [r0] 300103d0: e1a01008 mov r1, r8 300103d4: e1a02006 mov r2, r6 300103d8: eb000580 bl 300119e0 my_length = 0; copied += to_copy; 300103dc: e08aa006 add sl, sl, r6 } IMFS_mtime_ctime_update( the_jnode ); 300103e0: e28d0008 add r0, sp, #8 300103e4: e3a01000 mov r1, #0 300103e8: ebffd853 bl 3000653c 300103ec: e59d3008 ldr r3, [sp, #8] return copied; 300103f0: e1a0000a mov r0, sl memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); 300103f4: e5893044 str r3, [r9, #68] ; 0x44 300103f8: e5893048 str r3, [r9, #72] ; 0x48 return copied; 300103fc: eaffffd4 b 30010354 * 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 ) { 30010400: e5993050 ldr r3, [r9, #80] ; 0x50 30010404: e1530001 cmp r3, r1 30010408: 2affffab bcs 300102bc status = IMFS_memfile_extend( the_jnode, last_byte ); 3001040c: e1a00009 mov r0, r9 30010410: e3a02000 mov r2, #0 30010414: ebffff4f bl 30010158 if ( status ) 30010418: e3500000 cmp r0, #0 3001041c: 0affffa6 beq 300102bc rtems_set_errno_and_return_minus_one( ENOSPC ); 30010420: eb000340 bl 30011128 <__errno> <== NOT EXECUTED 30010424: e3a0301c mov r3, #28 <== NOT EXECUTED 30010428: e5803000 str r3, [r0] <== NOT EXECUTED 3001042c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30010430: eaffffc7 b 30010354 <== 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: eb002cbd bl 30011128 <__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: eb003493 bl 30015a1c 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: ea0037b0 b 300166dc <== 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: ea0037a9 b 300166dc <== 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: eb00341f bl 300158c8 <== 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: ea003b83 b 30017664 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: eb003416 bl 300158c8 (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: ea003410 b 300158c8 <== 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: eb00342c bl 30015948 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: eb003405 bl 300158c8 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: eb003098 bl 30012130 <== 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: 1b001188 blne 3000a500 <_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: eb001178 bl 3000a4d4 <_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 =============================================================================== 3000e378 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 3000e378: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e37c: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 3000e380: e593204c ldr r2, [r3, #76] ; 0x4c 3000e384: e2422002 sub r2, r2, #2 3000e388: e3520005 cmp r2, #5 3000e38c: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000e390: ea000026 b 3000e430 <== NOT EXECUTED 3000e394: 3000e41c .word 0x3000e41c <== NOT EXECUTED 3000e398: 3000e430 .word 0x3000e430 <== NOT EXECUTED 3000e39c: 3000e3ac .word 0x3000e3ac <== NOT EXECUTED 3000e3a0: 3000e444 .word 0x3000e444 <== NOT EXECUTED 3000e3a4: 3000e444 .word 0x3000e444 <== NOT EXECUTED 3000e3a8: 3000e3ac .word 0x3000e3ac <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 3000e3ac: e3a04000 mov r4, #0 <== NOT EXECUTED 3000e3b0: e3a05000 mov r5, #0 <== NOT EXECUTED 3000e3b4: e5814020 str r4, [r1, #32] <== NOT EXECUTED 3000e3b8: 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; 3000e3bc: 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; 3000e3c0: 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 ); 3000e3c4: 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; 3000e3c8: 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; 3000e3cc: e5935030 ldr r5, [r3, #48] ; 0x30 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 3000e3d0: 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 ); 3000e3d4: 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; 3000e3d8: e593c040 ldr ip, [r3, #64] ; 0x40 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 3000e3dc: 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; 3000e3e0: 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 = 3000e3e4: e59f706c ldr r7, [pc, #108] ; 3000e458 3000e3e8: 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; 3000e3ec: e1d373bc ldrh r7, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; 3000e3f0: 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; 3000e3f4: 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; 3000e3f8: 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 = 3000e3fc: 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; 3000e400: 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; 3000e404: e581500c str r5, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 3000e408: 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; 3000e40c: e581c028 str ip, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 3000e410: e5812038 str r2, [r1, #56] ; 0x38 return 0; 3000e414: e3a00000 mov r0, #0 } 3000e418: 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 ); 3000e41c: e593c054 ldr ip, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 3000e420: e5932050 ldr r2, [r3, #80] ; 0x50 3000e424: e581c01c str ip, [r1, #28] 3000e428: e5812018 str r2, [r1, #24] break; 3000e42c: eaffffe2 b 3000e3bc case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000e430: eb000b3c bl 30011128 <__errno> <== NOT EXECUTED 3000e434: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000e438: e5803000 str r3, [r0] <== NOT EXECUTED 3000e43c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000e440: 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; 3000e444: e2835050 add r5, r3, #80 ; 0x50 3000e448: e8950030 ldm r5, {r4, r5} 3000e44c: e5814020 str r4, [r1, #32] 3000e450: e5815024 str r5, [r1, #36] ; 0x24 break; 3000e454: eaffffd8 b 3000e3bc =============================================================================== 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: eb003068 bl 300120d0 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: eb0020a1 bl 3000e1cc /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30005f44: e1a00005 mov r0, r5 30005f48: eb00304c bl 30012080 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: eb001df9 bl 3000d75c 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: eb002c64 bl 30011128 <__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: eb001e34 bl 3000d8ec <== 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: eb002c2c bl 30011128 <__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: eb002c1c bl 30011128 <__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: eb002c17 bl 30011128 <__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: eb00304a bl 3001221c