=============================================================================== 30006ac8 : static void CPU_usage_Per_thread_handler( Thread_Control *the_thread ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 30006ac8: e3a03000 mov r3, #0 <== NOT EXECUTED 30006acc: e5803084 str r3, [r0, #132] ; 0x84 <== NOT EXECUTED 30006ad0: e5803088 str r3, [r0, #136] ; 0x88 <== NOT EXECUTED #else the_thread->cpu_time_used = 0; #endif } 30006ad4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30005a04 : static inline void Dump_Line( const unsigned char *buffer, int length ) { 30005a04: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 30005a08: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; 30005a0c: e3a04000 mov r4, #0 <== NOT EXECUTED 30005a10: e28d7078 add r7, sp, #120 ; 0x78 <== NOT EXECUTED static inline void Dump_Line( const unsigned char *buffer, int length ) { 30005a14: e1a05000 mov r5, r0 <== NOT EXECUTED 30005a18: e1a06001 mov r6, r1 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; 30005a1c: e5674078 strb r4, [r7, #-120]! ; 0x78 <== NOT EXECUTED for( i=0 ; i <== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); 30005a24: e7d53004 ldrb r3, [r5, r4] <== NOT EXECUTED 30005a28: e1a0000d mov r0, sp <== NOT EXECUTED 30005a2c: e59f10bc ldr r1, [pc, #188] ; 30005af0 <== NOT EXECUTED 30005a30: e1a0200d mov r2, sp <== NOT EXECUTED 30005a34: eb003081 bl 30011c40 <== NOT EXECUTED int i; char line_buffer[120]; line_buffer[0] = '\0'; for( i=0 ; i <== NOT EXECUTED 30005a44: ea000003 b 30005a58 <== NOT EXECUTED sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 30005a48: e1a0000d mov r0, sp <== NOT EXECUTED 30005a4c: e59f10a0 ldr r1, [pc, #160] ; 30005af4 <== NOT EXECUTED 30005a50: eb0030d5 bl 30011dac <== NOT EXECUTED line_buffer[0] = '\0'; for( i=0 ; i <== NOT EXECUTED strcat( line_buffer, " " ); strcat( line_buffer, "|" ); 30005a60: e1a0000d mov r0, sp <== NOT EXECUTED 30005a64: e59f108c ldr r1, [pc, #140] ; 30005af8 <== NOT EXECUTED 30005a68: eb0030cf bl 30011dac <== NOT EXECUTED for( i=0 ; i <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); 30005a7c: e7d53004 ldrb r3, [r5, r4] <== NOT EXECUTED 30005a80: e5972000 ldr r2, [r7] <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005a94: e3120097 tst r2, #151 ; 0x97 <== NOT EXECUTED 30005a98: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED 30005a9c: e1a0200d mov r2, sp <== NOT EXECUTED 30005aa0: eb003066 bl 30011c40 <== NOT EXECUTED for( ; i<16 ; i++ ) strcat( line_buffer, " " ); strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005ab0: ea000004 b 30005ac8 <== NOT EXECUTED sprintf( line_buffer, "%s%c", line_buffer, isprint( buffer[ i ] ) ? buffer[ i ] : '.' ); for( ; i<16 ; i++ ) strcat( line_buffer, " " ); 30005ab4: e1a0000d mov r0, sp <== NOT EXECUTED 30005ab8: e59f1044 ldr r1, [pc, #68] ; 30005b04 <== NOT EXECUTED 30005abc: eb0030ba bl 30011dac <== NOT EXECUTED strcat( line_buffer, "|" ); for( i=0 ; i <== NOT EXECUTED 30005ac8: e1a0500d mov r5, sp <== NOT EXECUTED 30005acc: e354000f cmp r4, #15 <== NOT EXECUTED 30005ad0: dafffff7 ble 30005ab4 <== NOT EXECUTED strcat( line_buffer, " " ); strcat( line_buffer, "|\n" ); 30005ad4: e1a0000d mov r0, sp <== NOT EXECUTED 30005ad8: e59f1028 ldr r1, [pc, #40] ; 30005b08 <== NOT EXECUTED 30005adc: eb0030b2 bl 30011dac <== NOT EXECUTED printk( line_buffer ); 30005ae0: e1a0000d mov r0, sp <== NOT EXECUTED 30005ae4: eb0005ad bl 300071a0 <== NOT EXECUTED } 30005ae8: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED 30005aec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 3000d028 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 3000d028: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 3000d02c: e5903010 ldr r3, [r0, #16] switch( node->type ) { 3000d030: e592204c ldr r2, [r2, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 3000d034: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 3000d038: e2422001 sub r2, r2, #1 3000d03c: e3520006 cmp r2, #6 3000d040: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000d044: ea000010 b 3000d08c <== NOT EXECUTED 3000d048: 3000d064 .word 0x3000d064 <== NOT EXECUTED 3000d04c: 3000d06c .word 0x3000d06c <== NOT EXECUTED 3000d050: 3000d074 .word 0x3000d074 <== NOT EXECUTED 3000d054: 3000d074 .word 0x3000d074 <== NOT EXECUTED 3000d058: 3000d07c .word 0x3000d07c <== NOT EXECUTED 3000d05c: 3000d07c .word 0x3000d07c <== NOT EXECUTED 3000d060: 3000d084 .word 0x3000d084 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 3000d064: e593300c ldr r3, [r3, #12] 3000d068: ea000006 b 3000d088 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 3000d06c: e59f3020 ldr r3, [pc, #32] ; 3000d094 3000d070: ea000004 b 3000d088 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 3000d074: e59f301c ldr r3, [pc, #28] ; 3000d098 3000d078: ea000002 b 3000d088 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 3000d07c: e5933008 ldr r3, [r3, #8] 3000d080: ea000000 b 3000d088 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 3000d084: e5933010 ldr r3, [r3, #16] 3000d088: e5803008 str r3, [r0, #8] break; } return 0; } 3000d08c: e3a00000 mov r0, #0 3000d090: e12fff1e bx lr =============================================================================== 3000cdc4 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000cdc4: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 3000cdc8: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED 3000cdcc: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 3000cdd0: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 3000cdd4: e1a06821 lsr r6, r1, #16 <== NOT EXECUTED 3000cdd8: 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(); 3000cddc: eb000397 bl 3000dc40 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3000cde0: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED 3000cde4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000cde8: 11550000 cmpne r5, r0 <== NOT EXECUTED 3000cdec: 03a05000 moveq r5, #0 <== NOT EXECUTED 3000cdf0: 13a05001 movne r5, #1 <== NOT EXECUTED 3000cdf4: 0a000004 beq 3000ce0c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 3000cdf8: eb0010b1 bl 300110c4 <__errno> <== NOT EXECUTED 3000cdfc: e3a03001 mov r3, #1 <== NOT EXECUTED 3000ce00: e5803000 str r3, [r0] <== NOT EXECUTED 3000ce04: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000ce08: ea000007 b 3000ce2c <== NOT EXECUTED #endif jnode->st_uid = owner; 3000ce0c: e1c463bc strh r6, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; 3000ce10: e1c473be strh r7, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); 3000ce14: e1a0000d mov r0, sp <== NOT EXECUTED 3000ce18: e1a01005 mov r1, r5 <== NOT EXECUTED 3000ce1c: ebffe549 bl 30006348 <== NOT EXECUTED 3000ce20: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; 3000ce24: e1a00005 mov r0, r5 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 3000ce28: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 3000ce2c: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 3000d150 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000d150: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 3000d154: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000d158: e24dd040 sub sp, sp, #64 ; 0x40 3000d15c: e58d0000 str r0, [sp] 3000d160: e1a06001 mov r6, r1 3000d164: e1a08002 mov r8, r2 3000d168: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000d16c: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 3000d170: 03a09001 moveq r9, #1 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 3000d174: 028da004 addeq sl, sp, #4 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 3000d178: 0a000057 beq 3000d2dc rtems_set_errno_and_return_minus_one( EIO ); 3000d17c: eb000fd0 bl 300110c4 <__errno> <== NOT EXECUTED 3000d180: e3a03005 mov r3, #5 <== NOT EXECUTED 3000d184: ea00007e b 3000d384 <== NOT EXECUTED * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 3000d188: e59d2000 ldr r2, [sp] 3000d18c: e28d303c add r3, sp, #60 ; 0x3c 3000d190: e0820007 add r0, r2, r7 3000d194: e1a01006 mov r1, r6 3000d198: e1a0200a mov r2, sl 3000d19c: eb0001ae bl 3000d85c pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000d1a0: e5943000 ldr r3, [r4] * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 3000d1a4: e1a09000 mov r9, r0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 3000d1a8: e3530000 cmp r3, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 3000d1ac: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 3000d1b0: 0a000041 beq 3000d2bc rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000d1b4: e3500000 cmp r0, #0 3000d1b8: 0a000006 beq 3000d1d8 if ( node->type == IMFS_DIRECTORY ) 3000d1bc: e595104c ldr r1, [r5, #76] ; 0x4c 3000d1c0: e3510001 cmp r1, #1 3000d1c4: 1a000003 bne 3000d1d8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 3000d1c8: e1a00004 mov r0, r4 3000d1cc: ebffffb2 bl 3000d09c 3000d1d0: e3500000 cmp r0, #0 3000d1d4: 0a000068 beq 3000d37c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 3000d1d8: e3590003 cmp r9, #3 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 3000d1dc: e06b6006 rsb r6, fp, r6 i += len; 3000d1e0: e087700b add r7, r7, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 3000d1e4: e5945000 ldr r5, [r4] switch( type ) { 3000d1e8: 0a000014 beq 3000d240 3000d1ec: e3590004 cmp r9, #4 3000d1f0: 0a000036 beq 3000d2d0 3000d1f4: e3590002 cmp r9, #2 3000d1f8: 1a000037 bne 3000d2dc case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 3000d1fc: e59fc194 ldr ip, [pc, #404] ; 3000d398 3000d200: e59c3000 ldr r3, [ip] 3000d204: e5933018 ldr r3, [r3, #24] 3000d208: e1550003 cmp r5, r3 3000d20c: 0a000032 beq 3000d2dc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 3000d210: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 3000d214: e59e301c ldr r3, [lr, #28] 3000d218: e1550003 cmp r5, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 3000d21c: 028dc028 addeq ip, sp, #40 ; 0x28 3000d220: 028ee008 addeq lr, lr, #8 3000d224: 0a000037 beq 3000d308 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 3000d228: e5955008 ldr r5, [r5, #8] 3000d22c: e3550000 cmp r5, #0 3000d230: 1a000024 bne 3000d2c8 rtems_set_errno_and_return_minus_one( ENOENT ); 3000d234: eb000fa2 bl 300110c4 <__errno> <== NOT EXECUTED 3000d238: e5809000 str r9, [r0] <== NOT EXECUTED 3000d23c: ea000051 b 3000d388 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 3000d240: e595304c ldr r3, [r5, #76] ; 0x4c 3000d244: e3530003 cmp r3, #3 3000d248: 1a000004 bne 3000d260 IMFS_evaluate_hard_link( pathloc, 0 ); 3000d24c: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d250: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d254: ebffffaa bl 3000d104 <== NOT EXECUTED node = pathloc->node_access; 3000d258: e5945000 ldr r5, [r4] <== NOT EXECUTED 3000d25c: ea000008 b 3000d284 <== NOT EXECUTED * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 3000d260: e3530004 cmp r3, #4 3000d264: 1a000006 bne 3000d284 result = IMFS_evaluate_sym_link( pathloc, 0 ); 3000d268: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d26c: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d270: eb000049 bl 3000d39c <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 3000d274: e3700001 cmn r0, #1 <== NOT EXECUTED * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 3000d278: e1a0b000 mov fp, r0 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 3000d27c: e5945000 ldr r5, [r4] <== NOT EXECUTED if ( result == -1 ) 3000d280: 0a000041 beq 3000d38c <== NOT EXECUTED } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000d284: e595304c ldr r3, [r5, #76] ; 0x4c 3000d288: e3530001 cmp r3, #1 3000d28c: 0a000002 beq 3000d29c rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000d290: eb000f8b bl 300110c4 <__errno> <== NOT EXECUTED 3000d294: e3a03014 mov r3, #20 <== NOT EXECUTED 3000d298: ea000039 b 3000d384 <== NOT EXECUTED /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 3000d29c: e595e05c ldr lr, [r5, #92] ; 0x5c 3000d2a0: e35e0000 cmp lr, #0 3000d2a4: 1a000015 bne 3000d300 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000d2a8: e1a00005 mov r0, r5 3000d2ac: e1a0100a mov r1, sl 3000d2b0: eb000149 bl 3000d7dc if ( !node ) 3000d2b4: e2505000 subs r5, r0, #0 3000d2b8: 1a000002 bne 3000d2c8 rtems_set_errno_and_return_minus_one( ENOENT ); 3000d2bc: eb000f80 bl 300110c4 <__errno> 3000d2c0: e3a03002 mov r3, #2 3000d2c4: ea00002e b 3000d384 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 3000d2c8: e5845000 str r5, [r4] 3000d2cc: ea000002 b 3000d2dc case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000d2d0: eb000f7b bl 300110c4 <__errno> <== NOT EXECUTED 3000d2d4: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000d2d8: ea000029 b 3000d384 <== NOT EXECUTED /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 3000d2dc: e3590004 cmp r9, #4 3000d2e0: 13590000 cmpne r9, #0 3000d2e4: 1affffa7 bne 3000d188 * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { 3000d2e8: e595304c ldr r3, [r5, #76] ; 0x4c 3000d2ec: e3530001 cmp r3, #1 3000d2f0: 1a000019 bne 3000d35c if ( node->info.directory.mt_fs != NULL ) { 3000d2f4: e595e05c ldr lr, [r5, #92] ; 0x5c 3000d2f8: e35e0000 cmp lr, #0 3000d2fc: 0a000016 beq 3000d35c newloc = node->info.directory.mt_fs->mt_fs_root; 3000d300: e28dc028 add ip, sp, #40 ; 0x28 3000d304: e28ee01c add lr, lr, #28 3000d308: e8be000f ldm lr!, {r0, r1, r2, r3} 3000d30c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000d310: e59ee000 ldr lr, [lr] 3000d314: e58ce000 str lr, [ip] *pathloc = newloc; 3000d318: e28dc028 add ip, sp, #40 ; 0x28 3000d31c: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000d320: e1a0c004 mov ip, r4 3000d324: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000d328: e59d103c ldr r1, [sp, #60] ; 0x3c 3000d32c: e59d2000 ldr r2, [sp] */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 3000d330: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 3000d334: e0610007 rsb r0, r1, r7 3000d338: e0820000 add r0, r2, r0 3000d33c: e594c00c ldr ip, [r4, #12] 3000d340: e0861001 add r1, r6, r1 3000d344: e1a02008 mov r2, r8 3000d348: e1a03004 mov r3, r4 3000d34c: e1a0e00f mov lr, pc 3000d350: e59cf000 ldr pc, [ip] 3000d354: e1a0b000 mov fp, r0 3000d358: ea00000b b 3000d38c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000d35c: e1a00004 mov r0, r4 3000d360: ebffff30 bl 3000d028 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000d364: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 3000d368: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 3000d36c: e1a00004 mov r0, r4 3000d370: ebffff49 bl 3000d09c 3000d374: e3500000 cmp r0, #0 3000d378: 1a000003 bne 3000d38c rtems_set_errno_and_return_minus_one( EACCES ); 3000d37c: eb000f50 bl 300110c4 <__errno> <== NOT EXECUTED 3000d380: e3a0300d mov r3, #13 <== NOT EXECUTED 3000d384: e5803000 str r3, [r0] 3000d388: e3e0b000 mvn fp, #0 return result; } 3000d38c: e1a0000b mov r0, fp 3000d390: e28dd040 add sp, sp, #64 ; 0x40 3000d394: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000d4d8 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 3000d4d8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000d4dc: e24dd03c sub sp, sp, #60 ; 0x3c 3000d4e0: e1a07000 mov r7, r0 3000d4e4: e1a04001 mov r4, r1 3000d4e8: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000d4ec: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 3000d4f0: eb0012dd bl 3001206c const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 3000d4f4: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 3000d4f8: e1a08000 mov r8, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 3000d4fc: e1a01008 mov r1, r8 3000d500: e28d3038 add r3, sp, #56 ; 0x38 3000d504: e0870005 add r0, r7, r5 3000d508: e1a0200d mov r2, sp 3000d50c: eb0000d2 bl 3000d85c pathlen -= len; i += len; if ( !pathloc->node_access ) 3000d510: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 3000d514: e59db038 ldr fp, [sp, #56] ; 0x38 i += len; if ( !pathloc->node_access ) 3000d518: e3530000 cmp r3, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 3000d51c: e1a09000 mov r9, r0 pathlen -= len; 3000d520: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 3000d524: 0a000060 beq 3000d6ac /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 3000d528: e3500000 cmp r0, #0 3000d52c: 0a000006 beq 3000d54c if ( node->type == IMFS_DIRECTORY ) 3000d530: e596104c ldr r1, [r6, #76] ; 0x4c 3000d534: e3510001 cmp r1, #1 3000d538: 1a000003 bne 3000d54c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 3000d53c: e1a00004 mov r0, r4 3000d540: ebfffed5 bl 3000d09c 3000d544: e3500000 cmp r0, #0 3000d548: 0a00006c beq 3000d700 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 3000d54c: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 3000d550: e085500b add r5, r5, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 3000d554: e1a06003 mov r6, r3 switch( type ) { 3000d558: e3590004 cmp r9, #4 3000d55c: 979ff109 ldrls pc, [pc, r9, lsl #2] 3000d560: eaffffe5 b 3000d4fc <== NOT EXECUTED 3000d564: 3000d670 .word 0x3000d670 <== NOT EXECUTED 3000d568: 3000d4fc .word 0x3000d4fc <== NOT EXECUTED 3000d56c: 3000d578 .word 0x3000d578 <== NOT EXECUTED 3000d570: 3000d5b4 .word 0x3000d5b4 <== NOT EXECUTED 3000d574: 3000d67c .word 0x3000d67c <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 3000d578: e59f119c ldr r1, [pc, #412] ; 3000d71c 3000d57c: e5912000 ldr r2, [r1] 3000d580: e5922018 ldr r2, [r2, #24] 3000d584: e1530002 cmp r3, r2 3000d588: 0affffdb beq 3000d4fc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 3000d58c: e594e010 ldr lr, [r4, #16] 3000d590: e59e201c ldr r2, [lr, #28] 3000d594: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 3000d598: 028dc024 addeq ip, sp, #36 ; 0x24 3000d59c: 028ee008 addeq lr, lr, #8 3000d5a0: 0a000019 beq 3000d60c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 3000d5a4: e5936008 ldr r6, [r3, #8] 3000d5a8: e3560000 cmp r6, #0 3000d5ac: 1a00002d bne 3000d668 3000d5b0: ea00003d b 3000d6ac <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 3000d5b4: e593304c ldr r3, [r3, #76] ; 0x4c 3000d5b8: e3530003 cmp r3, #3 3000d5bc: 0a000001 beq 3000d5c8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 3000d5c0: e3530004 cmp r3, #4 3000d5c4: 1a000005 bne 3000d5e0 result = IMFS_evaluate_link( pathloc, 0 ); 3000d5c8: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d5cc: e3a01000 mov r1, #0 <== NOT EXECUTED 3000d5d0: ebffff93 bl 3000d424 <== NOT EXECUTED if ( result == -1 ) 3000d5d4: e3700001 cmn r0, #1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 3000d5d8: e1a06000 mov r6, r0 <== NOT EXECUTED if ( result == -1 ) 3000d5dc: 0a00004b beq 3000d710 <== NOT EXECUTED return -1; } node = pathloc->node_access; 3000d5e0: e5940000 ldr r0, [r4] if ( !node ) 3000d5e4: e3500000 cmp r0, #0 3000d5e8: 0a00003c beq 3000d6e0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 3000d5ec: e590304c ldr r3, [r0, #76] ; 0x4c 3000d5f0: e3530001 cmp r3, #1 3000d5f4: 1a000039 bne 3000d6e0 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 3000d5f8: e590e05c ldr lr, [r0, #92] ; 0x5c 3000d5fc: e35e0000 cmp lr, #0 3000d600: 0a000014 beq 3000d658 newloc = node->info.directory.mt_fs->mt_fs_root; 3000d604: e28dc024 add ip, sp, #36 ; 0x24 3000d608: e28ee01c add lr, lr, #28 3000d60c: e8be000f ldm lr!, {r0, r1, r2, r3} 3000d610: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000d614: e59ee000 ldr lr, [lr] 3000d618: e58ce000 str lr, [ip] *pathloc = newloc; 3000d61c: e28dc024 add ip, sp, #36 ; 0x24 3000d620: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000d624: e1a0c004 mov ip, r4 3000d628: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000d62c: e59d2038 ldr r2, [sp, #56] ; 0x38 * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 3000d630: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 3000d634: e0625005 rsb r5, r2, r5 3000d638: e594300c ldr r3, [r4, #12] 3000d63c: e0870005 add r0, r7, r5 3000d640: e1a01004 mov r1, r4 3000d644: e1a0200a mov r2, sl 3000d648: e1a0e00f mov lr, pc 3000d64c: e593f004 ldr pc, [r3, #4] 3000d650: e1a06000 mov r6, r0 3000d654: ea00002d b 3000d710 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000d658: e1a0100d mov r1, sp 3000d65c: eb00005e bl 3000d7dc /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 3000d660: e2506000 subs r6, r0, #0 3000d664: 0a000007 beq 3000d688 done = true; else pathloc->node_access = node; 3000d668: e5846000 str r6, [r4] 3000d66c: eaffffa2 b 3000d4fc break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 3000d670: eb000e93 bl 300110c4 <__errno> 3000d674: e3a03011 mov r3, #17 3000d678: ea000022 b 3000d708 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 3000d67c: eb000e90 bl 300110c4 <__errno> <== NOT EXECUTED 3000d680: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED 3000d684: ea00001f b 3000d708 <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 3000d688: e59d3038 ldr r3, [sp, #56] ; 0x38 3000d68c: e0633005 rsb r3, r3, r5 3000d690: e0873003 add r3, r7, r3 3000d694: e58a3000 str r3, [sl] * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( 3000d698: e0875005 add r5, r7, r5 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 3000d69c: ea000005 b 3000d6b8 if ( !IMFS_is_separator( path[ i ] ) ) 3000d6a0: ebffe687 bl 300070c4 <== NOT EXECUTED 3000d6a4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000d6a8: 1a000002 bne 3000d6b8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOENT ); 3000d6ac: eb000e84 bl 300110c4 <__errno> <== NOT EXECUTED 3000d6b0: e3a03002 mov r3, #2 <== NOT EXECUTED 3000d6b4: ea000013 b 3000d708 <== NOT EXECUTED /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 3000d6b8: e4d50001 ldrb r0, [r5], #1 3000d6bc: e3500000 cmp r0, #0 3000d6c0: 1afffff6 bne 3000d6a0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000d6c4: e1a00004 mov r0, r4 3000d6c8: ebfffe56 bl 3000d028 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000d6cc: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 3000d6d0: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 3000d6d4: e593304c ldr r3, [r3, #76] ; 0x4c 3000d6d8: e3530001 cmp r3, #1 3000d6dc: 0a000002 beq 3000d6ec rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000d6e0: eb000e77 bl 300110c4 <__errno> <== NOT EXECUTED 3000d6e4: e3a03014 mov r3, #20 <== NOT EXECUTED 3000d6e8: ea000006 b 3000d708 <== NOT EXECUTED /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 3000d6ec: e1a00004 mov r0, r4 3000d6f0: e3a01003 mov r1, #3 3000d6f4: ebfffe68 bl 3000d09c 3000d6f8: e3500000 cmp r0, #0 3000d6fc: 1a000003 bne 3000d710 rtems_set_errno_and_return_minus_one( EACCES ); 3000d700: eb000e6f bl 300110c4 <__errno> 3000d704: e3a0300d mov r3, #13 3000d708: e5803000 str r3, [r0] 3000d70c: e3e06000 mvn r6, #0 return result; } 3000d710: e1a00006 mov r0, r6 3000d714: e28dd03c add sp, sp, #60 ; 0x3c 3000d718: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000d104 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d104: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000d108: e5903000 ldr r3, [r0] <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d10c: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000d110: e5933050 ldr r3, [r3, #80] ; 0x50 <== NOT EXECUTED int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d114: e1a05001 mov r5, r1 <== NOT EXECUTED IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 3000d118: e5803000 str r3, [r0] <== NOT EXECUTED IMFS_Set_handlers( node ); 3000d11c: ebffffc1 bl 3000d028 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000d120: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d124: e1a01005 mov r1, r5 <== NOT EXECUTED 3000d128: ebffffdb bl 3000d09c <== NOT EXECUTED 3000d12c: e3500000 cmp r0, #0 <== NOT EXECUTED 3000d130: 1a000004 bne 3000d148 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EACCES ); 3000d134: eb000fe2 bl 300110c4 <__errno> <== NOT EXECUTED 3000d138: e3a0300d mov r3, #13 <== NOT EXECUTED 3000d13c: e5803000 str r3, [r0] <== NOT EXECUTED 3000d140: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d144: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return result; 3000d148: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000d14c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000d424 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d424: e92d40f0 push {r4, r5, r6, r7, lr} /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d428: e59f70a4 ldr r7, [pc, #164] ; 3000d4d4 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d42c: e1a04000 mov r4, r0 3000d430: e1a05001 mov r5, r1 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d434: e5973000 ldr r3, [r7] { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 3000d438: e5946000 ldr r6, [r4] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d43c: e1d323b0 ldrh r2, [r3, #48] ; 0x30 3000d440: e2822001 add r2, r2, #1 3000d444: e1a02802 lsl r2, r2, #16 3000d448: e1a02822 lsr r2, r2, #16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000d44c: e3520005 cmp r2, #5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 3000d450: e1c323b0 strh r2, [r3, #48] ; 0x30 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 3000d454: 9a000006 bls 3000d474 rtems_filesystem_link_counts = 0; 3000d458: e3a02000 mov r2, #0 <== NOT EXECUTED 3000d45c: e1c323b0 strh r2, [r3, #48] ; 0x30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); 3000d460: eb000f17 bl 300110c4 <__errno> <== NOT EXECUTED 3000d464: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED 3000d468: e5803000 str r3, [r0] <== NOT EXECUTED 3000d46c: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d470: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 3000d474: e596304c ldr r3, [r6, #76] ; 0x4c 3000d478: e3530003 cmp r3, #3 3000d47c: 1a000003 bne 3000d490 result = IMFS_evaluate_hard_link( node, flags ); 3000d480: e1a00004 mov r0, r4 <== NOT EXECUTED 3000d484: e1a01005 mov r1, r5 <== NOT EXECUTED 3000d488: ebffff1d bl 3000d104 <== NOT EXECUTED 3000d48c: ea000004 b 3000d4a4 <== NOT EXECUTED else if (jnode->type == IMFS_SYM_LINK ) 3000d490: e3530004 cmp r3, #4 3000d494: 1a000004 bne 3000d4ac result = IMFS_evaluate_sym_link( node, flags ); 3000d498: e1a00004 mov r0, r4 3000d49c: e1a01005 mov r1, r5 3000d4a0: ebffffbd bl 3000d39c } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 3000d4a4: e3500000 cmp r0, #0 3000d4a8: 1a000004 bne 3000d4c0 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || 3000d4ac: e596304c ldr r3, [r6, #76] ; 0x4c 3000d4b0: e2433003 sub r3, r3, #3 3000d4b4: e3530001 cmp r3, #1 3000d4b8: 9affffdd bls 3000d434 3000d4bc: e3a00000 mov r0, #0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 3000d4c0: e59f300c ldr r3, [pc, #12] ; 3000d4d4 3000d4c4: e3a02000 mov r2, #0 3000d4c8: e5933000 ldr r3, [r3] 3000d4cc: e1c323b0 strh r2, [r3, #48] ; 0x30 return result; } 3000d4d0: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 3000d09c : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000d09c: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 3000d0a0: e92d4070 push {r4, r5, r6, lr} 3000d0a4: e1a04001 mov r4, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 3000d0a8: 0a000004 beq 3000d0c0 rtems_set_errno_and_return_minus_one( EPERM ); 3000d0ac: eb001004 bl 300110c4 <__errno> <== NOT EXECUTED 3000d0b0: e3a03001 mov r3, #1 <== NOT EXECUTED 3000d0b4: e5803000 str r3, [r0] <== NOT EXECUTED 3000d0b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d0bc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED jnode = node->node_access; 3000d0c0: e5905000 ldr r5, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000d0c4: eb0002dd bl 3000dc40 3000d0c8: e1a06000 mov r6, r0 st_gid = getegid(); 3000d0cc: eb0002d6 bl 3000dc2c * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 3000d0d0: e1d533bc ldrh r3, [r5, #60] ; 0x3c 3000d0d4: e1530006 cmp r3, r6 flags_to_test <<= 6; 3000d0d8: 01a04304 lsleq r4, r4, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 3000d0dc: 0a000002 beq 3000d0ec flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 3000d0e0: e1d533be ldrh r3, [r5, #62] ; 0x3e <== NOT EXECUTED 3000d0e4: e1530000 cmp r3, r0 <== NOT EXECUTED flags_to_test <<= 3; 3000d0e8: 01a04184 lsleq r4, r4, #3 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 3000d0ec: e5950030 ldr r0, [r5, #48] ; 0x30 3000d0f0: e0040000 and r0, r4, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 3000d0f4: e1500004 cmp r0, r4 3000d0f8: 13a00000 movne r0, #0 3000d0fc: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 3000d100: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 3000d39c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d39c: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 3000d3a0: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d3a4: e1a04000 mov r4, r0 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 3000d3a8: e5963008 ldr r3, [r6, #8] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 3000d3ac: e1a05001 mov r5, r1 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 3000d3b0: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( 3000d3b4: e5960050 ldr r0, [r6, #80] ; 0x50 3000d3b8: e1a0100d mov r1, sp 3000d3bc: e1a02004 mov r2, r4 3000d3c0: eb00034b bl 3000e0f4 ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 3000d3c4: e59d3000 ldr r3, [sp] 3000d3c8: e5966050 ldr r6, [r6, #80] ; 0x50 3000d3cc: e0866003 add r6, r6, r3 3000d3d0: e1a00006 mov r0, r6 3000d3d4: eb001324 bl 3001206c 3000d3d8: e1a02005 mov r2, r5 3000d3dc: e1a01000 mov r1, r0 3000d3e0: e1a03004 mov r3, r4 3000d3e4: e1a00006 mov r0, r6 3000d3e8: ebffff58 bl 3000d150 3000d3ec: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 3000d3f0: e1a00004 mov r0, r4 3000d3f4: ebffff0b bl 3000d028 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 3000d3f8: e1a00004 mov r0, r4 3000d3fc: e1a01005 mov r1, r5 3000d400: ebffff25 bl 3000d09c 3000d404: e3500000 cmp r0, #0 3000d408: 1a000003 bne 3000d41c rtems_set_errno_and_return_minus_one( EACCES ); 3000d40c: eb000f2c bl 300110c4 <__errno> <== NOT EXECUTED 3000d410: e3a0300d mov r3, #13 <== NOT EXECUTED 3000d414: e5803000 str r3, [r0] <== NOT EXECUTED 3000d418: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 3000d41c: e1a00006 mov r0, r6 3000d420: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== 3001073c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 3001073c: 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; 30010740: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 30010744: 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(); 30010748: ebfff53c bl 3000dc40 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3001074c: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED 30010750: e3500000 cmp r0, #0 <== NOT EXECUTED 30010754: 11550000 cmpne r5, r0 <== NOT EXECUTED 30010758: 03a05000 moveq r5, #0 <== NOT EXECUTED 3001075c: 13a05001 movne r5, #1 <== NOT EXECUTED 30010760: 0a000004 beq 30010778 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 30010764: eb000256 bl 300110c4 <__errno> <== NOT EXECUTED 30010768: e3a03001 mov r3, #1 <== NOT EXECUTED 3001076c: e5803000 str r3, [r0] <== NOT EXECUTED 30010770: e3e00000 mvn r0, #0 <== NOT EXECUTED 30010774: ea00000b b 300107a8 <== 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); 30010778: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3001077c: 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); 30010780: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED 30010784: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 30010788: e1833a26 orr r3, r3, r6, lsr #20 <== NOT EXECUTED 3001078c: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); 30010790: e1a0000d mov r0, sp <== NOT EXECUTED 30010794: e1a01005 mov r1, r5 <== NOT EXECUTED 30010798: ebffd6ea bl 30006348 <== NOT EXECUTED 3001079c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; 300107a0: 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 ); 300107a4: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 300107a8: e8bd807c pop {r2, r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 300107ac : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } 300107ac: e3a00000 mov r0, #0 <== NOT EXECUTED 300107b0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30006e3c : void *buffer ) { int err; if (command == FIONBIO) { 30006e3c: e59fc06c ldr ip, [pc, #108] ; 30006eb0 int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 30006e40: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { 30006e44: e151000c cmp r1, ip int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 30006e48: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { 30006e4c: 1a00000a bne 30006e7c if (buffer == NULL) 30006e50: e3520000 cmp r2, #0 30006e54: 0a00000e beq 30006e94 err = -EFAULT; else { if (*(int *)buffer) 30006e58: e5924000 ldr r4, [r2] 30006e5c: e5932014 ldr r2, [r3, #20] 30006e60: e3540000 cmp r4, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; 30006e64: 13822001 orrne r2, r2, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 30006e68: 03c22001 biceq r2, r2, #1 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 30006e6c: 15832014 strne r2, [r3, #20] else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; 30006e70: 13a04000 movne r4, #0 err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 30006e74: 05832014 streq r2, [r3, #20] 30006e78: ea00000a b 30006ea8 return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 30006e7c: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED 30006e80: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 30006e84: eb0024d2 bl 300101d4 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30006e88: e2504000 subs r4, r0, #0 <== NOT EXECUTED 30006e8c: aa000005 bge 30006ea8 <== NOT EXECUTED 30006e90: ea000000 b 30006e98 <== NOT EXECUTED { int err; if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; 30006e94: e3e0400d mvn r4, #13 <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 30006e98: eb0030f8 bl 30013280 <__errno> <== NOT EXECUTED 30006e9c: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006ea0: e5804000 str r4, [r0] <== NOT EXECUTED 30006ea4: e3e04000 mvn r4, #0 <== NOT EXECUTED } 30006ea8: e1a00004 mov r0, r4 30006eac: e8bd8010 pop {r4, pc} =============================================================================== 30006dec : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 30006dec: e92d4011 push {r0, r4, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30006df0: e590c018 ldr ip, [r0, #24] <== NOT EXECUTED 30006df4: e58d0000 str r0, [sp] <== NOT EXECUTED 30006df8: e59c0050 ldr r0, [ip, #80] ; 0x50 <== NOT EXECUTED 30006dfc: eb00250d bl 30010238 <== NOT EXECUTED 30006e00: e1a02000 mov r2, r0 <== NOT EXECUTED 30006e04: e1a03fc2 asr r3, r2, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30006e08: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 30006e0c: e1a04000 mov r4, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 30006e10: a1a04003 movge r4, r3 <== NOT EXECUTED 30006e14: a1a03002 movge r3, r2 <== NOT EXECUTED 30006e18: aa000004 bge 30006e30 <== NOT EXECUTED 30006e1c: eb003117 bl 30013280 <__errno> <== NOT EXECUTED 30006e20: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006e24: e5804000 str r4, [r0] <== NOT EXECUTED 30006e28: e3e03000 mvn r3, #0 <== NOT EXECUTED 30006e2c: e3e04000 mvn r4, #0 <== NOT EXECUTED } 30006e30: e1a00003 mov r0, r3 <== NOT EXECUTED 30006e34: e1a01004 mov r1, r4 <== NOT EXECUTED 30006e38: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED =============================================================================== 30006f94 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30006f94: e1a01000 mov r1, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 30006f98: e5900018 ldr r0, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 30006f9c: e92d4010 push {r4, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); 30006fa0: e2800050 add r0, r0, #80 ; 0x50 30006fa4: eb0022c5 bl 3000fac0 IMFS_FIFO_RETURN(err); 30006fa8: e2504000 subs r4, r0, #0 30006fac: aa000003 bge 30006fc0 30006fb0: eb0030b2 bl 30013280 <__errno> <== NOT EXECUTED 30006fb4: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 30006fb8: e5804000 str r4, [r0] <== NOT EXECUTED 30006fbc: e3e04000 mvn r4, #0 <== NOT EXECUTED } 30006fc0: e1a00004 mov r0, r4 30006fc4: e8bd8010 pop {r4, pc} =============================================================================== 3000d720 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000d720: e92d4070 push {r4, r5, r6, lr} /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 3000d724: e1a0c000 mov ip, r0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000d728: e24dd014 sub sp, sp, #20 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; 3000d72c: e5bc401c ldr r4, [ip, #28]! loc = temp_mt_entry->mt_fs_root; 3000d730: e1a0e00d mov lr, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 3000d734: e1a05000 mov r5, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 3000d738: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000d73c: e8ae000f stmia lr!, {r0, r1, r2, r3} 3000d740: e59c3000 ldr r3, [ip] 3000d744: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000d748: e3a03000 mov r3, #0 3000d74c: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 3000d750: e1a0500d mov r5, sp 3000d754: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3000d758: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 3000d75c: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 3000d760: ebfffe30 bl 3000d028 if ( jnode->type != IMFS_DIRECTORY ) { 3000d764: e594304c ldr r3, [r4, #76] ; 0x4c 3000d768: e3530001 cmp r3, #1 3000d76c: 1a000003 bne 3000d780 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 3000d770: e5942050 ldr r2, [r4, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 3000d774: e2843054 add r3, r4, #84 ; 0x54 3000d778: e1520003 cmp r2, r3 3000d77c: 1a000005 bne 3000d798 result = IMFS_unlink( NULL, &loc ); 3000d780: e3a00000 mov r0, #0 3000d784: e1a0100d mov r1, sp 3000d788: ebffe197 bl 30005dec if (result != 0) 3000d78c: e3500000 cmp r0, #0 3000d790: 1a00000c bne 3000d7c8 return -1; jnode = next; 3000d794: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 3000d798: e3540000 cmp r4, #0 3000d79c: 0a00000b beq 3000d7d0 if ( jnode->type == IMFS_DIRECTORY ) { 3000d7a0: e594304c ldr r3, [r4, #76] ; 0x4c 3000d7a4: e3530001 cmp r3, #1 3000d7a8: 1affffe9 bne 3000d754 } } } while (jnode != NULL); return 0; } 3000d7ac: e5943050 ldr r3, [r4, #80] ; 0x50 3000d7b0: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 3000d7b4: e1530002 cmp r3, r2 3000d7b8: 0affffe5 beq 3000d754 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 3000d7bc: e2534000 subs r4, r3, #0 3000d7c0: 1affffe3 bne 3000d754 3000d7c4: ea000001 b 3000d7d0 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 3000d7c8: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000d7cc: ea000000 b 3000d7d4 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 3000d7d0: e1a00004 mov r0, r4 } 3000d7d4: e28dd014 add sp, sp, #20 3000d7d8: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 3000d85c : const char *path, int pathlen, char *token, int *token_len ) { 3000d85c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3000d860: e1a05001 mov r5, r1 3000d864: e1a04002 mov r4, r2 3000d868: e1a0a003 mov sl, r3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 3000d86c: e5d07000 ldrb r7, [r0] 3000d870: e1a08000 mov r8, r0 int pathlen, char *token, int *token_len ) { register int i = 0; 3000d874: e3a06000 mov r6, #0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 3000d878: ea000004 b 3000d890 token[i] = c; if ( i == IMFS_NAME_MAX ) 3000d87c: e3560020 cmp r6, #32 * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; 3000d880: e7c47006 strb r7, [r4, r6] if ( i == IMFS_NAME_MAX ) 3000d884: 0a000024 beq 3000d91c return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 3000d888: e5f87001 ldrb r7, [r8, #1]! 3000d88c: e2866001 add r6, r6, #1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 3000d890: e1a00007 mov r0, r7 3000d894: ebffe60a bl 300070c4 3000d898: e3500000 cmp r0, #0 3000d89c: 1a000001 bne 3000d8a8 3000d8a0: e1560005 cmp r6, r5 3000d8a4: bafffff4 blt 3000d87c /* * Copy a seperator into token. */ if ( i == 0 ) { 3000d8a8: e3560000 cmp r6, #0 3000d8ac: 1a000005 bne 3000d8c8 token[i] = c; if ( (token[i] != '\0') && pathlen ) { 3000d8b0: e3570000 cmp r7, #0 3000d8b4: 13550000 cmpne r5, #0 i++; type = IMFS_CURRENT_DIR; 3000d8b8: 13a06001 movne r6, #1 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 3000d8bc: e5c47000 strb r7, [r4] if ( (token[i] != '\0') && pathlen ) { i++; 3000d8c0: e1a00006 mov r0, r6 3000d8c4: ea000005 b 3000d8e0 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 3000d8c8: e0843006 add r3, r4, r6 3000d8cc: e5533001 ldrb r3, [r3, #-1] char *token, int *token_len ) { register int i = 0; IMFS_token_types type = IMFS_NAME; 3000d8d0: e3a00003 mov r0, #3 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 3000d8d4: e3530000 cmp r3, #0 token[i] = '\0'; 3000d8d8: 13a03000 movne r3, #0 3000d8dc: 17c43006 strbne r3, [r4, r6] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 3000d8e0: e3500003 cmp r0, #3 /* * Set token_len to the number of characters copied. */ *token_len = i; 3000d8e4: e58a6000 str r6, [sl] /* * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { 3000d8e8: 18bd85f0 popne {r4, r5, r6, r7, r8, sl, pc} if ( strcmp( token, "..") == 0 ) 3000d8ec: e1a00004 mov r0, r4 3000d8f0: e59f1034 ldr r1, [pc, #52] ; 3000d92c 3000d8f4: eb001100 bl 30011cfc 3000d8f8: e3500000 cmp r0, #0 3000d8fc: 0a000008 beq 3000d924 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 3000d900: e1a00004 mov r0, r4 3000d904: e59f1024 ldr r1, [pc, #36] ; 3000d930 3000d908: eb0010fb bl 30011cfc type = IMFS_CURRENT_DIR; 3000d90c: e3500000 cmp r0, #0 3000d910: 13a00003 movne r0, #3 3000d914: 03a00001 moveq r0, #1 3000d918: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; 3000d91c: e3a00004 mov r0, #4 <== NOT EXECUTED 3000d920: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; 3000d924: e3a00002 mov r0, #2 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 3000d928: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 30005a34 : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30005a34: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30005a38: e1a07003 mov r7, r3 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30005a3c: e59f30d0 ldr r3, [pc, #208] ; 30005b14 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30005a40: e1a0a001 mov sl, r1 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30005a44: e5933000 ldr r3, [r3] const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30005a48: e1a08002 mov r8, r2 30005a4c: e1a04000 mov r4, r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 30005a50: e3a01006 mov r1, #6 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 30005a54: e3a02010 mov r2, #16 if (bit_mask == requested_bytes_per_block) { 30005a58: e1520003 cmp r2, r3 30005a5c: 0a000004 beq 30005a74 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) 30005a60: ca000002 bgt 30005a70 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 30005a64: e2511001 subs r1, r1, #1 30005a68: e1a02082 lsl r2, r2, #1 30005a6c: 1afffff9 bne 30005a58 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 30005a70: e3a03080 mov r3, #128 ; 0x80 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) 30005a74: e59f609c ldr r6, [pc, #156] ; 30005b18 30005a78: e5863000 str r3, [r6] /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 30005a7c: eb001d59 bl 3000cfe8 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30005a80: e59fe094 ldr lr, [pc, #148] ; 30005b1c 30005a84: e284c038 add ip, r4, #56 ; 0x38 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 30005a88: e584001c str r0, [r4, #28] 30005a8c: e1a05000 mov r5, r0 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30005a90: e8be000f ldm lr!, {r0, r1, r2, r3} 30005a94: e8ac000f stmia ip!, {r0, r1, r2, r3} 30005a98: e8be000f ldm lr!, {r0, r1, r2, r3} 30005a9c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30005aa0: e89e000f ldm lr, {r0, r1, r2, r3} * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 30005aa4: e5847024 str r7, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30005aa8: e88c000f stm ip, {r0, r1, r2, r3} * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 30005aac: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 30005ab0: e3a00001 mov r0, #1 30005ab4: e3a01014 mov r1, #20 30005ab8: eb000195 bl 30006114 if ( !fs_info ) { 30005abc: e3500000 cmp r0, #0 30005ac0: 1a000006 bne 30005ae0 free(temp_mt_entry->mt_fs_root.node_access); 30005ac4: e1a00005 mov r0, r5 <== NOT EXECUTED 30005ac8: eb0001f5 bl 300062a4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30005acc: eb002d7c bl 300110c4 <__errno> <== NOT EXECUTED 30005ad0: e3a0300c mov r3, #12 <== NOT EXECUTED 30005ad4: e5803000 str r3, [r0] <== NOT EXECUTED 30005ad8: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005adc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30005ae0: e5963004 ldr r3, [r6, #4] fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 30005ae4: e5840034 str r0, [r4, #52] ; 0x34 fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 30005ae8: e59d201c ldr r2, [sp, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30005aec: e5803000 str r3, [r0] 30005af0: e2833001 add r3, r3, #1 30005af4: e5863004 str r3, [r6, #4] fs_info->ino_count = 1; 30005af8: e3a03001 mov r3, #1 30005afc: e9800108 stmib r0, {r3, r8} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 30005b00: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; 30005b04: e5802010 str r2, [r0, #16] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 30005b08: e5853038 str r3, [r5, #56] ; 0x38 return 0; 30005b0c: e3a00000 mov r0, #0 } 30005b10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 30005b20 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b20: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30005b24: e5903000 ldr r3, [r0] <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b28: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30005b2c: e58d3028 str r3, [sp, #40] ; 0x28 <== NOT EXECUTED if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005b30: e1d333b4 ldrh r3, [r3, #52] ; 0x34 <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b34: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005b38: e3530007 cmp r3, #7 <== NOT EXECUTED int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30005b3c: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30005b40: 9a000002 bls 30005b50 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EMLINK ); 30005b44: eb002d5e bl 300110c4 <__errno> <== NOT EXECUTED 30005b48: e3a0301f mov r3, #31 <== NOT EXECUTED 30005b4c: ea000012 b 30005b9c <== NOT EXECUTED /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 30005b50: e1a00002 mov r0, r2 <== NOT EXECUTED 30005b54: eb003144 bl 3001206c <== NOT EXECUTED 30005b58: e28d4004 add r4, sp, #4 <== NOT EXECUTED 30005b5c: e1a01000 mov r1, r0 <== NOT EXECUTED 30005b60: e1a02004 mov r2, r4 <== NOT EXECUTED 30005b64: e28d3044 add r3, sp, #68 ; 0x44 <== NOT EXECUTED 30005b68: e1a00006 mov r0, r6 <== NOT EXECUTED 30005b6c: eb001f3a bl 3000d85c <== NOT EXECUTED new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30005b70: e28d3028 add r3, sp, #40 ; 0x28 <== NOT EXECUTED * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 30005b74: e58d3000 str r3, [sp] <== NOT EXECUTED 30005b78: e1a00005 mov r0, r5 <== NOT EXECUTED 30005b7c: e3a01003 mov r1, #3 <== NOT EXECUTED 30005b80: e1a02004 mov r2, r4 <== NOT EXECUTED 30005b84: e59f3050 ldr r3, [pc, #80] ; 30005bdc <== NOT EXECUTED 30005b88: eb001cc6 bl 3000cea8 <== NOT EXECUTED new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 30005b8c: e3500000 cmp r0, #0 <== NOT EXECUTED 30005b90: 1a000004 bne 30005ba8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 30005b94: eb002d4a bl 300110c4 <__errno> <== NOT EXECUTED 30005b98: e3a0300c mov r3, #12 <== NOT EXECUTED 30005b9c: e5803000 str r3, [r0] <== NOT EXECUTED 30005ba0: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005ba4: ea00000a b 30005bd4 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005ba8: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005bac: e28d003c add r0, sp, #60 ; 0x3c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005bb0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005bb4: e3a01000 mov r1, #0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30005bb8: e2822001 add r2, r2, #1 <== NOT EXECUTED 30005bbc: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( info.hard_link.link_node ); 30005bc0: eb0001e0 bl 30006348 <== NOT EXECUTED 30005bc4: e59d203c ldr r2, [sp, #60] ; 0x3c <== NOT EXECUTED 30005bc8: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED return 0; 30005bcc: e3a00000 mov r0, #0 <== NOT EXECUTED /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 30005bd0: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED return 0; } 30005bd4: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED 30005bd8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 3000fdf4 : IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000fdf4: e59f3110 ldr r3, [pc, #272] ; 3000ff0c */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000fdf8: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000fdfc: e593b000 ldr fp, [r3] */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000fe00: e1a05002 mov r5, r2 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000fe04: e1a0312b lsr r3, fp, #2 3000fe08: e2832001 add r2, r3, #1 3000fe0c: e0020293 mul r2, r3, r2 3000fe10: e2822001 add r2, r2, #1 3000fe14: e0030392 mul r3, r2, r3 3000fe18: e3a02000 mov r2, #0 3000fe1c: e2433001 sub r3, r3, #1 3000fe20: e1520005 cmp r2, r5 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000fe24: e1a04000 mov r4, r0 3000fe28: e1a06001 mov r6, r1 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000fe2c: e003039b mul r3, fp, r3 3000fe30: ca000005 bgt 3000fe4c 3000fe34: 1a000001 bne 3000fe40 3000fe38: e1530001 cmp r3, r1 3000fe3c: 8a000002 bhi 3000fe4c rtems_set_errno_and_return_minus_one( EINVAL ); 3000fe40: eb00049f bl 300110c4 <__errno> <== NOT EXECUTED 3000fe44: e3a03016 mov r3, #22 <== NOT EXECUTED 3000fe48: ea000025 b 3000fee4 <== NOT EXECUTED /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) 3000fe4c: e5948054 ldr r8, [r4, #84] ; 0x54 3000fe50: e5947050 ldr r7, [r4, #80] ; 0x50 3000fe54: e1550008 cmp r5, r8 3000fe58: ca000002 bgt 3000fe68 3000fe5c: 1a000028 bne 3000ff04 3000fe60: e1560007 cmp r6, r7 3000fe64: 9a000026 bls 3000ff04 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fe68: e1a0cfcb asr ip, fp, #31 3000fe6c: e1a0300c mov r3, ip 3000fe70: e1a0200b mov r2, fp 3000fe74: e1a00006 mov r0, r6 3000fe78: e1a01005 mov r1, r5 3000fe7c: e58dc000 str ip, [sp] 3000fe80: eb00154a bl 300153b0 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fe84: e59dc000 ldr ip, [sp] 3000fe88: e1a01008 mov r1, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fe8c: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000fe90: e1a0200b mov r2, fp 3000fe94: e1a00007 mov r0, r7 3000fe98: e1a0300c mov r3, ip 3000fe9c: eb001543 bl 300153b0 <__divdi3> 3000fea0: e1a08000 mov r8, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 3000fea4: e1a07000 mov r7, r0 3000fea8: ea000011 b 3000fef4 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 3000feac: e1a00004 mov r0, r4 3000feb0: e1a01007 mov r1, r7 3000feb4: ebffff57 bl 3000fc18 3000feb8: e3500000 cmp r0, #0 3000febc: 0a00000b beq 3000fef0 3000fec0: ea000003 b 3000fed4 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 3000fec4: e1a01007 mov r1, r7 <== NOT EXECUTED 3000fec8: e1a00004 mov r0, r4 <== NOT EXECUTED 3000fecc: ebffffbe bl 3000fdcc <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 3000fed0: e2477001 sub r7, r7, #1 <== NOT EXECUTED 3000fed4: e1570008 cmp r7, r8 <== NOT EXECUTED 3000fed8: 2afffff9 bcs 3000fec4 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 3000fedc: eb000478 bl 300110c4 <__errno> <== NOT EXECUTED 3000fee0: e3a0301c mov r3, #28 <== NOT EXECUTED 3000fee4: e5803000 str r3, [r0] <== NOT EXECUTED 3000fee8: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000feec: ea000005 b 3000ff08 <== NOT EXECUTED old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 3000fef0: e2877001 add r7, r7, #1 3000fef4: e157000a cmp r7, sl 3000fef8: 9affffeb bls 3000feac } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 3000fefc: e5846050 str r6, [r4, #80] ; 0x50 3000ff00: e5845054 str r5, [r4, #84] ; 0x54 /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) return 0; 3000ff04: e3a00000 mov r0, #0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 3000ff08: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== 3000f828 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000f828: e59f31e4 ldr r3, [pc, #484] ; 3000fa14 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000f82c: 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 ) { 3000f830: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000f834: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000f838: e1a05125 lsr r5, r5, #2 3000f83c: e2453001 sub r3, r5, #1 3000f840: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000f844: e1a06001 mov r6, r1 3000f848: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000f84c: 8a00000e bhi 3000f88c p = info->indirect; if ( malloc_it ) { 3000f850: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 3000f854: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 3000f858: 0a000007 beq 3000f87c if ( !p ) { 3000f85c: e3500000 cmp r0, #0 3000f860: 1a000003 bne 3000f874 p = memfile_alloc_block(); 3000f864: ebffffe2 bl 3000f7f4 if ( !p ) 3000f868: e3500000 cmp r0, #0 3000f86c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; 3000f870: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; 3000f874: e5940058 ldr r0, [r4, #88] ; 0x58 3000f878: ea000001 b 3000f884 } if ( !p ) 3000f87c: e3500000 cmp r0, #0 3000f880: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; 3000f884: e0800106 add r0, r0, r6, lsl #2 3000f888: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 3000f88c: e2853001 add r3, r5, #1 3000f890: e0030395 mul r3, r5, r3 3000f894: e2432001 sub r2, r3, #1 3000f898: e1510002 cmp r1, r2 3000f89c: 8a000021 bhi 3000f928 my_block -= FIRST_DOUBLY_INDIRECT; 3000f8a0: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000f8a4: e1a00006 mov r0, r6 3000f8a8: e1a01005 mov r1, r5 3000f8ac: eb00145f bl 30014a30 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000f8b0: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000f8b4: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000f8b8: e1a00006 mov r0, r6 3000f8bc: eb0013c3 bl 300147d0 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 3000f8c0: 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; 3000f8c4: e1a05000 mov r5, r0 p = info->doubly_indirect; 3000f8c8: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { 3000f8cc: 0a00000e beq 3000f90c if ( !p ) { 3000f8d0: e3500000 cmp r0, #0 3000f8d4: 1a000003 bne 3000f8e8 p = memfile_alloc_block(); 3000f8d8: ebffffc5 bl 3000f7f4 if ( !p ) 3000f8dc: e3500000 cmp r0, #0 3000f8e0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; 3000f8e4: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; 3000f8e8: e0804105 add r4, r0, r5, lsl #2 3000f8ec: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { 3000f8f0: e3500000 cmp r0, #0 3000f8f4: 1a000009 bne 3000f920 p1 = memfile_alloc_block(); 3000f8f8: ebffffbd bl 3000f7f4 if ( !p1 ) 3000f8fc: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 3000f900: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 3000f904: 1a000005 bne 3000f920 3000f908: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 3000f90c: e3500000 cmp r0, #0 3000f910: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; 3000f914: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) 3000f918: e3500000 cmp r0, #0 3000f91c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; 3000f920: e0800107 add r0, r0, r7, lsl #2 3000f924: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000f928: e2832001 add r2, r3, #1 <== NOT EXECUTED 3000f92c: e0020295 mul r2, r5, r2 <== NOT EXECUTED 3000f930: e2422001 sub r2, r2, #1 <== NOT EXECUTED 3000f934: e1510002 cmp r1, r2 <== NOT EXECUTED 3000f938: 8a000033 bhi 3000fa0c <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 3000f93c: e0636001 rsb r6, r3, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000f940: e1a00006 mov r0, r6 <== NOT EXECUTED 3000f944: e1a01005 mov r1, r5 <== NOT EXECUTED 3000f948: eb001438 bl 30014a30 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000f94c: 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; 3000f950: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000f954: e1a00006 mov r0, r6 <== NOT EXECUTED 3000f958: eb00139c bl 300147d0 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000f95c: 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; 3000f960: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000f964: eb001399 bl 300147d0 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000f968: 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; 3000f96c: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000f970: e1a00006 mov r0, r6 <== NOT EXECUTED 3000f974: eb00142d bl 30014a30 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 3000f978: 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; 3000f97c: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; 3000f980: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { 3000f984: 0a000016 beq 3000f9e4 <== NOT EXECUTED if ( !p ) { 3000f988: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f98c: 1a000003 bne 3000f9a0 <== NOT EXECUTED p = memfile_alloc_block(); 3000f990: ebffff97 bl 3000f7f4 <== NOT EXECUTED if ( !p ) 3000f994: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f998: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; info->triply_indirect = p; 3000f99c: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 3000f9a0: e0804107 add r4, r0, r7, lsl #2 <== NOT EXECUTED 3000f9a4: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { 3000f9a8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f9ac: 1a000003 bne 3000f9c0 <== NOT EXECUTED p1 = memfile_alloc_block(); 3000f9b0: ebffff8f bl 3000f7f4 <== NOT EXECUTED if ( !p1 ) 3000f9b4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f9b8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 3000f9bc: e5840000 str r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 3000f9c0: e0804105 add r4, r0, r5, lsl #2 <== NOT EXECUTED 3000f9c4: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) { 3000f9c8: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f9cc: 1a00000c bne 3000fa04 <== NOT EXECUTED p2 = memfile_alloc_block(); 3000f9d0: ebffff87 bl 3000f7f4 <== NOT EXECUTED if ( !p2 ) 3000f9d4: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 3000f9d8: 15840000 strne r0, [r4] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 3000f9dc: 1a000008 bne 3000fa04 <== NOT EXECUTED 3000f9e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3000f9e4: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f9e8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p1 = (block_p *) p[ triply ]; 3000f9ec: e7900107 ldr r0, [r0, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) 3000f9f0: e3500000 cmp r0, #0 <== NOT EXECUTED 3000f9f4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 3000f9f8: e7900105 ldr r0, [r0, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) 3000f9fc: e3500000 cmp r0, #0 <== NOT EXECUTED 3000fa00: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; 3000fa04: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED 3000fa08: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } /* * This means the requested block number is out of range. */ return 0; 3000fa0c: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000fa10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 300087f8 : * using the IMFS memory file type. * */ int IMFS_memfile_maximum_size( void ) { return IMFS_MEMFILE_MAXIMUM_SIZE; 300087f8: e59f3020 ldr r3, [pc, #32] ; 30008820 <== NOT EXECUTED 300087fc: e5932000 ldr r2, [r3] <== NOT EXECUTED 30008800: e1a03122 lsr r3, r2, #2 <== NOT EXECUTED 30008804: e2830001 add r0, r3, #1 <== NOT EXECUTED 30008808: e0000093 mul r0, r3, r0 <== NOT EXECUTED 3000880c: e2800001 add r0, r0, #1 <== NOT EXECUTED 30008810: e0030390 mul r3, r0, r3 <== NOT EXECUTED 30008814: e2430001 sub r0, r3, #1 <== NOT EXECUTED } 30008818: e0000092 mul r0, r2, r0 <== NOT EXECUTED 3000881c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000fcc0 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000fcc0: 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; 3000fcc4: e59f30fc ldr r3, [pc, #252] ; 3000fdc8 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000fcc8: e1a04000 mov r4, r0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 3000fccc: e5935000 ldr r5, [r3] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000fcd0: e5903058 ldr r3, [r0, #88] ; 0x58 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 3000fcd4: e1a05125 lsr r5, r5, #2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000fcd8: e3530000 cmp r3, #0 memfile_free_blocks_in_table( &info->indirect, to_free ); 3000fcdc: 12800058 addne r0, r0, #88 ; 0x58 3000fce0: 11a01005 movne r1, r5 3000fce4: 1bffffe1 blne 3000fc70 } if ( info->doubly_indirect ) { 3000fce8: e594305c ldr r3, [r4, #92] ; 0x5c 3000fcec: e3530000 cmp r3, #0 3000fcf0: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 3000fcf8: 1a000008 bne 3000fd20 3000fcfc: ea00000d b 3000fd38 for ( i=0 ; idoubly_indirect[i] ) { 3000fd00: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 3000fd04: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED 3000fd08: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED 3000fd0c: e3520000 cmp r2, #0 <== NOT EXECUTED memfile_free_blocks_in_table( 3000fd10: 10830000 addne r0, r3, r0 <== NOT EXECUTED 3000fd14: 11a01005 movne r1, r5 <== NOT EXECUTED 3000fd18: 1bffffd4 blne 3000fc70 <== 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 ); 3000fd2c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 3000fd30: e1a01005 mov r1, r5 <== NOT EXECUTED 3000fd34: ebffffcd bl 3000fc70 <== NOT EXECUTED } if ( info->triply_indirect ) { 3000fd38: e5943060 ldr r3, [r4, #96] ; 0x60 3000fd3c: e3530000 cmp r3, #0 3000fd40: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 3000fd48: 1a000016 bne 3000fda8 3000fd4c: ea00001b b 3000fdc0 for ( i=0 ; itriply_indirect[i]; 3000fd50: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 3000fd54: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 3000fd58: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 3000fd5c: e3580000 cmp r8, #0 <== NOT EXECUTED 3000fd60: 0a000013 beq 3000fdb4 <== NOT EXECUTED * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( 3000fd64: e2488004 sub r8, r8, #4 <== NOT EXECUTED 3000fd68: e3a07000 mov r7, #0 <== NOT EXECUTED 3000fd6c: ea000005 b 3000fd88 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 3000fd94: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 3000fd98: e1a01005 mov r1, r5 <== NOT EXECUTED 3000fd9c: e0800009 add r0, r0, r9 <== NOT EXECUTED 3000fda0: ebffffb2 bl 3000fc70 <== 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( 3000fdb4: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 3000fdb8: e1a01005 mov r1, r5 <== NOT EXECUTED 3000fdbc: ebffffab bl 3000fc70 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 3000fdc0: e3a00000 mov r0, #0 3000fdc4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 3000fdcc : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 3000fdcc: 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 ); 3000fdd0: e3a02000 mov r2, #0 <== NOT EXECUTED 3000fdd4: ebfffe93 bl 3000f828 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; 3000fdd8: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000fddc: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; 3000fde0: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; 3000fde4: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 3000fde8: ebffff98 bl 3000fc50 <== NOT EXECUTED return 1; } 3000fdec: e3a00001 mov r0, #1 <== NOT EXECUTED 3000fdf0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3000ff10 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000ff10: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000ff14: e1a06003 mov r6, r3 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 3000ff18: e5903054 ldr r3, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000ff1c: e59d8030 ldr r8, [sp, #48] ; 0x30 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { 3000ff20: e3530000 cmp r3, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000ff24: e1a07001 mov r7, r1 3000ff28: e1a04000 mov r4, r0 3000ff2c: e1a0a002 mov sl, r2 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; 3000ff30: e0881001 add r1, r8, r1 if ( last_byte > the_jnode->info.file.size ) { 3000ff34: ba000003 blt 3000ff48 3000ff38: 1a00000c bne 3000ff70 3000ff3c: e5903050 ldr r3, [r0, #80] ; 0x50 3000ff40: e1530001 cmp r3, r1 3000ff44: 2a000009 bcs 3000ff70 status = IMFS_memfile_extend( the_jnode, last_byte ); 3000ff48: e1a00004 mov r0, r4 3000ff4c: e3a02000 mov r2, #0 3000ff50: ebffffa7 bl 3000fdf4 if ( status ) 3000ff54: e3500000 cmp r0, #0 3000ff58: 0a000004 beq 3000ff70 rtems_set_errno_and_return_minus_one( ENOSPC ); 3000ff5c: eb000458 bl 300110c4 <__errno> <== NOT EXECUTED 3000ff60: e3a0301c mov r3, #28 <== NOT EXECUTED 3000ff64: e5803000 str r3, [r0] <== NOT EXECUTED 3000ff68: e3e05000 mvn r5, #0 <== NOT EXECUTED 3000ff6c: ea00004d b 300100a8 <== NOT EXECUTED */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ff70: e59f3138 ldr r3, [pc, #312] ; 300100b0 3000ff74: e1a00007 mov r0, r7 3000ff78: e5939000 ldr r9, [r3] 3000ff7c: e1a0100a mov r1, sl 3000ff80: e1a0b009 mov fp, r9 3000ff84: e1a0cfcb asr ip, fp, #31 3000ff88: e1a0300c mov r3, ip 3000ff8c: e1a0200b mov r2, fp 3000ff90: e58dc000 str ip, [sp] 3000ff94: eb001632 bl 30015864 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ff98: e59dc000 ldr ip, [sp] */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ff9c: e1a05000 mov r5, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ffa0: e1a0100a mov r1, sl 3000ffa4: e1a00007 mov r0, r7 3000ffa8: e1a0200b mov r2, fp 3000ffac: e1a0300c mov r3, ip 3000ffb0: eb0014fe bl 300153b0 <__divdi3> if ( start_offset ) { 3000ffb4: e3550000 cmp r5, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ffb8: e1a07000 mov r7, r0 if ( start_offset ) { 3000ffbc: 0a000012 beq 3001000c 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 ); 3000ffc0: e1a00004 mov r0, r4 <== NOT EXECUTED 3000ffc4: e1a01007 mov r1, r7 <== NOT EXECUTED 3000ffc8: e3a02000 mov r2, #0 <== NOT EXECUTED 3000ffcc: ebfffe15 bl 3000f828 <== NOT EXECUTED if ( !block_ptr ) 3000ffd0: e3500000 cmp r0, #0 <== NOT EXECUTED return copied; 3000ffd4: 01a05000 moveq r5, r0 <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 3000ffd8: 0a000032 beq 300100a8 <== 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; 3000ffdc: e065a009 rsb sl, r5, r9 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 3000ffe0: 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; 3000ffe4: e15a0008 cmp sl, r8 <== NOT EXECUTED 3000ffe8: 21a0a008 movcs sl, r8 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 3000ffec: e0800005 add r0, r0, r5 <== NOT EXECUTED 3000fff0: e1a01006 mov r1, r6 <== NOT EXECUTED 3000fff4: e1a0200a mov r2, sl <== NOT EXECUTED 3000fff8: eb00065f bl 3001197c <== NOT EXECUTED src += to_copy; 3000fffc: e086600a add r6, r6, sl <== NOT EXECUTED block++; 30010000: e2877001 add r7, r7, #1 <== NOT EXECUTED my_length -= to_copy; 30010004: e06a8008 rsb r8, sl, r8 <== NOT EXECUTED copied += to_copy; 30010008: e1a0500a mov r5, sl <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 3001000c: e59f909c ldr r9, [pc, #156] ; 300100b0 30010010: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010014: ea00000d b 30010050 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010018: e1a00004 mov r0, r4 3001001c: e1a01007 mov r1, r7 30010020: e3a02000 mov r2, #0 30010024: ebfffdff bl 3000f828 if ( !block_ptr ) 30010028: e3500000 cmp r0, #0 3001002c: 0a00001d beq 300100a8 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 ); 30010030: e1a01006 mov r1, r6 30010034: e5900000 ldr r0, [r0] 30010038: e1a0200a mov r2, sl 3001003c: eb00064e bl 3001197c src += to_copy; 30010040: e086600a add r6, r6, sl block++; 30010044: e2877001 add r7, r7, #1 my_length -= to_copy; 30010048: e06a8008 rsb r8, sl, r8 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 3001004c: e085500a add r5, r5, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 30010050: e5993000 ldr r3, [r9] 30010054: e1580003 cmp r8, r3 30010058: 2affffee bcs 30010018 * 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 ) { 3001005c: e3580000 cmp r8, #0 30010060: 0a00000a beq 30010090 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 30010064: e1a00004 mov r0, r4 30010068: e1a01007 mov r1, r7 3001006c: e3a02000 mov r2, #0 30010070: ebfffdec bl 3000f828 if ( !block_ptr ) 30010074: e3500000 cmp r0, #0 30010078: 0a00000a beq 300100a8 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 ); 3001007c: e5900000 ldr r0, [r0] 30010080: e1a01006 mov r1, r6 30010084: e1a02008 mov r2, r8 30010088: eb00063b bl 3001197c my_length = 0; copied += to_copy; 3001008c: e0855008 add r5, r5, r8 } IMFS_mtime_ctime_update( the_jnode ); 30010090: e28d0004 add r0, sp, #4 30010094: e3a01000 mov r1, #0 30010098: ebffd8aa bl 30006348 3001009c: e59d3004 ldr r3, [sp, #4] 300100a0: e5843044 str r3, [r4, #68] ; 0x44 300100a4: e5843048 str r3, [r4, #72] ; 0x48 return copied; } 300100a8: e1a00005 mov r0, r5 300100ac: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30005c8c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30005c8c: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30005c90: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30005c94: e593204c ldr r2, [r3, #76] ; 0x4c 30005c98: e3520001 cmp r2, #1 30005c9c: 0a000004 beq 30005cb4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30005ca0: eb002d07 bl 300110c4 <__errno> <== NOT EXECUTED 30005ca4: e3a03014 mov r3, #20 <== NOT EXECUTED 30005ca8: e5803000 str r3, [r0] <== NOT EXECUTED 30005cac: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005cb0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 30005cb4: e583005c str r0, [r3, #92] ; 0x5c return 0; 30005cb8: e3a00000 mov r0, #0 } 30005cbc: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30008614 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 30008614: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 30008618: e59f50e0 ldr r5, [pc, #224] ; 30008700 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 3000861c: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 30008620: e5953000 ldr r3, [r5] 30008624: e280000c add r0, r0, #12 30008628: e5931008 ldr r1, [r3, #8] 3000862c: eb00347e bl 3001582c switch( the_jnode->type ) { 30008630: e594204c ldr r2, [r4, #76] ; 0x4c 30008634: e2423001 sub r3, r2, #1 30008638: e3530006 cmp r3, #6 3000863c: 979ff103 ldrls pc, [pc, r3, lsl #2] 30008640: ea000026 b 300086e0 <== NOT EXECUTED 30008644: 30008660 .word 0x30008660 <== NOT EXECUTED 30008648: 30008674 .word 0x30008674 <== NOT EXECUTED 3000864c: 300086c0 .word 0x300086c0 <== NOT EXECUTED 30008650: 300086c0 .word 0x300086c0 <== NOT EXECUTED 30008654: 300086a8 .word 0x300086a8 <== NOT EXECUTED 30008658: 3000868c .word 0x3000868c <== NOT EXECUTED 3000865c: 300086cc .word 0x300086cc <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 30008660: e5953000 ldr r3, [r5] 30008664: e3a0002f mov r0, #47 ; 0x2f 30008668: e5931008 ldr r1, [r3, #8] 3000866c: eb003439 bl 30015758 break; 30008670: ea00001f b 300086f4 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 30008674: e5953000 ldr r3, [r5] 30008678: e59f1084 ldr r1, [pc, #132] ; 30008704 3000867c: e5930008 ldr r0, [r3, #8] 30008680: e5942050 ldr r2, [r4, #80] ; 0x50 30008684: e5943054 ldr r3, [r4, #84] ; 0x54 30008688: ea000004 b 300086a0 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 3000868c: e5953000 ldr r3, [r5] 30008690: e59f1070 ldr r1, [pc, #112] ; 30008708 30008694: e5930008 ldr r0, [r3, #8] 30008698: e5942050 ldr r2, [r4, #80] ; 0x50 3000869c: e5943058 ldr r3, [r4, #88] ; 0x58 300086a0: eb00340c bl 300156d8 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 300086a4: ea000012 b 300086f4 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 300086a8: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086ac: e59f1058 ldr r1, [pc, #88] ; 3000870c <== NOT EXECUTED 300086b0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 300086b4: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 300086b8: eb003406 bl 300156d8 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; 300086bc: ea00000c b 300086f4 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 300086c0: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086c4: e59f0044 ldr r0, [pc, #68] ; 30008710 <== NOT EXECUTED 300086c8: ea000001 b 300086d4 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 300086cc: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086d0: e59f003c ldr r0, [pc, #60] ; 30008714 <== NOT EXECUTED 300086d4: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 300086d8: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 300086dc: ea003452 b 3001582c <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 300086e0: e5953000 ldr r3, [r5] <== NOT EXECUTED 300086e4: e59f102c ldr r1, [pc, #44] ; 30008718 <== NOT EXECUTED 300086e8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 300086ec: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 300086f0: ea0033f8 b 300156d8 <== NOT EXECUTED return; } puts(""); 300086f4: e59f0020 ldr r0, [pc, #32] ; 3000871c } 300086f8: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 300086fc: ea003b24 b 30017394 =============================================================================== 30005ccc : ) { IMFS_jnode_t *node; ssize_t i; node = loc->node_access; 30005ccc: e590c000 ldr ip, [r0] <== NOT EXECUTED IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30005cd0: e3a00000 mov r0, #0 <== NOT EXECUTED 30005cd4: ea000001 b 30005ce0 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; 30005cd8: e7c13000 strb r3, [r1, r0] <== NOT EXECUTED node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30005cdc: e2800001 add r0, r0, #1 <== NOT EXECUTED 30005ce0: e1500002 cmp r0, r2 <== NOT EXECUTED 30005ce4: 212fff1e bxcs lr <== NOT EXECUTED 30005ce8: e59c3050 ldr r3, [ip, #80] ; 0x50 <== NOT EXECUTED 30005cec: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED 30005cf0: e3530000 cmp r3, #0 <== NOT EXECUTED 30005cf4: 1afffff7 bne 30005cd8 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } 30005cf8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30005cfc : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 30005cfc: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 30005d00: e5914000 ldr r4, [r1] <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 30005d04: e1a05002 mov r5, r2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 30005d08: e1a01003 mov r1, r3 <== NOT EXECUTED 30005d0c: e284000c add r0, r4, #12 <== NOT EXECUTED 30005d10: e3a02020 mov r2, #32 <== NOT EXECUTED 30005d14: eb0030ec bl 300120cc <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 30005d18: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30005d1c: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30005d20: 11a00004 movne r0, r4 <== NOT EXECUTED 30005d24: 1b001041 blne 30009e30 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 30005d28: e5950000 ldr r0, [r5] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 30005d2c: e1a01004 mov r1, r4 <== NOT EXECUTED the_jnode->Parent = new_parent; 30005d30: e5840008 str r0, [r4, #8] <== NOT EXECUTED 30005d34: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED 30005d38: eb001031 bl 30009e04 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 30005d3c: e1a0000d mov r0, sp <== NOT EXECUTED 30005d40: e3a01000 mov r1, #0 <== NOT EXECUTED 30005d44: eb00017f bl 30006348 <== NOT EXECUTED 30005d48: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 30005d4c: e3a00000 mov r0, #0 <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 30005d50: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 30005d54: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000da04 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 3000da04: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000da08: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 3000da0c: e593204c ldr r2, [r3, #76] ; 0x4c 3000da10: e2422002 sub r2, r2, #2 3000da14: e3520005 cmp r2, #5 3000da18: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000da1c: ea000012 b 3000da6c <== NOT EXECUTED 3000da20: 3000da38 .word 0x3000da38 <== NOT EXECUTED 3000da24: 3000da6c .word 0x3000da6c <== NOT EXECUTED 3000da28: 3000da58 .word 0x3000da58 <== NOT EXECUTED 3000da2c: 3000da4c .word 0x3000da4c <== NOT EXECUTED 3000da30: 3000da4c .word 0x3000da4c <== NOT EXECUTED 3000da34: 3000da58 .word 0x3000da58 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 3000da38: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 3000da3c: e593c050 ldr ip, [r3, #80] ; 0x50 3000da40: e581201c str r2, [r1, #28] 3000da44: e581c018 str ip, [r1, #24] break; 3000da48: ea00000c b 3000da80 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 3000da4c: e283c050 add ip, r3, #80 ; 0x50 3000da50: e89c1800 ldm ip, {fp, ip} 3000da54: ea000001 b 3000da60 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 3000da58: e3a0b000 mov fp, #0 <== NOT EXECUTED 3000da5c: e3a0c000 mov ip, #0 <== NOT EXECUTED 3000da60: e581b020 str fp, [r1, #32] 3000da64: e581c024 str ip, [r1, #36] ; 0x24 break; 3000da68: ea000004 b 3000da80 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000da6c: eb000d94 bl 300110c4 <__errno> <== NOT EXECUTED 3000da70: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3000da74: e5803000 str r3, [r0] <== NOT EXECUTED 3000da78: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000da7c: e8bd8800 pop {fp, pc} <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 3000da80: e5902010 ldr r2, [r0, #16] 3000da84: e59f0050 ldr r0, [pc, #80] ; 3000dadc buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 3000da88: e5922034 ldr r2, [r2, #52] ; 0x34 3000da8c: e5922000 ldr r2, [r2] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 3000da90: e8810005 stm r1, {r0, r2} rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 3000da94: e5932030 ldr r2, [r3, #48] ; 0x30 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; 3000da98: e3a00000 mov r0, #0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 3000da9c: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 3000daa0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 3000daa4: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 3000daa8: e5932038 ldr r2, [r3, #56] ; 0x38 3000daac: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 3000dab0: e1d323bc ldrh r2, [r3, #60] ; 0x3c 3000dab4: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 3000dab8: e1d323be ldrh r2, [r3, #62] ; 0x3e 3000dabc: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 3000dac0: e5932040 ldr r2, [r3, #64] ; 0x40 3000dac4: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 3000dac8: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; 3000dacc: e5933048 ldr r3, [r3, #72] ; 0x48 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 3000dad0: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 3000dad4: e5813038 str r3, [r1, #56] ; 0x38 return 0; } 3000dad8: e8bd8800 pop {fp, pc} =============================================================================== 30005d58 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30005d58: e92d40f0 push {r4, r5, r6, r7, lr} 30005d5c: e1a05000 mov r5, r0 30005d60: e24dd040 sub sp, sp, #64 ; 0x40 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 30005d64: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 30005d68: e1a06001 mov r6, r1 30005d6c: e1a07002 mov r7, r2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 30005d70: eb0030bd bl 3001206c 30005d74: e28d4004 add r4, sp, #4 30005d78: e1a01000 mov r1, r0 30005d7c: e1a02004 mov r2, r4 30005d80: e28d303c add r3, sp, #60 ; 0x3c 30005d84: e1a00007 mov r0, r7 30005d88: eb001eb3 bl 3000d85c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30005d8c: e1a00006 mov r0, r6 30005d90: eb0030a1 bl 3001201c if (info.sym_link.name == NULL) { 30005d94: e3500000 cmp r0, #0 IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30005d98: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 30005d9c: 0a00000b beq 30005dd0 new_node = IMFS_create_node( parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 30005da0: e28d3028 add r3, sp, #40 ; 0x28 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 30005da4: e58d3000 str r3, [sp] 30005da8: e1a00005 mov r0, r5 30005dac: e3a01004 mov r1, #4 30005db0: e1a02004 mov r2, r4 30005db4: e59f302c ldr r3, [pc, #44] ; 30005de8 30005db8: eb001c3a bl 3000cea8 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30005dbc: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 30005dc0: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30005dc4: 1a000005 bne 30005de0 free(info.sym_link.name); 30005dc8: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 30005dcc: eb000134 bl 300062a4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30005dd0: eb002cbb bl 300110c4 <__errno> <== NOT EXECUTED 30005dd4: e3a0300c mov r3, #12 <== NOT EXECUTED 30005dd8: e5803000 str r3, [r0] <== NOT EXECUTED 30005ddc: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 30005de0: e28dd040 add sp, sp, #64 ; 0x40 30005de4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30005dec : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005dec: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 30005df0: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005df4: e24dd01c sub sp, sp, #28 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005df8: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005dfc: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005e00: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30005e04: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30005e08: 1a000024 bne 30005ea0 if ( !node->info.hard_link.link_node ) 30005e0c: e595e050 ldr lr, [r5, #80] ; 0x50 <== NOT EXECUTED 30005e10: e35e0000 cmp lr, #0 <== NOT EXECUTED 30005e14: 1a000003 bne 30005e28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 30005e18: eb002ca9 bl 300110c4 <__errno> <== NOT EXECUTED 30005e1c: e3a03016 mov r3, #22 <== NOT EXECUTED 30005e20: e5803000 str r3, [r0] <== NOT EXECUTED 30005e24: ea000023 b 30005eb8 <== NOT EXECUTED the_link = *loc; 30005e28: e1a0c00d mov ip, sp <== NOT EXECUTED 30005e2c: e1a07001 mov r7, r1 <== NOT EXECUTED 30005e30: e8b7000f ldm r7!, {r0, r1, r2, r3} <== NOT EXECUTED 30005e34: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30005e38: e5973000 ldr r3, [r7] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; 30005e3c: e28d701c add r7, sp, #28 <== NOT EXECUTED 30005e40: e527e01c str lr, [r7, #-28]! <== NOT EXECUTED IMFS_Set_handlers( &the_link ); 30005e44: e1a0000d mov r0, sp <== NOT EXECUTED if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 30005e48: e58c3000 str r3, [ip] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 30005e4c: eb001c75 bl 3000d028 <== NOT EXECUTED /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) 30005e50: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED 30005e54: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED 30005e58: e3520001 cmp r2, #1 <== NOT EXECUTED 30005e5c: 1a000007 bne 30005e80 <== NOT EXECUTED { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 30005e60: e1a00006 mov r0, r6 <== NOT EXECUTED 30005e64: e1a0100d mov r1, sp <== NOT EXECUTED 30005e68: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 30005e6c: e1a0e00f mov lr, pc <== NOT EXECUTED 30005e70: e593f034 ldr pc, [r3, #52] ; 0x34 <== NOT EXECUTED if ( result != 0 ) 30005e74: e3500000 cmp r0, #0 <== NOT EXECUTED 30005e78: 0a000008 beq 30005ea0 <== NOT EXECUTED 30005e7c: ea00000d b 30005eb8 <== NOT EXECUTED return -1; } else { node->info.hard_link.link_node->st_nlink --; 30005e80: e2422001 sub r2, r2, #1 <== NOT EXECUTED 30005e84: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( node->info.hard_link.link_node ); 30005e88: e28d0014 add r0, sp, #20 <== NOT EXECUTED 30005e8c: e3a01000 mov r1, #0 <== NOT EXECUTED 30005e90: eb00012c bl 30006348 <== NOT EXECUTED 30005e94: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED 30005e98: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 30005e9c: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 30005ea0: e5943008 ldr r3, [r4, #8] 30005ea4: e1a00006 mov r0, r6 30005ea8: e1a01004 mov r1, r4 30005eac: e1a0e00f mov lr, pc 30005eb0: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 30005eb4: ea000000 b 30005ebc if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 30005eb8: e3e00000 mvn r0, #0 <== NOT EXECUTED */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 30005ebc: e28dd01c add sp, sp, #28 30005ec0: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30005ec4 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30005ec4: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30005ec8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30005ecc: e593204c ldr r2, [r3, #76] ; 0x4c 30005ed0: e3520001 cmp r2, #1 30005ed4: 0a000002 beq 30005ee4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30005ed8: eb002c79 bl 300110c4 <__errno> <== NOT EXECUTED 30005edc: e3a03014 mov r3, #20 <== NOT EXECUTED 30005ee0: ea000004 b 30005ef8 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 30005ee4: e593205c ldr r2, [r3, #92] ; 0x5c 30005ee8: e3520000 cmp r2, #0 30005eec: 1a000004 bne 30005f04 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 30005ef0: eb002c73 bl 300110c4 <__errno> <== NOT EXECUTED 30005ef4: e3a03016 mov r3, #22 <== NOT EXECUTED 30005ef8: e5803000 str r3, [r0] <== NOT EXECUTED 30005efc: e3e00000 mvn r0, #0 <== NOT EXECUTED 30005f00: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 30005f04: e3a00000 mov r0, #0 30005f08: e583005c str r0, [r3, #92] ; 0x5c return 0; } 30005f0c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30005f10 : int IMFS_utime( rtems_filesystem_location_info_t *pathloc, /* IN */ time_t actime, /* IN */ time_t modtime /* IN */ ) { 30005f10: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 30005f14: e5904000 ldr r4, [r0] <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; the_jnode->stat_ctime = time( NULL ); 30005f18: e3a00000 mov r0, #0 <== NOT EXECUTED { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; the_jnode->stat_atime = actime; 30005f1c: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_jnode->stat_mtime = modtime; 30005f20: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED the_jnode->stat_ctime = time( NULL ); 30005f24: eb0030a3 bl 300121b8