=============================================================================== a000cdd4 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { a000cdd4: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a000cdd8: e5903010 ldr r3, [r0, #16] switch( node->type ) { a000cddc: e592204c ldr r2, [r2, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a000cde0: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { a000cde4: e2422001 sub r2, r2, #1 a000cde8: e3520006 cmp r2, #6 a000cdec: 979ff102 ldrls pc, [pc, r2, lsl #2] a000cdf0: ea000010 b a000ce38 <== NOT EXECUTED a000cdf4: a000ce10 .word 0xa000ce10 <== NOT EXECUTED a000cdf8: a000ce18 .word 0xa000ce18 <== NOT EXECUTED a000cdfc: a000ce20 .word 0xa000ce20 <== NOT EXECUTED a000ce00: a000ce20 .word 0xa000ce20 <== NOT EXECUTED a000ce04: a000ce28 .word 0xa000ce28 <== NOT EXECUTED a000ce08: a000ce28 .word 0xa000ce28 <== NOT EXECUTED a000ce0c: a000ce30 .word 0xa000ce30 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; a000ce10: e593300c ldr r3, [r3, #12] a000ce14: ea000006 b a000ce34 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; a000ce18: e59f3020 ldr r3, [pc, #32] ; a000ce40 a000ce1c: ea000004 b a000ce34 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; a000ce20: e59f301c ldr r3, [pc, #28] ; a000ce44 a000ce24: ea000002 b a000ce34 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; a000ce28: e5933008 ldr r3, [r3, #8] a000ce2c: ea000000 b a000ce34 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; a000ce30: e5933010 ldr r3, [r3, #16] a000ce34: e5803008 str r3, [r0, #8] break; } return 0; } a000ce38: e3a00000 mov r0, #0 a000ce3c: e12fff1e bx lr =============================================================================== a000cbb4 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { a000cbb4: e92d4013 push {r0, r1, 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; a000cbb8: e5904000 ldr r4, [r0] <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); a000cbbc: 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; a000cbc0: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; a000cbc4: e1c423be strh r2, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); a000cbc8: e3a01000 mov r1, #0 <== NOT EXECUTED a000cbcc: ebffe5b3 bl a00062a0 <== NOT EXECUTED a000cbd0: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } a000cbd4: e3a00000 mov r0, #0 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); a000cbd8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a000cbdc: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED =============================================================================== a000ced4 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a000ced4: 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 ) ) { a000ced8: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a000cedc: e24dd040 sub sp, sp, #64 ; 0x40 a000cee0: e58d0000 str r0, [sp] a000cee4: e1a06001 mov r6, r1 a000cee8: e1a08002 mov r8, r2 a000ceec: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000cef0: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; a000cef4: 03a09001 moveq r9, #1 * 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 ); a000cef8: 028da004 addeq sl, sp, #4 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 ) ) { a000cefc: 0a000057 beq a000d060 rtems_set_errno_and_return_minus_one( EIO ); a000cf00: eb000cdd bl a001027c <__errno> <== NOT EXECUTED a000cf04: e3a03005 mov r3, #5 <== NOT EXECUTED a000cf08: ea00007e b a000d108 <== NOT EXECUTED * 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 ); a000cf0c: e59d2000 ldr r2, [sp] a000cf10: e28d303c add r3, sp, #60 ; 0x3c a000cf14: e1a01006 mov r1, r6 a000cf18: e0820007 add r0, r2, r7 a000cf1c: e1a0200a mov r2, sl a000cf20: eb0001ae bl a000d5e0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) a000cf24: e5943000 ldr r3, [r4] * 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 ); a000cf28: e1a09000 mov r9, r0 pathnamelen -= len; a000cf2c: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) a000cf30: e3530000 cmp r3, #0 a000cf34: 0a000041 beq a000d040 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a000cf38: e3500000 cmp r0, #0 a000cf3c: 0a000006 beq a000cf5c if ( node->type == IMFS_DIRECTORY ) a000cf40: e595104c ldr r1, [r5, #76] ; 0x4c a000cf44: e3510001 cmp r1, #1 a000cf48: 1a000003 bne a000cf5c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a000cf4c: e1a00004 mov r0, r4 a000cf50: ebffffbc bl a000ce48 a000cf54: e3500000 cmp r0, #0 a000cf58: 0a000068 beq a000d100 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { a000cf5c: e3590003 cmp r9, #3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; a000cf60: e06b6006 rsb r6, fp, r6 i += len; a000cf64: 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; a000cf68: e5945000 ldr r5, [r4] switch( type ) { a000cf6c: 0a000014 beq a000cfc4 a000cf70: e3590004 cmp r9, #4 a000cf74: 0a000036 beq a000d054 a000cf78: e3590002 cmp r9, #2 a000cf7c: 1a000037 bne a000d060 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a000cf80: e59fc194 ldr ip, [pc, #404] ; a000d11c a000cf84: e59c3000 ldr r3, [ip] a000cf88: e5933018 ldr r3, [r3, #24] a000cf8c: e1550003 cmp r5, r3 a000cf90: 0a000032 beq a000d060 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { a000cf94: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == a000cf98: e59e301c ldr r3, [lr, #28] a000cf9c: e1550003 cmp r5, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; a000cfa0: 028dc028 addeq ip, sp, #40 ; 0x28 a000cfa4: 028ee008 addeq lr, lr, #8 a000cfa8: 0a000037 beq a000d08c pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) a000cfac: e5955008 ldr r5, [r5, #8] a000cfb0: e3550000 cmp r5, #0 a000cfb4: 1a000024 bne a000d04c rtems_set_errno_and_return_minus_one( ENOENT ); a000cfb8: eb000caf bl a001027c <__errno> <== NOT EXECUTED a000cfbc: e5809000 str r9, [r0] <== NOT EXECUTED a000cfc0: ea000051 b a000d10c <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a000cfc4: e595304c ldr r3, [r5, #76] ; 0x4c a000cfc8: e3530003 cmp r3, #3 a000cfcc: 1a000004 bne a000cfe4 IMFS_evaluate_hard_link( pathloc, 0 ); a000cfd0: e1a00004 mov r0, r4 <== NOT EXECUTED a000cfd4: e3a01000 mov r1, #0 <== NOT EXECUTED a000cfd8: ebffffaa bl a000ce88 <== NOT EXECUTED node = pathloc->node_access; a000cfdc: e5945000 ldr r5, [r4] <== NOT EXECUTED a000cfe0: ea000008 b a000d008 <== NOT EXECUTED * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { a000cfe4: e3530004 cmp r3, #4 a000cfe8: 1a000006 bne a000d008 result = IMFS_evaluate_sym_link( pathloc, 0 ); a000cfec: e1a00004 mov r0, r4 <== NOT EXECUTED a000cff0: e3a01000 mov r1, #0 <== NOT EXECUTED a000cff4: eb000049 bl a000d120 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) a000cff8: 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 ); a000cffc: e1a0b000 mov fp, r0 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; a000d000: e5945000 ldr r5, [r4] <== NOT EXECUTED if ( result == -1 ) a000d004: 0a000041 beq a000d110 <== NOT EXECUTED } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a000d008: e595304c ldr r3, [r5, #76] ; 0x4c a000d00c: e3530001 cmp r3, #1 a000d010: 0a000002 beq a000d020 rtems_set_errno_and_return_minus_one( ENOTDIR ); a000d014: eb000c98 bl a001027c <__errno> <== NOT EXECUTED a000d018: e3a03014 mov r3, #20 <== NOT EXECUTED a000d01c: ea000039 b a000d108 <== 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 ) { a000d020: e595e05c ldr lr, [r5, #92] ; 0x5c a000d024: e35e0000 cmp lr, #0 a000d028: 1a000015 bne a000d084 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a000d02c: e1a00005 mov r0, r5 a000d030: e1a0100a mov r1, sl a000d034: eb000149 bl a000d560 if ( !node ) a000d038: e2505000 subs r5, r0, #0 a000d03c: 1a000002 bne a000d04c rtems_set_errno_and_return_minus_one( ENOENT ); a000d040: eb000c8d bl a001027c <__errno> a000d044: e3a03002 mov r3, #2 a000d048: ea00002e b a000d108 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a000d04c: e5845000 str r5, [r4] a000d050: ea000002 b a000d060 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a000d054: eb000c88 bl a001027c <__errno> <== NOT EXECUTED a000d058: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000d05c: ea000029 b a000d108 <== NOT EXECUTED /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { a000d060: e3590004 cmp r9, #4 a000d064: 13590000 cmpne r9, #0 a000d068: 1affffa7 bne a000cf0c * 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 ) { a000d06c: e595304c ldr r3, [r5, #76] ; 0x4c a000d070: e3530001 cmp r3, #1 a000d074: 1a000019 bne a000d0e0 if ( node->info.directory.mt_fs != NULL ) { a000d078: e595e05c ldr lr, [r5, #92] ; 0x5c a000d07c: e35e0000 cmp lr, #0 a000d080: 0a000016 beq a000d0e0 newloc = node->info.directory.mt_fs->mt_fs_root; a000d084: e28dc028 add ip, sp, #40 ; 0x28 a000d088: e28ee01c add lr, lr, #28 a000d08c: e8be000f ldm lr!, {r0, r1, r2, r3} a000d090: e8ac000f stmia ip!, {r0, r1, r2, r3} a000d094: e59ee000 ldr lr, [lr] a000d098: e58ce000 str lr, [ip] *pathloc = newloc; a000d09c: e28dc028 add ip, sp, #40 ; 0x28 a000d0a0: e8bc000f ldm ip!, {r0, r1, r2, r3} a000d0a4: e1a0c004 mov ip, r4 a000d0a8: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000d0ac: 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; a000d0b0: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000d0b4: e594300c ldr r3, [r4, #12] a000d0b8: e59d2000 ldr r2, [sp] a000d0bc: e0610007 rsb r0, r1, r7 a000d0c0: e593c000 ldr ip, [r3] a000d0c4: e0820000 add r0, r2, r0 a000d0c8: e0861001 add r1, r6, r1 a000d0cc: e1a02008 mov r2, r8 a000d0d0: e1a03004 mov r3, r4 a000d0d4: e12fff3c blx ip a000d0d8: e1a0b000 mov fp, r0 a000d0dc: ea00000b b a000d110 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a000d0e0: e1a00004 mov r0, r4 a000d0e4: ebffff3a bl a000cdd4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a000d0e8: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a000d0ec: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a000d0f0: e1a00004 mov r0, r4 a000d0f4: ebffff53 bl a000ce48 a000d0f8: e3500000 cmp r0, #0 a000d0fc: 1a000003 bne a000d110 rtems_set_errno_and_return_minus_one( EACCES ); a000d100: eb000c5d bl a001027c <__errno> <== NOT EXECUTED a000d104: e3a0300d mov r3, #13 <== NOT EXECUTED a000d108: e5803000 str r3, [r0] a000d10c: e3e0b000 mvn fp, #0 return result; } a000d110: e1a0000b mov r0, fp a000d114: e28dd040 add sp, sp, #64 ; 0x40 a000d118: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000d25c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a000d25c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000d260: e24dd03c sub sp, sp, #60 ; 0x3c a000d264: e1a07000 mov r7, r0 a000d268: e1a04001 mov r4, r1 a000d26c: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000d270: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); a000d274: eb000fea bl a0011224 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; a000d278: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a000d27c: e1a08000 mov r8, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a000d280: e1a01008 mov r1, r8 a000d284: e28d3038 add r3, sp, #56 ; 0x38 a000d288: e0870005 add r0, r7, r5 a000d28c: e1a0200d mov r2, sp a000d290: eb0000d2 bl a000d5e0 pathlen -= len; i += len; if ( !pathloc->node_access ) a000d294: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a000d298: e59db038 ldr fp, [sp, #56] ; 0x38 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a000d29c: e1a09000 mov r9, r0 pathlen -= len; i += len; if ( !pathloc->node_access ) a000d2a0: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a000d2a4: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) a000d2a8: 0a000060 beq a000d430 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a000d2ac: e3500000 cmp r0, #0 a000d2b0: 0a000006 beq a000d2d0 if ( node->type == IMFS_DIRECTORY ) a000d2b4: e596104c ldr r1, [r6, #76] ; 0x4c a000d2b8: e3510001 cmp r1, #1 a000d2bc: 1a000003 bne a000d2d0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a000d2c0: e1a00004 mov r0, r4 a000d2c4: ebfffedf bl a000ce48 a000d2c8: e3500000 cmp r0, #0 a000d2cc: 0a00006c beq a000d484 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a000d2d0: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a000d2d4: e085500b add r5, r5, 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; a000d2d8: e1a06003 mov r6, r3 switch( type ) { a000d2dc: e3590004 cmp r9, #4 a000d2e0: 979ff109 ldrls pc, [pc, r9, lsl #2] a000d2e4: eaffffe5 b a000d280 <== NOT EXECUTED a000d2e8: a000d3f4 .word 0xa000d3f4 <== NOT EXECUTED a000d2ec: a000d280 .word 0xa000d280 <== NOT EXECUTED a000d2f0: a000d2fc .word 0xa000d2fc <== NOT EXECUTED a000d2f4: a000d338 .word 0xa000d338 <== NOT EXECUTED a000d2f8: a000d400 .word 0xa000d400 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a000d2fc: e59f119c ldr r1, [pc, #412] ; a000d4a0 a000d300: e5912000 ldr r2, [r1] a000d304: e5922018 ldr r2, [r2, #24] a000d308: e1530002 cmp r3, r2 a000d30c: 0affffdb beq a000d280 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a000d310: e594e010 ldr lr, [r4, #16] a000d314: e59e201c ldr r2, [lr, #28] a000d318: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; a000d31c: 028dc024 addeq ip, sp, #36 ; 0x24 a000d320: 028ee008 addeq lr, lr, #8 a000d324: 0a000019 beq a000d390 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) a000d328: e5936008 ldr r6, [r3, #8] a000d32c: e3560000 cmp r6, #0 a000d330: 1a00002d bne a000d3ec a000d334: ea00003d b a000d430 <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { a000d338: e593304c ldr r3, [r3, #76] ; 0x4c a000d33c: e3530003 cmp r3, #3 a000d340: 0a000001 beq a000d34c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a000d344: e3530004 cmp r3, #4 a000d348: 1a000005 bne a000d364 result = IMFS_evaluate_link( pathloc, 0 ); a000d34c: e1a00004 mov r0, r4 <== NOT EXECUTED a000d350: e3a01000 mov r1, #0 <== NOT EXECUTED a000d354: ebffff93 bl a000d1a8 <== NOT EXECUTED if ( result == -1 ) a000d358: e3700001 cmn r0, #1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a000d35c: e1a06000 mov r6, r0 <== NOT EXECUTED if ( result == -1 ) a000d360: 0a00004b beq a000d494 <== NOT EXECUTED return -1; } node = pathloc->node_access; a000d364: e5940000 ldr r0, [r4] if ( !node ) a000d368: e3500000 cmp r0, #0 a000d36c: 0a00003c beq a000d464 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a000d370: e590304c ldr r3, [r0, #76] ; 0x4c a000d374: e3530001 cmp r3, #1 a000d378: 1a000039 bne a000d464 /* * 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 ) { a000d37c: e590e05c ldr lr, [r0, #92] ; 0x5c a000d380: e35e0000 cmp lr, #0 a000d384: 0a000014 beq a000d3dc newloc = node->info.directory.mt_fs->mt_fs_root; a000d388: e28dc024 add ip, sp, #36 ; 0x24 a000d38c: e28ee01c add lr, lr, #28 a000d390: e8be000f ldm lr!, {r0, r1, r2, r3} a000d394: e8ac000f stmia ip!, {r0, r1, r2, r3} a000d398: e59ee000 ldr lr, [lr] a000d39c: e58ce000 str lr, [ip] *pathloc = newloc; a000d3a0: e28dc024 add ip, sp, #36 ; 0x24 a000d3a4: e8bc000f ldm ip!, {r0, r1, r2, r3} a000d3a8: e1a0c004 mov ip, r4 a000d3ac: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a000d3b0: e59d2038 ldr r2, [sp, #56] ; 0x38 * 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; a000d3b4: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a000d3b8: e594300c ldr r3, [r4, #12] a000d3bc: e0625005 rsb r5, r2, r5 a000d3c0: e0870005 add r0, r7, r5 a000d3c4: e5933004 ldr r3, [r3, #4] a000d3c8: e1a01004 mov r1, r4 a000d3cc: e1a0200a mov r2, sl a000d3d0: e12fff33 blx r3 a000d3d4: e1a06000 mov r6, r0 a000d3d8: ea00002d b a000d494 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a000d3dc: e1a0100d mov r1, sp a000d3e0: eb00005e bl a000d560 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a000d3e4: e2506000 subs r6, r0, #0 a000d3e8: 0a000007 beq a000d40c done = true; else pathloc->node_access = node; a000d3ec: e5846000 str r6, [r4] a000d3f0: eaffffa2 b a000d280 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a000d3f4: eb000ba0 bl a001027c <__errno> a000d3f8: e3a03011 mov r3, #17 a000d3fc: ea000022 b a000d48c break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a000d400: eb000b9d bl a001027c <__errno> <== NOT EXECUTED a000d404: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000d408: ea00001f b a000d48c <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a000d40c: e59d3038 ldr r3, [sp, #56] ; 0x38 a000d410: e0633005 rsb r3, r3, r5 a000d414: e0873003 add r3, r7, r3 a000d418: e58a3000 str r3, [sl] * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( a000d41c: e0875005 add r5, r7, r5 /* * 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++) { a000d420: ea000005 b a000d43c if ( !IMFS_is_separator( path[ i ] ) ) a000d424: ebffe6f6 bl a0007004 <== NOT EXECUTED a000d428: e3500000 cmp r0, #0 <== NOT EXECUTED a000d42c: 1a000002 bne a000d43c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); a000d430: eb000b91 bl a001027c <__errno> <== NOT EXECUTED a000d434: e3a03002 mov r3, #2 <== NOT EXECUTED a000d438: ea000013 b a000d48c <== NOT EXECUTED /* * 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++) { a000d43c: e4d50001 ldrb r0, [r5], #1 a000d440: e3500000 cmp r0, #0 a000d444: 1afffff6 bne a000d424 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a000d448: e1a00004 mov r0, r4 a000d44c: ebfffe60 bl a000cdd4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a000d450: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a000d454: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a000d458: e593304c ldr r3, [r3, #76] ; 0x4c a000d45c: e3530001 cmp r3, #1 a000d460: 0a000002 beq a000d470 rtems_set_errno_and_return_minus_one( ENOTDIR ); a000d464: eb000b84 bl a001027c <__errno> <== NOT EXECUTED a000d468: e3a03014 mov r3, #20 <== NOT EXECUTED a000d46c: ea000006 b a000d48c <== NOT EXECUTED /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a000d470: e1a00004 mov r0, r4 a000d474: e3a01003 mov r1, #3 a000d478: ebfffe72 bl a000ce48 a000d47c: e3500000 cmp r0, #0 a000d480: 1a000003 bne a000d494 rtems_set_errno_and_return_minus_one( EACCES ); a000d484: eb000b7c bl a001027c <__errno> a000d488: e3a0300d mov r3, #13 a000d48c: e5803000 str r3, [r0] a000d490: e3e06000 mvn r6, #0 return result; } a000d494: e1a00006 mov r0, r6 a000d498: e28dd03c add sp, sp, #60 ; 0x3c a000d49c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000ce88 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000ce88: e92d4030 push {r4, r5, lr} IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; a000ce8c: e5903000 ldr r3, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000ce90: e1a04000 mov r4, r0 a000ce94: e1a05001 mov r5, r1 IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; a000ce98: e5933050 ldr r3, [r3, #80] ; 0x50 a000ce9c: e5803000 str r3, [r0] IMFS_Set_handlers( node ); a000cea0: ebffffcb bl a000cdd4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a000cea4: e1a00004 mov r0, r4 a000cea8: e1a01005 mov r1, r5 a000ceac: ebffffe5 bl a000ce48 a000ceb0: e3500000 cmp r0, #0 a000ceb4: 1a000004 bne a000cecc rtems_set_errno_and_return_minus_one( EACCES ); a000ceb8: eb000cef bl a001027c <__errno> <== NOT EXECUTED a000cebc: e3a0300d mov r3, #13 <== NOT EXECUTED a000cec0: e5803000 str r3, [r0] <== NOT EXECUTED a000cec4: e3e00000 mvn r0, #0 <== NOT EXECUTED a000cec8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return result; a000cecc: e3a00000 mov r0, #0 } a000ced0: e8bd8030 pop {r4, r5, pc} =============================================================================== a000d1a8 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d1a8: e92d40f0 push {r4, r5, r6, r7, lr} /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d1ac: e59f70a4 ldr r7, [pc, #164] ; a000d258 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d1b0: e1a04000 mov r4, r0 a000d1b4: e1a05001 mov r5, r1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d1b8: e5973000 ldr r3, [r7] { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; a000d1bc: e5946000 ldr r6, [r4] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d1c0: e1d323b0 ldrh r2, [r3, #48] ; 0x30 a000d1c4: e2822001 add r2, r2, #1 a000d1c8: e1a02802 lsl r2, r2, #16 a000d1cc: e1a02822 lsr r2, r2, #16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { a000d1d0: e3520005 cmp r2, #5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d1d4: e1c323b0 strh r2, [r3, #48] ; 0x30 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { a000d1d8: 9a000006 bls a000d1f8 rtems_filesystem_link_counts = 0; a000d1dc: e3a02000 mov r2, #0 <== NOT EXECUTED a000d1e0: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); a000d1e4: eb000c24 bl a001027c <__errno> <== NOT EXECUTED a000d1e8: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED a000d1ec: e5803000 str r3, [r0] <== NOT EXECUTED a000d1f0: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d1f4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) a000d1f8: e596304c ldr r3, [r6, #76] ; 0x4c a000d1fc: e3530003 cmp r3, #3 a000d200: 1a000003 bne a000d214 result = IMFS_evaluate_hard_link( node, flags ); a000d204: e1a00004 mov r0, r4 a000d208: e1a01005 mov r1, r5 a000d20c: ebffff1d bl a000ce88 a000d210: ea000004 b a000d228 else if (jnode->type == IMFS_SYM_LINK ) a000d214: e3530004 cmp r3, #4 a000d218: 1a000004 bne a000d230 result = IMFS_evaluate_sym_link( node, flags ); a000d21c: e1a00004 mov r0, r4 a000d220: e1a01005 mov r1, r5 a000d224: ebffffbd bl a000d120 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); a000d228: e3500000 cmp r0, #0 a000d22c: 1a000004 bne a000d244 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 ) || a000d230: e596304c ldr r3, [r6, #76] ; 0x4c a000d234: e2433003 sub r3, r3, #3 a000d238: e3530001 cmp r3, #1 a000d23c: 9affffdd bls a000d1b8 a000d240: e3a00000 mov r0, #0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; a000d244: e59f300c ldr r3, [pc, #12] ; a000d258 a000d248: e3a02000 mov r2, #0 a000d24c: e5933000 ldr r3, [r3] a000d250: e1c323b0 strh r2, [r3, #48] ; 0x30 return result; } a000d254: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000ce48 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a000ce48: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { a000ce4c: 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 ) ) a000ce50: 0a000004 beq a000ce68 rtems_set_errno_and_return_minus_one( EPERM ); a000ce54: eb000d08 bl a001027c <__errno> <== NOT EXECUTED a000ce58: e3a03001 mov r3, #1 <== NOT EXECUTED a000ce5c: e5803000 str r3, [r0] <== NOT EXECUTED a000ce60: e3e00000 mvn r0, #0 <== NOT EXECUTED a000ce64: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) a000ce68: e5903000 ldr r3, [r0] */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; a000ce6c: 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 ) a000ce70: e5930030 ldr r0, [r3, #48] ; 0x30 a000ce74: 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 ); a000ce78: e1500001 cmp r0, r1 a000ce7c: 13a00000 movne r0, #0 a000ce80: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } a000ce84: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a000d120 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d120: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; a000d124: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d128: e1a04000 mov r4, r0 a000d12c: 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; a000d130: e5963008 ldr r3, [r6, #8] rtems_filesystem_get_sym_start_loc( a000d134: e1a0100d mov r1, sp a000d138: e1a02004 mov r2, r4 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; a000d13c: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( a000d140: e5960050 ldr r0, [r6, #80] ; 0x50 a000d144: eb000343 bl a000de58 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( a000d148: e59d3000 ldr r3, [sp] a000d14c: e5966050 ldr r6, [r6, #80] ; 0x50 a000d150: e0866003 add r6, r6, r3 a000d154: e1a00006 mov r0, r6 a000d158: eb001031 bl a0011224 a000d15c: e1a02005 mov r2, r5 a000d160: e1a01000 mov r1, r0 a000d164: e1a03004 mov r3, r4 a000d168: e1a00006 mov r0, r6 a000d16c: ebffff58 bl a000ced4 a000d170: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); a000d174: e1a00004 mov r0, r4 a000d178: ebffff15 bl a000cdd4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a000d17c: e1a00004 mov r0, r4 a000d180: e1a01005 mov r1, r5 a000d184: ebffff2f bl a000ce48 a000d188: e3500000 cmp r0, #0 a000d18c: 1a000003 bne a000d1a0 rtems_set_errno_and_return_minus_one( EACCES ); a000d190: eb000c39 bl a001027c <__errno> <== NOT EXECUTED a000d194: e3a0300d mov r3, #13 <== NOT EXECUTED a000d198: e5803000 str r3, [r0] <== NOT EXECUTED a000d19c: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } a000d1a0: e1a00006 mov r0, r6 a000d1a4: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== a000fd30 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { a000fd30: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; a000fd34: 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); a000fd38: e1a01a01 lsl r1, r1, #20 <== NOT EXECUTED IMFS_update_ctime( jnode ); a000fd3c: e1a0000d mov r0, sp <== 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); a000fd40: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED a000fd44: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED a000fd48: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a000fd4c: e1833a21 orr r3, r3, r1, lsr #20 <== NOT EXECUTED a000fd50: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); a000fd54: e3a01000 mov r1, #0 <== NOT EXECUTED a000fd58: ebffd950 bl a00062a0 <== NOT EXECUTED a000fd5c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } a000fd60: 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 ); a000fd64: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a000fd68: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED =============================================================================== a000fd6c : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } a000fd6c: e3a00000 mov r0, #0 <== NOT EXECUTED a000fd70: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0006cf8 : void *buffer ) { int err; if (command == FIONBIO) { a0006cf8: e59fc06c ldr ip, [pc, #108] ; a0006d6c int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a0006cfc: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { a0006d00: e151000c cmp r1, ip int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a0006d04: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { a0006d08: 1a00000a bne a0006d38 if (buffer == NULL) a0006d0c: e3520000 cmp r2, #0 a0006d10: 0a00000e beq a0006d50 err = -EFAULT; else { if (*(int *)buffer) a0006d14: e5924000 ldr r4, [r2] a0006d18: e5932014 ldr r2, [r3, #20] a0006d1c: e3540000 cmp r4, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006d20: 13822001 orrne r2, r2, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0006d24: 03c22001 biceq r2, r2, #1 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006d28: 15832014 strne r2, [r3, #20] else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; a0006d2c: 13a04000 movne r4, #0 err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0006d30: 05832014 streq r2, [r3, #20] a0006d34: ea00000a b a0006d64 return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); a0006d38: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED a0006d3c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED a0006d40: eb002478 bl a000ff28 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a0006d44: e2504000 subs r4, r0, #0 <== NOT EXECUTED a0006d48: aa000005 bge a0006d64 <== NOT EXECUTED a0006d4c: ea000000 b a0006d54 <== NOT EXECUTED { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; a0006d50: e3e0400d mvn r4, #13 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); a0006d54: eb002c7e bl a0011f54 <__errno> a0006d58: e2644000 rsb r4, r4, #0 a0006d5c: e5804000 str r4, [r0] a0006d60: e3e04000 mvn r4, #0 } a0006d64: e1a00004 mov r0, r4 a0006d68: e8bd8010 pop {r4, pc} =============================================================================== a0006e50 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a0006e50: e1a01000 mov r1, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); a0006e54: e5900018 ldr r0, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a0006e58: e92d4010 push {r4, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); a0006e5c: e2800050 add r0, r0, #80 ; 0x50 a0006e60: eb00227b bl a000f854 IMFS_FIFO_RETURN(err); a0006e64: e2504000 subs r4, r0, #0 a0006e68: aa000003 bge a0006e7c a0006e6c: eb002c38 bl a0011f54 <__errno> <== NOT EXECUTED a0006e70: e2644000 rsb r4, r4, #0 <== NOT EXECUTED a0006e74: e5804000 str r4, [r0] <== NOT EXECUTED a0006e78: e3e04000 mvn r4, #0 <== NOT EXECUTED } a0006e7c: e1a00004 mov r0, r4 a0006e80: e8bd8010 pop {r4, pc} =============================================================================== a0006dc8 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a0006dc8: e92d4033 push {r0, r1, r4, r5, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; a0006dcc: e5904018 ldr r4, [r0, #24] ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a0006dd0: e1a03000 mov r3, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); a0006dd4: e5940050 ldr r0, [r4, #80] ; 0x50 a0006dd8: eb00238a bl a000fc08 if (err > 0) a0006ddc: e2505000 subs r5, r0, #0 a0006de0: da000005 ble a0006dfc IMFS_update_atime(jnode); a0006de4: e1a0000d mov r0, sp <== NOT EXECUTED a0006de8: e3a01000 mov r1, #0 <== NOT EXECUTED a0006dec: eb0003d6 bl a0007d4c <== NOT EXECUTED a0006df0: e59d3000 ldr r3, [sp] <== NOT EXECUTED a0006df4: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED a0006df8: ea000005 b a0006e14 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a0006dfc: 0a000004 beq a0006e14 a0006e00: eb002c53 bl a0011f54 <__errno> a0006e04: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a0006e08: e5805000 str r5, [r0] <== NOT EXECUTED a0006e0c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006e10: ea000000 b a0006e18 <== NOT EXECUTED a0006e14: e1a00005 mov r0, r5 } a0006e18: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== a0006d70 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a0006d70: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; a0006d74: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a0006d78: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); a0006d7c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED a0006d80: eb002400 bl a000fd88 <== NOT EXECUTED if (err > 0) { a0006d84: e2505000 subs r5, r0, #0 <== NOT EXECUTED a0006d88: da000006 ble a0006da8 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); a0006d8c: e1a0000d mov r0, sp <== NOT EXECUTED a0006d90: e3a01000 mov r1, #0 <== NOT EXECUTED a0006d94: eb0003ec bl a0007d4c <== NOT EXECUTED a0006d98: e59d3000 ldr r3, [sp] <== NOT EXECUTED a0006d9c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED a0006da0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED a0006da4: ea000005 b a0006dc0 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); a0006da8: 0a000004 beq a0006dc0 <== NOT EXECUTED a0006dac: eb002c68 bl a0011f54 <__errno> <== NOT EXECUTED a0006db0: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a0006db4: e5805000 str r5, [r0] <== NOT EXECUTED a0006db8: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006dbc: ea000000 b a0006dc4 <== NOT EXECUTED a0006dc0: e1a00005 mov r0, r5 <== NOT EXECUTED } a0006dc4: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== a000d4a4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000d4a4: 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; a000d4a8: e1a0c000 mov ip, r0 a000d4ac: e5bc401c ldr r4, [ip, #28]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000d4b0: 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; loc = temp_mt_entry->mt_fs_root; a000d4b4: e1a0e00d mov lr, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000d4b8: e1a05000 mov r5, 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; a000d4bc: e8bc000f ldm ip!, {r0, r1, r2, r3} a000d4c0: e8ae000f stmia lr!, {r0, r1, r2, r3} a000d4c4: e59c3000 ldr r3, [ip] a000d4c8: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a000d4cc: e3a03000 mov r3, #0 a000d4d0: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a000d4d4: e1a0500d mov r5, sp a000d4d8: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a000d4dc: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; a000d4e0: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); a000d4e4: ebfffe3a bl a000cdd4 if ( jnode->type != IMFS_DIRECTORY ) { a000d4e8: e594304c ldr r3, [r4, #76] ; 0x4c a000d4ec: e3530001 cmp r3, #1 a000d4f0: 1a000003 bne a000d504 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { a000d4f4: e5942050 ldr r2, [r4, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000d4f8: e2843054 add r3, r4, #84 ; 0x54 a000d4fc: e1520003 cmp r2, r3 a000d500: 1a000005 bne a000d51c result = IMFS_unlink( NULL, &loc ); a000d504: e3a00000 mov r0, #0 a000d508: e1a0100d mov r1, sp a000d50c: ebffe1ff bl a0005d10 if (result != 0) a000d510: e3500000 cmp r0, #0 a000d514: 1a00000c bne a000d54c return -1; jnode = next; a000d518: e1a04006 mov r4, r6 } if ( jnode != NULL ) { a000d51c: e3540000 cmp r4, #0 a000d520: 0a00000b beq a000d554 if ( jnode->type == IMFS_DIRECTORY ) { a000d524: e594304c ldr r3, [r4, #76] ; 0x4c a000d528: e3530001 cmp r3, #1 a000d52c: 1affffe9 bne a000d4d8 } } } while (jnode != NULL); return 0; } a000d530: e5943050 ldr r3, [r4, #80] ; 0x50 a000d534: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) a000d538: e1530002 cmp r3, r2 a000d53c: 0affffe5 beq a000d4d8 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a000d540: e2534000 subs r4, r3, #0 a000d544: 1affffe3 bne a000d4d8 a000d548: ea000001 b a000d554 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; a000d54c: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d550: ea000000 b a000d558 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; a000d554: e1a00004 mov r0, r4 } a000d558: e28dd014 add sp, sp, #20 a000d55c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000d5e0 : const char *path, int pathlen, char *token, int *token_len ) { a000d5e0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a000d5e4: e1a05001 mov r5, r1 a000d5e8: e1a04002 mov r4, r2 a000d5ec: e1a0a003 mov sl, r3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; a000d5f0: e5d07000 ldrb r7, [r0] a000d5f4: e1a08000 mov r8, r0 int pathlen, char *token, int *token_len ) { register int i = 0; a000d5f8: 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) ) { a000d5fc: ea000004 b a000d614 token[i] = c; if ( i == IMFS_NAME_MAX ) a000d600: 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; a000d604: e7c47006 strb r7, [r4, r6] if ( i == IMFS_NAME_MAX ) a000d608: 0a000025 beq a000d6a4 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; a000d60c: e5f87001 ldrb r7, [r8, #1]! a000d610: 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) ) { a000d614: e1a00007 mov r0, r7 a000d618: ebffe679 bl a0007004 a000d61c: e3500000 cmp r0, #0 a000d620: 1a000001 bne a000d62c a000d624: e1560005 cmp r6, r5 a000d628: bafffff4 blt a000d600 /* * Copy a seperator into token. */ if ( i == 0 ) { a000d62c: e3560000 cmp r6, #0 a000d630: 1a000005 bne a000d64c token[i] = c; if ( (token[i] != '\0') && pathlen ) { a000d634: e3570000 cmp r7, #0 a000d638: 13550000 cmpne r5, #0 i++; type = IMFS_CURRENT_DIR; a000d63c: 13a06001 movne r6, #1 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; a000d640: e5c47000 strb r7, [r4] if ( (token[i] != '\0') && pathlen ) { i++; a000d644: e1a00006 mov r0, r6 a000d648: ea000005 b a000d664 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { a000d64c: e0843006 add r3, r4, r6 a000d650: e5533001 ldrb r3, [r3, #-1] char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; a000d654: e3a00003 mov r0, #3 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { a000d658: e3530000 cmp r3, #0 token[i] = '\0'; a000d65c: 13a03000 movne r3, #0 a000d660: 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 ) { a000d664: e3500003 cmp r0, #3 /* * Set token_len to the number of characters copied. */ *token_len = i; a000d668: e58a6000 str r6, [sl] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { a000d66c: 1a00000e bne a000d6ac if ( strcmp( token, "..") == 0 ) a000d670: e1a00004 mov r0, r4 a000d674: e59f1034 ldr r1, [pc, #52] ; a000d6b0 a000d678: eb000e0d bl a0010eb4 a000d67c: e3500000 cmp r0, #0 type = IMFS_UP_DIR; a000d680: 03a00002 moveq r0, #2 * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) a000d684: 0a000008 beq a000d6ac type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) a000d688: e1a00004 mov r0, r4 a000d68c: e59f1020 ldr r1, [pc, #32] ; a000d6b4 a000d690: eb000e07 bl a0010eb4 type = IMFS_CURRENT_DIR; a000d694: e3500000 cmp r0, #0 a000d698: 13a00003 movne r0, #3 a000d69c: 03a00001 moveq r0, #1 a000d6a0: 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; a000d6a4: e3a00004 mov r0, #4 <== NOT EXECUTED a000d6a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } a000d6ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a0005954 : 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 ) { a0005954: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a0005958: e1a07003 mov r7, r3 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, a000595c: e59f30d0 ldr r3, [pc, #208] ; a0005a34 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 ) { a0005960: e1a0a001 mov sl, r1 a0005964: e1a08002 mov r8, r2 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, a0005968: e5933000 ldr r3, [r3] 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 ) { a000596c: 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, a0005970: e3a01006 mov r1, #6 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { a0005974: e3a02010 mov r2, #16 if (bit_mask == requested_bytes_per_block) { a0005978: e1520003 cmp r2, r3 a000597c: 0a000004 beq a0005994 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) a0005980: ca000002 bgt a0005990 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { a0005984: e2511001 subs r1, r1, #1 a0005988: e1a02082 lsl r2, r2, #1 a000598c: 1afffff9 bne a0005978 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); a0005990: e3a03080 mov r3, #128 ; 0x80 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) a0005994: e59f609c ldr r6, [pc, #156] ; a0005a38 a0005998: e5863000 str r3, [r6] /* * 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(); a000599c: eb001cfc bl a000cd94 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; a00059a0: e59fe094 ldr lr, [pc, #148] ; a0005a3c a00059a4: 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(); a00059a8: e584001c str r0, [r4, #28] a00059ac: e1a05000 mov r5, 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; a00059b0: e8be000f ldm lr!, {r0, r1, r2, r3} a00059b4: e8ac000f stmia ip!, {r0, r1, r2, r3} a00059b8: e8be000f ldm lr!, {r0, r1, r2, r3} a00059bc: e8ac000f stmia ip!, {r0, r1, r2, r3} a00059c0: 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(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; a00059c4: e5847024 str r7, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; a00059c8: e88c000f stm ip, {r0, r1, r2, r3} * * 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; temp_mt_entry->mt_fs_root.ops = op_table; a00059cc: e584a028 str sl, [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 ) ); a00059d0: e3a00001 mov r0, #1 a00059d4: e3a01014 mov r1, #20 a00059d8: eb000196 bl a0006038 if ( !fs_info ) { a00059dc: e3500000 cmp r0, #0 a00059e0: 1a000006 bne a0005a00 free(temp_mt_entry->mt_fs_root.node_access); a00059e4: e1a00005 mov r0, r5 <== NOT EXECUTED a00059e8: eb0001f7 bl a00061cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); a00059ec: eb002a22 bl a001027c <__errno> <== NOT EXECUTED a00059f0: e3a0300c mov r3, #12 <== NOT EXECUTED a00059f4: e5803000 str r3, [r0] <== NOT EXECUTED a00059f8: e3e00000 mvn r0, #0 <== NOT EXECUTED a00059fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; a0005a00: e5963004 ldr r3, [r6, #4] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; a0005a04: e59d201c ldr r2, [sp, #28] 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; a0005a08: e5840034 str r0, [r4, #52] ; 0x34 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; a0005a0c: e5803000 str r3, [r0] a0005a10: e2833001 add r3, r3, #1 a0005a14: e5863004 str r3, [r6, #4] fs_info->ino_count = 1; a0005a18: e3a03001 mov r3, #1 a0005a1c: e9800108 stmib r0, {r3, r8} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; a0005a20: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; a0005a24: e5802010 str r2, [r0, #16] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; a0005a28: e5853038 str r3, [r5, #56] ; 0x38 return 0; a0005a2c: e3a00000 mov r0, #0 } a0005a30: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a0005a40 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { a0005a40: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; a0005a44: e5903000 ldr r3, [r0] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { a0005a48: e24dd048 sub sp, sp, #72 ; 0x48 a0005a4c: e1a05001 mov r5, r1 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; a0005a50: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) a0005a54: e1d333b4 ldrh r3, [r3, #52] ; 0x34 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { a0005a58: e1a06002 mov r6, r2 /* * 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 ) a0005a5c: e3530007 cmp r3, #7 a0005a60: 9a000002 bls a0005a70 rtems_set_errno_and_return_minus_one( EMLINK ); a0005a64: eb002a04 bl a001027c <__errno> <== NOT EXECUTED a0005a68: e3a0301f mov r3, #31 <== NOT EXECUTED a0005a6c: ea000012 b a0005abc <== NOT EXECUTED /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); a0005a70: e1a00002 mov r0, r2 a0005a74: eb002dea bl a0011224 a0005a78: e28d4004 add r4, sp, #4 a0005a7c: e1a01000 mov r1, r0 a0005a80: e1a02004 mov r2, r4 a0005a84: e28d3044 add r3, sp, #68 ; 0x44 a0005a88: e1a00006 mov r0, r6 a0005a8c: eb001ed3 bl a000d5e0 new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info a0005a90: 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( a0005a94: e58d3000 str r3, [sp] a0005a98: e1a00005 mov r0, r5 a0005a9c: e3a01003 mov r1, #3 a0005aa0: e1a02004 mov r2, r4 a0005aa4: e59f3050 ldr r3, [pc, #80] ; a0005afc a0005aa8: eb001c69 bl a000cc54 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) a0005aac: e3500000 cmp r0, #0 a0005ab0: 1a000004 bne a0005ac8 rtems_set_errno_and_return_minus_one( ENOMEM ); a0005ab4: eb0029f0 bl a001027c <__errno> <== NOT EXECUTED a0005ab8: e3a0300c mov r3, #12 <== NOT EXECUTED a0005abc: e5803000 str r3, [r0] <== NOT EXECUTED a0005ac0: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005ac4: ea00000a b a0005af4 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; a0005ac8: e59d3028 ldr r3, [sp, #40] ; 0x28 IMFS_update_ctime( info.hard_link.link_node ); a0005acc: e28d003c add r0, sp, #60 ; 0x3c a0005ad0: e3a01000 mov r1, #0 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++; a0005ad4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a0005ad8: e2822001 add r2, r2, #1 a0005adc: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); a0005ae0: eb0001ee bl a00062a0 a0005ae4: e59d203c ldr r2, [sp, #60] ; 0x3c a0005ae8: e59d3028 ldr r3, [sp, #40] ; 0x28 return 0; a0005aec: e3a00000 mov r0, #0 /* * 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 ); a0005af0: e5832048 str r2, [r3, #72] ; 0x48 return 0; } a0005af4: e28dd048 add sp, sp, #72 ; 0x48 a0005af8: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000f1e4 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { a000f1e4: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a000f1e8: e3a02001 mov r2, #1 a000f1ec: ebffff00 bl a000edf4 if ( *block_entry_ptr ) a000f1f0: e5904000 ldr r4, [r0] IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a000f1f4: e1a05000 mov r5, r0 if ( *block_entry_ptr ) a000f1f8: e3540000 cmp r4, #0 a000f1fc: 1a000005 bne a000f218 return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); a000f200: ebfffeee bl a000edc0 if ( !memory ) a000f204: e3500000 cmp r0, #0 a000f208: 0a000004 beq a000f220 return 1; *block_entry_ptr = memory; a000f20c: e5850000 str r0, [r5] return 0; a000f210: e1a00004 mov r0, r4 a000f214: e8bd8030 pop {r4, r5, pc} /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) return 0; a000f218: e3a00000 mov r0, #0 a000f21c: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; a000f220: e3a00001 mov r0, #1 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } a000f224: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000f3d8 : IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a000f3d8: e59f3110 ldr r3, [pc, #272] ; a000f4f0 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000f3dc: e92d4df1 push {r0, 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 ) a000f3e0: e593b000 ldr fp, [r3] */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000f3e4: e1a05002 mov r5, r2 a000f3e8: e1a04000 mov r4, r0 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a000f3ec: e1a0312b lsr r3, fp, #2 a000f3f0: e2832001 add r2, r3, #1 a000f3f4: e0020293 mul r2, r3, r2 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000f3f8: e1a06001 mov r6, r1 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a000f3fc: e2822001 add r2, r2, #1 a000f400: e0030392 mul r3, r2, r3 a000f404: e3a02000 mov r2, #0 a000f408: e2433001 sub r3, r3, #1 a000f40c: e1520005 cmp r2, r5 a000f410: e003039b mul r3, fp, r3 a000f414: ca000005 bgt a000f430 a000f418: 1a000001 bne a000f424 a000f41c: e1530001 cmp r3, r1 a000f420: 8a000002 bhi a000f430 rtems_set_errno_and_return_minus_one( EINVAL ); a000f424: eb000394 bl a001027c <__errno> a000f428: e3a03016 mov r3, #22 a000f42c: ea000025 b a000f4c8 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) a000f430: e5948054 ldr r8, [r4, #84] ; 0x54 a000f434: e5947050 ldr r7, [r4, #80] ; 0x50 a000f438: e1550008 cmp r5, r8 a000f43c: ca000002 bgt a000f44c a000f440: 1a000028 bne a000f4e8 a000f444: e1560007 cmp r6, r7 a000f448: 9a000026 bls a000f4e8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a000f44c: e1a0cfcb asr ip, fp, #31 a000f450: e1a0300c mov r3, ip a000f454: e1a0200b mov r2, fp a000f458: e1a00006 mov r0, r6 a000f45c: e1a01005 mov r1, r5 a000f460: e58dc000 str ip, [sp] a000f464: eb001213 bl a0013cb8 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a000f468: e59dc000 ldr ip, [sp] a000f46c: e1a01008 mov r1, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a000f470: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a000f474: e1a0200b mov r2, fp a000f478: e1a00007 mov r0, r7 a000f47c: e1a0300c mov r3, ip a000f480: eb00120c bl a0013cb8 <__divdi3> a000f484: e1a08000 mov r8, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a000f488: e1a07000 mov r7, r0 a000f48c: ea000011 b a000f4d8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { a000f490: e1a00004 mov r0, r4 a000f494: e1a01007 mov r1, r7 a000f498: ebffff51 bl a000f1e4 a000f49c: e3500000 cmp r0, #0 a000f4a0: 0a00000b beq a000f4d4 a000f4a4: ea000003 b a000f4b8 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); a000f4a8: e1a01007 mov r1, r7 <== NOT EXECUTED a000f4ac: e1a00004 mov r0, r4 <== NOT EXECUTED a000f4b0: ebffffbe bl a000f3b0 <== 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-- ) { a000f4b4: e2477001 sub r7, r7, #1 <== NOT EXECUTED a000f4b8: e1570008 cmp r7, r8 <== NOT EXECUTED a000f4bc: 2afffff9 bcs a000f4a8 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); a000f4c0: eb00036d bl a001027c <__errno> <== NOT EXECUTED a000f4c4: e3a0301c mov r3, #28 <== NOT EXECUTED a000f4c8: e5803000 str r3, [r0] a000f4cc: e3e00000 mvn r0, #0 a000f4d0: ea000005 b a000f4ec old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a000f4d4: e2877001 add r7, r7, #1 a000f4d8: e157000a cmp r7, sl a000f4dc: 9affffeb bls a000f490 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a000f4e0: e5846050 str r6, [r4, #80] ; 0x50 a000f4e4: e5845054 str r5, [r4, #84] ; 0x54 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; a000f4e8: e3a00000 mov r0, #0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } a000f4ec: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== a000edf4 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000edf4: e59f31e4 ldr r3, [pc, #484] ; a000efe0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000edf8: 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 ) { a000edfc: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000ee00: e1a04000 mov r4, r0 a000ee04: e1a06001 mov r6, r1 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000ee08: e1a05125 lsr r5, r5, #2 a000ee0c: e2453001 sub r3, r5, #1 a000ee10: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000ee14: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000ee18: 8a00000e bhi a000ee58 p = info->indirect; if ( malloc_it ) { a000ee1c: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a000ee20: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a000ee24: 0a000007 beq a000ee48 if ( !p ) { a000ee28: e3500000 cmp r0, #0 a000ee2c: 1a000003 bne a000ee40 p = memfile_alloc_block(); a000ee30: ebffffe2 bl a000edc0 if ( !p ) a000ee34: e3500000 cmp r0, #0 a000ee38: 0a000067 beq a000efdc return 0; info->indirect = p; a000ee3c: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; a000ee40: e5940058 ldr r0, [r4, #88] ; 0x58 a000ee44: ea000001 b a000ee50 } if ( !p ) a000ee48: e3500000 cmp r0, #0 a000ee4c: 0a000062 beq a000efdc return 0; return &info->indirect[ my_block ]; a000ee50: e0800106 add r0, r0, r6, lsl #2 a000ee54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a000ee58: e2853001 add r3, r5, #1 a000ee5c: e0030395 mul r3, r5, r3 a000ee60: e2432001 sub r2, r3, #1 a000ee64: e1510002 cmp r1, r2 a000ee68: 8a000021 bhi a000eef4 my_block -= FIRST_DOUBLY_INDIRECT; a000ee6c: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000ee70: e1a00006 mov r0, r6 a000ee74: e1a01005 mov r1, r5 a000ee78: eb00135a bl a0013be8 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000ee7c: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000ee80: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000ee84: e1a00006 mov r0, r6 a000ee88: eb0012be bl a0013988 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a000ee8c: e3580000 cmp r8, #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; a000ee90: e1a05000 mov r5, r0 p = info->doubly_indirect; a000ee94: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { a000ee98: 0a00000e beq a000eed8 if ( !p ) { a000ee9c: e3500000 cmp r0, #0 a000eea0: 1a000003 bne a000eeb4 p = memfile_alloc_block(); a000eea4: ebffffc5 bl a000edc0 if ( !p ) a000eea8: e3500000 cmp r0, #0 a000eeac: 0a00004a beq a000efdc return 0; info->doubly_indirect = p; a000eeb0: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; a000eeb4: e0804105 add r4, r0, r5, lsl #2 a000eeb8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { a000eebc: e3500000 cmp r0, #0 a000eec0: 1a000009 bne a000eeec p1 = memfile_alloc_block(); a000eec4: ebffffbd bl a000edc0 if ( !p1 ) a000eec8: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a000eecc: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) a000eed0: 1a000005 bne a000eeec a000eed4: ea000040 b a000efdc <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a000eed8: e3500000 cmp r0, #0 a000eedc: 0a00003e beq a000efdc return 0; p = (block_p *)p[ doubly ]; a000eee0: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) a000eee4: e3500000 cmp r0, #0 a000eee8: 0a00003b beq a000efdc return 0; return (block_p *)&p[ singly ]; a000eeec: e0800107 add r0, r0, r7, lsl #2 a000eef0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a000eef4: e2832001 add r2, r3, #1 a000eef8: e0020295 mul r2, r5, r2 a000eefc: e2422001 sub r2, r2, #1 a000ef00: e1510002 cmp r1, r2 a000ef04: 8a000033 bhi a000efd8 my_block -= FIRST_TRIPLY_INDIRECT; a000ef08: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000ef0c: e1a00006 mov r0, r6 a000ef10: e1a01005 mov r1, r5 a000ef14: eb001333 bl a0013be8 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000ef18: e1a01005 mov r1, r5 * 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; a000ef1c: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000ef20: e1a00006 mov r0, r6 a000ef24: eb001297 bl a0013988 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000ef28: e1a01005 mov r1, r5 */ 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; a000ef2c: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000ef30: eb001294 bl a0013988 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000ef34: e1a01005 mov r1, r5 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; a000ef38: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000ef3c: e1a00006 mov r0, r6 a000ef40: eb001328 bl a0013be8 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a000ef44: e3580000 cmp r8, #0 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; a000ef48: e1a05000 mov r5, r0 p = info->triply_indirect; a000ef4c: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a000ef50: 0a000016 beq a000efb0 if ( !p ) { a000ef54: e3500000 cmp r0, #0 a000ef58: 1a000003 bne a000ef6c p = memfile_alloc_block(); a000ef5c: ebffff97 bl a000edc0 if ( !p ) a000ef60: e3500000 cmp r0, #0 a000ef64: 0a00001c beq a000efdc return 0; info->triply_indirect = p; a000ef68: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; a000ef6c: e0804107 add r4, r0, r7, lsl #2 a000ef70: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { a000ef74: e3500000 cmp r0, #0 a000ef78: 1a000003 bne a000ef8c p1 = memfile_alloc_block(); a000ef7c: ebffff8f bl a000edc0 if ( !p1 ) a000ef80: e3500000 cmp r0, #0 a000ef84: 0a000014 beq a000efdc return 0; p[ triply ] = (block_p) p1; a000ef88: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; a000ef8c: e0804105 add r4, r0, r5, lsl #2 a000ef90: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { a000ef94: e3500000 cmp r0, #0 a000ef98: 1a00000c bne a000efd0 p2 = memfile_alloc_block(); a000ef9c: ebffff87 bl a000edc0 if ( !p2 ) a000efa0: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a000efa4: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) a000efa8: 1a000008 bne a000efd0 a000efac: ea00000a b a000efdc <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a000efb0: e3500000 cmp r0, #0 a000efb4: 0a000008 beq a000efdc return 0; p1 = (block_p *) p[ triply ]; a000efb8: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a000efbc: e3500000 cmp r0, #0 a000efc0: 0a000005 beq a000efdc return 0; p2 = (block_p *)p1[ doubly ]; a000efc4: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a000efc8: e3500000 cmp r0, #0 a000efcc: 0a000002 beq a000efdc return 0; return (block_p *)&p2[ singly ]; a000efd0: e080010a add r0, r0, sl, lsl #2 a000efd4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * This means the requested block number is out of range. */ return 0; a000efd8: e3a00000 mov r0, #0 <== NOT EXECUTED } a000efdc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000f298 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a000f298: 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; a000f29c: e59f3108 ldr r3, [pc, #264] ; a000f3ac * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a000f2a0: e1a04000 mov r4, 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; a000f2a4: e5935000 ldr r5, [r3] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a000f2a8: 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; a000f2ac: e1a05125 lsr r5, r5, #2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a000f2b0: e3530000 cmp r3, #0 a000f2b4: 0a000002 beq a000f2c4 memfile_free_blocks_in_table( &info->indirect, to_free ); a000f2b8: e2800058 add r0, r0, #88 ; 0x58 <== NOT EXECUTED a000f2bc: e1a01005 mov r1, r5 <== NOT EXECUTED a000f2c0: ebffffe0 bl a000f248 <== NOT EXECUTED } if ( info->doubly_indirect ) { a000f2c4: e594305c ldr r3, [r4, #92] ; 0x5c a000f2c8: e3530000 cmp r3, #0 a000f2cc: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { a000f2d4: 1a000009 bne a000f300 a000f2d8: ea00000e b a000f318 for ( i=0 ; idoubly_indirect[i] ) { a000f2dc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED a000f2e0: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED a000f2e4: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED a000f2e8: e3520000 cmp r2, #0 <== NOT EXECUTED a000f2ec: 0a000002 beq a000f2fc <== NOT EXECUTED memfile_free_blocks_in_table( a000f2f0: e0830000 add r0, r3, r0 <== NOT EXECUTED a000f2f4: e1a01005 mov r1, r5 <== NOT EXECUTED a000f2f8: ebffffd2 bl a000f248 <== 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 ); a000f30c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED a000f310: e1a01005 mov r1, r5 <== NOT EXECUTED a000f314: ebffffcb bl a000f248 <== NOT EXECUTED } if ( info->triply_indirect ) { a000f318: e5943060 ldr r3, [r4, #96] ; 0x60 a000f31c: e3530000 cmp r3, #0 a000f320: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { a000f328: 1a000017 bne a000f38c a000f32c: ea00001c b a000f3a4 for ( i=0 ; itriply_indirect[i]; a000f330: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { a000f334: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; a000f338: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a000f33c: e3580000 cmp r8, #0 <== NOT EXECUTED a000f340: 0a000014 beq a000f398 <== NOT EXECUTED * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( a000f344: e2488004 sub r8, r8, #4 <== NOT EXECUTED a000f348: e3a07000 mov r7, #0 <== NOT EXECUTED a000f34c: ea000006 b a000f36c <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); a000f35c: e1a00008 mov r0, r8 <== NOT EXECUTED a000f360: e1a01005 mov r1, r5 <== NOT EXECUTED a000f364: ebffffb7 bl a000f248 <== 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 ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( a000f378: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED a000f37c: e1a01005 mov r1, r5 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( a000f398: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED a000f39c: e1a01005 mov r1, r5 <== NOT EXECUTED a000f3a0: ebffffa8 bl a000f248 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } a000f3a4: e3a00000 mov r0, #0 a000f3a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a000f3b0 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { a000f3b0: 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 ); a000f3b4: e3a02000 mov r2, #0 <== NOT EXECUTED a000f3b8: ebfffe8d bl a000edf4 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; a000f3bc: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000f3c0: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; a000f3c4: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; a000f3c8: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); a000f3cc: ebffff95 bl a000f228 <== NOT EXECUTED return 1; } a000f3d0: e3a00001 mov r0, #1 <== NOT EXECUTED a000f3d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a000f4f4 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000f4f4: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} a000f4f8: e1a06003 mov r6, 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; if ( last_byte > the_jnode->info.file.size ) { a000f4fc: e5903054 ldr r3, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000f500: e59d8030 ldr r8, [sp, #48] ; 0x30 a000f504: e1a07001 mov r7, r1 * 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 ) { a000f508: e3530000 cmp r3, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000f50c: e1a04000 mov r4, r0 a000f510: e1a0a002 mov sl, r2 /* * 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; a000f514: e0881001 add r1, r8, r1 if ( last_byte > the_jnode->info.file.size ) { a000f518: ba000003 blt a000f52c a000f51c: 1a00000c bne a000f554 a000f520: e5903050 ldr r3, [r0, #80] ; 0x50 a000f524: e1530001 cmp r3, r1 a000f528: 2a000009 bcs a000f554 status = IMFS_memfile_extend( the_jnode, last_byte ); a000f52c: e1a00004 mov r0, r4 a000f530: e3a02000 mov r2, #0 a000f534: ebffffa7 bl a000f3d8 if ( status ) a000f538: e3500000 cmp r0, #0 a000f53c: 0a000004 beq a000f554 rtems_set_errno_and_return_minus_one( ENOSPC ); a000f540: eb00034d bl a001027c <__errno> a000f544: e3a0301c mov r3, #28 a000f548: e5803000 str r3, [r0] a000f54c: e3e05000 mvn r5, #0 a000f550: ea00004d b a000f68c */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000f554: e59f3138 ldr r3, [pc, #312] ; a000f694 a000f558: e1a00007 mov r0, r7 a000f55c: e1a0100a mov r1, sl a000f560: e5939000 ldr r9, [r3] a000f564: e1a0b009 mov fp, r9 a000f568: e1a0cfcb asr ip, fp, #31 a000f56c: e1a0300c mov r3, ip a000f570: e1a0200b mov r2, fp a000f574: e58dc000 str ip, [sp] a000f578: eb0012fb bl a001416c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000f57c: e59dc000 ldr ip, [sp] */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000f580: e1a05000 mov r5, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000f584: e1a0100a mov r1, sl a000f588: e1a00007 mov r0, r7 a000f58c: e1a0200b mov r2, fp a000f590: e1a0300c mov r3, ip a000f594: eb0011c7 bl a0013cb8 <__divdi3> if ( start_offset ) { a000f598: e3550000 cmp r5, #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; a000f59c: e1a07000 mov r7, r0 if ( start_offset ) { a000f5a0: 0a000012 beq a000f5f0 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 ); a000f5a4: e1a00004 mov r0, r4 <== NOT EXECUTED a000f5a8: e1a01007 mov r1, r7 <== NOT EXECUTED a000f5ac: e3a02000 mov r2, #0 <== NOT EXECUTED a000f5b0: ebfffe0f bl a000edf4 <== NOT EXECUTED if ( !block_ptr ) a000f5b4: e3500000 cmp r0, #0 <== NOT EXECUTED return copied; a000f5b8: 01a05000 moveq r5, r0 <== NOT EXECUTED 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 ); if ( !block_ptr ) a000f5bc: 0a000032 beq a000f68c <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a000f5c0: 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; a000f5c4: e065a009 rsb sl, r5, r9 <== NOT EXECUTED a000f5c8: e15a0008 cmp sl, r8 <== NOT EXECUTED a000f5cc: 21a0a008 movcs sl, r8 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a000f5d0: e0800005 add r0, r0, r5 <== NOT EXECUTED a000f5d4: e1a01006 mov r1, r6 <== NOT EXECUTED a000f5d8: e1a0200a mov r2, sl <== NOT EXECUTED a000f5dc: eb000554 bl a0010b34 <== NOT EXECUTED src += to_copy; a000f5e0: e086600a add r6, r6, sl <== NOT EXECUTED block++; a000f5e4: e2877001 add r7, r7, #1 <== NOT EXECUTED my_length -= to_copy; a000f5e8: e06a8008 rsb r8, sl, r8 <== NOT EXECUTED copied += to_copy; a000f5ec: e1a0500a mov r5, sl <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; a000f5f0: e59f909c ldr r9, [pc, #156] ; a000f694 a000f5f4: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a000f5f8: ea00000d b a000f634 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000f5fc: e1a00004 mov r0, r4 a000f600: e1a01007 mov r1, r7 a000f604: e3a02000 mov r2, #0 a000f608: ebfffdf9 bl a000edf4 if ( !block_ptr ) a000f60c: e3500000 cmp r0, #0 a000f610: 0a00001d beq a000f68c 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 ); a000f614: e1a01006 mov r1, r6 a000f618: e5900000 ldr r0, [r0] a000f61c: e1a0200a mov r2, sl a000f620: eb000543 bl a0010b34 src += to_copy; a000f624: e086600a add r6, r6, sl block++; a000f628: e2877001 add r7, r7, #1 my_length -= to_copy; a000f62c: e06a8008 rsb r8, sl, r8 * 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( a000f630: e085500a add r5, r5, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a000f634: e5993000 ldr r3, [r9] a000f638: e1580003 cmp r8, r3 a000f63c: 2affffee bcs a000f5fc * 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 ) { a000f640: e3580000 cmp r8, #0 a000f644: 0a00000a beq a000f674 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000f648: e1a00004 mov r0, r4 a000f64c: e1a01007 mov r1, r7 a000f650: e3a02000 mov r2, #0 a000f654: ebfffde6 bl a000edf4 if ( !block_ptr ) a000f658: e3500000 cmp r0, #0 a000f65c: 0a00000a beq a000f68c 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 ); a000f660: e5900000 ldr r0, [r0] a000f664: e1a01006 mov r1, r6 a000f668: e1a02008 mov r2, r8 a000f66c: eb000530 bl a0010b34 my_length = 0; copied += to_copy; a000f670: e0855008 add r5, r5, r8 } IMFS_mtime_ctime_update( the_jnode ); a000f674: e28d0004 add r0, sp, #4 a000f678: e3a01000 mov r1, #0 a000f67c: ebffdb07 bl a00062a0 a000f680: e59d3004 ldr r3, [sp, #4] a000f684: e5843044 str r3, [r4, #68] ; 0x44 a000f688: e5843048 str r3, [r4, #72] ; 0x48 return copied; } a000f68c: e1a00005 mov r0, r5 a000f690: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0005bac : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0005bac: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0005bb0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0005bb4: e593204c ldr r2, [r3, #76] ; 0x4c a0005bb8: e3520001 cmp r2, #1 a0005bbc: 0a000004 beq a0005bd4 rtems_set_errno_and_return_minus_one( ENOTDIR ); a0005bc0: eb0029ad bl a001027c <__errno> <== NOT EXECUTED a0005bc4: e3a03014 mov r3, #20 <== NOT EXECUTED a0005bc8: e5803000 str r3, [r0] <== NOT EXECUTED a0005bcc: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005bd0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; a0005bd4: e583005c str r0, [r3, #92] ; 0x5c return 0; a0005bd8: e3a00000 mov r0, #0 } a0005bdc: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0008538 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a0008538: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a000853c: e59f50e0 ldr r5, [pc, #224] ; a0008624 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a0008540: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a0008544: e280000c add r0, r0, #12 a0008548: e5953000 ldr r3, [r5] a000854c: e5931008 ldr r1, [r3, #8] a0008550: eb00312a bl a0014a00 switch( the_jnode->type ) { a0008554: e594204c ldr r2, [r4, #76] ; 0x4c a0008558: e2423001 sub r3, r2, #1 a000855c: e3530006 cmp r3, #6 a0008560: 979ff103 ldrls pc, [pc, r3, lsl #2] a0008564: ea000026 b a0008604 a0008568: a0008584 .word 0xa0008584 a000856c: a0008598 .word 0xa0008598 a0008570: a00085e4 .word 0xa00085e4 a0008574: a00085e4 .word 0xa00085e4 a0008578: a00085cc .word 0xa00085cc a000857c: a00085b0 .word 0xa00085b0 a0008580: a00085f0 .word 0xa00085f0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); a0008584: e5953000 ldr r3, [r5] a0008588: e3a0002f mov r0, #47 ; 0x2f a000858c: e5931008 ldr r1, [r3, #8] a0008590: eb0030e5 bl a001492c break; a0008594: ea00001f b a0008618 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", a0008598: e5953000 ldr r3, [r5] a000859c: e59f1084 ldr r1, [pc, #132] ; a0008628 a00085a0: e5942050 ldr r2, [r4, #80] ; 0x50 a00085a4: e5930008 ldr r0, [r3, #8] a00085a8: e5943054 ldr r3, [r4, #84] ; 0x54 a00085ac: ea000004 b a00085c4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", a00085b0: e5953000 ldr r3, [r5] a00085b4: e59f1070 ldr r1, [pc, #112] ; a000862c a00085b8: e5942050 ldr r2, [r4, #80] ; 0x50 a00085bc: e5930008 ldr r0, [r3, #8] a00085c0: e5943058 ldr r3, [r4, #88] ; 0x58 a00085c4: eb0030b8 bl a00148ac (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; a00085c8: ea000012 b a0008618 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", a00085cc: e5953000 ldr r3, [r5] <== NOT EXECUTED a00085d0: e59f1058 ldr r1, [pc, #88] ; a0008630 <== NOT EXECUTED a00085d4: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED a00085d8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED a00085dc: eb0030b2 bl a00148ac <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; a00085e0: ea00000c b a0008618 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a00085e4: e5953000 ldr r3, [r5] <== NOT EXECUTED a00085e8: e59f0044 ldr r0, [pc, #68] ; a0008634 <== NOT EXECUTED a00085ec: ea000001 b a00085f8 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a00085f0: e5953000 ldr r3, [r5] <== NOT EXECUTED a00085f4: e59f003c ldr r0, [pc, #60] ; a0008638 <== NOT EXECUTED a00085f8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } a00085fc: 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" ); a0008600: ea0030fe b a0014a00 <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); a0008604: e5953000 ldr r3, [r5] <== NOT EXECUTED a0008608: e59f102c ldr r1, [pc, #44] ; a000863c <== NOT EXECUTED a000860c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } a0008610: 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 ); a0008614: ea0030a4 b a00148ac <== NOT EXECUTED return; } puts(""); a0008618: e59f0020 ldr r0, [pc, #32] ; a0008640 } a000861c: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); a0008620: ea0037d0 b a0016568 =============================================================================== a0005bec : ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; a0005bec: e590c000 ldr ip, [r0] <== NOT EXECUTED IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) a0005bf0: e3a00000 mov r0, #0 <== NOT EXECUTED a0005bf4: ea000001 b a0005c00 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; a0005bf8: e7c13000 strb r3, [r1, r0] <== NOT EXECUTED node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) a0005bfc: e2800001 add r0, r0, #1 <== NOT EXECUTED a0005c00: e1500002 cmp r0, r2 <== NOT EXECUTED a0005c04: 212fff1e bxcs lr <== NOT EXECUTED a0005c08: e59c3050 ldr r3, [ip, #80] ; 0x50 <== NOT EXECUTED a0005c0c: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED a0005c10: e3530000 cmp r3, #0 <== NOT EXECUTED a0005c14: 1afffff7 bne a0005bf8 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } a0005c18: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0005c1c : 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 */ ) { a0005c1c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; a0005c20: 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 */ ) { a0005c24: 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 ); a0005c28: e1a01003 mov r1, r3 <== NOT EXECUTED a0005c2c: e284000c add r0, r4, #12 <== NOT EXECUTED a0005c30: e3a02020 mov r2, #32 <== NOT EXECUTED a0005c34: eb002d92 bl a0011284 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) a0005c38: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a0005c3c: e3530000 cmp r3, #0 <== NOT EXECUTED a0005c40: 0a000001 beq a0005c4c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a0005c44: e1a00004 mov r0, r4 <== NOT EXECUTED a0005c48: eb001035 bl a0009d24 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; a0005c4c: e5950000 ldr r0, [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 ); a0005c50: e1a01004 mov r1, r4 <== NOT EXECUTED the_jnode->Parent = new_parent; a0005c54: e5840008 str r0, [r4, #8] <== NOT EXECUTED a0005c58: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED a0005c5c: eb001025 bl a0009cf8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); a0005c60: e1a0000d mov r0, sp <== NOT EXECUTED a0005c64: e3a01000 mov r1, #0 <== NOT EXECUTED a0005c68: eb00018c bl a00062a0 <== NOT EXECUTED a0005c6c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } a0005c70: 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 ); a0005c74: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a0005c78: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== a000d78c : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a000d78c: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a000d790: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a000d794: e593204c ldr r2, [r3, #76] ; 0x4c a000d798: e2422002 sub r2, r2, #2 a000d79c: e3520005 cmp r2, #5 a000d7a0: 979ff102 ldrls pc, [pc, r2, lsl #2] a000d7a4: ea000012 b a000d7f4 <== NOT EXECUTED a000d7a8: a000d7c0 .word 0xa000d7c0 <== NOT EXECUTED a000d7ac: a000d7f4 .word 0xa000d7f4 <== NOT EXECUTED a000d7b0: a000d7e0 .word 0xa000d7e0 <== NOT EXECUTED a000d7b4: a000d7d4 .word 0xa000d7d4 <== NOT EXECUTED a000d7b8: a000d7d4 .word 0xa000d7d4 <== NOT EXECUTED a000d7bc: a000d7e0 .word 0xa000d7e0 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); a000d7c0: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a000d7c4: e593c050 ldr ip, [r3, #80] ; 0x50 a000d7c8: e581201c str r2, [r1, #28] a000d7cc: e581c018 str ip, [r1, #24] break; a000d7d0: ea00000c b a000d808 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; a000d7d4: e283c050 add ip, r3, #80 ; 0x50 a000d7d8: e89c1800 ldm ip, {fp, ip} a000d7dc: ea000001 b a000d7e8 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a000d7e0: e3a0b000 mov fp, #0 <== NOT EXECUTED a000d7e4: e3a0c000 mov ip, #0 <== NOT EXECUTED a000d7e8: e581b020 str fp, [r1, #32] a000d7ec: e581c024 str ip, [r1, #36] ; 0x24 break; a000d7f0: ea000004 b a000d808 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a000d7f4: eb000aa0 bl a001027c <__errno> <== NOT EXECUTED a000d7f8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a000d7fc: e5803000 str r3, [r0] <== NOT EXECUTED a000d800: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d804: e8bd8800 pop {fp, pc} <== 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; a000d808: e5902010 ldr r2, [r0, #16] a000d80c: e59f0054 ldr r0, [pc, #84] ; a000d868 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a000d810: e5922034 ldr r2, [r2, #52] ; 0x34 a000d814: e5922000 ldr r2, [r2] /* * 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 = a000d818: e5810000 str r0, [r1] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; a000d81c: e3a00000 mov r0, #0 /* * 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 = a000d820: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a000d824: e5932030 ldr r2, [r3, #48] ; 0x30 a000d828: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; a000d82c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a000d830: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; a000d834: e5932038 ldr r2, [r3, #56] ; 0x38 a000d838: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; a000d83c: e1d323bc ldrh r2, [r3, #60] ; 0x3c a000d840: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; a000d844: e1d323be ldrh r2, [r3, #62] ; 0x3e a000d848: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; a000d84c: e5932040 ldr r2, [r3, #64] ; 0x40 a000d850: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; a000d854: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; a000d858: e5933048 ldr r3, [r3, #72] ; 0x48 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; a000d85c: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; a000d860: e5813038 str r3, [r1, #56] ; 0x38 return 0; } a000d864: e8bd8800 pop {fp, pc} =============================================================================== a0005c7c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { a0005c7c: e92d40f0 push {r4, r5, r6, r7, lr} a0005c80: e1a05000 mov r5, r0 a0005c84: 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 ); a0005c88: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { a0005c8c: e1a06001 mov r6, r1 a0005c90: e1a07002 mov r7, r2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); a0005c94: eb002d62 bl a0011224 a0005c98: e28d4004 add r4, sp, #4 a0005c9c: e1a01000 mov r1, r0 a0005ca0: e1a02004 mov r2, r4 a0005ca4: e28d303c add r3, sp, #60 ; 0x3c a0005ca8: e1a00007 mov r0, r7 a0005cac: eb001e4b bl a000d5e0 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); a0005cb0: e1a00006 mov r0, r6 a0005cb4: eb002d46 bl a00111d4 if (info.sym_link.name == NULL) { a0005cb8: 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); a0005cbc: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { a0005cc0: 0a00000b beq a0005cf4 new_node = IMFS_create_node( parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info a0005cc4: 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( a0005cc8: e58d3000 str r3, [sp] a0005ccc: e1a00005 mov r0, r5 a0005cd0: e3a01004 mov r1, #4 a0005cd4: e1a02004 mov r2, r4 a0005cd8: e59f302c ldr r3, [pc, #44] ; a0005d0c a0005cdc: eb001bdc bl a000cc54 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a0005ce0: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; a0005ce4: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a0005ce8: 1a000005 bne a0005d04 free(info.sym_link.name); a0005cec: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED a0005cf0: eb000135 bl a00061cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); a0005cf4: eb002960 bl a001027c <__errno> <== NOT EXECUTED a0005cf8: e3a0300c mov r3, #12 <== NOT EXECUTED a0005cfc: e5803000 str r3, [r0] <== NOT EXECUTED a0005d00: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } a0005d04: e28dd040 add sp, sp, #64 ; 0x40 a0005d08: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0005d10 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0005d10: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; a0005d14: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0005d18: e24dd01c sub sp, sp, #28 a0005d1c: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0005d20: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0005d24: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0005d28: e3530003 cmp r3, #3 a0005d2c: 1a000024 bne a0005dc4 if ( !node->info.hard_link.link_node ) a0005d30: e595e050 ldr lr, [r5, #80] ; 0x50 <== NOT EXECUTED a0005d34: e35e0000 cmp lr, #0 <== NOT EXECUTED a0005d38: 1a000003 bne a0005d4c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); a0005d3c: eb00294e bl a001027c <__errno> <== NOT EXECUTED a0005d40: e3a03016 mov r3, #22 <== NOT EXECUTED a0005d44: e5803000 str r3, [r0] <== NOT EXECUTED a0005d48: ea000023 b a0005ddc <== NOT EXECUTED the_link = *loc; a0005d4c: e1a0c00d mov ip, sp <== NOT EXECUTED a0005d50: e1a07001 mov r7, r1 <== NOT EXECUTED a0005d54: e8b7000f ldm r7!, {r0, r1, r2, r3} <== NOT EXECUTED a0005d58: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED a0005d5c: e5973000 ldr r3, [r7] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; a0005d60: e28d701c add r7, sp, #28 <== NOT EXECUTED a0005d64: e527e01c str lr, [r7, #-28]! <== NOT EXECUTED IMFS_Set_handlers( &the_link ); a0005d68: 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; a0005d6c: e58c3000 str r3, [ip] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); a0005d70: eb001c17 bl a000cdd4 <== 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) a0005d74: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED a0005d78: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED a0005d7c: e3520001 cmp r2, #1 <== NOT EXECUTED a0005d80: 1a000007 bne a0005da4 <== NOT EXECUTED { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); a0005d84: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED a0005d88: e1a00006 mov r0, r6 <== NOT EXECUTED a0005d8c: e1a0100d mov r1, sp <== NOT EXECUTED a0005d90: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED a0005d94: e12fff33 blx r3 <== NOT EXECUTED if ( result != 0 ) a0005d98: e3500000 cmp r0, #0 <== NOT EXECUTED a0005d9c: 0a000008 beq a0005dc4 <== NOT EXECUTED a0005da0: ea00000d b a0005ddc <== NOT EXECUTED return -1; } else { node->info.hard_link.link_node->st_nlink --; a0005da4: e2422001 sub r2, r2, #1 <== NOT EXECUTED a0005da8: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( node->info.hard_link.link_node ); a0005dac: e28d0014 add r0, sp, #20 <== NOT EXECUTED a0005db0: e3a01000 mov r1, #0 <== NOT EXECUTED a0005db4: eb000139 bl a00062a0 <== NOT EXECUTED a0005db8: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED a0005dbc: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED a0005dc0: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); a0005dc4: e5943008 ldr r3, [r4, #8] a0005dc8: e1a00006 mov r0, r6 a0005dcc: e1a01004 mov r1, r4 a0005dd0: e5933034 ldr r3, [r3, #52] ; 0x34 a0005dd4: e12fff33 blx r3 return result; a0005dd8: ea000000 b a0005de0 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; a0005ddc: e3e00000 mvn r0, #0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } a0005de0: e28dd01c add sp, sp, #28 a0005de4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0005de8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0005de8: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0005dec: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0005df0: e593204c ldr r2, [r3, #76] ; 0x4c a0005df4: e3520001 cmp r2, #1 a0005df8: 0a000002 beq a0005e08 rtems_set_errno_and_return_minus_one( ENOTDIR ); a0005dfc: eb00291e bl a001027c <__errno> <== NOT EXECUTED a0005e00: e3a03014 mov r3, #20 <== NOT EXECUTED a0005e04: ea000004 b a0005e1c <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) a0005e08: e593205c ldr r2, [r3, #92] ; 0x5c a0005e0c: e3520000 cmp r2, #0 a0005e10: 1a000004 bne a0005e28 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ a0005e14: eb002918 bl a001027c <__errno> <== NOT EXECUTED a0005e18: e3a03016 mov r3, #22 <== NOT EXECUTED a0005e1c: e5803000 str r3, [r0] <== NOT EXECUTED a0005e20: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005e24: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * 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; a0005e28: e3a00000 mov r0, #0 a0005e2c: e583005c str r0, [r3, #92] ; 0x5c return 0; } a0005e30: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0005e34 : int IMFS_utime( rtems_filesystem_location_info_t *pathloc, /* IN */ time_t actime, /* IN */ time_t modtime /* IN */ ) { a0005e34: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; a0005e38: e5904000 ldr r4, [r0] <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; the_jnode->stat_ctime = time( NULL ); a0005e3c: e3a00000 mov r0, #0 <== NOT EXECUTED { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; the_jnode->stat_atime = actime; a0005e40: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_jnode->stat_mtime = modtime; a0005e44: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED the_jnode->stat_ctime = time( NULL ); a0005e48: eb002d48 bl a0011370