=============================================================================== 30006b34 : static inline void _Timestamp64_implementation_Set_to_zero( Timestamp64_Control *_time ) { *_time = 0; 30006b34: e3a02000 mov r2, #0 <== NOT EXECUTED 30006b38: e3a03000 mov r3, #0 <== NOT EXECUTED 30006b3c: e5802080 str r2, [r0, #128] ; 0x80 <== NOT EXECUTED 30006b40: 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 } 30006b44: 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: eb00327f bl 30012470 <== 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: eb0032d0 bl 300125d4 <== 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: eb0032ca bl 300125d4 <== 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: eb003263 bl 30012470 <== 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: eb0032b6 bl 300125d4 <== 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: eb0032b0 bl 300125d4 <== 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 =============================================================================== 3000dd4c : ) { IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { 3000dd4c: e3530020 cmp r3, #32 const char *name, size_t namelen, mode_t mode, const IMFS_types_union *info ) { 3000dd50: e92d41f3 push {r0, r1, r4, r5, r6, r7, r8, lr} 3000dd54: e1a04000 mov r4, r0 3000dd58: e1a05001 mov r5, r1 3000dd5c: e1a08002 mov r8, r2 3000dd60: e1a07003 mov r7, r3 IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { 3000dd64: 9a000004 bls 3000dd7c errno = ENAMETOOLONG; 3000dd68: eb000eff bl 3001196c <__errno> <== NOT EXECUTED 3000dd6c: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000dd70: e5803000 str r3, [r0] <== NOT EXECUTED return NULL; 3000dd74: e3a00000 mov r0, #0 <== NOT EXECUTED 3000dd78: ea00002a b 3000de28 <== NOT EXECUTED } gettimeofday( &tv, 0 ); 3000dd7c: e3a01000 mov r1, #0 3000dd80: e1a0000d mov r0, sp 3000dd84: ebffe21e bl 30006604 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 3000dd88: e3a00001 mov r0, #1 3000dd8c: e3a01064 mov r1, #100 ; 0x64 3000dd90: ebffe15c bl 30006308 if ( !node ) { 3000dd94: e2506000 subs r6, r0, #0 3000dd98: 1a000004 bne 3000ddb0 errno = ENOMEM; 3000dd9c: eb000ef2 bl 3001196c <__errno> 3000dda0: e3a0300c mov r3, #12 3000dda4: e5803000 str r3, [r0] return NULL; 3000dda8: e1a00006 mov r0, r6 3000ddac: ea00001d b 3000de28 } /* * Fill in the basic information */ node->reference_count = 1; 3000ddb0: e3a03001 mov r3, #1 node->st_nlink = 1; memcpy( node->name, name, namelen ); 3000ddb4: e1a01008 mov r1, r8 3000ddb8: e1a02007 mov r2, r7 } /* * Fill in the basic information */ node->reference_count = 1; 3000ddbc: e1c633b4 strh r3, [r6, #52] ; 0x34 node->st_nlink = 1; 3000ddc0: e1c633b6 strh r3, [r6, #54] ; 0x36 memcpy( node->name, name, namelen ); 3000ddc4: e286000c add r0, r6, #12 3000ddc8: eb001121 bl 30012254 node->name [namelen] = '\0'; 3000ddcc: e0867007 add r7, r6, r7 3000ddd0: e3a03000 mov r3, #0 3000ddd4: e5c7300c strb r3, [r7, #12] node->control = node_control; /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 3000ddd8: e59d3020 ldr r3, [sp, #32] */ node->reference_count = 1; node->st_nlink = 1; memcpy( node->name, name, namelen ); node->name [namelen] = '\0'; node->control = node_control; 3000dddc: e586504c str r5, [r6, #76] ; 0x4c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 3000dde0: e5863030 str r3, [r6, #48] ; 0x30 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 3000dde4: eb0001f7 bl 3000e5c8 3000dde8: e1c603bc strh r0, [r6, #60] ; 0x3c node->st_gid = getegid(); 3000ddec: eb0001f0 bl 3000e5b4 /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; 3000ddf0: e59d3000 ldr r3, [sp] * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 3000ddf4: e1c603be strh r0, [r6, #62] ; 0x3e /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; 3000ddf8: e5863040 str r3, [r6, #64] ; 0x40 node->stat_mtime = (time_t) tv.tv_sec; 3000ddfc: e5863044 str r3, [r6, #68] ; 0x44 node->stat_ctime = (time_t) tv.tv_sec; 3000de00: e5863048 str r3, [r6, #72] ; 0x48 node->st_ino = ++fs_info->ino_count; 3000de04: e5943004 ldr r3, [r4, #4] return (*node->control->node_initialize)( node, info ); 3000de08: 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; 3000de0c: e2833001 add r3, r3, #1 3000de10: e5843004 str r3, [r4, #4] return (*node->control->node_initialize)( node, info ); 3000de14: 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; 3000de18: e5863038 str r3, [r6, #56] ; 0x38 return (*node->control->node_initialize)( node, info ); 3000de1c: e596304c ldr r3, [r6, #76] ; 0x4c 3000de20: e1a0e00f mov lr, pc 3000de24: e593f008 ldr pc, [r3, #8] } 3000de28: e8bd81fc pop {r2, r3, r4, r5, r6, r7, r8, pc} =============================================================================== 3000dce0 : int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { 3000dce0: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 3000dce4: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED 3000dce8: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) loc->node_access; 3000dcec: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { 3000dcf0: e1a06821 lsr r6, r1, #16 <== NOT EXECUTED 3000dcf4: e1a07822 lsr r7, r2, #16 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000dcf8: eb000232 bl 3000e5c8 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3000dcfc: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED 3000dd00: e3500000 cmp r0, #0 <== NOT EXECUTED 3000dd04: 11550000 cmpne r5, r0 <== NOT EXECUTED 3000dd08: 03a05000 moveq r5, #0 <== NOT EXECUTED 3000dd0c: 13a05001 movne r5, #1 <== NOT EXECUTED 3000dd10: 0a000004 beq 3000dd28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 3000dd14: eb000f14 bl 3001196c <__errno> <== NOT EXECUTED 3000dd18: e3a03001 mov r3, #1 <== NOT EXECUTED 3000dd1c: e5803000 str r3, [r0] <== NOT EXECUTED 3000dd20: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000dd24: ea000007 b 3000dd48 <== NOT EXECUTED #endif jnode->st_uid = owner; 3000dd28: e1c463bc strh r6, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; 3000dd2c: e1c473be strh r7, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000dd30: e1a0000d mov r0, sp <== NOT EXECUTED 3000dd34: e1a01005 mov r1, r5 <== NOT EXECUTED 3000dd38: ebffe231 bl 30006604 <== NOT EXECUTED 3000dd3c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; 3000dd40: e1a00005 mov r0, r5 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000dd44: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000dd48: e8bd80fc pop {r2, r3, r4, r5, r6, r7, 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: eb003515 bl 300159d4 !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: eb00350c bl 300159d4 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: eb0034c7 bl 30015900 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: eb00349a bl 30015880 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: eb003494 bl 30015880 <== 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: eb0034e1 bl 300159d4 <== 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: eb003487 bl 30015880 <== NOT EXECUTED 30008660: ea000001 b 3000866c <== NOT EXECUTED return; } puts(""); 30008664: e59f004c ldr r0, [pc, #76] ; 300086b8 30008668: eb003b9e bl 300174e8 } 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} =============================================================================== 3000de94 : rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000de94: 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; 3000de98: e5905020 ldr r5, [r0, #32] rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000de9c: 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( 3000dea0: e1d523be ldrh r2, [r5, #62] ; 0x3e rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000dea4: 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( 3000dea8: e1d533bc ldrh r3, [r5, #60] ; 0x3c 3000deac: e58d2000 str r2, [sp] 3000deb0: e3a01001 mov r1, #1 3000deb4: e5952030 ldr r2, [r5, #48] ; 0x30 rtems_filesystem_eval_path_context_t *ctx, void *arg, const char *token, size_t tokenlen ) { 3000deb8: 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( 3000debc: eb0002c0 bl 3000e9c4 dir->st_mode, dir->st_uid, dir->st_gid ); if ( access_ok ) { 3000dec0: e3500000 cmp r0, #0 3000dec4: 0a000051 beq 3000e010 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 3000dec8: e3570001 cmp r7, #1 3000decc: 1a000051 bne 3000e018 3000ded0: e5d63000 ldrb r3, [r6] 3000ded4: e353002e cmp r3, #46 ; 0x2e 3000ded8: 1a000050 bne 3000e020 3000dedc: ea000015 b 3000df38 static inline bool rtems_filesystem_is_parent_directory( const char *token, size_t tokenlen ) { return tokenlen == 2 && token [0] == '.' && token [1] == '.'; 3000dee0: e5d63000 ldrb r3, [r6] 3000dee4: e353002e cmp r3, #46 ; 0x2e 3000dee8: 1a00004c bne 3000e020 3000deec: e5d63001 ldrb r3, [r6, #1] 3000def0: 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; 3000def4: 05958008 ldreq r8, [r5, #8] 3000def8: 1a000048 bne 3000e020 3000defc: ea00000e b 3000df3c 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 3000df00: e288000c add r0, r8, #12 3000df04: e1a01006 mov r1, r6 3000df08: e1a02007 mov r2, r7 3000df0c: eb00146a bl 300130bc && entry->name [tokenlen] == '\0'; 3000df10: e3500000 cmp r0, #0 3000df14: 1a000044 bne 3000e02c 3000df18: e0883007 add r3, r8, r7 3000df1c: e5d3300c ldrb r3, [r3, #12] 3000df20: e3530000 cmp r3, #0 3000df24: 0a000004 beq 3000df3c 3000df28: ea00003f b 3000e02c } 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 ) { 3000df2c: e158000a cmp r8, sl 3000df30: 1afffff2 bne 3000df00 3000df34: ea000033 b 3000e008 static inline bool rtems_filesystem_is_current_directory( const char *token, size_t tokenlen ) { return tokenlen == 1 && token [0] == '.'; 3000df38: e1a08005 mov r8, r5 ); if ( access_ok ) { IMFS_jnode_t *entry = IMFS_search_in_directory( dir, token, tokenlen ); if ( entry != NULL ) { 3000df3c: e3580000 cmp r8, #0 3000df40: 0a000030 beq 3000e008 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; 3000df44: e598304c ldr r3, [r8, #76] ; 0x4c bool terminal = !rtems_filesystem_eval_path_has_path( ctx ); 3000df48: e5940004 ldr r0, [r4, #4] 3000df4c: e5933000 ldr r3, [r3] 3000df50: e2700001 rsbs r0, r0, #1 3000df54: 33a00000 movcc r0, #0 static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 3000df58: 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)) { 3000df5c: e3530002 cmp r3, #2 static inline int rtems_filesystem_eval_path_get_flags( const rtems_filesystem_eval_path_context_t *ctx ) { return ctx->flags; 3000df60: e5942010 ldr r2, [r4, #16] static inline void rtems_filesystem_eval_path_clear_token( rtems_filesystem_eval_path_context_t *ctx ) { ctx->tokenlen = 0; 3000df64: e584100c str r1, [r4, #12] 3000df68: 1a000005 bne 3000df84 3000df6c: e3120008 tst r2, #8 <== NOT EXECUTED 3000df70: 1a000001 bne 3000df7c <== NOT EXECUTED 3000df74: e1500001 cmp r0, r1 <== NOT EXECUTED 3000df78: 1a00002d bne 3000e034 <== NOT EXECUTED entry = entry->info.hard_link.link_node; 3000df7c: e5988050 ldr r8, [r8, #80] ; 0x50 <== NOT EXECUTED 3000df80: ea00002b b 3000e034 <== NOT EXECUTED } if ( type == IMFS_SYM_LINK && (follow_sym_link || !terminal)) { 3000df84: e3530003 cmp r3, #3 3000df88: 1a00000b bne 3000dfbc 3000df8c: e3120010 tst r2, #16 3000df90: 1a000001 bne 3000df9c 3000df94: e3500000 cmp r0, #0 <== NOT EXECUTED 3000df98: 1a000025 bne 3000e034 <== NOT EXECUTED const char *target = entry->info.sym_link.name; 3000df9c: e5985050 ldr r5, [r8, #80] ; 0x50 rtems_filesystem_eval_path_recursive( ctx, target, strlen( target ) ); 3000dfa0: e1a00005 mov r0, r5 3000dfa4: eb00142c bl 3001305c 3000dfa8: e1a01005 mov r1, r5 3000dfac: e1a02000 mov r2, r0 3000dfb0: e1a00004 mov r0, r4 3000dfb4: ebffe64f bl 300078f8 3000dfb8: ea000014 b 3000e010 IMFS_jnode_types_t type ) { rtems_filesystem_global_location_t **fs_root_ptr = NULL; if ( type == IMFS_DIRECTORY ) { 3000dfbc: e3530000 cmp r3, #0 3000dfc0: 1a00001b bne 3000e034 if ( node->info.directory.mt_fs != NULL ) { 3000dfc4: e598305c ldr r3, [r8, #92] ; 0x5c 3000dfc8: e3530000 cmp r3, #0 3000dfcc: 0a000018 beq 3000e034 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 3000dfd0: 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; 3000dfd4: e2835024 add r5, r3, #36 ; 0x24 if ( !terminal ) { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_CONTINUE; } } else { access_ok = rtems_filesystem_eval_path_check_access( 3000dfd8: e1d833bc ldrh r3, [r8, #60] ; 0x3c 3000dfdc: e58d2000 str r2, [sp] 3000dfe0: e1a00004 mov r0, r4 3000dfe4: e3a01001 mov r1, #1 3000dfe8: e5982030 ldr r2, [r8, #48] ; 0x30 3000dfec: eb000274 bl 3000e9c4 RTEMS_FS_PERMS_EXEC, entry->st_mode, entry->st_uid, entry->st_gid ); if ( access_ok ) { 3000dff0: e3500000 cmp r0, #0 3000dff4: 0a000005 beq 3000e010 rtems_filesystem_eval_path_restart( ctx, fs_root_ptr ); 3000dff8: e1a00004 mov r0, r4 3000dffc: e1a01005 mov r1, r5 3000e000: ebffe622 bl 30007890 3000e004: ea000001 b 3000e010 } } } } else { status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; 3000e008: e3a00002 mov r0, #2 3000e00c: ea000000 b 3000e014 void *arg, const char *token, size_t tokenlen ) { rtems_filesystem_eval_path_generic_status status = 3000e010: e3a00001 mov r0, #1 status = RTEMS_FILESYSTEM_EVAL_PATH_GENERIC_NO_ENTRY; } } return status; } 3000e014: 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] == '.'; 3000e018: e3570002 cmp r7, #2 3000e01c: 0affffaf beq 3000dee0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; 3000e020: 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 ); 3000e024: e285a054 add sl, r5, #84 ; 0x54 3000e028: eaffffbf b 3000df2c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 3000e02c: e5988000 ldr r8, [r8] 3000e030: eaffffbd b 3000df2c } else { rtems_filesystem_global_location_t **fs_root_ptr = IMFS_is_mount_point( entry, type ); if ( fs_root_ptr == NULL ) { --dir->reference_count; 3000e034: e1d533b4 ldrh r3, [r5, #52] ; 0x34 3000e038: e2433001 sub r3, r3, #1 3000e03c: e1c533b4 strh r3, [r5, #52] ; 0x34 ++entry->reference_count; 3000e040: e1d833b4 ldrh r3, [r8, #52] ; 0x34 3000e044: e2833001 add r3, r3, #1 3000e048: 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; 3000e04c: e598304c ldr r3, [r8, #76] ; 0x4c currentloc->node_access = entry; 3000e050: e5848020 str r8, [r4, #32] 3000e054: e5933004 ldr r3, [r3, #4] 3000e058: e5843028 str r3, [r4, #40] ; 0x28 3000e05c: eaffffec b 3000e014 =============================================================================== 3000e070 : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000e070: e92d4073 push {r0, r1, r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 3000e074: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000e078: e1a06001 mov r6, r1 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000e07c: eb000151 bl 3000e5c8 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3000e080: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED 3000e084: e3500000 cmp r0, #0 <== NOT EXECUTED 3000e088: 11550000 cmpne r5, r0 <== NOT EXECUTED 3000e08c: 03a05000 moveq r5, #0 <== NOT EXECUTED 3000e090: 13a05001 movne r5, #1 <== NOT EXECUTED 3000e094: 0a000004 beq 3000e0ac <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 3000e098: eb000e33 bl 3001196c <__errno> <== NOT EXECUTED 3000e09c: e3a03001 mov r3, #1 <== NOT EXECUTED 3000e0a0: e5803000 str r3, [r0] <== NOT EXECUTED 3000e0a4: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000e0a8: ea00000b b 3000e0dc <== 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); 3000e0ac: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000e0b0: e1a06a06 lsl r6, r6, #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); 3000e0b4: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 3000e0b8: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000e0bc: e1833a26 orr r3, r3, r6, lsr #20 <== NOT EXECUTED 3000e0c0: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000e0c4: e1a0000d mov r0, sp <== NOT EXECUTED 3000e0c8: e1a01005 mov r1, r5 <== NOT EXECUTED 3000e0cc: ebffe14c bl 30006604 <== NOT EXECUTED 3000e0d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; 3000e0d4: e1a00005 mov r0, r5 <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 3000e0d8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000e0dc: e8bd807c pop {r2, r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 300069ec : void *buffer ) { int err; if (command == FIONBIO) { 300069ec: e59fc06c ldr ip, [pc, #108] ; 30006a60 static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { 300069f0: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { 300069f4: e151000c cmp r1, ip static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { 300069f8: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { 300069fc: 1a00000a bne 30006a2c if (buffer == NULL) 30006a00: e3520000 cmp r2, #0 30006a04: 0a00000e beq 30006a44 err = -EFAULT; else { if (*(int *)buffer) 30006a08: e5924000 ldr r4, [r2] 30006a0c: e593200c ldr r2, [r3, #12] 30006a10: e3540000 cmp r4, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; 30006a14: 13822001 orrne r2, r2, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 30006a18: 03c22001 biceq r2, r2, #1 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 30006a1c: 1583200c strne r2, [r3, #12] 30006a20: 13a04000 movne r4, #0 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 30006a24: 0583200c streq r2, [r3, #12] 30006a28: ea00000a b 30006a58 return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 30006a2c: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED 30006a30: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 30006a34: eb0027bb bl 30010928 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30006a38: e2504000 subs r4, r0, #0 <== NOT EXECUTED 30006a3c: aa000005 bge 30006a58 <== NOT EXECUTED 30006a40: ea000000 b 30006a48 <== NOT EXECUTED { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; 30006a44: e3e0400d mvn r4, #13 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 30006a48: eb00336e bl 30013808 <__errno> <== NOT EXECUTED 30006a4c: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006a50: e5804000 str r4, [r0] <== NOT EXECUTED 30006a54: e3e04000 mvn r4, #0 <== NOT EXECUTED } 30006a58: e1a00004 mov r0, r4 30006a5c: e8bd8010 pop {r4, pc} =============================================================================== 300069b8 : rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 300069b8: e1a01000 mov r1, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 300069bc: e5900018 ldr r0, [r0, #24] rtems_libio_t *iop, const char *pathname, int oflag, mode_t mode ) { 300069c0: e92d4010 push {r4, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 300069c4: e2800050 add r0, r0, #80 ; 0x50 300069c8: eb002619 bl 30010234 IMFS_FIFO_RETURN(err); 300069cc: e2504000 subs r4, r0, #0 300069d0: aa000003 bge 300069e4 300069d4: eb00338b bl 30013808 <__errno> <== NOT EXECUTED 300069d8: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 300069dc: e5804000 str r4, [r0] <== NOT EXECUTED 300069e0: e3e04000 mvn r4, #0 <== NOT EXECUTED } 300069e4: e1a00004 mov r0, r4 300069e8: 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: eb003155 bl 30012254 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: eb00200b bl 3000dd4c "", 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: eb002f02 bl 3001196c <__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: eb003de2 bl 300170ac || 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: eb003ddd bl 300170ac <== 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: eb002ed3 bl 3001196c <__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: eb001ff9 bl 3000de2c <== 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: eb002ec6 bl 3001196c <__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: eb002b1d bl 30012664 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: eb0039ee bl 30016204 <__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} =============================================================================== 30010854 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 30010854: 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 ) 30010858: e59f9184 ldr r9, [pc, #388] ; 300109e4 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 3001085c: 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 ) 30010860: e5998000 ldr r8, [r9] MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 30010864: e88d000c stm sp, {r2, r3} 30010868: 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 ) 3001086c: e1a03128 lsr r3, r8, #2 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 30010870: 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 ) 30010874: e2831001 add r1, r3, #1 30010878: e0010193 mul r1, r3, r1 3001087c: e2811001 add r1, r1, #1 30010880: e0010193 mul r1, r3, r1 30010884: e2411001 sub r1, r1, #1 30010888: e0010198 mul r1, r8, r1 3001088c: e3a03000 mov r3, #0 30010890: e1a02001 mov r2, r1 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { 30010894: 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 ) 30010898: e89d0003 ldm sp, {r0, r1} 3001089c: e1500002 cmp r0, r2 300108a0: e0d11003 sbcs r1, r1, r3 300108a4: ba000002 blt 300108b4 rtems_set_errno_and_return_minus_one( EFBIG ); 300108a8: eb00042f bl 3001196c <__errno> <== NOT EXECUTED 300108ac: e3a0301b mov r3, #27 <== NOT EXECUTED 300108b0: ea000035 b 3001098c <== NOT EXECUTED /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 300108b4: e2863050 add r3, r6, #80 ; 0x50 300108b8: e893000c ldm r3, {r2, r3} 300108bc: e89d0003 ldm sp, {r0, r1} 300108c0: e1520000 cmp r2, r0 300108c4: e0d31001 sbcs r1, r3, r1 300108c8: e58d2008 str r2, [sp, #8] 300108cc: e58d300c str r3, [sp, #12] 300108d0: aa000040 bge 300109d8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 300108d4: e1a05fc8 asr r5, r8, #31 300108d8: e1a02008 mov r2, r8 300108dc: e1a03005 mov r3, r5 300108e0: e89d0003 ldm sp, {r0, r1} 300108e4: eb002b19 bl 3001b550 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 300108e8: e1a02008 mov r2, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 300108ec: e1a0b000 mov fp, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 300108f0: e1a03005 mov r3, r5 300108f4: e28d1008 add r1, sp, #8 300108f8: e8910003 ldm r1, {r0, r1} 300108fc: eb002b13 bl 3001b550 <__divdi3> offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 30010900: e0080890 mul r8, r0, r8 30010904: 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; 30010908: e1a0a000 mov sl, r0 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; 3001090c: e0688002 rsb r8, r8, r2 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 30010910: e1a04000 mov r4, r0 30010914: ea000020 b 3001099c if ( !IMFS_memfile_addblock( the_jnode, block ) ) { 30010918: e1a00006 mov r0, r6 3001091c: e1a01004 mov r1, r4 30010920: ebffff55 bl 3001067c 30010924: e2507000 subs r7, r0, #0 30010928: 1a000013 bne 3001097c if ( zero_fill ) { 3001092c: e59d3010 ldr r3, [sp, #16] 30010930: e3530000 cmp r3, #0 30010934: 0a000017 beq 30010998 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = 30010938: e1a01004 mov r1, r4 <== NOT EXECUTED 3001093c: e1a02007 mov r2, r7 <== NOT EXECUTED 30010940: 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; 30010944: e5995000 ldr r5, [r9] <== NOT EXECUTED block_p *block_ptr = 30010948: ebfffe48 bl 30010270 <== NOT EXECUTED IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); 3001094c: 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; 30010950: 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); 30010954: e0800008 add r0, r0, r8 <== NOT EXECUTED 30010958: e1a01007 mov r1, r7 <== NOT EXECUTED 3001095c: e1a02005 mov r2, r5 <== NOT EXECUTED 30010960: eb000671 bl 3001232c <== NOT EXECUTED offset = 0; 30010964: e1a08007 mov r8, r7 <== NOT EXECUTED 30010968: ea00000a b 30010998 <== NOT EXECUTED } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 3001096c: e1a01004 mov r1, r4 <== NOT EXECUTED 30010970: e1a00006 mov r0, r6 <== NOT EXECUTED 30010974: ebffffac bl 3001082c <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { 30010978: e2444001 sub r4, r4, #1 <== NOT EXECUTED 3001097c: e154000a cmp r4, sl <== NOT EXECUTED 30010980: 2afffff9 bcs 3001096c <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 30010984: eb0003f8 bl 3001196c <__errno> <== NOT EXECUTED 30010988: e3a0301c mov r3, #28 <== NOT EXECUTED 3001098c: e5803000 str r3, [r0] <== NOT EXECUTED 30010990: e3e00000 mvn r0, #0 <== NOT EXECUTED 30010994: ea000010 b 300109dc <== 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++ ) { 30010998: e2844001 add r4, r4, #1 3001099c: e154000b cmp r4, fp 300109a0: 9affffdc bls 30010918 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 300109a4: e89d0003 ldm sp, {r0, r1} 300109a8: e5860050 str r0, [r6, #80] ; 0x50 300109ac: e5861054 str r1, [r6, #84] ; 0x54 IMFS_update_ctime(the_jnode); 300109b0: e3a01000 mov r1, #0 300109b4: e28d0014 add r0, sp, #20 300109b8: ebffd711 bl 30006604 300109bc: e59d3014 ldr r3, [sp, #20] IMFS_update_mtime(the_jnode); 300109c0: e28d0014 add r0, sp, #20 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); 300109c4: e5863048 str r3, [r6, #72] ; 0x48 IMFS_update_mtime(the_jnode); 300109c8: e3a01000 mov r1, #0 300109cc: ebffd70c bl 30006604 300109d0: e59d3014 ldr r3, [sp, #20] 300109d4: 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; 300109d8: e3a00000 mov r0, #0 the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); return 0; } 300109dc: e28dd01c add sp, sp, #28 300109e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30010270 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 30010270: e59f31e4 ldr r3, [pc, #484] ; 3001045c #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 30010274: 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 ) { 30010278: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3001027c: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 30010280: e1a05125 lsr r5, r5, #2 30010284: e2453001 sub r3, r5, #1 30010288: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3001028c: e1a06001 mov r6, r1 30010290: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 30010294: 8a00000e bhi 300102d4 p = info->indirect; if ( malloc_it ) { 30010298: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 3001029c: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 300102a0: 0a000007 beq 300102c4 if ( !p ) { 300102a4: e3500000 cmp r0, #0 300102a8: 1a000003 bne 300102bc p = memfile_alloc_block(); 300102ac: ebffffe2 bl 3001023c if ( !p ) 300102b0: e3500000 cmp r0, #0 300102b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; 300102b8: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; 300102bc: e5940058 ldr r0, [r4, #88] ; 0x58 300102c0: ea000001 b 300102cc } if ( !p ) 300102c4: e3500000 cmp r0, #0 300102c8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; 300102cc: e0800106 add r0, r0, r6, lsl #2 300102d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 300102d4: e2853001 add r3, r5, #1 300102d8: e0030395 mul r3, r5, r3 300102dc: e2432001 sub r2, r3, #1 300102e0: e1510002 cmp r1, r2 300102e4: 8a000021 bhi 30010370 my_block -= FIRST_DOUBLY_INDIRECT; 300102e8: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 300102ec: e1a00006 mov r0, r6 300102f0: e1a01005 mov r1, r5 300102f4: eb0029d3 bl 3001aa48 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 300102f8: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 300102fc: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30010300: e1a00006 mov r0, r6 30010304: eb002989 bl 3001a930 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 30010308: 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; 3001030c: e1a05000 mov r5, r0 p = info->doubly_indirect; 30010310: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { 30010314: 0a00000e beq 30010354 if ( !p ) { 30010318: e3500000 cmp r0, #0 3001031c: 1a000003 bne 30010330 p = memfile_alloc_block(); 30010320: ebffffc5 bl 3001023c if ( !p ) 30010324: e3500000 cmp r0, #0 30010328: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; 3001032c: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; 30010330: e0804105 add r4, r0, r5, lsl #2 30010334: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { 30010338: e3500000 cmp r0, #0 3001033c: 1a000009 bne 30010368 p1 = memfile_alloc_block(); 30010340: ebffffbd bl 3001023c if ( !p1 ) 30010344: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 30010348: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 3001034c: 1a000005 bne 30010368 30010350: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 30010354: e3500000 cmp r0, #0 30010358: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; 3001035c: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) 30010360: e3500000 cmp r0, #0 30010364: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; 30010368: e0800107 add r0, r0, r7, lsl #2 3001036c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 30010370: e2832001 add r2, r3, #1 <== NOT EXECUTED 30010374: e0020295 mul r2, r5, r2 <== NOT EXECUTED 30010378: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3001037c: e1510002 cmp r1, r2 <== NOT EXECUTED 30010380: 8a000033 bhi 30010454 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 30010384: e0636001 rsb r6, r3, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 30010388: e1a00006 mov r0, r6 <== NOT EXECUTED 3001038c: e1a01005 mov r1, r5 <== NOT EXECUTED 30010390: eb0029ac bl 3001aa48 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 30010394: 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; 30010398: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3001039c: e1a00006 mov r0, r6 <== NOT EXECUTED 300103a0: eb002962 bl 3001a930 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 300103a4: 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; 300103a8: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 300103ac: eb00295f bl 3001a930 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 300103b0: 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; 300103b4: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 300103b8: e1a00006 mov r0, r6 <== NOT EXECUTED 300103bc: eb0029a1 bl 3001aa48 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 300103c0: 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; 300103c4: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; 300103c8: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 300103cc: 0a000016 beq 3001042c <== NOT EXECUTED if ( !p ) { 300103d0: e3500000 cmp r0, #0 <== NOT EXECUTED 300103d4: 1a000003 bne 300103e8 <== NOT EXECUTED p = memfile_alloc_block(); 300103d8: ebffff97 bl 3001023c <== NOT EXECUTED if ( !p ) 300103dc: e3500000 cmp r0, #0 <== NOT EXECUTED 300103e0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; info->triply_indirect = p; 300103e4: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 300103e8: e0804107 add r4, r0, r7, lsl #2 <== NOT EXECUTED 300103ec: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { 300103f0: e3500000 cmp r0, #0 <== NOT EXECUTED 300103f4: 1a000003 bne 30010408 <== NOT EXECUTED p1 = memfile_alloc_block(); 300103f8: ebffff8f bl 3001023c <== NOT EXECUTED if ( !p1 ) 300103fc: e3500000 cmp r0, #0 <== NOT EXECUTED 30010400: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 30010404: e5840000 str r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 30010408: e0804105 add r4, r0, r5, lsl #2 <== NOT EXECUTED 3001040c: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { 30010410: e3500000 cmp r0, #0 <== NOT EXECUTED 30010414: 1a00000c bne 3001044c <== NOT EXECUTED p2 = memfile_alloc_block(); 30010418: ebffff87 bl 3001023c <== NOT EXECUTED if ( !p2 ) 3001041c: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 30010420: 15840000 strne r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 30010424: 1a000008 bne 3001044c <== NOT EXECUTED 30010428: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3001042c: e3500000 cmp r0, #0 <== NOT EXECUTED 30010430: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p1 = (block_p *) p[ triply ]; 30010434: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) 30010438: e3500000 cmp r0, #0 <== NOT EXECUTED 3001043c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 30010440: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) 30010444: e3500000 cmp r0, #0 <== NOT EXECUTED 30010448: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 3001044c: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 30010450: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } /* * This means the requested block number is out of range. */ return 0; 30010454: e3a00000 mov r0, #0 <== NOT EXECUTED } 30010458: 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 =============================================================================== 30010724 : /* * 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; 30010724: e59f30fc ldr r3, [pc, #252] ; 30010828 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 30010728: 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; 3001072c: e5935000 ldr r5, [r3] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30010730: 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 ) { 30010734: e1a04000 mov r4, r0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 30010738: 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; 3001073c: e1a05125 lsr r5, r5, #2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 30010740: 12800058 addne r0, r0, #88 ; 0x58 30010744: 11a01005 movne r1, r5 30010748: 1bffffe1 blne 300106d4 } if ( info->doubly_indirect ) { 3001074c: e594305c ldr r3, [r4, #92] ; 0x5c 30010750: e3530000 cmp r3, #0 30010754: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 3001075c: 1a000007 bne 30010780 30010760: ea00000c b 30010798 for ( i=0 ; idoubly_indirect[i] ) { 30010764: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 30010768: e0830106 add r0, r3, r6, lsl #2 <== NOT EXECUTED 3001076c: e7933106 ldr r3, [r3, r6, lsl #2] <== NOT EXECUTED 30010770: e3530000 cmp r3, #0 <== NOT EXECUTED memfile_free_blocks_in_table( 30010774: 11a01005 movne r1, r5 <== NOT EXECUTED 30010778: 1bffffd5 blne 300106d4 <== 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 ); 3001078c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 30010790: e1a01005 mov r1, r5 <== NOT EXECUTED 30010794: ebffffce bl 300106d4 <== NOT EXECUTED } if ( info->triply_indirect ) { 30010798: e5943060 ldr r3, [r4, #96] ; 0x60 3001079c: e3530000 cmp r3, #0 300107a0: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 300107a8: 1a000016 bne 30010808 300107ac: ea00001b b 30010820 for ( i=0 ; itriply_indirect[i]; 300107b0: 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( 300107b4: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 300107b8: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 300107bc: e3580000 cmp r8, #0 <== NOT EXECUTED 300107c0: 0a000013 beq 30010814 <== NOT EXECUTED 300107c4: e3a07000 mov r7, #0 <== NOT EXECUTED 300107c8: ea000006 b 300107e8 <== 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( 300107f4: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 300107f8: e1a01005 mov r1, r5 <== NOT EXECUTED 300107fc: e0800009 add r0, r0, r9 <== NOT EXECUTED 30010800: ebffffb3 bl 300106d4 <== 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( 30010814: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 30010818: e1a01005 mov r1, r5 <== NOT EXECUTED 3001081c: ebffffac bl 300106d4 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } 30010820: e1a00004 mov r0, r4 30010824: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 3001082c : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 3001082c: 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 ); 30010830: e3a02000 mov r2, #0 <== NOT EXECUTED 30010834: ebfffe8d bl 30010270 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; 30010838: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3001083c: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 30010840: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; 30010844: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 30010848: ebffff99 bl 300106b4 <== NOT EXECUTED return 1; } 3001084c: e3a00001 mov r0, #1 <== NOT EXECUTED 30010850: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 300109e8 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 300109e8: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 300109ec: e59db034 ldr fp, [sp, #52] ; 0x34 300109f0: 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; 300109f4: e08b3001 add r3, fp, r1 if ( last_byte > the_jnode->info.file.size ) { 300109f8: e1a04003 mov r4, r3 300109fc: e3a05000 mov r5, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010a00: 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 ) { 30010a04: e2803050 add r3, r0, #80 ; 0x50 30010a08: e893000c ldm r3, {r2, r3} 30010a0c: e1520004 cmp r2, r4 30010a10: e0d31005 sbcs r1, r3, r5 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 30010a14: 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 ) { 30010a18: aa000009 bge 30010a44 bool zero_fill = start > the_jnode->info.file.size; status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); 30010a1c: e89d0180 ldm sp, {r7, r8} 30010a20: e1520007 cmp r2, r7 30010a24: e0d38008 sbcs r8, r3, r8 30010a28: a3a01000 movge r1, #0 30010a2c: b3a01001 movlt r1, #1 30010a30: e1a02004 mov r2, r4 30010a34: e1a03005 mov r3, r5 30010a38: ebffff85 bl 30010854 if ( status ) 30010a3c: e2507000 subs r7, r0, #0 30010a40: 1a00004c bne 30010b78 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010a44: e59f3138 ldr r3, [pc, #312] ; 30010b84 30010a48: e89d0003 ldm sp, {r0, r1} 30010a4c: e5938000 ldr r8, [r3] 30010a50: e1a05fc8 asr r5, r8, #31 30010a54: e1a02008 mov r2, r8 30010a58: e1a03005 mov r3, r5 30010a5c: eb002bf6 bl 3001ba3c <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010a60: e1a02008 mov r2, r8 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010a64: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010a68: e1a03005 mov r3, r5 30010a6c: e89d0003 ldm sp, {r0, r1} 30010a70: eb002ab6 bl 3001b550 <__divdi3> if ( start_offset ) { 30010a74: e3570000 cmp r7, #0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 30010a78: e1a04008 mov r4, r8 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 30010a7c: e1a05000 mov r5, r0 unsigned int last_byte; unsigned int start_offset; int copied; const unsigned char *src; src = source; 30010a80: 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 ) { 30010a84: 01a0400b moveq r4, fp 30010a88: 0a000013 beq 30010adc 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 ); 30010a8c: e1a00006 mov r0, r6 <== NOT EXECUTED 30010a90: e1a01005 mov r1, r5 <== NOT EXECUTED 30010a94: e3a02000 mov r2, #0 <== NOT EXECUTED 30010a98: ebfffdf4 bl 30010270 <== NOT EXECUTED if ( !block_ptr ) 30010a9c: e3500000 cmp r0, #0 <== NOT EXECUTED return copied; 30010aa0: 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 ) 30010aa4: 0a000033 beq 30010b78 <== 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; 30010aa8: e0678008 rsb r8, r7, r8 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 30010aac: 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; 30010ab0: e158000b cmp r8, fp <== NOT EXECUTED 30010ab4: 31a0a008 movcc sl, r8 <== NOT EXECUTED 30010ab8: 21a0a00b movcs sl, fp <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 30010abc: e0800007 add r0, r0, r7 <== NOT EXECUTED 30010ac0: e1a01009 mov r1, r9 <== NOT EXECUTED 30010ac4: e1a0200a mov r2, sl <== NOT EXECUTED 30010ac8: eb0005e1 bl 30012254 <== NOT EXECUTED src += to_copy; 30010acc: e089800a add r8, r9, sl <== NOT EXECUTED block++; 30010ad0: e2855001 add r5, r5, #1 <== NOT EXECUTED my_length -= to_copy; 30010ad4: e06a400b rsb r4, sl, fp <== NOT EXECUTED copied += to_copy; 30010ad8: e1a0700a mov r7, sl <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 30010adc: e59f90a0 ldr r9, [pc, #160] ; 30010b84 30010ae0: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010ae4: ea00000d b 30010b20 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010ae8: e1a00006 mov r0, r6 30010aec: e1a01005 mov r1, r5 30010af0: e3a02000 mov r2, #0 30010af4: ebfffddd bl 30010270 if ( !block_ptr ) 30010af8: e3500000 cmp r0, #0 30010afc: 0a00001d beq 30010b78 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 ); 30010b00: e1a01008 mov r1, r8 30010b04: e5900000 ldr r0, [r0] 30010b08: e1a0200a mov r2, sl 30010b0c: eb0005d0 bl 30012254 src += to_copy; 30010b10: e088800a add r8, r8, sl block++; 30010b14: e2855001 add r5, r5, #1 my_length -= to_copy; 30010b18: 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( 30010b1c: 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 ) { 30010b20: e5993000 ldr r3, [r9] 30010b24: e1540003 cmp r4, r3 30010b28: 2affffee bcs 30010ae8 * 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 ) { 30010b2c: e3540000 cmp r4, #0 30010b30: 0a00000a beq 30010b60 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010b34: e1a00006 mov r0, r6 30010b38: e1a01005 mov r1, r5 30010b3c: e3a02000 mov r2, #0 30010b40: ebfffdca bl 30010270 if ( !block_ptr ) 30010b44: e3500000 cmp r0, #0 30010b48: 0a00000a beq 30010b78 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 ); 30010b4c: e5900000 ldr r0, [r0] 30010b50: e1a01008 mov r1, r8 30010b54: e1a02004 mov r2, r4 30010b58: eb0005bd bl 30012254 my_length = 0; copied += to_copy; 30010b5c: e0877004 add r7, r7, r4 } IMFS_mtime_ctime_update( the_jnode ); 30010b60: e28d0008 add r0, sp, #8 30010b64: e3a01000 mov r1, #0 30010b68: ebffd6a5 bl 30006604 30010b6c: e59d3008 ldr r3, [sp, #8] 30010b70: e5863044 str r3, [r6, #68] ; 0x44 30010b74: e5863048 str r3, [r6, #72] ; 0x48 return copied; } 30010b78: e1a00007 mov r0, r7 30010b7c: e28dd010 add sp, sp, #16 30010b80: 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: eb002e73 bl 3001196c <__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: eb002e6e bl 3001196c <__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) =============================================================================== 3000e310 : return node; } static IMFS_jnode_t *IMFS_node_destroy_sym_link( IMFS_jnode_t *node ) { 3000e310: e92d4010 push {r4, lr} <== NOT EXECUTED 3000e314: e1a04000 mov r4, r0 <== NOT EXECUTED free( node->info.sym_link.name ); 3000e318: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 3000e31c: ebffe08f bl 30006560 <== NOT EXECUTED return node; } 3000e320: e1a00004 mov r0, r4 <== NOT EXECUTED 3000e324: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 3000e26c : 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; 3000e26c: e5913000 ldr r3, [r1] <== NOT EXECUTED 3000e270: e5803050 str r3, [r0, #80] ; 0x50 <== NOT EXECUTED return node; } 3000e274: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000e224 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 3000e224: 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 ); 3000e228: e2803054 add r3, r0, #84 ; 0x54 3000e22c: e1520003 cmp r2, r3 } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { 3000e230: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { 3000e234: 0a000004 beq 3000e24c errno = ENOTEMPTY; 3000e238: eb000dcb bl 3001196c <__errno> <== NOT EXECUTED 3000e23c: e3a0305a mov r3, #90 ; 0x5a <== NOT EXECUTED 3000e240: e5803000 str r3, [r0] <== NOT EXECUTED node = NULL; 3000e244: e3a00000 mov r0, #0 <== NOT EXECUTED 3000e248: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED } else if ( IMFS_is_mount_point( node ) ) { 3000e24c: e590305c ldr r3, [r0, #92] ; 0x5c 3000e250: e3530000 cmp r3, #0 3000e254: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) errno = EBUSY; 3000e258: eb000dc3 bl 3001196c <__errno> <== NOT EXECUTED 3000e25c: e3a03010 mov r3, #16 <== NOT EXECUTED 3000e260: e5803000 str r3, [r0] <== NOT EXECUTED 3000e264: e3a00000 mov r0, #0 <== NOT EXECUTED node = NULL; } return node; } 3000e268: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3000e328 : } static IMFS_jnode_t *IMFS_node_remove_hard_link( IMFS_jnode_t *node ) { 3000e328: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *target = node->info.hard_link.link_node; 3000e32c: e5904050 ldr r4, [r0, #80] ; 0x50 <== NOT EXECUTED } static IMFS_jnode_t *IMFS_node_remove_hard_link( IMFS_jnode_t *node ) { 3000e330: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *target = node->info.hard_link.link_node; if ( target->st_nlink == 1) { 3000e334: e1d433b6 ldrh r3, [r4, #54] ; 0x36 <== NOT EXECUTED 3000e338: e3530001 cmp r3, #1 <== NOT EXECUTED 3000e33c: 1a000006 bne 3000e35c <== NOT EXECUTED target = (*target->control->node_remove)( target ); 3000e340: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED 3000e344: e1a00004 mov r0, r4 <== NOT EXECUTED 3000e348: e1a0e00f mov lr, pc <== NOT EXECUTED 3000e34c: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( target == NULL ) { node = NULL; 3000e350: e3500000 cmp r0, #0 <== NOT EXECUTED 3000e354: 03a05000 moveq r5, #0 <== NOT EXECUTED 3000e358: ea000006 b 3000e378 <== NOT EXECUTED } } else { --target->st_nlink; 3000e35c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3000e360: e1c433b6 strh r3, [r4, #54] ; 0x36 <== NOT EXECUTED IMFS_update_ctime( target ); 3000e364: e1a0000d mov r0, sp <== NOT EXECUTED 3000e368: e3a01000 mov r1, #0 <== NOT EXECUTED 3000e36c: ebffe0a4 bl 30006604 <== NOT EXECUTED 3000e370: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000e374: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED } return node; } 3000e378: e1a00005 mov r0, r5 <== NOT EXECUTED 3000e37c: 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: eb00307d bl 30012254 <== 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: eb002e30 bl 3001196c <__errno> <== NOT EXECUTED 300060a8: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 300060ac: ea000001 b 300060b8 <== NOT EXECUTED rv = -1; } } else { errno = EINVAL; 300060b0: eb002e2d bl 3001196c <__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 =============================================================================== 3000e284 : static int IMFS_stat_link( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e284: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED const IMFS_jnode_t *node = loc->node_access; 3000e288: e5905008 ldr r5, [r0, #8] <== NOT EXECUTED static int IMFS_stat_link( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e28c: 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; 3000e290: e595304c ldr r3, [r5, #76] ; 0x4c <== NOT EXECUTED 3000e294: e1a06000 mov r6, r0 <== NOT EXECUTED const IMFS_jnode_t *node = loc->node_access; if ( IMFS_type( node ) != IMFS_HARD_LINK ) { 3000e298: e5933000 ldr r3, [r3] <== NOT EXECUTED static int IMFS_stat_link( const rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000e29c: e1a04001 mov r4, r1 <== NOT EXECUTED const IMFS_jnode_t *node = loc->node_access; if ( IMFS_type( node ) != IMFS_HARD_LINK ) { 3000e2a0: e3530002 cmp r3, #2 <== NOT EXECUTED 3000e2a4: 0a000008 beq 3000e2cc <== NOT EXECUTED buf->st_size = strlen( node->info.sym_link.name ); 3000e2a8: e5950050 ldr r0, [r5, #80] ; 0x50 <== NOT EXECUTED 3000e2ac: eb00136a bl 3001305c <== NOT EXECUTED 3000e2b0: e3a03000 mov r3, #0 <== NOT EXECUTED 3000e2b4: e5840020 str r0, [r4, #32] <== NOT EXECUTED 3000e2b8: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED return IMFS_stat( loc, buf ); 3000e2bc: e1a00006 mov r0, r6 <== NOT EXECUTED 3000e2c0: e1a01004 mov r1, r4 <== NOT EXECUTED 3000e2c4: eb000039 bl 3000e3b0 <== NOT EXECUTED 3000e2c8: ea00000e b 3000e308 <== NOT EXECUTED } else { rtems_filesystem_location_info_t targetloc = *loc; 3000e2cc: e1a0c00d mov ip, sp <== NOT EXECUTED 3000e2d0: e1a0e000 mov lr, r0 <== NOT EXECUTED 3000e2d4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3000e2d8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3000e2dc: e89e0003 ldm lr, {r0, r1} <== NOT EXECUTED targetloc.node_access = node->info.hard_link.link_node; 3000e2e0: 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; 3000e2e4: e88c0003 stm ip, {r0, r1} <== NOT EXECUTED targetloc.node_access = node->info.hard_link.link_node; 3000e2e8: 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; 3000e2ec: e593304c ldr r3, [r3, #76] ; 0x4c <== NOT EXECUTED IMFS_Set_handlers( &targetloc ); return (targetloc.handlers->fstat_h)( &targetloc, buf ); 3000e2f0: e1a0000d mov r0, sp <== NOT EXECUTED 3000e2f4: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3000e2f8: e1a01004 mov r1, r4 <== NOT EXECUTED 3000e2fc: e58d3010 str r3, [sp, #16] <== NOT EXECUTED 3000e300: e1a0e00f mov lr, pc <== NOT EXECUTED 3000e304: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED } } 3000e308: e28dd018 add sp, sp, #24 <== NOT EXECUTED 3000e30c: 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: eb00322f bl 300129fc 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: eb001f2d bl 3000de2c ); 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: eb002df7 bl 3001196c <__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: eb002de4 bl 3001196c <__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: eb002ddf bl 3001196c <__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: eb0033f9 bl 300131fc