=============================================================================== 30006ad0 : static void CPU_usage_Per_thread_handler( Thread_Control *the_thread ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 30006ad0: e3a03000 mov r3, #0 <== NOT EXECUTED 30006ad4: e5803084 str r3, [r0, #132] ; 0x84 <== NOT EXECUTED 30006ad8: e5803088 str r3, [r0, #136] ; 0x88 <== NOT EXECUTED #else the_thread->cpu_time_used = 0; #endif } 30006adc: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30005a04 : static inline void Dump_Line( const unsigned char *buffer, int length ) { 30005a04: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 30005a08: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; 30005a0c: e3a04000 mov r4, #0 <== NOT EXECUTED 30005a10: e28d7078 add r7, sp, #120 ; 0x78 <== NOT EXECUTED static inline void Dump_Line( const unsigned char *buffer, int length ) { 30005a14: e1a05000 mov r5, r0 <== NOT EXECUTED 30005a18: e1a06001 mov r6, r1 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; 30005a1c: e5674078 strb r4, [r7, #-120]! ; 0x78 <== NOT EXECUTED for( i=0 ; i <== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 30005a24: e7d53004 ldrb r3, [r5, r4] <== NOT EXECUTED 30005a28: e1a0000d mov r0, sp <== NOT EXECUTED 30005a2c: e59f10bc ldr r1, [pc, #188] ; 30005af0 <== NOT EXECUTED 30005a30: e1a0200d mov r2, sp <== NOT EXECUTED 30005a34: eb002cdf bl 30010db8 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i <== NOT EXECUTED 30005a44: ea000003 b 30005a58 <== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 30005a48: e1a0000d mov r0, sp <== NOT EXECUTED 30005a4c: e59f10a0 ldr r1, [pc, #160] ; 30005af4 <== NOT EXECUTED 30005a50: eb002d33 bl 30010f24 <== NOT EXECUTED line_buffer[0] = '\0'; for( i=0 ; i <== NOT EXECUTED strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 30005a60: e1a0000d mov r0, sp <== NOT EXECUTED 30005a64: e59f108c ldr r1, [pc, #140] ; 30005af8 <== NOT EXECUTED 30005a68: eb002d2d bl 30010f24 <== NOT EXECUTED for( i=0 ; i <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); 30005a7c: e7d53004 ldrb r3, [r5, r4] <== NOT EXECUTED 30005a80: e5972000 ldr r2, [r7] <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005a94: e3120097 tst r2, #151 ; 0x97 <== NOT EXECUTED 30005a98: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED 30005a9c: e1a0200d mov r2, sp <== NOT EXECUTED 30005aa0: eb002cc4 bl 30010db8 <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005ab0: ea000004 b 30005ac8 <== NOT EXECUTED sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 30005ab4: e1a0000d mov r0, sp <== NOT EXECUTED 30005ab8: e59f1044 ldr r1, [pc, #68] ; 30005b04 <== NOT EXECUTED 30005abc: eb002d18 bl 30010f24 <== NOT EXECUTED strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005ac8: e1a0500d mov r5, sp <== NOT EXECUTED 30005acc: e354000f cmp r4, #15 <== NOT EXECUTED 30005ad0: dafffff7 ble 30005ab4 <== NOT EXECUTED strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 30005ad4: e1a0000d mov r0, sp <== NOT EXECUTED 30005ad8: e59f1028 ldr r1, [pc, #40] ; 30005b08 <== NOT EXECUTED 30005adc: eb002d10 bl 30010f24 <== NOT EXECUTED printk( line_buffer ); 30005ae0: e1a0000d mov r0, sp <== NOT EXECUTED 30005ae4: eb0005ad bl 300071a0 <== NOT EXECUTED } 30005ae8: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED 30005aec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 3000cef4 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 3000cef4: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 3000cef8: e5903010 ldr r3, [r0, #16] switch( node->type ) { 3000cefc: 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; 3000cf00: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 3000cf04: e2422001 sub r2, r2, #1 3000cf08: e3520006 cmp r2, #6 3000cf0c: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000cf10: ea000010 b 3000cf58 <== NOT EXECUTED 3000cf14: 3000cf30 .word 0x3000cf30 <== NOT EXECUTED 3000cf18: 3000cf38 .word 0x3000cf38 <== NOT EXECUTED 3000cf1c: 3000cf40 .word 0x3000cf40 <== NOT EXECUTED 3000cf20: 3000cf40 .word 0x3000cf40 <== NOT EXECUTED 3000cf24: 3000cf48 .word 0x3000cf48 <== NOT EXECUTED 3000cf28: 3000cf48 .word 0x3000cf48 <== NOT EXECUTED 3000cf2c: 3000cf50 .word 0x3000cf50 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 3000cf30: e593300c ldr r3, [r3, #12] 3000cf34: ea000006 b 3000cf54 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 3000cf38: e59f3020 ldr r3, [pc, #32] ; 3000cf60 3000cf3c: ea000004 b 3000cf54 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 3000cf40: e59f301c ldr r3, [pc, #28] ; 3000cf64 3000cf44: ea000002 b 3000cf54 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 3000cf48: e5933008 ldr r3, [r3, #8] 3000cf4c: ea000000 b 3000cf54 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 3000cf50: e5933010 ldr r3, [r3, #16] 3000cf54: e5803008 str r3, [r0, #8] break; } return 0; } 3000cf58: e3a00000 mov r0, #0 3000cf5c: e12fff1e bx lr =============================================================================== 3000ccd4 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000ccd4: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 3000ccd8: e5904000 ldr r4, [r0] <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000ccdc: e1a0000d mov r0, sp <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 3000cce0: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; 3000cce4: e1c423be strh r2, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000cce8: e3a01000 mov r1, #0 <== NOT EXECUTED 3000ccec: ebffe595 bl 30006348 <== NOT EXECUTED 3000ccf0: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 3000ccf4: e3a00000 mov r0, #0 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000ccf8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000ccfc: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED =============================================================================== 3000cff4 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000cff4: 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 ) ) { 3000cff8: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000cffc: e24dd040 sub sp, sp, #64 ; 0x40 3000d000: e58d0000 str r0, [sp] 3000d004: e1a06001 mov r6, r1 3000d008: e1a08002 mov r8, r2 3000d00c: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000d010: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 3000d014: 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 ); 3000d018: 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 ) ) { 3000d01c: 0a000057 beq 3000d180 rtems_set_errno_and_return_minus_one( EIO ); 3000d020: eb000c85 bl 3001023c <__errno> <== NOT EXECUTED 3000d024: e3a03005 mov r3, #5 <== NOT EXECUTED 3000d028: ea00007e b 3000d228 <== 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 ); 3000d02c: e59d2000 ldr r2, [sp] 3000d030: e28d303c add r3, sp, #60 ; 0x3c 3000d034: e0820007 add r0, r2, r7 3000d038: e1a01006 mov r1, r6 3000d03c: e1a0200a mov r2, sl 3000d040: eb0001ae bl 3000d700 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000d044: 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 ); 3000d048: e1a09000 mov r9, r0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000d04c: e3530000 cmp r3, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 3000d050: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 3000d054: 0a000041 beq 3000d160 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000d058: e3500000 cmp r0, #0 3000d05c: 0a000006 beq 3000d07c if ( node->type == IMFS_DIRECTORY ) 3000d060: e595104c ldr r1, [r5, #76] ; 0x4c 3000d064: e3510001 cmp r1, #1 3000d068: 1a000003 bne 3000d07c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 3000d06c: e1a00004 mov r0, r4 3000d070: ebffffbc bl 3000cf68 3000d074: e3500000 cmp r0, #0 3000d078: 0a000068 beq 3000d220 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 3000d07c: 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; 3000d080: e06b6006 rsb r6, fp, r6 i += len; 3000d084: 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; 3000d088: e5945000 ldr r5, [r4] switch( type ) { 3000d08c: 0a000014 beq 3000d0e4 3000d090: e3590004 cmp r9, #4 3000d094: 0a000036 beq 3000d174 3000d098: e3590002 cmp r9, #2 3000d09c: 1a000037 bne 3000d180 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 3000d0a0: e59fc194 ldr ip, [pc, #404] ; 3000d23c 3000d0a4: e59c3000 ldr r3, [ip] 3000d0a8: e5933018 ldr r3, [r3, #24] 3000d0ac: e1550003 cmp r5, r3 3000d0b0: 0a000032 beq 3000d180 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 3000d0b4: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 3000d0b8: e59e301c ldr r3, [lr, #28] 3000d0bc: 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; 3000d0c0: 028dc028 addeq ip, sp, #40 ; 0x28 3000d0c4: 028ee008 addeq lr, lr, #8 3000d0c8: 0a000037 beq 3000d1ac pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 3000d0cc: e5955008 ldr r5, [r5, #8] 3000d0d0: e3550000 cmp r5, #0 3000d0d4: 1a000024 bne 3000d16c rtems_set_errno_and_return_minus_one( ENOENT ); 3000d0d8: eb000c57 bl 3001023c <__errno> <== NOT EXECUTED 3000d0dc: e5809000 str r9, [r0] <== NOT EXECUTED 3000d0e0: ea000051 b 3000d22c <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 3000d0e4: e595304c ldr r3, [r5, #76] ; 0x4c 3000d0e8: e3530003 cmp r3, #3 3000d0ec: 1a000004 bne 3000d104 IMFS_evaluate_hard_link( pathloc, 0 ); 3000d0f0: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d0f4: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d0f8: ebffffaa bl 3000cfa8 <== NOT EXECUTED node = pathloc->node_access; 3000d0fc: e5945000 ldr r5, [r4] <== NOT EXECUTED 3000d100: ea000008 b 3000d128 <== 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 ) { 3000d104: e3530004 cmp r3, #4 3000d108: 1a000006 bne 3000d128 result = IMFS_evaluate_sym_link( pathloc, 0 ); 3000d10c: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d110: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d114: eb000049 bl 3000d240 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 3000d118: 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 ); 3000d11c: 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; 3000d120: e5945000 ldr r5, [r4] <== NOT EXECUTED if ( result == -1 ) 3000d124: 0a000041 beq 3000d230 <== NOT EXECUTED } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000d128: e595304c ldr r3, [r5, #76] ; 0x4c 3000d12c: e3530001 cmp r3, #1 3000d130: 0a000002 beq 3000d140 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000d134: eb000c40 bl 3001023c <__errno> <== NOT EXECUTED 3000d138: e3a03014 mov r3, #20 <== NOT EXECUTED 3000d13c: ea000039 b 3000d228 <== 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 ) { 3000d140: e595e05c ldr lr, [r5, #92] ; 0x5c 3000d144: e35e0000 cmp lr, #0 3000d148: 1a000015 bne 3000d1a4 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000d14c: e1a00005 mov r0, r5 3000d150: e1a0100a mov r1, sl 3000d154: eb000149 bl 3000d680 if ( !node ) 3000d158: e2505000 subs r5, r0, #0 3000d15c: 1a000002 bne 3000d16c rtems_set_errno_and_return_minus_one( ENOENT ); 3000d160: eb000c35 bl 3001023c <__errno> 3000d164: e3a03002 mov r3, #2 3000d168: ea00002e b 3000d228 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 3000d16c: e5845000 str r5, [r4] 3000d170: ea000002 b 3000d180 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000d174: eb000c30 bl 3001023c <__errno> <== NOT EXECUTED 3000d178: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000d17c: ea000029 b 3000d228 <== NOT EXECUTED /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 3000d180: e3590004 cmp r9, #4 3000d184: 13590000 cmpne r9, #0 3000d188: 1affffa7 bne 3000d02c * 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 ) { 3000d18c: e595304c ldr r3, [r5, #76] ; 0x4c 3000d190: e3530001 cmp r3, #1 3000d194: 1a000019 bne 3000d200 if ( node->info.directory.mt_fs != NULL ) { 3000d198: e595e05c ldr lr, [r5, #92] ; 0x5c 3000d19c: e35e0000 cmp lr, #0 3000d1a0: 0a000016 beq 3000d200 newloc = node->info.directory.mt_fs->mt_fs_root; 3000d1a4: e28dc028 add ip, sp, #40 ; 0x28 3000d1a8: e28ee01c add lr, lr, #28 3000d1ac: e8be000f ldm lr!, {r0, r1, r2, r3} 3000d1b0: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000d1b4: e59ee000 ldr lr, [lr] 3000d1b8: e58ce000 str lr, [ip] *pathloc = newloc; 3000d1bc: e28dc028 add ip, sp, #40 ; 0x28 3000d1c0: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000d1c4: e1a0c004 mov ip, r4 3000d1c8: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000d1cc: e59d103c ldr r1, [sp, #60] ; 0x3c 3000d1d0: e59d2000 ldr r2, [sp] */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 3000d1d4: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000d1d8: e0610007 rsb r0, r1, r7 3000d1dc: e0820000 add r0, r2, r0 3000d1e0: e594c00c ldr ip, [r4, #12] 3000d1e4: e0861001 add r1, r6, r1 3000d1e8: e1a02008 mov r2, r8 3000d1ec: e1a03004 mov r3, r4 3000d1f0: e1a0e00f mov lr, pc 3000d1f4: e59cf000 ldr pc, [ip] 3000d1f8: e1a0b000 mov fp, r0 3000d1fc: ea00000b b 3000d230 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000d200: e1a00004 mov r0, r4 3000d204: ebffff3a bl 3000cef4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000d208: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000d20c: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000d210: e1a00004 mov r0, r4 3000d214: ebffff53 bl 3000cf68 3000d218: e3500000 cmp r0, #0 3000d21c: 1a000003 bne 3000d230 rtems_set_errno_and_return_minus_one( EACCES ); 3000d220: eb000c05 bl 3001023c <__errno> <== NOT EXECUTED 3000d224: e3a0300d mov r3, #13 <== NOT EXECUTED 3000d228: e5803000 str r3, [r0] 3000d22c: e3e0b000 mvn fp, #0 return result; } 3000d230: e1a0000b mov r0, fp 3000d234: e28dd040 add sp, sp, #64 ; 0x40 3000d238: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000d37c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 3000d37c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000d380: e24dd03c sub sp, sp, #60 ; 0x3c 3000d384: e1a07000 mov r7, r0 3000d388: e1a04001 mov r4, r1 3000d38c: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000d390: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 3000d394: eb000f92 bl 300111e4 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 3000d398: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 3000d39c: 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 ); 3000d3a0: e1a01008 mov r1, r8 3000d3a4: e28d3038 add r3, sp, #56 ; 0x38 3000d3a8: e0870005 add r0, r7, r5 3000d3ac: e1a0200d mov r2, sp 3000d3b0: eb0000d2 bl 3000d700 pathlen -= len; i += len; if ( !pathloc->node_access ) 3000d3b4: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 3000d3b8: e59db038 ldr fp, [sp, #56] ; 0x38 i += len; if ( !pathloc->node_access ) 3000d3bc: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 3000d3c0: e1a09000 mov r9, r0 pathlen -= len; 3000d3c4: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 3000d3c8: 0a000060 beq 3000d550 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000d3cc: e3500000 cmp r0, #0 3000d3d0: 0a000006 beq 3000d3f0 if ( node->type == IMFS_DIRECTORY ) 3000d3d4: e596104c ldr r1, [r6, #76] ; 0x4c 3000d3d8: e3510001 cmp r1, #1 3000d3dc: 1a000003 bne 3000d3f0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 3000d3e0: e1a00004 mov r0, r4 3000d3e4: ebfffedf bl 3000cf68 3000d3e8: e3500000 cmp r0, #0 3000d3ec: 0a00006c beq 3000d5a4 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 3000d3f0: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 3000d3f4: 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; 3000d3f8: e1a06003 mov r6, r3 switch( type ) { 3000d3fc: e3590004 cmp r9, #4 3000d400: 979ff109 ldrls pc, [pc, r9, lsl #2] 3000d404: eaffffe5 b 3000d3a0 <== NOT EXECUTED 3000d408: 3000d514 .word 0x3000d514 <== NOT EXECUTED 3000d40c: 3000d3a0 .word 0x3000d3a0 <== NOT EXECUTED 3000d410: 3000d41c .word 0x3000d41c <== NOT EXECUTED 3000d414: 3000d458 .word 0x3000d458 <== NOT EXECUTED 3000d418: 3000d520 .word 0x3000d520 <== 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 ) 3000d41c: e59f119c ldr r1, [pc, #412] ; 3000d5c0 3000d420: e5912000 ldr r2, [r1] 3000d424: e5922018 ldr r2, [r2, #24] 3000d428: e1530002 cmp r3, r2 3000d42c: 0affffdb beq 3000d3a0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 3000d430: e594e010 ldr lr, [r4, #16] 3000d434: e59e201c ldr r2, [lr, #28] 3000d438: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 3000d43c: 028dc024 addeq ip, sp, #36 ; 0x24 3000d440: 028ee008 addeq lr, lr, #8 3000d444: 0a000019 beq 3000d4b0 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 3000d448: e5936008 ldr r6, [r3, #8] 3000d44c: e3560000 cmp r6, #0 3000d450: 1a00002d bne 3000d50c 3000d454: ea00003d b 3000d550 <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 3000d458: e593304c ldr r3, [r3, #76] ; 0x4c 3000d45c: e3530003 cmp r3, #3 3000d460: 0a000001 beq 3000d46c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 3000d464: e3530004 cmp r3, #4 3000d468: 1a000005 bne 3000d484 result = IMFS_evaluate_link( pathloc, 0 ); 3000d46c: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d470: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d474: ebffff93 bl 3000d2c8 <== NOT EXECUTED if ( result == -1 ) 3000d478: e3700001 cmn r0, #1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 3000d47c: e1a06000 mov r6, r0 <== NOT EXECUTED if ( result == -1 ) 3000d480: 0a00004b beq 3000d5b4 <== NOT EXECUTED return -1; } node = pathloc->node_access; 3000d484: e5940000 ldr r0, [r4] if ( !node ) 3000d488: e3500000 cmp r0, #0 3000d48c: 0a00003c beq 3000d584 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000d490: e590304c ldr r3, [r0, #76] ; 0x4c 3000d494: e3530001 cmp r3, #1 3000d498: 1a000039 bne 3000d584 /* * 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 ) { 3000d49c: e590e05c ldr lr, [r0, #92] ; 0x5c 3000d4a0: e35e0000 cmp lr, #0 3000d4a4: 0a000014 beq 3000d4fc newloc = node->info.directory.mt_fs->mt_fs_root; 3000d4a8: e28dc024 add ip, sp, #36 ; 0x24 3000d4ac: e28ee01c add lr, lr, #28 3000d4b0: e8be000f ldm lr!, {r0, r1, r2, r3} 3000d4b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000d4b8: e59ee000 ldr lr, [lr] 3000d4bc: e58ce000 str lr, [ip] *pathloc = newloc; 3000d4c0: e28dc024 add ip, sp, #36 ; 0x24 3000d4c4: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000d4c8: e1a0c004 mov ip, r4 3000d4cc: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000d4d0: 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; 3000d4d4: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000d4d8: e0625005 rsb r5, r2, r5 3000d4dc: e594300c ldr r3, [r4, #12] 3000d4e0: e0870005 add r0, r7, r5 3000d4e4: e1a01004 mov r1, r4 3000d4e8: e1a0200a mov r2, sl 3000d4ec: e1a0e00f mov lr, pc 3000d4f0: e593f004 ldr pc, [r3, #4] 3000d4f4: e1a06000 mov r6, r0 3000d4f8: ea00002d b 3000d5b4 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000d4fc: e1a0100d mov r1, sp 3000d500: eb00005e bl 3000d680 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 3000d504: e2506000 subs r6, r0, #0 3000d508: 0a000007 beq 3000d52c done = true; else pathloc->node_access = node; 3000d50c: e5846000 str r6, [r4] 3000d510: eaffffa2 b 3000d3a0 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 3000d514: eb000b48 bl 3001023c <__errno> 3000d518: e3a03011 mov r3, #17 3000d51c: ea000022 b 3000d5ac break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000d520: eb000b45 bl 3001023c <__errno> <== NOT EXECUTED 3000d524: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000d528: ea00001f b 3000d5ac <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 3000d52c: e59d3038 ldr r3, [sp, #56] ; 0x38 3000d530: e0633005 rsb r3, r3, r5 3000d534: e0873003 add r3, r7, r3 3000d538: 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( 3000d53c: 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++) { 3000d540: ea000005 b 3000d55c if ( !IMFS_is_separator( path[ i ] ) ) 3000d544: ebffe6de bl 300070c4 <== NOT EXECUTED 3000d548: e3500000 cmp r0, #0 <== NOT EXECUTED 3000d54c: 1a000002 bne 3000d55c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); 3000d550: eb000b39 bl 3001023c <__errno> <== NOT EXECUTED 3000d554: e3a03002 mov r3, #2 <== NOT EXECUTED 3000d558: ea000013 b 3000d5ac <== 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++) { 3000d55c: e4d50001 ldrb r0, [r5], #1 3000d560: e3500000 cmp r0, #0 3000d564: 1afffff6 bne 3000d544 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000d568: e1a00004 mov r0, r4 3000d56c: ebfffe60 bl 3000cef4 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000d570: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000d574: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000d578: e593304c ldr r3, [r3, #76] ; 0x4c 3000d57c: e3530001 cmp r3, #1 3000d580: 0a000002 beq 3000d590 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000d584: eb000b2c bl 3001023c <__errno> <== NOT EXECUTED 3000d588: e3a03014 mov r3, #20 <== NOT EXECUTED 3000d58c: ea000006 b 3000d5ac <== NOT EXECUTED /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 3000d590: e1a00004 mov r0, r4 3000d594: e3a01003 mov r1, #3 3000d598: ebfffe72 bl 3000cf68 3000d59c: e3500000 cmp r0, #0 3000d5a0: 1a000003 bne 3000d5b4 rtems_set_errno_and_return_minus_one( EACCES ); 3000d5a4: eb000b24 bl 3001023c <__errno> 3000d5a8: e3a0300d mov r3, #13 3000d5ac: e5803000 str r3, [r0] 3000d5b0: e3e06000 mvn r6, #0 return result; } 3000d5b4: e1a00006 mov r0, r6 3000d5b8: e28dd03c add sp, sp, #60 ; 0x3c 3000d5bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000cfa8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000cfa8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000cfac: e5903000 ldr r3, [r0] <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000cfb0: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000cfb4: e5933050 ldr r3, [r3, #80] ; 0x50 <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000cfb8: e1a05001 mov r5, r1 <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000cfbc: e5803000 str r3, [r0] <== NOT EXECUTED IMFS_Set_handlers( node ); 3000cfc0: ebffffcb bl 3000cef4 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000cfc4: e1a00004 mov r0, r4 <== NOT EXECUTED 3000cfc8: e1a01005 mov r1, r5 <== NOT EXECUTED 3000cfcc: ebffffe5 bl 3000cf68 <== NOT EXECUTED 3000cfd0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000cfd4: 1a000004 bne 3000cfec <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); 3000cfd8: eb000c97 bl 3001023c <__errno> <== NOT EXECUTED 3000cfdc: e3a0300d mov r3, #13 <== NOT EXECUTED 3000cfe0: e5803000 str r3, [r0] <== NOT EXECUTED 3000cfe4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000cfe8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return result; 3000cfec: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000cff0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000d2c8 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d2c8: e92d40f0 push {r4, r5, r6, r7, lr} /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d2cc: e59f70a4 ldr r7, [pc, #164] ; 3000d378 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d2d0: e1a04000 mov r4, r0 3000d2d4: e1a05001 mov r5, r1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d2d8: e5973000 ldr r3, [r7] { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 3000d2dc: e5946000 ldr r6, [r4] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d2e0: e1d323b0 ldrh r2, [r3, #48] ; 0x30 3000d2e4: e2822001 add r2, r2, #1 3000d2e8: e1a02802 lsl r2, r2, #16 3000d2ec: e1a02822 lsr r2, r2, #16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000d2f0: e3520005 cmp r2, #5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d2f4: e1c323b0 strh r2, [r3, #48] ; 0x30 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000d2f8: 9a000006 bls 3000d318 rtems_filesystem_link_counts = 0; 3000d2fc: e3a02000 mov r2, #0 <== NOT EXECUTED 3000d300: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); 3000d304: eb000bcc bl 3001023c <__errno> <== NOT EXECUTED 3000d308: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED 3000d30c: e5803000 str r3, [r0] <== NOT EXECUTED 3000d310: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d314: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 3000d318: e596304c ldr r3, [r6, #76] ; 0x4c 3000d31c: e3530003 cmp r3, #3 3000d320: 1a000003 bne 3000d334 result = IMFS_evaluate_hard_link( node, flags ); 3000d324: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d328: e1a01005 mov r1, r5 <== NOT EXECUTED 3000d32c: ebffff1d bl 3000cfa8 <== NOT EXECUTED 3000d330: ea000004 b 3000d348 <== NOT EXECUTED else if (jnode->type == IMFS_SYM_LINK ) 3000d334: e3530004 cmp r3, #4 3000d338: 1a000004 bne 3000d350 result = IMFS_evaluate_sym_link( node, flags ); 3000d33c: e1a00004 mov r0, r4 3000d340: e1a01005 mov r1, r5 3000d344: ebffffbd bl 3000d240 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 3000d348: e3500000 cmp r0, #0 3000d34c: 1a000004 bne 3000d364 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 ) || 3000d350: e596304c ldr r3, [r6, #76] ; 0x4c 3000d354: e2433003 sub r3, r3, #3 3000d358: e3530001 cmp r3, #1 3000d35c: 9affffdd bls 3000d2d8 3000d360: e3a00000 mov r0, #0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000d364: e59f300c ldr r3, [pc, #12] ; 3000d378 3000d368: e3a02000 mov r2, #0 3000d36c: e5933000 ldr r3, [r3] 3000d370: e1c323b0 strh r2, [r3, #48] ; 0x30 return result; } 3000d374: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 3000cf68 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000cf68: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 3000cf6c: e52de004 push {lr} ; (str lr, [sp, #-4]!) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000cf70: 0a000004 beq 3000cf88 rtems_set_errno_and_return_minus_one( EPERM ); 3000cf74: eb000cb0 bl 3001023c <__errno> <== NOT EXECUTED 3000cf78: e3a03001 mov r3, #1 <== NOT EXECUTED 3000cf7c: e5803000 str r3, [r0] <== NOT EXECUTED 3000cf80: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000cf84: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 3000cf88: e5903000 ldr r3, [r0] */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 3000cf8c: e1a01301 lsl r1, r1, #6 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 3000cf90: e5930030 ldr r0, [r3, #48] ; 0x30 3000cf94: e0010000 and r0, r1, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 3000cf98: e1500001 cmp r0, r1 3000cf9c: 13a00000 movne r0, #0 3000cfa0: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 3000cfa4: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 3000d240 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d240: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 3000d244: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d248: e1a04000 mov r4, r0 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 3000d24c: e5963008 ldr r3, [r6, #8] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d250: 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; 3000d254: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( 3000d258: e5960050 ldr r0, [r6, #80] ; 0x50 3000d25c: e1a0100d mov r1, sp 3000d260: e1a02004 mov r2, r4 3000d264: eb000341 bl 3000df70 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 3000d268: e59d3000 ldr r3, [sp] 3000d26c: e5966050 ldr r6, [r6, #80] ; 0x50 3000d270: e0866003 add r6, r6, r3 3000d274: e1a00006 mov r0, r6 3000d278: eb000fd9 bl 300111e4 3000d27c: e1a02005 mov r2, r5 3000d280: e1a01000 mov r1, r0 3000d284: e1a03004 mov r3, r4 3000d288: e1a00006 mov r0, r6 3000d28c: ebffff58 bl 3000cff4 3000d290: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 3000d294: e1a00004 mov r0, r4 3000d298: ebffff15 bl 3000cef4 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000d29c: e1a00004 mov r0, r4 3000d2a0: e1a01005 mov r1, r5 3000d2a4: ebffff2f bl 3000cf68 3000d2a8: e3500000 cmp r0, #0 3000d2ac: 1a000003 bne 3000d2c0 rtems_set_errno_and_return_minus_one( EACCES ); 3000d2b0: eb000be1 bl 3001023c <__errno> <== NOT EXECUTED 3000d2b4: e3a0300d mov r3, #13 <== NOT EXECUTED 3000d2b8: e5803000 str r3, [r0] <== NOT EXECUTED 3000d2bc: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 3000d2c0: e1a00006 mov r0, r6 3000d2c4: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== 3000fcf8 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000fcf8: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 3000fcfc: e5904000 ldr r4, [r0] <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000fd00: e1a01a01 lsl r1, r1, #20 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000fd04: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 3000fd08: 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); 3000fd0c: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 3000fd10: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000fd14: e1833a21 orr r3, r3, r1, lsr #20 <== NOT EXECUTED 3000fd18: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000fd1c: e3a01000 mov r1, #0 <== NOT EXECUTED 3000fd20: ebffd988 bl 30006348 <== NOT EXECUTED 3000fd24: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 3000fd28: e3a00000 mov r0, #0 <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 3000fd2c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000fd30: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED =============================================================================== 3000fd34 : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } 3000fd34: e3a00000 mov r0, #0 <== NOT EXECUTED 3000fd38: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30006d04 : void *buffer ) { int err; if (command == FIONBIO) { 30006d04: e59fc06c ldr ip, [pc, #108] ; 30006d78 int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 30006d08: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { 30006d0c: e151000c cmp r1, ip int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 30006d10: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { 30006d14: 1a00000a bne 30006d44 if (buffer == NULL) 30006d18: e3520000 cmp r2, #0 30006d1c: 0a00000e beq 30006d5c err = -EFAULT; else { if (*(int *)buffer) 30006d20: e5924000 ldr r4, [r2] 30006d24: e5932014 ldr r2, [r3, #20] 30006d28: e3540000 cmp r4, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; 30006d2c: 13822001 orrne r2, r2, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 30006d30: 03c22001 biceq r2, r2, #1 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 30006d34: 15832014 strne r2, [r3, #20] else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; 30006d38: 13a04000 movne r4, #0 err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 30006d3c: 05832014 streq r2, [r3, #20] 30006d40: ea00000a b 30006d70 return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 30006d44: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED 30006d48: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 30006d4c: eb002475 bl 3000ff28 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30006d50: e2504000 subs r4, r0, #0 <== NOT EXECUTED 30006d54: aa000005 bge 30006d70 <== NOT EXECUTED 30006d58: ea000000 b 30006d60 <== NOT EXECUTED { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; 30006d5c: e3e0400d mvn r4, #13 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 30006d60: eb002c30 bl 30011e28 <__errno> <== NOT EXECUTED 30006d64: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006d68: e5804000 str r4, [r0] <== NOT EXECUTED 30006d6c: e3e04000 mvn r4, #0 <== NOT EXECUTED } 30006d70: e1a00004 mov r0, r4 30006d74: e8bd8010 pop {r4, pc} =============================================================================== 30006cb4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 30006cb4: e92d4011 push {r0, r4, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30006cb8: e590c018 ldr ip, [r0, #24] <== NOT EXECUTED 30006cbc: e58d0000 str r0, [sp] <== NOT EXECUTED 30006cc0: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED 30006cc4: eb0024b0 bl 3000ff8c <== NOT EXECUTED 30006cc8: e1a02000 mov r2, r0 <== NOT EXECUTED 30006ccc: e1a03fc2 asr r3, r2, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30006cd0: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30006cd4: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30006cd8: a1a04003 movge r4, r3 <== NOT EXECUTED 30006cdc: a1a03002 movge r3, r2 <== NOT EXECUTED 30006ce0: aa000004 bge 30006cf8 <== NOT EXECUTED 30006ce4: eb002c4f bl 30011e28 <__errno> <== NOT EXECUTED 30006ce8: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006cec: e5804000 str r4, [r0] <== NOT EXECUTED 30006cf0: e3e03000 mvn r3, #0 <== NOT EXECUTED 30006cf4: e3e04000 mvn r4, #0 <== NOT EXECUTED } 30006cf8: e1a00003 mov r0, r3 <== NOT EXECUTED 30006cfc: e1a01004 mov r1, r4 <== NOT EXECUTED 30006d00: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED =============================================================================== 30006e5c : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30006e5c: e1a01000 mov r1, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 30006e60: e5900018 ldr r0, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30006e64: e92d4010 push {r4, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 30006e68: e2800050 add r0, r0, #80 ; 0x50 30006e6c: eb00227f bl 3000f870 IMFS_FIFO_RETURN(err); 30006e70: e2504000 subs r4, r0, #0 30006e74: aa000003 bge 30006e88 30006e78: eb002bea bl 30011e28 <__errno> <== NOT EXECUTED 30006e7c: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006e80: e5804000 str r4, [r0] <== NOT EXECUTED 30006e84: e3e04000 mvn r4, #0 <== NOT EXECUTED } 30006e88: e1a00004 mov r0, r4 30006e8c: e8bd8010 pop {r4, pc} =============================================================================== 3000d5c4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000d5c4: 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; 3000d5c8: e1a0c000 mov ip, r0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000d5cc: 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; 3000d5d0: e5bc401c ldr r4, [ip, #28]! loc = temp_mt_entry->mt_fs_root; 3000d5d4: 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 ) { 3000d5d8: 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; 3000d5dc: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000d5e0: e8ae000f stmia lr!, {r0, r1, r2, r3} 3000d5e4: e59c3000 ldr r3, [ip] 3000d5e8: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000d5ec: e3a03000 mov r3, #0 3000d5f0: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3000d5f4: e1a0500d mov r5, sp 3000d5f8: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3000d5fc: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 3000d600: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 3000d604: ebfffe3a bl 3000cef4 if ( jnode->type != IMFS_DIRECTORY ) { 3000d608: e594304c ldr r3, [r4, #76] ; 0x4c 3000d60c: e3530001 cmp r3, #1 3000d610: 1a000003 bne 3000d624 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3000d614: 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 ); 3000d618: e2843054 add r3, r4, #84 ; 0x54 3000d61c: e1520003 cmp r2, r3 3000d620: 1a000005 bne 3000d63c result = IMFS_unlink( NULL, &loc ); 3000d624: e3a00000 mov r0, #0 3000d628: e1a0100d mov r1, sp 3000d62c: ebffe1ee bl 30005dec if (result != 0) 3000d630: e3500000 cmp r0, #0 3000d634: 1a00000c bne 3000d66c return -1; jnode = next; 3000d638: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 3000d63c: e3540000 cmp r4, #0 3000d640: 0a00000b beq 3000d674 if ( jnode->type == IMFS_DIRECTORY ) { 3000d644: e594304c ldr r3, [r4, #76] ; 0x4c 3000d648: e3530001 cmp r3, #1 3000d64c: 1affffe9 bne 3000d5f8 } } } while (jnode != NULL); return 0; } 3000d650: e5943050 ldr r3, [r4, #80] ; 0x50 3000d654: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 3000d658: e1530002 cmp r3, r2 3000d65c: 0affffe5 beq 3000d5f8 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3000d660: e2534000 subs r4, r3, #0 3000d664: 1affffe3 bne 3000d5f8 3000d668: ea000001 b 3000d674 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 3000d66c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d670: ea000000 b 3000d678 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 3000d674: e1a00004 mov r0, r4 } 3000d678: e28dd014 add sp, sp, #20 3000d67c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 3000d700 : const char *path, int pathlen, char *token, int *token_len ) { 3000d700: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000d704: e1a05001 mov r5, r1 3000d708: e1a04002 mov r4, r2 3000d70c: e1a0a003 mov sl, r3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 3000d710: e5d07000 ldrb r7, [r0] 3000d714: e1a08000 mov r8, r0 int pathlen, char *token, int *token_len ) { register int i = 0; 3000d718: 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) ) { 3000d71c: ea000004 b 3000d734 token[i] = c; if ( i == IMFS_NAME_MAX ) 3000d720: 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; 3000d724: e7c47006 strb r7, [r4, r6] if ( i == IMFS_NAME_MAX ) 3000d728: 0a000024 beq 3000d7c0 return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 3000d72c: e5f87001 ldrb r7, [r8, #1]! 3000d730: 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) ) { 3000d734: e1a00007 mov r0, r7 3000d738: ebffe661 bl 300070c4 3000d73c: e3500000 cmp r0, #0 3000d740: 1a000001 bne 3000d74c 3000d744: e1560005 cmp r6, r5 3000d748: bafffff4 blt 3000d720 /* * Copy a seperator into token. */ if ( i == 0 ) { 3000d74c: e3560000 cmp r6, #0 3000d750: 1a000005 bne 3000d76c token[i] = c; if ( (token[i] != '\0') && pathlen ) { 3000d754: e3570000 cmp r7, #0 3000d758: 13550000 cmpne r5, #0 i++; type = IMFS_CURRENT_DIR; 3000d75c: 13a06001 movne r6, #1 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 3000d760: e5c47000 strb r7, [r4] if ( (token[i] != '\0') && pathlen ) { i++; 3000d764: e1a00006 mov r0, r6 3000d768: ea000005 b 3000d784 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 3000d76c: e0843006 add r3, r4, r6 3000d770: e5533001 ldrb r3, [r3, #-1] char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; 3000d774: e3a00003 mov r0, #3 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 3000d778: e3530000 cmp r3, #0 token[i] = '\0'; 3000d77c: 13a03000 movne r3, #0 3000d780: 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 ) { 3000d784: e3500003 cmp r0, #3 /* * Set token_len to the number of characters copied. */ *token_len = i; 3000d788: e58a6000 str r6, [sl] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 3000d78c: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} if ( strcmp( token, "..") == 0 ) 3000d790: e1a00004 mov r0, r4 3000d794: e59f1034 ldr r1, [pc, #52] ; 3000d7d0 3000d798: eb000db5 bl 30010e74 3000d79c: e3500000 cmp r0, #0 3000d7a0: 0a000008 beq 3000d7c8 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 3000d7a4: e1a00004 mov r0, r4 3000d7a8: e59f1024 ldr r1, [pc, #36] ; 3000d7d4 3000d7ac: eb000db0 bl 30010e74 type = IMFS_CURRENT_DIR; 3000d7b0: e3500000 cmp r0, #0 3000d7b4: 13a00003 movne r0, #3 3000d7b8: 03a00001 moveq r0, #1 3000d7bc: 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; 3000d7c0: e3a00004 mov r0, #4 <== NOT EXECUTED 3000d7c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 3000d7c8: e3a00002 mov r0, #2 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 3000d7cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 30005a34 : 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 ) { 30005a34: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30005a38: 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, 30005a3c: e59f30d0 ldr r3, [pc, #208] ; 30005b14 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 ) { 30005a40: e1a0a001 mov sl, r1 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30005a44: 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 ) { 30005a48: e1a08002 mov r8, r2 30005a4c: 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, 30005a50: 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) { 30005a54: e3a02010 mov r2, #16 if (bit_mask == requested_bytes_per_block) { 30005a58: e1520003 cmp r2, r3 30005a5c: 0a000004 beq 30005a74 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 30005a60: ca000002 bgt 30005a70 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 30005a64: e2511001 subs r1, r1, #1 30005a68: e1a02082 lsl r2, r2, #1 30005a6c: 1afffff9 bne 30005a58 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 30005a70: e3a03080 mov r3, #128 ; 0x80 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 30005a74: e59f609c ldr r6, [pc, #156] ; 30005b18 30005a78: 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(); 30005a7c: eb001d0c bl 3000ceb4 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; 30005a80: e59fe094 ldr lr, [pc, #148] ; 30005b1c 30005a84: 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(); 30005a88: e584001c str r0, [r4, #28] 30005a8c: 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; 30005a90: e8be000f ldm lr!, {r0, r1, r2, r3} 30005a94: e8ac000f stmia ip!, {r0, r1, r2, r3} 30005a98: e8be000f ldm lr!, {r0, r1, r2, r3} 30005a9c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30005aa0: 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; 30005aa4: 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; 30005aa8: 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; 30005aac: 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 ) ); 30005ab0: e3a00001 mov r0, #1 30005ab4: e3a01014 mov r1, #20 30005ab8: eb000195 bl 30006114 if ( !fs_info ) { 30005abc: e3500000 cmp r0, #0 30005ac0: 1a000006 bne 30005ae0 free(temp_mt_entry->mt_fs_root.node_access); 30005ac4: e1a00005 mov r0, r5 <== NOT EXECUTED 30005ac8: eb0001f5 bl 300062a4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30005acc: eb0029da bl 3001023c <__errno> <== NOT EXECUTED 30005ad0: e3a0300c mov r3, #12 <== NOT EXECUTED 30005ad4: e5803000 str r3, [r0] <== NOT EXECUTED 30005ad8: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005adc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30005ae0: e5963004 ldr r3, [r6, #4] 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; 30005ae4: e5840034 str r0, [r4, #52] ; 0x34 fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 30005ae8: e59d201c ldr r2, [sp, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30005aec: e5803000 str r3, [r0] 30005af0: e2833001 add r3, r3, #1 30005af4: e5863004 str r3, [r6, #4] fs_info->ino_count = 1; 30005af8: e3a03001 mov r3, #1 30005afc: e9800108 stmib r0, {r3, r8} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 30005b00: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; 30005b04: e5802010 str r2, [r0, #16] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 30005b08: e5853038 str r3, [r5, #56] ; 0x38 return 0; 30005b0c: e3a00000 mov r0, #0 } 30005b10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 30005b20 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b20: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30005b24: e5903000 ldr r3, [r0] <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b28: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30005b2c: e58d3028 str r3, [sp, #40] ; 0x28 <== NOT EXECUTED if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005b30: e1d333b4 ldrh r3, [r3, #52] ; 0x34 <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b34: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005b38: e3530007 cmp r3, #7 <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b3c: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005b40: 9a000002 bls 30005b50 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EMLINK ); 30005b44: eb0029bc bl 3001023c <__errno> <== NOT EXECUTED 30005b48: e3a0301f mov r3, #31 <== NOT EXECUTED 30005b4c: ea000012 b 30005b9c <== NOT EXECUTED /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 30005b50: e1a00002 mov r0, r2 <== NOT EXECUTED 30005b54: eb002da2 bl 300111e4 <== NOT EXECUTED 30005b58: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30005b5c: e1a01000 mov r1, r0 <== NOT EXECUTED 30005b60: e1a02004 mov r2, r4 <== NOT EXECUTED 30005b64: e28d3044 add r3, sp, #68 ; 0x44 <== NOT EXECUTED 30005b68: e1a00006 mov r0, r6 <== NOT EXECUTED 30005b6c: eb001ee3 bl 3000d700 <== NOT EXECUTED new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30005b70: e28d3028 add r3, sp, #40 ; 0x28 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 30005b74: e58d3000 str r3, [sp] <== NOT EXECUTED 30005b78: e1a00005 mov r0, r5 <== NOT EXECUTED 30005b7c: e3a01003 mov r1, #3 <== NOT EXECUTED 30005b80: e1a02004 mov r2, r4 <== NOT EXECUTED 30005b84: e59f3050 ldr r3, [pc, #80] ; 30005bdc <== NOT EXECUTED 30005b88: eb001c79 bl 3000cd74 <== NOT EXECUTED new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 30005b8c: e3500000 cmp r0, #0 <== NOT EXECUTED 30005b90: 1a000004 bne 30005ba8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 30005b94: eb0029a8 bl 3001023c <__errno> <== NOT EXECUTED 30005b98: e3a0300c mov r3, #12 <== NOT EXECUTED 30005b9c: e5803000 str r3, [r0] <== NOT EXECUTED 30005ba0: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005ba4: ea00000a b 30005bd4 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005ba8: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005bac: e28d003c add r0, sp, #60 ; 0x3c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005bb0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005bb4: e3a01000 mov r1, #0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005bb8: e2822001 add r2, r2, #1 <== NOT EXECUTED 30005bbc: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005bc0: eb0001e0 bl 30006348 <== NOT EXECUTED 30005bc4: e59d203c ldr r2, [sp, #60] ; 0x3c <== NOT EXECUTED 30005bc8: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED return 0; 30005bcc: e3a00000 mov r0, #0 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 30005bd0: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED return 0; } 30005bd4: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED 30005bd8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 3000f3b0 : IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000f3b0: e59f3110 ldr r3, [pc, #272] ; 3000f4c8 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000f3b4: 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 ) 3000f3b8: e593b000 ldr fp, [r3] */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000f3bc: e1a05002 mov r5, r2 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000f3c0: e1a0312b lsr r3, fp, #2 3000f3c4: e2832001 add r2, r3, #1 3000f3c8: e0020293 mul r2, r3, r2 3000f3cc: e2822001 add r2, r2, #1 3000f3d0: e0030392 mul r3, r2, r3 3000f3d4: e3a02000 mov r2, #0 3000f3d8: e2433001 sub r3, r3, #1 3000f3dc: e1520005 cmp r2, r5 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000f3e0: e1a04000 mov r4, r0 3000f3e4: 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 ) 3000f3e8: e003039b mul r3, fp, r3 3000f3ec: ca000005 bgt 3000f408 3000f3f0: 1a000001 bne 3000f3fc 3000f3f4: e1530001 cmp r3, r1 3000f3f8: 8a000002 bhi 3000f408 rtems_set_errno_and_return_minus_one( EINVAL ); 3000f3fc: eb00038e bl 3001023c <__errno> <== NOT EXECUTED 3000f400: e3a03016 mov r3, #22 <== NOT EXECUTED 3000f404: ea000025 b 3000f4a0 <== NOT EXECUTED /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 3000f408: e5948054 ldr r8, [r4, #84] ; 0x54 3000f40c: e5947050 ldr r7, [r4, #80] ; 0x50 3000f410: e1550008 cmp r5, r8 3000f414: ca000002 bgt 3000f424 3000f418: 1a000028 bne 3000f4c0 3000f41c: e1560007 cmp r6, r7 3000f420: 9a000026 bls 3000f4c0 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f424: e1a0cfcb asr ip, fp, #31 3000f428: e1a0300c mov r3, ip 3000f42c: e1a0200b mov r2, fp 3000f430: e1a00006 mov r0, r6 3000f434: e1a01005 mov r1, r5 3000f438: e58dc000 str ip, [sp] 3000f43c: eb001439 bl 30014528 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f440: e59dc000 ldr ip, [sp] 3000f444: e1a01008 mov r1, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f448: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f44c: e1a0200b mov r2, fp 3000f450: e1a00007 mov r0, r7 3000f454: e1a0300c mov r3, ip 3000f458: eb001432 bl 30014528 <__divdi3> 3000f45c: e1a08000 mov r8, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 3000f460: e1a07000 mov r7, r0 3000f464: ea000011 b 3000f4b0 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 3000f468: e1a00004 mov r0, r4 3000f46c: e1a01007 mov r1, r7 3000f470: ebffff57 bl 3000f1d4 3000f474: e3500000 cmp r0, #0 3000f478: 0a00000b beq 3000f4ac 3000f47c: ea000003 b 3000f490 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 3000f480: e1a01007 mov r1, r7 <== NOT EXECUTED 3000f484: e1a00004 mov r0, r4 <== NOT EXECUTED 3000f488: ebffffbe bl 3000f388 <== 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-- ) { 3000f48c: e2477001 sub r7, r7, #1 <== NOT EXECUTED 3000f490: e1570008 cmp r7, r8 <== NOT EXECUTED 3000f494: 2afffff9 bcs 3000f480 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 3000f498: eb000367 bl 3001023c <__errno> <== NOT EXECUTED 3000f49c: e3a0301c mov r3, #28 <== NOT EXECUTED 3000f4a0: e5803000 str r3, [r0] <== NOT EXECUTED 3000f4a4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000f4a8: ea000005 b 3000f4c4 <== NOT EXECUTED 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++ ) { 3000f4ac: e2877001 add r7, r7, #1 3000f4b0: e157000a cmp r7, sl 3000f4b4: 9affffeb bls 3000f468 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 3000f4b8: e5846050 str r6, [r4, #80] ; 0x50 3000f4bc: 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; 3000f4c0: e3a00000 mov r0, #0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 3000f4c4: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== 3000ede4 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000ede4: e59f31e4 ldr r3, [pc, #484] ; 3000efd0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000ede8: 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 ) { 3000edec: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000edf0: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000edf4: e1a05125 lsr r5, r5, #2 3000edf8: e2453001 sub r3, r5, #1 3000edfc: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000ee00: e1a06001 mov r6, r1 3000ee04: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000ee08: 8a00000e bhi 3000ee48 p = info->indirect; if ( malloc_it ) { 3000ee0c: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 3000ee10: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 3000ee14: 0a000007 beq 3000ee38 if ( !p ) { 3000ee18: e3500000 cmp r0, #0 3000ee1c: 1a000003 bne 3000ee30 p = memfile_alloc_block(); 3000ee20: ebffffe2 bl 3000edb0 if ( !p ) 3000ee24: e3500000 cmp r0, #0 3000ee28: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; 3000ee2c: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; 3000ee30: e5940058 ldr r0, [r4, #88] ; 0x58 3000ee34: ea000001 b 3000ee40 } if ( !p ) 3000ee38: e3500000 cmp r0, #0 3000ee3c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; 3000ee40: e0800106 add r0, r0, r6, lsl #2 3000ee44: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 3000ee48: e2853001 add r3, r5, #1 3000ee4c: e0030395 mul r3, r5, r3 3000ee50: e2432001 sub r2, r3, #1 3000ee54: e1510002 cmp r1, r2 3000ee58: 8a000021 bhi 3000eee4 my_block -= FIRST_DOUBLY_INDIRECT; 3000ee5c: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000ee60: e1a00006 mov r0, r6 3000ee64: e1a01005 mov r1, r5 3000ee68: eb00134e bl 30013ba8 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000ee6c: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000ee70: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000ee74: e1a00006 mov r0, r6 3000ee78: eb0012b2 bl 30013948 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 3000ee7c: 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; 3000ee80: e1a05000 mov r5, r0 p = info->doubly_indirect; 3000ee84: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { 3000ee88: 0a00000e beq 3000eec8 if ( !p ) { 3000ee8c: e3500000 cmp r0, #0 3000ee90: 1a000003 bne 3000eea4 p = memfile_alloc_block(); 3000ee94: ebffffc5 bl 3000edb0 if ( !p ) 3000ee98: e3500000 cmp r0, #0 3000ee9c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; 3000eea0: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; 3000eea4: e0804105 add r4, r0, r5, lsl #2 3000eea8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { 3000eeac: e3500000 cmp r0, #0 3000eeb0: 1a000009 bne 3000eedc p1 = memfile_alloc_block(); 3000eeb4: ebffffbd bl 3000edb0 if ( !p1 ) 3000eeb8: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 3000eebc: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 3000eec0: 1a000005 bne 3000eedc 3000eec4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 3000eec8: e3500000 cmp r0, #0 3000eecc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; 3000eed0: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) 3000eed4: e3500000 cmp r0, #0 3000eed8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; 3000eedc: e0800107 add r0, r0, r7, lsl #2 3000eee0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000eee4: e2832001 add r2, r3, #1 <== NOT EXECUTED 3000eee8: e0020295 mul r2, r5, r2 <== NOT EXECUTED 3000eeec: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3000eef0: e1510002 cmp r1, r2 <== NOT EXECUTED 3000eef4: 8a000033 bhi 3000efc8 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 3000eef8: e0636001 rsb r6, r3, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000eefc: e1a00006 mov r0, r6 <== NOT EXECUTED 3000ef00: e1a01005 mov r1, r5 <== NOT EXECUTED 3000ef04: eb001327 bl 30013ba8 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000ef08: e1a01005 mov r1, r5 <== NOT EXECUTED * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000ef0c: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000ef10: e1a00006 mov r0, r6 <== NOT EXECUTED 3000ef14: eb00128b bl 30013948 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000ef18: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000ef1c: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000ef20: eb001288 bl 30013948 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000ef24: e1a01005 mov r1, r5 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000ef28: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000ef2c: e1a00006 mov r0, r6 <== NOT EXECUTED 3000ef30: eb00131c bl 30013ba8 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 3000ef34: e3580000 cmp r8, #0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000ef38: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; 3000ef3c: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 3000ef40: 0a000016 beq 3000efa0 <== NOT EXECUTED if ( !p ) { 3000ef44: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ef48: 1a000003 bne 3000ef5c <== NOT EXECUTED p = memfile_alloc_block(); 3000ef4c: ebffff97 bl 3000edb0 <== NOT EXECUTED if ( !p ) 3000ef50: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ef54: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; info->triply_indirect = p; 3000ef58: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 3000ef5c: e0804107 add r4, r0, r7, lsl #2 <== NOT EXECUTED 3000ef60: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { 3000ef64: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ef68: 1a000003 bne 3000ef7c <== NOT EXECUTED p1 = memfile_alloc_block(); 3000ef6c: ebffff8f bl 3000edb0 <== NOT EXECUTED if ( !p1 ) 3000ef70: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ef74: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 3000ef78: e5840000 str r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 3000ef7c: e0804105 add r4, r0, r5, lsl #2 <== NOT EXECUTED 3000ef80: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { 3000ef84: e3500000 cmp r0, #0 <== NOT EXECUTED 3000ef88: 1a00000c bne 3000efc0 <== NOT EXECUTED p2 = memfile_alloc_block(); 3000ef8c: ebffff87 bl 3000edb0 <== NOT EXECUTED if ( !p2 ) 3000ef90: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 3000ef94: 15840000 strne r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 3000ef98: 1a000008 bne 3000efc0 <== NOT EXECUTED 3000ef9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3000efa0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000efa4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p1 = (block_p *) p[ triply ]; 3000efa8: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) 3000efac: e3500000 cmp r0, #0 <== NOT EXECUTED 3000efb0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 3000efb4: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) 3000efb8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000efbc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 3000efc0: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 3000efc4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } /* * This means the requested block number is out of range. */ return 0; 3000efc8: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000efcc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 300087f8 : * using the IMFS memory file type. * */ int IMFS_memfile_maximum_size( void ) { return IMFS_MEMFILE_MAXIMUM_SIZE; 300087f8: e59f3020 ldr r3, [pc, #32] ; 30008820 <== NOT EXECUTED 300087fc: e5932000 ldr r2, [r3] <== NOT EXECUTED 30008800: e1a03122 lsr r3, r2, #2 <== NOT EXECUTED 30008804: e2830001 add r0, r3, #1 <== NOT EXECUTED 30008808: e0000093 mul r0, r3, r0 <== NOT EXECUTED 3000880c: e2800001 add r0, r0, #1 <== NOT EXECUTED 30008810: e0030390 mul r3, r0, r3 <== NOT EXECUTED 30008814: e2430001 sub r0, r3, #1 <== NOT EXECUTED } 30008818: e0000092 mul r0, r2, r0 <== NOT EXECUTED 3000881c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000f27c : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000f27c: 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; 3000f280: e59f30fc ldr r3, [pc, #252] ; 3000f384 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000f284: 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; 3000f288: e5935000 ldr r5, [r3] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000f28c: 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; 3000f290: e1a05125 lsr r5, r5, #2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000f294: e3530000 cmp r3, #0 memfile_free_blocks_in_table( &info->indirect, to_free ); 3000f298: 12800058 addne r0, r0, #88 ; 0x58 3000f29c: 11a01005 movne r1, r5 3000f2a0: 1bffffe1 blne 3000f22c } if ( info->doubly_indirect ) { 3000f2a4: e594305c ldr r3, [r4, #92] ; 0x5c 3000f2a8: e3530000 cmp r3, #0 3000f2ac: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 3000f2b4: 1a000008 bne 3000f2dc 3000f2b8: ea00000d b 3000f2f4 for ( i=0 ; idoubly_indirect[i] ) { 3000f2bc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 3000f2c0: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED 3000f2c4: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED 3000f2c8: e3520000 cmp r2, #0 <== NOT EXECUTED memfile_free_blocks_in_table( 3000f2cc: 10830000 addne r0, r3, r0 <== NOT EXECUTED 3000f2d0: 11a01005 movne r1, r5 <== NOT EXECUTED 3000f2d4: 1bffffd4 blne 3000f22c <== 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 ); 3000f2e8: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 3000f2ec: e1a01005 mov r1, r5 <== NOT EXECUTED 3000f2f0: ebffffcd bl 3000f22c <== NOT EXECUTED } if ( info->triply_indirect ) { 3000f2f4: e5943060 ldr r3, [r4, #96] ; 0x60 3000f2f8: e3530000 cmp r3, #0 3000f2fc: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 3000f304: 1a000016 bne 3000f364 3000f308: ea00001b b 3000f37c for ( i=0 ; itriply_indirect[i]; 3000f30c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 3000f310: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 3000f314: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 3000f318: e3580000 cmp r8, #0 <== NOT EXECUTED 3000f31c: 0a000013 beq 3000f370 <== 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( 3000f320: e2488004 sub r8, r8, #4 <== NOT EXECUTED 3000f324: e3a07000 mov r7, #0 <== NOT EXECUTED 3000f328: ea000005 b 3000f344 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 3000f350: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 3000f354: e1a01005 mov r1, r5 <== NOT EXECUTED 3000f358: e0800009 add r0, r0, r9 <== NOT EXECUTED 3000f35c: ebffffb2 bl 3000f22c <== 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( 3000f370: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 3000f374: e1a01005 mov r1, r5 <== NOT EXECUTED 3000f378: ebffffab bl 3000f22c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 3000f37c: e3a00000 mov r0, #0 3000f380: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 3000f388 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 3000f388: 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 ); 3000f38c: e3a02000 mov r2, #0 <== NOT EXECUTED 3000f390: ebfffe93 bl 3000ede4 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; 3000f394: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000f398: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 3000f39c: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; 3000f3a0: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 3000f3a4: ebffff98 bl 3000f20c <== NOT EXECUTED return 1; } 3000f3a8: e3a00001 mov r0, #1 <== NOT EXECUTED 3000f3ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3000f4cc : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000f4cc: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000f4d0: 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 ) { 3000f4d4: e5903054 ldr r3, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000f4d8: e59d8030 ldr r8, [sp, #48] ; 0x30 * 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 ) { 3000f4dc: e3530000 cmp r3, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000f4e0: e1a07001 mov r7, r1 3000f4e4: e1a04000 mov r4, r0 3000f4e8: 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; 3000f4ec: e0881001 add r1, r8, r1 if ( last_byte > the_jnode->info.file.size ) { 3000f4f0: ba000003 blt 3000f504 3000f4f4: 1a00000c bne 3000f52c 3000f4f8: e5903050 ldr r3, [r0, #80] ; 0x50 3000f4fc: e1530001 cmp r3, r1 3000f500: 2a000009 bcs 3000f52c status = IMFS_memfile_extend( the_jnode, last_byte ); 3000f504: e1a00004 mov r0, r4 3000f508: e3a02000 mov r2, #0 3000f50c: ebffffa7 bl 3000f3b0 if ( status ) 3000f510: e3500000 cmp r0, #0 3000f514: 0a000004 beq 3000f52c rtems_set_errno_and_return_minus_one( ENOSPC ); 3000f518: eb000347 bl 3001023c <__errno> <== NOT EXECUTED 3000f51c: e3a0301c mov r3, #28 <== NOT EXECUTED 3000f520: e5803000 str r3, [r0] <== NOT EXECUTED 3000f524: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000f528: ea00004d b 3000f664 <== NOT EXECUTED */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f52c: e59f3138 ldr r3, [pc, #312] ; 3000f66c 3000f530: e1a00007 mov r0, r7 3000f534: e5939000 ldr r9, [r3] 3000f538: e1a0100a mov r1, sl 3000f53c: e1a0b009 mov fp, r9 3000f540: e1a0cfcb asr ip, fp, #31 3000f544: e1a0300c mov r3, ip 3000f548: e1a0200b mov r2, fp 3000f54c: e58dc000 str ip, [sp] 3000f550: eb001521 bl 300149dc <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f554: e59dc000 ldr ip, [sp] */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f558: e1a05000 mov r5, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f55c: e1a0100a mov r1, sl 3000f560: e1a00007 mov r0, r7 3000f564: e1a0200b mov r2, fp 3000f568: e1a0300c mov r3, ip 3000f56c: eb0013ed bl 30014528 <__divdi3> if ( start_offset ) { 3000f570: 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; 3000f574: e1a07000 mov r7, r0 if ( start_offset ) { 3000f578: 0a000012 beq 3000f5c8 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 ); 3000f57c: e1a00004 mov r0, r4 <== NOT EXECUTED 3000f580: e1a01007 mov r1, r7 <== NOT EXECUTED 3000f584: e3a02000 mov r2, #0 <== NOT EXECUTED 3000f588: ebfffe15 bl 3000ede4 <== NOT EXECUTED if ( !block_ptr ) 3000f58c: e3500000 cmp r0, #0 <== NOT EXECUTED return copied; 3000f590: 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 ) 3000f594: 0a000032 beq 3000f664 <== 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; 3000f598: e065a009 rsb sl, r5, r9 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 3000f59c: 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; 3000f5a0: e15a0008 cmp sl, r8 <== NOT EXECUTED 3000f5a4: 21a0a008 movcs sl, r8 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 3000f5a8: e0800005 add r0, r0, r5 <== NOT EXECUTED 3000f5ac: e1a01006 mov r1, r6 <== NOT EXECUTED 3000f5b0: e1a0200a mov r2, sl <== NOT EXECUTED 3000f5b4: eb00054e bl 30010af4 <== NOT EXECUTED src += to_copy; 3000f5b8: e086600a add r6, r6, sl <== NOT EXECUTED block++; 3000f5bc: e2877001 add r7, r7, #1 <== NOT EXECUTED my_length -= to_copy; 3000f5c0: e06a8008 rsb r8, sl, r8 <== NOT EXECUTED copied += to_copy; 3000f5c4: e1a0500a mov r5, sl <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 3000f5c8: e59f909c ldr r9, [pc, #156] ; 3000f66c 3000f5cc: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 3000f5d0: ea00000d b 3000f60c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000f5d4: e1a00004 mov r0, r4 3000f5d8: e1a01007 mov r1, r7 3000f5dc: e3a02000 mov r2, #0 3000f5e0: ebfffdff bl 3000ede4 if ( !block_ptr ) 3000f5e4: e3500000 cmp r0, #0 3000f5e8: 0a00001d beq 3000f664 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 ); 3000f5ec: e1a01006 mov r1, r6 3000f5f0: e5900000 ldr r0, [r0] 3000f5f4: e1a0200a mov r2, sl 3000f5f8: eb00053d bl 30010af4 src += to_copy; 3000f5fc: e086600a add r6, r6, sl block++; 3000f600: e2877001 add r7, r7, #1 my_length -= to_copy; 3000f604: 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( 3000f608: 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 ) { 3000f60c: e5993000 ldr r3, [r9] 3000f610: e1580003 cmp r8, r3 3000f614: 2affffee bcs 3000f5d4 * 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 ) { 3000f618: e3580000 cmp r8, #0 3000f61c: 0a00000a beq 3000f64c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000f620: e1a00004 mov r0, r4 3000f624: e1a01007 mov r1, r7 3000f628: e3a02000 mov r2, #0 3000f62c: ebfffdec bl 3000ede4 if ( !block_ptr ) 3000f630: e3500000 cmp r0, #0 3000f634: 0a00000a beq 3000f664 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 ); 3000f638: e5900000 ldr r0, [r0] 3000f63c: e1a01006 mov r1, r6 3000f640: e1a02008 mov r2, r8 3000f644: eb00052a bl 30010af4 my_length = 0; copied += to_copy; 3000f648: e0855008 add r5, r5, r8 } IMFS_mtime_ctime_update( the_jnode ); 3000f64c: e28d0004 add r0, sp, #4 3000f650: e3a01000 mov r1, #0 3000f654: ebffdb3b bl 30006348 3000f658: e59d3004 ldr r3, [sp, #4] 3000f65c: e5843044 str r3, [r4, #68] ; 0x44 3000f660: e5843048 str r3, [r4, #72] ; 0x48 return copied; } 3000f664: e1a00005 mov r0, r5 3000f668: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30005c8c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30005c8c: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30005c90: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30005c94: e593204c ldr r2, [r3, #76] ; 0x4c 30005c98: e3520001 cmp r2, #1 30005c9c: 0a000004 beq 30005cb4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30005ca0: eb002965 bl 3001023c <__errno> <== NOT EXECUTED 30005ca4: e3a03014 mov r3, #20 <== NOT EXECUTED 30005ca8: e5803000 str r3, [r0] <== NOT EXECUTED 30005cac: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005cb0: 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; 30005cb4: e583005c str r0, [r3, #92] ; 0x5c return 0; 30005cb8: e3a00000 mov r0, #0 } 30005cbc: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30008614 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 30008614: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 30008618: e59f50e0 ldr r5, [pc, #224] ; 30008700 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 3000861c: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 30008620: e5953000 ldr r3, [r5] 30008624: e280000c add r0, r0, #12 30008628: e5931008 ldr r1, [r3, #8] 3000862c: eb0030dc bl 300149a4 switch( the_jnode->type ) { 30008630: e594204c ldr r2, [r4, #76] ; 0x4c 30008634: e2423001 sub r3, r2, #1 30008638: e3530006 cmp r3, #6 3000863c: 979ff103 ldrls pc, [pc, r3, lsl #2] 30008640: ea000026 b 300086e0 <== NOT EXECUTED 30008644: 30008660 .word 0x30008660 <== NOT EXECUTED 30008648: 30008674 .word 0x30008674 <== NOT EXECUTED 3000864c: 300086c0 .word 0x300086c0 <== NOT EXECUTED 30008650: 300086c0 .word 0x300086c0 <== NOT EXECUTED 30008654: 300086a8 .word 0x300086a8 <== NOT EXECUTED 30008658: 3000868c .word 0x3000868c <== NOT EXECUTED 3000865c: 300086cc .word 0x300086cc <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 30008660: e5953000 ldr r3, [r5] 30008664: e3a0002f mov r0, #47 ; 0x2f 30008668: e5931008 ldr r1, [r3, #8] 3000866c: eb003097 bl 300148d0 break; 30008670: ea00001f b 300086f4 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 30008674: e5953000 ldr r3, [r5] 30008678: e59f1084 ldr r1, [pc, #132] ; 30008704 3000867c: e5930008 ldr r0, [r3, #8] 30008680: e5942050 ldr r2, [r4, #80] ; 0x50 30008684: e5943054 ldr r3, [r4, #84] ; 0x54 30008688: ea000004 b 300086a0 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 3000868c: e5953000 ldr r3, [r5] 30008690: e59f1070 ldr r1, [pc, #112] ; 30008708 30008694: e5930008 ldr r0, [r3, #8] 30008698: e5942050 ldr r2, [r4, #80] ; 0x50 3000869c: e5943058 ldr r3, [r4, #88] ; 0x58 300086a0: eb00306a bl 30014850 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 300086a4: ea000012 b 300086f4 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 300086a8: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086ac: e59f1058 ldr r1, [pc, #88] ; 3000870c <== NOT EXECUTED 300086b0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 300086b4: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 300086b8: eb003064 bl 30014850 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; 300086bc: ea00000c b 300086f4 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 300086c0: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086c4: e59f0044 ldr r0, [pc, #68] ; 30008710 <== NOT EXECUTED 300086c8: ea000001 b 300086d4 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 300086cc: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086d0: e59f003c ldr r0, [pc, #60] ; 30008714 <== NOT EXECUTED 300086d4: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 300086d8: 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" ); 300086dc: ea0030b0 b 300149a4 <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 300086e0: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086e4: e59f102c ldr r1, [pc, #44] ; 30008718 <== NOT EXECUTED 300086e8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 300086ec: 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 ); 300086f0: ea003056 b 30014850 <== NOT EXECUTED return; } puts(""); 300086f4: e59f0020 ldr r0, [pc, #32] ; 3000871c } 300086f8: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 300086fc: ea003782 b 3001650c =============================================================================== 30005ccc : ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 30005ccc: e590c000 ldr ip, [r0] <== NOT EXECUTED IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30005cd0: e3a00000 mov r0, #0 <== NOT EXECUTED 30005cd4: ea000001 b 30005ce0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; 30005cd8: 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++ ) 30005cdc: e2800001 add r0, r0, #1 <== NOT EXECUTED 30005ce0: e1500002 cmp r0, r2 <== NOT EXECUTED 30005ce4: 212fff1e bxcs lr <== NOT EXECUTED 30005ce8: e59c3050 ldr r3, [ip, #80] ; 0x50 <== NOT EXECUTED 30005cec: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED 30005cf0: e3530000 cmp r3, #0 <== NOT EXECUTED 30005cf4: 1afffff7 bne 30005cd8 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 30005cf8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30005cfc : 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 */ ) { 30005cfc: 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; 30005d00: 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 */ ) { 30005d04: 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 ); 30005d08: e1a01003 mov r1, r3 <== NOT EXECUTED 30005d0c: e284000c add r0, r4, #12 <== NOT EXECUTED 30005d10: e3a02020 mov r2, #32 <== NOT EXECUTED 30005d14: eb002d4a bl 30011244 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 30005d18: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30005d1c: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30005d20: 11a00004 movne r0, r4 <== NOT EXECUTED 30005d24: 1b00102e blne 30009de4 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 30005d28: 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 ); 30005d2c: e1a01004 mov r1, r4 <== NOT EXECUTED the_jnode->Parent = new_parent; 30005d30: e5840008 str r0, [r4, #8] <== NOT EXECUTED 30005d34: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED 30005d38: eb00101e bl 30009db8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 30005d3c: e1a0000d mov r0, sp <== NOT EXECUTED 30005d40: e3a01000 mov r1, #0 <== NOT EXECUTED 30005d44: eb00017f bl 30006348 <== NOT EXECUTED 30005d48: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 30005d4c: 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 ); 30005d50: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 30005d54: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000d8a8 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 3000d8a8: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000d8ac: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 3000d8b0: e593204c ldr r2, [r3, #76] ; 0x4c 3000d8b4: e2422002 sub r2, r2, #2 3000d8b8: e3520005 cmp r2, #5 3000d8bc: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000d8c0: ea000012 b 3000d910 <== NOT EXECUTED 3000d8c4: 3000d8dc .word 0x3000d8dc <== NOT EXECUTED 3000d8c8: 3000d910 .word 0x3000d910 <== NOT EXECUTED 3000d8cc: 3000d8fc .word 0x3000d8fc <== NOT EXECUTED 3000d8d0: 3000d8f0 .word 0x3000d8f0 <== NOT EXECUTED 3000d8d4: 3000d8f0 .word 0x3000d8f0 <== NOT EXECUTED 3000d8d8: 3000d8fc .word 0x3000d8fc <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 3000d8dc: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 3000d8e0: e593c050 ldr ip, [r3, #80] ; 0x50 3000d8e4: e581201c str r2, [r1, #28] 3000d8e8: e581c018 str ip, [r1, #24] break; 3000d8ec: ea00000c b 3000d924 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 3000d8f0: e283c050 add ip, r3, #80 ; 0x50 3000d8f4: e89c1800 ldm ip, {fp, ip} 3000d8f8: ea000001 b 3000d904 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 3000d8fc: e3a0b000 mov fp, #0 <== NOT EXECUTED 3000d900: e3a0c000 mov ip, #0 <== NOT EXECUTED 3000d904: e581b020 str fp, [r1, #32] 3000d908: e581c024 str ip, [r1, #36] ; 0x24 break; 3000d90c: ea000004 b 3000d924 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000d910: eb000a49 bl 3001023c <__errno> <== NOT EXECUTED 3000d914: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000d918: e5803000 str r3, [r0] <== NOT EXECUTED 3000d91c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d920: 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; 3000d924: e5902010 ldr r2, [r0, #16] 3000d928: e59f0050 ldr r0, [pc, #80] ; 3000d980 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 3000d92c: e5922034 ldr r2, [r2, #52] ; 0x34 3000d930: 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 = 3000d934: e8810005 stm r1, {r0, r2} rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 3000d938: e5932030 ldr r2, [r3, #48] ; 0x30 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; 3000d93c: e3a00000 mov r0, #0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 3000d940: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 3000d944: e1d323b4 ldrh r2, [r3, #52] ; 0x34 3000d948: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 3000d94c: e5932038 ldr r2, [r3, #56] ; 0x38 3000d950: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 3000d954: e1d323bc ldrh r2, [r3, #60] ; 0x3c 3000d958: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 3000d95c: e1d323be ldrh r2, [r3, #62] ; 0x3e 3000d960: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 3000d964: e5932040 ldr r2, [r3, #64] ; 0x40 3000d968: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 3000d96c: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; 3000d970: 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; 3000d974: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 3000d978: e5813038 str r3, [r1, #56] ; 0x38 return 0; } 3000d97c: e8bd8800 pop {fp, pc} =============================================================================== 30005d58 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30005d58: e92d40f0 push {r4, r5, r6, r7, lr} 30005d5c: e1a05000 mov r5, r0 30005d60: 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 ); 30005d64: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30005d68: e1a06001 mov r6, r1 30005d6c: 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 ); 30005d70: eb002d1b bl 300111e4 30005d74: e28d4004 add r4, sp, #4 30005d78: e1a01000 mov r1, r0 30005d7c: e1a02004 mov r2, r4 30005d80: e28d303c add r3, sp, #60 ; 0x3c 30005d84: e1a00007 mov r0, r7 30005d88: eb001e5c bl 3000d700 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30005d8c: e1a00006 mov r0, r6 30005d90: eb002cff bl 30011194 if (info.sym_link.name == NULL) { 30005d94: 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); 30005d98: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 30005d9c: 0a00000b beq 30005dd0 new_node = IMFS_create_node( parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30005da0: 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( 30005da4: e58d3000 str r3, [sp] 30005da8: e1a00005 mov r0, r5 30005dac: e3a01004 mov r1, #4 30005db0: e1a02004 mov r2, r4 30005db4: e59f302c ldr r3, [pc, #44] ; 30005de8 30005db8: eb001bed bl 3000cd74 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30005dbc: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 30005dc0: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30005dc4: 1a000005 bne 30005de0 free(info.sym_link.name); 30005dc8: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 30005dcc: eb000134 bl 300062a4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30005dd0: eb002919 bl 3001023c <__errno> <== NOT EXECUTED 30005dd4: e3a0300c mov r3, #12 <== NOT EXECUTED 30005dd8: e5803000 str r3, [r0] <== NOT EXECUTED 30005ddc: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 30005de0: e28dd040 add sp, sp, #64 ; 0x40 30005de4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30005dec : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005dec: 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; 30005df0: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005df4: e24dd01c sub sp, sp, #28 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005df8: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005dfc: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005e00: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005e04: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005e08: 1a000024 bne 30005ea0 if ( !node->info.hard_link.link_node ) 30005e0c: e595e050 ldr lr, [r5, #80] ; 0x50 <== NOT EXECUTED 30005e10: e35e0000 cmp lr, #0 <== NOT EXECUTED 30005e14: 1a000003 bne 30005e28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 30005e18: eb002907 bl 3001023c <__errno> <== NOT EXECUTED 30005e1c: e3a03016 mov r3, #22 <== NOT EXECUTED 30005e20: e5803000 str r3, [r0] <== NOT EXECUTED 30005e24: ea000023 b 30005eb8 <== NOT EXECUTED the_link = *loc; 30005e28: e1a0c00d mov ip, sp <== NOT EXECUTED 30005e2c: e1a07001 mov r7, r1 <== NOT EXECUTED 30005e30: e8b7000f ldm r7!, {r0, r1, r2, r3} <== NOT EXECUTED 30005e34: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30005e38: e5973000 ldr r3, [r7] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; 30005e3c: e28d701c add r7, sp, #28 <== NOT EXECUTED 30005e40: e527e01c str lr, [r7, #-28]! <== NOT EXECUTED IMFS_Set_handlers( &the_link ); 30005e44: 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; 30005e48: e58c3000 str r3, [ip] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 30005e4c: eb001c28 bl 3000cef4 <== 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) 30005e50: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED 30005e54: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED 30005e58: e3520001 cmp r2, #1 <== NOT EXECUTED 30005e5c: 1a000007 bne 30005e80 <== NOT EXECUTED { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 30005e60: e1a00006 mov r0, r6 <== NOT EXECUTED 30005e64: e1a0100d mov r1, sp <== NOT EXECUTED 30005e68: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30005e6c: e1a0e00f mov lr, pc <== NOT EXECUTED 30005e70: e593f034 ldr pc, [r3, #52] ; 0x34 <== NOT EXECUTED if ( result != 0 ) 30005e74: e3500000 cmp r0, #0 <== NOT EXECUTED 30005e78: 0a000008 beq 30005ea0 <== NOT EXECUTED 30005e7c: ea00000d b 30005eb8 <== NOT EXECUTED return -1; } else { node->info.hard_link.link_node->st_nlink --; 30005e80: e2422001 sub r2, r2, #1 <== NOT EXECUTED 30005e84: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( node->info.hard_link.link_node ); 30005e88: e28d0014 add r0, sp, #20 <== NOT EXECUTED 30005e8c: e3a01000 mov r1, #0 <== NOT EXECUTED 30005e90: eb00012c bl 30006348 <== NOT EXECUTED 30005e94: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED 30005e98: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 30005e9c: 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 ); 30005ea0: e5943008 ldr r3, [r4, #8] 30005ea4: e1a00006 mov r0, r6 30005ea8: e1a01004 mov r1, r4 30005eac: e1a0e00f mov lr, pc 30005eb0: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 30005eb4: ea000000 b 30005ebc if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 30005eb8: e3e00000 mvn r0, #0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 30005ebc: e28dd01c add sp, sp, #28 30005ec0: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30005ec4 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30005ec4: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30005ec8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30005ecc: e593204c ldr r2, [r3, #76] ; 0x4c 30005ed0: e3520001 cmp r2, #1 30005ed4: 0a000002 beq 30005ee4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30005ed8: eb0028d7 bl 3001023c <__errno> <== NOT EXECUTED 30005edc: e3a03014 mov r3, #20 <== NOT EXECUTED 30005ee0: ea000004 b 30005ef8 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 30005ee4: e593205c ldr r2, [r3, #92] ; 0x5c 30005ee8: e3520000 cmp r2, #0 30005eec: 1a000004 bne 30005f04 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 30005ef0: eb0028d1 bl 3001023c <__errno> <== NOT EXECUTED 30005ef4: e3a03016 mov r3, #22 <== NOT EXECUTED 30005ef8: e5803000 str r3, [r0] <== NOT EXECUTED 30005efc: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005f00: 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; 30005f04: e3a00000 mov r0, #0 30005f08: e583005c str r0, [r3, #92] ; 0x5c return 0; } 30005f0c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30005f10 : int IMFS_utime( rtems_filesystem_location_info_t *pathloc, /* IN */ time_t actime, /* IN */ time_t modtime /* IN */ ) { 30005f10: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 30005f14: e5904000 ldr r4, [r0] <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; the_jnode->stat_ctime = time( NULL ); 30005f18: e3a00000 mov r0, #0 <== NOT EXECUTED { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; the_jnode->stat_atime = actime; 30005f1c: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_jnode->stat_mtime = modtime; 30005f20: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED the_jnode->stat_ctime = time( NULL ); 30005f24: eb002d01 bl 30011330