=============================================================================== 30006b3c : static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 30006b3c: e3a02000 mov r2, #0 <== NOT EXECUTED 30006b40: e3a03000 mov r3, #0 <== NOT EXECUTED 30006b44: e5802080 str r2, [r0, #128] ; 0x80 <== NOT EXECUTED 30006b48: e5803084 str r3, [r0, #132] ; 0x84 <== NOT EXECUTED #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); #else the_thread->cpu_time_used = 0; #endif } 30006b4c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30005a3c : static inline void Dump_Line( const unsigned char *buffer, int length ) { 30005a3c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 30005a40: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; 30005a44: e3a05000 mov r5, #0 <== NOT EXECUTED 30005a48: e28d4078 add r4, sp, #120 ; 0x78 <== NOT EXECUTED static inline void Dump_Line( const unsigned char *buffer, int length ) { 30005a4c: e1a08000 mov r8, r0 <== NOT EXECUTED 30005a50: e1a07001 mov r7, r1 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; 30005a54: e5645078 strb r5, [r4, #-120]! ; 0x78 <== NOT EXECUTED for( i=0 ; i <== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 30005a5c: e7d83005 ldrb r3, [r8, r5] <== NOT EXECUTED 30005a60: e1a0000d mov r0, sp <== NOT EXECUTED 30005a64: e59f10b4 ldr r1, [pc, #180] ; 30005b20 <== NOT EXECUTED 30005a68: e1a0200d mov r2, sp <== NOT EXECUTED 30005a6c: eb002f34 bl 30011744 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i <== NOT EXECUTED 30005a7c: e1c75fc7 bic r5, r7, r7, asr #31 <== NOT EXECUTED 30005a80: e1a06005 mov r6, r5 <== NOT EXECUTED 30005a84: ea000002 b 30005a94 <== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 30005a88: e59f1094 ldr r1, [pc, #148] ; 30005b24 <== NOT EXECUTED 30005a8c: eb002f85 bl 300118a8 <== NOT EXECUTED line_buffer[0] = '\0'; for( i=0 ; i <== NOT EXECUTED strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 30005aa0: e59f1080 ldr r1, [pc, #128] ; 30005b28 <== NOT EXECUTED 30005aa4: eb002f7f bl 300118a8 <== 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 ] : '.' ); 30005ab8: e7d83006 ldrb r3, [r8, r6] <== NOT EXECUTED 30005abc: e59a2000 ldr r2, [sl] <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005ad0: e3120097 tst r2, #151 ; 0x97 <== NOT EXECUTED 30005ad4: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED 30005ad8: e1a0200d mov r2, sp <== NOT EXECUTED 30005adc: eb002f18 bl 30011744 <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005aec: ea000002 b 30005afc <== NOT EXECUTED sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 30005af0: e59f103c ldr r1, [pc, #60] ; 30005b34 <== NOT EXECUTED 30005af4: eb002f6b bl 300118a8 <== NOT EXECUTED strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 30005b08: e59f1028 ldr r1, [pc, #40] ; 30005b38 <== NOT EXECUTED 30005b0c: eb002f65 bl 300118a8 <== NOT EXECUTED printk( line_buffer ); 30005b10: e1a0000d mov r0, sp <== NOT EXECUTED 30005b14: eb0005a6 bl 300071b4 <== NOT EXECUTED } 30005b18: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED 30005b1c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 3000dc5c : ) { IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { 3000dc5c: e3530020 cmp r3, #32 const char *name, size_t namelen, mode_t mode, const IMFS_types_union *info ) { 3000dc60: e92d41f3 push {r0, r1, r4, r5, r6, r7, r8, lr} 3000dc64: e1a05000 mov r5, r0 3000dc68: e1a04001 mov r4, r1 3000dc6c: e1a08002 mov r8, r2 3000dc70: e1a07003 mov r7, r3 IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { 3000dc74: 9a000004 bls 3000dc8c errno = ENAMETOOLONG; 3000dc78: eb000bf0 bl 30010c40 <__errno> <== NOT EXECUTED 3000dc7c: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000dc80: e5803000 str r3, [r0] <== NOT EXECUTED return NULL; 3000dc84: e3a00000 mov r0, #0 <== NOT EXECUTED 3000dc88: ea000027 b 3000dd2c <== NOT EXECUTED } gettimeofday( &tv, 0 ); 3000dc8c: e3a01000 mov r1, #0 3000dc90: e1a0000d mov r0, sp 3000dc94: ebffe25a bl 30006604 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 3000dc98: e3a00001 mov r0, #1 3000dc9c: e3a01064 mov r1, #100 ; 0x64 3000dca0: ebffe198 bl 30006308 if ( !node ) { 3000dca4: e2506000 subs r6, r0, #0 3000dca8: 1a000004 bne 3000dcc0 errno = ENOMEM; 3000dcac: eb000be3 bl 30010c40 <__errno> 3000dcb0: e3a0300c mov r3, #12 3000dcb4: e5803000 str r3, [r0] return NULL; 3000dcb8: e1a00006 mov r0, r6 3000dcbc: ea00001a b 3000dd2c } /* * Fill in the basic information */ node->reference_count = 1; 3000dcc0: e3a03001 mov r3, #1 node->st_nlink = 1; memcpy( node->name, name, namelen ); 3000dcc4: e1a02007 mov r2, r7 } /* * Fill in the basic information */ node->reference_count = 1; 3000dcc8: e1c633b4 strh r3, [r6, #52] ; 0x34 node->st_nlink = 1; 3000dccc: e1c633b6 strh r3, [r6, #54] ; 0x36 memcpy( node->name, name, namelen ); 3000dcd0: e1a01008 mov r1, r8 3000dcd4: e286000c add r0, r6, #12 3000dcd8: eb000e12 bl 30011528 node->name [namelen] = '\0'; 3000dcdc: e0867007 add r7, r6, r7 3000dce0: e3a03000 mov r3, #0 3000dce4: e5c7300c strb r3, [r7, #12] node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; 3000dce8: e1c633bc strh r3, [r6, #60] ; 0x3c node->st_gid = 0; 3000dcec: e1c633be strh r3, [r6, #62] ; 0x3e /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; 3000dcf0: e59d3000 ldr r3, [sp] node->control = node_control; /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 3000dcf4: e59d2020 ldr r2, [sp, #32] /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; 3000dcf8: e5863040 str r3, [r6, #64] ; 0x40 node->stat_mtime = (time_t) tv.tv_sec; 3000dcfc: e5863044 str r3, [r6, #68] ; 0x44 node->stat_ctime = (time_t) tv.tv_sec; 3000dd00: e5863048 str r3, [r6, #72] ; 0x48 node->st_ino = ++fs_info->ino_count; 3000dd04: e5953004 ldr r3, [r5, #4] */ node->reference_count = 1; node->st_nlink = 1; memcpy( node->name, name, namelen ); node->name [namelen] = '\0'; node->control = node_control; 3000dd08: e586404c str r4, [r6, #76] ; 0x4c */ node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; 3000dd0c: e2833001 add r3, r3, #1 node->control = node_control; /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 3000dd10: e5862030 str r2, [r6, #48] ; 0x30 node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; return (*node->control->node_initialize)( node, info ); 3000dd14: e1a00006 mov r0, r6 */ node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; 3000dd18: e5853004 str r3, [r5, #4] return (*node->control->node_initialize)( node, info ); 3000dd1c: e59d1024 ldr r1, [sp, #36] ; 0x24 */ node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; 3000dd20: e5863038 str r3, [r6, #56] ; 0x38 return (*node->control->node_initialize)( node, info ); 3000dd24: e1a0e00f mov lr, pc 3000dd28: e594f008 ldr pc, [r4, #8] } 3000dd2c: e8bd81fc pop {r2, r3, r4, r5, r6, r7, r8, pc} =============================================================================== 3000dc30 : int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { 3000dc30: 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 *) loc->node_access; 3000dc34: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000dc38: 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; 3000dc3c: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; 3000dc40: e1c423be strh r2, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000dc44: e3a01000 mov r1, #0 <== NOT EXECUTED 3000dc48: ebffe26d bl 30006604 <== NOT EXECUTED 3000dc4c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 3000dc50: e3a00000 mov r0, #0 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000dc54: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000dc58: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED =============================================================================== 30008550 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 30008550: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30008554: e59f513c ldr r5, [pc, #316] ; 30008698 30008558: e1a06000 mov r6, r0 3000855c: e1a07001 mov r7, r1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 30008560: e5904050 ldr r4, [r0, #80] ; 0x50 30008564: e1a08005 mov r8, r5 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 30008568: ea000046 b 30008688 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 3000856c: e5953000 ldr r3, [r5] 30008570: e59f0124 ldr r0, [pc, #292] ; 3000869c 30008574: e5931008 ldr r1, [r3, #8] 30008578: eb0031ca bl 30014ca8 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 3000857c: e28aa001 add sl, sl, #1 30008580: ea000000 b 30008588 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 30008584: e3a0a000 mov sl, #0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 30008588: e15a0007 cmp sl, r7 3000858c: dafffff6 ble 3000856c IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 30008590: e5983000 ldr r3, [r8] 30008594: e284000c add r0, r4, #12 30008598: e5931008 ldr r1, [r3, #8] 3000859c: eb0031c1 bl 30014ca8 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 300085a0: e594304c ldr r3, [r4, #76] ; 0x4c 300085a4: e5932000 ldr r2, [r3] switch( IMFS_type( the_jnode ) ) { 300085a8: e3520006 cmp r2, #6 300085ac: 979ff102 ldrls pc, [pc, r2, lsl #2] 300085b0: ea000026 b 30008650 <== NOT EXECUTED 300085b4: 300085d0 .word 0x300085d0 <== NOT EXECUTED 300085b8: 300085e4 .word 0x300085e4 <== NOT EXECUTED 300085bc: 30008630 .word 0x30008630 <== NOT EXECUTED 300085c0: 30008630 .word 0x30008630 <== NOT EXECUTED 300085c4: 30008618 .word 0x30008618 <== NOT EXECUTED 300085c8: 300085fc .word 0x300085fc <== NOT EXECUTED 300085cc: 3000863c .word 0x3000863c <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 300085d0: e5953000 ldr r3, [r5] 300085d4: e3a0002f mov r0, #47 ; 0x2f 300085d8: e5931008 ldr r1, [r3, #8] 300085dc: eb00317c bl 30014bd4 300085e0: ea00001f b 30008664 break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 300085e4: e5953000 ldr r3, [r5] 300085e8: e59f10b0 ldr r1, [pc, #176] ; 300086a0 300085ec: e5930008 ldr r0, [r3, #8] 300085f0: e5942050 ldr r2, [r4, #80] ; 0x50 300085f4: e5943054 ldr r3, [r4, #84] ; 0x54 300085f8: ea000004 b 30008610 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 300085fc: e5953000 ldr r3, [r5] 30008600: e59f109c ldr r1, [pc, #156] ; 300086a4 30008604: e5930008 ldr r0, [r3, #8] 30008608: e5942050 ldr r2, [r4, #80] ; 0x50 3000860c: e5943058 ldr r3, [r4, #88] ; 0x58 30008610: eb00314f bl 30014b54 30008614: ea000012 b 30008664 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 30008618: e5953000 ldr r3, [r5] <== NOT EXECUTED 3000861c: e59f1084 ldr r1, [pc, #132] ; 300086a8 <== NOT EXECUTED 30008620: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30008624: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 30008628: eb003149 bl 30014b54 <== NOT EXECUTED 3000862c: ea00000c b 30008664 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 30008630: e5953000 ldr r3, [r5] <== NOT EXECUTED 30008634: e59f0070 ldr r0, [pc, #112] ; 300086ac <== NOT EXECUTED 30008638: ea000001 b 30008644 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 3000863c: e5953000 ldr r3, [r5] <== NOT EXECUTED 30008640: e59f0068 ldr r0, [pc, #104] ; 300086b0 <== NOT EXECUTED 30008644: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 30008648: eb003196 bl 30014ca8 <== NOT EXECUTED 3000864c: ea000006 b 3000866c <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); 30008650: e5953000 ldr r3, [r5] <== NOT EXECUTED 30008654: e59f1058 ldr r1, [pc, #88] ; 300086b4 <== NOT EXECUTED 30008658: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3000865c: eb00313c bl 30014b54 <== NOT EXECUTED 30008660: ea000001 b 3000866c <== NOT EXECUTED return; } puts(""); 30008664: e59f004c ldr r0, [pc, #76] ; 300086b8 30008668: eb003853 bl 300167bc } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 3000866c: e594304c ldr r3, [r4, #76] ; 0x4c the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) 30008670: e5933000 ldr r3, [r3] 30008674: e3530000 cmp r3, #0 IMFS_dump_directory( the_jnode, level + 1 ); 30008678: 01a00004 moveq r0, r4 3000867c: 02871001 addeq r1, r7, #1 30008680: 0bffffb2 bleq 30008550 the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 30008684: e5944000 ldr r4, [r4] RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); 30008688: e2863054 add r3, r6, #84 ; 0x54 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); 3000868c: e1540003 cmp r4, r3 30008690: 1affffbb bne 30008584 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) IMFS_dump_directory( the_jnode, level + 1 ); } } 30008694: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 3000dd98 : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000dd98: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; 3000dd9c: e5905020 ldr r5, [r0, #32] rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000dda0: e1a06002 mov r6, r2 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 3000dda4: e1d523be ldrh r2, [r5, #62] ; 0x3e rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000dda8: e1a07003 mov r7, r3 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 3000ddac: e1d533bc ldrh r3, [r5, #60] ; 0x3c 3000ddb0: e58d2000 str r2, [sp] 3000ddb4: e3a01001 mov r1, #1 3000ddb8: e5952030 ldr r2, [r5, #48] ; 0x30 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000ddbc: e1a04000 mov r4, r0 rtems_filesystem_eval_path_generic_status status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_DONE; rtems_filesystem_location_info_t *currentloc = rtems_filesystem_eval_path_get_currentloc( ctx ); IMFS_jnode_t *dir = currentloc->node_access; bool access_ok = rtems_filesystem_eval_path_check_access( 3000ddc0: eb0002a9 bl 3000e86c dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 3000ddc4: e3500000 cmp r0, #0 3000ddc8: 0a000051 beq 3000df14 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 3000ddcc: e3570001 cmp r7, #1 3000ddd0: 1a000051 bne 3000df1c 3000ddd4: e5d63000 ldrb r3, [r6] 3000ddd8: e353002e cmp r3, #46 ; 0x2e 3000dddc: 1a000050 bne 3000df24 3000dde0: ea000015 b 3000de3c static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 3000dde4: e5d63000 ldrb r3, [r6] 3000dde8: e353002e cmp r3, #46 ; 0x2e 3000ddec: 1a00004c bne 3000df24 3000ddf0: e5d63001 ldrb r3, [r6, #1] 3000ddf4: e353002e cmp r3, #46 ; 0x2e { if ( rtems_filesystem_is_current_directory( token, tokenlen ) ) { return dir; } else { if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; 3000ddf8: 05958008 ldreq r8, [r5, #8] 3000ddfc: 1a000048 bne 3000df24 3000de00: ea00000e b 3000de40 rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { IMFS_jnode_t *entry = (IMFS_jnode_t *) current; bool match = strncmp( entry->name, token, tokenlen ) == 0 3000de04: e288000c add r0, r8, #12 3000de08: e1a01006 mov r1, r6 3000de0c: e1a02007 mov r2, r7 3000de10: eb00115e bl 30012390 && entry->name [tokenlen] == '\0'; 3000de14: e3500000 cmp r0, #0 3000de18: 1a000044 bne 3000df30 3000de1c: e0883007 add r3, r8, r7 3000de20: e5d3300c ldrb r3, [r3, #12] 3000de24: e3530000 cmp r3, #0 3000de28: 0a000004 beq 3000de40 3000de2c: ea00003f b 3000df30 } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); while ( current != tail ) { 3000de30: e158000a cmp r8, sl 3000de34: 1afffff2 bne 3000de04 3000de38: ea000033 b 3000df0c static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 3000de3c: e1a08005 mov r8, r5 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 3000de40: e3580000 cmp r8, #0 3000de44: 0a000030 beq 3000df0c rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 3000de48: e598304c ldr r3, [r8, #76] ; 0x4c bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 3000de4c: e5940004 ldr r0, [r4, #4] 3000de50: e5933000 ldr r3, [r3] 3000de54: e2700001 rsbs r0, r0, #1 3000de58: 33a00000 movcc r0, #0 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 3000de5c: e3a01000 mov r1, #0 bool follow_sym_link = (eval_flags & RTEMS_FS_FOLLOW_SYM_LINK) != 0; IMFS_jnode_types_t type = IMFS_type( entry ); rtems_filesystem_eval_path_clear_token( ctx ); if ( type == IMFS_HARD_LINK && (follow_hard_link || !terminal)) { 3000de60: e3530002 cmp r3, #2 static inline int rtems_filesystem_eval_path_get_flags( const rtems_filesystem_eval_path_context_t *ctx ) { return ctx->flags; 3000de64: e5942010 ldr r2, [r4, #16] static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 3000de68: e584100c str r1, [r4, #12] 3000de6c: 1a000005 bne 3000de88 3000de70: e3120008 tst r2, #8 <== NOT EXECUTED 3000de74: 1a000001 bne 3000de80 <== NOT EXECUTED 3000de78: e1500001 cmp r0, r1 <== NOT EXECUTED 3000de7c: 1a00002d bne 3000df38 <== NOT EXECUTED entry = entry->info.hard_link.link_node; 3000de80: e5988050 ldr r8, [r8, #80] ; 0x50 <== NOT EXECUTED 3000de84: ea00002b b 3000df38 <== NOT EXECUTED } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 3000de88: e3530003 cmp r3, #3 3000de8c: 1a00000b bne 3000dec0 3000de90: e3120010 tst r2, #16 3000de94: 1a000001 bne 3000dea0 3000de98: e3500000 cmp r0, #0 <== NOT EXECUTED 3000de9c: 1a000025 bne 3000df38 <== NOT EXECUTED const char *target = entry->info.sym_link.name; 3000dea0: e5985050 ldr r5, [r8, #80] ; 0x50 rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 3000dea4: e1a00005 mov r0, r5 3000dea8: eb001120 bl 30012330 3000deac: e1a01005 mov r1, r5 3000deb0: e1a02000 mov r2, r0 3000deb4: e1a00004 mov r0, r4 3000deb8: ebffe68e bl 300078f8 3000debc: ea000014 b 3000df14 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 3000dec0: e3530000 cmp r3, #0 3000dec4: 1a00001b bne 3000df38 if ( node->info.directory.mt_fs != NULL ) { 3000dec8: e598305c ldr r3, [r8, #92] ; 0x5c 3000decc: e3530000 cmp r3, #0 3000ded0: 0a000018 beq 3000df38 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 3000ded4: e1d823be ldrh r2, [r8, #62] ; 0x3e { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { fs_root_ptr = &node->info.directory.mt_fs->mt_fs_root; 3000ded8: e2835024 add r5, r3, #36 ; 0x24 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 3000dedc: e1d833bc ldrh r3, [r8, #60] ; 0x3c 3000dee0: e58d2000 str r2, [sp] 3000dee4: e1a00004 mov r0, r4 3000dee8: e3a01001 mov r1, #1 3000deec: e5982030 ldr r2, [r8, #48] ; 0x30 3000def0: eb00025d bl 3000e86c RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 3000def4: e3500000 cmp r0, #0 3000def8: 0a000005 beq 3000df14 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 3000defc: e1a00004 mov r0, r4 3000df00: e1a01005 mov r1, r5 3000df04: ebffe661 bl 30007890 3000df08: ea000001 b 3000df14 } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 3000df0c: e3a00002 mov r0, #2 3000df10: ea000000 b 3000df18 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 3000df14: e3a00001 mov r0, #1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 3000df18: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 3000df1c: e3570002 cmp r7, #2 3000df20: 0affffaf beq 3000dde4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 3000df24: e5958050 ldr r8, [r5, #80] ; 0x50 if ( rtems_filesystem_is_parent_directory( token, tokenlen ) ) { return dir->Parent; } else { rtems_chain_control *entries = &dir->info.directory.Entries; rtems_chain_node *current = rtems_chain_first( entries ); rtems_chain_node *tail = rtems_chain_tail( entries ); 3000df28: e285a054 add sl, r5, #84 ; 0x54 3000df2c: eaffffbf b 3000de30 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 3000df30: e5988000 ldr r8, [r8] 3000df34: eaffffbd b 3000de30 } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 3000df38: e1d533b4 ldrh r3, [r5, #52] ; 0x34 3000df3c: e2433001 sub r3, r3, #1 3000df40: e1c533b4 strh r3, [r5, #52] ; 0x34 ++entry->reference_count; 3000df44: e1d833b4 ldrh r3, [r8, #52] ; 0x34 3000df48: e2833001 add r3, r3, #1 3000df4c: e1c833b4 strh r3, [r8, #52] ; 0x34 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 3000df50: e598304c ldr r3, [r8, #76] ; 0x4c currentloc->node_access = entry; 3000df54: e5848020 str r8, [r4, #32] 3000df58: e5933004 ldr r3, [r3, #4] 3000df5c: e5843028 str r3, [r4, #40] ; 0x28 3000df60: eaffffec b 3000df18 =============================================================================== 3000df74 : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000df74: 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; 3000df78: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000df7c: 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); 3000df80: 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 ); 3000df84: 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); 3000df88: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 3000df8c: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000df90: e1833a21 orr r3, r3, r1, lsr #20 <== NOT EXECUTED 3000df94: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000df98: e3a01000 mov r1, #0 <== NOT EXECUTED 3000df9c: ebffe198 bl 30006604 <== NOT EXECUTED 3000dfa0: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 3000dfa4: 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 ); 3000dfa8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000dfac: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED =============================================================================== 300068b0 : void *buffer ) { int err; if (command == FIONBIO) { 300068b0: e59fc06c ldr ip, [pc, #108] ; 30006924 static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { 300068b4: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { 300068b8: e151000c cmp r1, ip static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { 300068bc: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { 300068c0: 1a00000a bne 300068f0 if (buffer == NULL) 300068c4: e3520000 cmp r2, #0 300068c8: 0a00000e beq 30006908 err = -EFAULT; else { if (*(int *)buffer) 300068cc: e5924000 ldr r4, [r2] 300068d0: e593200c ldr r2, [r3, #12] 300068d4: e3540000 cmp r4, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; 300068d8: 13822001 orrne r2, r2, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300068dc: 03c22001 biceq r2, r2, #1 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 300068e0: 1583200c strne r2, [r3, #12] 300068e4: 13a04000 movne r4, #0 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 300068e8: 0583200c streq r2, [r3, #12] 300068ec: ea00000a b 3000691c return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 300068f0: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED 300068f4: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 300068f8: eb002774 bl 300106d0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 300068fc: e2504000 subs r4, r0, #0 <== NOT EXECUTED 30006900: aa000005 bge 3000691c <== NOT EXECUTED 30006904: ea000000 b 3000690c <== NOT EXECUTED { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; 30006908: e3e0400d mvn r4, #13 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 3000690c: eb002efc bl 30012504 <__errno> <== NOT EXECUTED 30006910: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006914: e5804000 str r4, [r0] <== NOT EXECUTED 30006918: e3e04000 mvn r4, #0 <== NOT EXECUTED } 3000691c: e1a00004 mov r0, r4 30006920: e8bd8010 pop {r4, pc} =============================================================================== 3000687c : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 3000687c: e1a01000 mov r1, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 30006880: e5900018 ldr r0, [r0, #24] rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 30006884: e92d4010 push {r4, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 30006888: e2800050 add r0, r0, #80 ; 0x50 3000688c: eb0025e8 bl 30010034 IMFS_FIFO_RETURN(err); 30006890: e2504000 subs r4, r0, #0 30006894: aa000003 bge 300068a8 30006898: eb002f19 bl 30012504 <__errno> <== NOT EXECUTED 3000689c: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 300068a0: e5804000 str r4, [r0] <== NOT EXECUTED 300068a4: e3e04000 mvn r4, #0 <== NOT EXECUTED } 300068a8: e1a00004 mov r0, r4 300068ac: e8bd8010 pop {r4, pc} =============================================================================== 30005cb4 : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 30005cb4: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} 30005cb8: e1a04000 mov r4, r0 30005cbc: e1a06001 mov r6, r1 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 30005cc0: e3a00001 mov r0, #1 30005cc4: e3a01024 mov r1, #36 ; 0x24 int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { 30005cc8: e1a07002 mov r7, r2 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); 30005ccc: eb00018d bl 30006308 if ( fs_info != NULL ) { 30005cd0: e2505000 subs r5, r0, #0 30005cd4: 0a000020 beq 30005d5c IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 30005cd8: e59f30bc ldr r3, [pc, #188] ; 30005d9c 30005cdc: e1a00005 mov r0, r5 30005ce0: e5932000 ldr r2, [r3] memcpy( 30005ce4: e1a01007 mov r1, r7 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; 30005ce8: e4802008 str r2, [r0], #8 30005cec: e2822001 add r2, r2, #1 30005cf0: e5832000 str r2, [r3] memcpy( 30005cf4: e3a0201c mov r2, #28 30005cf8: eb002e0a bl 30011528 fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( 30005cfc: e59f309c ldr r3, [pc, #156] ; 30005da0 30005d00: e1a00005 mov r0, r5 30005d04: e58d3000 str r3, [sp] 30005d08: e3a03000 mov r3, #0 30005d0c: e58d3004 str r3, [sp, #4] 30005d10: e5951008 ldr r1, [r5, #8] 30005d14: e59f2088 ldr r2, [pc, #136] ; 30005da4 30005d18: eb001fcf bl 3000dc5c "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { 30005d1c: e3500000 cmp r0, #0 30005d20: 0a00000d beq 30005d5c mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; 30005d24: e59f307c ldr r3, [pc, #124] ; 30005da8 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 30005d28: e590204c ldr r2, [r0, #76] ; 0x4c 30005d2c: e584302c str r3, [r4, #44] ; 0x2c 30005d30: e5922004 ldr r2, [r2, #4] mt_entry->mt_fs_root->location.node_access = root_node; 30005d34: e5943024 ldr r3, [r4, #36] ; 0x24 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; 30005d38: e5845008 str r5, [r4, #8] mt_entry->ops = op_table; 30005d3c: e584600c str r6, [r4, #12] 30005d40: e5832010 str r2, [r3, #16] mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; 30005d44: e5830008 str r0, [r3, #8] errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( 30005d48: e59f305c ldr r3, [pc, #92] ; 30005dac 30005d4c: e3a01006 mov r1, #6 30005d50: e5933000 ldr r3, [r3] int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 30005d54: e3a02010 mov r2, #16 30005d58: ea000004 b 30005d70 } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; 30005d5c: eb002bb7 bl 30010c40 <__errno> <== NOT EXECUTED 30005d60: e3a0300c mov r3, #12 <== NOT EXECUTED 30005d64: e5803000 str r3, [r0] <== NOT EXECUTED 30005d68: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005d6c: ea000009 b 30005d98 <== NOT EXECUTED /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 30005d70: e1520003 cmp r2, r3 30005d74: 0a000004 beq 30005d8c is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 30005d78: ca000002 bgt 30005d88 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 30005d7c: e2511001 subs r1, r1, #1 30005d80: e1a02082 lsl r2, r2, #1 30005d84: 1afffff9 bne 30005d70 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 30005d88: e3a03080 mov r3, #128 ; 0x80 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 30005d8c: e59f2008 ldr r2, [pc, #8] ; 30005d9c const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { static int imfs_instance; int rv = 0; 30005d90: e3a00000 mov r0, #0 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 30005d94: e5823004 str r3, [r2, #4] IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } 30005d98: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} =============================================================================== 30007908 : bool IMFS_is_imfs_instance( const rtems_filesystem_location_info_t *loc ) { const char *type = loc->mt_entry->type; 30007908: e5903014 ldr r3, [r0, #20] } bool IMFS_is_imfs_instance( const rtems_filesystem_location_info_t *loc ) { 3000790c: e92d4010 push {r4, lr} const char *type = loc->mt_entry->type; 30007910: e5934034 ldr r4, [r3, #52] ; 0x34 return strcmp(type, RTEMS_FILESYSTEM_TYPE_IMFS) == 0 30007914: e59f102c ldr r1, [pc, #44] ; 30007948 30007918: e1a00004 mov r0, r4 3000791c: eb003a97 bl 30016380 || strcmp(type, RTEMS_FILESYSTEM_TYPE_MINIIMFS) == 0; 30007920: e3500000 cmp r0, #0 30007924: 0a000005 beq 30007940 30007928: e1a00004 mov r0, r4 <== NOT EXECUTED 3000792c: e59f1018 ldr r1, [pc, #24] ; 3000794c <== NOT EXECUTED 30007930: eb003a92 bl 30016380 <== NOT EXECUTED 30007934: e2700001 rsbs r0, r0, #1 <== NOT EXECUTED 30007938: 33a00000 movcc r0, #0 <== NOT EXECUTED 3000793c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30007940: e3a00001 mov r0, #1 } 30007944: e8bd8010 pop {r4, pc} =============================================================================== 30005dfc : const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen ) { 30005dfc: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_types_union info; IMFS_jnode_t *new_node; IMFS_jnode_t *target; target = targetloc->node_access; 30005e00: e5914008 ldr r4, [r1, #8] <== NOT EXECUTED const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen ) { 30005e04: e24dd024 sub sp, sp, #36 ; 0x24 <== NOT EXECUTED info.hard_link.link_node = target; /* * Verify this node can be linked to. */ if ( target->st_nlink >= LINK_MAX ) 30005e08: e1d413b6 ldrh r1, [r4, #54] ; 0x36 <== NOT EXECUTED IMFS_types_union info; IMFS_jnode_t *new_node; IMFS_jnode_t *target; target = targetloc->node_access; info.hard_link.link_node = target; 30005e0c: e58d4008 str r4, [sp, #8] <== NOT EXECUTED /* * Verify this node can be linked to. */ if ( target->st_nlink >= LINK_MAX ) 30005e10: e3510007 cmp r1, #7 <== NOT EXECUTED 30005e14: 9a000002 bls 30005e24 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EMLINK ); 30005e18: eb002b88 bl 30010c40 <__errno> <== NOT EXECUTED 30005e1c: e3a0301f mov r3, #31 <== NOT EXECUTED 30005e20: ea00000b b 30005e54 <== NOT EXECUTED size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 30005e24: e5901014 ldr r1, [r0, #20] <== NOT EXECUTED (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 30005e28: e59fc068 ldr ip, [pc, #104] ; 30005e98 <== NOT EXECUTED 30005e2c: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED 30005e30: e58dc000 str ip, [sp] <== NOT EXECUTED parentloc, IMFS_HARD_LINK, name, namelen, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30005e34: e28dc008 add ip, sp, #8 <== NOT EXECUTED 30005e38: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 30005e3c: e5911010 ldr r1, [r1, #16] <== NOT EXECUTED 30005e40: eb001fba bl 3000dd30 <== NOT EXECUTED ); if ( !new_node ) 30005e44: e3500000 cmp r0, #0 <== NOT EXECUTED 30005e48: 1a000004 bne 30005e60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 30005e4c: eb002b7b bl 30010c40 <__errno> <== NOT EXECUTED 30005e50: e3a0300c mov r3, #12 <== NOT EXECUTED 30005e54: e5803000 str r3, [r0] <== NOT EXECUTED 30005e58: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005e5c: ea00000b b 30005e90 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ target->reference_count++; 30005e60: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED target->st_nlink++; IMFS_update_ctime( target ); 30005e64: e28d001c add r0, sp, #28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ target->reference_count++; 30005e68: e2833001 add r3, r3, #1 <== NOT EXECUTED 30005e6c: e1c433b4 strh r3, [r4, #52] ; 0x34 <== NOT EXECUTED target->st_nlink++; 30005e70: e1d433b6 ldrh r3, [r4, #54] ; 0x36 <== NOT EXECUTED IMFS_update_ctime( target ); 30005e74: e3a01000 mov r1, #0 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ target->reference_count++; target->st_nlink++; 30005e78: e2833001 add r3, r3, #1 <== NOT EXECUTED 30005e7c: e1c433b6 strh r3, [r4, #54] ; 0x36 <== NOT EXECUTED IMFS_update_ctime( target ); 30005e80: eb0001df bl 30006604 <== NOT EXECUTED 30005e84: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED return 0; 30005e88: e3a00000 mov r0, #0 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ target->reference_count++; target->st_nlink++; IMFS_update_ctime( target ); 30005e8c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 30005e90: e28dd024 add sp, sp, #36 ; 0x24 <== NOT EXECUTED 30005e94: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 30007950 : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 30007950: e92d40f0 push {r4, r5, r6, r7, lr} 30007954: e1a07003 mov r7, r3 int rv = 0; mode &= ~rtems_filesystem_umask; 30007958: e59f3100 ldr r3, [pc, #256] ; 30007a60 const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 3000795c: e24dd05c sub sp, sp, #92 ; 0x5c int rv = 0; mode &= ~rtems_filesystem_umask; 30007960: e5933000 ldr r3, [r3] const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 30007964: e1a0c000 mov ip, r0 int rv = 0; mode &= ~rtems_filesystem_umask; 30007968: e5936008 ldr r6, [r3, #8] const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { 3000796c: e1a05002 mov r5, r2 int rv = 0; mode &= ~rtems_filesystem_umask; 30007970: e1c16006 bic r6, r1, r6 switch (mode & S_IFMT) { 30007974: e2063a0f and r3, r6, #61440 ; 0xf000 30007978: e3530a02 cmp r3, #8192 ; 0x2000 3000797c: 0a000006 beq 3000799c 30007980: 8a000001 bhi 3000798c 30007984: e3530a01 cmp r3, #4096 ; 0x1000 <== NOT EXECUTED 30007988: ea000002 b 30007998 <== NOT EXECUTED 3000798c: e3530a06 cmp r3, #24576 ; 0x6000 30007990: 0a000001 beq 3000799c 30007994: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED 30007998: 1a000029 bne 30007a44 <== NOT EXECUTED rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { 3000799c: e5953000 ldr r3, [r5] 300079a0: e3530007 cmp r3, #7 300079a4: 1a000026 bne 30007a44 rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = 300079a8: e1a0100c mov r1, ip 300079ac: e3a02078 mov r2, #120 ; 0x78 300079b0: e28d0008 add r0, sp, #8 300079b4: eb0007b3 bl 30009888 300079b8: e1a04000 mov r4, r0 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { 300079bc: ebffffd1 bl 30007908 300079c0: e3500000 cmp r0, #0 300079c4: 0a000017 beq 30007a28 IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; 300079c8: e28d305c add r3, sp, #92 ; 0x5c 300079cc: e523701c str r7, [r3, #-28]! new_node = IMFS_create_node_with_control( 300079d0: e58d3004 str r3, [sp, #4] 300079d4: e1a00004 mov r0, r4 300079d8: e1a01005 mov r1, r5 300079dc: e59d2010 ldr r2, [sp, #16] 300079e0: e59d3014 ldr r3, [sp, #20] 300079e4: e58d6000 str r6, [sp] 300079e8: eb002ade bl 30012568 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { 300079ec: e3500000 cmp r0, #0 300079f0: 0a00000f beq 30007a34 IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); 300079f4: e3a01000 mov r1, #0 300079f8: e28d0054 add r0, sp, #84 ; 0x54 mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; 300079fc: e5944008 ldr r4, [r4, #8] IMFS_update_ctime( parent ); 30007a00: eb00024d bl 3000833c 30007a04: e59d3054 ldr r3, [sp, #84] ; 0x54 IMFS_update_mtime( parent ); 30007a08: e28d0054 add r0, sp, #84 ; 0x54 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); 30007a0c: e5843048 str r3, [r4, #72] ; 0x48 IMFS_update_mtime( parent ); 30007a10: e3a01000 mov r1, #0 30007a14: eb000248 bl 3000833c 30007a18: e59d3054 ldr r3, [sp, #84] ; 0x54 30007a1c: e5843044 str r3, [r4, #68] ; 0x44 30007a20: e3a04000 mov r4, #0 30007a24: ea000003 b 30007a38 } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); 30007a28: e28d0008 add r0, sp, #8 <== NOT EXECUTED 30007a2c: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 30007a30: eb0006df bl 300095b4 <== NOT EXECUTED IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; 30007a34: e3e04000 mvn r4, #0 } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); 30007a38: e28d0008 add r0, sp, #8 30007a3c: eb000799 bl 300098a8 30007a40: ea000003 b 30007a54 } else { errno = EINVAL; 30007a44: eb0036a3 bl 300154d8 <__errno> <== NOT EXECUTED 30007a48: e3a03016 mov r3, #22 <== NOT EXECUTED 30007a4c: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; 30007a50: e3e04000 mvn r4, #0 <== NOT EXECUTED } } return rv; } 30007a54: e1a00004 mov r0, r4 30007a58: e28dd05c add sp, sp, #92 ; 0x5c 30007a5c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 3000ff74 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 3000ff74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000ff78: e59f9184 ldr r9, [pc, #388] ; 30010104 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 3000ff7c: e24dd01c sub sp, sp, #28 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000ff80: e5998000 ldr r8, [r9] MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 3000ff84: e88d000c stm sp, {r2, r3} 3000ff88: e20110ff and r1, r1, #255 ; 0xff IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000ff8c: e1a03128 lsr r3, r8, #2 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 3000ff90: e58d1010 str r1, [sp, #16] IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000ff94: e2831001 add r1, r3, #1 3000ff98: e0010193 mul r1, r3, r1 3000ff9c: e2811001 add r1, r1, #1 3000ffa0: e0010193 mul r1, r3, r1 3000ffa4: e2411001 sub r1, r1, #1 3000ffa8: e0010198 mul r1, r8, r1 3000ffac: e3a03000 mov r3, #0 3000ffb0: e1a02001 mov r2, r1 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 3000ffb4: e1a06000 mov r6, r0 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000ffb8: e89d0003 ldm sp, {r0, r1} 3000ffbc: e1500002 cmp r0, r2 3000ffc0: e0d11003 sbcs r1, r1, r3 3000ffc4: ba000002 blt 3000ffd4 rtems_set_errno_and_return_minus_one( EFBIG ); 3000ffc8: eb00031c bl 30010c40 <__errno> <== NOT EXECUTED 3000ffcc: e3a0301b mov r3, #27 <== NOT EXECUTED 3000ffd0: ea000035 b 300100ac <== NOT EXECUTED /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 3000ffd4: e2863050 add r3, r6, #80 ; 0x50 3000ffd8: e893000c ldm r3, {r2, r3} 3000ffdc: e89d0003 ldm sp, {r0, r1} 3000ffe0: e1520000 cmp r2, r0 3000ffe4: e0d31001 sbcs r1, r3, r1 3000ffe8: e58d2008 str r2, [sp, #8] 3000ffec: e58d300c str r3, [sp, #12] 3000fff0: aa000040 bge 300100f8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fff4: e1a05fc8 asr r5, r8, #31 3000fff8: e1a02008 mov r2, r8 3000fffc: e1a03005 mov r3, r5 30010000: e89d0003 ldm sp, {r0, r1} 30010004: eb002a06 bl 3001a824 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010008: e1a02008 mov r2, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3001000c: e1a0b000 mov fp, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010010: e1a03005 mov r3, r5 30010014: e28d1008 add r1, sp, #8 30010018: e8910003 ldm r1, {r0, r1} 3001001c: eb002a00 bl 3001a824 <__divdi3> offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 30010020: e0080890 mul r8, r0, r8 30010024: e59d2008 ldr r2, [sp, #8] /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010028: e1a0a000 mov sl, r0 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 3001002c: e0688002 rsb r8, r8, r2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 30010030: e1a04000 mov r4, r0 30010034: ea000020 b 300100bc if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 30010038: e1a00006 mov r0, r6 3001003c: e1a01004 mov r1, r4 30010040: ebffff55 bl 3000fd9c 30010044: e2507000 subs r7, r0, #0 30010048: 1a000013 bne 3001009c if ( zero_fill ) { 3001004c: e59d3010 ldr r3, [sp, #16] 30010050: e3530000 cmp r3, #0 30010054: 0a000017 beq 300100b8 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 30010058: e1a01004 mov r1, r4 <== NOT EXECUTED 3001005c: e1a02007 mov r2, r7 <== NOT EXECUTED 30010060: e1a00006 mov r0, r6 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 30010064: e5995000 ldr r5, [r9] <== NOT EXECUTED block_p *block_ptr = 30010068: ebfffe48 bl 3000f990 <== NOT EXECUTED IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 3001006c: e5900000 ldr r0, [r0] <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; 30010070: e0685005 rsb r5, r8, r5 <== NOT EXECUTED block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 30010074: e0800008 add r0, r0, r8 <== NOT EXECUTED 30010078: e1a01007 mov r1, r7 <== NOT EXECUTED 3001007c: e1a02005 mov r2, r5 <== NOT EXECUTED 30010080: eb00055e bl 30011600 <== NOT EXECUTED offset = 0; 30010084: e1a08007 mov r8, r7 <== NOT EXECUTED 30010088: ea00000a b 300100b8 <== NOT EXECUTED } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 3001008c: e1a01004 mov r1, r4 <== NOT EXECUTED 30010090: e1a00006 mov r0, r6 <== NOT EXECUTED 30010094: ebffffac bl 3000ff4c <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 30010098: e2444001 sub r4, r4, #1 <== NOT EXECUTED 3001009c: e154000a cmp r4, sl <== NOT EXECUTED 300100a0: 2afffff9 bcs 3001008c <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 300100a4: eb0002e5 bl 30010c40 <__errno> <== NOT EXECUTED 300100a8: e3a0301c mov r3, #28 <== NOT EXECUTED 300100ac: e5803000 str r3, [r0] <== NOT EXECUTED 300100b0: e3e00000 mvn r0, #0 <== NOT EXECUTED 300100b4: ea000010 b 300100fc <== NOT EXECUTED offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 300100b8: e2844001 add r4, r4, #1 300100bc: e154000b cmp r4, fp 300100c0: 9affffdc bls 30010038 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 300100c4: e89d0003 ldm sp, {r0, r1} 300100c8: e5860050 str r0, [r6, #80] ; 0x50 300100cc: e5861054 str r1, [r6, #84] ; 0x54 IMFS_update_ctime(the_jnode); 300100d0: e3a01000 mov r1, #0 300100d4: e28d0014 add r0, sp, #20 300100d8: ebffd949 bl 30006604 300100dc: e59d3014 ldr r3, [sp, #20] IMFS_update_mtime(the_jnode); 300100e0: e28d0014 add r0, sp, #20 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 300100e4: e5863048 str r3, [r6, #72] ; 0x48 IMFS_update_mtime(the_jnode); 300100e8: e3a01000 mov r1, #0 300100ec: ebffd944 bl 30006604 300100f0: e59d3014 ldr r3, [sp, #20] 300100f4: e5863044 str r3, [r6, #68] ; 0x44 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 300100f8: e3a00000 mov r0, #0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 300100fc: e28dd01c add sp, sp, #28 30010100: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000f990 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000f990: e59f31e4 ldr r3, [pc, #484] ; 3000fb7c #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000f994: 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 ) { 3000f998: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000f99c: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000f9a0: e1a05125 lsr r5, r5, #2 3000f9a4: e2453001 sub r3, r5, #1 3000f9a8: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000f9ac: e1a06001 mov r6, r1 3000f9b0: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000f9b4: 8a00000e bhi 3000f9f4 p = info->indirect; if ( malloc_it ) { 3000f9b8: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 3000f9bc: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 3000f9c0: 0a000007 beq 3000f9e4 if ( !p ) { 3000f9c4: e3500000 cmp r0, #0 3000f9c8: 1a000003 bne 3000f9dc p = memfile_alloc_block(); 3000f9cc: ebffffe2 bl 3000f95c if ( !p ) 3000f9d0: e3500000 cmp r0, #0 3000f9d4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; 3000f9d8: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; 3000f9dc: e5940058 ldr r0, [r4, #88] ; 0x58 3000f9e0: ea000001 b 3000f9ec } if ( !p ) 3000f9e4: e3500000 cmp r0, #0 3000f9e8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; 3000f9ec: e0800106 add r0, r0, r6, lsl #2 3000f9f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 3000f9f4: e2853001 add r3, r5, #1 3000f9f8: e0030395 mul r3, r5, r3 3000f9fc: e2432001 sub r2, r3, #1 3000fa00: e1510002 cmp r1, r2 3000fa04: 8a000021 bhi 3000fa90 my_block -= FIRST_DOUBLY_INDIRECT; 3000fa08: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fa0c: e1a00006 mov r0, r6 3000fa10: e1a01005 mov r1, r5 3000fa14: eb0028c0 bl 30019d1c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fa18: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000fa1c: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fa20: e1a00006 mov r0, r6 3000fa24: eb002876 bl 30019c04 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 3000fa28: 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; 3000fa2c: e1a05000 mov r5, r0 p = info->doubly_indirect; 3000fa30: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { 3000fa34: 0a00000e beq 3000fa74 if ( !p ) { 3000fa38: e3500000 cmp r0, #0 3000fa3c: 1a000003 bne 3000fa50 p = memfile_alloc_block(); 3000fa40: ebffffc5 bl 3000f95c if ( !p ) 3000fa44: e3500000 cmp r0, #0 3000fa48: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; 3000fa4c: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; 3000fa50: e0804105 add r4, r0, r5, lsl #2 3000fa54: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { 3000fa58: e3500000 cmp r0, #0 3000fa5c: 1a000009 bne 3000fa88 p1 = memfile_alloc_block(); 3000fa60: ebffffbd bl 3000f95c if ( !p1 ) 3000fa64: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 3000fa68: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 3000fa6c: 1a000005 bne 3000fa88 3000fa70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 3000fa74: e3500000 cmp r0, #0 3000fa78: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; 3000fa7c: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) 3000fa80: e3500000 cmp r0, #0 3000fa84: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; 3000fa88: e0800107 add r0, r0, r7, lsl #2 3000fa8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000fa90: e2832001 add r2, r3, #1 <== NOT EXECUTED 3000fa94: e0020295 mul r2, r5, r2 <== NOT EXECUTED 3000fa98: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3000fa9c: e1510002 cmp r1, r2 <== NOT EXECUTED 3000faa0: 8a000033 bhi 3000fb74 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 3000faa4: e0636001 rsb r6, r3, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000faa8: e1a00006 mov r0, r6 <== NOT EXECUTED 3000faac: e1a01005 mov r1, r5 <== NOT EXECUTED 3000fab0: eb002899 bl 30019d1c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fab4: 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; 3000fab8: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000fabc: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fac0: eb00284f bl 30019c04 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000fac4: 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; 3000fac8: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000facc: eb00284c bl 30019c04 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000fad0: 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; 3000fad4: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000fad8: e1a00006 mov r0, r6 <== NOT EXECUTED 3000fadc: eb00288e bl 30019d1c <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 3000fae0: 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; 3000fae4: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; 3000fae8: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 3000faec: 0a000016 beq 3000fb4c <== NOT EXECUTED if ( !p ) { 3000faf0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000faf4: 1a000003 bne 3000fb08 <== NOT EXECUTED p = memfile_alloc_block(); 3000faf8: ebffff97 bl 3000f95c <== NOT EXECUTED if ( !p ) 3000fafc: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fb00: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; info->triply_indirect = p; 3000fb04: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 3000fb08: e0804107 add r4, r0, r7, lsl #2 <== NOT EXECUTED 3000fb0c: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { 3000fb10: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fb14: 1a000003 bne 3000fb28 <== NOT EXECUTED p1 = memfile_alloc_block(); 3000fb18: ebffff8f bl 3000f95c <== NOT EXECUTED if ( !p1 ) 3000fb1c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fb20: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 3000fb24: e5840000 str r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 3000fb28: e0804105 add r4, r0, r5, lsl #2 <== NOT EXECUTED 3000fb2c: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { 3000fb30: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fb34: 1a00000c bne 3000fb6c <== NOT EXECUTED p2 = memfile_alloc_block(); 3000fb38: ebffff87 bl 3000f95c <== NOT EXECUTED if ( !p2 ) 3000fb3c: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 3000fb40: 15840000 strne r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 3000fb44: 1a000008 bne 3000fb6c <== NOT EXECUTED 3000fb48: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3000fb4c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fb50: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p1 = (block_p *) p[ triply ]; 3000fb54: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) 3000fb58: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fb5c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 3000fb60: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) 3000fb64: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fb68: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 3000fb6c: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 3000fb70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } /* * This means the requested block number is out of range. */ return 0; 3000fb74: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000fb78: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 30008724 : } int IMFS_memfile_maximum_size( void ) { return IMFS_MEMFILE_MAXIMUM_SIZE; 30008724: e59f3020 ldr r3, [pc, #32] ; 3000874c <== NOT EXECUTED 30008728: e5932000 ldr r2, [r3] <== NOT EXECUTED 3000872c: e1a03122 lsr r3, r2, #2 <== NOT EXECUTED 30008730: e2830001 add r0, r3, #1 <== NOT EXECUTED 30008734: e0000093 mul r0, r3, r0 <== NOT EXECUTED 30008738: e2800001 add r0, r0, #1 <== NOT EXECUTED 3000873c: e0030390 mul r3, r0, r3 <== NOT EXECUTED 30008740: e2430001 sub r0, r3, #1 <== NOT EXECUTED } 30008744: e0000092 mul r0, r2, r0 <== NOT EXECUTED 30008748: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000fe44 : /* * 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; 3000fe44: e59f30fc ldr r3, [pc, #252] ; 3000ff48 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000fe48: 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; 3000fe4c: e5935000 ldr r5, [r3] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000fe50: e5903058 ldr r3, [r0, #88] ; 0x58 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000fe54: e1a04000 mov r4, r0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000fe58: e3530000 cmp r3, #0 /* * 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; 3000fe5c: e1a05125 lsr r5, r5, #2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 3000fe60: 12800058 addne r0, r0, #88 ; 0x58 3000fe64: 11a01005 movne r1, r5 3000fe68: 1bffffe1 blne 3000fdf4 } if ( info->doubly_indirect ) { 3000fe6c: e594305c ldr r3, [r4, #92] ; 0x5c 3000fe70: e3530000 cmp r3, #0 3000fe74: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 3000fe7c: 1a000007 bne 3000fea0 3000fe80: ea00000c b 3000feb8 for ( i=0 ; idoubly_indirect[i] ) { 3000fe84: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 3000fe88: e0830106 add r0, r3, r6, lsl #2 <== NOT EXECUTED 3000fe8c: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED 3000fe90: e3530000 cmp r3, #0 <== NOT EXECUTED memfile_free_blocks_in_table( 3000fe94: 11a01005 movne r1, r5 <== NOT EXECUTED 3000fe98: 1bffffd5 blne 3000fdf4 <== 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 ); 3000feac: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 3000feb0: e1a01005 mov r1, r5 <== NOT EXECUTED 3000feb4: ebffffce bl 3000fdf4 <== NOT EXECUTED } if ( info->triply_indirect ) { 3000feb8: e5943060 ldr r3, [r4, #96] ; 0x60 3000febc: e3530000 cmp r3, #0 3000fec0: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 3000fec8: 1a000016 bne 3000ff28 3000fecc: ea00001b b 3000ff40 for ( i=0 ; itriply_indirect[i]; 3000fed0: e5943060 ldr r3, [r4, #96] ; 0x60 <== 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. */ IMFS_jnode_t *IMFS_memfile_remove( 3000fed4: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 3000fed8: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 3000fedc: e3580000 cmp r8, #0 <== NOT EXECUTED 3000fee0: 0a000013 beq 3000ff34 <== NOT EXECUTED 3000fee4: e3a07000 mov r7, #0 <== NOT EXECUTED 3000fee8: ea000006 b 3000ff08 <== NOT EXECUTED 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( 3000ff14: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 3000ff18: e1a01005 mov r1, r5 <== NOT EXECUTED 3000ff1c: e0800009 add r0, r0, r9 <== NOT EXECUTED 3000ff20: ebffffb3 bl 3000fdf4 <== 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( 3000ff34: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 3000ff38: e1a01005 mov r1, r5 <== NOT EXECUTED 3000ff3c: ebffffac bl 3000fdf4 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 3000ff40: e1a00004 mov r0, r4 3000ff44: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 3000ff4c : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 3000ff4c: 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 ); 3000ff50: e3a02000 mov r2, #0 <== NOT EXECUTED 3000ff54: ebfffe8d bl 3000f990 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; 3000ff58: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000ff5c: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 3000ff60: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; 3000ff64: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 3000ff68: ebffff99 bl 3000fdd4 <== NOT EXECUTED return 1; } 3000ff6c: e3a00001 mov r0, #1 <== NOT EXECUTED 3000ff70: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 30010108 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010108: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3001010c: e59db034 ldr fp, [sp, #52] ; 0x34 30010110: e1a09003 mov r9, 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; 30010114: e08b3001 add r3, fp, r1 if ( last_byte > the_jnode->info.file.size ) { 30010118: e1a04003 mov r4, r3 3001011c: e3a05000 mov r5, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010120: e88d0006 stm sp, {r1, 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; if ( last_byte > the_jnode->info.file.size ) { 30010124: e2803050 add r3, r0, #80 ; 0x50 30010128: e893000c ldm r3, {r2, r3} 3001012c: e1520004 cmp r2, r4 30010130: e0d31005 sbcs r1, r3, r5 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010134: e1a06000 mov r6, r0 * 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 ) { 30010138: aa000009 bge 30010164 bool zero_fill = start > the_jnode->info.file.size; status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 3001013c: e89d0180 ldm sp, {r7, r8} 30010140: e1520007 cmp r2, r7 30010144: e0d38008 sbcs r8, r3, r8 30010148: a3a01000 movge r1, #0 3001014c: b3a01001 movlt r1, #1 30010150: e1a02004 mov r2, r4 30010154: e1a03005 mov r3, r5 30010158: ebffff85 bl 3000ff74 if ( status ) 3001015c: e2507000 subs r7, r0, #0 30010160: 1a00004c bne 30010298 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010164: e59f3138 ldr r3, [pc, #312] ; 300102a4 30010168: e89d0003 ldm sp, {r0, r1} 3001016c: e5938000 ldr r8, [r3] 30010170: e1a05fc8 asr r5, r8, #31 30010174: e1a02008 mov r2, r8 30010178: e1a03005 mov r3, r5 3001017c: eb002ae3 bl 3001ad10 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010180: e1a02008 mov r2, r8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010184: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010188: e1a03005 mov r3, r5 3001018c: e89d0003 ldm sp, {r0, r1} 30010190: eb0029a3 bl 3001a824 <__divdi3> if ( start_offset ) { 30010194: e3570000 cmp r7, #0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010198: e1a04008 mov r4, r8 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3001019c: e1a05000 mov r5, r0 unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 300101a0: 01a08009 moveq r8, r9 /* * 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 ) { 300101a4: 01a0400b moveq r4, fp 300101a8: 0a000013 beq 300101fc 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 ); 300101ac: e1a00006 mov r0, r6 <== NOT EXECUTED 300101b0: e1a01005 mov r1, r5 <== NOT EXECUTED 300101b4: e3a02000 mov r2, #0 <== NOT EXECUTED 300101b8: ebfffdf4 bl 3000f990 <== NOT EXECUTED if ( !block_ptr ) 300101bc: e3500000 cmp r0, #0 <== NOT EXECUTED return copied; 300101c0: 01a07000 moveq r7, 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 ) 300101c4: 0a000033 beq 30010298 <== 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; 300101c8: e0678008 rsb r8, r7, r8 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 300101cc: 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; 300101d0: e158000b cmp r8, fp <== NOT EXECUTED 300101d4: 31a0a008 movcc sl, r8 <== NOT EXECUTED 300101d8: 21a0a00b movcs sl, fp <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 300101dc: e0800007 add r0, r0, r7 <== NOT EXECUTED 300101e0: e1a01009 mov r1, r9 <== NOT EXECUTED 300101e4: e1a0200a mov r2, sl <== NOT EXECUTED 300101e8: eb0004ce bl 30011528 <== NOT EXECUTED src += to_copy; 300101ec: e089800a add r8, r9, sl <== NOT EXECUTED block++; 300101f0: e2855001 add r5, r5, #1 <== NOT EXECUTED my_length -= to_copy; 300101f4: e06a400b rsb r4, sl, fp <== NOT EXECUTED copied += to_copy; 300101f8: e1a0700a mov r7, sl <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 300101fc: e59f90a0 ldr r9, [pc, #160] ; 300102a4 30010200: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010204: ea00000d b 30010240 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010208: e1a00006 mov r0, r6 3001020c: e1a01005 mov r1, r5 30010210: e3a02000 mov r2, #0 30010214: ebfffddd bl 3000f990 if ( !block_ptr ) 30010218: e3500000 cmp r0, #0 3001021c: 0a00001d beq 30010298 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 ); 30010220: e1a01008 mov r1, r8 30010224: e5900000 ldr r0, [r0] 30010228: e1a0200a mov r2, sl 3001022c: eb0004bd bl 30011528 src += to_copy; 30010230: e088800a add r8, r8, sl block++; 30010234: e2855001 add r5, r5, #1 my_length -= to_copy; 30010238: e06a4004 rsb r4, sl, r4 * 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( 3001023c: e087700a add r7, r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010240: e5993000 ldr r3, [r9] 30010244: e1540003 cmp r4, r3 30010248: 2affffee bcs 30010208 * 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 ) { 3001024c: e3540000 cmp r4, #0 30010250: 0a00000a beq 30010280 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010254: e1a00006 mov r0, r6 30010258: e1a01005 mov r1, r5 3001025c: e3a02000 mov r2, #0 30010260: ebfffdca bl 3000f990 if ( !block_ptr ) 30010264: e3500000 cmp r0, #0 30010268: 0a00000a beq 30010298 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 ); 3001026c: e5900000 ldr r0, [r0] 30010270: e1a01008 mov r1, r8 30010274: e1a02004 mov r2, r4 30010278: eb0004aa bl 30011528 my_length = 0; copied += to_copy; 3001027c: e0877004 add r7, r7, r4 } IMFS_mtime_ctime_update( the_jnode ); 30010280: e28d0008 add r0, sp, #8 30010284: e3a01000 mov r1, #0 30010288: ebffd8dd bl 30006604 3001028c: e59d3008 ldr r3, [sp, #8] 30010290: e5863044 str r3, [r6, #68] ; 0x44 30010294: e5863048 str r3, [r6, #72] ; 0x48 return copied; } 30010298: e1a00007 mov r0, r7 3001029c: e28dd010 add sp, sp, #16 300102a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30005f68 : #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 30005f68: e5903020 ldr r3, [r0, #32] #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30005f6c: e52de004 push {lr} ; (str lr, [sp, #-4]!) int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 30005f70: e5933008 ldr r3, [r3, #8] return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 30005f74: e593204c ldr r2, [r3, #76] ; 0x4c if ( IMFS_is_directory( node ) ) { 30005f78: e5922000 ldr r2, [r2] 30005f7c: e3520000 cmp r2, #0 30005f80: 1a000009 bne 30005fac if ( node->info.directory.mt_fs == NULL ) { 30005f84: e593205c ldr r2, [r3, #92] ; 0x5c 30005f88: e3520000 cmp r2, #0 node->info.directory.mt_fs = mt_entry; 30005f8c: 0583005c streq r0, [r3, #92] ; 0x5c #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 30005f90: 01a00002 moveq r0, r2 IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { 30005f94: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; 30005f98: eb002b28 bl 30010c40 <__errno> <== NOT EXECUTED 30005f9c: e3a03010 mov r3, #16 <== NOT EXECUTED 30005fa0: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; 30005fa4: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005fa8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED } } else { errno = ENOTDIR; 30005fac: eb002b23 bl 30010c40 <__errno> 30005fb0: e3a03014 mov r3, #20 30005fb4: e5803000 str r3, [r0] rv = -1; 30005fb8: e3e00000 mvn r0, #0 } return rv; } 30005fbc: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 3000e1e0 : return node; } static IMFS_jnode_t *IMFS_node_destroy_sym_link( IMFS_jnode_t *node ) { 3000e1e0: e92d4010 push {r4, lr} <== NOT EXECUTED 3000e1e4: e1a04000 mov r4, r0 <== NOT EXECUTED free( node->info.sym_link.name ); 3000e1e8: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 3000e1ec: ebffe0db bl 30006560 <== NOT EXECUTED return node; } 3000e1f0: e1a00004 mov r0, r4 <== NOT EXECUTED 3000e1f4: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 3000e13c : static IMFS_jnode_t *IMFS_node_initialize_hard_link( IMFS_jnode_t *node, const IMFS_types_union *info ) { node->info.hard_link.link_node = info->hard_link.link_node; 3000e13c: e5913000 ldr r3, [r1] <== NOT EXECUTED 3000e140: e5803050 str r3, [r0, #80] ; 0x50 <== NOT EXECUTED return node; } 3000e144: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000e0f4 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 3000e0f4: e5902050 ldr r2, [r0, #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 ); 3000e0f8: e2803054 add r3, r0, #84 ; 0x54 3000e0fc: e1520003 cmp r2, r3 } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { 3000e100: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 3000e104: 0a000004 beq 3000e11c errno = ENOTEMPTY; 3000e108: eb000acc bl 30010c40 <__errno> <== NOT EXECUTED 3000e10c: e3a0305a mov r3, #90 ; 0x5a <== NOT EXECUTED 3000e110: e5803000 str r3, [r0] <== NOT EXECUTED node = NULL; 3000e114: e3a00000 mov r0, #0 <== NOT EXECUTED 3000e118: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED } else if ( IMFS_is_mount_point( node ) ) { 3000e11c: e590305c ldr r3, [r0, #92] ; 0x5c 3000e120: e3530000 cmp r3, #0 3000e124: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) errno = EBUSY; 3000e128: eb000ac4 bl 30010c40 <__errno> <== NOT EXECUTED 3000e12c: e3a03010 mov r3, #16 <== NOT EXECUTED 3000e130: e5803000 str r3, [r0] <== NOT EXECUTED 3000e134: e3a00000 mov r0, #0 <== NOT EXECUTED node = NULL; } return node; } 3000e138: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3000e1f8 : } static IMFS_jnode_t *IMFS_node_remove_hard_link( IMFS_jnode_t *node ) { 3000e1f8: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *target = node->info.hard_link.link_node; 3000e1fc: e5904050 ldr r4, [r0, #80] ; 0x50 <== NOT EXECUTED } static IMFS_jnode_t *IMFS_node_remove_hard_link( IMFS_jnode_t *node ) { 3000e200: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *target = node->info.hard_link.link_node; if ( target->st_nlink == 1) { 3000e204: e1d433b6 ldrh r3, [r4, #54] ; 0x36 <== NOT EXECUTED 3000e208: e3530001 cmp r3, #1 <== NOT EXECUTED 3000e20c: 1a000006 bne 3000e22c <== NOT EXECUTED target = (*target->control->node_remove)( target ); 3000e210: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3000e214: e1a00004 mov r0, r4 <== NOT EXECUTED 3000e218: e1a0e00f mov lr, pc <== NOT EXECUTED 3000e21c: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( target == NULL ) { node = NULL; 3000e220: e3500000 cmp r0, #0 <== NOT EXECUTED 3000e224: 03a05000 moveq r5, #0 <== NOT EXECUTED 3000e228: ea000006 b 3000e248 <== NOT EXECUTED } } else { --target->st_nlink; 3000e22c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000e230: e1c433b6 strh r3, [r4, #54] ; 0x36 <== NOT EXECUTED IMFS_update_ctime( target ); 3000e234: e1a0000d mov r0, sp <== NOT EXECUTED 3000e238: e3a01000 mov r1, #0 <== NOT EXECUTED 3000e23c: ebffe0f0 bl 30006604 <== NOT EXECUTED 3000e240: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000e244: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED } return node; } 3000e248: e1a00005 mov r0, r5 <== NOT EXECUTED 3000e24c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 30005fc0 : rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { const IMFS_jnode_t *node = loc->node_access; 30005fc0: e5903008 ldr r3, [r0, #8] rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 30005fc4: e593204c ldr r2, [r3, #76] ; 0x4c 30005fc8: e5920000 ldr r0, [r2] IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { 30005fcc: e3500002 cmp r0, #2 30005fd0: 0a000002 beq 30005fe0 30005fd4: e3500005 cmp r0, #5 30005fd8: 03a00004 moveq r0, #4 30005fdc: e12fff1e bx lr 30005fe0: e5933050 ldr r3, [r3, #80] ; 0x50 <== NOT EXECUTED 30005fe4: e593304c ldr r3, [r3, #76] ; 0x4c <== NOT EXECUTED 30005fe8: e5930000 ldr r0, [r3] <== NOT EXECUTED type = imfs_type; break; } return type; } 30005fec: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30005ff0 : ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 30005ff0: e590c008 ldr ip, [r0, #8] <== NOT EXECUTED IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30005ff4: e3a00000 mov r0, #0 <== NOT EXECUTED 30005ff8: ea000001 b 30006004 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; 30005ffc: e7c13000 strb r3, [r1, r0] <== NOT EXECUTED node = loc->node_access; IMFS_assert( node->control->imfs_type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30006000: e2800001 add r0, r0, #1 <== NOT EXECUTED 30006004: e1500002 cmp r0, r2 <== NOT EXECUTED 30006008: 012fff1e bxeq lr <== NOT EXECUTED 3000600c: e59c3050 ldr r3, [ip, #80] ; 0x50 <== NOT EXECUTED 30006010: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED 30006014: e3530000 cmp r3, #0 <== NOT EXECUTED 30006018: 1afffff7 bne 30005ffc <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 3000601c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30006020 : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 30006020: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED int rv = 0; IMFS_jnode_t *node = oldloc->node_access; 30006024: e5914008 ldr r4, [r1, #8] <== NOT EXECUTED IMFS_jnode_t *new_parent = newparentloc->node_access; 30006028: e5925008 ldr r5, [r2, #8] <== NOT EXECUTED /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 3000602c: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { 30006030: e59d601c ldr r6, [sp, #28] <== NOT EXECUTED /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { 30006034: e3520000 cmp r2, #0 <== NOT EXECUTED 30006038: 0a00001c beq 300060b0 <== NOT EXECUTED if ( namelen < IMFS_NAME_MAX ) { 3000603c: e356001f cmp r6, #31 <== NOT EXECUTED 30006040: 8a000017 bhi 300060a4 <== NOT EXECUTED memcpy( node->name, name, namelen ); 30006044: e1a01003 mov r1, r3 <== NOT EXECUTED 30006048: e1a02006 mov r2, r6 <== NOT EXECUTED node->name [namelen] = '\0'; 3000604c: e3a07000 mov r7, #0 <== NOT EXECUTED * this operation. */ if ( node->Parent != NULL ) { if ( namelen < IMFS_NAME_MAX ) { memcpy( node->name, name, namelen ); 30006050: e284000c add r0, r4, #12 <== NOT EXECUTED node->name [namelen] = '\0'; 30006054: e0846006 add r6, r4, r6 <== NOT EXECUTED * this operation. */ if ( node->Parent != NULL ) { if ( namelen < IMFS_NAME_MAX ) { memcpy( node->name, name, namelen ); 30006058: eb002d32 bl 30011528 <== NOT EXECUTED node->name [namelen] = '\0'; 3000605c: e5c6700c strb r7, [r6, #12] <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 30006060: e894000c ldm r4, {r2, r3} <== NOT EXECUTED next->previous = previous; 30006064: e5823004 str r3, [r2, #4] <== NOT EXECUTED previous->next = next; 30006068: e5832000 str r2, [r3] <== NOT EXECUTED Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; 3000606c: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 30006070: e2852054 add r2, r5, #84 ; 0x54 <== NOT EXECUTED static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; 30006074: e5845008 str r5, [r4, #8] <== NOT EXECUTED Chain_Node *old_last = tail->previous; the_node->next = tail; 30006078: e5842000 str r2, [r4] <== NOT EXECUTED tail->previous = the_node; 3000607c: e5854058 str r4, [r5, #88] ; 0x58 <== NOT EXECUTED old_last->next = the_node; 30006080: e5834000 str r4, [r3] <== NOT EXECUTED the_node->previous = old_last; 30006084: e5843004 str r3, [r4, #4] <== NOT EXECUTED IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 30006088: e1a0000d mov r0, sp <== NOT EXECUTED 3000608c: e1a01007 mov r1, r7 <== NOT EXECUTED 30006090: eb00015b bl 30006604 <== NOT EXECUTED 30006094: e59d3000 ldr r3, [sp] <== NOT EXECUTED const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; 30006098: e1a00007 mov r0, r7 <== NOT EXECUTED memcpy( node->name, name, namelen ); node->name [namelen] = '\0'; IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); 3000609c: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 300060a0: ea000006 b 300060c0 <== NOT EXECUTED } else { errno = ENAMETOOLONG; 300060a4: eb002ae5 bl 30010c40 <__errno> <== NOT EXECUTED 300060a8: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 300060ac: ea000001 b 300060b8 <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 300060b0: eb002ae2 bl 30010c40 <__errno> <== NOT EXECUTED 300060b4: e3a03016 mov r3, #22 <== NOT EXECUTED 300060b8: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; 300060bc: e3e00000 mvn r0, #0 <== NOT EXECUTED } return rv; } 300060c0: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 300060c4 : const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc ) { int rv = 0; IMFS_jnode_t *node = loc->node_access; 300060c4: e5910008 ldr r0, [r1, #8] int IMFS_rmnod( const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc ) { 300060c8: e52de004 push {lr} ; (str lr, [sp, #-4]!) int rv = 0; IMFS_jnode_t *node = loc->node_access; node = (*node->control->node_remove)( node ); 300060cc: e590304c ldr r3, [r0, #76] ; 0x4c 300060d0: e1a0e00f mov lr, pc 300060d4: e593f00c ldr pc, [r3, #12] if ( node != NULL ) { 300060d8: e2503000 subs r3, r0, #0 300060dc: 0a00000d beq 30006118 --node->reference_count; 300060e0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 --node->st_nlink; if ( node->Parent != NULL ) { 300060e4: e5930008 ldr r0, [r3, #8] int rv = 0; IMFS_jnode_t *node = loc->node_access; node = (*node->control->node_remove)( node ); if ( node != NULL ) { --node->reference_count; 300060e8: e2422001 sub r2, r2, #1 300060ec: e1c323b4 strh r2, [r3, #52] ; 0x34 --node->st_nlink; 300060f0: e1d323b6 ldrh r2, [r3, #54] ; 0x36 if ( node->Parent != NULL ) { 300060f4: e3500000 cmp r0, #0 IMFS_jnode_t *node = loc->node_access; node = (*node->control->node_remove)( node ); if ( node != NULL ) { --node->reference_count; --node->st_nlink; 300060f8: e2422001 sub r2, r2, #1 } static inline void IMFS_remove_from_directory( IMFS_jnode_t *node ) { IMFS_assert( node->Parent != NULL ); node->Parent = NULL; 300060fc: 13a00000 movne r0, #0 30006100: e1c323b6 strh r2, [r3, #54] ; 0x36 30006104: 15830008 strne r0, [r3, #8] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 30006108: 1893000c ldmne r3, {r2, r3} next->previous = previous; 3000610c: 15823004 strne r3, [r2, #4] previous->next = next; 30006110: 15832000 strne r2, [r3] 30006114: e49df004 pop {pc} ; (ldr pc, [sp], #4) if ( node->Parent != NULL ) { IMFS_remove_from_directory( node ); } } else { rv = -1; 30006118: e3e00000 mvn r0, #0 <== NOT EXECUTED } return rv; } 3000611c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3000e154 : static int IMFS_stat_link( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e154: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED const IMFS_jnode_t *node = loc->node_access; 3000e158: e5905008 ldr r5, [r0, #8] <== NOT EXECUTED static int IMFS_stat_link( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e15c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 3000e160: e595304c ldr r3, [r5, #76] ; 0x4c <== NOT EXECUTED 3000e164: e1a06000 mov r6, r0 <== NOT EXECUTED const IMFS_jnode_t *node = loc->node_access; if ( IMFS_type( node ) != IMFS_HARD_LINK ) { 3000e168: e5933000 ldr r3, [r3] <== NOT EXECUTED static int IMFS_stat_link( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e16c: e1a04001 mov r4, r1 <== NOT EXECUTED const IMFS_jnode_t *node = loc->node_access; if ( IMFS_type( node ) != IMFS_HARD_LINK ) { 3000e170: e3530002 cmp r3, #2 <== NOT EXECUTED 3000e174: 0a000008 beq 3000e19c <== NOT EXECUTED buf->st_size = strlen( node->info.sym_link.name ); 3000e178: e5950050 ldr r0, [r5, #80] ; 0x50 <== NOT EXECUTED 3000e17c: eb00106b bl 30012330 <== NOT EXECUTED 3000e180: e3a03000 mov r3, #0 <== NOT EXECUTED 3000e184: e5840020 str r0, [r4, #32] <== NOT EXECUTED 3000e188: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED return IMFS_stat( loc, buf ); 3000e18c: e1a00006 mov r0, r6 <== NOT EXECUTED 3000e190: e1a01004 mov r1, r4 <== NOT EXECUTED 3000e194: eb000039 bl 3000e280 <== NOT EXECUTED 3000e198: ea00000e b 3000e1d8 <== NOT EXECUTED } else { rtems_filesystem_location_info_t targetloc = *loc; 3000e19c: e1a0c00d mov ip, sp <== NOT EXECUTED 3000e1a0: e1a0e000 mov lr, r0 <== NOT EXECUTED 3000e1a4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3000e1a8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3000e1ac: e89e0003 ldm lr, {r0, r1} <== NOT EXECUTED targetloc.node_access = node->info.hard_link.link_node; 3000e1b0: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED if ( IMFS_type( node ) != IMFS_HARD_LINK ) { buf->st_size = strlen( node->info.sym_link.name ); return IMFS_stat( loc, buf ); } else { rtems_filesystem_location_info_t targetloc = *loc; 3000e1b4: e88c0003 stm ip, {r0, r1} <== NOT EXECUTED targetloc.node_access = node->info.hard_link.link_node; 3000e1b8: e58d3008 str r3, [sp, #8] <== NOT EXECUTED static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; 3000e1bc: e593304c ldr r3, [r3, #76] ; 0x4c <== NOT EXECUTED IMFS_Set_handlers( &targetloc ); return (targetloc.handlers->fstat_h)( &targetloc, buf ); 3000e1c0: e1a0000d mov r0, sp <== NOT EXECUTED 3000e1c4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3000e1c8: e1a01004 mov r1, r4 <== NOT EXECUTED 3000e1cc: e58d3010 str r3, [sp, #16] <== NOT EXECUTED 3000e1d0: e1a0e00f mov lr, pc <== NOT EXECUTED 3000e1d4: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED } } 3000e1d8: e28dd018 add sp, sp, #24 <== NOT EXECUTED 3000e1dc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 30006120 : const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target ) { 30006120: e92d4070 push {r4, r5, r6, lr} 30006124: e1a04000 mov r4, r0 30006128: e24dd01c sub sp, sp, #28 IMFS_jnode_t *new_node; /* * Duplicate link name */ info.sym_link.name = strdup(target); 3000612c: e1a00003 mov r0, r3 const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target ) { 30006130: e1a06001 mov r6, r1 30006134: e1a05002 mov r5, r2 IMFS_jnode_t *new_node; /* * Duplicate link name */ info.sym_link.name = strdup(target); 30006138: eb002ee4 bl 30011cd0 if (info.sym_link.name == NULL) { 3000613c: e3500000 cmp r0, #0 IMFS_jnode_t *new_node; /* * Duplicate link name */ info.sym_link.name = strdup(target); 30006140: e58d0008 str r0, [sp, #8] if (info.sym_link.name == NULL) { 30006144: 0a00000f beq 30006188 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = 30006148: e5943014 ldr r3, [r4, #20] (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( 3000614c: e59f204c ldr r2, [pc, #76] ; 300061a0 30006150: e5933008 ldr r3, [r3, #8] 30006154: e58d2000 str r2, [sp] parentloc, IMFS_SYM_LINK, name, namelen, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30006158: e28d2008 add r2, sp, #8 3000615c: e58d2004 str r2, [sp, #4] 30006160: e5931014 ldr r1, [r3, #20] 30006164: e1a00004 mov r0, r4 30006168: e1a02006 mov r2, r6 3000616c: e1a03005 mov r3, r5 30006170: eb001eee bl 3000dd30 ); if (new_node == NULL) { 30006174: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 30006178: 13a00000 movne r0, #0 namelen, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 3000617c: 1a000005 bne 30006198 free(info.sym_link.name); 30006180: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 30006184: eb0000f5 bl 30006560 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30006188: eb002aac bl 30010c40 <__errno> <== NOT EXECUTED 3000618c: e3a0300c mov r3, #12 <== NOT EXECUTED 30006190: e5803000 str r3, [r0] <== NOT EXECUTED 30006194: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 30006198: e28dd01c add sp, sp, #28 3000619c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 300061a4 : #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 300061a4: e5903020 ldr r3, [r0, #32] #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 300061a8: e52de004 push {lr} ; (str lr, [sp, #-4]!) int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; 300061ac: e5932008 ldr r2, [r3, #8] return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; 300061b0: e592304c ldr r3, [r2, #76] ; 0x4c if ( IMFS_is_directory( node ) ) { 300061b4: e5933000 ldr r3, [r3] 300061b8: e3530000 cmp r3, #0 300061bc: 1a000009 bne 300061e8 if ( node->info.directory.mt_fs == mt_entry ) { 300061c0: e592105c ldr r1, [r2, #92] ; 0x5c 300061c4: e1510000 cmp r1, r0 node->info.directory.mt_fs = NULL; 300061c8: 0582305c streq r3, [r2, #92] ; 0x5c #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; 300061cc: 01a00003 moveq r0, r3 IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { 300061d0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) node->info.directory.mt_fs = NULL; } else { errno = EINVAL; 300061d4: eb002a99 bl 30010c40 <__errno> <== NOT EXECUTED 300061d8: e3a03016 mov r3, #22 <== NOT EXECUTED 300061dc: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; 300061e0: e3e00000 mvn r0, #0 <== NOT EXECUTED 300061e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED } } else { errno = ENOTDIR; 300061e8: eb002a94 bl 30010c40 <__errno> <== NOT EXECUTED 300061ec: e3a03014 mov r3, #20 <== NOT EXECUTED 300061f0: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; 300061f4: e3e00000 mvn r0, #0 <== NOT EXECUTED } return rv; } 300061f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 300061fc : int IMFS_utime( const rtems_filesystem_location_info_t *loc, time_t actime, time_t modtime ) { 300061fc: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; 30006200: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; the_jnode->stat_ctime = time( NULL ); 30006204: e3a00000 mov r0, #0 <== NOT EXECUTED { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; the_jnode->stat_atime = actime; 30006208: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_jnode->stat_mtime = modtime; 3000620c: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED the_jnode->stat_ctime = time( NULL ); 30006210: eb0030ae bl 300124d0