=============================================================================== a000cee8 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { a000cee8: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a000ceec: e5903010 ldr r3, [r0, #16] switch( node->type ) { a000cef0: 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; a000cef4: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { a000cef8: e2422001 sub r2, r2, #1 a000cefc: e3520006 cmp r2, #6 a000cf00: 979ff102 ldrls pc, [pc, r2, lsl #2] a000cf04: ea000010 b a000cf4c <== NOT EXECUTED a000cf08: a000cf24 .word 0xa000cf24 <== NOT EXECUTED a000cf0c: a000cf2c .word 0xa000cf2c <== NOT EXECUTED a000cf10: a000cf34 .word 0xa000cf34 <== NOT EXECUTED a000cf14: a000cf34 .word 0xa000cf34 <== NOT EXECUTED a000cf18: a000cf3c .word 0xa000cf3c <== NOT EXECUTED a000cf1c: a000cf3c .word 0xa000cf3c <== NOT EXECUTED a000cf20: a000cf44 .word 0xa000cf44 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; a000cf24: e593300c ldr r3, [r3, #12] a000cf28: ea000006 b a000cf48 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; a000cf2c: e59f3020 ldr r3, [pc, #32] ; a000cf54 a000cf30: ea000004 b a000cf48 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; a000cf34: e59f301c ldr r3, [pc, #28] ; a000cf58 a000cf38: ea000002 b a000cf48 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; a000cf3c: e5933008 ldr r3, [r3, #8] a000cf40: ea000000 b a000cf48 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; a000cf44: e5933010 ldr r3, [r3, #16] a000cf48: e5803008 str r3, [r0, #8] break; } return 0; } a000cf4c: e3a00000 mov r0, #0 a000cf50: e12fff1e bx lr =============================================================================== a000cc84 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { a000cc84: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED a000cc88: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED a000cc8c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; a000cc90: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { a000cc94: e1a06821 lsr r6, r1, #16 <== NOT EXECUTED a000cc98: e1a07822 lsr r7, r2, #16 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a000cc9c: eb000399 bl a000db08 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) a000cca0: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED a000cca4: e3500000 cmp r0, #0 <== NOT EXECUTED a000cca8: 11550000 cmpne r5, r0 <== NOT EXECUTED a000ccac: 03a05000 moveq r5, #0 <== NOT EXECUTED a000ccb0: 13a05001 movne r5, #1 <== NOT EXECUTED a000ccb4: 0a000004 beq a000cccc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); a000ccb8: eb001108 bl a00110e0 <__errno> <== NOT EXECUTED a000ccbc: e3a03001 mov r3, #1 <== NOT EXECUTED a000ccc0: e5803000 str r3, [r0] <== NOT EXECUTED a000ccc4: e3e00000 mvn r0, #0 <== NOT EXECUTED a000ccc8: ea000007 b a000ccec <== NOT EXECUTED #endif jnode->st_uid = owner; a000cccc: e1c463bc strh r6, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; a000ccd0: e1c473be strh r7, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); a000ccd4: e1a0000d mov r0, sp <== NOT EXECUTED a000ccd8: e1a01005 mov r1, r5 <== NOT EXECUTED a000ccdc: ebffe56f bl a00062a0 <== NOT EXECUTED a000cce0: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; a000cce4: e1a00005 mov r0, r5 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); a000cce8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a000ccec: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a000d010 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a000d010: 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 ) ) { a000d014: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a000d018: e24dd040 sub sp, sp, #64 ; 0x40 a000d01c: e58d0000 str r0, [sp] a000d020: e1a06001 mov r6, r1 a000d024: e1a08002 mov r8, r2 a000d028: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000d02c: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; a000d030: 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 ); a000d034: 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 ) ) { a000d038: 0a000057 beq a000d19c rtems_set_errno_and_return_minus_one( EIO ); a000d03c: eb001027 bl a00110e0 <__errno> <== NOT EXECUTED a000d040: e3a03005 mov r3, #5 <== NOT EXECUTED a000d044: ea00007e b a000d244 <== 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 ); a000d048: e59d2000 ldr r2, [sp] a000d04c: e28d303c add r3, sp, #60 ; 0x3c a000d050: e1a01006 mov r1, r6 a000d054: e0820007 add r0, r2, r7 a000d058: e1a0200a mov r2, sl a000d05c: eb0001ae bl a000d71c pathnamelen -= len; i += len; if ( !pathloc->node_access ) a000d060: 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 ); a000d064: e1a09000 mov r9, r0 pathnamelen -= len; a000d068: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) a000d06c: e3530000 cmp r3, #0 a000d070: 0a000041 beq a000d17c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a000d074: e3500000 cmp r0, #0 a000d078: 0a000006 beq a000d098 if ( node->type == IMFS_DIRECTORY ) a000d07c: e595104c ldr r1, [r5, #76] ; 0x4c a000d080: e3510001 cmp r1, #1 a000d084: 1a000003 bne a000d098 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a000d088: e1a00004 mov r0, r4 a000d08c: ebffffb2 bl a000cf5c a000d090: e3500000 cmp r0, #0 a000d094: 0a000068 beq a000d23c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { a000d098: 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; a000d09c: e06b6006 rsb r6, fp, r6 i += len; a000d0a0: 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; a000d0a4: e5945000 ldr r5, [r4] switch( type ) { a000d0a8: 0a000014 beq a000d100 a000d0ac: e3590004 cmp r9, #4 a000d0b0: 0a000036 beq a000d190 a000d0b4: e3590002 cmp r9, #2 a000d0b8: 1a000037 bne a000d19c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a000d0bc: e59fc194 ldr ip, [pc, #404] ; a000d258 a000d0c0: e59c3000 ldr r3, [ip] a000d0c4: e5933018 ldr r3, [r3, #24] a000d0c8: e1550003 cmp r5, r3 a000d0cc: 0a000032 beq a000d19c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { a000d0d0: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == a000d0d4: e59e301c ldr r3, [lr, #28] a000d0d8: 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; a000d0dc: 028dc028 addeq ip, sp, #40 ; 0x28 a000d0e0: 028ee008 addeq lr, lr, #8 a000d0e4: 0a000037 beq a000d1c8 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) a000d0e8: e5955008 ldr r5, [r5, #8] a000d0ec: e3550000 cmp r5, #0 a000d0f0: 1a000024 bne a000d188 rtems_set_errno_and_return_minus_one( ENOENT ); a000d0f4: eb000ff9 bl a00110e0 <__errno> <== NOT EXECUTED a000d0f8: e5809000 str r9, [r0] <== NOT EXECUTED a000d0fc: ea000051 b a000d248 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a000d100: e595304c ldr r3, [r5, #76] ; 0x4c a000d104: e3530003 cmp r3, #3 a000d108: 1a000004 bne a000d120 IMFS_evaluate_hard_link( pathloc, 0 ); a000d10c: e1a00004 mov r0, r4 <== NOT EXECUTED a000d110: e3a01000 mov r1, #0 <== NOT EXECUTED a000d114: ebffffaa bl a000cfc4 <== NOT EXECUTED node = pathloc->node_access; a000d118: e5945000 ldr r5, [r4] <== NOT EXECUTED a000d11c: ea000008 b a000d144 <== 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 ) { a000d120: e3530004 cmp r3, #4 a000d124: 1a000006 bne a000d144 result = IMFS_evaluate_sym_link( pathloc, 0 ); a000d128: e1a00004 mov r0, r4 <== NOT EXECUTED a000d12c: e3a01000 mov r1, #0 <== NOT EXECUTED a000d130: eb000049 bl a000d25c <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) a000d134: 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 ); a000d138: 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; a000d13c: e5945000 ldr r5, [r4] <== NOT EXECUTED if ( result == -1 ) a000d140: 0a000041 beq a000d24c <== NOT EXECUTED } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a000d144: e595304c ldr r3, [r5, #76] ; 0x4c a000d148: e3530001 cmp r3, #1 a000d14c: 0a000002 beq a000d15c rtems_set_errno_and_return_minus_one( ENOTDIR ); a000d150: eb000fe2 bl a00110e0 <__errno> <== NOT EXECUTED a000d154: e3a03014 mov r3, #20 <== NOT EXECUTED a000d158: ea000039 b a000d244 <== 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 ) { a000d15c: e595e05c ldr lr, [r5, #92] ; 0x5c a000d160: e35e0000 cmp lr, #0 a000d164: 1a000015 bne a000d1c0 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a000d168: e1a00005 mov r0, r5 a000d16c: e1a0100a mov r1, sl a000d170: eb000149 bl a000d69c if ( !node ) a000d174: e2505000 subs r5, r0, #0 a000d178: 1a000002 bne a000d188 rtems_set_errno_and_return_minus_one( ENOENT ); a000d17c: eb000fd7 bl a00110e0 <__errno> a000d180: e3a03002 mov r3, #2 a000d184: ea00002e b a000d244 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a000d188: e5845000 str r5, [r4] a000d18c: ea000002 b a000d19c case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a000d190: eb000fd2 bl a00110e0 <__errno> <== NOT EXECUTED a000d194: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000d198: ea000029 b a000d244 <== NOT EXECUTED /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { a000d19c: e3590004 cmp r9, #4 a000d1a0: 13590000 cmpne r9, #0 a000d1a4: 1affffa7 bne a000d048 * 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 ) { a000d1a8: e595304c ldr r3, [r5, #76] ; 0x4c a000d1ac: e3530001 cmp r3, #1 a000d1b0: 1a000019 bne a000d21c if ( node->info.directory.mt_fs != NULL ) { a000d1b4: e595e05c ldr lr, [r5, #92] ; 0x5c a000d1b8: e35e0000 cmp lr, #0 a000d1bc: 0a000016 beq a000d21c newloc = node->info.directory.mt_fs->mt_fs_root; a000d1c0: e28dc028 add ip, sp, #40 ; 0x28 a000d1c4: e28ee01c add lr, lr, #28 a000d1c8: e8be000f ldm lr!, {r0, r1, r2, r3} a000d1cc: e8ac000f stmia ip!, {r0, r1, r2, r3} a000d1d0: e59ee000 ldr lr, [lr] a000d1d4: e58ce000 str lr, [ip] *pathloc = newloc; a000d1d8: e28dc028 add ip, sp, #40 ; 0x28 a000d1dc: e8bc000f ldm ip!, {r0, r1, r2, r3} a000d1e0: e1a0c004 mov ip, r4 a000d1e4: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000d1e8: 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; a000d1ec: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000d1f0: e594300c ldr r3, [r4, #12] a000d1f4: e59d2000 ldr r2, [sp] a000d1f8: e0610007 rsb r0, r1, r7 a000d1fc: e593c000 ldr ip, [r3] a000d200: e0820000 add r0, r2, r0 a000d204: e0861001 add r1, r6, r1 a000d208: e1a02008 mov r2, r8 a000d20c: e1a03004 mov r3, r4 a000d210: e12fff3c blx ip a000d214: e1a0b000 mov fp, r0 a000d218: ea00000b b a000d24c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a000d21c: e1a00004 mov r0, r4 a000d220: ebffff30 bl a000cee8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a000d224: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a000d228: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a000d22c: e1a00004 mov r0, r4 a000d230: ebffff49 bl a000cf5c a000d234: e3500000 cmp r0, #0 a000d238: 1a000003 bne a000d24c rtems_set_errno_and_return_minus_one( EACCES ); a000d23c: eb000fa7 bl a00110e0 <__errno> <== NOT EXECUTED a000d240: e3a0300d mov r3, #13 <== NOT EXECUTED a000d244: e5803000 str r3, [r0] a000d248: e3e0b000 mvn fp, #0 return result; } a000d24c: e1a0000b mov r0, fp a000d250: e28dd040 add sp, sp, #64 ; 0x40 a000d254: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000d398 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a000d398: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000d39c: e24dd03c sub sp, sp, #60 ; 0x3c a000d3a0: e1a07000 mov r7, r0 a000d3a4: e1a04001 mov r4, r1 a000d3a8: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000d3ac: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); a000d3b0: eb001334 bl a0012088 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; a000d3b4: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a000d3b8: 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 ); a000d3bc: e1a01008 mov r1, r8 a000d3c0: e28d3038 add r3, sp, #56 ; 0x38 a000d3c4: e0870005 add r0, r7, r5 a000d3c8: e1a0200d mov r2, sp a000d3cc: eb0000d2 bl a000d71c pathlen -= len; i += len; if ( !pathloc->node_access ) a000d3d0: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a000d3d4: 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 ); a000d3d8: e1a09000 mov r9, r0 pathlen -= len; i += len; if ( !pathloc->node_access ) a000d3dc: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a000d3e0: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) a000d3e4: 0a000060 beq a000d56c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a000d3e8: e3500000 cmp r0, #0 a000d3ec: 0a000006 beq a000d40c if ( node->type == IMFS_DIRECTORY ) a000d3f0: e596104c ldr r1, [r6, #76] ; 0x4c a000d3f4: e3510001 cmp r1, #1 a000d3f8: 1a000003 bne a000d40c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a000d3fc: e1a00004 mov r0, r4 a000d400: ebfffed5 bl a000cf5c a000d404: e3500000 cmp r0, #0 a000d408: 0a00006c beq a000d5c0 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a000d40c: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a000d410: 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; a000d414: e1a06003 mov r6, r3 switch( type ) { a000d418: e3590004 cmp r9, #4 a000d41c: 979ff109 ldrls pc, [pc, r9, lsl #2] a000d420: eaffffe5 b a000d3bc <== NOT EXECUTED a000d424: a000d530 .word 0xa000d530 <== NOT EXECUTED a000d428: a000d3bc .word 0xa000d3bc <== NOT EXECUTED a000d42c: a000d438 .word 0xa000d438 <== NOT EXECUTED a000d430: a000d474 .word 0xa000d474 <== NOT EXECUTED a000d434: a000d53c .word 0xa000d53c <== 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 ) a000d438: e59f119c ldr r1, [pc, #412] ; a000d5dc a000d43c: e5912000 ldr r2, [r1] a000d440: e5922018 ldr r2, [r2, #24] a000d444: e1530002 cmp r3, r2 a000d448: 0affffdb beq a000d3bc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a000d44c: e594e010 ldr lr, [r4, #16] a000d450: e59e201c ldr r2, [lr, #28] a000d454: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; a000d458: 028dc024 addeq ip, sp, #36 ; 0x24 a000d45c: 028ee008 addeq lr, lr, #8 a000d460: 0a000019 beq a000d4cc *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) a000d464: e5936008 ldr r6, [r3, #8] a000d468: e3560000 cmp r6, #0 a000d46c: 1a00002d bne a000d528 a000d470: ea00003d b a000d56c <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { a000d474: e593304c ldr r3, [r3, #76] ; 0x4c a000d478: e3530003 cmp r3, #3 a000d47c: 0a000001 beq a000d488 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a000d480: e3530004 cmp r3, #4 a000d484: 1a000005 bne a000d4a0 result = IMFS_evaluate_link( pathloc, 0 ); a000d488: e1a00004 mov r0, r4 <== NOT EXECUTED a000d48c: e3a01000 mov r1, #0 <== NOT EXECUTED a000d490: ebffff93 bl a000d2e4 <== NOT EXECUTED if ( result == -1 ) a000d494: e3700001 cmn r0, #1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a000d498: e1a06000 mov r6, r0 <== NOT EXECUTED if ( result == -1 ) a000d49c: 0a00004b beq a000d5d0 <== NOT EXECUTED return -1; } node = pathloc->node_access; a000d4a0: e5940000 ldr r0, [r4] if ( !node ) a000d4a4: e3500000 cmp r0, #0 a000d4a8: 0a00003c beq a000d5a0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a000d4ac: e590304c ldr r3, [r0, #76] ; 0x4c a000d4b0: e3530001 cmp r3, #1 a000d4b4: 1a000039 bne a000d5a0 /* * 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 ) { a000d4b8: e590e05c ldr lr, [r0, #92] ; 0x5c a000d4bc: e35e0000 cmp lr, #0 a000d4c0: 0a000014 beq a000d518 newloc = node->info.directory.mt_fs->mt_fs_root; a000d4c4: e28dc024 add ip, sp, #36 ; 0x24 a000d4c8: e28ee01c add lr, lr, #28 a000d4cc: e8be000f ldm lr!, {r0, r1, r2, r3} a000d4d0: e8ac000f stmia ip!, {r0, r1, r2, r3} a000d4d4: e59ee000 ldr lr, [lr] a000d4d8: e58ce000 str lr, [ip] *pathloc = newloc; a000d4dc: e28dc024 add ip, sp, #36 ; 0x24 a000d4e0: e8bc000f ldm ip!, {r0, r1, r2, r3} a000d4e4: e1a0c004 mov ip, r4 a000d4e8: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a000d4ec: 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; a000d4f0: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a000d4f4: e594300c ldr r3, [r4, #12] a000d4f8: e0625005 rsb r5, r2, r5 a000d4fc: e0870005 add r0, r7, r5 a000d500: e5933004 ldr r3, [r3, #4] a000d504: e1a01004 mov r1, r4 a000d508: e1a0200a mov r2, sl a000d50c: e12fff33 blx r3 a000d510: e1a06000 mov r6, r0 a000d514: ea00002d b a000d5d0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a000d518: e1a0100d mov r1, sp a000d51c: eb00005e bl a000d69c /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a000d520: e2506000 subs r6, r0, #0 a000d524: 0a000007 beq a000d548 done = true; else pathloc->node_access = node; a000d528: e5846000 str r6, [r4] a000d52c: eaffffa2 b a000d3bc break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a000d530: eb000eea bl a00110e0 <__errno> a000d534: e3a03011 mov r3, #17 a000d538: ea000022 b a000d5c8 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a000d53c: eb000ee7 bl a00110e0 <__errno> <== NOT EXECUTED a000d540: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000d544: ea00001f b a000d5c8 <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a000d548: e59d3038 ldr r3, [sp, #56] ; 0x38 a000d54c: e0633005 rsb r3, r3, r5 a000d550: e0873003 add r3, r7, r3 a000d554: 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( a000d558: 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++) { a000d55c: ea000005 b a000d578 if ( !IMFS_is_separator( path[ i ] ) ) a000d560: ebffe6a7 bl a0007004 <== NOT EXECUTED a000d564: e3500000 cmp r0, #0 <== NOT EXECUTED a000d568: 1a000002 bne a000d578 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); a000d56c: eb000edb bl a00110e0 <__errno> <== NOT EXECUTED a000d570: e3a03002 mov r3, #2 <== NOT EXECUTED a000d574: ea000013 b a000d5c8 <== 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++) { a000d578: e4d50001 ldrb r0, [r5], #1 a000d57c: e3500000 cmp r0, #0 a000d580: 1afffff6 bne a000d560 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a000d584: e1a00004 mov r0, r4 a000d588: ebfffe56 bl a000cee8 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a000d58c: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a000d590: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a000d594: e593304c ldr r3, [r3, #76] ; 0x4c a000d598: e3530001 cmp r3, #1 a000d59c: 0a000002 beq a000d5ac rtems_set_errno_and_return_minus_one( ENOTDIR ); a000d5a0: eb000ece bl a00110e0 <__errno> <== NOT EXECUTED a000d5a4: e3a03014 mov r3, #20 <== NOT EXECUTED a000d5a8: ea000006 b a000d5c8 <== NOT EXECUTED /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a000d5ac: e1a00004 mov r0, r4 a000d5b0: e3a01003 mov r1, #3 a000d5b4: ebfffe68 bl a000cf5c a000d5b8: e3500000 cmp r0, #0 a000d5bc: 1a000003 bne a000d5d0 rtems_set_errno_and_return_minus_one( EACCES ); a000d5c0: eb000ec6 bl a00110e0 <__errno> a000d5c4: e3a0300d mov r3, #13 a000d5c8: e5803000 str r3, [r0] a000d5cc: e3e06000 mvn r6, #0 return result; } a000d5d0: e1a00006 mov r0, r6 a000d5d4: e28dd03c add sp, sp, #60 ; 0x3c a000d5d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000cfc4 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000cfc4: 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; a000cfc8: e5903000 ldr r3, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000cfcc: e1a04000 mov r4, r0 a000cfd0: 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; a000cfd4: e5933050 ldr r3, [r3, #80] ; 0x50 a000cfd8: e5803000 str r3, [r0] IMFS_Set_handlers( node ); a000cfdc: ebffffc1 bl a000cee8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a000cfe0: e1a00004 mov r0, r4 a000cfe4: e1a01005 mov r1, r5 a000cfe8: ebffffdb bl a000cf5c a000cfec: e3500000 cmp r0, #0 a000cff0: 1a000004 bne a000d008 rtems_set_errno_and_return_minus_one( EACCES ); a000cff4: eb001039 bl a00110e0 <__errno> <== NOT EXECUTED a000cff8: e3a0300d mov r3, #13 <== NOT EXECUTED a000cffc: e5803000 str r3, [r0] <== NOT EXECUTED a000d000: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d004: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return result; a000d008: e3a00000 mov r0, #0 } a000d00c: e8bd8030 pop {r4, r5, pc} =============================================================================== a000d2e4 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d2e4: e92d40f0 push {r4, r5, r6, r7, lr} /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d2e8: e59f70a4 ldr r7, [pc, #164] ; a000d394 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d2ec: e1a04000 mov r4, r0 a000d2f0: e1a05001 mov r5, r1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d2f4: e5973000 ldr r3, [r7] { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; a000d2f8: e5946000 ldr r6, [r4] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d2fc: e1d323b0 ldrh r2, [r3, #48] ; 0x30 a000d300: e2822001 add r2, r2, #1 a000d304: e1a02802 lsl r2, r2, #16 a000d308: e1a02822 lsr r2, r2, #16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { a000d30c: e3520005 cmp r2, #5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000d310: e1c323b0 strh r2, [r3, #48] ; 0x30 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { a000d314: 9a000006 bls a000d334 rtems_filesystem_link_counts = 0; a000d318: e3a02000 mov r2, #0 <== NOT EXECUTED a000d31c: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); a000d320: eb000f6e bl a00110e0 <__errno> <== NOT EXECUTED a000d324: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED a000d328: e5803000 str r3, [r0] <== NOT EXECUTED a000d32c: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d330: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) a000d334: e596304c ldr r3, [r6, #76] ; 0x4c a000d338: e3530003 cmp r3, #3 a000d33c: 1a000003 bne a000d350 result = IMFS_evaluate_hard_link( node, flags ); a000d340: e1a00004 mov r0, r4 a000d344: e1a01005 mov r1, r5 a000d348: ebffff1d bl a000cfc4 a000d34c: ea000004 b a000d364 else if (jnode->type == IMFS_SYM_LINK ) a000d350: e3530004 cmp r3, #4 a000d354: 1a000004 bne a000d36c result = IMFS_evaluate_sym_link( node, flags ); a000d358: e1a00004 mov r0, r4 a000d35c: e1a01005 mov r1, r5 a000d360: ebffffbd bl a000d25c } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); a000d364: e3500000 cmp r0, #0 a000d368: 1a000004 bne a000d380 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 ) || a000d36c: e596304c ldr r3, [r6, #76] ; 0x4c a000d370: e2433003 sub r3, r3, #3 a000d374: e3530001 cmp r3, #1 a000d378: 9affffdd bls a000d2f4 a000d37c: e3a00000 mov r0, #0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; a000d380: e59f300c ldr r3, [pc, #12] ; a000d394 a000d384: e3a02000 mov r2, #0 a000d388: e5933000 ldr r3, [r3] a000d38c: e1c323b0 strh r2, [r3, #48] ; 0x30 return result; } a000d390: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000cf5c : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a000cf5c: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { a000cf60: e92d4070 push {r4, r5, r6, lr} a000cf64: e1a04001 mov r4, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a000cf68: 0a000004 beq a000cf80 rtems_set_errno_and_return_minus_one( EPERM ); a000cf6c: eb00105b bl a00110e0 <__errno> <== NOT EXECUTED a000cf70: e3a03001 mov r3, #1 <== NOT EXECUTED a000cf74: e5803000 str r3, [r0] <== NOT EXECUTED a000cf78: e3e00000 mvn r0, #0 <== NOT EXECUTED a000cf7c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED jnode = node->node_access; a000cf80: e5905000 ldr r5, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a000cf84: eb0002df bl a000db08 a000cf88: e1a06000 mov r6, r0 st_gid = getegid(); a000cf8c: eb0002d8 bl a000daf4 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) a000cf90: e1d533bc ldrh r3, [r5, #60] ; 0x3c a000cf94: e1530006 cmp r3, r6 flags_to_test <<= 6; a000cf98: 01a04304 lsleq r4, r4, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) a000cf9c: 0a000002 beq a000cfac flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) a000cfa0: e1d533be ldrh r3, [r5, #62] ; 0x3e <== NOT EXECUTED a000cfa4: e1530000 cmp r3, r0 <== NOT EXECUTED flags_to_test <<= 3; a000cfa8: 01a04184 lsleq r4, r4, #3 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) a000cfac: e5950030 ldr r0, [r5, #48] ; 0x30 a000cfb0: e0040000 and r0, r4, 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 ); a000cfb4: e1500004 cmp r0, r4 a000cfb8: 13a00000 movne r0, #0 a000cfbc: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } a000cfc0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000d25c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d25c: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; a000d260: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d264: e1a04000 mov r4, r0 a000d268: 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; a000d26c: e5963008 ldr r3, [r6, #8] rtems_filesystem_get_sym_start_loc( a000d270: e1a0100d mov r1, sp a000d274: 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; a000d278: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( a000d27c: e5960050 ldr r0, [r6, #80] ; 0x50 a000d280: eb00034d bl a000dfbc ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( a000d284: e59d3000 ldr r3, [sp] a000d288: e5966050 ldr r6, [r6, #80] ; 0x50 a000d28c: e0866003 add r6, r6, r3 a000d290: e1a00006 mov r0, r6 a000d294: eb00137b bl a0012088 a000d298: e1a02005 mov r2, r5 a000d29c: e1a01000 mov r1, r0 a000d2a0: e1a03004 mov r3, r4 a000d2a4: e1a00006 mov r0, r6 a000d2a8: ebffff58 bl a000d010 a000d2ac: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); a000d2b0: e1a00004 mov r0, r4 a000d2b4: ebffff0b bl a000cee8 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a000d2b8: e1a00004 mov r0, r4 a000d2bc: e1a01005 mov r1, r5 a000d2c0: ebffff25 bl a000cf5c a000d2c4: e3500000 cmp r0, #0 a000d2c8: 1a000003 bne a000d2dc rtems_set_errno_and_return_minus_one( EACCES ); a000d2cc: eb000f83 bl a00110e0 <__errno> <== NOT EXECUTED a000d2d0: e3a0300d mov r3, #13 <== NOT EXECUTED a000d2d4: e5803000 str r3, [r0] <== NOT EXECUTED a000d2d8: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } a000d2dc: e1a00006 mov r0, r6 a000d2e0: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== a0010748 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { a0010748: e92d4073 push {r0, r1, r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; a001074c: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { a0010750: e1a06001 mov r6, r1 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a0010754: ebfff4eb bl a000db08 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) a0010758: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED a001075c: e3500000 cmp r0, #0 <== NOT EXECUTED a0010760: 11550000 cmpne r5, r0 <== NOT EXECUTED a0010764: 03a05000 moveq r5, #0 <== NOT EXECUTED a0010768: 13a05001 movne r5, #1 <== NOT EXECUTED a001076c: 0a000004 beq a0010784 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); a0010770: eb00025a bl a00110e0 <__errno> <== NOT EXECUTED a0010774: e3a03001 mov r3, #1 <== NOT EXECUTED a0010778: e5803000 str r3, [r0] <== NOT EXECUTED a001077c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0010780: ea00000b b a00107b4 <== 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); a0010784: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a0010788: e1a06a06 lsl r6, r6, #20 <== NOT EXECUTED IMFS_update_ctime( jnode ); a001078c: 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); a0010790: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED a0010794: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a0010798: e1833a26 orr r3, r3, r6, lsr #20 <== NOT EXECUTED a001079c: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); a00107a0: e1a01005 mov r1, r5 <== NOT EXECUTED a00107a4: ebffd6bd bl a00062a0 <== NOT EXECUTED a00107a8: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; a00107ac: e1a00005 mov r0, r5 <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); a00107b0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a00107b4: e8bd807c pop {r2, r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a00107b8 : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } a00107b8: e3a00000 mov r0, #0 <== NOT EXECUTED a00107bc: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0006d60 : void *buffer ) { int err; if (command == FIONBIO) { a0006d60: e59fc06c ldr ip, [pc, #108] ; a0006dd4 int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a0006d64: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { a0006d68: e151000c cmp r1, ip int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a0006d6c: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { a0006d70: 1a00000a bne a0006da0 if (buffer == NULL) a0006d74: e3520000 cmp r2, #0 a0006d78: 0a00000e beq a0006db8 err = -EFAULT; else { if (*(int *)buffer) a0006d7c: e5924000 ldr r4, [r2] a0006d80: e5932014 ldr r2, [r3, #20] a0006d84: e3540000 cmp r4, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006d88: 13822001 orrne r2, r2, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0006d8c: 03c22001 biceq r2, r2, #1 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006d90: 15832014 strne r2, [r3, #20] else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; a0006d94: 13a04000 movne r4, #0 err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0006d98: 05832014 streq r2, [r3, #20] a0006d9c: ea00000a b a0006dcc return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); a0006da0: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED a0006da4: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED a0006da8: eb0024cd bl a00100e4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a0006dac: e2504000 subs r4, r0, #0 <== NOT EXECUTED a0006db0: aa000005 bge a0006dcc <== NOT EXECUTED a0006db4: ea000000 b a0006dbc <== NOT EXECUTED { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; a0006db8: e3e0400d mvn r4, #13 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); a0006dbc: eb003149 bl a00132e8 <__errno> a0006dc0: e2644000 rsb r4, r4, #0 a0006dc4: e5804000 str r4, [r0] a0006dc8: e3e04000 mvn r4, #0 } a0006dcc: e1a00004 mov r0, r4 a0006dd0: e8bd8010 pop {r4, pc} =============================================================================== a0006eb8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a0006eb8: e1a01000 mov r1, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); a0006ebc: e5900018 ldr r0, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a0006ec0: e92d4010 push {r4, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); a0006ec4: e2800050 add r0, r0, #80 ; 0x50 a0006ec8: eb0022b9 bl a000f9b4 IMFS_FIFO_RETURN(err); a0006ecc: e2504000 subs r4, r0, #0 a0006ed0: aa000003 bge a0006ee4 a0006ed4: eb003103 bl a00132e8 <__errno> <== NOT EXECUTED a0006ed8: e2644000 rsb r4, r4, #0 <== NOT EXECUTED a0006edc: e5804000 str r4, [r0] <== NOT EXECUTED a0006ee0: e3e04000 mvn r4, #0 <== NOT EXECUTED } a0006ee4: e1a00004 mov r0, r4 a0006ee8: e8bd8010 pop {r4, pc} =============================================================================== a0006e30 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a0006e30: e92d4033 push {r0, r1, r4, r5, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; a0006e34: e5904018 ldr r4, [r0, #24] ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a0006e38: e1a03000 mov r3, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); a0006e3c: e5940050 ldr r0, [r4, #80] ; 0x50 a0006e40: eb0023da bl a000fdb0 if (err > 0) a0006e44: e2505000 subs r5, r0, #0 a0006e48: da000005 ble a0006e64 IMFS_update_atime(jnode); a0006e4c: e1a0000d mov r0, sp <== NOT EXECUTED a0006e50: e3a01000 mov r1, #0 <== NOT EXECUTED a0006e54: eb0003e0 bl a0007ddc <== NOT EXECUTED a0006e58: e59d3000 ldr r3, [sp] <== NOT EXECUTED a0006e5c: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED a0006e60: ea000005 b a0006e7c <== NOT EXECUTED IMFS_FIFO_RETURN(err); a0006e64: 0a000004 beq a0006e7c a0006e68: eb00311e bl a00132e8 <__errno> <== NOT EXECUTED a0006e6c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a0006e70: e5805000 str r5, [r0] <== NOT EXECUTED a0006e74: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006e78: ea000000 b a0006e80 <== NOT EXECUTED a0006e7c: e1a00005 mov r0, r5 } a0006e80: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== a0006dd8 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a0006dd8: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; a0006ddc: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a0006de0: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); a0006de4: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED a0006de8: eb002450 bl a000ff30 <== NOT EXECUTED if (err > 0) { a0006dec: e2505000 subs r5, r0, #0 <== NOT EXECUTED a0006df0: da000006 ble a0006e10 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); a0006df4: e1a0000d mov r0, sp <== NOT EXECUTED a0006df8: e3a01000 mov r1, #0 <== NOT EXECUTED a0006dfc: eb0003f6 bl a0007ddc <== NOT EXECUTED a0006e00: e59d3000 ldr r3, [sp] <== NOT EXECUTED a0006e04: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED a0006e08: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED a0006e0c: ea000005 b a0006e28 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); a0006e10: 0a000004 beq a0006e28 <== NOT EXECUTED a0006e14: eb003133 bl a00132e8 <__errno> <== NOT EXECUTED a0006e18: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a0006e1c: e5805000 str r5, [r0] <== NOT EXECUTED a0006e20: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006e24: ea000000 b a0006e2c <== NOT EXECUTED a0006e28: e1a00005 mov r0, r5 <== NOT EXECUTED } a0006e2c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== a000d5e0 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000d5e0: 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; a000d5e4: e1a0c000 mov ip, r0 a000d5e8: 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 ) { a000d5ec: 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; a000d5f0: 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 ) { a000d5f4: 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; a000d5f8: e8bc000f ldm ip!, {r0, r1, r2, r3} a000d5fc: e8ae000f stmia lr!, {r0, r1, r2, r3} a000d600: e59c3000 ldr r3, [ip] a000d604: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a000d608: e3a03000 mov r3, #0 a000d60c: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a000d610: e1a0500d mov r5, sp a000d614: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a000d618: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; a000d61c: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); a000d620: ebfffe30 bl a000cee8 if ( jnode->type != IMFS_DIRECTORY ) { a000d624: e594304c ldr r3, [r4, #76] ; 0x4c a000d628: e3530001 cmp r3, #1 a000d62c: 1a000003 bne a000d640 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { a000d630: 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 ); a000d634: e2843054 add r3, r4, #84 ; 0x54 a000d638: e1520003 cmp r2, r3 a000d63c: 1a000005 bne a000d658 result = IMFS_unlink( NULL, &loc ); a000d640: e3a00000 mov r0, #0 a000d644: e1a0100d mov r1, sp a000d648: ebffe1b0 bl a0005d10 if (result != 0) a000d64c: e3500000 cmp r0, #0 a000d650: 1a00000c bne a000d688 return -1; jnode = next; a000d654: e1a04006 mov r4, r6 } if ( jnode != NULL ) { a000d658: e3540000 cmp r4, #0 a000d65c: 0a00000b beq a000d690 if ( jnode->type == IMFS_DIRECTORY ) { a000d660: e594304c ldr r3, [r4, #76] ; 0x4c a000d664: e3530001 cmp r3, #1 a000d668: 1affffe9 bne a000d614 } } } while (jnode != NULL); return 0; } a000d66c: e5943050 ldr r3, [r4, #80] ; 0x50 a000d670: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) a000d674: e1530002 cmp r3, r2 a000d678: 0affffe5 beq a000d614 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a000d67c: e2534000 subs r4, r3, #0 a000d680: 1affffe3 bne a000d614 a000d684: ea000001 b a000d690 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; a000d688: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d68c: ea000000 b a000d694 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; a000d690: e1a00004 mov r0, r4 } a000d694: e28dd014 add sp, sp, #20 a000d698: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000d71c : const char *path, int pathlen, char *token, int *token_len ) { a000d71c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a000d720: e1a05001 mov r5, r1 a000d724: e1a04002 mov r4, r2 a000d728: e1a0a003 mov sl, r3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; a000d72c: e5d07000 ldrb r7, [r0] a000d730: e1a08000 mov r8, r0 int pathlen, char *token, int *token_len ) { register int i = 0; a000d734: 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) ) { a000d738: ea000004 b a000d750 token[i] = c; if ( i == IMFS_NAME_MAX ) a000d73c: 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; a000d740: e7c47006 strb r7, [r4, r6] if ( i == IMFS_NAME_MAX ) a000d744: 0a000025 beq a000d7e0 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; a000d748: e5f87001 ldrb r7, [r8, #1]! a000d74c: 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) ) { a000d750: e1a00007 mov r0, r7 a000d754: ebffe62a bl a0007004 a000d758: e3500000 cmp r0, #0 a000d75c: 1a000001 bne a000d768 a000d760: e1560005 cmp r6, r5 a000d764: bafffff4 blt a000d73c /* * Copy a seperator into token. */ if ( i == 0 ) { a000d768: e3560000 cmp r6, #0 a000d76c: 1a000005 bne a000d788 token[i] = c; if ( (token[i] != '\0') && pathlen ) { a000d770: e3570000 cmp r7, #0 a000d774: 13550000 cmpne r5, #0 i++; type = IMFS_CURRENT_DIR; a000d778: 13a06001 movne r6, #1 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; a000d77c: e5c47000 strb r7, [r4] if ( (token[i] != '\0') && pathlen ) { i++; a000d780: e1a00006 mov r0, r6 a000d784: ea000005 b a000d7a0 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { a000d788: e0843006 add r3, r4, r6 a000d78c: e5533001 ldrb r3, [r3, #-1] char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; a000d790: e3a00003 mov r0, #3 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { a000d794: e3530000 cmp r3, #0 token[i] = '\0'; a000d798: 13a03000 movne r3, #0 a000d79c: 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 ) { a000d7a0: e3500003 cmp r0, #3 /* * Set token_len to the number of characters copied. */ *token_len = i; a000d7a4: e58a6000 str r6, [sl] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { a000d7a8: 1a00000e bne a000d7e8 if ( strcmp( token, "..") == 0 ) a000d7ac: e1a00004 mov r0, r4 a000d7b0: e59f1034 ldr r1, [pc, #52] ; a000d7ec a000d7b4: eb001157 bl a0011d18 a000d7b8: e3500000 cmp r0, #0 type = IMFS_UP_DIR; a000d7bc: 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 ) a000d7c0: 0a000008 beq a000d7e8 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) a000d7c4: e1a00004 mov r0, r4 a000d7c8: e59f1020 ldr r1, [pc, #32] ; a000d7f0 a000d7cc: eb001151 bl a0011d18 type = IMFS_CURRENT_DIR; a000d7d0: e3500000 cmp r0, #0 a000d7d4: 13a00003 movne r0, #3 a000d7d8: 03a00001 moveq r0, #1 a000d7dc: 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; a000d7e0: e3a00004 mov r0, #4 <== NOT EXECUTED a000d7e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } a000d7e8: 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: eb001d41 bl a000cea8 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: eb002dbb bl a00110e0 <__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: eb002d9d bl a00110e0 <__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: eb003183 bl a0012088 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: eb001f22 bl a000d71c 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: eb001cae bl a000cd68 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: eb002d89 bl a00110e0 <__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} =============================================================================== a000fbfc : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { a000fbfc: 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 ); a000fc00: e3a02001 mov r2, #1 a000fc04: ebffff00 bl a000f80c if ( *block_entry_ptr ) a000fc08: 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 ); a000fc0c: e1a05000 mov r5, r0 if ( *block_entry_ptr ) a000fc10: e3540000 cmp r4, #0 a000fc14: 1a000005 bne a000fc30 return 0; /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); a000fc18: ebfffeee bl a000f7d8 if ( !memory ) a000fc1c: e3500000 cmp r0, #0 a000fc20: 0a000004 beq a000fc38 return 1; *block_entry_ptr = memory; a000fc24: e5850000 str r0, [r5] return 0; a000fc28: e1a00004 mov r0, r4 a000fc2c: 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; a000fc30: e3a00000 mov r0, #0 a000fc34: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; a000fc38: e3a00001 mov r0, #1 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } a000fc3c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000fdf0 : IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a000fdf0: e59f3110 ldr r3, [pc, #272] ; a000ff08 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000fdf4: 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 ) a000fdf8: e593b000 ldr fp, [r3] */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000fdfc: e1a05002 mov r5, r2 a000fe00: 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 ) a000fe04: e1a0312b lsr r3, fp, #2 a000fe08: e2832001 add r2, r3, #1 a000fe0c: e0020293 mul r2, r3, r2 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000fe10: 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 ) a000fe14: e2822001 add r2, r2, #1 a000fe18: e0030392 mul r3, r2, r3 a000fe1c: e3a02000 mov r2, #0 a000fe20: e2433001 sub r3, r3, #1 a000fe24: e1520005 cmp r2, r5 a000fe28: e003039b mul r3, fp, r3 a000fe2c: ca000005 bgt a000fe48 a000fe30: 1a000001 bne a000fe3c a000fe34: e1530001 cmp r3, r1 a000fe38: 8a000002 bhi a000fe48 rtems_set_errno_and_return_minus_one( EINVAL ); a000fe3c: eb0004a7 bl a00110e0 <__errno> a000fe40: e3a03016 mov r3, #22 a000fe44: ea000025 b a000fee0 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) a000fe48: e5948054 ldr r8, [r4, #84] ; 0x54 a000fe4c: e5947050 ldr r7, [r4, #80] ; 0x50 a000fe50: e1550008 cmp r5, r8 a000fe54: ca000002 bgt a000fe64 a000fe58: 1a000028 bne a000ff00 a000fe5c: e1560007 cmp r6, r7 a000fe60: 9a000026 bls a000ff00 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a000fe64: e1a0cfcb asr ip, fp, #31 a000fe68: e1a0300c mov r3, ip a000fe6c: e1a0200b mov r2, fp a000fe70: e1a00006 mov r0, r6 a000fe74: e1a01005 mov r1, r5 a000fe78: e58dc000 str ip, [sp] a000fe7c: eb001326 bl a0014b1c <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a000fe80: e59dc000 ldr ip, [sp] a000fe84: e1a01008 mov r1, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a000fe88: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a000fe8c: e1a0200b mov r2, fp a000fe90: e1a00007 mov r0, r7 a000fe94: e1a0300c mov r3, ip a000fe98: eb00131f bl a0014b1c <__divdi3> a000fe9c: e1a08000 mov r8, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a000fea0: e1a07000 mov r7, r0 a000fea4: ea000011 b a000fef0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { a000fea8: e1a00004 mov r0, r4 a000feac: e1a01007 mov r1, r7 a000feb0: ebffff51 bl a000fbfc a000feb4: e3500000 cmp r0, #0 a000feb8: 0a00000b beq a000feec a000febc: ea000003 b a000fed0 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); a000fec0: e1a01007 mov r1, r7 <== NOT EXECUTED a000fec4: e1a00004 mov r0, r4 <== NOT EXECUTED a000fec8: ebffffbe bl a000fdc8 <== 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-- ) { a000fecc: e2477001 sub r7, r7, #1 <== NOT EXECUTED a000fed0: e1570008 cmp r7, r8 <== NOT EXECUTED a000fed4: 2afffff9 bcs a000fec0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); a000fed8: eb000480 bl a00110e0 <__errno> <== NOT EXECUTED a000fedc: e3a0301c mov r3, #28 <== NOT EXECUTED a000fee0: e5803000 str r3, [r0] a000fee4: e3e00000 mvn r0, #0 a000fee8: ea000005 b a000ff04 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++ ) { a000feec: e2877001 add r7, r7, #1 a000fef0: e157000a cmp r7, sl a000fef4: 9affffeb bls a000fea8 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a000fef8: e5846050 str r6, [r4, #80] ; 0x50 a000fefc: 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; a000ff00: e3a00000 mov r0, #0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } a000ff04: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== a000f80c : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000f80c: e59f31e4 ldr r3, [pc, #484] ; a000f9f8 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000f810: 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 ) { a000f814: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000f818: e1a04000 mov r4, r0 a000f81c: e1a06001 mov r6, r1 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000f820: e1a05125 lsr r5, r5, #2 a000f824: e2453001 sub r3, r5, #1 a000f828: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000f82c: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000f830: 8a00000e bhi a000f870 p = info->indirect; if ( malloc_it ) { a000f834: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a000f838: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a000f83c: 0a000007 beq a000f860 if ( !p ) { a000f840: e3500000 cmp r0, #0 a000f844: 1a000003 bne a000f858 p = memfile_alloc_block(); a000f848: ebffffe2 bl a000f7d8 if ( !p ) a000f84c: e3500000 cmp r0, #0 a000f850: 0a000067 beq a000f9f4 return 0; info->indirect = p; a000f854: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; a000f858: e5940058 ldr r0, [r4, #88] ; 0x58 a000f85c: ea000001 b a000f868 } if ( !p ) a000f860: e3500000 cmp r0, #0 a000f864: 0a000062 beq a000f9f4 return 0; return &info->indirect[ my_block ]; a000f868: e0800106 add r0, r0, r6, lsl #2 a000f86c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a000f870: e2853001 add r3, r5, #1 a000f874: e0030395 mul r3, r5, r3 a000f878: e2432001 sub r2, r3, #1 a000f87c: e1510002 cmp r1, r2 a000f880: 8a000021 bhi a000f90c my_block -= FIRST_DOUBLY_INDIRECT; a000f884: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000f888: e1a00006 mov r0, r6 a000f88c: e1a01005 mov r1, r5 a000f890: eb00146d bl a0014a4c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000f894: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000f898: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000f89c: e1a00006 mov r0, r6 a000f8a0: eb0013d1 bl a00147ec <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a000f8a4: 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; a000f8a8: e1a05000 mov r5, r0 p = info->doubly_indirect; a000f8ac: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { a000f8b0: 0a00000e beq a000f8f0 if ( !p ) { a000f8b4: e3500000 cmp r0, #0 a000f8b8: 1a000003 bne a000f8cc p = memfile_alloc_block(); a000f8bc: ebffffc5 bl a000f7d8 if ( !p ) a000f8c0: e3500000 cmp r0, #0 a000f8c4: 0a00004a beq a000f9f4 return 0; info->doubly_indirect = p; a000f8c8: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; a000f8cc: e0804105 add r4, r0, r5, lsl #2 a000f8d0: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { a000f8d4: e3500000 cmp r0, #0 a000f8d8: 1a000009 bne a000f904 p1 = memfile_alloc_block(); a000f8dc: ebffffbd bl a000f7d8 if ( !p1 ) a000f8e0: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a000f8e4: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) a000f8e8: 1a000005 bne a000f904 a000f8ec: ea000040 b a000f9f4 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a000f8f0: e3500000 cmp r0, #0 a000f8f4: 0a00003e beq a000f9f4 return 0; p = (block_p *)p[ doubly ]; a000f8f8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) a000f8fc: e3500000 cmp r0, #0 a000f900: 0a00003b beq a000f9f4 return 0; return (block_p *)&p[ singly ]; a000f904: e0800107 add r0, r0, r7, lsl #2 a000f908: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a000f90c: e2832001 add r2, r3, #1 a000f910: e0020295 mul r2, r5, r2 a000f914: e2422001 sub r2, r2, #1 a000f918: e1510002 cmp r1, r2 a000f91c: 8a000033 bhi a000f9f0 my_block -= FIRST_TRIPLY_INDIRECT; a000f920: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000f924: e1a00006 mov r0, r6 a000f928: e1a01005 mov r1, r5 a000f92c: eb001446 bl a0014a4c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000f930: 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; a000f934: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000f938: e1a00006 mov r0, r6 a000f93c: eb0013aa bl a00147ec <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000f940: 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; a000f944: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000f948: eb0013a7 bl a00147ec <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000f94c: 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; a000f950: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000f954: e1a00006 mov r0, r6 a000f958: eb00143b bl a0014a4c <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a000f95c: 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; a000f960: e1a05000 mov r5, r0 p = info->triply_indirect; a000f964: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a000f968: 0a000016 beq a000f9c8 if ( !p ) { a000f96c: e3500000 cmp r0, #0 a000f970: 1a000003 bne a000f984 p = memfile_alloc_block(); a000f974: ebffff97 bl a000f7d8 if ( !p ) a000f978: e3500000 cmp r0, #0 a000f97c: 0a00001c beq a000f9f4 return 0; info->triply_indirect = p; a000f980: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; a000f984: e0804107 add r4, r0, r7, lsl #2 a000f988: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { a000f98c: e3500000 cmp r0, #0 a000f990: 1a000003 bne a000f9a4 p1 = memfile_alloc_block(); a000f994: ebffff8f bl a000f7d8 if ( !p1 ) a000f998: e3500000 cmp r0, #0 a000f99c: 0a000014 beq a000f9f4 return 0; p[ triply ] = (block_p) p1; a000f9a0: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; a000f9a4: e0804105 add r4, r0, r5, lsl #2 a000f9a8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { a000f9ac: e3500000 cmp r0, #0 a000f9b0: 1a00000c bne a000f9e8 p2 = memfile_alloc_block(); a000f9b4: ebffff87 bl a000f7d8 if ( !p2 ) a000f9b8: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a000f9bc: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) a000f9c0: 1a000008 bne a000f9e8 a000f9c4: ea00000a b a000f9f4 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a000f9c8: e3500000 cmp r0, #0 a000f9cc: 0a000008 beq a000f9f4 return 0; p1 = (block_p *) p[ triply ]; a000f9d0: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a000f9d4: e3500000 cmp r0, #0 a000f9d8: 0a000005 beq a000f9f4 return 0; p2 = (block_p *)p1[ doubly ]; a000f9dc: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a000f9e0: e3500000 cmp r0, #0 a000f9e4: 0a000002 beq a000f9f4 return 0; return (block_p *)&p2[ singly ]; a000f9e8: e080010a add r0, r0, sl, lsl #2 a000f9ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * This means the requested block number is out of range. */ return 0; a000f9f0: e3a00000 mov r0, #0 <== NOT EXECUTED } a000f9f4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000fcb0 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a000fcb0: 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; a000fcb4: e59f3108 ldr r3, [pc, #264] ; a000fdc4 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a000fcb8: 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; a000fcbc: e5935000 ldr r5, [r3] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a000fcc0: 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; a000fcc4: e1a05125 lsr r5, r5, #2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a000fcc8: e3530000 cmp r3, #0 a000fccc: 0a000002 beq a000fcdc memfile_free_blocks_in_table( &info->indirect, to_free ); a000fcd0: e2800058 add r0, r0, #88 ; 0x58 <== NOT EXECUTED a000fcd4: e1a01005 mov r1, r5 <== NOT EXECUTED a000fcd8: ebffffe0 bl a000fc60 <== NOT EXECUTED } if ( info->doubly_indirect ) { a000fcdc: e594305c ldr r3, [r4, #92] ; 0x5c a000fce0: e3530000 cmp r3, #0 a000fce4: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { a000fcec: 1a000009 bne a000fd18 a000fcf0: ea00000e b a000fd30 for ( i=0 ; idoubly_indirect[i] ) { a000fcf4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED a000fcf8: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED a000fcfc: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED a000fd00: e3520000 cmp r2, #0 <== NOT EXECUTED a000fd04: 0a000002 beq a000fd14 <== NOT EXECUTED memfile_free_blocks_in_table( a000fd08: e0830000 add r0, r3, r0 <== NOT EXECUTED a000fd0c: e1a01005 mov r1, r5 <== NOT EXECUTED a000fd10: ebffffd2 bl a000fc60 <== 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 ); a000fd24: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED a000fd28: e1a01005 mov r1, r5 <== NOT EXECUTED a000fd2c: ebffffcb bl a000fc60 <== NOT EXECUTED } if ( info->triply_indirect ) { a000fd30: e5943060 ldr r3, [r4, #96] ; 0x60 a000fd34: e3530000 cmp r3, #0 a000fd38: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { a000fd40: 1a000017 bne a000fda4 a000fd44: ea00001c b a000fdbc for ( i=0 ; itriply_indirect[i]; a000fd48: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { a000fd4c: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; a000fd50: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a000fd54: e3580000 cmp r8, #0 <== NOT EXECUTED a000fd58: 0a000014 beq a000fdb0 <== 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( a000fd5c: e2488004 sub r8, r8, #4 <== NOT EXECUTED a000fd60: e3a07000 mov r7, #0 <== NOT EXECUTED a000fd64: ea000006 b a000fd84 <== 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); a000fd74: e1a00008 mov r0, r8 <== NOT EXECUTED a000fd78: e1a01005 mov r1, r5 <== NOT EXECUTED a000fd7c: ebffffb7 bl a000fc60 <== 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( a000fd90: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED a000fd94: 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( a000fdb0: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED a000fdb4: e1a01005 mov r1, r5 <== NOT EXECUTED a000fdb8: ebffffa8 bl a000fc60 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } a000fdbc: e3a00000 mov r0, #0 a000fdc0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a000fdc8 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { a000fdc8: 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 ); a000fdcc: e3a02000 mov r2, #0 <== NOT EXECUTED a000fdd0: ebfffe8d bl a000f80c <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; a000fdd4: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000fdd8: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; a000fddc: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; a000fde0: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); a000fde4: ebffff95 bl a000fc40 <== NOT EXECUTED return 1; } a000fde8: e3a00001 mov r0, #1 <== NOT EXECUTED a000fdec: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a000ff0c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000ff0c: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} a000ff10: 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 ) { a000ff14: e5903054 ldr r3, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000ff18: e59d8030 ldr r8, [sp, #48] ; 0x30 a000ff1c: 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 ) { a000ff20: e3530000 cmp r3, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000ff24: e1a04000 mov r4, r0 a000ff28: 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; a000ff2c: e0881001 add r1, r8, r1 if ( last_byte > the_jnode->info.file.size ) { a000ff30: ba000003 blt a000ff44 a000ff34: 1a00000c bne a000ff6c a000ff38: e5903050 ldr r3, [r0, #80] ; 0x50 a000ff3c: e1530001 cmp r3, r1 a000ff40: 2a000009 bcs a000ff6c status = IMFS_memfile_extend( the_jnode, last_byte ); a000ff44: e1a00004 mov r0, r4 a000ff48: e3a02000 mov r2, #0 a000ff4c: ebffffa7 bl a000fdf0 if ( status ) a000ff50: e3500000 cmp r0, #0 a000ff54: 0a000004 beq a000ff6c rtems_set_errno_and_return_minus_one( ENOSPC ); a000ff58: eb000460 bl a00110e0 <__errno> a000ff5c: e3a0301c mov r3, #28 a000ff60: e5803000 str r3, [r0] a000ff64: e3e05000 mvn r5, #0 a000ff68: ea00004d b a00100a4 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000ff6c: e59f3138 ldr r3, [pc, #312] ; a00100ac a000ff70: e1a00007 mov r0, r7 a000ff74: e1a0100a mov r1, sl a000ff78: e5939000 ldr r9, [r3] a000ff7c: e1a0b009 mov fp, r9 a000ff80: e1a0cfcb asr ip, fp, #31 a000ff84: e1a0300c mov r3, ip a000ff88: e1a0200b mov r2, fp a000ff8c: e58dc000 str ip, [sp] a000ff90: eb00140e bl a0014fd0 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000ff94: e59dc000 ldr ip, [sp] */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000ff98: e1a05000 mov r5, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000ff9c: e1a0100a mov r1, sl a000ffa0: e1a00007 mov r0, r7 a000ffa4: e1a0200b mov r2, fp a000ffa8: e1a0300c mov r3, ip a000ffac: eb0012da bl a0014b1c <__divdi3> if ( start_offset ) { a000ffb0: 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; a000ffb4: e1a07000 mov r7, r0 if ( start_offset ) { a000ffb8: 0a000012 beq a0010008 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 ); a000ffbc: e1a00004 mov r0, r4 <== NOT EXECUTED a000ffc0: e1a01007 mov r1, r7 <== NOT EXECUTED a000ffc4: e3a02000 mov r2, #0 <== NOT EXECUTED a000ffc8: ebfffe0f bl a000f80c <== NOT EXECUTED if ( !block_ptr ) a000ffcc: e3500000 cmp r0, #0 <== NOT EXECUTED return copied; a000ffd0: 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 ) a000ffd4: 0a000032 beq a00100a4 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a000ffd8: 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; a000ffdc: e065a009 rsb sl, r5, r9 <== NOT EXECUTED a000ffe0: e15a0008 cmp sl, r8 <== NOT EXECUTED a000ffe4: 21a0a008 movcs sl, r8 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a000ffe8: e0800005 add r0, r0, r5 <== NOT EXECUTED a000ffec: e1a01006 mov r1, r6 <== NOT EXECUTED a000fff0: e1a0200a mov r2, sl <== NOT EXECUTED a000fff4: eb000667 bl a0011998 <== NOT EXECUTED src += to_copy; a000fff8: e086600a add r6, r6, sl <== NOT EXECUTED block++; a000fffc: e2877001 add r7, r7, #1 <== NOT EXECUTED my_length -= to_copy; a0010000: e06a8008 rsb r8, sl, r8 <== NOT EXECUTED copied += to_copy; a0010004: e1a0500a mov r5, sl <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; a0010008: e59f909c ldr r9, [pc, #156] ; a00100ac a001000c: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010010: ea00000d b a001004c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010014: e1a00004 mov r0, r4 a0010018: e1a01007 mov r1, r7 a001001c: e3a02000 mov r2, #0 a0010020: ebfffdf9 bl a000f80c if ( !block_ptr ) a0010024: e3500000 cmp r0, #0 a0010028: 0a00001d beq a00100a4 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 ); a001002c: e1a01006 mov r1, r6 a0010030: e5900000 ldr r0, [r0] a0010034: e1a0200a mov r2, sl a0010038: eb000656 bl a0011998 src += to_copy; a001003c: e086600a add r6, r6, sl block++; a0010040: e2877001 add r7, r7, #1 my_length -= to_copy; a0010044: 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( a0010048: 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 ) { a001004c: e5993000 ldr r3, [r9] a0010050: e1580003 cmp r8, r3 a0010054: 2affffee bcs a0010014 * 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 ) { a0010058: e3580000 cmp r8, #0 a001005c: 0a00000a beq a001008c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010060: e1a00004 mov r0, r4 a0010064: e1a01007 mov r1, r7 a0010068: e3a02000 mov r2, #0 a001006c: ebfffde6 bl a000f80c if ( !block_ptr ) a0010070: e3500000 cmp r0, #0 a0010074: 0a00000a beq a00100a4 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 ); a0010078: e5900000 ldr r0, [r0] a001007c: e1a01006 mov r1, r6 a0010080: e1a02008 mov r2, r8 a0010084: eb000643 bl a0011998 my_length = 0; copied += to_copy; a0010088: e0855008 add r5, r5, r8 } IMFS_mtime_ctime_update( the_jnode ); a001008c: e28d0004 add r0, sp, #4 a0010090: e3a01000 mov r1, #0 a0010094: ebffd881 bl a00062a0 a0010098: e59d3004 ldr r3, [sp, #4] a001009c: e5843044 str r3, [r4, #68] ; 0x44 a00100a0: e5843048 str r3, [r4, #72] ; 0x48 return copied; } a00100a4: e1a00005 mov r0, r5 a00100a8: 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: eb002d46 bl a00110e0 <__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: eb0034c3 bl a0015864 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: eb00347e bl a0015790 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: eb003451 bl a0015710 (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: eb00344b bl a0015710 <== 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: ea003497 b a0015864 <== 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: ea00343d b a0015710 <== 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: ea003b69 b a00173cc =============================================================================== 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: eb00312b bl a00120e8 <== 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: eb001048 bl a0009d70 <_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: eb001038 bl a0009d44 <_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 =============================================================================== a000d8c8 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a000d8c8: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a000d8cc: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a000d8d0: e593204c ldr r2, [r3, #76] ; 0x4c a000d8d4: e2422002 sub r2, r2, #2 a000d8d8: e3520005 cmp r2, #5 a000d8dc: 979ff102 ldrls pc, [pc, r2, lsl #2] a000d8e0: ea000012 b a000d930 <== NOT EXECUTED a000d8e4: a000d8fc .word 0xa000d8fc <== NOT EXECUTED a000d8e8: a000d930 .word 0xa000d930 <== NOT EXECUTED a000d8ec: a000d91c .word 0xa000d91c <== NOT EXECUTED a000d8f0: a000d910 .word 0xa000d910 <== NOT EXECUTED a000d8f4: a000d910 .word 0xa000d910 <== NOT EXECUTED a000d8f8: a000d91c .word 0xa000d91c <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); a000d8fc: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a000d900: e593c050 ldr ip, [r3, #80] ; 0x50 a000d904: e581201c str r2, [r1, #28] a000d908: e581c018 str ip, [r1, #24] break; a000d90c: ea00000c b a000d944 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; a000d910: e283c050 add ip, r3, #80 ; 0x50 a000d914: e89c1800 ldm ip, {fp, ip} a000d918: ea000001 b a000d924 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a000d91c: e3a0b000 mov fp, #0 <== NOT EXECUTED a000d920: e3a0c000 mov ip, #0 <== NOT EXECUTED a000d924: e581b020 str fp, [r1, #32] a000d928: e581c024 str ip, [r1, #36] ; 0x24 break; a000d92c: ea000004 b a000d944 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a000d930: eb000dea bl a00110e0 <__errno> <== NOT EXECUTED a000d934: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a000d938: e5803000 str r3, [r0] <== NOT EXECUTED a000d93c: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d940: 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; a000d944: e5902010 ldr r2, [r0, #16] a000d948: e59f0054 ldr r0, [pc, #84] ; a000d9a4 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a000d94c: e5922034 ldr r2, [r2, #52] ; 0x34 a000d950: 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 = a000d954: 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; a000d958: 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 = a000d95c: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a000d960: e5932030 ldr r2, [r3, #48] ; 0x30 a000d964: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; a000d968: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a000d96c: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; a000d970: e5932038 ldr r2, [r3, #56] ; 0x38 a000d974: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; a000d978: e1d323bc ldrh r2, [r3, #60] ; 0x3c a000d97c: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; a000d980: e1d323be ldrh r2, [r3, #62] ; 0x3e a000d984: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; a000d988: e5932040 ldr r2, [r3, #64] ; 0x40 a000d98c: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; a000d990: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; a000d994: 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; a000d998: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; a000d99c: e5813038 str r3, [r1, #56] ; 0x38 return 0; } a000d9a0: 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: eb0030fb bl a0012088 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: eb001e9a bl a000d71c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); a0005cb0: e1a00006 mov r0, r6 a0005cb4: eb0030df bl a0012038 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: eb001c21 bl a000cd68 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: eb002cf9 bl a00110e0 <__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: eb002ce7 bl a00110e0 <__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: eb001c5c bl a000cee8 <== 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: eb002cb7 bl a00110e0 <__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: eb002cb1 bl a00110e0 <__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: eb0030e1 bl a00121d4