=============================================================================== 00009388 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 9388: e5903000 ldr r3, [r0] 938c: e593204c ldr r2, [r3, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 9390: e5903010 ldr r3, [r0, #16] switch( node->type ) { 9394: e2422001 sub r2, r2, #1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 9398: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 939c: e3520006 cmp r2, #6 93a0: 979ff102 ldrls pc, [pc, r2, lsl #2] 93a4: ea000010 b 93ec <== NOT EXECUTED 93a8: 000093c4 .word 0x000093c4 <== NOT EXECUTED 93ac: 000093cc .word 0x000093cc <== NOT EXECUTED 93b0: 000093d4 .word 0x000093d4 <== NOT EXECUTED 93b4: 000093d4 .word 0x000093d4 <== NOT EXECUTED 93b8: 000093dc .word 0x000093dc <== NOT EXECUTED 93bc: 000093dc .word 0x000093dc <== NOT EXECUTED 93c0: 000093e4 .word 0x000093e4 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 93c4: e593300c ldr r3, [r3, #12] 93c8: ea000006 b 93e8 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 93cc: e59f3020 ldr r3, [pc, #32] ; 93f4 93d0: ea000004 b 93e8 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 93d4: e59f301c ldr r3, [pc, #28] ; 93f8 93d8: ea000002 b 93e8 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 93dc: e5933008 ldr r3, [r3, #8] 93e0: ea000000 b 93e8 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 93e4: e59f3010 ldr r3, [pc, #16] ; 93fc 93e8: e5803008 str r3, [r0, #8] break; } return 0; } 93ec: e3a00000 mov r0, #0 93f0: e12fff1e bx lr =============================================================================== 00009128 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 9128: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} 912c: e1a02802 lsl r2, r2, #16 9130: e1a01801 lsl r1, r1, #16 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 9134: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 9138: e1a07821 lsr r7, r1, #16 913c: e1a06822 lsr r6, r2, #16 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 9140: eb000496 bl a3a0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 9144: e1d453bc ldrh r5, [r4, #60] ; 0x3c 9148: e3500000 cmp r0, #0 914c: 11550000 cmpne r5, r0 9150: 03a05000 moveq r5, #0 9154: 13a05001 movne r5, #1 9158: 0a000004 beq 9170 rtems_set_errno_and_return_minus_one( EPERM ); 915c: eb001560 bl e6e4 <__errno> <== NOT EXECUTED 9160: e3a03001 mov r3, #1 <== NOT EXECUTED 9164: e5803000 str r3, [r0] <== NOT EXECUTED 9168: e3e00000 mvn r0, #0 <== NOT EXECUTED 916c: ea000007 b 9190 <== NOT EXECUTED #endif jnode->st_uid = owner; 9170: e1c473bc strh r7, [r4, #60] ; 0x3c jnode->st_gid = group; 9174: e1c463be strh r6, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); 9178: e1a0000d mov r0, sp 917c: e1a01005 mov r1, r5 9180: ebffe37b bl 1f74 9184: e59d3000 ldr r3, [sp] 9188: e5843048 str r3, [r4, #72] ; 0x48 918c: e1a00005 mov r0, r5 return 0; } 9190: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} =============================================================================== 0000924c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 924c: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 9250: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 9254: e1a05001 mov r5, r1 9258: e59d6014 ldr r6, [sp, #20] 925c: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 9260: 01a07004 moveq r7, r4 9264: 0a000041 beq 9370 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 9268: e59f2108 ldr r2, [pc, #264] ; 9378 926c: e5922000 ldr r2, [r2] 9270: e592202c ldr r2, [r2, #44] ; 0x2c 9274: e1a00005 mov r0, r5 9278: e1c32002 bic r2, r3, r2 927c: ebffffc4 bl 9194 if ( !node ) 9280: e2507000 subs r7, r0, #0 9284: 0a000039 beq 9370 return NULL; /* * Set the type specific information */ switch (type) { 9288: e2455001 sub r5, r5, #1 928c: e3550006 cmp r5, #6 9290: 979ff105 ldrls pc, [pc, r5, lsl #2] 9294: ea000025 b 9330 <== NOT EXECUTED 9298: 000092b4 .word 0x000092b4 <== NOT EXECUTED 929c: 000092d8 .word 0x000092d8 <== NOT EXECUTED 92a0: 000092d0 .word 0x000092d0 <== NOT EXECUTED 92a4: 000092d0 .word 0x000092d0 <== NOT EXECUTED 92a8: 00009300 .word 0x00009300 <== NOT EXECUTED 92ac: 000092e8 .word 0x000092e8 <== NOT EXECUTED 92b0: 00009324 .word 0x00009324 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 92b4: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 92b8: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 92bc: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; 92c0: e3a02000 mov r2, #0 92c4: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); 92c8: e5873058 str r3, [r7, #88] ; 0x58 92cc: ea00001c b 9344 case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 92d0: e5963000 ldr r3, [r6] 92d4: ea000013 b 9328 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 92d8: e5962004 ldr r2, [r6, #4] case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 92dc: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; 92e0: e5872054 str r2, [r7, #84] ; 0x54 92e4: ea00000f b 9328 break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 92e8: e3a03000 mov r3, #0 <== NOT EXECUTED 92ec: e3a02000 mov r2, #0 <== NOT EXECUTED 92f0: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED 92f4: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; 92f8: e3a03000 mov r3, #0 <== NOT EXECUTED 92fc: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 9300: e3a03000 mov r3, #0 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; 9304: e3a01000 mov r1, #0 9308: e3a02000 mov r2, #0 930c: e5871050 str r1, [r7, #80] ; 0x50 9310: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 9314: e5873060 str r3, [r7, #96] ; 0x60 node->info.linearfile.size = 0; node->info.linearfile.direct = 0; case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 9318: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; 931c: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; 9320: ea000007 b 9344 case IMFS_FIFO: node->info.fifo.pipe = NULL; 9324: e3a03000 mov r3, #0 9328: e5873050 str r3, [r7, #80] ; 0x50 break; 932c: ea000004 b 9344 default: assert(0); 9330: e59f0044 ldr r0, [pc, #68] ; 937c <== NOT EXECUTED 9334: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED 9338: e59f2040 ldr r2, [pc, #64] ; 9380 <== NOT EXECUTED 933c: e59f3040 ldr r3, [pc, #64] ; 9384 <== NOT EXECUTED 9340: eb00039b bl a1b4 <__assert_func> <== NOT EXECUTED /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 9344: e5943010 ldr r3, [r4, #16] 9348: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 934c: e5923004 ldr r3, [r2, #4] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 9350: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 9354: e2833001 add r3, r3, #1 9358: e5823004 str r3, [r2, #4] * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; 935c: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; 9360: e5873038 str r3, [r7, #56] ; 0x38 9364: e2800050 add r0, r0, #80 ; 0x50 9368: e1a01007 mov r1, r7 936c: ebfff1c8 bl 5a94 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 9370: e1a00007 mov r0, r7 9374: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00003e30 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3e30: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 3e34: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3e38: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 3e3c: 059f00a4 ldreq r0, [pc, #164] ; 3ee8 3e40: 03a01084 moveq r1, #132 ; 0x84 3e44: 059f20a0 ldreq r2, [pc, #160] ; 3eec 3e48: 059f30a0 ldreq r3, [pc, #160] ; 3ef0 3e4c: 0a000005 beq 3e68 assert( level >= 0 ); 3e50: e3510000 cmp r1, #0 3e54: aa000004 bge 3e6c 3e58: e59f0088 ldr r0, [pc, #136] ; 3ee8 <== NOT EXECUTED 3e5c: e59f2088 ldr r2, [pc, #136] ; 3eec <== NOT EXECUTED 3e60: e59f308c ldr r3, [pc, #140] ; 3ef4 <== NOT EXECUTED 3e64: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 3e68: eb000216 bl 46c8 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 3e6c: e590304c ldr r3, [r0, #76] ; 0x4c 3e70: e3530001 cmp r3, #1 3e74: 159f006c ldrne r0, [pc, #108] ; 3ee8 3e78: 13a01088 movne r1, #136 ; 0x88 3e7c: 159f2068 ldrne r2, [pc, #104] ; 3eec 3e80: 159f3070 ldrne r3, [pc, #112] ; 3ef8 3e84: 1afffff7 bne 3e68 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3e88: e280a054 add sl, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3e8c: e5904050 ldr r4, [r0, #80] ; 0x50 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 3e90: e59f8064 ldr r8, [pc, #100] ; 3efc IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 3e94: e2817001 add r7, r1, #1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3e98: ea00000f b 3edc !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 3e9c: e3a06000 mov r6, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 3ea0: e5983000 ldr r3, [r8] !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 3ea4: e2866001 add r6, r6, #1 fprintf(stdout, "...." ); 3ea8: e5931008 ldr r1, [r3, #8] 3eac: e59f004c ldr r0, [pc, #76] ; 3f00 3eb0: eb003b9c bl 12d28 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) 3eb4: e1560005 cmp r6, r5 3eb8: dafffff8 ble 3ea0 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 3ebc: e1a00004 mov r0, r4 3ec0: ebffff7e bl 3cc0 if ( the_jnode->type == IMFS_DIRECTORY ) 3ec4: e594304c ldr r3, [r4, #76] ; 0x4c 3ec8: e3530001 cmp r3, #1 IMFS_dump_directory( the_jnode, level + 1 ); 3ecc: 01a00004 moveq r0, r4 3ed0: 01a01007 moveq r1, r7 3ed4: 0bffffd5 bleq 3e30 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 3ed8: e5944000 ldr r4, [r4] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 3edc: e154000a cmp r4, sl 3ee0: 1affffed bne 3e9c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 3ee4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00009574 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 9574: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 9578: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 957c: e24dd028 sub sp, sp, #40 ; 0x28 9580: e1a0a002 mov sl, r2 9584: e1a08000 mov r8, r0 9588: e1a06001 mov r6, r1 958c: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 9590: 05935000 ldreq r5, [r3] 9594: 03a09001 moveq r9, #1 IMFS_token_types type = IMFS_CURRENT_DIR; char token[ IMFS_NAME_MAX + 1 ]; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 9598: 0a000084 beq 97b0 assert( 0 ); 959c: e59f02b4 ldr r0, [pc, #692] ; 9858 <== NOT EXECUTED 95a0: e3a01f82 mov r1, #520 ; 0x208 <== NOT EXECUTED 95a4: e59f22b0 ldr r2, [pc, #688] ; 985c <== NOT EXECUTED 95a8: e59f32b0 ldr r3, [pc, #688] ; 9860 <== NOT EXECUTED 95ac: eb000300 bl a1b4 <__assert_func> <== 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 ); 95b0: e28d3024 add r3, sp, #36 ; 0x24 95b4: e0880007 add r0, r8, r7 95b8: e1a01006 mov r1, r6 95bc: e1a0200d mov r2, sp 95c0: eb000260 bl 9f48 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 95c4: e5943000 ldr r3, [r4] 95c8: e3530000 cmp r3, #0 * 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 ); 95cc: e1a09000 mov r9, r0 pathnamelen -= len; 95d0: e59db024 ldr fp, [sp, #36] ; 0x24 i += len; if ( !pathloc->node_access ) 95d4: 0a000044 beq 96ec rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 95d8: e3500000 cmp r0, #0 95dc: 0a000006 beq 95fc if ( node->type == IMFS_DIRECTORY ) 95e0: e595104c ldr r1, [r5, #76] ; 0x4c 95e4: e3510001 cmp r1, #1 95e8: 1a000003 bne 95fc if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 95ec: e1a00004 mov r0, r4 95f0: ebffff82 bl 9400 95f4: e3500000 cmp r0, #0 95f8: 0a00008f beq 983c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 95fc: 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; i += len; 9600: e087700b add r7, r7, fp */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 9604: e06b6006 rsb r6, fp, r6 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; 9608: e5945000 ldr r5, [r4] switch( type ) { 960c: 0a000018 beq 9674 9610: e3590004 cmp r9, #4 9614: 0a000062 beq 97a4 9618: e3590002 cmp r9, #2 961c: 1a000063 bne 97b0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 9620: e59f223c ldr r2, [pc, #572] ; 9864 9624: e5923000 ldr r3, [r2] 9628: e5933018 ldr r3, [r3, #24] 962c: e1550003 cmp r5, r3 9630: 0a00005e beq 97b0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 9634: e594c010 ldr ip, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 9638: e59c301c ldr r3, [ip, #28] 963c: e1550003 cmp r5, r3 9640: 1a000005 bne 965c */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 9644: e28cc008 add ip, ip, #8 9648: e8bc000f ldm ip!, {r0, r1, r2, r3} 964c: e1a05004 mov r5, r4 9650: e8a5000f stmia r5!, {r0, r1, r2, r3} 9654: e1a03005 mov r3, r5 9658: ea000062 b 97e8 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 965c: e5955008 ldr r5, [r5, #8] 9660: e3550000 cmp r5, #0 9664: 1a00004c bne 979c rtems_set_errno_and_return_minus_one( ENOENT ); 9668: eb00141d bl e6e4 <__errno> 966c: e5809000 str r9, [r0] 9670: ea000074 b 9848 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 9674: e595304c ldr r3, [r5, #76] ; 0x4c 9678: e3530003 cmp r3, #3 967c: 1a000006 bne 969c IMFS_evaluate_hard_link( pathloc, 0 ); 9680: e1a00004 mov r0, r4 9684: e3a01000 mov r1, #0 9688: ebffff76 bl 9468 node = pathloc->node_access; 968c: e5945000 ldr r5, [r4] if ( !node ) 9690: e3550000 cmp r5, #0 9694: 1a000009 bne 96c0 9698: ea00000b b 96cc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 969c: e3530004 cmp r3, #4 96a0: 1a000006 bne 96c0 result = IMFS_evaluate_sym_link( pathloc, 0 ); 96a4: e1a00004 mov r0, r4 96a8: e3a01000 mov r1, #0 96ac: ebffff84 bl 94c4 node = pathloc->node_access; if ( result == -1 ) 96b0: e3700001 cmn r0, #1 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 96b4: e1a0b000 mov fp, r0 node = pathloc->node_access; 96b8: e5945000 ldr r5, [r4] if ( result == -1 ) 96bc: 0a000062 beq 984c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 96c0: e595304c ldr r3, [r5, #76] ; 0x4c 96c4: e3530001 cmp r3, #1 96c8: 0a000002 beq 96d8 rtems_set_errno_and_return_minus_one( ENOTDIR ); 96cc: eb001404 bl e6e4 <__errno> 96d0: e3a03014 mov r3, #20 96d4: ea00005a b 9844 /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 96d8: e1a00005 mov r0, r5 96dc: e1a0100d mov r1, sp 96e0: eb0001f0 bl 9ea8 if ( !node ) 96e4: e2505000 subs r5, r0, #0 96e8: 1a000002 bne 96f8 rtems_set_errno_and_return_minus_one( ENOENT ); 96ec: eb0013fc bl e6e4 <__errno> 96f0: e3a03002 mov r3, #2 96f4: ea000052 b 9844 * file system and not the IMFS. For example the IMFS length is * limited. If the token is a parent directory move back up otherwise * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 96f8: e595304c ldr r3, [r5, #76] ; 0x4c 96fc: e3530001 cmp r3, #1 9700: 1a000025 bne 979c 9704: e595305c ldr r3, [r5, #92] ; 0x5c 9708: e3530000 cmp r3, #0 970c: 1088b007 addne fp, r8, r7 9710: 1a000002 bne 9720 9714: ea000020 b 979c size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 9718: e2877001 add r7, r7, #1 --(*len); 971c: e2466001 sub r6, r6, #1 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 9720: e5db0000 ldrb r0, [fp] 9724: ebffe5a1 bl 2db0 9728: e3500000 cmp r0, #0 ++(*index); --(*len); 972c: e1a0c00b mov ip, fp const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 9730: 0a000005 beq 974c 9734: e5db3000 ldrb r3, [fp] 9738: e3530000 cmp r3, #0 973c: 0a000002 beq 974c 9740: e3560000 cmp r6, #0 9744: e28bb001 add fp, fp, #1 9748: 1afffff2 bne 9718 * set loc to the new fs root node and let them finish evaluating the * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { 974c: e5dc3000 ldrb r3, [ip] 9750: e353002e cmp r3, #46 ; 0x2e 9754: 1a000003 bne 9768 9758: e0883007 add r3, r8, r7 975c: e5d33001 ldrb r3, [r3, #1] 9760: e353002e cmp r3, #46 ; 0x2e 9764: 0a000009 beq 9790 *pathloc = node->info.directory.mt_fs->mt_fs_root; 9768: e595e05c ldr lr, [r5, #92] ; 0x5c 976c: e28ee01c add lr, lr, #28 9770: e8be000f ldm lr!, {r0, r1, r2, r3} 9774: e1a05004 mov r5, r4 9778: e8a5000f stmia r5!, {r0, r1, r2, r3} 977c: e59e2000 ldr r2, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i], 9780: e1a0000c mov r0, ip * path. */ if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( pathname, &pathnamelen, &i); if ((pathname[i] != '.') || (pathname[i + 1] != '.')) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 9784: e5852000 str r2, [r5] return (*pathloc->ops->evalpath_h)( &pathname[i], 9788: e1a01006 mov r1, r6 978c: ea00001b b 9800 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 9790: e5955008 ldr r5, [r5, #8] *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalpath_h)( &pathname[i], pathnamelen, flags, pathloc ); } i += 2; 9794: e2877002 add r7, r7, #2 pathnamelen -= 2; 9798: e2466002 sub r6, r6, #2 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 979c: e5845000 str r5, [r4] 97a0: ea000002 b 97b0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 97a4: eb0013ce bl e6e4 <__errno> 97a8: e3a0305b mov r3, #91 ; 0x5b 97ac: ea000024 b 9844 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 97b0: e3590004 cmp r9, #4 97b4: 13590000 cmpne r9, #0 97b8: 1affff7c bne 95b0 * 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 ) { 97bc: e595304c ldr r3, [r5, #76] ; 0x4c 97c0: e3530001 cmp r3, #1 97c4: 1a000014 bne 981c if ( node->info.directory.mt_fs != NULL ) { 97c8: e595c05c ldr ip, [r5, #92] ; 0x5c 97cc: e35c0000 cmp ip, #0 97d0: 0a000011 beq 981c *pathloc = node->info.directory.mt_fs->mt_fs_root; 97d4: e28cc01c add ip, ip, #28 <== NOT EXECUTED 97d8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 97dc: e1a0e004 mov lr, r4 <== NOT EXECUTED 97e0: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 97e4: e1a0300e mov r3, lr <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 97e8: e59d1024 ldr r1, [sp, #36] ; 0x24 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 97ec: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 97f0: e0610007 rsb r0, r1, r7 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { *pathloc = node->info.directory.mt_fs->mt_fs_root; 97f4: e5832000 str r2, [r3] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 97f8: e0880000 add r0, r8, r0 97fc: e0861001 add r1, r6, r1 9800: e1a0200a mov r2, sl 9804: e1a03004 mov r3, r4 9808: e594c00c ldr ip, [r4, #12] 980c: e1a0e00f mov lr, pc 9810: e59cf000 ldr pc, [ip] 9814: e1a0b000 mov fp, r0 9818: ea00000b b 984c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 981c: e1a00004 mov r0, r4 9820: ebfffed8 bl 9388 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 9824: e1a0100a mov r1, sl flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 9828: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 982c: e1a00004 mov r0, r4 9830: ebfffef2 bl 9400 9834: e3500000 cmp r0, #0 9838: 1a000003 bne 984c rtems_set_errno_and_return_minus_one( EACCES ); 983c: eb0013a8 bl e6e4 <__errno> 9840: e3a0300d mov r3, #13 9844: e5803000 str r3, [r0] 9848: e3e0b000 mvn fp, #0 return result; } 984c: e1a0000b mov r0, fp 9850: e28dd028 add sp, sp, #40 ; 0x28 9854: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000991c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 991c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 9920: e24dd028 sub sp, sp, #40 ; 0x28 9924: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 9928: e5916000 ldr r6, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 992c: e1a0a002 mov sl, r2 9930: e1a08000 mov r8, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 9934: eb00176f bl f6f8 9938: e3a05000 mov r5, #0 993c: e1a07000 mov r7, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 9940: e28d3024 add r3, sp, #36 ; 0x24 9944: e0880005 add r0, r8, r5 9948: e1a01007 mov r1, r7 994c: e1a0200d mov r2, sp 9950: eb00017c bl 9f48 pathlen -= len; i += len; if ( !pathloc->node_access ) 9954: e5943000 ldr r3, [r4] 9958: 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 ); 995c: e1a09000 mov r9, r0 pathlen -= len; 9960: e59db024 ldr fp, [sp, #36] ; 0x24 i += len; if ( !pathloc->node_access ) 9964: 0a000080 beq 9b6c /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 9968: e3500000 cmp r0, #0 996c: 0a000006 beq 998c if ( node->type == IMFS_DIRECTORY ) 9970: e596104c ldr r1, [r6, #76] ; 0x4c 9974: e3510001 cmp r1, #1 9978: 1a000003 bne 998c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 997c: e1a00004 mov r0, r4 9980: ebfffe9e bl 9400 9984: e3500000 cmp r0, #0 9988: 0a00008c beq 9bc0 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 998c: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 9990: e085500b add r5, r5, fp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 9994: e06b7007 rsb r7, fp, r7 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; 9998: e1a06003 mov r6, r3 switch( type ) { 999c: e3590004 cmp r9, #4 99a0: 979ff109 ldrls pc, [pc, r9, lsl #2] 99a4: eaffffe5 b 9940 <== NOT EXECUTED 99a8: 00009b2c .word 0x00009b2c <== NOT EXECUTED 99ac: 00009940 .word 0x00009940 <== NOT EXECUTED 99b0: 000099bc .word 0x000099bc <== NOT EXECUTED 99b4: 00009a18 .word 0x00009a18 <== NOT EXECUTED 99b8: 00009b38 .word 0x00009b38 <== 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 ) 99bc: e59f1218 ldr r1, [pc, #536] ; 9bdc 99c0: e5912000 ldr r2, [r1] 99c4: e5922018 ldr r2, [r2, #24] 99c8: e1530002 cmp r3, r2 99cc: 0affffdb beq 9940 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 99d0: e594c010 ldr ip, [r4, #16] 99d4: e59c201c ldr r2, [ip, #28] 99d8: e1530002 cmp r3, r2 99dc: 1a000009 bne 9a08 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 99e0: e28cc008 add ip, ip, #8 99e4: e8bc000f ldm ip!, {r0, r1, r2, r3} 99e8: e1a0e004 mov lr, r4 99ec: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 99f0: e59d3024 ldr r3, [sp, #36] ; 0x24 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 99f4: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 99f8: e0635005 rsb r5, r3, r5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 99fc: e58e2000 str r2, [lr] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9a00: e0880005 add r0, r8, r5 9a04: ea00003c b 9afc } } else { if ( !node->Parent ) 9a08: e5936008 ldr r6, [r3, #8] 9a0c: e3560000 cmp r6, #0 9a10: 1a000043 bne 9b24 9a14: ea000054 b 9b6c case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 9a18: e593304c ldr r3, [r3, #76] ; 0x4c 9a1c: e3530003 cmp r3, #3 9a20: 0a000001 beq 9a2c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 9a24: e3530004 cmp r3, #4 9a28: 1a000005 bne 9a44 result = IMFS_evaluate_link( pathloc, 0 ); 9a2c: e1a00004 mov r0, r4 9a30: e3a01000 mov r1, #0 9a34: ebffff8b bl 9868 if ( result == -1 ) 9a38: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 9a3c: e1a06000 mov r6, r0 if ( result == -1 ) 9a40: 0a000062 beq 9bd0 return -1; } node = pathloc->node_access; 9a44: e5940000 ldr r0, [r4] if ( !node ) 9a48: e3500000 cmp r0, #0 9a4c: 0a000053 beq 9ba0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 9a50: e590304c ldr r3, [r0, #76] ; 0x4c 9a54: e3530001 cmp r3, #1 9a58: 1a000050 bne 9ba0 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 9a5c: e1a0100d mov r1, sp 9a60: eb000110 bl 9ea8 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 9a64: e2506000 subs r6, r0, #0 9a68: 0a000035 beq 9b44 done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 9a6c: e596304c ldr r3, [r6, #76] ; 0x4c 9a70: e3530001 cmp r3, #1 9a74: 1a00002a bne 9b24 9a78: e596305c ldr r3, [r6, #92] ; 0x5c 9a7c: e3530000 cmp r3, #0 9a80: 10889005 addne r9, r8, r5 9a84: 1a000002 bne 9a94 9a88: ea000025 b 9b24 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 9a8c: e2855001 add r5, r5, #1 --(*len); 9a90: e2477001 sub r7, r7, #1 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 9a94: e5d90000 ldrb r0, [r9] 9a98: ebffe4c4 bl 2db0 9a9c: e3500000 cmp r0, #0 ++(*index); --(*len); 9aa0: e1a0c009 mov ip, r9 const char *path, /* IN */ size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { 9aa4: 0a000005 beq 9ac0 9aa8: e5d93000 ldrb r3, [r9] 9aac: e3530000 cmp r3, #0 9ab0: 0a000002 beq 9ac0 9ab4: e3570000 cmp r7, #0 9ab8: e2899001 add r9, r9, #1 9abc: 1afffff2 bne 9a8c if ( ! node ) done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { IMFS_skip_separator( path, &pathlen, &i); if ((path[i] != '.') || (path[i + 1] != '.')) { 9ac0: e5dc3000 ldrb r3, [ip] 9ac4: e353002e cmp r3, #46 ; 0x2e 9ac8: 1a000003 bne 9adc 9acc: e0883005 add r3, r8, r5 9ad0: e5d33001 ldrb r3, [r3, #1] 9ad4: e353002e cmp r3, #46 ; 0x2e 9ad8: 0a00000e beq 9b18 *pathloc = node->info.directory.mt_fs->mt_fs_root; 9adc: e596e05c ldr lr, [r6, #92] ; 0x5c 9ae0: e28ee01c add lr, lr, #28 9ae4: e8be000f ldm lr!, {r0, r1, r2, r3} 9ae8: e1a05004 mov r5, r4 9aec: e8a5000f stmia r5!, {r0, r1, r2, r3} 9af0: e59e2000 ldr r2, [lr] 9af4: e5852000 str r2, [r5] return (*pathloc->ops->evalformake_h)( &path[i], 9af8: e1a0000c mov r0, ip 9afc: e1a01004 mov r1, r4 9b00: e1a0200a mov r2, sl 9b04: e594300c ldr r3, [r4, #12] 9b08: e1a0e00f mov lr, pc 9b0c: e593f004 ldr pc, [r3, #4] 9b10: e1a06000 mov r6, r0 9b14: ea00002d b 9bd0 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 9b18: e5966008 ldr r6, [r6, #8] *pathloc = node->info.directory.mt_fs->mt_fs_root; return (*pathloc->ops->evalformake_h)( &path[i], pathloc, name ); } i += 2; 9b1c: e2855002 add r5, r5, #2 pathlen -= 2; 9b20: e2477002 sub r7, r7, #2 node = node->Parent; } pathloc->node_access = node; 9b24: e5846000 str r6, [r4] 9b28: eaffff84 b 9940 } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 9b2c: eb0012ec bl e6e4 <__errno> 9b30: e3a03011 mov r3, #17 9b34: ea000023 b 9bc8 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 9b38: eb0012e9 bl e6e4 <__errno> 9b3c: e3a0305b mov r3, #91 ; 0x5b 9b40: ea000020 b 9bc8 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 9b44: e59d3024 ldr r3, [sp, #36] ; 0x24 9b48: e0633005 rsb r3, r3, r5 9b4c: e0883003 add r3, r8, r3 9b50: e58a3000 str r3, [sl] 9b54: e0885005 add r5, r8, 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++) { 9b58: ea000006 b 9b78 if ( !IMFS_is_separator( path[ i ] ) ) 9b5c: ebffe493 bl 2db0 9b60: e3500000 cmp r0, #0 9b64: e2855001 add r5, r5, #1 9b68: 1a000002 bne 9b78 rtems_set_errno_and_return_minus_one( ENOENT ); 9b6c: eb0012dc bl e6e4 <__errno> 9b70: e3a03002 mov r3, #2 9b74: ea000013 b 9bc8 /* * 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++) { 9b78: e5d53000 ldrb r3, [r5] 9b7c: e2530000 subs r0, r3, #0 9b80: 1afffff5 bne 9b5c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 9b84: e1a00004 mov r0, r4 9b88: ebfffdfe bl 9388 /* * The returned node must be a directory */ node = pathloc->node_access; 9b8c: e5943000 ldr r3, [r4] 9b90: e593304c ldr r3, [r3, #76] ; 0x4c 9b94: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 9b98: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; 9b9c: 0a000002 beq 9bac if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 9ba0: eb0012cf bl e6e4 <__errno> 9ba4: e3a03014 mov r3, #20 9ba8: ea000006 b 9bc8 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 9bac: e1a00004 mov r0, r4 9bb0: e3a01003 mov r1, #3 9bb4: ebfffe11 bl 9400 9bb8: e3500000 cmp r0, #0 9bbc: 1a000003 bne 9bd0 rtems_set_errno_and_return_minus_one( EACCES ); 9bc0: eb0012c7 bl e6e4 <__errno> 9bc4: e3a0300d mov r3, #13 9bc8: e5803000 str r3, [r0] 9bcc: e3e06000 mvn r6, #0 return result; } 9bd0: e1a00006 mov r0, r6 9bd4: e28dd028 add sp, sp, #40 ; 0x28 9bd8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00009468 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 9468: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 946c: e593204c ldr r2, [r3, #76] ; 0x4c 9470: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 9474: e92d4030 push {r4, r5, lr} 9478: e1a04000 mov r4, r0 947c: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 9480: 159f0038 ldrne r0, [pc, #56] ; 94c0 9484: 1bfff0c8 blne 57ac /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 9488: e5933050 ldr r3, [r3, #80] ; 0x50 948c: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 9490: ebffffbc bl 9388 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 9494: e1a00004 mov r0, r4 9498: e1a01005 mov r1, r5 949c: ebffffd7 bl 9400 94a0: e3500000 cmp r0, #0 94a4: 13a00000 movne r0, #0 94a8: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 94ac: eb00148c bl e6e4 <__errno> <== NOT EXECUTED 94b0: e3a0300d mov r3, #13 <== NOT EXECUTED 94b4: e5803000 str r3, [r0] <== NOT EXECUTED 94b8: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 94bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009400 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 9400: e3d13007 bics r3, r1, #7 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 9404: e92d4070 push {r4, r5, r6, lr} 9408: 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 ) ) 940c: 0a000004 beq 9424 rtems_set_errno_and_return_minus_one( EPERM ); 9410: eb0014b3 bl e6e4 <__errno> <== NOT EXECUTED 9414: e3a03001 mov r3, #1 <== NOT EXECUTED 9418: e5803000 str r3, [r0] <== NOT EXECUTED 941c: e3e00000 mvn r0, #0 <== NOT EXECUTED 9420: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED jnode = node->node_access; 9424: e5905000 ldr r5, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 9428: eb0003dc bl a3a0 942c: e1a06000 mov r6, r0 st_gid = getegid(); 9430: eb0003d5 bl a38c * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 9434: e1d533bc ldrh r3, [r5, #60] ; 0x3c 9438: e1530006 cmp r3, r6 flags_to_test <<= 6; 943c: 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 ) 9440: 0a000002 beq 9450 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 9444: e1d533be ldrh r3, [r5, #62] ; 0x3e 9448: e1530000 cmp r3, r0 flags_to_test <<= 3; 944c: 01a04184 lsleq r4, r4, #3 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 9450: e5950030 ldr r0, [r5, #48] ; 0x30 9454: e0040000 and r0, r4, r0 9458: e1500004 cmp r0, r4 945c: 13a00000 movne r0, #0 9460: 03a00001 moveq r0, #1 return 1; return 0; } 9464: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000094c4 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 94c4: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 94c8: e5906000 ldr r6, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 94cc: e596304c ldr r3, [r6, #76] ; 0x4c 94d0: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 94d4: e1a04000 mov r4, r0 94d8: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 94dc: 159f0088 ldrne r0, [pc, #136] ; 956c /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 94e0: 1a000003 bne 94f4 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 94e4: e5963008 ldr r3, [r6, #8] 94e8: e3530000 cmp r3, #0 94ec: 1a000001 bne 94f8 rtems_fatal_error_occurred( 0xBAD00000 ); 94f0: e59f0078 ldr r0, [pc, #120] ; 9570 <== NOT EXECUTED 94f4: ebfff0ac bl 57ac <== NOT EXECUTED /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 94f8: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 94fc: e1a0100d mov r1, sp 9500: e5960050 ldr r0, [r6, #80] ; 0x50 9504: e1a02004 mov r2, r4 9508: eb0004ec bl a8c0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 950c: e59d3000 ldr r3, [sp] 9510: e5966050 ldr r6, [r6, #80] ; 0x50 9514: e0866003 add r6, r6, r3 9518: e1a00006 mov r0, r6 951c: eb001875 bl f6f8 9520: e1a02005 mov r2, r5 9524: e1a01000 mov r1, r0 9528: e1a03004 mov r3, r4 952c: e1a00006 mov r0, r6 9530: eb00000f bl 9574 9534: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 9538: e1a00004 mov r0, r4 953c: ebffff91 bl 9388 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 9540: e1a00004 mov r0, r4 9544: e1a01005 mov r1, r5 9548: ebffffac bl 9400 954c: e3500000 cmp r0, #0 9550: 1a000003 bne 9564 rtems_set_errno_and_return_minus_one( EACCES ); 9554: eb001462 bl e6e4 <__errno> <== NOT EXECUTED 9558: e3a0300d mov r3, #13 <== NOT EXECUTED 955c: e5803000 str r3, [r0] <== NOT EXECUTED 9560: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 9564: e1a00006 mov r0, r6 9568: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== 0000d53c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { d53c: e92d4073 push {r0, r1, r4, r5, r6, lr} IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; d540: e5904000 ldr r4, [r0] int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { d544: e1a06001 mov r6, r1 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); d548: ebfff394 bl a3a0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) d54c: e1d453bc ldrh r5, [r4, #60] ; 0x3c d550: e3500000 cmp r0, #0 d554: 11550000 cmpne r5, r0 d558: 03a05000 moveq r5, #0 d55c: 13a05001 movne r5, #1 d560: 0a000004 beq d578 rtems_set_errno_and_return_minus_one( EPERM ); d564: eb00045e bl e6e4 <__errno> <== NOT EXECUTED d568: e3a03001 mov r3, #1 <== NOT EXECUTED d56c: e5803000 str r3, [r0] <== NOT EXECUTED d570: e3e00000 mvn r0, #0 <== NOT EXECUTED d574: ea00000c b d5ac <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); d578: e5943030 ldr r3, [r4, #48] ; 0x30 d57c: e1a06a06 lsl r6, r6, #20 d580: e3c33eff bic r3, r3, #4080 ; 0xff0 d584: e3c3300f bic r3, r3, #15 d588: e1a06a26 lsr r6, r6, #20 d58c: e1866003 orr r6, r6, r3 d590: e5846030 str r6, [r4, #48] ; 0x30 IMFS_update_ctime( jnode ); d594: e1a0000d mov r0, sp d598: e1a01005 mov r1, r5 d59c: ebffd274 bl 1f74 d5a0: e59d3000 ldr r3, [sp] d5a4: e5843048 str r3, [r4, #72] ; 0x48 d5a8: e1a00005 mov r0, r5 return 0; } d5ac: e8bd807c pop {r2, r3, r4, r5, r6, pc} =============================================================================== 00009d40 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 9d40: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 9d44: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 9d48: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 9d4c: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 9d50: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 9d54: ebfffbd4 bl 8cac <== NOT EXECUTED if (! err) { 9d58: e2506000 subs r6, r0, #0 <== NOT EXECUTED 9d5c: 1a00000c bne 9d94 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 9d60: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 9d64: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 9d68: e5853014 str r3, [r5, #20] <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 9d6c: e1a00004 mov r0, r4 <== NOT EXECUTED 9d70: eb0001a3 bl a404 <== NOT EXECUTED 9d74: e3500000 cmp r0, #0 <== NOT EXECUTED 9d78: 1a00000a bne 9da8 <== NOT EXECUTED 9d7c: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 9d80: e3530000 cmp r3, #0 <== NOT EXECUTED 9d84: 1a000007 bne 9da8 <== NOT EXECUTED free(jnode); 9d88: e1a00004 mov r0, r4 <== NOT EXECUTED 9d8c: ebffe04f bl 1ed0 <== NOT EXECUTED 9d90: ea000004 b 9da8 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 9d94: aa000003 bge 9da8 <== NOT EXECUTED 9d98: eb001251 bl e6e4 <__errno> <== NOT EXECUTED 9d9c: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 9da0: e5806000 str r6, [r0] <== NOT EXECUTED 9da4: e3e06000 mvn r6, #0 <== NOT EXECUTED } 9da8: e1a00006 mov r0, r6 <== NOT EXECUTED 9dac: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00009c28 : void *buffer ) { int err; if (command == FIONBIO) { 9c28: e59f3068 ldr r3, [pc, #104] ; 9c98 <== NOT EXECUTED 9c2c: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 9c30: e92d4010 push {r4, lr} <== NOT EXECUTED 9c34: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 9c38: 1a00000b bne 9c6c <== NOT EXECUTED if (buffer == NULL) 9c3c: e3520000 cmp r2, #0 <== NOT EXECUTED 9c40: 03e0400d mvneq r4, #13 <== NOT EXECUTED 9c44: 0a00000d beq 9c80 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 9c48: e5924000 ldr r4, [r2] <== NOT EXECUTED 9c4c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 9c50: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 9c54: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 9c58: 03c22001 biceq r2, r2, #1 <== NOT EXECUTED if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; 9c5c: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 9c60: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 9c64: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 9c68: ea000008 b 9c90 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 9c6c: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 9c70: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 9c74: ebfffb22 bl 8904 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9c78: e2504000 subs r4, r0, #0 <== NOT EXECUTED 9c7c: aa000003 bge 9c90 <== NOT EXECUTED 9c80: eb001297 bl e6e4 <__errno> <== NOT EXECUTED 9c84: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 9c88: e5804000 str r4, [r0] <== NOT EXECUTED 9c8c: e3e04000 mvn r4, #0 <== NOT EXECUTED } 9c90: e1a00004 mov r0, r4 <== NOT EXECUTED 9c94: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00009be0 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 9be0: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 9be4: e58d0000 str r0, [sp] <== NOT EXECUTED 9be8: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 9bec: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 9bf0: ebfffb29 bl 889c <== NOT EXECUTED 9bf4: e1a03000 mov r3, r0 <== NOT EXECUTED 9bf8: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9bfc: e3540000 cmp r4, #0 <== NOT EXECUTED rtems_libio_t *iop, rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 9c00: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9c04: aa000004 bge 9c1c <== NOT EXECUTED 9c08: eb0012b5 bl e6e4 <__errno> <== NOT EXECUTED 9c0c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9c10: e5805000 str r5, [r0] <== NOT EXECUTED 9c14: e3e03000 mvn r3, #0 <== NOT EXECUTED 9c18: e3e04000 mvn r4, #0 <== NOT EXECUTED } 9c1c: e1a01004 mov r1, r4 <== NOT EXECUTED 9c20: e1a00003 mov r0, r3 <== NOT EXECUTED 9c24: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009cf0 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9cf0: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 9cf4: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9cf8: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 9cfc: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 9d00: ebfffb17 bl 8964 <== NOT EXECUTED if (err > 0) 9d04: e2505000 subs r5, r0, #0 <== NOT EXECUTED 9d08: da000005 ble 9d24 <== NOT EXECUTED IMFS_update_atime(jnode); 9d0c: e1a0000d mov r0, sp <== NOT EXECUTED 9d10: e3a01000 mov r1, #0 <== NOT EXECUTED 9d14: ebffe096 bl 1f74 <== NOT EXECUTED 9d18: e59d3000 ldr r3, [sp] <== NOT EXECUTED 9d1c: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 9d20: ea000004 b 9d38 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9d24: 0a000003 beq 9d38 <== NOT EXECUTED 9d28: eb00126d bl e6e4 <__errno> <== NOT EXECUTED 9d2c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9d30: e5805000 str r5, [r0] <== NOT EXECUTED 9d34: e3e05000 mvn r5, #0 <== NOT EXECUTED } 9d38: e1a00005 mov r0, r5 <== NOT EXECUTED 9d3c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009c9c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 9c9c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 9ca0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 9ca4: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 9ca8: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 9cac: ebfffb88 bl 8ad4 <== NOT EXECUTED if (err > 0) { 9cb0: e2505000 subs r5, r0, #0 <== NOT EXECUTED 9cb4: da000006 ble 9cd4 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 9cb8: e1a0000d mov r0, sp <== NOT EXECUTED 9cbc: e3a01000 mov r1, #0 <== NOT EXECUTED 9cc0: ebffe0ab bl 1f74 <== NOT EXECUTED 9cc4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 9cc8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 9ccc: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 9cd0: ea000004 b 9ce8 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 9cd4: 0a000003 beq 9ce8 <== NOT EXECUTED 9cd8: eb001281 bl e6e4 <__errno> <== NOT EXECUTED 9cdc: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9ce0: e5805000 str r5, [r0] <== NOT EXECUTED 9ce4: e3e05000 mvn r5, #0 <== NOT EXECUTED } 9ce8: e1a00005 mov r0, r5 <== NOT EXECUTED 9cec: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009dec : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 9dec: 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; 9df0: e1a0c000 mov ip, r0 9df4: e5bc401c ldr r4, [ip, #28]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 9df8: e1a05000 mov r5, r0 9dfc: e24dd014 sub sp, sp, #20 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 9e00: e8bc000f ldm ip!, {r0, r1, r2, r3} 9e04: e1a0e00d mov lr, sp 9e08: e8ae000f stmia lr!, {r0, r1, r2, r3} 9e0c: e59c3000 ldr r3, [ip] 9e10: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 9e14: e3a03000 mov r3, #0 9e18: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 9e1c: e1a0500d mov r5, sp 9e20: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 9e24: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 9e28: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 9e2c: ebfffd55 bl 9388 if ( jnode->type != IMFS_DIRECTORY ) { 9e30: e594204c ldr r2, [r4, #76] ; 0x4c 9e34: e3520001 cmp r2, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 9e38: e2843054 add r3, r4, #84 ; 0x54 9e3c: 1a000002 bne 9e4c 9e40: e5942050 ldr r2, [r4, #80] ; 0x50 9e44: e1520003 cmp r2, r3 9e48: 1a000005 bne 9e64 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 9e4c: e3a00000 mov r0, #0 9e50: e1a0100d mov r1, sp 9e54: ebffdeb3 bl 1928 if (result != 0) 9e58: e3500000 cmp r0, #0 9e5c: 1a00000c bne 9e94 9e60: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { 9e64: e3540000 cmp r4, #0 9e68: 0a00000b beq 9e9c if ( jnode->type == IMFS_DIRECTORY ) { 9e6c: e594304c ldr r3, [r4, #76] ; 0x4c 9e70: e3530001 cmp r3, #1 9e74: 1affffe9 bne 9e20 9e78: e5943050 ldr r3, [r4, #80] ; 0x50 9e7c: e2842054 add r2, r4, #84 ; 0x54 9e80: e1530002 cmp r3, r2 9e84: 0affffe5 beq 9e20 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 9e88: e2534000 subs r4, r3, #0 9e8c: 1affffe3 bne 9e20 9e90: ea000001 b 9e9c <== NOT EXECUTED 9e94: e3e00000 mvn r0, #0 <== NOT EXECUTED 9e98: ea000000 b 9ea0 <== NOT EXECUTED 9e9c: e3a00000 mov r0, #0 return 0; } 9ea0: e28dd014 add sp, sp, #20 9ea4: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00001548 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 1548: e59fc0d4 ldr ip, [pc, #212] ; 1624 154c: e59cc000 ldr ip, [ip] rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 1550: e92d41f0 push {r4, r5, r6, r7, r8, lr} 1554: e1a08002 mov r8, r2 1558: e1a06003 mov r6, r3 155c: e1a04000 mov r4, r0 1560: e1a07001 mov r7, r1 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 1564: e3a02000 mov r2, #0 1568: e3a03010 mov r3, #16 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 156c: e153000c cmp r3, ip 1570: e2822001 add r2, r2, #1 1574: 0a000003 beq 1588 1578: e3520006 cmp r2, #6 157c: e1a03083 lsl r3, r3, #1 1580: 1afffff9 bne 156c 1584: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 1588: e59f5098 ldr r5, [pc, #152] ; 1628 158c: e5853000 str r3, [r5] /* * 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(); 1590: eb001f1d bl 920c 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; 1594: e59fe090 ldr lr, [pc, #144] ; 162c /* * 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(); 1598: e584001c str r0, [r4, #28] 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; 159c: e8be000f ldm lr!, {r0, r1, r2, r3} 15a0: e284c038 add ip, r4, #56 ; 0x38 15a4: e8ac000f stmia ip!, {r0, r1, r2, r3} 15a8: e8be000f ldm lr!, {r0, r1, r2, r3} 15ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 15b0: e89e000f ldm lr, {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; 15b4: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 15b8: e88c000f stm ip, {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; 15bc: e5846024 str r6, [r4, #36] ; 0x24 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 ) ); 15c0: e3a00001 mov r0, #1 15c4: e3a01010 mov r1, #16 15c8: eb0001b8 bl 1cb0 if ( !fs_info ) { 15cc: e3500000 cmp r0, #0 15d0: 1a000006 bne 15f0 free(temp_mt_entry->mt_fs_root.node_access); 15d4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 15d8: eb00023c bl 1ed0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 15dc: eb003440 bl e6e4 <__errno> <== NOT EXECUTED 15e0: e3a0300c mov r3, #12 <== NOT EXECUTED 15e4: e5803000 str r3, [r0] <== NOT EXECUTED 15e8: e3e00000 mvn r0, #0 <== NOT EXECUTED 15ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 15f0: e5952004 ldr r2, [r5, #4] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 15f4: e594101c ldr r1, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; 15f8: e3a03001 mov r3, #1 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 15fc: e880000c stm r0, {r2, r3} fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 1600: e580600c str r6, [r0, #12] * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 1604: e5808008 str r8, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 1608: e0822003 add r2, r2, r3 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; 160c: e5840034 str r0, [r4, #52] ; 0x34 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 1610: e5813038 str r3, [r1, #56] ; 0x38 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 1614: e5852004 str r2, [r5, #4] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 1618: eb001ca1 bl 88a4 161c: e3a00000 mov r0, #0 return 0; } 1620: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00001630 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1630: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1634: e5903000 ldr r3, [r0] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1638: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 163c: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1640: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1644: e3530007 cmp r3, #7 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1648: e1a05001 mov r5, r1 164c: e1a06002 mov r6, r2 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1650: 9a000002 bls 1660 rtems_set_errno_and_return_minus_one( EMLINK ); 1654: eb003422 bl e6e4 <__errno> 1658: e3a0301f mov r3, #31 165c: ea000012 b 16ac /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 1660: e1a00002 mov r0, r2 1664: eb003823 bl f6f8 1668: e28d4004 add r4, sp, #4 166c: e1a01000 mov r1, r0 1670: e1a02004 mov r2, r4 1674: e28d3044 add r3, sp, #68 ; 0x44 1678: e1a00006 mov r0, r6 167c: eb002231 bl 9f48 * 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( 1680: e28dc028 add ip, sp, #40 ; 0x28 1684: e1a00005 mov r0, r5 1688: e1a02004 mov r2, r4 168c: e3a01003 mov r1, #3 1690: e59f3054 ldr r3, [pc, #84] ; 16ec 1694: e58dc000 str ip, [sp] 1698: eb001eeb bl 924c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 169c: e3500000 cmp r0, #0 16a0: 1a000004 bne 16b8 rtems_set_errno_and_return_minus_one( ENOMEM ); 16a4: eb00340e bl e6e4 <__errno> <== NOT EXECUTED 16a8: e3a0300c mov r3, #12 <== NOT EXECUTED 16ac: e5803000 str r3, [r0] 16b0: e3e00000 mvn r0, #0 16b4: ea00000a b 16e4 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 16b8: e59d3028 ldr r3, [sp, #40] ; 0x28 16bc: e1d323b4 ldrh r2, [r3, #52] ; 0x34 16c0: e2822001 add r2, r2, #1 16c4: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 16c8: e28d003c add r0, sp, #60 ; 0x3c 16cc: e3a01000 mov r1, #0 16d0: eb000227 bl 1f74 16d4: e59d203c ldr r2, [sp, #60] ; 0x3c 16d8: e59d3028 ldr r3, [sp, #40] ; 0x28 16dc: e5832048 str r2, [r3, #72] ; 0x48 16e0: e3a00000 mov r0, #0 return 0; } 16e4: e28dd048 add sp, sp, #72 ; 0x48 16e8: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000c654 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); c654: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { c658: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); c65c: 059f0060 ldreq r0, [pc, #96] ; c6c4 c660: 059f1060 ldreq r1, [pc, #96] ; c6c8 c664: 059f2060 ldreq r2, [pc, #96] ; c6cc c668: 059f3060 ldreq r3, [pc, #96] ; c6d0 c66c: 0a000006 beq c68c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c670: e593304c ldr r3, [r3, #76] ; 0x4c c674: e3530005 cmp r3, #5 c678: 0a000004 beq c690 c67c: e59f0040 ldr r0, [pc, #64] ; c6c4 <== NOT EXECUTED c680: e59f104c ldr r1, [pc, #76] ; c6d4 <== NOT EXECUTED c684: e59f2040 ldr r2, [pc, #64] ; c6cc <== NOT EXECUTED c688: e59f3048 ldr r3, [pc, #72] ; c6d8 <== NOT EXECUTED c68c: ebfff6c8 bl a1b4 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); c690: e3a02001 mov r2, #1 c694: ebfffeaf bl c158 if ( *block_entry_ptr ) c698: e5904000 ldr r4, [r0] c69c: e3540000 cmp r4, #0 assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); c6a0: e1a05000 mov r5, r0 if ( *block_entry_ptr ) c6a4: 13a00000 movne r0, #0 c6a8: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); c6ac: ebfffe9c bl c124 if ( !memory ) c6b0: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; c6b4: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) c6b8: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; c6bc: 11a00004 movne r0, r4 return 0; } c6c0: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000c6dc : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { c6dc: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); c6e0: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { c6e4: e1a05001 mov r5, r1 c6e8: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); c6ec: 059f0134 ldreq r0, [pc, #308] ; c828 c6f0: 059f1134 ldreq r1, [pc, #308] ; c82c c6f4: 059f2134 ldreq r2, [pc, #308] ; c830 c6f8: 059f3134 ldreq r3, [pc, #308] ; c834 c6fc: 0a000006 beq c71c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c700: e594304c ldr r3, [r4, #76] ; 0x4c c704: e3530005 cmp r3, #5 c708: 0a000004 beq c720 c70c: e59f0114 ldr r0, [pc, #276] ; c828 <== NOT EXECUTED c710: e59f1120 ldr r1, [pc, #288] ; c838 <== NOT EXECUTED c714: e59f2114 ldr r2, [pc, #276] ; c830 <== NOT EXECUTED c718: e59f311c ldr r3, [pc, #284] ; c83c <== NOT EXECUTED c71c: ebfff6a4 bl a1b4 <__assert_func> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) c720: e59f3118 ldr r3, [pc, #280] ; c840 c724: e593b000 ldr fp, [r3] c728: e1a0312b lsr r3, fp, #2 c72c: e2832001 add r2, r3, #1 c730: e0010293 mul r1, r3, r2 c734: e2811001 add r1, r1, #1 c738: e0020193 mul r2, r3, r1 c73c: e3a03000 mov r3, #0 c740: e1530006 cmp r3, r6 c744: e2422001 sub r2, r2, #1 c748: e003029b mul r3, fp, r2 c74c: ca000005 bgt c768 c750: 1a000001 bne c75c c754: e1530005 cmp r3, r5 c758: 8a000002 bhi c768 rtems_set_errno_and_return_minus_one( EINVAL ); c75c: eb0007e0 bl e6e4 <__errno> <== NOT EXECUTED c760: e3a03016 mov r3, #22 <== NOT EXECUTED c764: ea000025 b c800 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) c768: e5948054 ldr r8, [r4, #84] ; 0x54 c76c: e1560008 cmp r6, r8 c770: e5947050 ldr r7, [r4, #80] ; 0x50 c774: ca000002 bgt c784 c778: 1a000028 bne c820 c77c: e1550007 cmp r5, r7 c780: 9a000026 bls c820 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; c784: e1a0cfcb asr ip, fp, #31 c788: e1a0300c mov r3, ip c78c: e1a0200b mov r2, fp c790: e1a00005 mov r0, r5 c794: e1a01006 mov r1, r6 c798: e58dc000 str ip, [sp] c79c: eb00309b bl 18a10 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; c7a0: e59dc000 ldr ip, [sp] c7a4: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; c7a8: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; c7ac: e1a0200b mov r2, fp c7b0: e1a00007 mov r0, r7 c7b4: e1a0300c mov r3, ip c7b8: eb003094 bl 18a10 <__divdi3> c7bc: e1a08000 mov r8, r0 c7c0: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { c7c4: ea000011 b c810 if ( IMFS_memfile_addblock( the_jnode, block ) ) { c7c8: e1a00004 mov r0, r4 c7cc: e1a01007 mov r1, r7 c7d0: ebffff9f bl c654 c7d4: e3500000 cmp r0, #0 c7d8: 0a00000b beq c80c c7dc: ea000003 b c7f0 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); c7e0: e1a01007 mov r1, r7 <== NOT EXECUTED c7e4: e1a00004 mov r0, r4 <== NOT EXECUTED c7e8: ebfffefa bl c3d8 <== 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-- ) { c7ec: e2477001 sub r7, r7, #1 <== NOT EXECUTED c7f0: e1570008 cmp r7, r8 <== NOT EXECUTED c7f4: 2afffff9 bcs c7e0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); c7f8: eb0007b9 bl e6e4 <__errno> <== NOT EXECUTED c7fc: e3a0301c mov r3, #28 <== NOT EXECUTED c800: e5803000 str r3, [r0] <== NOT EXECUTED c804: e3e00000 mvn r0, #0 <== NOT EXECUTED c808: ea000005 b c824 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { c80c: e2877001 add r7, r7, #1 c810: e157000a cmp r7, sl c814: 9affffeb bls c7c8 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; c818: e5846054 str r6, [r4, #84] ; 0x54 c81c: e5845050 str r5, [r4, #80] ; 0x50 c820: e3a00000 mov r0, #0 return 0; } c824: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== 0000c158 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { c158: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); c15c: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { c160: e1a06001 mov r6, r1 c164: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); c168: 059f01d8 ldreq r0, [pc, #472] ; c348 c16c: 03a01fe2 moveq r1, #904 ; 0x388 c170: 059f21d4 ldreq r2, [pc, #468] ; c34c c174: 059f31d4 ldreq r3, [pc, #468] ; c350 c178: 0a000006 beq c198 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); c17c: e594304c ldr r3, [r4, #76] ; 0x4c c180: e3530005 cmp r3, #5 c184: 0a000004 beq c19c c188: e59f01b8 ldr r0, [pc, #440] ; c348 <== NOT EXECUTED c18c: e59f21b8 ldr r2, [pc, #440] ; c34c <== NOT EXECUTED c190: e59f31bc ldr r3, [pc, #444] ; c354 <== NOT EXECUTED c194: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED c198: ebfff805 bl a1b4 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { c19c: e59f31b4 ldr r3, [pc, #436] ; c358 c1a0: e5935000 ldr r5, [r3] c1a4: e1a05125 lsr r5, r5, #2 c1a8: e2453001 sub r3, r5, #1 c1ac: e1510003 cmp r1, r3 c1b0: 8a00000e bhi c1f0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { c1b4: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; c1b8: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { c1bc: 0a000007 beq c1e0 if ( !p ) { c1c0: e3500000 cmp r0, #0 c1c4: 1a000003 bne c1d8 p = memfile_alloc_block(); c1c8: ebffffd5 bl c124 if ( !p ) c1cc: e3500000 cmp r0, #0 c1d0: 0a00005a beq c340 return 0; info->indirect = p; c1d4: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; c1d8: e5940058 ldr r0, [r4, #88] ; 0x58 c1dc: ea000001 b c1e8 } if ( !p ) c1e0: e3500000 cmp r0, #0 c1e4: 0a000055 beq c340 return 0; return &info->indirect[ my_block ]; c1e8: e0800106 add r0, r0, r6, lsl #2 c1ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { c1f0: e2852001 add r2, r5, #1 <== NOT EXECUTED c1f4: e0030295 mul r3, r5, r2 <== NOT EXECUTED c1f8: e2432001 sub r2, r3, #1 <== NOT EXECUTED c1fc: e1510002 cmp r1, r2 <== NOT EXECUTED c200: 8a000015 bhi c25c <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; c204: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c208: e1a00006 mov r0, r6 <== NOT EXECUTED c20c: e1a01005 mov r1, r5 <== NOT EXECUTED c210: eb002f51 bl 17f5c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c214: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c218: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c21c: e1a00006 mov r0, r6 <== NOT EXECUTED c220: eb002eb9 bl 17d0c <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { c224: e3580000 cmp r8, #0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c228: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; c22c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { c230: 0a00003b beq c324 <== NOT EXECUTED if ( !p ) { c234: e3530000 cmp r3, #0 <== NOT EXECUTED c238: 1a000003 bne c24c <== NOT EXECUTED p = memfile_alloc_block(); c23c: ebffffb8 bl c124 <== NOT EXECUTED if ( !p ) c240: e2503000 subs r3, r0, #0 <== NOT EXECUTED c244: 0a00003d beq c340 <== NOT EXECUTED return 0; info->doubly_indirect = p; c248: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; c24c: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED c250: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { c254: e3500000 cmp r0, #0 <== NOT EXECUTED c258: ea000028 b c300 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { c25c: e2831001 add r1, r3, #1 <== NOT EXECUTED c260: e0020195 mul r2, r5, r1 <== NOT EXECUTED c264: e2422001 sub r2, r2, #1 <== NOT EXECUTED c268: e1560002 cmp r6, r2 <== NOT EXECUTED c26c: 8a000033 bhi c340 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; c270: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c274: e1a01005 mov r1, r5 <== NOT EXECUTED c278: e1a00006 mov r0, r6 <== NOT EXECUTED c27c: eb002f36 bl 17f5c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c280: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; c284: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; c288: e1a00006 mov r0, r6 <== NOT EXECUTED c28c: eb002e9e bl 17d0c <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; c290: 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; c294: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; c298: eb002e9b bl 17d0c <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; c29c: 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; c2a0: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; c2a4: e1a00006 mov r0, r6 <== NOT EXECUTED c2a8: eb002f2b bl 17f5c <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { c2ac: 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; c2b0: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; c2b4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { c2b8: 0a000016 beq c318 <== NOT EXECUTED if ( !p ) { c2bc: e3530000 cmp r3, #0 <== NOT EXECUTED c2c0: 1a000003 bne c2d4 <== NOT EXECUTED p = memfile_alloc_block(); c2c4: ebffff96 bl c124 <== NOT EXECUTED if ( !p ) c2c8: e2503000 subs r3, r0, #0 <== NOT EXECUTED c2cc: 0a00001b beq c340 <== NOT EXECUTED return 0; info->triply_indirect = p; c2d0: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; c2d4: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { c2d8: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; c2dc: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { c2e0: 1a000003 bne c2f4 <== NOT EXECUTED p1 = memfile_alloc_block(); c2e4: ebffff8e bl c124 <== NOT EXECUTED if ( !p1 ) c2e8: e2502000 subs r2, r0, #0 <== NOT EXECUTED c2ec: 0a000013 beq c340 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; c2f0: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; c2f4: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED c2f8: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { c2fc: e3500000 cmp r0, #0 <== NOT EXECUTED c300: 1a00000c bne c338 <== NOT EXECUTED p2 = memfile_alloc_block(); c304: ebffff86 bl c124 <== NOT EXECUTED if ( !p2 ) c308: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; c30c: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) c310: 1a000008 bne c338 <== NOT EXECUTED c314: ea000009 b c340 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) c318: e3530000 cmp r3, #0 <== NOT EXECUTED c31c: 0a000007 beq c340 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; c320: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) c324: e3530000 cmp r3, #0 <== NOT EXECUTED c328: 0a000004 beq c340 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; c32c: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) c330: e3500000 cmp r0, #0 <== NOT EXECUTED c334: 0a000001 beq c340 <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; c338: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED c33c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED c340: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } c344: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 0000cc64 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { cc64: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); cc68: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { cc6c: e24dd014 sub sp, sp, #20 cc70: e1a06003 mov r6, r3 cc74: e1a08001 mov r8, r1 cc78: e1a09002 mov r9, r2 cc7c: e59d7038 ldr r7, [sp, #56] ; 0x38 /* * Perform internal consistency checks */ assert( the_jnode ); cc80: 059f0268 ldreq r0, [pc, #616] ; cef0 cc84: 03a01f93 moveq r1, #588 ; 0x24c cc88: 059f2264 ldreq r2, [pc, #612] ; cef4 cc8c: 059f3264 ldreq r3, [pc, #612] ; cef8 cc90: 0a000007 beq ccb4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || cc94: e594304c ldr r3, [r4, #76] ; 0x4c cc98: e2432005 sub r2, r3, #5 cc9c: e3520001 cmp r2, #1 cca0: 9a000004 bls ccb8 cca4: e59f0244 ldr r0, [pc, #580] ; cef0 <== NOT EXECUTED cca8: e59f124c ldr r1, [pc, #588] ; cefc <== NOT EXECUTED ccac: e59f2240 ldr r2, [pc, #576] ; cef4 <== NOT EXECUTED ccb0: e59f3248 ldr r3, [pc, #584] ; cf00 <== NOT EXECUTED ccb4: ebfff53e bl a1b4 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); ccb8: e3560000 cmp r6, #0 ccbc: 059f022c ldreq r0, [pc, #556] ; cef0 ccc0: 059f123c ldreq r1, [pc, #572] ; cf04 ccc4: 059f2228 ldreq r2, [pc, #552] ; cef4 ccc8: 059f3238 ldreq r3, [pc, #568] ; cf08 cccc: 0afffff8 beq ccb4 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) ccd0: e3570000 cmp r7, #0 ccd4: 1a000004 bne ccec rtems_set_errno_and_return_minus_one( EINVAL ); ccd8: eb000681 bl e6e4 <__errno> <== NOT EXECUTED ccdc: e3a03016 mov r3, #22 <== NOT EXECUTED cce0: e5803000 str r3, [r0] <== NOT EXECUTED cce4: e3e07000 mvn r7, #0 <== NOT EXECUTED cce8: ea00007d b cee4 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { ccec: e3530006 cmp r3, #6 ccf0: 1a000012 bne cd40 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) ccf4: e2843050 add r3, r4, #80 ; 0x50 <== NOT EXECUTED ccf8: e893000c ldm r3, {r2, r3} <== NOT EXECUTED ccfc: e1a00002 mov r0, r2 <== NOT EXECUTED cd00: e1a01003 mov r1, r3 <== NOT EXECUTED cd04: e3a0c000 mov ip, #0 <== NOT EXECUTED cd08: e0500008 subs r0, r0, r8 <== NOT EXECUTED cd0c: e0c11009 sbc r1, r1, r9 <== NOT EXECUTED cd10: e15c0001 cmp ip, r1 <== NOT EXECUTED * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; cd14: e594c058 ldr ip, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) cd18: ca000002 bgt cd28 <== NOT EXECUTED cd1c: 1a000002 bne cd2c <== NOT EXECUTED cd20: e1570000 cmp r7, r0 <== NOT EXECUTED cd24: 9a000000 bls cd2c <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; cd28: e0687002 rsb r7, r8, r2 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); cd2c: e08c1008 add r1, ip, r8 <== NOT EXECUTED cd30: e1a00006 mov r0, r6 <== NOT EXECUTED cd34: e1a02007 mov r2, r7 <== NOT EXECUTED cd38: eb000877 bl ef1c <== NOT EXECUTED cd3c: ea000063 b ced0 <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) cd40: e5943054 ldr r3, [r4, #84] ; 0x54 cd44: e3a02000 mov r2, #0 cd48: e1520003 cmp r2, r3 cd4c: e5945050 ldr r5, [r4, #80] ; 0x50 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; cd50: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) cd54: e0872001 add r2, r7, r1 cd58: ca000004 bgt cd70 cd5c: 1a000001 bne cd68 cd60: e1520005 cmp r2, r5 cd64: 8a000001 bhi cd70 cd68: e1a05007 mov r5, r7 cd6c: ea000000 b cd74 my_length = the_jnode->info.file.size - start; cd70: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; cd74: e59f3190 ldr r3, [pc, #400] ; cf0c cd78: e593a000 ldr sl, [r3] cd7c: e1a0b00a mov fp, sl cd80: e1a0cfcb asr ip, fp, #31 cd84: e1a0300c mov r3, ip cd88: e1a00008 mov r0, r8 cd8c: e1a01009 mov r1, r9 cd90: e1a0200b mov r2, fp cd94: e58dc000 str ip, [sp] cd98: eb003046 bl 18eb8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; cd9c: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; cda0: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; cda4: e1a01009 mov r1, r9 cda8: e1a00008 mov r0, r8 cdac: e1a0200b mov r2, fp cdb0: e1a0300c mov r3, ip cdb4: eb002f15 bl 18a10 <__divdi3> if ( start_offset ) { cdb8: e3570000 cmp r7, #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; cdbc: e1a08000 mov r8, r0 if ( start_offset ) { cdc0: 058d6008 streq r6, [sp, #8] cdc4: 01a09007 moveq r9, r7 cdc8: 0a000013 beq ce1c 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 ); cdcc: e1a00004 mov r0, r4 cdd0: e1a01008 mov r1, r8 cdd4: e3a02000 mov r2, #0 cdd8: ebfffcde bl c158 assert( block_ptr ); cddc: e3500000 cmp r0, #0 cde0: 059f0108 ldreq r0, [pc, #264] ; cef0 cde4: 059f1124 ldreq r1, [pc, #292] ; cf10 cde8: 0a000030 beq ceb0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); cdec: e5901000 ldr r1, [r0] */ 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; cdf0: e067900a rsb r9, r7, sl cdf4: e1550009 cmp r5, r9 cdf8: 31a09005 movcc r9, r5 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); cdfc: e1a00006 mov r0, r6 ce00: e0811007 add r1, r1, r7 ce04: e1a02009 mov r2, r9 dest += to_copy; ce08: e0866009 add r6, r6, r9 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); ce0c: eb000842 bl ef1c dest += to_copy; ce10: e58d6008 str r6, [sp, #8] block++; ce14: e2888001 add r8, r8, #1 my_length -= to_copy; ce18: e0695005 rsb r5, r9, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ce1c: e59f30e8 ldr r3, [pc, #232] ; cf0c ce20: e3a06000 mov r6, #0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ce24: e1a0b003 mov fp, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ce28: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ce2c: ea00000e b ce6c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ce30: e1a00004 mov r0, r4 ce34: e1a01008 mov r1, r8 ce38: e3a02000 mov r2, #0 ce3c: ebfffcc5 bl c158 assert( block_ptr ); ce40: e2503000 subs r3, r0, #0 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ce44: e086600a add r6, r6, sl assert( block_ptr ); ce48: 059f00a0 ldreq r0, [pc, #160] ; cef0 ce4c: 059f10c0 ldreq r1, [pc, #192] ; cf14 ce50: 0a000016 beq ceb0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ce54: e59d0004 ldr r0, [sp, #4] ce58: e5931000 ldr r1, [r3] ce5c: e1a0200a mov r2, sl ce60: eb00082d bl ef1c dest += to_copy; block++; ce64: e2888001 add r8, r8, #1 my_length -= to_copy; ce68: e06a5005 rsb r5, sl, r5 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ce6c: e59b3000 ldr r3, [fp] ce70: e1550003 cmp r5, r3 * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( ce74: e59d3008 ldr r3, [sp, #8] ce78: e0833006 add r3, r3, r6 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; ce7c: e0867009 add r7, r6, r9 * are between the offset and the end of the file will result in * reading the data between offset and the end of the file (truncated * read). */ MEMFILE_STATIC ssize_t IMFS_memfile_read( ce80: e58d3004 str r3, [sp, #4] /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ce84: 2affffe9 bcs ce30 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { ce88: e3550000 cmp r5, #0 ce8c: 0a00000f beq ced0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ce90: e1a01008 mov r1, r8 ce94: e1a00004 mov r0, r4 ce98: e3a02000 mov r2, #0 ce9c: ebfffcad bl c158 assert( block_ptr ); cea0: e2503000 subs r3, r0, #0 cea4: 1a000004 bne cebc cea8: e59f0040 ldr r0, [pc, #64] ; cef0 <== NOT EXECUTED ceac: e59f1064 ldr r1, [pc, #100] ; cf18 <== NOT EXECUTED ceb0: e59f203c ldr r2, [pc, #60] ; cef4 <== NOT EXECUTED ceb4: e59f3060 ldr r3, [pc, #96] ; cf1c <== NOT EXECUTED ceb8: eaffff7d b ccb4 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); cebc: e59d0004 ldr r0, [sp, #4] cec0: e5931000 ldr r1, [r3] cec4: e1a02005 mov r2, r5 cec8: eb000813 bl ef1c copied += my_length; cecc: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); ced0: e28d000c add r0, sp, #12 ced4: e3a01000 mov r1, #0 ced8: ebffd425 bl 1f74 cedc: e59d300c ldr r3, [sp, #12] cee0: e5843040 str r3, [r4, #64] ; 0x40 return copied; } cee4: e1a00007 mov r0, r7 cee8: e28dd014 add sp, sp, #20 ceec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000c424 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { c424: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); c428: e2504000 subs r4, r0, #0 c42c: 059f012c ldreq r0, [pc, #300] ; c560 c430: 059f112c ldreq r1, [pc, #300] ; c564 c434: 059f212c ldreq r2, [pc, #300] ; c568 c438: 059f312c ldreq r3, [pc, #300] ; c56c c43c: 0a000006 beq c45c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c440: e594304c ldr r3, [r4, #76] ; 0x4c c444: e3530005 cmp r3, #5 c448: 0a000004 beq c460 c44c: e59f010c ldr r0, [pc, #268] ; c560 <== NOT EXECUTED c450: e59f1118 ldr r1, [pc, #280] ; c570 <== NOT EXECUTED c454: e59f210c ldr r2, [pc, #268] ; c568 <== NOT EXECUTED c458: e59f3114 ldr r3, [pc, #276] ; c574 <== NOT EXECUTED c45c: ebfff754 bl a1b4 <__assert_func> <== NOT EXECUTED /* * 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; c460: e59f2110 ldr r2, [pc, #272] ; c578 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c464: e5943058 ldr r3, [r4, #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; c468: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c46c: e3530000 cmp r3, #0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; c470: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); c474: 12840058 addne r0, r4, #88 ; 0x58 c478: 11a01005 movne r1, r5 c47c: 1bffffb6 blne c35c * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c480: e594305c ldr r3, [r4, #92] ; 0x5c c484: e3530000 cmp r3, #0 c488: 13a06000 movne r6, #0 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c490: 1a000008 bne c4b8 c494: ea00000d b c4d0 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { c498: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED c49c: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED c4a0: e3520000 cmp r2, #0 <== NOT EXECUTED c4a4: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( c4a8: 10830000 addne r0, r3, r0 <== NOT EXECUTED c4ac: 11a01005 movne r1, r5 <== NOT EXECUTED c4b0: 1bffffa9 blne c35c <== NOT EXECUTED 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 ); c4c4: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED c4c8: e1a01005 mov r1, r5 <== NOT EXECUTED c4cc: ebffffa2 bl c35c <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c4d0: e5943060 ldr r3, [r4, #96] ; 0x60 c4d4: e3530000 cmp r3, #0 c4d8: 13a06000 movne r6, #0 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c4e0: 1a000016 bne c540 c4e4: ea00001b b c558 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; c4e8: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED c4ec: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ c4f0: e3570000 cmp r7, #0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; c4f4: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ c4f8: 0a000013 beq c54c <== NOT EXECUTED c4fc: e3a08000 mov r8, #0 <== NOT EXECUTED c500: ea000006 b c520 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( c52c: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED c530: e1a01005 mov r1, r5 <== NOT EXECUTED c534: e0800009 add r0, r0, r9 <== NOT EXECUTED c538: ebffff87 bl c35c <== 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( c54c: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED c550: e1a01005 mov r1, r5 <== NOT EXECUTED c554: ebffff80 bl c35c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } c558: e3a00000 mov r0, #0 c55c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 0000c3d8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { c3d8: 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 ); c3dc: e3a02000 mov r2, #0 <== NOT EXECUTED c3e0: ebffff5c bl c158 <== NOT EXECUTED assert( block_ptr ); c3e4: e2503000 subs r3, r0, #0 <== NOT EXECUTED c3e8: 059f0024 ldreq r0, [pc, #36] ; c414 <== NOT EXECUTED c3ec: 059f1024 ldreq r1, [pc, #36] ; c418 <== NOT EXECUTED c3f0: 059f2024 ldreq r2, [pc, #36] ; c41c <== NOT EXECUTED c3f4: 059f3024 ldreq r3, [pc, #36] ; c420 <== NOT EXECUTED c3f8: 0bfff76d bleq a1b4 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; c3fc: e3a02000 mov r2, #0 <== NOT EXECUTED block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( block_ptr ) { ptr = *block_ptr; c400: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; c404: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); c408: ebffff3d bl c104 <== NOT EXECUTED } return 1; } c40c: e3a00001 mov r0, #1 <== NOT EXECUTED c410: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 0000c934 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { c934: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); c938: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { c93c: e1a08001 mov r8, r1 c940: e1a0a002 mov sl, r2 c944: e1a06003 mov r6, r3 c948: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); c94c: 059f0204 ldreq r0, [pc, #516] ; cb58 c950: 059f1204 ldreq r1, [pc, #516] ; cb5c c954: 059f2204 ldreq r2, [pc, #516] ; cb60 c958: 059f3204 ldreq r3, [pc, #516] ; cb64 c95c: 0a000006 beq c97c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); c960: e594304c ldr r3, [r4, #76] ; 0x4c c964: e3530005 cmp r3, #5 c968: 0a000004 beq c980 c96c: e59f01e4 ldr r0, [pc, #484] ; cb58 <== NOT EXECUTED c970: e59f11f0 ldr r1, [pc, #496] ; cb68 <== NOT EXECUTED c974: e59f21e4 ldr r2, [pc, #484] ; cb60 <== NOT EXECUTED c978: e59f31ec ldr r3, [pc, #492] ; cb6c <== NOT EXECUTED c97c: ebfff60c bl a1b4 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); c980: e3560000 cmp r6, #0 c984: 059f01cc ldreq r0, [pc, #460] ; cb58 c988: 059f11e0 ldreq r1, [pc, #480] ; cb70 c98c: 059f21cc ldreq r2, [pc, #460] ; cb60 c990: 059f31dc ldreq r3, [pc, #476] ; cb74 c994: 0afffff8 beq c97c /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) c998: e3550000 cmp r5, #0 c99c: 1a000002 bne c9ac rtems_set_errno_and_return_minus_one( EINVAL ); c9a0: eb00074f bl e6e4 <__errno> <== NOT EXECUTED c9a4: e3a03016 mov r3, #22 <== NOT EXECUTED c9a8: ea00000e b c9e8 <== NOT EXECUTED * 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 + length; if ( last_byte > the_jnode->info.file.size ) { c9ac: e5943054 ldr r3, [r4, #84] ; 0x54 c9b0: e3530000 cmp r3, #0 c9b4: e0851001 add r1, r5, r1 c9b8: ba000003 blt c9cc c9bc: 1a00000c bne c9f4 c9c0: e5943050 ldr r3, [r4, #80] ; 0x50 c9c4: e1530001 cmp r3, r1 c9c8: 2a000009 bcs c9f4 status = IMFS_memfile_extend( the_jnode, last_byte ); c9cc: e1a00004 mov r0, r4 c9d0: e3a02000 mov r2, #0 c9d4: ebffff40 bl c6dc if ( status ) c9d8: e3500000 cmp r0, #0 c9dc: 0a000004 beq c9f4 rtems_set_errno_and_return_minus_one( ENOSPC ); c9e0: eb00073f bl e6e4 <__errno> <== NOT EXECUTED c9e4: e3a0301c mov r3, #28 <== NOT EXECUTED c9e8: e5803000 str r3, [r0] <== NOT EXECUTED c9ec: e3e07000 mvn r7, #0 <== NOT EXECUTED c9f0: ea000056 b cb50 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; c9f4: e59f317c ldr r3, [pc, #380] ; cb78 c9f8: e5939000 ldr r9, [r3] c9fc: e1a0b009 mov fp, r9 ca00: e1a0cfcb asr ip, fp, #31 ca04: e1a0300c mov r3, ip ca08: e1a00008 mov r0, r8 ca0c: e1a0200b mov r2, fp ca10: e1a0100a mov r1, sl ca14: e58dc000 str ip, [sp] ca18: eb003126 bl 18eb8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ca1c: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ca20: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ca24: e1a0100a mov r1, sl ca28: e1a00008 mov r0, r8 ca2c: e1a0200b mov r2, fp ca30: e1a0300c mov r3, ip ca34: eb002ff5 bl 18a10 <__divdi3> if ( start_offset ) { ca38: e3570000 cmp r7, #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; ca3c: e1a08000 mov r8, r0 if ( start_offset ) { ca40: 0a000013 beq ca94 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 ); ca44: e1a01008 mov r1, r8 ca48: e1a00004 mov r0, r4 ca4c: e3a02000 mov r2, #0 ca50: ebfffdc0 bl c158 assert( block_ptr ); ca54: e3500000 cmp r0, #0 ca58: 059f00f8 ldreq r0, [pc, #248] ; cb58 ca5c: 03a01fc7 moveq r1, #796 ; 0x31c ca60: 0a00002c beq cb18 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ca64: e5900000 ldr r0, [r0] */ 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; ca68: e067a009 rsb sl, r7, r9 ca6c: e15a0005 cmp sl, r5 ca70: 21a0a005 movcs sl, r5 if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); ca74: e0800007 add r0, r0, r7 ca78: e1a01006 mov r1, r6 ca7c: e1a0200a mov r2, sl ca80: eb000925 bl ef1c src += to_copy; ca84: e086600a add r6, r6, sl block++; ca88: e2888001 add r8, r8, #1 my_length -= to_copy; ca8c: e06a5005 rsb r5, sl, r5 copied += to_copy; ca90: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ca94: e59f30dc ldr r3, [pc, #220] ; cb78 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ca98: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; ca9c: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { caa0: ea00000f b cae4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); caa4: e1a00004 mov r0, r4 caa8: e1a01008 mov r1, r8 caac: e3a02000 mov r2, #0 cab0: ebfffda8 bl c158 assert( block_ptr ); cab4: e3500000 cmp r0, #0 cab8: 059f0098 ldreq r0, [pc, #152] ; cb58 cabc: 03a01e33 moveq r1, #816 ; 0x330 cac0: 0a000014 beq cb18 if ( !block_ptr ) 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 ); cac4: e1a01006 mov r1, r6 cac8: e5900000 ldr r0, [r0] cacc: e1a0200a mov r2, sl cad0: eb000911 bl ef1c src += to_copy; cad4: e086600a add r6, r6, sl block++; cad8: e2888001 add r8, r8, #1 my_length -= to_copy; cadc: e06a5005 rsb r5, sl, r5 * * 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( cae0: e087700a add r7, r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { cae4: e5993000 ldr r3, [r9] cae8: e1550003 cmp r5, r3 caec: 2affffec bcs caa4 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { caf0: e3550000 cmp r5, #0 caf4: 0a00000f beq cb38 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); caf8: e1a01008 mov r1, r8 cafc: e1a00004 mov r0, r4 cb00: e3a02000 mov r2, #0 cb04: ebfffd93 bl c158 assert( block_ptr ); cb08: e3500000 cmp r0, #0 cb0c: 1a000004 bne cb24 cb10: e59f0040 ldr r0, [pc, #64] ; cb58 <== NOT EXECUTED cb14: e59f1060 ldr r1, [pc, #96] ; cb7c <== NOT EXECUTED cb18: e59f2040 ldr r2, [pc, #64] ; cb60 <== NOT EXECUTED cb1c: e59f305c ldr r3, [pc, #92] ; cb80 <== NOT EXECUTED cb20: eaffff95 b c97c <== NOT EXECUTED if ( !block_ptr ) 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 ); cb24: e5900000 ldr r0, [r0] cb28: e1a01006 mov r1, r6 cb2c: e1a02005 mov r2, r5 cb30: eb0008f9 bl ef1c my_length = 0; copied += to_copy; cb34: e0877005 add r7, r7, r5 } IMFS_mtime_ctime_update( the_jnode ); cb38: e28d0004 add r0, sp, #4 cb3c: e3a01000 mov r1, #0 cb40: ebffd50b bl 1f74 cb44: e59d3004 ldr r3, [sp, #4] cb48: e5843048 str r3, [r4, #72] ; 0x48 cb4c: e5843044 str r3, [r4, #68] ; 0x44 return copied; } cb50: e1a00007 mov r0, r7 cb54: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000016f0 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 16f0: e92d40f0 push {r4, r5, r6, r7, lr} 16f4: e24dd040 sub sp, sp, #64 ; 0x40 16f8: e1a04001 mov r4, r1 16fc: e1a07000 mov r7, r0 1700: e1a06002 mov r6, r2 1704: e1a05003 mov r5, r3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 1708: eb0037fa bl f6f8 170c: e28d303c add r3, sp, #60 ; 0x3c 1710: e1a01000 mov r1, r0 1714: e28d2004 add r2, sp, #4 1718: e1a00007 mov r0, r7 171c: eb002209 bl 9f48 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 1720: e2043a0f and r3, r4, #61440 ; 0xf000 1724: e3530901 cmp r3, #16384 ; 0x4000 1728: 0a00000e beq 1768 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 172c: e3530902 cmp r3, #32768 ; 0x8000 1730: 03a01005 moveq r1, #5 1734: 0a00000c beq 176c type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 1738: e3530a06 cmp r3, #24576 ; 0x6000 173c: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 1740: 058d6028 streq r6, [sp, #40] ; 0x28 1744: 058d502c streq r5, [sp, #44] ; 0x2c 1748: 03a01002 moveq r1, #2 */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 174c: 0a000006 beq 176c type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 1750: e3530a01 cmp r3, #4096 ; 0x1000 1754: 03a01007 moveq r1, #7 1758: 0a000003 beq 176c type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 175c: eb0033e0 bl e6e4 <__errno> <== NOT EXECUTED 1760: e3a03016 mov r3, #22 <== NOT EXECUTED 1764: ea00000b b 1798 <== NOT EXECUTED 1768: e3a01001 mov r1, #1 * 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( 176c: e28dc028 add ip, sp, #40 ; 0x28 1770: e59d0054 ldr r0, [sp, #84] ; 0x54 1774: e1a03004 mov r3, r4 1778: e28d2004 add r2, sp, #4 177c: e58dc000 str ip, [sp] 1780: eb001eb1 bl 924c new_name, mode, &info ); if ( !new_node ) 1784: e3500000 cmp r0, #0 1788: 13a00000 movne r0, #0 178c: 1a000003 bne 17a0 rtems_set_errno_and_return_minus_one( ENOMEM ); 1790: eb0033d3 bl e6e4 <__errno> <== NOT EXECUTED 1794: e3a0300c mov r3, #12 <== NOT EXECUTED 1798: e5803000 str r3, [r0] <== NOT EXECUTED 179c: e3e00000 mvn r0, #0 <== NOT EXECUTED return 0; } 17a0: e28dd040 add sp, sp, #64 ; 0x40 17a4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 000017a8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 17a8: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 17ac: e593204c ldr r2, [r3, #76] ; 0x4c 17b0: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 17b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 17b8: 0a000004 beq 17d0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 17bc: eb0033c8 bl e6e4 <__errno> <== NOT EXECUTED 17c0: e3a03014 mov r3, #20 <== NOT EXECUTED 17c4: e5803000 str r3, [r0] <== NOT EXECUTED 17c8: e3e00000 mvn r0, #0 <== NOT EXECUTED 17cc: 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; 17d0: e583005c str r0, [r3, #92] ; 0x5c 17d4: e3a00000 mov r0, #0 return 0; } 17d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00003cc0 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 3cc0: e92d4030 push {r4, r5, lr} assert( the_jnode ); 3cc4: e2504000 subs r4, r0, #0 3cc8: 059f0130 ldreq r0, [pc, #304] ; 3e00 3ccc: 03a01038 moveq r1, #56 ; 0x38 3cd0: 059f212c ldreq r2, [pc, #300] ; 3e04 3cd4: 059f312c ldreq r3, [pc, #300] ; 3e08 3cd8: 0a00002f beq 3d9c fprintf(stdout, "%s", the_jnode->name ); 3cdc: e59f5128 ldr r5, [pc, #296] ; 3e0c 3ce0: e5953000 ldr r3, [r5] 3ce4: e284000c add r0, r4, #12 3ce8: e5931008 ldr r1, [r3, #8] 3cec: eb003c0d bl 12d28 switch( the_jnode->type ) { 3cf0: e594204c ldr r2, [r4, #76] ; 0x4c 3cf4: e2423001 sub r3, r2, #1 3cf8: e3530006 cmp r3, #6 3cfc: 979ff103 ldrls pc, [pc, r3, lsl #2] 3d00: ea000034 b 3dd8 <== NOT EXECUTED 3d04: 00003d20 .word 0x00003d20 <== NOT EXECUTED 3d08: 00003d34 .word 0x00003d34 <== NOT EXECUTED 3d0c: 00003d7c .word 0x00003d7c <== NOT EXECUTED 3d10: 00003da0 .word 0x00003da0 <== NOT EXECUTED 3d14: 00003d64 .word 0x00003d64 <== NOT EXECUTED 3d18: 00003d48 .word 0x00003d48 <== NOT EXECUTED 3d1c: 00003dbc .word 0x00003dbc <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 3d20: e5953000 ldr r3, [r5] 3d24: e3a0002f mov r0, #47 ; 0x2f 3d28: e5931008 ldr r1, [r3, #8] 3d2c: eb003bb8 bl 12c14 break; 3d30: ea00002f b 3df4 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 3d34: e5952000 ldr r2, [r5] 3d38: e5943054 ldr r3, [r4, #84] ; 0x54 3d3c: e5920008 ldr r0, [r2, #8] 3d40: e59f10c8 ldr r1, [pc, #200] ; 3e10 3d44: ea000003 b 3d58 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 3d48: e5952000 ldr r2, [r5] <== NOT EXECUTED 3d4c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3d50: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 3d54: e59f10b8 ldr r1, [pc, #184] ; 3e14 <== NOT EXECUTED 3d58: e5942050 ldr r2, [r4, #80] ; 0x50 3d5c: eb003b90 bl 12ba4 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 3d60: ea000023 b 3df4 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 3d64: e5953000 ldr r3, [r5] 3d68: e5942050 ldr r2, [r4, #80] ; 0x50 3d6c: e5930008 ldr r0, [r3, #8] 3d70: e59f10a0 ldr r1, [pc, #160] ; 3e18 3d74: eb003b8a bl 12ba4 (uint32_t)the_jnode->info.file.size ); #endif break; 3d78: ea00001d b 3df4 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 3d7c: e5953000 ldr r3, [r5] <== NOT EXECUTED 3d80: e59f0094 ldr r0, [pc, #148] ; 3e1c <== NOT EXECUTED 3d84: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 3d88: eb003be6 bl 12d28 <== NOT EXECUTED assert(0); 3d8c: e59f006c ldr r0, [pc, #108] ; 3e00 <== NOT EXECUTED 3d90: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 3d94: e59f2068 ldr r2, [pc, #104] ; 3e04 <== NOT EXECUTED 3d98: e59f3080 ldr r3, [pc, #128] ; 3e20 <== NOT EXECUTED 3d9c: eb000249 bl 46c8 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3da0: e5953000 ldr r3, [r5] <== NOT EXECUTED 3da4: e59f0070 ldr r0, [pc, #112] ; 3e1c <== NOT EXECUTED 3da8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 3dac: eb003bdd bl 12d28 <== NOT EXECUTED assert(0); 3db0: e59f0048 ldr r0, [pc, #72] ; 3e00 <== NOT EXECUTED 3db4: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 3db8: eafffff5 b 3d94 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 3dbc: e5953000 ldr r3, [r5] <== NOT EXECUTED 3dc0: e59f005c ldr r0, [pc, #92] ; 3e24 <== NOT EXECUTED 3dc4: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 3dc8: eb003bd6 bl 12d28 <== NOT EXECUTED assert(0); 3dcc: e59f002c ldr r0, [pc, #44] ; 3e00 <== NOT EXECUTED 3dd0: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 3dd4: eaffffee b 3d94 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 3dd8: e5953000 ldr r3, [r5] <== NOT EXECUTED 3ddc: e59f1044 ldr r1, [pc, #68] ; 3e28 <== NOT EXECUTED 3de0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3de4: eb003b6e bl 12ba4 <== NOT EXECUTED assert(0); 3de8: e59f0010 ldr r0, [pc, #16] ; 3e00 <== NOT EXECUTED 3dec: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 3df0: eaffffe7 b 3d94 <== NOT EXECUTED break; } puts(""); 3df4: e59f0030 ldr r0, [pc, #48] ; 3e2c } 3df8: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 3dfc: ea004297 b 14860 =============================================================================== 000017e8 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 17e8: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 17ec: e593004c ldr r0, [r3, #76] ; 0x4c 17f0: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 17f4: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 17f8: 03a00000 moveq r0, #0 17fc: 0a000006 beq 181c rtems_set_errno_and_return_minus_one( EINVAL ); 1800: eb0033b7 bl e6e4 <__errno> <== NOT EXECUTED 1804: e3a03016 mov r3, #22 <== NOT EXECUTED 1808: e5803000 str r3, [r0] <== NOT EXECUTED 180c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1810: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 1814: e7c1c000 strb ip, [r1, r0] node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 1818: e2800001 add r0, r0, #1 181c: e1500002 cmp r0, r2 1820: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 1824: e593c050 ldr ip, [r3, #80] ; 0x50 1828: e7dcc000 ldrb ip, [ip, r0] 182c: e35c0000 cmp ip, #0 1830: 1afffff7 bne 1814 buf[i] = node->info.sym_link.name[i]; return i; } 1834: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000a0c4 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a0c4: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { a0c8: e593204c ldr r2, [r3, #76] ; 0x4c a0cc: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a0d0: e92d4810 push {r4, fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a0d4: e3520005 cmp r2, #5 a0d8: 979ff102 ldrls pc, [pc, r2, lsl #2] a0dc: ea000012 b a12c <== NOT EXECUTED a0e0: 0000a0f8 .word 0x0000a0f8 <== NOT EXECUTED a0e4: 0000a12c .word 0x0000a12c <== NOT EXECUTED a0e8: 0000a118 .word 0x0000a118 <== NOT EXECUTED a0ec: 0000a10c .word 0x0000a10c <== NOT EXECUTED a0f0: 0000a10c .word 0x0000a10c <== NOT EXECUTED a0f4: 0000a118 .word 0x0000a118 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); a0f8: e2832050 add r2, r3, #80 ; 0x50 a0fc: e8921004 ldm r2, {r2, ip} a100: e581c01c str ip, [r1, #28] a104: e5812018 str r2, [r1, #24] break; a108: ea00000c b a140 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; a10c: e283c050 add ip, r3, #80 ; 0x50 a110: e89c1800 ldm ip, {fp, ip} a114: ea000001 b a120 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a118: e3a0b000 mov fp, #0 <== NOT EXECUTED a11c: e3a0c000 mov ip, #0 <== NOT EXECUTED a120: e581b020 str fp, [r1, #32] a124: e581c024 str ip, [r1, #36] ; 0x24 break; a128: ea000004 b a140 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a12c: eb00116c bl e6e4 <__errno> <== NOT EXECUTED a130: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a134: e5803000 str r3, [r0] <== NOT EXECUTED a138: e3e00000 mvn r0, #0 <== NOT EXECUTED a13c: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED */ 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; a140: e5932030 ldr r2, [r3, #48] ; 0x30 a144: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; a148: e5932038 ldr r2, [r3, #56] ; 0x38 a14c: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; a150: e5932040 ldr r2, [r3, #64] ; 0x40 a154: e5812028 str r2, [r1, #40] ; 0x28 * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a158: e5902010 ldr r2, [r0, #16] 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; a15c: e5930044 ldr r0, [r3, #68] ; 0x44 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; buf->st_nlink = the_jnode->st_nlink; a160: e1d343b4 ldrh r4, [r3, #52] ; 0x34 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; a164: e5810030 str r0, [r1, #48] ; 0x30 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; buf->st_nlink = the_jnode->st_nlink; a168: e1c141b0 strh r4, [r1, #16] * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a16c: e5920034 ldr r0, [r2, #52] ; 0x34 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; buf->st_ctime = the_jnode->stat_ctime; a170: e5932048 ldr r2, [r3, #72] ; 0x48 buf->st_blksize = imfs_rq_memfile_bytes_per_block; a174: e59fc030 ldr ip, [pc, #48] ; a1ac 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; buf->st_ctime = the_jnode->stat_ctime; a178: e5812038 str r2, [r1, #56] ; 0x38 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; a17c: e1d323bc ldrh r2, [r3, #60] ; 0x3c buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; a180: e59cc000 ldr ip, [ip] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; a184: e1c121b2 strh r2, [r1, #18] * 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 = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a188: e5900000 ldr r0, [r0] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; a18c: e581c040 str ip, [r1, #64] ; 0x40 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; a190: e1d333be ldrh r3, [r3, #62] ; 0x3e /* * 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 = a194: e59fc014 ldr ip, [pc, #20] ; a1b0 a198: e5810004 str r0, [r1, #4] a19c: e581c000 str ip, [r1] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; a1a0: e1c131b4 strh r3, [r1, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; buf->st_blksize = imfs_rq_memfile_bytes_per_block; a1a4: e3a00000 mov r0, #0 return 0; } a1a8: e8bd8810 pop {r4, fp, pc} =============================================================================== 00001894 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1894: e92d40f0 push {r4, r5, r6, r7, lr} 1898: e1a05000 mov r5, r0 189c: 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 ); 18a0: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 18a4: e1a07002 mov r7, r2 18a8: e1a06001 mov r6, r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 18ac: eb003791 bl f6f8 18b0: e28d4004 add r4, sp, #4 18b4: e1a01000 mov r1, r0 18b8: e1a02004 mov r2, r4 18bc: e28d303c add r3, sp, #60 ; 0x3c 18c0: e1a00007 mov r0, r7 18c4: eb00219f bl 9f48 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 18c8: e1a00006 mov r0, r6 18cc: eb003775 bl f6a8 if (info.sym_link.name == NULL) { 18d0: 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); 18d4: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 18d8: 0a00000b beq 190c * 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( 18dc: e28dc028 add ip, sp, #40 ; 0x28 18e0: e1a00005 mov r0, r5 18e4: e1a02004 mov r2, r4 18e8: e3a01004 mov r1, #4 18ec: e59f3030 ldr r3, [pc, #48] ; 1924 18f0: e58dc000 str ip, [sp] 18f4: eb001e54 bl 924c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 18f8: e3500000 cmp r0, #0 18fc: 13a00000 movne r0, #0 1900: 1a000005 bne 191c free(info.sym_link.name); 1904: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 1908: eb000170 bl 1ed0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 190c: eb003374 bl e6e4 <__errno> <== NOT EXECUTED 1910: e3a0300c mov r3, #12 <== NOT EXECUTED 1914: e5803000 str r3, [r0] <== NOT EXECUTED 1918: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 191c: e28dd040 add sp, sp, #64 ; 0x40 1920: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00001928 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1928: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 192c: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1930: e595304c ldr r3, [r5, #76] ; 0x4c 1934: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1938: e24dd01c sub sp, sp, #28 193c: e1a04001 mov r4, r1 1940: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1944: 1a000025 bne 19e0 if ( !node->info.hard_link.link_node ) 1948: e595e050 ldr lr, [r5, #80] ; 0x50 194c: e35e0000 cmp lr, #0 1950: 1a000003 bne 1964 rtems_set_errno_and_return_minus_one( EINVAL ); 1954: eb003362 bl e6e4 <__errno> <== NOT EXECUTED 1958: e3a03016 mov r3, #22 <== NOT EXECUTED 195c: e5803000 str r3, [r0] <== NOT EXECUTED 1960: ea000014 b 19b8 <== NOT EXECUTED the_link = *loc; 1964: e1a07001 mov r7, r1 1968: e8b7000f ldm r7!, {r0, r1, r2, r3} 196c: e1a0c00d mov ip, sp 1970: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 1974: e28d801c add r8, sp, #28 1978: e528e01c str lr, [r8, #-28]! if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 197c: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1980: e1a0000d mov r0, sp if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 1984: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1988: eb001e7e bl 9388 /* * 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) 198c: e5953050 ldr r3, [r5, #80] ; 0x50 1990: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1994: e3520001 cmp r2, #1 1998: 1a000008 bne 19c0 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 199c: e1a0100d mov r1, sp 19a0: e1a00006 mov r0, r6 19a4: e59d3008 ldr r3, [sp, #8] 19a8: e1a0e00f mov lr, pc 19ac: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 19b0: e3500000 cmp r0, #0 19b4: 0a000009 beq 19e0 19b8: e3e00000 mvn r0, #0 19bc: ea00000c b 19f4 return -1; } else { node->info.hard_link.link_node->st_nlink --; 19c0: e2422001 sub r2, r2, #1 19c4: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 19c8: e28d0014 add r0, sp, #20 19cc: e3a01000 mov r1, #0 19d0: eb000167 bl 1f74 19d4: e5953050 ldr r3, [r5, #80] ; 0x50 19d8: e59d2014 ldr r2, [sp, #20] 19dc: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 19e0: e1a00006 mov r0, r6 19e4: e1a01004 mov r1, r4 19e8: e5943008 ldr r3, [r4, #8] 19ec: e1a0e00f mov lr, pc 19f0: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 19f4: e28dd01c add sp, sp, #28 19f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000019fc : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 19fc: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1a00: e593204c ldr r2, [r3, #76] ; 0x4c 1a04: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1a08: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1a0c: 0a000002 beq 1a1c rtems_set_errno_and_return_minus_one( ENOTDIR ); 1a10: eb003333 bl e6e4 <__errno> <== NOT EXECUTED 1a14: e3a03014 mov r3, #20 <== NOT EXECUTED 1a18: ea000004 b 1a30 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 1a1c: e593205c ldr r2, [r3, #92] ; 0x5c 1a20: e3520000 cmp r2, #0 1a24: 1a000004 bne 1a3c rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 1a28: eb00332d bl e6e4 <__errno> <== NOT EXECUTED 1a2c: e3a03016 mov r3, #22 <== NOT EXECUTED 1a30: e5803000 str r3, [r0] <== NOT EXECUTED 1a34: e3e00000 mvn r0, #0 <== NOT EXECUTED 1a38: 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; 1a3c: e3a00000 mov r0, #0 1a40: e583005c str r0, [r3, #92] ; 0x5c return 0; } 1a44: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00002118 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 2118: e59f30c8 ldr r3, [pc, #200] ; 21e8 211c: e5933000 ldr r3, [r3] 2120: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 2124: e92d4070 push {r4, r5, r6, lr} 2128: e1a04000 mov r4, r0 212c: e1a05001 mov r5, r1 2130: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 2134: 11a0e00f movne lr, pc 2138: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 213c: ebffffe1 bl 20c8 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 2140: e59f30a4 ldr r3, [pc, #164] ; 21ec 2144: e5933000 ldr r3, [r3] 2148: e3530000 cmp r3, #0 214c: 0a000006 beq 216c void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 2150: e1a00004 mov r0, r4 <== NOT EXECUTED 2154: e1a01006 mov r1, r6 <== NOT EXECUTED 2158: e1a0e00f mov lr, pc <== NOT EXECUTED 215c: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 2160: e0845005 add r5, r4, r5 <== NOT EXECUTED 2164: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 2168: e1a04000 mov r4, r0 <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 216c: e59f307c ldr r3, [pc, #124] ; 21f0 2170: e5d31000 ldrb r1, [r3] 2174: e3510000 cmp r1, #0 2178: 1a000005 bne 2194 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 217c: e59f3070 ldr r3, [pc, #112] ; 21f4 2180: e5d33028 ldrb r3, [r3, #40] ; 0x28 2184: e3530000 cmp r3, #0 ) { memset( heap_begin, 0, heap_size ); 2188: 11a00004 movne r0, r4 218c: 11a02005 movne r2, r5 2190: 1b00339d blne f00c * Unfortunately we cannot use assert if this fails because if this * has failed we do not have a heap and if we do not have a heap * STDIO cannot work because there will be no buffers. */ if ( !rtems_unified_work_area ) { 2194: e59f3054 ldr r3, [pc, #84] ; 21f0 2198: e5d33000 ldrb r3, [r3] 219c: e3530000 cmp r3, #0 21a0: 1a000008 bne 21c8 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 21a4: e59f304c ldr r3, [pc, #76] ; 21f8 21a8: e1a01004 mov r1, r4 21ac: e5930000 ldr r0, [r3] 21b0: e1a02005 mov r2, r5 21b4: e3a03004 mov r3, #4 21b8: eb000f84 bl 5fd0 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 21bc: e3500000 cmp r0, #0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 21c0: 0280001a addeq r0, r0, #26 21c4: 0b000d78 bleq 57ac } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 21c8: e59f3028 ldr r3, [pc, #40] ; 21f8 21cc: e59f4028 ldr r4, [pc, #40] ; 21fc 21d0: e5930000 ldr r0, [r3] 21d4: e5945000 ldr r5, [r4] 21d8: eb00125d bl 6b54 <_Protected_heap_Get_size> 21dc: e0800005 add r0, r0, r5 21e0: e5840000 str r0, [r4] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 21e4: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00005bfc : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 5bfc: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}<== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 5c00: e250a000 subs sl, r0, #0 <== NOT EXECUTED 5c04: 0a000043 beq 5d18 <== NOT EXECUTED return; if ( !print_handler ) 5c08: e59f310c ldr r3, [pc, #268] ; 5d1c <== NOT EXECUTED 5c0c: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 5c10: e3570000 cmp r7, #0 <== NOT EXECUTED 5c14: 0a00003f beq 5d18 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 5c18: e37a0001 cmn sl, #1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 5c1c: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 5c20: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 5c24: 1a000005 bne 5c40 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 5c28: e59f40f0 ldr r4, [pc, #240] ; 5d20 <== NOT EXECUTED 5c2c: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 5c30: e3530000 cmp r3, #0 <== NOT EXECUTED 5c34: 13a06000 movne r6, #0 <== NOT EXECUTED 5c38: 11a0a006 movne sl, r6 <== NOT EXECUTED 5c3c: 0a000035 beq 5d18 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 5c40: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 5c44: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 5c48: e2455010 sub r5, r5, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 5c4c: e1a00009 mov r0, r9 <== NOT EXECUTED 5c50: e1a01005 mov r1, r5 <== NOT EXECUTED 5c54: ebffffda bl 5bc4 <== NOT EXECUTED if ( high_water_mark ) 5c58: e2508000 subs r8, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 5c5c: 10899005 addne r9, r9, r5 <== NOT EXECUTED 5c60: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 5c64: e35a0000 cmp sl, #0 <== NOT EXECUTED 5c68: e59f30ac ldr r3, [pc, #172] ; 5d1c <== NOT EXECUTED 5c6c: 0a00000c beq 5ca4 <== NOT EXECUTED (*print_handler)( 5c70: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 5c74: e28d2008 add r2, sp, #8 <== NOT EXECUTED 5c78: e1a0000a mov r0, sl <== NOT EXECUTED 5c7c: e3a01005 mov r1, #5 <== NOT EXECUTED 5c80: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 5c84: eb001663 bl b618 <== NOT EXECUTED 5c88: e1a0200a mov r2, sl <== NOT EXECUTED 5c8c: e1a03000 mov r3, r0 <== NOT EXECUTED 5c90: e59f108c ldr r1, [pc, #140] ; 5d24 <== NOT EXECUTED 5c94: e1a00009 mov r0, r9 <== NOT EXECUTED 5c98: e1a0e00f mov lr, pc <== NOT EXECUTED 5c9c: e12fff17 bx r7 <== NOT EXECUTED 5ca0: ea000004 b 5cb8 <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 5ca4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 5ca8: e59f1078 ldr r1, [pc, #120] ; 5d28 <== NOT EXECUTED 5cac: e3e02000 mvn r2, #0 <== NOT EXECUTED 5cb0: e1a0e00f mov lr, pc <== NOT EXECUTED 5cb4: e12fff17 bx r7 <== NOT EXECUTED } (*print_handler)( 5cb8: e5943000 ldr r3, [r4] <== NOT EXECUTED 5cbc: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 5cc0: e59f4054 ldr r4, [pc, #84] ; 5d1c <== NOT EXECUTED 5cc4: e58d6000 str r6, [sp] <== NOT EXECUTED 5cc8: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 5ccc: e2433001 sub r3, r3, #1 <== NOT EXECUTED 5cd0: e0823003 add r3, r2, r3 <== NOT EXECUTED 5cd4: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 5cd8: e59f104c ldr r1, [pc, #76] ; 5d2c <== NOT EXECUTED 5cdc: e1a0e00f mov lr, pc <== NOT EXECUTED 5ce0: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 5ce4: e5943000 ldr r3, [r4] <== NOT EXECUTED 5ce8: e3530000 cmp r3, #0 <== NOT EXECUTED 5cec: 1a000004 bne 5d04 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 5cf0: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 5cf4: e59f1034 ldr r1, [pc, #52] ; 5d30 <== NOT EXECUTED 5cf8: e1a0e00f mov lr, pc <== NOT EXECUTED 5cfc: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 5d00: ea000004 b 5d18 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 5d04: e1a02008 mov r2, r8 <== NOT EXECUTED 5d08: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 5d0c: e59f1020 ldr r1, [pc, #32] ; 5d34 <== NOT EXECUTED 5d10: e1a0e00f mov lr, pc <== NOT EXECUTED 5d14: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED } } 5d18: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED =============================================================================== 00005bc4 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 5bc4: e2800010 add r0, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 5bc8: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 5bcc: e0801001 add r1, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 5bd0: e59f3020 ldr r3, [pc, #32] ; 5bf8 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 5bd4: ea000003 b 5be8 <== NOT EXECUTED if (*base != U32_PATTERN) 5bd8: e5902000 ldr r2, [r0] <== NOT EXECUTED 5bdc: e1520003 cmp r2, r3 <== NOT EXECUTED 5be0: 112fff1e bxne lr <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 5be4: e2800004 add r0, r0, #4 <== NOT EXECUTED 5be8: e1500001 cmp r0, r1 <== NOT EXECUTED 5bec: 3afffff9 bcc 5bd8 <== NOT EXECUTED 5bf0: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 5bf4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0003da28 : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3da28: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 3da2c: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3da30: e24dd01c sub sp, sp, #28 <== NOT EXECUTED 3da34: e58d1008 str r1, [sp, #8] <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 3da38: e5c26000 strb r6, [r2] <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 3da3c: e28d1018 add r1, sp, #24 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3da40: e58d200c str r2, [sp, #12] <== NOT EXECUTED 3da44: e1a04003 mov r4, r3 <== NOT EXECUTED 3da48: e1a05000 mov r5, r0 <== NOT EXECUTED *found = false; /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 3da4c: ebffff07 bl 3d670 <== NOT EXECUTED if (rc > 0) 3da50: e3500000 cmp r0, #0 <== NOT EXECUTED 3da54: ca000075 bgt 3dc30 <== NOT EXECUTED return rc; /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; 3da58: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 3da5c: e5903000 ldr r3, [r0] <== NOT EXECUTED end_bit = test_bit + (window * direction); if (end_bit < 0) 3da60: e093c584 adds ip, r3, r4, lsl #11 <== NOT EXECUTED 3da64: 41a0c006 movmi ip, r6 <== NOT EXECUTED 3da68: 4a000002 bmi 3da78 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 3da6c: e595200c ldr r2, [r5, #12] <== NOT EXECUTED 3da70: e15c0002 cmp ip, r2 <== NOT EXECUTED end_bit = control->size - 1; 3da74: 2242c001 subcs ip, r2, #1 <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 3da78: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED map_bits = &map[map_index]; 3da7c: e59d7018 ldr r7, [sp, #24] <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3da80: e1a09104 lsl r9, r4, #2 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3da84: e1a0b284 lsl fp, r4, #5 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 3da88: e1a00fa4 lsr r0, r4, #31 <== NOT EXECUTED if (end_bit < 0) end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); 3da8c: e1a062c3 asr r6, r3, #5 <== NOT EXECUTED map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 3da90: e1a08543 asr r8, r3, #10 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3da94: e58d9004 str r9, [sp, #4] <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3da98: e58db014 str fp, [sp, #20] <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 3da9c: e58d0010 str r0, [sp, #16] <== NOT EXECUTED map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); search_bits = &control->search_bits[search_index]; 3daa0: e0828108 add r8, r2, r8, lsl #2 <== NOT EXECUTED map_bits = &map[map_index]; 3daa4: e0877106 add r7, r7, r6, lsl #2 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) end_bit = control->size - 1; map_index = rtems_rfs_bitmap_map_index (test_bit); map_offset = rtems_rfs_bitmap_map_offset (test_bit); 3daa8: e203101f and r1, r3, #31 <== NOT EXECUTED search_index = rtems_rfs_bitmap_map_index (map_index); search_offset = rtems_rfs_bitmap_map_offset (map_index); 3daac: e206201f and r2, r6, #31 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 3dab0: e1a0a005 mov sl, r5 <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 3dab4: e5980000 ldr r0, [r8] <== NOT EXECUTED 3dab8: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3dabc: 10865004 addne r5, r6, r4 <== NOT EXECUTED 3dac0: 11a05285 lslne r5, r5, #5 <== NOT EXECUTED /* * If any bit is clear find that bit and then search the map element. If * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 3dac4: 1a000038 bne 3dbac <== NOT EXECUTED 3dac8: ea00003a b 3dbb8 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 3dacc: e3a09001 mov r9, #1 <== NOT EXECUTED 3dad0: e1a09219 lsl r9, r9, r2 <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 3dad4: e1190000 tst r9, r0 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 3dad8: e58d9000 str r9, [sp] <== NOT EXECUTED if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) && (search_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*search_bits, search_offset)) 3dadc: 1a00001d bne 3db58 <== NOT EXECUTED 3dae0: ea00001e b 3db60 <== NOT EXECUTED */ static bool rtems_rfs_bitmap_test (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_bit bit) { return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 3dae4: e3a0b001 mov fp, #1 <== NOT EXECUTED 3dae8: e1a0911b lsl r9, fp, r1 <== NOT EXECUTED * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) 3daec: e597b000 ldr fp, [r7] <== NOT EXECUTED 3daf0: e119000b tst r9, fp <== NOT EXECUTED 3daf4: 0a000013 beq 3db48 <== NOT EXECUTED */ static rtems_rfs_bitmap_element rtems_rfs_bitmap_set (rtems_rfs_bitmap_element target, rtems_rfs_bitmap_element bits) { return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 3daf8: e1cb9009 bic r9, fp, r9 <== NOT EXECUTED while ((map_offset >= 0) && (map_offset < rtems_rfs_bitmap_element_bits ())) { if (!rtems_rfs_bitmap_test (*map_bits, map_offset)) { *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); 3dafc: e5879000 str r9, [r7] <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, 3db00: e3590000 cmp r9, #0 <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 3db04: 05982000 ldreq r2, [r8] <== NOT EXECUTED 3db08: 059d0000 ldreq r0, [sp] <== NOT EXECUTED 3db0c: 01c22000 biceq r2, r2, r0 <== NOT EXECUTED 3db10: 05882000 streq r2, [r8] <== NOT EXECUTED 1 << search_offset); control->free--; 3db14: e59a0010 ldr r0, [sl, #16] <== NOT EXECUTED *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 3db18: e59a1000 ldr r1, [sl] <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; 3db1c: e28d9008 add r9, sp, #8 <== NOT EXECUTED 3db20: e8990a00 ldm r9, {r9, fp} <== NOT EXECUTED *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; 3db24: e2400001 sub r0, r0, #1 <== NOT EXECUTED *bit = test_bit; *found = true; 3db28: e3a02001 mov r2, #1 <== NOT EXECUTED *map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset); if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; 3db2c: e58a0010 str r0, [sl, #16] <== NOT EXECUTED *bit = test_bit; *found = true; 3db30: e5cb2000 strb r2, [fp] <== NOT EXECUTED 3db34: e1a0500a mov r5, sl <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 1 << search_offset); control->free--; *bit = test_bit; 3db38: e5893000 str r3, [r9] <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 3db3c: e5c12000 strb r2, [r1] <== NOT EXECUTED 3db40: e3a00000 mov r0, #0 <== NOT EXECUTED 3db44: ea000039 b 3dc30 <== NOT EXECUTED return 0; } if (test_bit == end_bit) 3db48: e153000c cmp r3, ip <== NOT EXECUTED 3db4c: 0a000003 beq 3db60 <== NOT EXECUTED 3db50: e0811004 add r1, r1, r4 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3db54: e0833004 add r3, r3, r4 <== NOT EXECUTED { /* * Find the clear bit in the map. Update the search map and map if * found. We may find none are spare if searching up from the seed. */ while ((map_offset >= 0) 3db58: e351001f cmp r1, #31 <== NOT EXECUTED 3db5c: 9affffe0 bls 3dae4 <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 3db60: e3540000 cmp r4, #0 <== NOT EXECUTED 3db64: d3a0101f movle r1, #31 <== NOT EXECUTED 3db68: c3a01000 movgt r1, #0 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 3db6c: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; 3db70: e0813005 add r3, r1, r5 <== NOT EXECUTED search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 3db74: e153000c cmp r3, ip <== NOT EXECUTED 3db78: c3a09000 movgt r9, #0 <== NOT EXECUTED 3db7c: d2099001 andle r9, r9, #1 <== NOT EXECUTED 3db80: e3590000 cmp r9, #0 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3db84: e59d9004 ldr r9, [sp, #4] <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3db88: e0866004 add r6, r6, r4 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3db8c: e0877009 add r7, r7, r9 <== NOT EXECUTED test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset; search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 3db90: 1a000014 bne 3dbe8 <== NOT EXECUTED 3db94: e59db014 ldr fp, [sp, #20] <== NOT EXECUTED 3db98: e153000c cmp r3, ip <== NOT EXECUTED 3db9c: a3540000 cmpge r4, #0 <== NOT EXECUTED 3dba0: e085500b add r5, r5, fp <== NOT EXECUTED 3dba4: ca00000f bgt 3dbe8 <== NOT EXECUTED 3dba8: e0822004 add r2, r2, r4 <== NOT EXECUTED * all bits are set there are no map bits so move to the next search * element. */ if (!rtems_rfs_bitmap_match (*search_bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) { while ((search_offset >= 0) 3dbac: e352001f cmp r2, #31 <== NOT EXECUTED 3dbb0: 9affffc5 bls 3dacc <== NOT EXECUTED 3dbb4: ea00000b b 3dbe8 <== NOT EXECUTED * Align test_bit either up or down depending on the direction to next 32 * bit boundary. */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) 3dbb8: e3540000 cmp r4, #0 <== NOT EXECUTED bits_skipped = search_offset + 1; /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 3dbbc: d1e01282 mvnle r1, r2, lsl #5 <== NOT EXECUTED */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; 3dbc0: c2622020 rsbgt r2, r2, #32 <== NOT EXECUTED test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); map_offset = 0; } else { bits_skipped = search_offset + 1; 3dbc4: d2822001 addle r2, r2, #1 <== NOT EXECUTED rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 3dbc8: c1a01000 movgt r1, r0 <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 3dbcc: e0000294 mul r0, r4, r2 <== NOT EXECUTED * * Align test_bit either up or down depending on the direction to next 32 * bit boundary. */ rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); 3dbd0: e3c3301f bic r3, r3, #31 <== NOT EXECUTED bits_skipped = search_offset + 1; /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 3dbd4: d0813003 addle r3, r1, r3 <== NOT EXECUTED rtems_rfs_bitmap_bit bits_skipped; test_bit &= ~((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1); if (direction > 0) { bits_skipped = rtems_rfs_bitmap_element_bits () - search_offset; test_bit += bits_skipped * rtems_rfs_bitmap_element_bits (); 3dbd8: c0833282 addgt r3, r3, r2, lsl #5 <== NOT EXECUTED bits_skipped = search_offset + 1; /* * Need to remove 1 for the rounding up. The above rounds down and * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; 3dbdc: d3a0101f movle r1, #31 <== NOT EXECUTED map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; 3dbe0: e0866000 add r6, r6, r0 <== NOT EXECUTED * adds 1. Remember the logic is for subtraction. */ test_bit -= ((bits_skipped - 1) * rtems_rfs_bitmap_element_bits ()) + 1; map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; 3dbe4: e0877100 add r7, r7, r0, lsl #2 <== NOT EXECUTED search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 3dbe8: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 3dbec: e153000c cmp r3, ip <== NOT EXECUTED 3dbf0: b3a00000 movlt r0, #0 <== NOT EXECUTED 3dbf4: a2000001 andge r0, r0, #1 <== NOT EXECUTED map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 3dbf8: e3540000 cmp r4, #0 <== NOT EXECUTED 3dbfc: d3a0201f movle r2, #31 <== NOT EXECUTED 3dc00: c3a02000 movgt r2, #0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 3dc04: e3500000 cmp r0, #0 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 3dc08: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3dc0c: e0888000 add r8, r8, r0 <== NOT EXECUTED search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 3dc10: 1affffa7 bne 3dab4 <== NOT EXECUTED 3dc14: e153000c cmp r3, ip <== NOT EXECUTED 3dc18: c3a00000 movgt r0, #0 <== NOT EXECUTED 3dc1c: d3a00001 movle r0, #1 <== NOT EXECUTED 3dc20: e3540000 cmp r4, #0 <== NOT EXECUTED 3dc24: d3a00000 movle r0, #0 <== NOT EXECUTED 3dc28: e3500000 cmp r0, #0 <== NOT EXECUTED 3dc2c: 1affffa0 bne 3dab4 <== NOT EXECUTED return 0; } 3dc30: e28dd01c add sp, sp, #28 <== NOT EXECUTED 3dc34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00000448 <_Barrier_Manager_initialization>: #include #include void _Barrier_Manager_initialization(void) { } 448: e12fff1e bx lr =============================================================================== 0000044c <_Dual_ported_memory_Manager_initialization>: #include #include void _Dual_ported_memory_Manager_initialization(void) { } 44c: e12fff1e bx lr =============================================================================== 00000450 <_Event_Manager_initialization>: #include #include void _Event_Manager_initialization(void) { } 450: e12fff1e bx lr =============================================================================== 0000046c <_Extension_Manager_initialization>: #include #include void _Extension_Manager_initialization(void) { } 46c: e12fff1e bx lr =============================================================================== 00000454 <_Message_queue_Manager_initialization>: #include #include void _Message_queue_Manager_initialization(void) { } 454: e12fff1e bx lr =============================================================================== 000061b4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 61b4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 61b8: e1a04001 mov r4, r1 61bc: e1a06000 mov r6, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 61c0: e1a0100d mov r1, sp 61c4: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 61c8: e1a08002 mov r8, r2 61cc: e20370ff and r7, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 61d0: eb00006f bl 6394 <_POSIX_Mutex_Get> 61d4: e3500000 cmp r0, #0 61d8: 0a000032 beq 62a8 <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 61dc: e59f30d0 ldr r3, [pc, #208] ; 62b4 <_POSIX_Condition_variables_Wait_support+0x100> 61e0: e5932000 ldr r2, [r3] 61e4: e2422001 sub r2, r2, #1 61e8: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 61ec: e1a0100d mov r1, sp 61f0: e1a00006 mov r0, r6 61f4: ebffff7c bl 5fec <_POSIX_Condition_variables_Get> switch ( location ) { 61f8: e59d3000 ldr r3, [sp] 61fc: e3530000 cmp r3, #0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 6200: e1a0a000 mov sl, r0 switch ( location ) { 6204: 1a000027 bne 62a8 <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 6208: e5903014 ldr r3, [r0, #20] 620c: e3530000 cmp r3, #0 6210: 0a000004 beq 6228 <_POSIX_Condition_variables_Wait_support+0x74> 6214: e5942000 ldr r2, [r4] 6218: e1530002 cmp r3, r2 621c: 0a000001 beq 6228 <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch(); 6220: eb000bff bl 9224 <_Thread_Enable_dispatch> 6224: ea00001f b 62a8 <_POSIX_Condition_variables_Wait_support+0xf4> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 6228: e1a00004 mov r0, r4 622c: eb0000de bl 65ac _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 6230: e3570000 cmp r7, #0 6234: 1a000015 bne 6290 <_POSIX_Condition_variables_Wait_support+0xdc> the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 6238: e59f5078 ldr r5, [pc, #120] ; 62b8 <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 623c: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 6240: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 6244: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 6248: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 624c: e5961000 ldr r1, [r6] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 6250: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 6254: e5831020 str r1, [r3, #32] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 6258: e3a01001 mov r1, #1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 625c: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 6260: e1a00002 mov r0, r2 6264: e58a1048 str r1, [sl, #72] ; 0x48 6268: e59f204c ldr r2, [pc, #76] ; 62bc <_POSIX_Condition_variables_Wait_support+0x108> 626c: e1a01008 mov r1, r8 6270: eb000d24 bl 9708 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 6274: eb000bea bl 9224 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 6278: e5953000 ldr r3, [r5] 627c: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 6280: e3550074 cmp r5, #116 ; 0x74 6284: 13550000 cmpne r5, #0 6288: 0a000002 beq 6298 <_POSIX_Condition_variables_Wait_support+0xe4> 628c: ea000006 b 62ac <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 6290: eb000be3 bl 9224 <_Thread_Enable_dispatch> 6294: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 6298: e1a00004 mov r0, r4 629c: eb0000a3 bl 6530 if ( mutex_status ) 62a0: e3500000 cmp r0, #0 62a4: 0a000000 beq 62ac <_POSIX_Condition_variables_Wait_support+0xf8> 62a8: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 62ac: e1a00005 mov r0, r5 62b0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 0000d924 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { d924: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); d928: e5906008 ldr r6, [r0, #8] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); d92c: e1a08c26 lsr r8, r6, #24 d930: e2088007 and r8, r8, #7 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; d934: e1a06806 lsl r6, r6, #16 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; d938: e59f7074 ldr r7, [pc, #116] ; d9b4 <_POSIX_Keys_Run_destructors+0x90> for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; d93c: e1a06726 lsr r6, r6, #14 d940: e2888005 add r8, r8, #5 if ( value != NULL ) { key->Values [ thread_api ][ thread_index ] = NULL; d944: e3a05000 mov r5, #0 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; d948: e3a04001 mov r4, #1 d94c: e1d7a1b0 ldrh sl, [r7, #16] d950: e1a01004 mov r1, r4 done = true; for ( index = 1 ; index <= max ; ++index ) { d954: ea000011 b d9a0 <_POSIX_Keys_Run_destructors+0x7c> POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; d958: e597301c ldr r3, [r7, #28] d95c: e7932104 ldr r2, [r3, r4, lsl #2] if ( key != NULL && key->destructor != NULL ) { d960: e3520000 cmp r2, #0 d964: 0a00000a beq d994 <_POSIX_Keys_Run_destructors+0x70> d968: e5923010 ldr r3, [r2, #16] d96c: e3530000 cmp r3, #0 d970: 0a000007 beq d994 <_POSIX_Keys_Run_destructors+0x70> void *value = key->Values [ thread_api ][ thread_index ]; d974: e7922108 ldr r2, [r2, r8, lsl #2] d978: e7920006 ldr r0, [r2, r6] if ( value != NULL ) { d97c: e3500000 cmp r0, #0 d980: 0a000003 beq d994 <_POSIX_Keys_Run_destructors+0x70> key->Values [ thread_api ][ thread_index ] = NULL; d984: e7825006 str r5, [r2, r6] <== NOT EXECUTED (*key->destructor)( value ); d988: e1a0e00f mov lr, pc <== NOT EXECUTED d98c: e12fff13 bx r3 <== NOT EXECUTED d990: e1a01005 mov r1, r5 <== NOT EXECUTED Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { d994: e2844001 add r4, r4, #1 d998: e1a04804 lsl r4, r4, #16 d99c: e1a04824 lsr r4, r4, #16 d9a0: e154000a cmp r4, sl d9a4: 9affffeb bls d958 <_POSIX_Keys_Run_destructors+0x34> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { d9a8: e3510000 cmp r1, #0 d9ac: 0affffe5 beq d948 <_POSIX_Keys_Run_destructors+0x24> done = false; } } } } } d9b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 0000ad7c <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ad7c: e92d40f0 push {r4, r5, r6, r7, lr} api = deleted->API_Extensions[ THREAD_API_POSIX ]; /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); ad80: e1a00001 mov r0, r1 */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { ad84: e1a04001 mov r4, r1 Thread_Control *the_thread; POSIX_API_Control *api; void **value_ptr; api = deleted->API_Extensions[ THREAD_API_POSIX ]; ad88: e5915108 ldr r5, [r1, #264] ; 0x108 /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); ad8c: eb000acc bl d8c4 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); ad90: e1a00004 mov r0, r4 ad94: eb000ae2 bl d924 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) ad98: e2857040 add r7, r5, #64 ; 0x40 _POSIX_Keys_Run_destructors( deleted ); /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; ad9c: e5946028 ldr r6, [r4, #40] ; 0x28 while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) ada0: ea000001 b adac <_POSIX_Threads_Delete_extension+0x30> *(void **)the_thread->Wait.return_argument = value_ptr; ada4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED ada8: e5836000 str r6, [r3] <== NOT EXECUTED /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) adac: e1a00007 mov r0, r7 adb0: ebfff1bc bl 74a8 <_Thread_queue_Dequeue> adb4: e3500000 cmp r0, #0 adb8: 1afffff9 bne ada4 <_POSIX_Threads_Delete_extension+0x28> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) adbc: e5953080 ldr r3, [r5, #128] ; 0x80 adc0: e3530004 cmp r3, #4 (void) _Watchdog_Remove( &api->Sporadic_timer ); adc4: 028500a4 addeq r0, r5, #164 ; 0xa4 adc8: 0bfff53f bleq 82cc <_Watchdog_Remove> deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; adcc: e3a03000 mov r3, #0 (void) _Workspace_Free( api ); add0: e1a00005 mov r0, r5 *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; add4: e5843108 str r3, [r4, #264] ; 0x108 (void) _Workspace_Free( api ); } add8: e8bd40f0 pop {r4, r5, r6, r7, lr} if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); addc: eafff59a b 844c <_Workspace_Free> =============================================================================== 00000458 <_Partition_Manager_initialization>: #include #include void _Partition_Manager_initialization(void) { } 458: e12fff1e bx lr =============================================================================== 00000468 <_Rate_monotonic_Manager_initialization>: #include #include void _Rate_monotonic_Manager_initialization(void) { } 468: e12fff1e bx lr =============================================================================== 0000045c <_Region_Manager_initialization>: #include #include void _Region_Manager_initialization(void) { } 45c: e12fff1e bx lr =============================================================================== 000076b0 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 76b0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 76b4: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 76b8: e281503c add r5, r1, #60 ; 0x3c 76bc: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 76c0: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 76c4: e281c038 add ip, r1, #56 ; 0x38 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 76c8: e3130020 tst r3, #32 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 76cc: e1a04323 lsr r4, r3, #6 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 76d0: e581503c str r5, [r1, #60] ; 0x3c 76d4: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 76d8: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 76dc: e5907038 ldr r7, [r0, #56] ; 0x38 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 76e0: e02c0495 mla ip, r5, r4, r0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 76e4: 159f8154 ldrne r8, [pc, #340] ; 7840 <_Thread_queue_Enqueue_priority+0x190> priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 76e8: 1a000023 bne 777c <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 76ec: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 76f0: e10f5000 mrs r5, CPSR 76f4: e3854080 orr r4, r5, #128 ; 0x80 76f8: e129f004 msr CPSR_fc, r4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 76fc: e3e06000 mvn r6, #0 7700: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7704: ea00000b b 7738 <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 7708: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 770c: e1530006 cmp r3, r6 7710: 9a00000a bls 7740 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7714: e10fa000 mrs sl, CPSR 7718: e129f005 msr CPSR_fc, r5 771c: e129f00a msr CPSR_fc, sl search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 7720: e594a010 ldr sl, [r4, #16] 7724: e117000a tst r7, sl 7728: 1a000001 bne 7734 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 772c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 7730: eaffffee b 76f0 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 7734: e5944000 ldr r4, [r4] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7738: e1540008 cmp r4, r8 773c: 1afffff1 bne 7708 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 7740: e590c030 ldr ip, [r0, #48] ; 0x30 7744: e35c0001 cmp ip, #1 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7748: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 774c: 1a000038 bne 7834 <_Thread_queue_Enqueue_priority+0x184> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 7750: e1530006 cmp r3, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 7754: e3a03000 mov r3, #0 7758: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 775c: 0a00002a beq 780c <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 7760: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7764: e5814000 str r4, [r1] the_node->previous = previous_node; 7768: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 776c: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 7770: e5831000 str r1, [r3] search_node->previous = the_node; 7774: e5841004 str r1, [r4, #4] 7778: ea000021 b 7804 <_Thread_queue_Enqueue_priority+0x154> the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 777c: e5d86000 ldrb r6, [r8] 7780: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7784: e10f5000 mrs r5, CPSR 7788: e3854080 orr r4, r5, #128 ; 0x80 778c: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 7790: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 7794: ea00000b b 77c8 <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 7798: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 779c: e1530006 cmp r3, r6 77a0: 2a00000a bcs 77d0 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 77a4: e10fa000 mrs sl, CPSR 77a8: e129f005 msr CPSR_fc, r5 77ac: e129f00a msr CPSR_fc, sl search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { 77b0: e594a010 ldr sl, [r4, #16] 77b4: e117000a tst r7, sl 77b8: 1a000001 bne 77c4 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 77bc: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 77c0: eaffffed b 777c <_Thread_queue_Enqueue_priority+0xcc> <== NOT EXECUTED _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 77c4: e5944004 ldr r4, [r4, #4] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 77c8: e154000c cmp r4, ip 77cc: 1afffff1 bne 7798 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 77d0: e590c030 ldr ip, [r0, #48] ; 0x30 77d4: e35c0001 cmp ip, #1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 77d8: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 77dc: 1a000014 bne 7834 <_Thread_queue_Enqueue_priority+0x184> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 77e0: e1530006 cmp r3, r6 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 77e4: e3a03000 mov r3, #0 77e8: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 77ec: 0a000006 beq 780c <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 77f0: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 77f4: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 77f8: e5810044 str r0, [r1, #68] ; 0x44 next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 77fc: e5841000 str r1, [r4] next_node->previous = the_node; 7800: e5831004 str r1, [r3, #4] 7804: e129f005 msr CPSR_fc, r5 7808: ea000007 b 782c <_Thread_queue_Enqueue_priority+0x17c> 780c: e284403c add r4, r4, #60 ; 0x3c _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 7810: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7814: e5814000 str r4, [r1] the_node->previous = previous_node; 7818: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 781c: e5810044 str r0, [r1, #68] ; 0x44 previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 7820: e5831000 str r1, [r3] search_node->previous = the_node; 7824: e5841004 str r1, [r4, #4] 7828: e129f00c msr CPSR_fc, ip 782c: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7830: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 7834: e582c000 str ip, [r2] return the_thread_queue->sync_state; 7838: e5900030 ldr r0, [r0, #48] ; 0x30 } 783c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00000464 <_Timer_Manager_initialization>: #include #include void _Timer_Manager_initialization(void) { } 464: e12fff1e bx lr =============================================================================== 00015138 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 15138: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1513c: e24dd020 sub sp, sp, #32 15140: e28d3014 add r3, sp, #20 15144: e28d5008 add r5, sp, #8 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 15148: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1514c: e283a004 add sl, r3, #4 15150: e2858004 add r8, r5, #4 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 15154: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 15158: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1515c: e2803040 add r3, r0, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 15160: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; 15164: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 15168: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; 1516c: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); 15170: e58d5010 str r5, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 15174: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 15178: e58d3000 str r3, [sp] * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 1517c: e1a04000 mov r4, r0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 15180: e280b030 add fp, r0, #48 ; 0x30 /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 15184: e2807068 add r7, r0, #104 ; 0x68 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 15188: e28d2014 add r2, sp, #20 1518c: e5842078 str r2, [r4, #120] ; 0x78 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 15190: e59f2168 ldr r2, [pc, #360] ; 15300 <_Timer_server_Body+0x1c8> 15194: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 15198: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1519c: e1a02005 mov r2, r5 151a0: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 151a4: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 151a8: e1a0000b mov r0, fp 151ac: eb001060 bl 19334 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 151b0: e59f314c ldr r3, [pc, #332] ; 15304 <_Timer_server_Body+0x1cc> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 151b4: e5942074 ldr r2, [r4, #116] ; 0x74 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 151b8: e5936000 ldr r6, [r3] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 151bc: e1560002 cmp r6, r2 151c0: 9a000004 bls 151d8 <_Timer_server_Body+0xa0> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 151c4: e0621006 rsb r1, r2, r6 151c8: e1a00007 mov r0, r7 151cc: e1a02005 mov r2, r5 151d0: eb001057 bl 19334 <_Watchdog_Adjust_to_chain> 151d4: ea000003 b 151e8 <_Timer_server_Body+0xb0> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 151d8: 30662002 rsbcc r2, r6, r2 151dc: 31a00007 movcc r0, r7 151e0: 33a01001 movcc r1, #1 151e4: 3b00102a blcc 19294 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 151e8: e5846074 str r6, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 151ec: e5940078 ldr r0, [r4, #120] ; 0x78 151f0: eb000234 bl 15ac8 <_Chain_Get> if ( timer == NULL ) { 151f4: e2501000 subs r1, r0, #0 151f8: 0a00000a beq 15228 <_Timer_server_Body+0xf0> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 151fc: e5913038 ldr r3, [r1, #56] ; 0x38 15200: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 15204: 02811010 addeq r1, r1, #16 15208: 01a0000b moveq r0, fp static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1520c: 0a000003 beq 15220 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 15210: e3530003 cmp r3, #3 15214: 1afffff4 bne 151ec <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 15218: e2811010 add r1, r1, #16 1521c: e1a00007 mov r0, r7 15220: eb001070 bl 193e8 <_Watchdog_Insert> 15224: eafffff0 b 151ec <_Timer_server_Body+0xb4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 15228: e10f3000 mrs r3, CPSR 1522c: e3832080 orr r2, r3, #128 ; 0x80 15230: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 15234: e59d2014 ldr r2, [sp, #20] 15238: e152000a cmp r2, sl 1523c: 1a000005 bne 15258 <_Timer_server_Body+0x120> ts->insert_chain = NULL; 15240: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 15244: e129f003 msr CPSR_fc, r3 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 15248: e59d3008 ldr r3, [sp, #8] 1524c: e1530008 cmp r3, r8 15250: 1a000002 bne 15260 <_Timer_server_Body+0x128> 15254: ea000015 b 152b0 <_Timer_server_Body+0x178> 15258: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 1525c: eaffffcb b 15190 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 15260: e10f2000 mrs r2, CPSR 15264: e3823080 orr r3, r2, #128 ; 0x80 15268: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1526c: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 15270: e1530008 cmp r3, r8 15274: 0a00000b beq 152a8 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 15278: e5931000 ldr r1, [r3] * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 1527c: e3530000 cmp r3, #0 the_chain->first = new_first; 15280: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); 15284: e5815004 str r5, [r1, #4] 15288: 0a000006 beq 152a8 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 1528c: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 15290: e129f002 msr CPSR_fc, r2 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 15294: e2830020 add r0, r3, #32 15298: e8900003 ldm r0, {r0, r1} 1529c: e1a0e00f mov lr, pc 152a0: e593f01c ldr pc, [r3, #28] } 152a4: eaffffed b 15260 <_Timer_server_Body+0x128> 152a8: e129f002 msr CPSR_fc, r2 152ac: eaffffb5 b 15188 <_Timer_server_Body+0x50> } else { ts->active = false; 152b0: e5c4907c strb r9, [r4, #124] ; 0x7c 152b4: e59f304c ldr r3, [pc, #76] ; 15308 <_Timer_server_Body+0x1d0> 152b8: e5932000 ldr r2, [r3] 152bc: e2822001 add r2, r2, #1 152c0: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 152c4: e3a01008 mov r1, #8 152c8: e5940000 ldr r0, [r4] 152cc: eb000d95 bl 18928 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 152d0: e1a00004 mov r0, r4 152d4: ebffff6b bl 15088 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 152d8: e1a00004 mov r0, r4 152dc: ebffff7f bl 150e0 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 152e0: eb000af7 bl 17ec4 <_Thread_Enable_dispatch> ts->active = true; 152e4: e3a03001 mov r3, #1 152e8: e5c4307c strb r3, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 152ec: e59d0004 ldr r0, [sp, #4] 152f0: eb001094 bl 19548 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 152f4: e59d0000 ldr r0, [sp] 152f8: eb001092 bl 19548 <_Watchdog_Remove> 152fc: eaffffa1 b 15188 <_Timer_server_Body+0x50> =============================================================================== 0001a240 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 1a240: e1a04000 mov r4, r0 1a244: eb000229 bl 1aaf0 <___DTOR_END__> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 1a248: ebffffe0 bl 1a1d0 rtems_shutdown_executive(status); 1a24c: e1a00004 mov r0, r4 1a250: eb00003b bl 1a344 1a254: eafffffe b 1a254 <_exit+0x14> <== NOT EXECUTED =============================================================================== 00022e98 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 22e98: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 22e9c: e3a04000 mov r4, #0 <== NOT EXECUTED 22ea0: e28d7004 add r7, sp, #4 <== NOT EXECUTED uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 22ea4: e1a05003 mov r5, r3 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 22ea8: e5909034 ldr r9, [r0, #52] ; 0x34 <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 22eac: e5274004 str r4, [r7, #-4]! <== NOT EXECUTED 22eb0: e1a06002 mov r6, r2 <== NOT EXECUTED 22eb4: e1a08001 mov r8, r1 <== NOT EXECUTED uint32_t c = 0; while (count > 0) 22eb8: ea000012 b 22f08 <_fat_block_read+0x70> <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 22ebc: ebfffec4 bl 229d4 <== NOT EXECUTED if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 22ec0: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 22ec4: e250b000 subs fp, r0, #0 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 22ec8: e0830004 add r0, r3, r4 <== NOT EXECUTED uint32_t c = 0; while (count > 0) { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) 22ecc: 13e04000 mvnne r4, #0 <== NOT EXECUTED 22ed0: 1a000012 bne 22f20 <_fat_block_read+0x88> <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 22ed4: e1d9a0b0 ldrh sl, [r9] <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 22ed8: e59d3000 ldr r3, [sp] <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 22edc: e066a00a rsb sl, r6, sl <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 22ee0: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 22ee4: e15a0005 cmp sl, r5 <== NOT EXECUTED 22ee8: 21a0a005 movcs sl, r5 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 22eec: e0811006 add r1, r1, r6 <== NOT EXECUTED 22ef0: e1a0200a mov r2, sl <== NOT EXECUTED 22ef4: eb0079e3 bl 41688 <== NOT EXECUTED count -= c; cmpltd += c; 22ef8: e08a4004 add r4, sl, r4 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); count -= c; 22efc: e06a5005 rsb r5, sl, r5 <== NOT EXECUTED cmpltd += c; blk++; 22f00: e2888001 add r8, r8, #1 <== NOT EXECUTED 22f04: e1a0600b mov r6, fp <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 22f08: e3550000 cmp r5, #0 <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 22f0c: e1a01008 mov r1, r8 <== NOT EXECUTED 22f10: e3a02001 mov r2, #1 <== NOT EXECUTED 22f14: e1a0300d mov r3, sp <== NOT EXECUTED 22f18: e1a00009 mov r0, r9 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while (count > 0) 22f1c: 1affffe6 bne 22ebc <_fat_block_read+0x24> <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 22f20: e1a00004 mov r0, r4 <== NOT EXECUTED 22f24: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000229cc <_fat_block_release>: int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 229cc: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED 229d0: eaffffaf b 22894 <== NOT EXECUTED =============================================================================== 00022bac <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 22bac: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 22bb0: e3a05000 mov r5, #0 <== NOT EXECUTED 22bb4: e28d8004 add r8, sp, #4 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 22bb8: e1a07003 mov r7, r3 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 22bbc: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED ssize_t cmpltd = 0; uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; 22bc0: e5285004 str r5, [r8, #-4]! <== NOT EXECUTED 22bc4: e1a0b002 mov fp, r2 <== NOT EXECUTED 22bc8: e1a0a001 mov sl, r1 <== NOT EXECUTED uint32_t c = 0; while(count > 0) 22bcc: ea00001e b 22c4c <_fat_block_write+0xa0> <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bps - ofs)); 22bd0: e1d630b0 ldrh r3, [r6] <== NOT EXECUTED 22bd4: e06b4003 rsb r4, fp, r3 <== NOT EXECUTED 22bd8: e1540007 cmp r4, r7 <== NOT EXECUTED 22bdc: 21a04007 movcs r4, r7 <== NOT EXECUTED if (c == fs_info->vol.bps) 22be0: e1540003 cmp r4, r3 <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 22be4: 01a00006 moveq r0, r6 <== NOT EXECUTED 22be8: 01a0100a moveq r1, sl <== NOT EXECUTED 22bec: 03a02002 moveq r2, #2 <== NOT EXECUTED 22bf0: 01a0300d moveq r3, sp <== NOT EXECUTED else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 22bf4: 11a0100a movne r1, sl <== NOT EXECUTED 22bf8: 13a02001 movne r2, #1 <== NOT EXECUTED 22bfc: 11a0300d movne r3, sp <== NOT EXECUTED 22c00: 11a00006 movne r0, r6 <== NOT EXECUTED 22c04: ebffff72 bl 229d4 <== NOT EXECUTED if (rc != RC_OK) 22c08: e3500000 cmp r0, #0 <== NOT EXECUTED c = MIN(count, (fs_info->vol.bps - ofs)); if (c == fs_info->vol.bps) rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 22c0c: e1a09000 mov r9, r0 <== NOT EXECUTED if (rc != RC_OK) 22c10: 13e05000 mvnne r5, #0 <== NOT EXECUTED 22c14: 1a00000e bne 22c54 <_fat_block_write+0xa8> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 22c18: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22c1c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 22c20: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED 22c24: e080000b add r0, r0, fp <== NOT EXECUTED 22c28: e0831005 add r1, r3, r5 <== NOT EXECUTED 22c2c: e1a02004 mov r2, r4 <== NOT EXECUTED 22c30: eb007a94 bl 41688 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 22c34: e3a03001 mov r3, #1 <== NOT EXECUTED 22c38: e5c63080 strb r3, [r6, #128] ; 0x80 <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 22c3c: e0845005 add r5, r4, r5 <== NOT EXECUTED memcpy((block->buffer + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 22c40: e0647007 rsb r7, r4, r7 <== NOT EXECUTED cmpltd +=c; blk++; 22c44: e28aa001 add sl, sl, #1 <== NOT EXECUTED 22c48: e1a0b009 mov fp, r9 <== NOT EXECUTED uint32_t blk = start; uint32_t ofs = offset; rtems_bdbuf_buffer *block = NULL; uint32_t c = 0; while(count > 0) 22c4c: e3570000 cmp r7, #0 <== NOT EXECUTED 22c50: 1affffde bne 22bd0 <_fat_block_write+0x24> <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 22c54: e1a00005 mov r0, r5 <== NOT EXECUTED 22c58: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 0003a818 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 3a818: e1a00001 mov r0, r1 <== NOT EXECUTED 3a81c: e1a01002 mov r1, r2 <== NOT EXECUTED 3a820: e1a02003 mov r2, r3 <== NOT EXECUTED 3a824: eaffff8b b 3a658 <== NOT EXECUTED =============================================================================== 0000a3bc <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } a3bc: e3a00001 mov r0, #1 <== NOT EXECUTED a3c0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00001fcc <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 1fcc: eaffffe8 b 1f74 <== NOT EXECUTED =============================================================================== 00026200 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 26200: e1a00001 mov r0, r1 <== NOT EXECUTED 26204: e1a01002 mov r1, r2 <== NOT EXECUTED 26208: eaffff7f b 2600c <== NOT EXECUTED =============================================================================== 000263fc <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 263fc: e1a00001 mov r0, r1 <== NOT EXECUTED 26400: e1a01002 mov r1, r2 <== NOT EXECUTED 26404: eaffffc4 b 2631c <== NOT EXECUTED =============================================================================== 0001a328 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 1a328: e1a00001 mov r0, r1 <== NOT EXECUTED 1a32c: e1a01002 mov r1, r2 <== NOT EXECUTED 1a330: ea00000e b 1a370 <== NOT EXECUTED =============================================================================== 00008f14 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 8f14: e1a00001 mov r0, r1 <== NOT EXECUTED 8f18: e1a01002 mov r1, r2 <== NOT EXECUTED 8f1c: eaffffc4 b 8e34 <== NOT EXECUTED =============================================================================== 0000d8bc <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); d8bc: e1a00001 mov r0, r1 <== NOT EXECUTED d8c0: eaffff71 b d68c <== NOT EXECUTED =============================================================================== 00025074 : #include int chdir( const char *pathname ) { 25074: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 25078: e2505000 subs r5, r0, #0 #include int chdir( const char *pathname ) { 2507c: e24dd018 sub sp, sp, #24 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 25080: 1a000002 bne 25090 rtems_set_errno_and_return_minus_one( EFAULT ); 25084: eb0064cf bl 3e3c8 <__errno> 25088: e3a0300e mov r3, #14 2508c: ea000025 b 25128 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 25090: eb007fda bl 45000 25094: e28d4004 add r4, sp, #4 25098: e3a0c001 mov ip, #1 2509c: e1a01000 mov r1, r0 250a0: e1a0200c mov r2, ip 250a4: e1a00005 mov r0, r5 250a8: e1a03004 mov r3, r4 250ac: e58dc000 str ip, [sp] 250b0: ebff8961 bl 763c pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 250b4: e3500000 cmp r0, #0 250b8: 1a00001b bne 2512c return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 250bc: e59d2010 ldr r2, [sp, #16] 250c0: e5923010 ldr r3, [r2, #16] 250c4: e3530000 cmp r3, #0 250c8: 1a000007 bne 250ec rtems_filesystem_freenode( &loc ); 250cc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 250d0: e3530000 cmp r3, #0 <== NOT EXECUTED 250d4: 11a00004 movne r0, r4 <== NOT EXECUTED 250d8: 11a0e00f movne lr, pc <== NOT EXECUTED 250dc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 250e0: eb0064b8 bl 3e3c8 <__errno> <== NOT EXECUTED 250e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 250e8: ea00000e b 25128 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 250ec: e1a00004 mov r0, r4 250f0: e1a0e00f mov lr, pc 250f4: e12fff13 bx r3 250f8: e3500001 cmp r0, #1 250fc: 0a00000c beq 25134 rtems_filesystem_freenode( &loc ); 25100: e59d3010 ldr r3, [sp, #16] 25104: e3530000 cmp r3, #0 25108: 0a000004 beq 25120 2510c: e593301c ldr r3, [r3, #28] 25110: e3530000 cmp r3, #0 25114: 11a00004 movne r0, r4 25118: 11a0e00f movne lr, pc 2511c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 25120: eb0064a8 bl 3e3c8 <__errno> 25124: e3a03014 mov r3, #20 25128: e5803000 str r3, [r0] 2512c: e3e00000 mvn r0, #0 25130: ea000012 b 25180 } rtems_filesystem_freenode( &rtems_filesystem_current ); 25134: e59f304c ldr r3, [pc, #76] ; 25188 25138: e5930000 ldr r0, [r3] 2513c: e5903010 ldr r3, [r0, #16] 25140: e3530000 cmp r3, #0 25144: 0a000004 beq 2515c 25148: e593301c ldr r3, [r3, #28] 2514c: e3530000 cmp r3, #0 25150: 12800004 addne r0, r0, #4 25154: 11a0e00f movne lr, pc 25158: 112fff13 bxne r3 rtems_filesystem_current = loc; 2515c: e59f3024 ldr r3, [pc, #36] ; 25188 25160: e28d4004 add r4, sp, #4 25164: e593c000 ldr ip, [r3] 25168: e8b4000f ldm r4!, {r0, r1, r2, r3} 2516c: e28cc004 add ip, ip, #4 25170: e8ac000f stmia ip!, {r0, r1, r2, r3} 25174: e5943000 ldr r3, [r4] 25178: e58c3000 str r3, [ip] 2517c: e3a00000 mov r0, #0 return 0; } 25180: e28dd018 add sp, sp, #24 25184: e8bd8030 pop {r4, r5, pc} =============================================================================== 00007140 : int chmod( const char *path, mode_t mode ) { 7140: e92d4070 push {r4, r5, r6, lr} 7144: e24dd018 sub sp, sp, #24 7148: e1a05001 mov r5, r1 714c: e1a06000 mov r6, r0 int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 7150: eb00f7aa bl 45000 7154: e28d4004 add r4, sp, #4 7158: e1a01000 mov r1, r0 715c: e3a0c001 mov ip, #1 7160: e1a00006 mov r0, r6 7164: e3a02000 mov r2, #0 7168: e1a03004 mov r3, r4 716c: e58dc000 str ip, [sp] 7170: eb000131 bl 763c if ( status != 0 ) 7174: e3500000 cmp r0, #0 7178: 1a00000d bne 71b4 return -1; if ( !loc.handlers ){ 717c: e59d300c ldr r3, [sp, #12] 7180: e3530000 cmp r3, #0 7184: 1a00000c bne 71bc rtems_filesystem_freenode( &loc ); 7188: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 718c: e3530000 cmp r3, #0 <== NOT EXECUTED 7190: 0a000004 beq 71a8 <== NOT EXECUTED 7194: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 7198: e3530000 cmp r3, #0 <== NOT EXECUTED 719c: 11a00004 movne r0, r4 <== NOT EXECUTED 71a0: 11a0e00f movne lr, pc <== NOT EXECUTED 71a4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 71a8: eb00dc86 bl 3e3c8 <__errno> <== NOT EXECUTED 71ac: e3a03009 mov r3, #9 <== NOT EXECUTED 71b0: e5803000 str r3, [r0] <== NOT EXECUTED 71b4: e3e05000 mvn r5, #0 71b8: ea00001a b 7228 } if ( !loc.handlers->fchmod_h ){ 71bc: e593301c ldr r3, [r3, #28] 71c0: e3530000 cmp r3, #0 71c4: 1a00000a bne 71f4 rtems_filesystem_freenode( &loc ); 71c8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 71cc: e3530000 cmp r3, #0 <== NOT EXECUTED 71d0: 0a000004 beq 71e8 <== NOT EXECUTED 71d4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 71d8: e3530000 cmp r3, #0 <== NOT EXECUTED 71dc: 11a00004 movne r0, r4 <== NOT EXECUTED 71e0: 11a0e00f movne lr, pc <== NOT EXECUTED 71e4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 71e8: eb00dc76 bl 3e3c8 <__errno> <== NOT EXECUTED 71ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 71f0: eaffffee b 71b0 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 71f4: e1a01005 mov r1, r5 71f8: e1a00004 mov r0, r4 71fc: e1a0e00f mov lr, pc 7200: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 7204: e59d3010 ldr r3, [sp, #16] 7208: e3530000 cmp r3, #0 if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 720c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 7210: 0a000004 beq 7228 7214: e593301c ldr r3, [r3, #28] 7218: e3530000 cmp r3, #0 721c: 11a00004 movne r0, r4 7220: 11a0e00f movne lr, pc 7224: 112fff13 bxne r3 return result; } 7228: e1a00005 mov r0, r5 722c: e28dd018 add sp, sp, #24 7230: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0002518c : int chown( const char *path, uid_t owner, gid_t group ) { 2518c: e92d40f0 push {r4, r5, r6, r7, lr} 25190: e1a01801 lsl r1, r1, #16 25194: e24dd018 sub sp, sp, #24 25198: e1a02802 lsl r2, r2, #16 2519c: e1a06821 lsr r6, r1, #16 251a0: e1a05822 lsr r5, r2, #16 251a4: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 251a8: eb007f94 bl 45000 251ac: e28d4004 add r4, sp, #4 251b0: e1a01000 mov r1, r0 251b4: e3a0c001 mov ip, #1 251b8: e1a00007 mov r0, r7 251bc: e3a02000 mov r2, #0 251c0: e1a03004 mov r3, r4 251c4: e58dc000 str ip, [sp] 251c8: ebff891b bl 763c 251cc: e3500000 cmp r0, #0 251d0: 1a00000b bne 25204 return -1; if ( !loc.ops->chown_h ) { 251d4: e59d2010 ldr r2, [sp, #16] 251d8: e5923018 ldr r3, [r2, #24] 251dc: e3530000 cmp r3, #0 251e0: 1a000009 bne 2520c rtems_filesystem_freenode( &loc ); 251e4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 251e8: e3530000 cmp r3, #0 <== NOT EXECUTED 251ec: 11a00004 movne r0, r4 <== NOT EXECUTED 251f0: 11a0e00f movne lr, pc <== NOT EXECUTED 251f4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 251f8: eb006472 bl 3e3c8 <__errno> <== NOT EXECUTED 251fc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25200: e5803000 str r3, [r0] <== NOT EXECUTED 25204: e3e05000 mvn r5, #0 25208: ea00000d b 25244 } result = (*loc.ops->chown_h)( &loc, owner, group ); 2520c: e1a02005 mov r2, r5 25210: e1a01006 mov r1, r6 25214: e1a00004 mov r0, r4 25218: e1a0e00f mov lr, pc 2521c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 25220: e59d3010 ldr r3, [sp, #16] 25224: e3530000 cmp r3, #0 if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 25228: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 2522c: 0a000004 beq 25244 25230: e593301c ldr r3, [r3, #28] 25234: e3530000 cmp r3, #0 25238: 11a00004 movne r0, r4 2523c: 11a0e00f movne lr, pc 25240: 112fff13 bxne r3 return result; } 25244: e1a00005 mov r0, r5 25248: e28dd018 add sp, sp, #24 2524c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00025250 : #include int chroot( const char *pathname ) { 25250: e92d4070 push {r4, r5, r6, lr} int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 25254: e59f50d4 ldr r5, [pc, #212] ; 25330 25258: e59f30d4 ldr r3, [pc, #212] ; 25334 2525c: e5954000 ldr r4, [r5] 25260: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 25264: e24dd018 sub sp, sp, #24 25268: e1a06000 mov r6, r0 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 2526c: 1a000007 bne 25290 rtems_libio_set_private_env(); /* try to set a new private env*/ 25270: eb000590 bl 268b8 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 25274: e5953000 ldr r3, [r5] 25278: e1530004 cmp r3, r4 2527c: 1a000003 bne 25290 rtems_set_errno_and_return_minus_one( ENOTSUP ); 25280: eb006450 bl 3e3c8 <__errno> <== NOT EXECUTED 25284: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25288: e5803000 str r3, [r0] <== NOT EXECUTED 2528c: ea000008 b 252b4 <== NOT EXECUTED } result = chdir(pathname); 25290: e1a00006 mov r0, r6 25294: ebffff76 bl 25074 if (result) { 25298: e250c000 subs ip, r0, #0 2529c: 0a000006 beq 252bc rtems_set_errno_and_return_minus_one( errno ); 252a0: eb006448 bl 3e3c8 <__errno> <== NOT EXECUTED 252a4: e1a04000 mov r4, r0 <== NOT EXECUTED 252a8: eb006446 bl 3e3c8 <__errno> <== NOT EXECUTED 252ac: e5903000 ldr r3, [r0] <== NOT EXECUTED 252b0: e5843000 str r3, [r4] <== NOT EXECUTED 252b4: e3e00000 mvn r0, #0 <== NOT EXECUTED 252b8: ea00001a b 25328 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 252bc: e1a0200c mov r2, ip 252c0: e59f0070 ldr r0, [pc, #112] ; 25338 252c4: e3a01001 mov r1, #1 252c8: e28d3004 add r3, sp, #4 252cc: e58dc000 str ip, [sp] 252d0: ebff88d9 bl 763c 252d4: e3500000 cmp r0, #0 252d8: 1afffff0 bne 252a0 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 252dc: e59f304c ldr r3, [pc, #76] ; 25330 252e0: e5930000 ldr r0, [r3] 252e4: e5903024 ldr r3, [r0, #36] ; 0x24 252e8: e3530000 cmp r3, #0 252ec: 0a000004 beq 25304 252f0: e593301c ldr r3, [r3, #28] 252f4: e3530000 cmp r3, #0 252f8: 12800018 addne r0, r0, #24 252fc: 11a0e00f movne lr, pc 25300: 112fff13 bxne r3 rtems_filesystem_root = loc; 25304: e59f3024 ldr r3, [pc, #36] ; 25330 25308: e28d4004 add r4, sp, #4 2530c: e593c000 ldr ip, [r3] 25310: e8b4000f ldm r4!, {r0, r1, r2, r3} 25314: e28cc018 add ip, ip, #24 25318: e8ac000f stmia ip!, {r0, r1, r2, r3} 2531c: e5943000 ldr r3, [r4] 25320: e58c3000 str r3, [ip] 25324: e3a00000 mov r0, #0 return 0; } 25328: e28dd018 add sp, sp, #24 2532c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000020c0 : rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 20c0: e59fc19c ldr ip, [pc, #412] ; 2264 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 20c4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 20c8: e59c4000 ldr r4, [ip] 20cc: e1500004 cmp r0, r4 return disktab [major].minor + minor; } static rtems_status_code create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr) { 20d0: e1a05000 mov r5, r0 20d4: e1a06001 mov r6, r1 20d8: e1a08002 mov r8, r2 20dc: e1a09003 mov r9, r3 rtems_device_major_number major = 0; rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { 20e0: 3a00000e bcc 2120 rtems_disk_device_table *table = disktab; rtems_device_major_number old_size = disktab_size; rtems_device_major_number new_size = 2 * old_size; 20e4: e1a07084 lsl r7, r4, #1 if (major >= new_size) { 20e8: e1500007 cmp r0, r7 new_size = major + 1; 20ec: 22857001 addcs r7, r5, #1 rtems_device_minor_number minor = 0; rtems_filesystem_split_dev_t(dev, major, minor); if (major >= disktab_size) { rtems_disk_device_table *table = disktab; 20f0: e59c0004 ldr r0, [ip, #4] if (major >= new_size) { new_size = major + 1; } table = realloc(table, new_size * sizeof(*table)); 20f4: e1a01187 lsl r1, r7, #3 20f8: eb0006cd bl 3c34 if (table == NULL) { 20fc: e250a000 subs sl, r0, #0 2100: 0a00004e beq 2240 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2104: e0642007 rsb r2, r4, r7 <== NOT EXECUTED 2108: e08a0184 add r0, sl, r4, lsl #3 <== NOT EXECUTED 210c: e1a02182 lsl r2, r2, #3 <== NOT EXECUTED 2110: e3a01000 mov r1, #0 <== NOT EXECUTED 2114: eb004291 bl 12b60 <== NOT EXECUTED disktab = table; 2118: e59f3144 ldr r3, [pc, #324] ; 2264 <== NOT EXECUTED disktab_size = new_size; 211c: e8830480 stm r3, {r7, sl} <== NOT EXECUTED } if (disktab [major].minor == NULL || minor >= disktab[major].size) { 2120: e59f313c ldr r3, [pc, #316] ; 2264 2124: e5933004 ldr r3, [r3, #4] 2128: e7930185 ldr r0, [r3, r5, lsl #3] 212c: e1a0a185 lsl sl, r5, #3 2130: e3500000 cmp r0, #0 2134: e083300a add r3, r3, sl 2138: 0a000002 beq 2148 213c: e5932004 ldr r2, [r3, #4] 2140: e1560002 cmp r6, r2 2144: 3a000013 bcc 2198 rtems_disk_device **table = disktab [major].minor; rtems_device_minor_number old_size = disktab [major].size; 2148: e593b004 ldr fp, [r3, #4] rtems_device_minor_number new_size = 0; if (old_size == 0) { 214c: e35b0000 cmp fp, #0 2150: 03a04008 moveq r4, #8 new_size = DISKTAB_INITIAL_SIZE; } else { new_size = 2 * old_size; 2154: 11a0408b lslne r4, fp, #1 } if (minor >= new_size) { 2158: e1560004 cmp r6, r4 new_size = minor + 1; 215c: 22864001 addcs r4, r6, #1 } table = realloc(table, new_size * sizeof(*table)); 2160: e1a01104 lsl r1, r4, #2 2164: eb0006b2 bl 3c34 if (table == NULL) { 2168: e2507000 subs r7, r0, #0 216c: 0a000033 beq 2240 return NULL; } memset(table + old_size, 0, (new_size - old_size) * sizeof(*table)); 2170: e06b2004 rsb r2, fp, r4 2174: e087010b add r0, r7, fp, lsl #2 2178: e1a02102 lsl r2, r2, #2 217c: e3a01000 mov r1, #0 2180: eb004276 bl 12b60 disktab [major].minor = table; 2184: e59f30d8 ldr r3, [pc, #216] ; 2264 2188: e5933004 ldr r3, [r3, #4] 218c: e083a00a add sl, r3, sl 2190: e7837185 str r7, [r3, r5, lsl #3] disktab [major].size = new_size; 2194: e58a4004 str r4, [sl, #4] } return disktab [major].minor + minor; 2198: e59f30c4 ldr r3, [pc, #196] ; 2264 219c: e5933004 ldr r3, [r3, #4] 21a0: e7937185 ldr r7, [r3, r5, lsl #3] 21a4: e0873106 add r3, r7, r6, lsl #2 { rtems_disk_device **dd_entry = create_disk_table_entry(dev); rtems_disk_device *dd = NULL; char *alloc_name = NULL; if (dd_entry == NULL) { 21a8: e3530000 cmp r3, #0 21ac: 0a000023 beq 2240 return RTEMS_NO_MEMORY; } if (*dd_entry != NULL) { 21b0: e7973106 ldr r3, [r7, r6, lsl #2] 21b4: e3530000 cmp r3, #0 21b8: 13a0000c movne r0, #12 21bc: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc} return RTEMS_RESOURCE_IN_USE; } dd = malloc(sizeof(*dd)); 21c0: e3a00034 mov r0, #52 ; 0x34 21c4: eb0003c8 bl 30ec if (dd == NULL) { 21c8: e2504000 subs r4, r0, #0 21cc: 0a00001b beq 2240 return RTEMS_NO_MEMORY; } if (name != NULL) { 21d0: e3580000 cmp r8, #0 21d4: 0a00000f beq 2218 alloc_name = strdup(name); 21d8: e1a00008 mov r0, r8 21dc: eb0043da bl 1314c if (alloc_name == NULL) { 21e0: e3500000 cmp r0, #0 if (dd == NULL) { return RTEMS_NO_MEMORY; } if (name != NULL) { alloc_name = strdup(name); 21e4: e1a08000 mov r8, r0 21e8: e1a0a000 mov sl, r0 if (alloc_name == NULL) { 21ec: 1a000015 bne 2248 free(dd); 21f0: e1a00004 mov r0, r4 <== NOT EXECUTED 21f4: eb0002f0 bl 2dbc <== NOT EXECUTED 21f8: e3a0001a mov r0, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 21fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { free(alloc_name); 2200: e1a00008 mov r0, r8 <== NOT EXECUTED 2204: eb0002ec bl 2dbc <== NOT EXECUTED free(dd); 2208: e1a00004 mov r0, r4 <== NOT EXECUTED 220c: eb0002ea bl 2dbc <== NOT EXECUTED 2210: e3a0000d mov r0, #13 <== NOT EXECUTED return RTEMS_UNSATISFIED; 2214: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2218: e1a0a008 mov sl, r8 } } dd->dev = dev; dd->name = alloc_name; dd->uses = 0; 221c: e3a00000 mov r0, #0 dd->deleted = false; *dd_entry = dd; 2220: e7874106 str r4, [r7, r6, lsl #2] free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 2224: e5845000 str r5, [r4] dd->name = alloc_name; dd->uses = 0; dd->deleted = false; *dd_entry = dd; *dd_ptr = dd; 2228: e5894000 str r4, [r9] return RTEMS_UNSATISFIED; } } dd->dev = dev; dd->name = alloc_name; 222c: e584a010 str sl, [r4, #16] free(dd); return RTEMS_UNSATISFIED; } } dd->dev = dev; 2230: e5846004 str r6, [r4, #4] dd->name = alloc_name; dd->uses = 0; 2234: e5840014 str r0, [r4, #20] dd->deleted = false; 2238: e5c40030 strb r0, [r4, #48] ; 0x30 *dd_entry = dd; *dd_ptr = dd; return RTEMS_SUCCESSFUL; 223c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 2240: e3a0001a mov r0, #26 } 2244: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return RTEMS_NO_MEMORY; } } if (name != NULL) { if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) { 2248: e59f1018 ldr r1, [pc, #24] ; 2268 224c: e1a02005 mov r2, r5 2250: e1a03006 mov r3, r6 2254: eb0003e6 bl 31f4 2258: e3500000 cmp r0, #0 225c: aaffffee bge 221c 2260: eaffffe6 b 2200 <== NOT EXECUTED =============================================================================== 00008158 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8158: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 815c: e3d27007 bics r7, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8160: e1a09000 mov r9, r0 8164: e1a04001 mov r4, r1 8168: e1a05003 mov r5, r3 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 816c: 0a000002 beq 817c rtems_set_errno_and_return_minus_one( EPERM ); 8170: eb00093e bl a670 <__errno> <== NOT EXECUTED 8174: e3a03001 mov r3, #1 <== NOT EXECUTED 8178: ea000005 b 8194 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 817c: e5936000 ldr r6, [r3] if (!device_name_table) 8180: e3560000 cmp r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8184: 159fa090 ldrne sl, [pc, #144] ; 821c if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 8188: 1a000019 bne 81f4 rtems_set_errno_and_return_minus_one( EFAULT ); 818c: eb000937 bl a670 <__errno> <== NOT EXECUTED 8190: e3a0300e mov r3, #14 <== NOT EXECUTED 8194: e5803000 str r3, [r0] <== NOT EXECUTED 8198: e3e00000 mvn r0, #0 <== NOT EXECUTED 819c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 81a0: e5968000 ldr r8, [r6] 81a4: e2581000 subs r1, r8, #0 81a8: 0a00000f beq 81ec continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 81ac: eb000ce5 bl b548 81b0: e3500000 cmp r0, #0 81b4: 1a00000c bne 81ec continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 81b8: e7d80004 ldrb r0, [r8, r4] 81bc: e3500000 cmp r0, #0 81c0: 1a000009 bne 81ec /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 81c4: e59f3054 ldr r3, [pc, #84] ; 8220 81c8: e5933000 ldr r3, [r3] 81cc: e5933028 ldr r3, [r3, #40] ; 0x28 81d0: e5853010 str r3, [r5, #16] if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 81d4: e59f3048 ldr r3, [pc, #72] ; 8224 81d8: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 81dc: e59f3044 ldr r3, [pc, #68] ; 8228 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 81e0: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 81e4: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 81e8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 81ec: e2877001 add r7, r7, #1 81f0: e2866014 add r6, r6, #20 81f4: e59a3000 ldr r3, [sl] 81f8: e1570003 cmp r7, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 81fc: e1a00009 mov r0, r9 8200: e1a02004 mov r2, r4 /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8204: 3affffe5 bcc 81a0 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8208: eb000918 bl a670 <__errno> 820c: e3a03002 mov r3, #2 8210: e5803000 str r3, [r0] 8214: e3e00000 mvn r0, #0 } 8218: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 000012a4 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 12a4: e92d40f0 push {r4, r5, r6, r7, lr} rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 12a8: e59f7058 ldr r7, [pc, #88] ; 1308 12ac: e5973000 ldr r3, [r7] 12b0: e3a06014 mov r6, #20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 12b4: e1a04000 mov r4, r0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 12b8: e0000396 mul r0, r6, r3 12bc: eb001a79 bl 7ca8 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 12c0: e2505000 subs r5, r0, #0 12c4: 1a000004 bne 12dc rtems_set_errno_and_return_minus_one( ENOMEM ); 12c8: eb0024e8 bl a670 <__errno> <== NOT EXECUTED 12cc: e3a0300c mov r3, #12 <== NOT EXECUTED 12d0: e5803000 str r3, [r0] <== NOT EXECUTED 12d4: e3e00000 mvn r0, #0 <== NOT EXECUTED 12d8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( 12dc: e5972000 ldr r2, [r7] 12e0: e3a01000 mov r1, #0 12e4: e0020296 mul r2, r6, r2 12e8: eb00270e bl af28 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 12ec: e59f3018 ldr r3, [pc, #24] ; 130c temp_mt_entry->mt_fs_root.ops = &devFS_ops; 12f0: e2832038 add r2, r3, #56 ; 0x38 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 12f4: e584501c str r5, [r4, #28] sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; temp_mt_entry->mt_fs_root.ops = &devFS_ops; 12f8: e5842028 str r2, [r4, #40] ; 0x28 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 12fc: e5843024 str r3, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 1300: e3a00000 mov r0, #0 return 0; } 1304: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00001310 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 1310: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 1314: e1a04000 mov r4, r0 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 1318: e5d00000 ldrb r0, [r0] 131c: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 1320: e1a05001 mov r5, r1 1324: e58d2000 str r2, [sp] 1328: e1a09003 mov r9, r3 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 132c: 1a000008 bne 1354 1330: e5d43001 ldrb r3, [r4, #1] 1334: e3530065 cmp r3, #101 ; 0x65 1338: 1a000005 bne 1354 (path[2] == 'v') && (path[3] == '\0')) 133c: e5d43002 ldrb r3, [r4, #2] 1340: e3530076 cmp r3, #118 ; 0x76 1344: 1a000002 bne 1354 1348: e5d40003 ldrb r0, [r4, #3] 134c: e3500000 cmp r0, #0 1350: 0a000039 beq 143c return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 1354: e205aa0f and sl, r5, #61440 ; 0xf000 1358: e35a0a02 cmp sl, #8192 ; 0x2000 135c: 135a0a06 cmpne sl, #24576 ; 0x6000 1360: 03a0a000 moveq sl, #0 1364: 13a0a001 movne sl, #1 1368: 0a000002 beq 1378 rtems_set_errno_and_return_minus_one( EINVAL ); 136c: eb0024bf bl a670 <__errno> <== NOT EXECUTED 1370: e3a03016 mov r3, #22 <== NOT EXECUTED 1374: ea000008 b 139c <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 1378: e59d3028 ldr r3, [sp, #40] ; 0x28 137c: e5936000 ldr r6, [r3] if (!device_name_table) 1380: e3560000 cmp r6, #0 1384: 13e07000 mvnne r7, #0 1388: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 138c: 159fb0ac ldrne fp, [pc, #172] ; 1440 1390: 1a000010 bne 13d8 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 1394: eb0024b5 bl a670 <__errno> <== NOT EXECUTED 1398: e3a0300e mov r3, #14 <== NOT EXECUTED 139c: e5803000 str r3, [r0] <== NOT EXECUTED 13a0: e3e00000 mvn r0, #0 <== NOT EXECUTED 13a4: ea000024 b 143c <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 13a8: e796300a ldr r3, [r6, sl] 13ac: e2531000 subs r1, r3, #0 13b0: 0a000005 beq 13cc slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 13b4: eb002783 bl b1c8 <== NOT EXECUTED 13b8: e3500000 cmp r0, #0 <== NOT EXECUTED 13bc: 1a000003 bne 13d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 13c0: eb0024aa bl a670 <__errno> <== NOT EXECUTED 13c4: e3a03011 mov r3, #17 <== NOT EXECUTED 13c8: eafffff3 b 139c <== NOT EXECUTED 13cc: e1a07008 mov r7, r8 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 13d0: e2888001 add r8, r8, #1 13d4: e28aa014 add sl, sl, #20 13d8: e59b3000 ldr r3, [fp] 13dc: e1580003 cmp r8, r3 if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 13e0: e1a00004 mov r0, r4 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 13e4: 3affffef bcc 13a8 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 13e8: e3770001 cmn r7, #1 13ec: 1a000004 bne 1404 rtems_set_errno_and_return_minus_one( ENOMEM ); 13f0: eb00249e bl a670 <__errno> <== NOT EXECUTED 13f4: e3a0300c mov r3, #12 <== NOT EXECUTED 13f8: e5803000 str r3, [r0] <== NOT EXECUTED 13fc: e1a00007 mov r0, r7 <== NOT EXECUTED 1400: ea00000d b 143c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1404: e10f8000 mrs r8, CPSR 1408: e3883080 orr r3, r8, #128 ; 0x80 140c: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 1410: e3a02014 mov r2, #20 1414: e0030792 mul r3, r2, r7 device_name_table[slot].device_name_length = strlen(path); 1418: e1a00004 mov r0, r4 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 141c: e7864003 str r4, [r6, r3] 1420: e0866003 add r6, r6, r3 device_name_table[slot].device_name_length = strlen(path); 1424: eb00282f bl b4e8 device_name_table[slot].major = major; 1428: e59d3000 ldr r3, [sp] device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 142c: e5865010 str r5, [r6, #16] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); 1430: e9860209 stmib r6, {r0, r3, r9} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1434: e129f008 msr CPSR_fc, r8 1438: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 143c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000014c0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 14c0: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED 14c4: e1a03000 mov r3, r0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 14c8: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 14cc: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; 14d0: e3a02000 mov r2, #0 <== NOT EXECUTED 14d4: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 14d8: e58d0014 str r0, [sp, #20] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 14dc: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; 14e0: e283c00c add ip, r3, #12 <== NOT EXECUTED 14e4: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; 14e8: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 14ec: e2820008 add r0, r2, #8 <== NOT EXECUTED 14f0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 14f4: e1a0200d mov r2, sp <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; args.offset = iop->offset; 14f8: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; args.iop = iop; 14fc: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 1500: eb000f83 bl 5314 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 1504: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 1508: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 150c: 1b001b46 blne 822c <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 1510: e28dd01c add sp, sp, #28 <== NOT EXECUTED 1514: e8bd8800 pop {fp, pc} <== NOT EXECUTED =============================================================================== 00001518 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 1518: e5903000 ldr r3, [r0] if (!the_dev) 151c: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 1520: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) 1524: 1a000004 bne 153c rtems_set_errno_and_return_minus_one( EFAULT ); 1528: eb002450 bl a670 <__errno> <== NOT EXECUTED 152c: e3a0300e mov r3, #14 <== NOT EXECUTED 1530: e5803000 str r3, [r0] <== NOT EXECUTED 1534: e3e00000 mvn r0, #0 <== NOT EXECUTED 1538: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); buf->st_mode = the_dev->mode; 153c: e5930010 ldr r0, [r3, #16] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 1540: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 1544: e5933008 ldr r3, [r3, #8] 1548: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; 154c: e581000c str r0, [r1, #12] the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 1550: e5813018 str r3, [r1, #24] buf->st_mode = the_dev->mode; 1554: e3a00000 mov r0, #0 return 0; } 1558: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000d15c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { d15c: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d160: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; d164: e280c00c add ip, r0, #12 d168: e89c1800 ldm ip, {fp, ip} args.buffer = buffer; args.count = count; args.flags = iop->flags; d16c: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; d170: e98d1800 stmib sp, {fp, ip} args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; d174: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; d178: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; d17c: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; d180: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; d184: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; d188: e5903038 ldr r3, [r0, #56] ; 0x38 args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( d18c: e1a0200d mov r2, sp d190: e2830050 add r0, r3, #80 ; 0x50 d194: e8900003 ldm r0, {r0, r1} d198: eb00047d bl e394 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) d19c: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; d1a0: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); d1a4: 1b000501 blne e5b0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } d1a8: e28dd01c add sp, sp, #28 <== NOT EXECUTED d1ac: e8bd8800 pop {fp, pc} <== NOT EXECUTED =============================================================================== 00001d80 : static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 1d80: e59f3020 ldr r3, [pc, #32] ; 1da8 1d84: e3a02000 mov r2, #0 } } static void disk_unlock(void) { 1d88: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; sc = rtems_semaphore_release(diskdevs_mutex); 1d8c: e5930008 ldr r0, [r3, #8] static void disk_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; diskdevs_protected = false; 1d90: e5c3200c strb r2, [r3, #12] sc = rtems_semaphore_release(diskdevs_mutex); 1d94: eb0011c0 bl 649c if (sc != RTEMS_SUCCESSFUL) { 1d98: e3500000 cmp r0, #0 1d9c: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* FIXME: Error number */ rtems_fatal_error_occurred(0xdeadbeef); 1da0: e59f0004 ldr r0, [pc, #4] ; 1dac <== NOT EXECUTED 1da4: eb0012e5 bl 6940 <== NOT EXECUTED =============================================================================== 00003aa0 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 3aa0: e59030b4 ldr r3, [r0, #180] ; 0xb4 3aa4: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 3aa8: e92d4030 push {r4, r5, lr} 3aac: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 3ab0: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3ab4: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3ab8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3abc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 3ac0: e3a05002 mov r5, #2 <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 3ac4: ea00000a b 3af4 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 3ac8: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3acc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 3ad0: e3a01000 mov r1, #0 <== NOT EXECUTED 3ad4: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 3ad8: e1a02001 mov r2, r1 <== NOT EXECUTED 3adc: eb0005ae bl 519c <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3ae0: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3ae4: 1b000730 blne 57ac <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3ae8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3aec: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3af0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 3af4: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 3af8: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 3afc: e1510002 cmp r1, r2 <== NOT EXECUTED 3b00: 1afffff0 bne 3ac8 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3b04: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 3b08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 00002568 : int dup2( int fildes, int fildes2 ) { 2568: e92d4070 push {r4, r5, r6, lr} 256c: e24dd048 sub sp, sp, #72 ; 0x48 2570: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2574: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 2578: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 257c: eb000181 bl 2b88 if ( status == -1 ) 2580: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2584: e1a0500d mov r5, sp if ( status == -1 ) 2588: 0a000009 beq 25b4 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 258c: e1a0100d mov r1, sp 2590: e1a00004 mov r0, r4 2594: eb00017b bl 2b88 if ( status == -1 ) 2598: e3700001 cmn r0, #1 259c: 0a000004 beq 25b4 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 25a0: e1a00006 mov r0, r6 <== NOT EXECUTED 25a4: e1a02004 mov r2, r4 <== NOT EXECUTED 25a8: e3a01000 mov r1, #0 <== NOT EXECUTED 25ac: eb00007b bl 27a0 <== NOT EXECUTED 25b0: ea000000 b 25b8 <== NOT EXECUTED 25b4: e3e00000 mvn r0, #0 } 25b8: e28dd048 add sp, sp, #72 ; 0x48 25bc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000035a0 : * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 35a0: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 35a4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 35a8: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 35ac: e1a04001 mov r4, r1 <== NOT EXECUTED 35b0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 35b4: 0a000015 beq 3610 <== NOT EXECUTED 35b8: e59f305c ldr r3, [pc, #92] ; 361c <== NOT EXECUTED 35bc: e5933000 ldr r3, [r3] <== NOT EXECUTED 35c0: e0833000 add r3, r3, r0 <== NOT EXECUTED 35c4: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 35c8: e2503009 subs r3, r0, #9 <== NOT EXECUTED 35cc: 13a03001 movne r3, #1 <== NOT EXECUTED 35d0: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 35d4: 0a00000d beq 3610 <== NOT EXECUTED 35d8: e350000a cmp r0, #10 <== NOT EXECUTED 35dc: 0a00000b beq 3610 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 35e0: e2203040 eor r3, r0, #64 ; 0x40 <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 35e4: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 35e8: e1a0000d mov r0, sp <== NOT EXECUTED 35ec: e3a01002 mov r1, #2 <== NOT EXECUTED 35f0: e1a02004 mov r2, r4 <== NOT EXECUTED { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 35f4: e5cd3001 strb r3, [sp, #1] <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 35f8: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 35fc: ebffff50 bl 3344 <== NOT EXECUTED tty->column += 2; 3600: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3604: e2833002 add r3, r3, #2 <== NOT EXECUTED 3608: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 360c: ea000001 b 3618 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 3610: e1a01004 mov r1, r4 <== NOT EXECUTED 3614: ebffff8b bl 3448 <== NOT EXECUTED } } 3618: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED =============================================================================== 000256cc : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 256cc: e59f300c ldr r3, [pc, #12] ; 256e0 <== NOT EXECUTED 256d0: e5930000 ldr r0, [r3] <== NOT EXECUTED 256d4: e3500000 cmp r0, #0 <== NOT EXECUTED 256d8: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 256dc: ea006386 b 3e4fc <== NOT EXECUTED =============================================================================== 000256e4 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 256e4: e59f300c ldr r3, [pc, #12] ; 256f8 <== NOT EXECUTED 256e8: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 256ec: e3500000 cmp r0, #0 <== NOT EXECUTED 256f0: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 256f4: ea006380 b 3e4fc <== NOT EXECUTED =============================================================================== 00003620 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 3620: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 3624: e3530000 cmp r3, #0 <== NOT EXECUTED * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { 3628: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 362c: e1a04000 mov r4, r0 <== NOT EXECUTED 3630: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 3634: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 3638: e3510000 cmp r1, #0 <== NOT EXECUTED 363c: 0a000062 beq 37cc <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 3640: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 3644: e2132008 ands r2, r3, #8 <== NOT EXECUTED tty->ccount = 0; 3648: 05802020 streq r2, [r0, #32] <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 364c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 3650: e2133010 ands r3, r3, #16 <== NOT EXECUTED 3654: 1a00005c bne 37cc <== NOT EXECUTED tty->ccount = 0; 3658: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 365c: e1a01004 mov r1, r4 <== NOT EXECUTED 3660: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 3664: ebffffcd bl 35a0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 3668: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 366c: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 3670: 11a01004 movne r1, r4 <== NOT EXECUTED 3674: 13a0000a movne r0, #10 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 3678: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 367c: ea00000c b 36b4 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3680: e2411001 sub r1, r1, #1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 3684: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3688: e5841020 str r1, [r4, #32] <== NOT EXECUTED 368c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 3690: e3130008 tst r3, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3694: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 3698: 0a000048 beq 37c0 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 369c: e3570000 cmp r7, #0 <== NOT EXECUTED 36a0: 1a000005 bne 36bc <== NOT EXECUTED 36a4: e3130010 tst r3, #16 <== NOT EXECUTED 36a8: 1a000003 bne 36bc <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 36ac: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 36b0: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 36b4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 36b8: eaffffb8 b 35a0 <== NOT EXECUTED } else if (c == '\t') { 36bc: e3550009 cmp r5, #9 <== NOT EXECUTED 36c0: 1a000020 bne 3748 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 36c4: e2033c02 and r3, r3, #512 ; 0x200 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 36c8: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 36cc: e596c000 ldr ip, [r6] <== NOT EXECUTED 36d0: e3a02000 mov r2, #0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 36d4: ea00000d b 3710 <== NOT EXECUTED c = tty->cbuf[i++]; 36d8: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 36dc: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED if (c == '\t') { 36e0: e3500009 cmp r0, #9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 36e4: e08c8000 add r8, ip, r0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 36e8: 03855007 orreq r5, r5, #7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 36ec: 0a000005 beq 3708 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 36f0: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 36f4: e3100020 tst r0, #32 <== NOT EXECUTED 36f8: 0a000002 beq 3708 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 36fc: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 3700: 12855002 addne r5, r5, #2 <== NOT EXECUTED 3704: ea000000 b 370c <== NOT EXECUTED } else { col++; 3708: e2855001 add r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 370c: e2822001 add r2, r2, #1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3710: e1520001 cmp r2, r1 <== NOT EXECUTED 3714: 1affffef bne 36d8 <== NOT EXECUTED 3718: ea000006 b 3738 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 371c: e59f00bc ldr r0, [pc, #188] ; 37e0 <== NOT EXECUTED 3720: e3a01001 mov r1, #1 <== NOT EXECUTED 3724: e1a02004 mov r2, r4 <== NOT EXECUTED 3728: ebffff05 bl 3344 <== NOT EXECUTED tty->column--; 372c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3730: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3734: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 3738: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 373c: e1530005 cmp r3, r5 <== NOT EXECUTED 3740: cafffff5 bgt 371c <== NOT EXECUTED 3744: ea00001d b 37c0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 3748: e5962000 ldr r2, [r6] <== NOT EXECUTED 374c: e2855001 add r5, r5, #1 <== NOT EXECUTED 3750: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 3754: e3120020 tst r2, #32 <== NOT EXECUTED 3758: 0a000009 beq 3784 <== NOT EXECUTED 375c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3760: 0a000007 beq 3784 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 3764: e59f0078 ldr r0, [pc, #120] ; 37e4 <== NOT EXECUTED 3768: e3a01003 mov r1, #3 <== NOT EXECUTED 376c: e1a02004 mov r2, r4 <== NOT EXECUTED 3770: ebfffef3 bl 3344 <== NOT EXECUTED if (tty->column) 3774: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3778: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 377c: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3780: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 3784: e5963000 ldr r3, [r6] <== NOT EXECUTED 3788: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 378c: e3130020 tst r3, #32 <== NOT EXECUTED 3790: 0a000002 beq 37a0 <== NOT EXECUTED 3794: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3798: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 379c: 0a000007 beq 37c0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 37a0: e59f003c ldr r0, [pc, #60] ; 37e4 <== NOT EXECUTED 37a4: e3a01003 mov r1, #3 <== NOT EXECUTED 37a8: e1a02004 mov r2, r4 <== NOT EXECUTED 37ac: ebfffee4 bl 3344 <== NOT EXECUTED if (tty->column) 37b0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 37b4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 37b8: 12433001 subne r3, r3, #1 <== NOT EXECUTED 37bc: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 37c0: e3570000 cmp r7, #0 <== NOT EXECUTED 37c4: 1a000001 bne 37d0 <== NOT EXECUTED 37c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 37cc: e59f6014 ldr r6, [pc, #20] ; 37e8 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 37d0: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 37d4: e3510000 cmp r1, #0 <== NOT EXECUTED 37d8: 1affffa8 bne 3680 <== NOT EXECUTED 37dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 000229d4 : #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 229d4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 229d8: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 229dc: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 229e0: e3500000 cmp r0, #0 <== NOT EXECUTED #include "fat_fat_operations.h" int fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type, rtems_bdbuf_buffer **buf) { 229e4: e1a05001 mov r5, r1 <== NOT EXECUTED 229e8: e1a07002 mov r7, r2 <== NOT EXECUTED 229ec: e1a0a003 mov sl, r3 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 229f0: 1a00000f bne 22a34 <== NOT EXECUTED { if (op_type == FAT_OP_TYPE_READ) 229f4: e3520001 cmp r2, #1 <== NOT EXECUTED 229f8: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 229fc: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22a00: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 22a04: 1a000002 bne 22a14 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 22a08: e1a02005 mov r2, r5 <== NOT EXECUTED 22a0c: ebff8a35 bl 52e8 <== NOT EXECUTED 22a10: ea000001 b 22a1c <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 22a14: e1a02005 mov r2, r5 <== NOT EXECUTED 22a18: ebff89ff bl 521c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22a1c: e3500000 cmp r0, #0 <== NOT EXECUTED 22a20: 1a000058 bne 22b88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; 22a24: e3a03001 mov r3, #1 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.modified = 0; 22a28: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 22a2c: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 22a30: e584507c str r5, [r4, #124] ; 0x7c <== NOT EXECUTED fs_info->c.modified = 0; fs_info->c.state = FAT_CACHE_ACTUAL; } sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 22a34: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 22a38: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 22a3c: e1530002 cmp r3, r2 <== NOT EXECUTED 22a40: 33a06000 movcc r6, #0 <== NOT EXECUTED 22a44: 3a000003 bcc 22a58 <== NOT EXECUTED 22a48: e594601c ldr r6, [r4, #28] <== NOT EXECUTED 22a4c: e1530006 cmp r3, r6 <== NOT EXECUTED 22a50: 23a06000 movcs r6, #0 <== NOT EXECUTED 22a54: 33a06001 movcc r6, #1 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 22a58: e1530005 cmp r3, r5 <== NOT EXECUTED 22a5c: 0a00004e beq 22b9c <== NOT EXECUTED { if (fs_info->c.modified) 22a60: e5d48080 ldrb r8, [r4, #128] ; 0x80 <== NOT EXECUTED 22a64: e3580000 cmp r8, #0 <== NOT EXECUTED 22a68: 0a000032 beq 22b38 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 22a6c: e21660ff ands r6, r6, #255 ; 0xff <== NOT EXECUTED 22a70: 0a000006 beq 22a90 <== NOT EXECUTED 22a74: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 22a78: e3530000 cmp r3, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 22a7c: 05943084 ldreq r3, [r4, #132] ; 0x84 <== NOT EXECUTED 22a80: 05940088 ldreq r0, [r4, #136] ; 0x88 <== NOT EXECUTED 22a84: 05931020 ldreq r1, [r3, #32] <== NOT EXECUTED 22a88: 01d420b0 ldrheq r2, [r4] <== NOT EXECUTED 22a8c: 0b007afd bleq 41688 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 22a90: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 22a94: ebff85b1 bl 4160 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 22a98: e3a03000 mov r3, #0 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 22a9c: e3500000 cmp r0, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; 22aa0: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 22aa4: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 22aa8: 1a000036 bne 22b88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 22aac: e3560000 cmp r6, #0 <== NOT EXECUTED 22ab0: 0a000025 beq 22b4c <== NOT EXECUTED 22ab4: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 22ab8: e3530000 cmp r3, #0 <== NOT EXECUTED 22abc: 03a06001 moveq r6, #1 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 22ac0: 01a0800d moveq r8, sp <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 22ac4: 0a000016 beq 22b24 <== NOT EXECUTED 22ac8: ea00001f b 22b4c <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 22acc: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED 22ad0: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 22ad4: e0222691 mla r2, r1, r6, r2 <== NOT EXECUTED 22ad8: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 22adc: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22ae0: ebff89cd bl 521c <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 22ae4: e3500000 cmp r0, #0 <== NOT EXECUTED 22ae8: 1a000008 bne 22b10 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 22aec: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22af0: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 22af4: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 22af8: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 22afc: eb007ae1 bl 41688 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 22b00: e59d0000 ldr r0, [sp] <== NOT EXECUTED 22b04: ebff8595 bl 4160 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 22b08: e3500000 cmp r0, #0 <== NOT EXECUTED 22b0c: 0a000002 beq 22b1c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 22b10: eb006e2c bl 3e3c8 <__errno> <== NOT EXECUTED 22b14: e3a0300c mov r3, #12 <== NOT EXECUTED 22b18: ea00001c b 22b90 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 22b1c: e2866001 add r6, r6, #1 <== NOT EXECUTED 22b20: e20660ff and r6, r6, #255 ; 0xff <== NOT EXECUTED 22b24: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED 22b28: e1520006 cmp r2, r6 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 22b2c: e1a0300d mov r3, sp <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 22b30: 8affffe5 bhi 22acc <== NOT EXECUTED 22b34: ea000004 b 22b4c <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 22b38: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 22b3c: ebff85a9 bl 41e8 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 22b40: e3500000 cmp r0, #0 <== NOT EXECUTED } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 22b44: e5c48081 strb r8, [r4, #129] ; 0x81 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22b48: 1a00000e bne 22b88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 22b4c: e3570001 cmp r7, #1 <== NOT EXECUTED 22b50: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 22b54: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22b58: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 22b5c: 1a000002 bne 22b6c <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 22b60: e1a02005 mov r2, r5 <== NOT EXECUTED 22b64: ebff89df bl 52e8 <== NOT EXECUTED 22b68: ea000001 b 22b74 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 22b6c: e1a02005 mov r2, r5 <== NOT EXECUTED 22b70: ebff89a9 bl 521c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22b74: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; 22b78: 03a03001 moveq r3, #1 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.blk_num = blk; 22b7c: 0584507c streq r5, [r4, #124] ; 0x7c <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 22b80: 05c43081 strbeq r3, [r4, #129] ; 0x81 <== NOT EXECUTED } if (op_type == FAT_OP_TYPE_READ) sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) 22b84: 0a000004 beq 22b9c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 22b88: eb006e0e bl 3e3c8 <__errno> <== NOT EXECUTED 22b8c: e3a03005 mov r3, #5 <== NOT EXECUTED 22b90: e5803000 str r3, [r0] <== NOT EXECUTED 22b94: e3e00000 mvn r0, #0 <== NOT EXECUTED 22b98: ea000002 b 22ba8 <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; 22b9c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 22ba0: e58a3000 str r3, [sl] <== NOT EXECUTED 22ba4: e3a00000 mov r0, #0 <== NOT EXECUTED return RC_OK; } 22ba8: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00022894 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 22894: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED 22898: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; uint8_t i; bool sec_of_fat; if (fs_info->c.state == FAT_CACHE_EMPTY) 2289c: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 228a0: e3500000 cmp r0, #0 <== NOT EXECUTED 228a4: 0a000047 beq 229c8 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 228a8: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 228ac: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 228b0: e1530002 cmp r3, r2 <== NOT EXECUTED 228b4: 33a05000 movcc r5, #0 <== NOT EXECUTED 228b8: 3a000003 bcc 228cc <== NOT EXECUTED 228bc: e594501c ldr r5, [r4, #28] <== NOT EXECUTED 228c0: e1530005 cmp r3, r5 <== NOT EXECUTED 228c4: 23a05000 movcs r5, #0 <== NOT EXECUTED 228c8: 33a05001 movcc r5, #1 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 228cc: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 228d0: e3530000 cmp r3, #0 <== NOT EXECUTED 228d4: 0a000032 beq 229a4 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 228d8: e21550ff ands r5, r5, #255 ; 0xff <== NOT EXECUTED 228dc: 0a000006 beq 228fc <== NOT EXECUTED 228e0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 228e4: e3530000 cmp r3, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 228e8: 05943084 ldreq r3, [r4, #132] ; 0x84 <== NOT EXECUTED 228ec: 05940088 ldreq r0, [r4, #136] ; 0x88 <== NOT EXECUTED 228f0: 05931020 ldreq r1, [r3, #32] <== NOT EXECUTED 228f4: 01d420b0 ldrheq r2, [r4] <== NOT EXECUTED 228f8: 0b007b62 bleq 41688 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(fs_info->c.buf); 228fc: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 22900: ebff8616 bl 4160 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22904: e3500000 cmp r0, #0 <== NOT EXECUTED 22908: 1a000029 bne 229b4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 2290c: e3550000 cmp r5, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; 22910: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 22914: 0a000029 beq 229c0 <== NOT EXECUTED 22918: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 2291c: e3530000 cmp r3, #0 <== NOT EXECUTED 22920: 03a05001 moveq r5, #1 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 22924: 01a0600d moveq r6, sp <== NOT EXECUTED sc = rtems_bdbuf_release_modified(fs_info->c.buf); if (sc != RTEMS_SUCCESSFUL) rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 22928: 0a000018 beq 22990 <== NOT EXECUTED 2292c: ea000023 b 229c0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 22930: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED 22934: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 22938: e0222591 mla r2, r1, r5, r2 <== NOT EXECUTED 2293c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 22940: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22944: ebff8a34 bl 521c <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 22948: e3500000 cmp r0, #0 <== NOT EXECUTED 2294c: 0a000004 beq 22964 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 22950: eb006e9c bl 3e3c8 <__errno> <== NOT EXECUTED 22954: e3a0300c mov r3, #12 <== NOT EXECUTED 22958: e5803000 str r3, [r0] <== NOT EXECUTED 2295c: e3e00000 mvn r0, #0 <== NOT EXECUTED 22960: ea000018 b 229c8 <== NOT EXECUTED memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 22964: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22968: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2296c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 22970: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 22974: eb007b43 bl 41688 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 22978: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2297c: ebff85f7 bl 4160 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 22980: e3500000 cmp r0, #0 <== NOT EXECUTED 22984: 1afffff1 bne 22950 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 22988: e2855001 add r5, r5, #1 <== NOT EXECUTED 2298c: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED 22990: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED 22994: e1520005 cmp r2, r5 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 22998: e1a0300d mov r3, sp <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2299c: 8affffe3 bhi 22930 <== NOT EXECUTED 229a0: ea000006 b 229c0 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 229a4: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 229a8: ebff860e bl 41e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 229ac: e3500000 cmp r0, #0 <== NOT EXECUTED 229b0: 0a000002 beq 229c0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 229b4: eb006e83 bl 3e3c8 <__errno> <== NOT EXECUTED 229b8: e3a03005 mov r3, #5 <== NOT EXECUTED 229bc: eaffffe5 b 22958 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 229c0: e3a00000 mov r0, #0 <== NOT EXECUTED 229c4: e5c40081 strb r0, [r4, #129] ; 0x81 <== NOT EXECUTED return RC_OK; } 229c8: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00023518 : uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 23518: e2513000 subs r3, r1, #0 <== NOT EXECUTED fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2351c: e1a0c002 mov ip, r2 <== NOT EXECUTED 23520: e92d4001 push {r0, lr} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 23524: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 23528: 1a000003 bne 2353c <== NOT EXECUTED 2352c: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 23530: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 23534: 1592101c ldrne r1, [r2, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 23538: 1a000003 bne 2354c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2353c: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 23540: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 23544: e2433002 sub r3, r3, #2 <== NOT EXECUTED 23548: e08e1113 add r1, lr, r3, lsl r1 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_read(mt_entry, fsec, 0, 2354c: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 23550: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 23554: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 23558: e3a02000 mov r2, #0 <== NOT EXECUTED 2355c: e58dc000 str ip, [sp] <== NOT EXECUTED 23560: ebfffe4c bl 22e98 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 23564: e8bd8008 pop {r3, pc} <== NOT EXECUTED =============================================================================== 00022da0 : uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22da0: e2513000 subs r3, r1, #0 <== NOT EXECUTED fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 22da4: e1a0c002 mov ip, r2 <== NOT EXECUTED 22da8: e92d4001 push {r0, lr} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 22dac: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 22db0: 1a000003 bne 22dc4 <== NOT EXECUTED 22db4: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 22db8: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 22dbc: 1592101c ldrne r1, [r2, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22dc0: 1a000003 bne 22dd4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22dc4: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 22dc8: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 22dcc: e2433002 sub r3, r3, #2 <== NOT EXECUTED 22dd0: e08e1113 add r1, lr, r3, lsl r1 <== NOT EXECUTED uint32_t fsec = 0; fsec = fat_cluster_num_to_sector_num(mt_entry, cln); return _fat_block_write(mt_entry, fsec, 0, 22dd4: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 22dd8: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 22ddc: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 22de0: e3a02000 mov r2, #0 <== NOT EXECUTED 22de4: e58dc000 str ip, [sp] <== NOT EXECUTED 22de8: ebffff6f bl 22bac <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 22dec: e8bd8008 pop {r3, pc} <== NOT EXECUTED =============================================================================== 00022c5c : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 22c5c: e92d4077 push {r0, r1, r2, r4, r5, r6, lr} <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 22c60: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 22c64: e1d533bc ldrh r3, [r5, #60] ; 0x3c <== NOT EXECUTED 22c68: e28dc008 add ip, sp, #8 <== NOT EXECUTED ssize_t ret1 = 0, ret2 = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t le_free_count = 0; uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); 22c6c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 22c70: e58d2004 str r2, [sp, #4] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 22c74: e1a01003 mov r1, r3 <== NOT EXECUTED 22c78: e3a02f7a mov r2, #488 ; 0x1e8 <== NOT EXECUTED 22c7c: e3a03004 mov r3, #4 <== NOT EXECUTED fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 22c80: e1a04000 mov r4, r0 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 22c84: e58dc000 str ip, [sp] <== NOT EXECUTED 22c88: ebffffc7 bl 22bac <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 22c8c: e3a03004 mov r3, #4 <== NOT EXECUTED 22c90: e1d513bc ldrh r1, [r5, #60] ; 0x3c <== NOT EXECUTED 22c94: e08dc003 add ip, sp, r3 <== NOT EXECUTED uint32_t le_next_free = 0; le_free_count = CT_LE_L(free_count); le_next_free = CT_LE_L(next_free); ret1 = _fat_block_write(mt_entry, 22c98: e1a06000 mov r6, r0 <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_FREE_CLUSTER_COUNT_OFFSET, 4, (char *)(&le_free_count)); ret2 = _fat_block_write(mt_entry, 22c9c: e3a02f7b mov r2, #492 ; 0x1ec <== NOT EXECUTED 22ca0: e1a00004 mov r0, r4 <== NOT EXECUTED 22ca4: e58dc000 str ip, [sp] <== NOT EXECUTED 22ca8: ebffffbf bl 22bac <_fat_block_write> <== NOT EXECUTED fs_info->vol.info_sec, FAT_FSINFO_NEXT_FREE_CLUSTER_OFFSET, 4, (char *)(&le_next_free)); if ( (ret1 < 0) || (ret2 < 0) ) 22cac: e1a06fa6 lsr r6, r6, #31 <== NOT EXECUTED 22cb0: e1960fa0 orrs r0, r6, r0, lsr #31 <== NOT EXECUTED return -1; return RC_OK; } 22cb4: 13e00000 mvnne r0, #0 <== NOT EXECUTED 22cb8: e8bd807e pop {r1, r2, r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 000224a8 : /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 224a8: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 224ac: e3530001 cmp r3, #1 <== NOT EXECUTED int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 224b0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 224b4: e1a04001 mov r4, r1 <== NOT EXECUTED 224b8: e1a05000 mov r5, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 224bc: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED /* * if links_num field of fat-file descriptor is greater than 1 * decrement the count of links and return */ if (fat_fd->links_num > 1) 224c0: 9a000003 bls 224d4 <== NOT EXECUTED { fat_fd->links_num--; 224c4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 224c8: e5813008 str r3, [r1, #8] <== NOT EXECUTED 224cc: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 224d0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED } key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname); if (fat_fd->flags & FAT_FILE_REMOVED) 224d4: e5d17030 ldrb r7, [r1, #48] ; 0x30 <== NOT EXECUTED 224d8: e2177001 ands r7, r7, #1 <== NOT EXECUTED 224dc: 0a00000e beq 2251c <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 224e0: e3a02000 mov r2, #0 <== NOT EXECUTED 224e4: ebfffe36 bl 21dc4 <== NOT EXECUTED if ( rc != RC_OK ) 224e8: e3500000 cmp r0, #0 <== NOT EXECUTED 224ec: 18bd80f0 popne {r4, r5, r6, r7, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 224f0: e1a00004 mov r0, r4 <== NOT EXECUTED 224f4: ebffa7e4 bl c48c <_Chain_Extract> <== NOT EXECUTED return rc; _hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd); if ( fat_ino_is_unique(mt_entry, fat_fd->ino) ) 224f8: e1a00005 mov r0, r5 <== NOT EXECUTED 224fc: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 22500: eb0000af bl 227c4 <== NOT EXECUTED 22504: e3500000 cmp r0, #0 <== NOT EXECUTED 22508: 0a00000a beq 22538 <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 2250c: e1a00005 mov r0, r5 <== NOT EXECUTED 22510: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 22514: eb0000a0 bl 2279c <== NOT EXECUTED 22518: ea000006 b 22538 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 2251c: e591100c ldr r1, [r1, #12] <== NOT EXECUTED 22520: eb0000a7 bl 227c4 <== NOT EXECUTED 22524: e3500000 cmp r0, #0 <== NOT EXECUTED { fat_fd->links_num = 0; 22528: 15847008 strne r7, [r4, #8] <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 2252c: 1a000003 bne 22540 <== NOT EXECUTED 22530: e1a00004 mov r0, r4 <== NOT EXECUTED 22534: ebffa7d4 bl c48c <_Chain_Extract> <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 22538: e1a00004 mov r0, r4 <== NOT EXECUTED 2253c: ebff945c bl 76b4 <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 22540: e1a00006 mov r0, r6 <== NOT EXECUTED return rc; } 22544: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 22548: ea0000d1 b 22894 <== NOT EXECUTED =============================================================================== 00021bc0 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 21bc0: e92d47f3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 21bc4: e5914018 ldr r4, [r1, #24] <== NOT EXECUTED 21bc8: e3540000 cmp r4, #0 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 21bcc: e1a07000 mov r7, r0 <== NOT EXECUTED int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; 21bd0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 21bd4: e591301c ldr r3, [r1, #28] <== NOT EXECUTED rtems_bdbuf_buffer *block = NULL; uint32_t sec = 0; uint32_t i = 0; if (fat_fd->fat_file_size == 0) 21bd8: 0a000036 beq 21cb8 <== NOT EXECUTED { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 21bdc: e3a02000 mov r2, #0 <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 21be0: e1a00005 mov r0, r5 <== NOT EXECUTED { int rc = RC_OK; rtems_status_code sc = RTEMS_SUCCESSFUL; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; rtems_bdbuf_buffer *block = NULL; 21be4: e88d000c stm sp, {r2, r3} <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); 21be8: eb000329 bl 22894 <== NOT EXECUTED if (rc != RC_OK) 21bec: e2504000 subs r4, r0, #0 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 21bf0: 01a0a00d moveq sl, sp <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21bf4: 028d9004 addeq r9, sp, #4 <== NOT EXECUTED /* * we can use only one bdbuf :( and we also know that cache is useless * for sync operation, so don't use it */ rc = fat_buf_release(fs_info); if (rc != RC_OK) 21bf8: 0a000028 beq 21ca0 <== NOT EXECUTED 21bfc: ea00002d b 21cb8 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 21c00: e3530000 cmp r3, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 21c04: e5972034 ldr r2, [r7, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 21c08: 1a000003 bne 21c1c <== NOT EXECUTED 21c0c: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 21c10: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 21c14: 1592801c ldrne r8, [r2, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 21c18: 1a000003 bne 21c2c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 21c1c: e5921030 ldr r1, [r2, #48] ; 0x30 <== NOT EXECUTED 21c20: e5d22005 ldrb r2, [r2, #5] <== NOT EXECUTED 21c24: e2438002 sub r8, r3, #2 <== NOT EXECUTED 21c28: e0818218 add r8, r1, r8, lsl r2 <== NOT EXECUTED 21c2c: e3a06000 mov r6, #0 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 21c30: ea00000e b 21c70 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 21c34: e2851054 add r1, r5, #84 ; 0x54 <== NOT EXECUTED 21c38: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 21c3c: ebff8da9 bl 52e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 21c40: e3500000 cmp r0, #0 <== NOT EXECUTED 21c44: 1a000003 bne 21c58 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 21c48: e59d0000 ldr r0, [sp] <== NOT EXECUTED 21c4c: ebff8b9a bl 4abc <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 21c50: e3500000 cmp r0, #0 <== NOT EXECUTED 21c54: 0a000004 beq 21c6c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 21c58: eb0071da bl 3e3c8 <__errno> <== NOT EXECUTED 21c5c: e3a03005 mov r3, #5 <== NOT EXECUTED 21c60: e5803000 str r3, [r0] <== NOT EXECUTED 21c64: e3e04000 mvn r4, #0 <== NOT EXECUTED 21c68: ea000012 b 21cb8 <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 21c6c: e2866001 add r6, r6, #1 <== NOT EXECUTED 21c70: e5d51004 ldrb r1, [r5, #4] <== NOT EXECUTED 21c74: e1560001 cmp r6, r1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 21c78: e0862008 add r2, r6, r8 <== NOT EXECUTED 21c7c: e1a0300a mov r3, sl <== NOT EXECUTED /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); /* for each sector in cluster ... */ for ( i = 0; i < fs_info->vol.spc; i++ ) 21c80: 3affffeb bcc 21c34 <== NOT EXECUTED sc = rtems_bdbuf_sync(block); if ( sc != RTEMS_SUCCESSFUL ) rtems_set_errno_and_return_minus_one( EIO ); } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21c84: e1a00007 mov r0, r7 <== NOT EXECUTED 21c88: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 21c8c: e1a02009 mov r2, r9 <== NOT EXECUTED 21c90: eb006030 bl 39d58 <== NOT EXECUTED if ( rc != RC_OK ) 21c94: e3500000 cmp r0, #0 <== NOT EXECUTED 21c98: 11a04000 movne r4, r0 <== NOT EXECUTED 21c9c: 1a000005 bne 21cb8 <== NOT EXECUTED rc = fat_buf_release(fs_info); if (rc != RC_OK) return rc; /* for each cluster of the file ... */ while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 21ca0: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 21ca4: e285100c add r1, r5, #12 <== NOT EXECUTED 21ca8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 21cac: e0031001 and r1, r3, r1 <== NOT EXECUTED 21cb0: e1510002 cmp r1, r2 <== NOT EXECUTED 21cb4: 3affffd1 bcc 21c00 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 21cb8: e1a00004 mov r0, r4 <== NOT EXECUTED 21cbc: e8bd87fc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00021ebc : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 21ebc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 21ec0: e1a0b003 mov fp, r3 <== NOT EXECUTED uint32_t old_last_cl; uint32_t last_cl = 0; uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; 21ec4: e58b2000 str r2, [fp] <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 21ec8: e5919018 ldr r9, [r1, #24] <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 21ecc: e24dd014 sub sp, sp, #20 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 21ed0: e3a03000 mov r3, #0 <== NOT EXECUTED uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 21ed4: e1520009 cmp r2, r9 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 21ed8: e1a07002 mov r7, r2 <== NOT EXECUTED 21edc: e1a04001 mov r4, r1 <== NOT EXECUTED 21ee0: e1a05000 mov r5, r0 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; uint32_t bytes2add = 0; uint32_t cls2add = 0; uint32_t old_last_cl; uint32_t last_cl = 0; 21ee4: e58d3008 str r3, [sp, #8] <== NOT EXECUTED uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t chain = 0; 21ee8: e58d3010 str r3, [sp, #16] <== NOT EXECUTED uint32_t new_length, uint32_t *a_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 21eec: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t bytes_remain = 0; uint32_t cls_added; *a_length = new_length; if (new_length <= fat_fd->fat_file_size) 21ef0: 9a000061 bls 2207c <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 21ef4: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 21ef8: e3530001 cmp r3, #1 <== NOT EXECUTED 21efc: 1a000005 bne 21f18 <== NOT EXECUTED 21f00: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 21f04: e3530000 cmp r3, #0 <== NOT EXECUTED 21f08: 1a000002 bne 21f18 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21f0c: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED 21f10: e3130003 tst r3, #3 <== NOT EXECUTED 21f14: 1a00001a bne 21f84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 21f18: e1d620b6 ldrh r2, [r6, #6] <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 21f1c: e2423001 sub r3, r2, #1 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 21f20: e0038009 and r8, r3, r9 <== NOT EXECUTED 21f24: e0688002 rsb r8, r8, r2 <== NOT EXECUTED 21f28: e0088003 and r8, r8, r3 <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & (fs_info->vol.bpc - 1); bytes2add = new_length - fat_fd->fat_file_size; 21f2c: e0699007 rsb r9, r9, r7 <== NOT EXECUTED if (bytes2add > bytes_remain) 21f30: e1590008 cmp r9, r8 <== NOT EXECUTED 21f34: 9a000050 bls 2207c <== NOT EXECUTED /* * if in last cluster allocated for the file there is enough room to * handle extention (hence we don't need to add even one cluster to the * file ) - return */ if (bytes2add == 0) 21f38: e0599008 subs r9, r9, r8 <== NOT EXECUTED 21f3c: 0a00004e beq 2207c <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 21f40: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED 21f44: e249a001 sub sl, r9, #1 <== NOT EXECUTED 21f48: e1a0a33a lsr sl, sl, r3 <== NOT EXECUTED 21f4c: e28aa001 add sl, sl, #1 <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 21f50: e28dc008 add ip, sp, #8 <== NOT EXECUTED 21f54: e1a00005 mov r0, r5 <== NOT EXECUTED 21f58: e28d1010 add r1, sp, #16 <== NOT EXECUTED 21f5c: e1a0200a mov r2, sl <== NOT EXECUTED 21f60: e28d3004 add r3, sp, #4 <== NOT EXECUTED 21f64: e58dc000 str ip, [sp] <== NOT EXECUTED 21f68: eb006003 bl 39f7c <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 21f6c: e3500000 cmp r0, #0 <== NOT EXECUTED 21f70: 11a08000 movne r8, r0 <== NOT EXECUTED 21f74: 1a000041 bne 22080 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 21f78: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 21f7c: e1988003 orrs r8, r8, r3 <== NOT EXECUTED 21f80: 1a000004 bne 21f98 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 21f84: eb00710f bl 3e3c8 <__errno> <== NOT EXECUTED 21f88: e3a0301c mov r3, #28 <== NOT EXECUTED 21f8c: e5803000 str r3, [r0] <== NOT EXECUTED 21f90: e3e08000 mvn r8, #0 <== NOT EXECUTED 21f94: ea000039 b 22080 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 21f98: e15a0003 cmp sl, r3 <== NOT EXECUTED 21f9c: 0a000008 beq 21fc4 <== NOT EXECUTED *a_length = new_length - 21fa0: e1e03003 mvn r3, r3 <== NOT EXECUTED 21fa4: e5d62008 ldrb r2, [r6, #8] <== NOT EXECUTED 21fa8: e083a00a add sl, r3, sl <== NOT EXECUTED 21fac: e047a21a sub sl, r7, sl, lsl r2 <== NOT EXECUTED 21fb0: e1d630b6 ldrh r3, [r6, #6] <== NOT EXECUTED 21fb4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 21fb8: e0099003 and r9, r9, r3 <== NOT EXECUTED 21fbc: e069900a rsb r9, r9, sl <== NOT EXECUTED 21fc0: e58b9000 str r9, [fp] <== NOT EXECUTED ((cls2add - cls_added - 1) << fs_info->vol.bpc_log2) - (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) 21fc4: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED 21fc8: e3530000 cmp r3, #0 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 21fcc: 059d2010 ldreq r2, [sp, #16] <== NOT EXECUTED fat_fd->map.file_cln = 0; 21fd0: 05843034 streq r3, [r4, #52] ; 0x34 <== NOT EXECUTED (bytes2add & (fs_info->vol.bpc - 1)); /* add new chain to the end of existed */ if ( fat_fd->fat_file_size == 0 ) { fat_fd->map.disk_cln = fat_fd->cln = chain; 21fd4: 05842038 streq r2, [r4, #56] ; 0x38 <== NOT EXECUTED 21fd8: 0584201c streq r2, [r4, #28] <== NOT EXECUTED 21fdc: 0a000014 beq 22034 <== NOT EXECUTED fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 21fe0: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 21fe4: e3720001 cmn r2, #1 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 21fe8: 158d200c strne r2, [sp, #12] <== NOT EXECUTED fat_fd->map.disk_cln = fat_fd->cln = chain; fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 21fec: 1a000008 bne 22014 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 21ff0: e28dc00c add ip, sp, #12 <== NOT EXECUTED 21ff4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 21ff8: e1a00005 mov r0, r5 <== NOT EXECUTED 21ffc: e1a01004 mov r1, r4 <== NOT EXECUTED 22000: e3a02001 mov r2, #1 <== NOT EXECUTED 22004: e58dc000 str ip, [sp] <== NOT EXECUTED 22008: ebffff3f bl 21d0c <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 2200c: e2508000 subs r8, r0, #0 <== NOT EXECUTED 22010: 1a000014 bne 22068 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 22014: e1a00005 mov r0, r5 <== NOT EXECUTED 22018: e28d100c add r1, sp, #12 <== NOT EXECUTED 2201c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 22020: eb005eb4 bl 39af8 <== NOT EXECUTED if ( rc != RC_OK ) 22024: e2508000 subs r8, r0, #0 <== NOT EXECUTED 22028: 1a00000e bne 22068 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 2202c: e1a00006 mov r0, r6 <== NOT EXECUTED 22030: eb000217 bl 22894 <== NOT EXECUTED } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 22034: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 22038: e3530000 cmp r3, #0 <== NOT EXECUTED 2203c: 0a00000d beq 22078 <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 22040: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 22044: e3530001 cmp r3, #1 <== NOT EXECUTED } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) { fat_fd->map.last_cln = last_cl; 22048: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 2204c: e584303c str r3, [r4, #60] ; 0x3c <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 22050: 1a000008 bne 22078 <== NOT EXECUTED { rc = fat_init_clusters_chain(mt_entry, chain); 22054: e1a00005 mov r0, r5 <== NOT EXECUTED 22058: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 2205c: eb000363 bl 22df0 <== NOT EXECUTED if ( rc != RC_OK ) 22060: e2508000 subs r8, r0, #0 <== NOT EXECUTED 22064: 0a000003 beq 22078 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 22068: e1a00005 mov r0, r5 <== NOT EXECUTED 2206c: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 22070: eb005f92 bl 39ec0 <== NOT EXECUTED return rc; 22074: ea000001 b 22080 <== NOT EXECUTED } } } fat_fd->fat_file_size = new_length; 22078: e5847018 str r7, [r4, #24] <== NOT EXECUTED return RC_OK; 2207c: e3a08000 mov r8, #0 <== NOT EXECUTED } 22080: e1a00008 mov r0, r8 <== NOT EXECUTED 22084: e28dd014 add sp, sp, #20 <== NOT EXECUTED 22088: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00021d0c : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 21d0c: e92d000c push {r2, r3} <== NOT EXECUTED 21d10: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 21d14: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 21d18: e3530001 cmp r3, #1 <== NOT EXECUTED int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 21d1c: e3a03000 mov r3, #0 <== NOT EXECUTED 21d20: e58d3004 str r3, [sp, #4] <== NOT EXECUTED uint32_t cl_start = 0; uint32_t pos = 0; uint32_t *ret; va_list ap; va_start(ap, cmd); 21d24: e28d3018 add r3, sp, #24 <== NOT EXECUTED 21d28: e58d3000 str r3, [sp] <== NOT EXECUTED fat_file_fd_t *fat_fd, int cmd, ...) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 21d2c: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 21d30: 1a00001c bne 21da8 <== NOT EXECUTED case F_CLU_NUM: pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 21d34: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 21d38: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 21d3c: e1520003 cmp r2, r3 <== NOT EXECUTED switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); 21d40: e28d3020 add r3, sp, #32 <== NOT EXECUTED 21d44: e58d3000 str r3, [sp] <== NOT EXECUTED 21d48: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 21d4c: 3a000002 bcc 21d5c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 21d50: eb00719c bl 3e3c8 <__errno> <== NOT EXECUTED 21d54: e3a03005 mov r3, #5 <== NOT EXECUTED 21d58: ea000014 b 21db0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 21d5c: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 21d60: e3530001 cmp r3, #1 <== NOT EXECUTED 21d64: 1a000007 bne 21d88 <== NOT EXECUTED 21d68: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 21d6c: e3530000 cmp r3, #0 <== NOT EXECUTED 21d70: 1a000004 bne 21d88 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21d74: e5dc500a ldrb r5, [ip, #10] <== NOT EXECUTED 21d78: e3150003 tst r5, #3 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 21d7c: 15843000 strne r3, [r4] <== NOT EXECUTED 21d80: 11a00003 movne r0, r3 <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) rtems_set_errno_and_return_minus_one( EIO ); if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21d84: 1a00000b bne 21db8 <== NOT EXECUTED return RC_OK; } cl_start = pos >> fs_info->vol.bpc_log2; rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 21d88: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED 21d8c: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED 21d90: e28d3004 add r3, sp, #4 <== NOT EXECUTED 21d94: ebffff64 bl 21b2c <== NOT EXECUTED if ( rc != RC_OK ) 21d98: e3500000 cmp r0, #0 <== NOT EXECUTED return rc; *ret = cur_cln; 21d9c: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED 21da0: 05843000 streq r3, [r4] <== NOT EXECUTED 21da4: ea000003 b 21db8 <== NOT EXECUTED break; default: errno = EINVAL; 21da8: eb007186 bl 3e3c8 <__errno> <== NOT EXECUTED 21dac: e3a03016 mov r3, #22 <== NOT EXECUTED 21db0: e5803000 str r3, [r0] <== NOT EXECUTED 21db4: e3e00000 mvn r0, #0 <== NOT EXECUTED rc = -1; break; } return rc; } 21db8: e8bd403c pop {r2, r3, r4, r5, lr} <== NOT EXECUTED 21dbc: e28dd008 add sp, sp, #8 <== NOT EXECUTED 21dc0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00021b2c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 21b2c: e92d47f1 push {r0, r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 21b30: e5918034 ldr r8, [r1, #52] ; 0x34 <== NOT EXECUTED 21b34: e1520008 cmp r2, r8 <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 21b38: e1a07003 mov r7, r3 <== NOT EXECUTED 21b3c: e1a04001 mov r4, r1 <== NOT EXECUTED 21b40: e1a05002 mov r5, r2 <== NOT EXECUTED 21b44: e1a09000 mov r9, r0 <== NOT EXECUTED int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) *disk_cln = fat_fd->map.disk_cln; 21b48: 05913038 ldreq r3, [r1, #56] ; 0x38 <== NOT EXECUTED uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 21b4c: 0a000015 beq 21ba8 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 21b50: 85913038 ldrhi r3, [r1, #56] ; 0x38 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 21b54: 9591301c ldrls r3, [r1, #28] <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 21b58: 858d3000 strhi r3, [sp] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 21b5c: 80688002 rsbhi r8, r8, r2 <== NOT EXECUTED } else { cur_cln = fat_fd->cln; 21b60: 958d3000 strls r3, [sp] <== NOT EXECUTED 21b64: 91a08002 movls r8, r2 <== NOT EXECUTED 21b68: e3a06000 mov r6, #0 <== NOT EXECUTED } /* skip over the clusters */ for (i = 0; i < count; i++) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21b6c: e1a0a00d mov sl, sp <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 21b70: ea000005 b 21b8c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21b74: e59d1000 ldr r1, [sp] <== NOT EXECUTED 21b78: eb006076 bl 39d58 <== NOT EXECUTED if ( rc != RC_OK ) 21b7c: e2503000 subs r3, r0, #0 <== NOT EXECUTED return rc; 21b80: 11a04fc3 asrne r4, r3, #31 <== NOT EXECUTED 21b84: 1a00000a bne 21bb4 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 21b88: e2866001 add r6, r6, #1 <== NOT EXECUTED 21b8c: e1560008 cmp r6, r8 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21b90: e1a00009 mov r0, r9 <== NOT EXECUTED 21b94: e1a0200d mov r2, sp <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 21b98: 3afffff5 bcc 21b74 <== NOT EXECUTED return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 21b9c: e59d3000 ldr r3, [sp] <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 21ba0: e5845034 str r5, [r4, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 21ba4: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED *disk_cln = cur_cln; 21ba8: e5873000 str r3, [r7] <== NOT EXECUTED 21bac: e3a04000 mov r4, #0 <== NOT EXECUTED 21bb0: e3a03000 mov r3, #0 <== NOT EXECUTED } return RC_OK; } 21bb4: e1a01004 mov r1, r4 <== NOT EXECUTED 21bb8: e1a00003 mov r0, r3 <== NOT EXECUTED 21bbc: e8bd87f8 pop {r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00021cc0 : static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 21cc0: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 21cc4: e3530001 cmp r3, #1 <== NOT EXECUTED void fat_file_mark_removed( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 21cc8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 21ccc: e1a04001 mov r4, r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 21cd0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 21cd4: e5946024 ldr r6, [r4, #36] ; 0x24 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 21cd8: e1a00004 mov r0, r4 <== NOT EXECUTED 21cdc: ebffa9ea bl c48c <_Chain_Extract> <== 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 ); 21ce0: e1a062a6 lsr r6, r6, #5 <== NOT EXECUTED 21ce4: e5953068 ldr r3, [r5, #104] ; 0x68 <== NOT EXECUTED 21ce8: e2066001 and r6, r6, #1 <== NOT EXECUTED 21cec: e3a0000c mov r0, #12 <== NOT EXECUTED 21cf0: e0203096 mla r0, r6, r0, r3 <== NOT EXECUTED 21cf4: e1a01004 mov r1, r4 <== NOT EXECUTED 21cf8: ebffa9d8 bl c460 <_Chain_Append> <== NOT EXECUTED _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); _hash_insert(fs_info->rhash, key, fat_fd->ino, fat_fd); fat_fd->flags |= FAT_FILE_REMOVED; 21cfc: e5d43030 ldrb r3, [r4, #48] ; 0x30 <== NOT EXECUTED 21d00: e3833001 orr r3, r3, #1 <== NOT EXECUTED 21d04: e5c43030 strb r3, [r4, #48] ; 0x30 <== NOT EXECUTED } 21d08: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0002254c : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2254c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 22550: e5916000 ldr r6, [r1] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 22554: e3560001 cmp r6, #1 <== NOT EXECUTED 22558: e1a08001 mov r8, r1 <== NOT EXECUTED 2255c: e1a0b000 mov fp, r0 <== NOT EXECUTED 22560: e1a0a002 mov sl, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 22564: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED 22568: 0a00000b beq 2259c <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2256c: e3560000 cmp r6, #0 <== NOT EXECUTED 22570: 1a000003 bne 22584 <== NOT EXECUTED 22574: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 22578: e3130003 tst r3, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2257c: 1594601c ldrne r6, [r4, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22580: 1a000003 bne 22594 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22584: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED 22588: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 2258c: e2466002 sub r6, r6, #2 <== NOT EXECUTED 22590: e0836216 add r6, r3, r6, lsl r2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 22594: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 22598: e1a06316 lsl r6, r6, r3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2259c: e5983004 ldr r3, [r8, #4] <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 225a0: e1a022a3 lsr r2, r3, #5 <== NOT EXECUTED 225a4: e08664a3 add r6, r6, r3, lsr #9 <== NOT EXECUTED 225a8: e202200f and r2, r2, #15 <== NOT EXECUTED 225ac: e0826206 add r6, r2, r6, lsl #4 <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 225b0: e2063001 and r3, r6, #1 <== NOT EXECUTED 225b4: e3a0200c mov r2, #12 <== NOT EXECUTED 225b8: e0070392 mul r7, r2, r3 <== NOT EXECUTED 225bc: e5943064 ldr r3, [r4, #100] ; 0x64 <== NOT EXECUTED 225c0: e0830007 add r0, r3, r7 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 225c4: e2800004 add r0, r0, #4 <== NOT EXECUTED 225c8: e7933007 ldr r3, [r3, r7] <== NOT EXECUTED 225cc: ea00001c b 22644 <== NOT EXECUTED 225d0: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 225d4: e3520001 cmp r2, #1 <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 225d8: e242c002 sub ip, r2, #2 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 225dc: 0a00000a beq 2260c <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 225e0: e3520000 cmp r2, #0 <== NOT EXECUTED 225e4: 1a000003 bne 225f8 <== NOT EXECUTED 225e8: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED 225ec: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 225f0: 1594201c ldrne r2, [r4, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 225f4: 1a000002 bne 22604 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 225f8: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED 225fc: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED 22600: e081221c add r2, r1, ip, lsl r2 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 22604: e5d41003 ldrb r1, [r4, #3] <== NOT EXECUTED 22608: e1a02112 lsl r2, r2, r1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2260c: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 22610: e1a0c2a1 lsr ip, r1, #5 <== NOT EXECUTED 22614: e20cc00f and ip, ip, #15 <== NOT EXECUTED 22618: e08224a1 add r2, r2, r1, lsr #9 <== NOT EXECUTED 2261c: e08c2202 add r2, ip, r2, lsl #4 <== NOT EXECUTED 22620: e1560002 cmp r6, r2 <== NOT EXECUTED 22624: 1a000005 bne 22640 <== NOT EXECUTED rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; lfat_fd->links_num++; 22628: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED 2262c: e2822001 add r2, r2, #1 <== NOT EXECUTED 22630: e5832008 str r2, [r3, #8] <== NOT EXECUTED /* access "valid" hash table */ rc = _hash_search(mt_entry, fs_info->vhash, key, 0, &lfat_fd); if ( rc == RC_OK ) { /* return pointer to fat_file_descriptor allocated before */ (*fat_fd) = lfat_fd; 22634: e58a3000 str r3, [sl] <== NOT EXECUTED lfat_fd->links_num++; 22638: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 2263c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 22640: e5933000 ldr r3, [r3] <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 22644: e1530000 cmp r3, r0 <== NOT EXECUTED 22648: 1affffe0 bne 225d0 <== NOT EXECUTED 2264c: ea00004d b 22788 <== NOT EXECUTED static inline uint32_t fat_construct_key( rtems_filesystem_mount_table_entry_t *mt_entry, fat_pos_t *pos) { return ( ((fat_cluster_num_to_sector512_num(mt_entry, pos->cln) + 22650: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 22654: e3520001 cmp r2, #1 <== NOT EXECUTED 22658: 0a00000b beq 2268c <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 2265c: e3520000 cmp r2, #0 <== NOT EXECUTED 22660: 1a000003 bne 22674 <== NOT EXECUTED 22664: e5d4100a ldrb r1, [r4, #10] <== NOT EXECUTED 22668: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2266c: 1594201c ldrne r2, [r4, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22670: 1a000003 bne 22684 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22674: e5d4c005 ldrb ip, [r4, #5] <== NOT EXECUTED 22678: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED 2267c: e2422002 sub r2, r2, #2 <== NOT EXECUTED 22680: e0812c12 add r2, r1, r2, lsl ip <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) return 1; return (fat_cluster_num_to_sector_num(mt_entry, cln) << 22684: e5d41003 ldrb r1, [r4, #3] <== NOT EXECUTED 22688: e1a02112 lsl r2, r2, r1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2268c: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED { fat_file_fd_t *ffd = (fat_file_fd_t *)the_node; uint32_t ck = fat_construct_key(mt_entry, &ffd->dir_pos.sname); if ( (key1) == ck) 22690: e1a0c2a1 lsr ip, r1, #5 <== NOT EXECUTED 22694: e08224a1 add r2, r2, r1, lsr #9 <== NOT EXECUTED 22698: e20cc00f and ip, ip, #15 <== NOT EXECUTED 2269c: e08c2202 add r2, ip, r2, lsl #4 <== NOT EXECUTED 226a0: e1560002 cmp r6, r2 <== NOT EXECUTED 226a4: 1a000004 bne 226bc <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 226a8: e3560000 cmp r6, #0 <== NOT EXECUTED 226ac: 0a000007 beq 226d0 <== NOT EXECUTED 226b0: e593200c ldr r2, [r3, #12] <== NOT EXECUTED 226b4: e1560002 cmp r6, r2 <== NOT EXECUTED 226b8: 0a000004 beq 226d0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 226bc: e5933000 ldr r3, [r3] <== NOT EXECUTED ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; ) 226c0: e1530000 cmp r3, r0 <== NOT EXECUTED 226c4: 1affffe1 bne 22650 <== NOT EXECUTED 226c8: e3e09000 mvn r9, #0 <== NOT EXECUTED 226cc: ea000000 b 226d4 <== NOT EXECUTED 226d0: e3a09000 mov r9, #0 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 226d4: e3a00044 mov r0, #68 ; 0x44 <== NOT EXECUTED 226d8: ebff959c bl 7d50 <== NOT EXECUTED if ( lfat_fd == NULL ) 226dc: e3500000 cmp r0, #0 <== NOT EXECUTED } /* access "removed-but-still-open" hash table */ rc = _hash_search(mt_entry, fs_info->rhash, key, key, &lfat_fd); lfat_fd = (*fat_fd) = (fat_file_fd_t*)malloc(sizeof(fat_file_fd_t)); 226e0: e1a05000 mov r5, r0 <== NOT EXECUTED 226e4: e58a0000 str r0, [sl] <== NOT EXECUTED if ( lfat_fd == NULL ) 226e8: 1a000004 bne 22700 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 226ec: eb006f35 bl 3e3c8 <__errno> <== NOT EXECUTED 226f0: e3a0300c mov r3, #12 <== NOT EXECUTED 226f4: e5803000 str r3, [r0] <== NOT EXECUTED 226f8: e3e00000 mvn r0, #0 <== NOT EXECUTED 226fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 22700: e3a01000 mov r1, #0 <== NOT EXECUTED 22704: e3a02044 mov r2, #68 ; 0x44 <== NOT EXECUTED 22708: eb007c65 bl 418a4 <== NOT EXECUTED lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 2270c: e5d5c030 ldrb ip, [r5, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 22710: e898000f ldm r8, {r0, r1, r2, r3} <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 22714: e3cce001 bic lr, ip, #1 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 22718: e285c020 add ip, r5, #32 <== NOT EXECUTED if ( rc != RC_OK ) 2271c: e3590000 cmp r9, #0 <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 22720: e3e08000 mvn r8, #0 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 22724: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED if ( lfat_fd == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); memset(lfat_fd, 0, sizeof(fat_file_fd_t)); lfat_fd->links_num = 1; 22728: e3a03001 mov r3, #1 <== NOT EXECUTED 2272c: e5853008 str r3, [r5, #8] <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 22730: e5c5e030 strb lr, [r5, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 22734: e585803c str r8, [r5, #60] ; 0x3c <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) lfat_fd->ino = key; 22738: 1585600c strne r6, [r5, #12] <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) 2273c: 1a00000b bne 22770 <== NOT EXECUTED lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 22740: e1a0000b mov r0, fp <== NOT EXECUTED 22744: eb000024 bl 227dc <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 22748: e3500000 cmp r0, #0 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2274c: e585000c str r0, [r5, #12] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 22750: 1a000006 bne 22770 <== NOT EXECUTED { free((*fat_fd)); 22754: e59a0000 ldr r0, [sl] <== NOT EXECUTED 22758: ebff93d5 bl 76b4 <== NOT EXECUTED /* * XXX: kernel resource is unsufficient, but not the memory, * but there is no suitable errno :( */ rtems_set_errno_and_return_minus_one( ENOMEM ); 2275c: eb006f19 bl 3e3c8 <__errno> <== NOT EXECUTED 22760: e3a0300c mov r3, #12 <== NOT EXECUTED 22764: e5803000 str r3, [r0] <== NOT EXECUTED 22768: e1a00008 mov r0, r8 <== NOT EXECUTED 2276c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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 ); 22770: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22774: e1a01005 mov r1, r5 <== NOT EXECUTED 22778: e0800007 add r0, r0, r7 <== NOT EXECUTED 2277c: ebffa737 bl c460 <_Chain_Append> <== NOT EXECUTED 22780: e3a00000 mov r0, #0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 22784: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED uint32_t key2, fat_file_fd_t **ret ) { uint32_t mod = (key1) % FAT_HASH_MODULE; rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first; 22788: e5943068 ldr r3, [r4, #104] ; 0x68 <== NOT EXECUTED 2278c: e0830007 add r0, r3, r7 <== NOT EXECUTED 22790: e2800004 add r0, r0, #4 <== NOT EXECUTED 22794: e7933007 ldr r3, [r3, r7] <== NOT EXECUTED 22798: eaffffc8 b 226c0 <== NOT EXECUTED =============================================================================== 000222c0 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 222c0: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 222c4: e2535000 subs r5, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 222c8: e1a08000 mov r8, r0 <== NOT EXECUTED 222cc: e1a06001 mov r6, r1 <== NOT EXECUTED 222d0: e1a07002 mov r7, r2 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 222d4: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; /* it couldn't be removed - otherwise cache update will be broken */ if (count == 0) 222d8: 0a00006d beq 22494 <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 222dc: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 222e0: e1520003 cmp r2, r3 <== NOT EXECUTED 222e4: 2a00006a bcs 22494 <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 222e8: e1550003 cmp r5, r3 <== NOT EXECUTED 222ec: 8a000002 bhi 222fc <== NOT EXECUTED 222f0: e0652003 rsb r2, r5, r3 <== NOT EXECUTED 222f4: e1570002 cmp r7, r2 <== NOT EXECUTED 222f8: 9a000000 bls 22300 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 222fc: e0675003 rsb r5, r7, r3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 22300: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED 22304: e3530001 cmp r3, #1 <== NOT EXECUTED { int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 22308: e3a03000 mov r3, #0 <== NOT EXECUTED 2230c: e58d300c str r3, [sp, #12] <== NOT EXECUTED if ((count > fat_fd->fat_file_size) || (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 22310: 1a000019 bne 2237c <== NOT EXECUTED 22314: e5963024 ldr r3, [r6, #36] ; 0x24 <== NOT EXECUTED 22318: e3530000 cmp r3, #0 <== NOT EXECUTED 2231c: 1a000016 bne 2237c <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 22320: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 22324: e3130003 tst r3, #3 <== NOT EXECUTED 22328: 0a000013 beq 2237c <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2232c: e596201c ldr r2, [r6, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22330: e3520000 cmp r2, #0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22334: 15d40005 ldrbne r0, [r4, #5] <== NOT EXECUTED 22338: 15941030 ldrne r1, [r4, #48] ; 0x30 <== NOT EXECUTED 2233c: 12423002 subne r3, r2, #2 <== NOT EXECUTED 22340: 10813013 addne r3, r1, r3, lsl r0 <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, count, buf); 22344: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; 22348: 0594301c ldreq r3, [r4, #28] <== NOT EXECUTED 2234c: e5d41002 ldrb r1, [r4, #2] <== NOT EXECUTED 22350: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED 22354: e2422001 sub r2, r2, #1 <== NOT EXECUTED 22358: e0831137 add r1, r3, r7, lsr r1 <== NOT EXECUTED 2235c: e0072002 and r2, r7, r2 <== NOT EXECUTED 22360: e1a00008 mov r0, r8 <== NOT EXECUTED 22364: e1a03005 mov r3, r5 <== NOT EXECUTED 22368: e58dc000 str ip, [sp] <== NOT EXECUTED 2236c: eb0002c9 bl 22e98 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 22370: e3500000 cmp r0, #0 <== NOT EXECUTED 22374: aa000049 bge 224a0 <== NOT EXECUTED 22378: ea000047 b 2249c <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2237c: e5d43008 ldrb r3, [r4, #8] <== NOT EXECUTED 22380: e1a03337 lsr r3, r7, r3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 22384: e28db00c add fp, sp, #12 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 22388: e58d3008 str r3, [sp, #8] <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 2238c: e1a02003 mov r2, r3 <== NOT EXECUTED 22390: e1a00008 mov r0, r8 <== NOT EXECUTED 22394: e1a01006 mov r1, r6 <== NOT EXECUTED 22398: e1a0300b mov r3, fp <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 2239c: e1d4a0b6 ldrh sl, [r4, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 223a0: ebfffde1 bl 21b2c <== NOT EXECUTED if (rc != RC_OK) 223a4: e3500000 cmp r0, #0 <== NOT EXECUTED 223a8: 1a00003c bne 224a0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 223ac: e24aa001 sub sl, sl, #1 <== NOT EXECUTED 223b0: e007a00a and sl, r7, sl <== NOT EXECUTED 223b4: e58da004 str sl, [sp, #4] <== NOT EXECUTED 223b8: e1a0100a mov r1, sl <== NOT EXECUTED 223bc: e1a09000 mov r9, r0 <== NOT EXECUTED 223c0: e1a0a000 mov sl, r0 <== NOT EXECUTED 223c4: ea000026 b 22464 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 223c8: e1d4c0b6 ldrh ip, [r4, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 223cc: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 223d0: e061c00c rsb ip, r1, ip <== NOT EXECUTED 223d4: e15c0005 cmp ip, r5 <== NOT EXECUTED 223d8: 21a0c005 movcs ip, r5 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 223dc: e3570000 cmp r7, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 223e0: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 223e4: e2477002 sub r7, r7, #2 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 223e8: 1a000003 bne 223fc <== NOT EXECUTED 223ec: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED 223f0: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 223f4: 1593701c ldrne r7, [r3, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 223f8: 1a000002 bne 22408 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 223fc: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 22400: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 22404: e0827317 add r7, r2, r7, lsl r3 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 22408: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 2240c: e5d49002 ldrb r9, [r4, #2] <== NOT EXECUTED 22410: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED 22414: e2422001 sub r2, r2, #1 <== NOT EXECUTED 22418: e083e00a add lr, r3, sl <== NOT EXECUTED 2241c: e0012002 and r2, r1, r2 <== NOT EXECUTED 22420: e1a0300c mov r3, ip <== NOT EXECUTED 22424: e1a00008 mov r0, r8 <== NOT EXECUTED 22428: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED 2242c: e58de000 str lr, [sp] <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; cmpltd += c; 22430: e08aa00c add sl, sl, ip <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 22434: e06c5005 rsb r5, ip, r5 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); 22438: eb000296 bl 22e98 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 2243c: e3500000 cmp r0, #0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22440: e1a0200b mov r2, fp <== NOT EXECUTED 22444: e1a00008 mov r0, r8 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) 22448: ba000013 blt 2249c <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2244c: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22450: e1a01009 mov r1, r9 <== NOT EXECUTED 22454: eb005e3f bl 39d58 <== NOT EXECUTED if ( rc != RC_OK ) 22458: e3500000 cmp r0, #0 <== NOT EXECUTED 2245c: 1a00000f bne 224a0 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 22460: e1a01000 mov r1, r0 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 22464: e3550000 cmp r5, #0 <== NOT EXECUTED 22468: 1affffd6 bne 223c8 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2246c: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 22470: e5d43008 ldrb r3, [r4, #8] <== NOT EXECUTED 22474: e24c7001 sub r7, ip, #1 <== NOT EXECUTED 22478: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 2247c: e087700a add r7, r7, sl <== NOT EXECUTED 22480: e0827337 add r7, r2, r7, lsr r3 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 22484: e5869038 str r9, [r6, #56] ; 0x38 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 22488: e5867034 str r7, [r6, #52] ; 0x34 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 2248c: e1a0000a mov r0, sl <== NOT EXECUTED 22490: ea000002 b 224a0 <== NOT EXECUTED 22494: e3a00000 mov r0, #0 <== NOT EXECUTED 22498: ea000000 b 224a0 <== NOT EXECUTED 2249c: e3e00000 mvn r0, #0 <== NOT EXECUTED } 224a0: e28dd010 add sp, sp, #16 <== NOT EXECUTED 224a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00021a74 : * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { fat_fd->links_num++; 21a74: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED 21a78: e2833001 add r3, r3, #1 <== NOT EXECUTED 21a7c: e5803008 str r3, [r0, #8] <== NOT EXECUTED return RC_OK; } 21a80: e3a00000 mov r0, #0 <== NOT EXECUTED 21a84: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00021a88 : fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 21a88: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 21a8c: e3530001 cmp r3, #1 <== NOT EXECUTED int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 21a90: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 21a94: e591301c ldr r3, [r1, #28] <== NOT EXECUTED int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 21a98: e1a04001 mov r4, r1 <== NOT EXECUTED 21a9c: e1a08000 mov r8, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 21aa0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 21aa4: 1a000007 bne 21ac8 <== NOT EXECUTED 21aa8: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED 21aac: e3500000 cmp r0, #0 <== NOT EXECUTED 21ab0: 1a000004 bne 21ac8 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21ab4: e5d5200a ldrb r2, [r5, #10] <== NOT EXECUTED 21ab8: e3120003 tst r2, #3 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 21abc: 15953028 ldrne r3, [r5, #40] ; 0x28 <== NOT EXECUTED 21ac0: 15813018 strne r3, [r1, #24] <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; uint32_t save_cln = 0; /* Have we requested root dir size for FAT12/16? */ if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21ac4: 1a000017 bne 21b28 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 21ac8: e3a0c000 mov ip, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = fat_fd->cln; 21acc: e28d6004 add r6, sp, #4 <== NOT EXECUTED 21ad0: e5263004 str r3, [r6, #-4]! <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 21ad4: e584c018 str ip, [r4, #24] <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 21ad8: ea000007 b 21afc <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21adc: eb00609d bl 39d58 <== NOT EXECUTED if ( rc != RC_OK ) 21ae0: e3500000 cmp r0, #0 <== NOT EXECUTED 21ae4: 1a00000f bne 21b28 <== NOT EXECUTED return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 21ae8: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 21aec: e1d530b6 ldrh r3, [r5, #6] <== NOT EXECUTED 21af0: e0823003 add r3, r2, r3 <== NOT EXECUTED 21af4: e5843018 str r3, [r4, #24] <== NOT EXECUTED 21af8: e1a0c007 mov ip, r7 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 21afc: e59d7000 ldr r7, [sp] <== NOT EXECUTED 21b00: e285300c add r3, r5, #12 <== NOT EXECUTED 21b04: e8930408 ldm r3, {r3, sl} <== NOT EXECUTED 21b08: e0073003 and r3, r7, r3 <== NOT EXECUTED 21b0c: e153000a cmp r3, sl <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21b10: e1a00008 mov r0, r8 <== NOT EXECUTED 21b14: e1a0200d mov r2, sp <== NOT EXECUTED 21b18: e1a01007 mov r1, r7 <== NOT EXECUTED return rc; } fat_fd->fat_file_size = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 21b1c: 3affffee bcc 21adc <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 21b20: e584c03c str ip, [r4, #60] ; 0x3c <== NOT EXECUTED 21b24: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; } 21b28: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00021dc4 : uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 21dc4: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 21dc8: e1520003 cmp r2, r3 <== NOT EXECUTED fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 21dcc: e92d4073 push {r0, r1, r4, r5, r6, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 21dd0: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED fat_file_truncate( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length ) { 21dd4: e1a05001 mov r5, r1 <== NOT EXECUTED 21dd8: e1a06000 mov r6, r0 <== NOT EXECUTED uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; if ( new_length >= fat_fd->fat_file_size ) 21ddc: 2a000030 bcs 21ea4 <== NOT EXECUTED uint32_t new_length ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; 21de0: e3a04000 mov r4, #0 <== NOT EXECUTED 21de4: e58d4004 str r4, [sp, #4] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 21de8: e3530000 cmp r3, #0 <== NOT EXECUTED { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = 0; uint32_t cl_start = 0; uint32_t new_last_cln = FAT_UNDEFINED_VALUE; 21dec: e3e04000 mvn r4, #0 <== NOT EXECUTED 21df0: e58d4000 str r4, [sp] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 21df4: 059f00b0 ldreq r0, [pc, #176] ; 21eac <== NOT EXECUTED 21df8: 059f10b0 ldreq r1, [pc, #176] ; 21eb0 <== NOT EXECUTED 21dfc: 059f20b0 ldreq r2, [pc, #176] ; 21eb4 <== NOT EXECUTED 21e00: 059f30b0 ldreq r3, [pc, #176] ; 21eb8 <== NOT EXECUTED 21e04: 0b000c38 bleq 24eec <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 21e08: e1dc40b6 ldrh r4, [ip, #6] <== NOT EXECUTED 21e0c: e5dcc008 ldrb ip, [ip, #8] <== NOT EXECUTED 21e10: e2444001 sub r4, r4, #1 <== NOT EXECUTED 21e14: e0844002 add r4, r4, r2 <== NOT EXECUTED 21e18: e1a04c34 lsr r4, r4, ip <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 21e1c: e1530c14 cmp r3, r4, lsl ip <== NOT EXECUTED 21e20: 9a00001f bls 21ea4 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 21e24: e3540000 cmp r4, #0 <== NOT EXECUTED 21e28: 0a000004 beq 21e40 <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 21e2c: e2442001 sub r2, r4, #1 <== NOT EXECUTED 21e30: e1a0300d mov r3, sp <== NOT EXECUTED 21e34: ebffff3c bl 21b2c <== NOT EXECUTED if (rc != RC_OK) 21e38: e3500000 cmp r0, #0 <== NOT EXECUTED 21e3c: 1a000019 bne 21ea8 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 21e40: e1a00006 mov r0, r6 <== NOT EXECUTED 21e44: e1a01005 mov r1, r5 <== NOT EXECUTED 21e48: e1a02004 mov r2, r4 <== NOT EXECUTED 21e4c: e28d3004 add r3, sp, #4 <== NOT EXECUTED 21e50: ebffff35 bl 21b2c <== NOT EXECUTED if (rc != RC_OK) 21e54: e3500000 cmp r0, #0 <== NOT EXECUTED 21e58: 1a000012 bne 21ea8 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 21e5c: e1a00006 mov r0, r6 <== NOT EXECUTED 21e60: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 21e64: eb006015 bl 39ec0 <== NOT EXECUTED if (rc != RC_OK) 21e68: e3500000 cmp r0, #0 <== NOT EXECUTED 21e6c: 1a00000d bne 21ea8 <== NOT EXECUTED return rc; if (cl_start != 0) 21e70: e3540000 cmp r4, #0 <== NOT EXECUTED 21e74: 0a00000b beq 21ea8 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 21e78: e1a00006 mov r0, r6 <== NOT EXECUTED 21e7c: e59d1000 ldr r1, [sp] <== NOT EXECUTED 21e80: e3e02000 mvn r2, #0 <== NOT EXECUTED 21e84: eb005f1b bl 39af8 <== NOT EXECUTED if ( rc != RC_OK ) 21e88: e3500000 cmp r0, #0 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 21e8c: 059d3000 ldreq r3, [sp] <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 21e90: 02444001 subeq r4, r4, #1 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 21e94: 0585303c streq r3, [r5, #60] ; 0x3c <== NOT EXECUTED if (cl_start != 0) { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); if ( rc != RC_OK ) return rc; fat_fd->map.file_cln = cl_start - 1; 21e98: 05854034 streq r4, [r5, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 21e9c: 05853038 streq r3, [r5, #56] ; 0x38 <== NOT EXECUTED 21ea0: ea000000 b 21ea8 <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 21ea4: e3a00000 mov r0, #0 <== NOT EXECUTED } return RC_OK; } 21ea8: e8bd807c pop {r2, r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0002208c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 2208c: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 22090: e2534000 subs r4, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 22094: e1a06001 mov r6, r1 <== NOT EXECUTED 22098: e1a08000 mov r8, r0 <== NOT EXECUTED 2209c: e1a07002 mov r7, r2 <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 220a0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; if ( count == 0 ) 220a4: 01a01004 moveq r1, r4 <== NOT EXECUTED 220a8: 0a000081 beq 222b4 <== NOT EXECUTED return cmpltd; if ( start > fat_fd->fat_file_size ) 220ac: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED 220b0: e1520003 cmp r2, r3 <== NOT EXECUTED { int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 220b4: e3a03000 mov r3, #0 <== NOT EXECUTED uint32_t cl_start = 0; uint32_t ofs = 0; uint32_t save_ofs; uint32_t sec = 0; uint32_t byte = 0; uint32_t c = 0; 220b8: e58d3008 str r3, [sp, #8] <== NOT EXECUTED { int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cmpltd = 0; uint32_t cur_cln = 0; 220bc: e58d300c str r3, [sp, #12] <== NOT EXECUTED uint32_t c = 0; if ( count == 0 ) return cmpltd; if ( start > fat_fd->fat_file_size ) 220c0: 8a000005 bhi 220dc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 220c4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED 220c8: e1540003 cmp r4, r3 <== NOT EXECUTED 220cc: 8a000002 bhi 220dc <== NOT EXECUTED 220d0: e0643003 rsb r3, r4, r3 <== NOT EXECUTED 220d4: e1520003 cmp r2, r3 <== NOT EXECUTED 220d8: 9a000003 bls 220ec <== NOT EXECUTED (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 220dc: eb0070b9 bl 3e3c8 <__errno> <== NOT EXECUTED 220e0: e3a03005 mov r3, #5 <== NOT EXECUTED 220e4: e5803000 str r3, [r0] <== NOT EXECUTED 220e8: ea000070 b 222b0 <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 220ec: e084a002 add sl, r4, r2 <== NOT EXECUTED 220f0: e1a0200a mov r2, sl <== NOT EXECUTED 220f4: e28d3008 add r3, sp, #8 <== NOT EXECUTED 220f8: ebffff6f bl 21ebc <== NOT EXECUTED if (rc != RC_OK) 220fc: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22100: 1a00006b bne 222b4 <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 22104: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 22108: e153000a cmp r3, sl <== NOT EXECUTED count = c - start; 2210c: 10674003 rsbne r4, r7, r3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 22110: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED 22114: e3530001 cmp r3, #1 <== NOT EXECUTED 22118: 1a00001e bne 22198 <== NOT EXECUTED 2211c: e5963024 ldr r3, [r6, #36] ; 0x24 <== NOT EXECUTED 22120: e3530000 cmp r3, #0 <== NOT EXECUTED 22124: 1a00001b bne 22198 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 22128: e5d5300a ldrb r3, [r5, #10] <== NOT EXECUTED 2212c: e3130003 tst r3, #3 <== NOT EXECUTED 22130: 0a000018 beq 22198 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 22134: e596201c ldr r2, [r6, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22138: e3520000 cmp r2, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 2213c: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22140: 1a000003 bne 22154 <== NOT EXECUTED 22144: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED 22148: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2214c: 1593301c ldrne r3, [r3, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22150: 1a000003 bne 22164 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22154: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED 22158: e5d30005 ldrb r0, [r3, #5] <== NOT EXECUTED 2215c: e2423002 sub r3, r2, #2 <== NOT EXECUTED 22160: e0813013 add r3, r1, r3, lsl r0 <== NOT EXECUTED sec += (start >> fs_info->vol.sec_log2); byte = start & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, count, buf); 22164: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED 22168: e5d51002 ldrb r1, [r5, #2] <== NOT EXECUTED 2216c: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED 22170: e2422001 sub r2, r2, #1 <== NOT EXECUTED 22174: e0831137 add r1, r3, r7, lsr r1 <== NOT EXECUTED 22178: e0072002 and r2, r7, r2 <== NOT EXECUTED 2217c: e1a00008 mov r0, r8 <== NOT EXECUTED 22180: e1a03004 mov r3, r4 <== NOT EXECUTED 22184: e58dc000 str ip, [sp] <== NOT EXECUTED 22188: eb000287 bl 22bac <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 2218c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22190: aa000047 bge 222b4 <== NOT EXECUTED 22194: ea000045 b 222b0 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 22198: e5d53008 ldrb r3, [r5, #8] <== NOT EXECUTED 2219c: e1a03337 lsr r3, r7, r3 <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 221a0: e28da00c add sl, sp, #12 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 221a4: e58d3004 str r3, [sp, #4] <== NOT EXECUTED save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 221a8: e1a02003 mov r2, r3 <== NOT EXECUTED 221ac: e1a00008 mov r0, r8 <== NOT EXECUTED 221b0: e1a01006 mov r1, r6 <== NOT EXECUTED 221b4: e1a0300a mov r3, sl <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 221b8: e1d5b0b6 ldrh fp, [r5, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 221bc: ebfffe5a bl 21b2c <== NOT EXECUTED if (rc != RC_OK) 221c0: e3500000 cmp r0, #0 <== NOT EXECUTED } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 221c4: e1a01000 mov r1, r0 <== NOT EXECUTED if (rc != RC_OK) 221c8: 1a000039 bne 222b4 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 221cc: e24bb001 sub fp, fp, #1 <== NOT EXECUTED 221d0: e007b00b and fp, r7, fp <== NOT EXECUTED 221d4: e1a09000 mov r9, r0 <== NOT EXECUTED 221d8: e1a0100b mov r1, fp <== NOT EXECUTED 221dc: e1a0a000 mov sl, r0 <== NOT EXECUTED 221e0: ea000027 b 22284 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 221e4: e1d5c0b6 ldrh ip, [r5, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 221e8: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 221ec: e061c00c rsb ip, r1, ip <== NOT EXECUTED 221f0: e15c0004 cmp ip, r4 <== NOT EXECUTED 221f4: 21a0c004 movcs ip, r4 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 221f8: e3570000 cmp r7, #0 <== NOT EXECUTED fat_cluster_num_to_sector_num( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; 221fc: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22200: e2477002 sub r7, r7, #2 <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22204: 1a000003 bne 22218 <== NOT EXECUTED 22208: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED 2220c: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 22210: 1593701c ldrne r7, [r3, #28] <== NOT EXECUTED uint32_t cln ) { register fat_fs_info_t *fs_info = mt_entry->fs_info; if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 22214: 1a000002 bne 22224 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22218: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 2221c: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 22220: e0827317 add r7, r2, r7, lsl r3 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 22224: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); 22228: e5d59002 ldrb r9, [r5, #2] <== NOT EXECUTED byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 2222c: e59d0034 ldr r0, [sp, #52] ; 0x34 <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bpc - ofs)); sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); 22230: e2422001 sub r2, r2, #1 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 22234: e0012002 and r2, r1, r2 <== NOT EXECUTED 22238: e080e00a add lr, r0, sl <== NOT EXECUTED 2223c: e1a0300c mov r3, ip <== NOT EXECUTED 22240: e1a00008 mov r0, r8 <== NOT EXECUTED 22244: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED 22248: e58de000 str lr, [sp] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2224c: e58dc008 str ip, [sp, #8] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 22250: eb000255 bl 22bac <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 22254: e3500000 cmp r0, #0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22258: e28d200c add r2, sp, #12 <== NOT EXECUTED 2225c: e1a00008 mov r0, r8 <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); sec += (ofs >> fs_info->vol.sec_log2); byte = ofs & (fs_info->vol.bps - 1); ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) 22260: ba000012 blt 222b0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 22264: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22268: e1a01009 mov r1, r9 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 2226c: e59d7008 ldr r7, [sp, #8] <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22270: eb005eb8 bl 39d58 <== NOT EXECUTED if ( rc != RC_OK ) 22274: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22278: 1a00000d bne 222b4 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 2227c: e08aa007 add sl, sl, r7 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 22280: e0674004 rsb r4, r7, r4 <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); if (rc != RC_OK) return rc; while (count > 0) 22284: e3540000 cmp r4, #0 <== NOT EXECUTED 22288: 1affffd5 bne 221e4 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2228c: e5d53008 ldrb r3, [r5, #8] <== NOT EXECUTED 22290: e24bb001 sub fp, fp, #1 <== NOT EXECUTED 22294: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 22298: e08bb00a add fp, fp, sl <== NOT EXECUTED 2229c: e082b33b add fp, r2, fp, lsr r3 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; 222a0: e5869038 str r9, [r6, #56] ; 0x38 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 222a4: e586b034 str fp, [r6, #52] ; 0x34 <== NOT EXECUTED ((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2); fat_fd->map.disk_cln = save_cln; return cmpltd; 222a8: e1a0100a mov r1, sl <== NOT EXECUTED 222ac: ea000000 b 222b4 <== NOT EXECUTED 222b0: e3e01000 mvn r1, #0 <== NOT EXECUTED } 222b4: e1a00001 mov r0, r1 <== NOT EXECUTED 222b8: e28dd010 add sp, sp, #16 <== NOT EXECUTED 222bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00039ec0 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 39ec0: e92d47f1 push {r0, r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; 39ec4: e3a03000 mov r3, #0 <== NOT EXECUTED 39ec8: e28da004 add sl, sp, #4 <== NOT EXECUTED int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 39ecc: e1a08000 mov r8, r0 <== NOT EXECUTED 39ed0: e1a09001 mov r9, r1 <== NOT EXECUTED int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; 39ed4: e1a05003 mov r5, r3 <== NOT EXECUTED 39ed8: e52a3004 str r3, [sl, #-4]! <== NOT EXECUTED rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { int rc = RC_OK, rc1 = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 39edc: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; 39ee0: e1a06001 mov r6, r1 <== NOT EXECUTED 39ee4: e1a07003 mov r7, r3 <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 39ee8: ea000011 b 39f34 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 39eec: ebffff99 bl 39d58 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 39ef0: e1a01006 mov r1, r6 <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) 39ef4: e2506000 subs r6, r0, #0 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 39ef8: e1a02006 mov r2, r6 <== NOT EXECUTED 39efc: e1a00008 mov r0, r8 <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); if ( rc != RC_OK ) 39f00: 0a000006 beq 39f20 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 39f04: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED 39f08: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 39f0c: 10855003 addne r5, r5, r3 <== NOT EXECUTED 39f10: 15845040 strne r5, [r4, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 39f14: e1a00004 mov r0, r4 <== NOT EXECUTED 39f18: ebffa25d bl 22894 <== NOT EXECUTED return rc; 39f1c: ea000014 b 39f74 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 39f20: ebfffef4 bl 39af8 <== NOT EXECUTED if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 39f24: e59d6000 ldr r6, [sp] <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); if ( rc != RC_OK ) 39f28: e3500000 cmp r0, #0 <== NOT EXECUTED 39f2c: 11a07000 movne r7, r0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; 39f30: e2855001 add r5, r5, #1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 39f34: e284300c add r3, r4, #12 <== NOT EXECUTED 39f38: e8931008 ldm r3, {r3, ip} <== NOT EXECUTED 39f3c: e0063003 and r3, r6, r3 <== NOT EXECUTED 39f40: e153000c cmp r3, ip <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 39f44: e1a01006 mov r1, r6 <== NOT EXECUTED 39f48: e1a0200d mov r2, sp <== NOT EXECUTED 39f4c: e1a00008 mov r0, r8 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = chain; uint32_t next_cln = 0; uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 39f50: 3affffe5 bcc 39eec <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 39f54: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED 39f58: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 39f5c: 10855003 addne r5, r5, r3 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 39f60: e5849044 str r9, [r4, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) fs_info->vol.free_cls += freed_cls_cnt; 39f64: 15845040 strne r5, [r4, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 39f68: e1a00004 mov r0, r4 <== NOT EXECUTED 39f6c: ebffa248 bl 22894 <== NOT EXECUTED 39f70: e1a06007 mov r6, r7 <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 39f74: e1a00006 mov r0, r6 <== NOT EXECUTED 39f78: e8bd87f8 pop {r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 0002279c : fat_free_unique_ino( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { fat_fs_info_t *fs_info = mt_entry->fs_info; 2279c: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 227a0: e5932078 ldr r2, [r3, #120] ; 0x78 <== NOT EXECUTED 227a4: e593306c ldr r3, [r3, #108] ; 0x6c <== NOT EXECUTED 227a8: e0622001 rsb r2, r2, r1 <== NOT EXECUTED 227ac: e7d301a2 ldrb r0, [r3, r2, lsr #3] <== NOT EXECUTED 227b0: e2021007 and r1, r2, #7 <== NOT EXECUTED 227b4: e3a0c001 mov ip, #1 <== NOT EXECUTED 227b8: e1c0111c bic r1, r0, ip, lsl r1 <== NOT EXECUTED 227bc: e7c311a2 strb r1, [r3, r2, lsr #3] <== NOT EXECUTED } 227c0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00039d58 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 39d58: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; 39d5c: e3a03000 mov r3, #0 <== NOT EXECUTED uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 39d60: e3510001 cmp r1, #1 <== NOT EXECUTED fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 39d64: e1a04001 mov r4, r1 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; rtems_bdbuf_buffer *block0 = NULL; 39d68: e58d3000 str r3, [sp] <== NOT EXECUTED fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 39d6c: e1a05002 mov r5, r2 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 39d70: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED rtems_bdbuf_buffer *block0 = NULL; uint32_t sec = 0; uint32_t ofs = 0; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 39d74: 9a00004b bls 39ea8 <== NOT EXECUTED 39d78: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED 39d7c: e2833001 add r3, r3, #1 <== NOT EXECUTED 39d80: e1510003 cmp r1, r3 <== NOT EXECUTED 39d84: 8a000047 bhi 39ea8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 39d88: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED 39d8c: e2130001 ands r0, r3, #1 <== NOT EXECUTED 39d90: 108120a1 addne r2, r1, r1, lsr #1 <== NOT EXECUTED 39d94: 1a000002 bne 39da4 <== NOT EXECUTED 39d98: e3130002 tst r3, #2 <== NOT EXECUTED 39d9c: 11a02081 lslne r2, r1, #1 <== NOT EXECUTED 39da0: 01a02101 lsleq r2, r1, #2 <== NOT EXECUTED 39da4: e5d6a002 ldrb sl, [r6, #2] <== NOT EXECUTED 39da8: e596104c ldr r1, [r6, #76] ; 0x4c <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39dac: e3500000 cmp r0, #0 <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 39db0: e081aa32 add sl, r1, r2, lsr sl <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39db4: 108480a4 addne r8, r4, r4, lsr #1 <== NOT EXECUTED 39db8: 1a000002 bne 39dc8 <== NOT EXECUTED 39dbc: e3130002 tst r3, #2 <== NOT EXECUTED 39dc0: 11a08084 lslne r8, r4, #1 <== NOT EXECUTED 39dc4: 01a08104 lsleq r8, r4, #2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39dc8: e1a00006 mov r0, r6 <== NOT EXECUTED 39dcc: e1a0100a mov r1, sl <== NOT EXECUTED 39dd0: e3a02001 mov r2, #1 <== NOT EXECUTED 39dd4: e1a0300d mov r3, sp <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39dd8: e1d6b0b0 ldrh fp, [r6] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39ddc: ebffa2fc bl 229d4 <== NOT EXECUTED if (rc != RC_OK) 39de0: e2507000 subs r7, r0, #0 <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39de4: e1a0900d mov r9, sp <== NOT EXECUTED if (rc != RC_OK) 39de8: 1a000032 bne 39eb8 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 39dec: e5d6200a ldrb r2, [r6, #10] <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39df0: e24bb001 sub fp, fp, #1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 39df4: e3520002 cmp r2, #2 <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39df8: e008800b and r8, r8, fp <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 39dfc: 0a000020 beq 39e84 <== NOT EXECUTED 39e00: e3520004 cmp r2, #4 <== NOT EXECUTED 39e04: 0a000022 beq 39e94 <== NOT EXECUTED 39e08: e3520001 cmp r2, #1 <== NOT EXECUTED 39e0c: 1a000025 bne 39ea8 <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 39e10: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39e14: e593b020 ldr fp, [r3, #32] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 39e18: e1d610b0 ldrh r1, [r6] <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 39e1c: e7db3008 ldrb r3, [fp, r8] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 39e20: e2411001 sub r1, r1, #1 <== NOT EXECUTED 39e24: e1580001 cmp r8, r1 <== NOT EXECUTED case FAT_FAT12: /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); 39e28: e5853000 str r3, [r5] <== NOT EXECUTED *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 39e2c: 108b8008 addne r8, fp, r8 <== NOT EXECUTED 39e30: 15d82001 ldrbne r2, [r8, #1] <== NOT EXECUTED /* * we are enforced in complex computations for FAT12 to escape CPU * align problems for some architectures */ *ret_val = (*((uint8_t *)(block0->buffer + ofs))); if ( ofs == (fs_info->vol.bps - 1) ) 39e34: 1a00000a bne 39e64 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 39e38: e1a00006 mov r0, r6 <== NOT EXECUTED 39e3c: e28a1001 add r1, sl, #1 <== NOT EXECUTED 39e40: e1a0300d mov r3, sp <== NOT EXECUTED 39e44: ebffa2e2 bl 229d4 <== NOT EXECUTED &block0); if (rc != RC_OK) 39e48: e3500000 cmp r0, #0 <== NOT EXECUTED 39e4c: 11a07000 movne r7, r0 <== NOT EXECUTED 39e50: 1a000018 bne 39eb8 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 39e54: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39e58: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39e5c: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 39e60: e5953000 ldr r3, [r5] <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 39e64: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 39e68: e5853000 str r3, [r5] <== NOT EXECUTED 39e6c: e5953000 ldr r3, [r5] <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 39e70: e3140001 tst r4, #1 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 39e74: 01a03a03 lsleq r3, r3, #20 <== NOT EXECUTED { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; } if ( FAT_CLUSTER_IS_ODD(cln) ) *ret_val = (*ret_val) >> FAT12_SHIFT; 39e78: 11a03223 lsrne r3, r3, #4 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 39e7c: 01a03a23 lsreq r3, r3, #20 <== NOT EXECUTED 39e80: ea000006 b 39ea0 <== NOT EXECUTED break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); 39e84: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39e88: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39e8c: e19330b8 ldrh r3, [r3, r8] <== NOT EXECUTED 39e90: ea000002 b 39ea0 <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); 39e94: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39e98: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39e9c: e7933008 ldr r3, [r3, r8] <== NOT EXECUTED 39ea0: e5853000 str r3, [r5] <== NOT EXECUTED break; 39ea4: ea000003 b 39eb8 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 39ea8: eb001146 bl 3e3c8 <__errno> <== NOT EXECUTED 39eac: e3a03005 mov r3, #5 <== NOT EXECUTED 39eb0: e5803000 str r3, [r0] <== NOT EXECUTED 39eb4: e3e07000 mvn r7, #0 <== NOT EXECUTED break; } return RC_OK; } 39eb8: e1a00007 mov r0, r7 <== NOT EXECUTED 39ebc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000227dc : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 227dc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 227e0: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 227e4: e3a05000 mov r5, #0 <== NOT EXECUTED 227e8: ea000024 b 22880 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 227ec: e5943070 ldr r3, [r4, #112] ; 0x70 <== NOT EXECUTED 227f0: e594706c ldr r7, [r4, #108] ; 0x6c <== NOT EXECUTED 227f4: e7d701a3 ldrb r0, [r7, r3, lsr #3] <== NOT EXECUTED 227f8: e203c007 and ip, r3, #7 <== NOT EXECUTED 227fc: e1a08c50 asr r8, r0, ip <== NOT EXECUTED 22800: e3180001 tst r8, #1 <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 22804: e2836001 add r6, r3, #1 <== NOT EXECUTED while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 22808: e08731a3 add r3, r7, r3, lsr #3 <== NOT EXECUTED 2280c: 1a000006 bne 2282c <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 22810: e3a02001 mov r2, #1 <== NOT EXECUTED 22814: e1800c12 orr r0, r0, r2, lsl ip <== NOT EXECUTED 22818: e5c30000 strb r0, [r3] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2281c: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 22820: e5940070 ldr r0, [r4, #112] ; 0x70 <== NOT EXECUTED 22824: e0800003 add r0, r0, r3 <== NOT EXECUTED 22828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2282c: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED 22830: e1560003 cmp r6, r3 <== NOT EXECUTED if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); return (fs_info->uino_base + fs_info->index); } fs_info->index++; 22834: e5846070 str r6, [r4, #112] ; 0x70 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 22838: 25845070 strcs r5, [r4, #112] ; 0x70 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 2283c: e2822001 add r2, r2, #1 <== NOT EXECUTED 22840: e1520001 cmp r2, r1 <== NOT EXECUTED 22844: 3affffe8 bcc 227ec <== NOT EXECUTED fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) 22848: e5942078 ldr r2, [r4, #120] ; 0x78 <== NOT EXECUTED 2284c: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED 22850: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 22854: e1a01081 lsl r1, r1, #1 <== NOT EXECUTED 22858: e1510003 cmp r1, r3 <== NOT EXECUTED 2285c: 2a00000a bcs 2288c <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 22860: e5841074 str r1, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 22864: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 22868: ebff989d bl 8ae4 <== NOT EXECUTED if (fs_info->uino != NULL) 2286c: e3500000 cmp r0, #0 <== NOT EXECUTED } if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base)) { fs_info->uino_pool_size <<= 1; fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 22870: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if (fs_info->uino != NULL) 22874: 0a000004 beq 2288c <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 22878: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED 2287c: e5843070 str r3, [r4, #112] ; 0x70 <== NOT EXECUTED uint32_t j = 0; bool resrc_unsuff = false; while (!resrc_unsuff) { for (j = 0; j < fs_info->uino_pool_size; j++) 22880: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED 22884: e3a02000 mov r2, #0 <== NOT EXECUTED 22888: eaffffec b 22840 <== NOT EXECUTED 2288c: e3a00000 mov r0, #0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 22890: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00022df0 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 22df0: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; 22df4: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = start_cln; 22df8: e58d1000 str r1, [sp] <== NOT EXECUTED int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 22dfc: e1a06000 mov r6, r0 <== NOT EXECUTED ssize_t ret = 0; register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); 22e00: e3a01001 mov r1, #1 <== NOT EXECUTED 22e04: e1d500b6 ldrh r0, [r5, #6] <== NOT EXECUTED 22e08: ebff90b9 bl 70f4 <== NOT EXECUTED if ( buf == NULL ) 22e0c: e2504000 subs r4, r0, #0 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22e10: 11a0700d movne r7, sp <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cur_cln = start_cln; char *buf; buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) 22e14: 1a000011 bne 22e60 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 22e18: eb006d6a bl 3e3c8 <__errno> <== NOT EXECUTED 22e1c: e3a03005 mov r3, #5 <== NOT EXECUTED 22e20: e5803000 str r3, [r0] <== NOT EXECUTED 22e24: e3e08000 mvn r8, #0 <== NOT EXECUTED 22e28: ea000018 b 22e90 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 22e2c: ebffffdb bl 22da0 <== NOT EXECUTED 22e30: e1a08000 mov r8, r0 <== NOT EXECUTED if ( ret == -1 ) 22e34: e3780001 cmn r8, #1 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22e38: e1a0200d mov r2, sp <== NOT EXECUTED 22e3c: e1a00006 mov r0, r6 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); if ( ret == -1 ) 22e40: 0a000003 beq 22e54 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22e44: e59d1000 ldr r1, [sp] <== NOT EXECUTED 22e48: eb005bc2 bl 39d58 <== NOT EXECUTED if ( rc != RC_OK ) 22e4c: e2508000 subs r8, r0, #0 <== NOT EXECUTED 22e50: 0a000002 beq 22e60 <== NOT EXECUTED { free(buf); 22e54: e1a00004 mov r0, r4 <== NOT EXECUTED 22e58: ebff9215 bl 76b4 <== NOT EXECUTED return rc; 22e5c: ea00000b b 22e90 <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 22e60: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22e64: e595e00c ldr lr, [r5, #12] <== NOT EXECUTED 22e68: e595c010 ldr ip, [r5, #16] <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 22e6c: e1a01003 mov r1, r3 <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 22e70: e003300e and r3, r3, lr <== NOT EXECUTED 22e74: e153000c cmp r3, ip <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 22e78: e1a02004 mov r2, r4 <== NOT EXECUTED 22e7c: e1a00006 mov r0, r6 <== NOT EXECUTED buf = calloc(fs_info->vol.bpc, sizeof(char)); if ( buf == NULL ) rtems_set_errno_and_return_minus_one( EIO ); while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 22e80: 3affffe9 bcc 22e2c <== NOT EXECUTED free(buf); return rc; } } free(buf); 22e84: e1a00004 mov r0, r4 <== NOT EXECUTED 22e88: ebff9209 bl 76b4 <== NOT EXECUTED 22e8c: e3a08000 mov r8, #0 <== NOT EXECUTED return rc; } 22e90: e1a00008 mov r0, r8 <== NOT EXECUTED 22e94: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00022f28 : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { 22f28: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 22f2c: e24dd0b8 sub sp, sp, #184 ; 0xb8 <== NOT EXECUTED 22f30: e1a05000 mov r5, r0 <== NOT EXECUTED char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 22f34: e3a06000 mov r6, #0 <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 22f38: e5900070 ldr r0, [r0, #112] ; 0x70 <== NOT EXECUTED 22f3c: e28d1060 add r1, sp, #96 ; 0x60 <== NOT EXECUTED char boot_rec[FAT_MAX_BPB_SIZE]; char fs_info_sector[FAT_USEFUL_INFO_SIZE]; ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; 22f40: e58d60b4 str r6, [sp, #180] ; 0xb4 <== NOT EXECUTED int fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 22f44: e5954034 ldr r4, [r5, #52] ; 0x34 <== NOT EXECUTED ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 22f48: ebff97b9 bl 8e34 <== NOT EXECUTED if (rc == -1) 22f4c: e3700001 cmn r0, #1 <== NOT EXECUTED ssize_t ret = 0; struct stat stat_buf; int i = 0; rtems_bdbuf_buffer *block = NULL; rc = stat(mt_entry->dev, &stat_buf); 22f50: e1a07000 mov r7, r0 <== NOT EXECUTED if (rc == -1) 22f54: 0a000167 beq 234f8 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 22f58: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED 22f5c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 22f60: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED 22f64: 0a000002 beq 22f74 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); 22f68: eb006d16 bl 3e3c8 <__errno> <== NOT EXECUTED 22f6c: e3a03019 mov r3, #25 <== NOT EXECUTED 22f70: ea00015e b 234f0 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 22f74: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 22f78: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22f7c: ebff8cc6 bl 629c <== NOT EXECUTED if (vol->dd == NULL) 22f80: e3500000 cmp r0, #0 <== NOT EXECUTED /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) rtems_set_errno_and_return_minus_one(ENOTTY); /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 22f84: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if (vol->dd == NULL) 22f88: 0a00000a beq 22fb8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 22f8c: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 22f90: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 22f94: e1a02006 mov r2, r6 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); if (vol->dd == NULL) rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 22f98: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 22f9c: e5841058 str r1, [r4, #88] ; 0x58 <== NOT EXECUTED /* Read boot record */ /* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */ sc = rtems_bdbuf_read( vol->dev, 0, &block); 22fa0: e28d30b4 add r3, sp, #180 ; 0xb4 <== NOT EXECUTED 22fa4: ebff88cf bl 52e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22fa8: e3500000 cmp r0, #0 <== NOT EXECUTED 22fac: 0a000004 beq 22fc4 <== NOT EXECUTED { rtems_disk_release(vol->dd); 22fb0: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 22fb4: ebff8d34 bl 648c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO); 22fb8: eb006d02 bl 3e3c8 <__errno> <== NOT EXECUTED 22fbc: e3a03005 mov r3, #5 <== NOT EXECUTED 22fc0: ea00014a b 234f0 <== NOT EXECUTED } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 22fc4: e59d30b4 ldr r3, [sp, #180] ; 0xb4 <== NOT EXECUTED 22fc8: e3a0205a mov r2, #90 ; 0x5a <== NOT EXECUTED 22fcc: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 22fd0: e28d0004 add r0, sp, #4 <== NOT EXECUTED 22fd4: eb0079ab bl 41688 <== NOT EXECUTED sc = rtems_bdbuf_release( block); 22fd8: e59d00b4 ldr r0, [sp, #180] ; 0xb4 <== NOT EXECUTED 22fdc: ebff8481 bl 41e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22fe0: e3500000 cmp r0, #0 <== NOT EXECUTED 22fe4: 1afffff1 bne 22fb0 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 22fe8: e5dd2010 ldrb r2, [sp, #16] <== NOT EXECUTED 22fec: e5dd300f ldrb r3, [sp, #15] <== NOT EXECUTED 22ff0: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED if ( (vol->bps != 512) && 22ff4: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 22ff8: 13530c02 cmpne r3, #512 ; 0x200 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EIO ); } /* Evaluate boot record */ vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec); 22ffc: e1c430b0 strh r3, [r4] <== NOT EXECUTED if ( (vol->bps != 512) && 23000: 0a000003 beq 23014 <== NOT EXECUTED 23004: e3530b02 cmp r3, #2048 ; 0x800 <== NOT EXECUTED 23008: 0a000001 beq 23014 <== NOT EXECUTED 2300c: e3530a01 cmp r3, #4096 ; 0x1000 <== NOT EXECUTED 23010: 1a0000ad bne 232cc <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 23014: e3a02000 mov r2, #0 <== NOT EXECUTED 23018: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED 2301c: e1a034a3 lsr r3, r3, #9 <== NOT EXECUTED 23020: ea000003 b 23034 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 23024: e5d42003 ldrb r2, [r4, #3] <== NOT EXECUTED 23028: e2822001 add r2, r2, #1 <== NOT EXECUTED 2302c: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED 23030: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; 23034: e3130001 tst r3, #1 <== NOT EXECUTED 23038: 0afffff9 beq 23024 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2303c: e3a03000 mov r3, #0 <== NOT EXECUTED 23040: e5c43002 strb r3, [r4, #2] <== NOT EXECUTED 23044: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 23048: ea000003 b 2305c <== NOT EXECUTED i >>= 1, vol->sec_log2++); 2304c: e5d42002 ldrb r2, [r4, #2] <== NOT EXECUTED 23050: e2822001 add r2, r2, #1 <== NOT EXECUTED 23054: e5c42002 strb r2, [r4, #2] <== NOT EXECUTED 23058: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 2305c: e3130001 tst r3, #1 <== NOT EXECUTED 23060: 0afffff9 beq 2304c <== NOT EXECUTED i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 23064: e5dd2011 ldrb r2, [sp, #17] <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 23068: e3520000 cmp r2, #0 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2306c: 13a03000 movne r3, #0 <== NOT EXECUTED for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0; i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 23070: e5c42004 strb r2, [r4, #4] <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 23074: 15c43005 strbne r3, [r4, #5] <== NOT EXECUTED vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 23078: 1a000003 bne 2308c <== NOT EXECUTED 2307c: ea000092 b 232cc <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; i >>= 1, vol->spc_log2++); 23080: e2833001 add r3, r3, #1 <== NOT EXECUTED 23084: e5c43005 strb r3, [r4, #5] <== NOT EXECUTED 23088: e1a020c2 asr r2, r2, #1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0; 2308c: e3120001 tst r2, #1 <== NOT EXECUTED 23090: e5d43005 ldrb r3, [r4, #5] <== NOT EXECUTED 23094: 0afffff9 beq 23080 <== NOT EXECUTED i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 23098: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 2309c: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 230a0: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 230a4: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 230a8: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 230ac: 93a02000 movls r2, #0 <== NOT EXECUTED i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 230b0: e1c430b6 strh r3, [r4, #6] <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 230b4: 95c42008 strbls r2, [r4, #8] <== NOT EXECUTED i >>= 1, vol->spc_log2++); /* * "bytes per cluster" value greater than 32K is invalid */ if ((vol->bpc = vol->bps << vol->spc_log2) > MS_BYTES_PER_CLUSTER_LIMIT) 230b8: 9a000004 bls 230d0 <== NOT EXECUTED 230bc: ea000082 b 232cc <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; i >>= 1, vol->bpc_log2++); 230c0: e5d42008 ldrb r2, [r4, #8] <== NOT EXECUTED 230c4: e2822001 add r2, r2, #1 <== NOT EXECUTED 230c8: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED 230cc: e1a030c3 asr r3, r3, #1 <== NOT EXECUTED { rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one(EINVAL); } for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0; 230d0: e3130001 tst r3, #1 <== NOT EXECUTED 230d4: 0afffff9 beq 230c0 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 230d8: e5dd3014 ldrb r3, [sp, #20] <== NOT EXECUTED 230dc: e5c43009 strb r3, [r4, #9] <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 230e0: e5dd2013 ldrb r2, [sp, #19] <== NOT EXECUTED 230e4: e5dd3012 ldrb r3, [sp, #18] <== NOT EXECUTED 230e8: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 230ec: e1c431b4 strh r3, [r4, #20] <== NOT EXECUTED vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 230f0: e1d410b0 ldrh r1, [r4] <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 230f4: e5dd2016 ldrb r2, [sp, #22] <== NOT EXECUTED 230f8: e5dd3015 ldrb r3, [sp, #21] <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 230fc: e2410001 sub r0, r1, #1 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 23100: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 23104: e0800283 add r0, r0, r3, lsl #5 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); 23108: e1c432b0 strh r3, [r4, #32] <== NOT EXECUTED /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 2310c: eb00ccc0 bl 56414 <__aeabi_idiv> <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 23110: e5d43002 ldrb r3, [r4, #2] <== NOT EXECUTED 23114: e1a03310 lsl r3, r0, r3 <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec); /* calculate the count of sectors occupied by the root directory */ vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) / 23118: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 2311c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 23120: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED 23124: e5dd301a ldrb r3, [sp, #26] <== NOT EXECUTED 23128: e1933402 orrs r3, r3, r2, lsl #8 <== NOT EXECUTED vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); 2312c: 05dd302a ldrbeq r3, [sp, #42] ; 0x2a <== NOT EXECUTED 23130: 05dd2029 ldrbeq r2, [sp, #41] ; 0x29 <== NOT EXECUTED 23134: 05dd1028 ldrbeq r1, [sp, #40] ; 0x28 <== NOT EXECUTED 23138: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED 2313c: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED 23140: 05dd202b ldrbeq r2, [sp, #43] ; 0x2b <== NOT EXECUTED 23144: 01833001 orreq r3, r3, r1 <== NOT EXECUTED 23148: 01833c02 orreq r3, r3, r2, lsl #24 <== NOT EXECUTED 2314c: e5843018 str r3, [r4, #24] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 23150: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED 23154: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED 23158: e0030291 mul r3, r1, r2 <== NOT EXECUTED 2315c: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 23160: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED 23164: e0821001 add r1, r2, r1 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 23168: e0832002 add r2, r3, r2 <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec); else vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec); vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 2316c: e0813003 add r3, r1, r3 <== NOT EXECUTED 23170: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED vol->rdir_secs; /* for FAT12/16 root dir starts at(sector) */ vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length; 23174: e584201c str r2, [r4, #28] <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 23178: e5dd2018 ldrb r2, [sp, #24] <== NOT EXECUTED 2317c: e5dd3017 ldrb r3, [sp, #23] <== NOT EXECUTED 23180: e1933402 orrs r3, r3, r2, lsl #8 <== NOT EXECUTED vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec); else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); 23184: 05dd3026 ldrbeq r3, [sp, #38] ; 0x26 <== NOT EXECUTED 23188: 05dd2025 ldrbeq r2, [sp, #37] ; 0x25 <== NOT EXECUTED 2318c: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED 23190: 05dd1024 ldrbeq r1, [sp, #36] ; 0x24 <== NOT EXECUTED 23194: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED 23198: 05dd2027 ldrbeq r2, [sp, #39] ; 0x27 <== NOT EXECUTED 2319c: 01833001 orreq r3, r3, r1 <== NOT EXECUTED 231a0: 01833c02 orreq r3, r3, r2, lsl #24 <== NOT EXECUTED 231a4: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 231a8: e5d41004 ldrb r1, [r4, #4] <== NOT EXECUTED 231ac: e284302c add r3, r4, #44 ; 0x2c <== NOT EXECUTED 231b0: e8930009 ldm r3, {r0, r3} <== NOT EXECUTED 231b4: e0400003 sub r0, r0, r3 <== NOT EXECUTED 231b8: eb00cc51 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 231bc: e59f3340 ldr r3, [pc, #832] ; 23504 <== NOT EXECUTED 231c0: e1500003 cmp r0, r3 <== NOT EXECUTED else vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec); data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 231c4: e5840034 str r0, [r4, #52] ; 0x34 <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) { vol->type = FAT_FAT12; 231c8: 93a03001 movls r3, #1 <== NOT EXECUTED 231cc: 95c4300a strbls r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 231d0: 959f3330 ldrls r3, [pc, #816] ; 23508 <== NOT EXECUTED 231d4: 9a000005 bls 231f0 <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 231d8: e59f332c ldr r3, [pc, #812] ; 2350c <== NOT EXECUTED 231dc: e1500003 cmp r0, r3 <== NOT EXECUTED 231e0: 8a000005 bhi 231fc <== NOT EXECUTED { vol->type = FAT_FAT16; 231e4: e3a03002 mov r3, #2 <== NOT EXECUTED 231e8: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 231ec: e59f331c ldr r3, [pc, #796] ; 23510 <== NOT EXECUTED 231f0: e584300c str r3, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 231f4: e2433007 sub r3, r3, #7 <== NOT EXECUTED 231f8: ea000004 b 23210 <== NOT EXECUTED } else { vol->type = FAT_FAT32; 231fc: e3a03004 mov r3, #4 <== NOT EXECUTED 23200: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 23204: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED 23208: e584300c str r3, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2320c: e3e0327f mvn r3, #-268435449 ; 0xf0000007 <== NOT EXECUTED 23210: e5843010 str r3, [r4, #16] <== NOT EXECUTED fat_init_volume_info(rtems_filesystem_mount_table_entry_t *mt_entry) { rtems_status_code sc = RTEMS_SUCCESSFUL; int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; register fat_vol_t *vol = &fs_info->vol; 23214: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 23218: e3530004 cmp r3, #4 <== NOT EXECUTED 2321c: 1a000059 bne 23388 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 23220: e5dd3032 ldrb r3, [sp, #50] ; 0x32 <== NOT EXECUTED 23224: e5dd2031 ldrb r2, [sp, #49] ; 0x31 <== NOT EXECUTED 23228: e5dd1030 ldrb r1, [sp, #48] ; 0x30 <== NOT EXECUTED 2322c: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 23230: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 23234: e5dd2033 ldrb r2, [sp, #51] ; 0x33 <== NOT EXECUTED 23238: e1833001 orr r3, r3, r1 <== NOT EXECUTED 2323c: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 23240: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 23244: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED 23248: e2033080 and r3, r3, #128 ; 0x80 <== NOT EXECUTED 2324c: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED if (vol->mirror) 23250: e3530000 cmp r3, #0 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 23254: 15dd302c ldrbne r3, [sp, #44] ; 0x2c <== NOT EXECUTED 23258: 1203300f andne r3, r3, #15 <== NOT EXECUTED else vol->afat = 0; 2325c: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 23260: e5dd1035 ldrb r1, [sp, #53] ; 0x35 <== NOT EXECUTED 23264: e5dd3034 ldrb r3, [sp, #52] ; 0x34 <== NOT EXECUTED 23268: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED if( vol->info_sec == 0 ) 2326c: e3510000 cmp r1, #0 <== NOT EXECUTED if (vol->mirror) vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; else vol->afat = 0; vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 23270: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED if( vol->info_sec == 0 ) 23274: 0a000014 beq 232cc <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( EINVAL ); } else { ret = _fat_block_read(mt_entry, vol->info_sec , 0, 23278: e28d60a8 add r6, sp, #168 ; 0xa8 <== NOT EXECUTED 2327c: e1a00005 mov r0, r5 <== NOT EXECUTED 23280: e3a02000 mov r2, #0 <== NOT EXECUTED 23284: e3a03004 mov r3, #4 <== NOT EXECUTED 23288: e58d6000 str r6, [sp] <== NOT EXECUTED 2328c: ebffff01 bl 22e98 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 23290: e3500000 cmp r0, #0 <== NOT EXECUTED 23294: ba00001b blt 23308 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 23298: e5dd20aa ldrb r2, [sp, #170] ; 0xaa <== NOT EXECUTED 2329c: e5dd30a9 ldrb r3, [sp, #169] ; 0xa9 <== NOT EXECUTED 232a0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED 232a4: e5dd10a8 ldrb r1, [sp, #168] ; 0xa8 <== NOT EXECUTED 232a8: e1822403 orr r2, r2, r3, lsl #8 <== NOT EXECUTED 232ac: e5dd30ab ldrb r3, [sp, #171] ; 0xab <== NOT EXECUTED 232b0: e1822001 orr r2, r2, r1 <== NOT EXECUTED 232b4: e1822c03 orr r2, r2, r3, lsl #24 <== NOT EXECUTED 232b8: e59f3254 ldr r3, [pc, #596] ; 23514 <== NOT EXECUTED 232bc: e1520003 cmp r2, r3 <== NOT EXECUTED 232c0: 0a000006 beq 232e0 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 232c4: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 232c8: ebfffd71 bl 22894 <== NOT EXECUTED if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != FAT_FSINFO_LEAD_SIGNATURE_VALUE) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 232cc: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 232d0: ebff8c6d bl 648c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 232d4: eb006c3b bl 3e3c8 <__errno> <== NOT EXECUTED 232d8: e3a03016 mov r3, #22 <== NOT EXECUTED 232dc: ea000083 b 234f0 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 232e0: e1d413bc ldrh r1, [r4, #60] ; 0x3c <== NOT EXECUTED 232e4: e1a00005 mov r0, r5 <== NOT EXECUTED 232e8: e3a02f79 mov r2, #484 ; 0x1e4 <== NOT EXECUTED 232ec: e3a0300c mov r3, #12 <== NOT EXECUTED 232f0: e58d6000 str r6, [sp] <== NOT EXECUTED 232f4: ebfffee7 bl 22e98 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 232f8: e3500000 cmp r0, #0 <== NOT EXECUTED 232fc: aa000004 bge 23314 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 23300: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 23304: ebfffd62 bl 22894 <== NOT EXECUTED ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 23308: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 2330c: ebff8c5e bl 648c <== NOT EXECUTED 23310: ea000077 b 234f4 <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 23314: e5dd30ae ldrb r3, [sp, #174] ; 0xae <== NOT EXECUTED 23318: e5dd20ad ldrb r2, [sp, #173] ; 0xad <== NOT EXECUTED 2331c: e5dd10ac ldrb r1, [sp, #172] ; 0xac <== NOT EXECUTED 23320: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 23324: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 23328: e5dd20af ldrb r2, [sp, #175] ; 0xaf <== NOT EXECUTED 2332c: e1833001 orr r3, r3, r1 <== NOT EXECUTED 23330: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 23334: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 23338: e5dd30b2 ldrb r3, [sp, #178] ; 0xb2 <== NOT EXECUTED 2333c: e5dd20b1 ldrb r2, [sp, #177] ; 0xb1 <== NOT EXECUTED 23340: e5dd10b0 ldrb r1, [sp, #176] ; 0xb0 <== NOT EXECUTED 23344: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 23348: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 2334c: e5dd20b3 ldrb r2, [sp, #179] ; 0xb3 <== NOT EXECUTED 23350: e1833001 orr r3, r3, r1 <== NOT EXECUTED 23354: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 23358: e3e01000 mvn r1, #0 <== NOT EXECUTED rtems_disk_release(vol->dd); return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 2335c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 23360: e1a00005 mov r0, r5 <== NOT EXECUTED 23364: e1a02001 mov r2, r1 <== NOT EXECUTED 23368: ebfffe3b bl 22c5c <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 2336c: e2507000 subs r7, r0, #0 <== NOT EXECUTED 23370: 0a00000b beq 233a4 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 23374: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 23378: ebfffd45 bl 22894 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 0xFFFFFFFF); if ( rc != RC_OK ) { _fat_block_release(mt_entry); rtems_disk_release(vol->dd); 2337c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 23380: ebff8c41 bl 648c <== NOT EXECUTED return rc; 23384: ea00005b b 234f8 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 23388: e3a03000 mov r3, #0 <== NOT EXECUTED vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 2338c: e3e02000 mvn r2, #0 <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 23390: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; vol->next_cl = 0xFFFFFFFF; 23394: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 23398: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = 0; 2339c: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 233a0: e5842040 str r2, [r4, #64] ; 0x40 <== NOT EXECUTED int _fat_block_release( rtems_filesystem_mount_table_entry_t *mt_entry) { fat_fs_info_t *fs_info = mt_entry->fs_info; return fat_buf_release(fs_info); 233a4: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 233a8: ebfffd39 bl 22894 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 233ac: e5d41050 ldrb r1, [r4, #80] ; 0x50 <== NOT EXECUTED 233b0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 233b4: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 233b8: e0232190 mla r3, r0, r1, r2 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 233bc: e3a00002 mov r0, #2 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 233c0: e584304c str r3, [r4, #76] ; 0x4c <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 233c4: e3a0100c mov r1, #12 <== NOT EXECUTED 233c8: ebff8f49 bl 70f4 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 233cc: e3500000 cmp r0, #0 <== NOT EXECUTED _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 233d0: e1a03000 mov r3, r0 <== NOT EXECUTED 233d4: e5840064 str r0, [r4, #100] ; 0x64 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 233d8: 0a000010 beq 23420 <== NOT EXECUTED rtems_disk_release(vol->dd); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); 233dc: e280200c add r2, r0, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 233e0: e280c004 add ip, r0, #4 <== NOT EXECUTED the_chain->permanent_null = NULL; 233e4: e3a05000 mov r5, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 233e8: e280e010 add lr, r0, #16 <== NOT EXECUTED the_chain->permanent_null = NULL; 233ec: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 233f0: e5833008 str r3, [r3, #8] <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 233f4: e3a00002 mov r0, #2 <== NOT EXECUTED 233f8: e3a0100c mov r1, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 233fc: e583e00c str lr, [r3, #12] <== NOT EXECUTED 23400: e583c000 str ip, [r3] <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 23404: e5822008 str r2, [r2, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 23408: e5825004 str r5, [r2, #4] <== NOT EXECUTED 2340c: ebff8f38 bl 70f4 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 23410: e1500005 cmp r0, r5 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 23414: e5840068 str r0, [r4, #104] ; 0x68 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 23418: 1a000003 bne 2342c <== NOT EXECUTED 2341c: ea000018 b 23484 <== NOT EXECUTED /* set up collection of fat-files fd */ fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->vhash == NULL ) { rtems_disk_release(vol->dd); 23420: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 23424: ebff8c18 bl 648c <== NOT EXECUTED 23428: ea00002e b 234e8 <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); 2342c: e280300c add r3, r0, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 23430: e2802004 add r2, r0, #4 <== NOT EXECUTED 23434: e2801010 add r1, r0, #16 <== NOT EXECUTED 23438: e580100c str r1, [r0, #12] <== NOT EXECUTED 2343c: e8800024 stm r0, {r2, r5} <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 23440: e5800008 str r0, [r0, #8] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 23444: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 23448: e5833008 str r3, [r3, #8] <== NOT EXECUTED fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2344c: e594202c ldr r2, [r4, #44] ; 0x2c <== NOT EXECUTED 23450: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 23454: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 23458: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2345c: e1a03203 lsl r3, r3, #4 <== NOT EXECUTED 23460: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } for (i = 0; i < FAT_HASH_SIZE; i++) rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; 23464: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; 23468: e5845070 str r5, [r4, #112] ; 0x70 <== NOT EXECUTED fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2346c: e3a01001 mov r1, #1 <== NOT EXECUTED 23470: ebff8f1f bl 70f4 <== NOT EXECUTED if ( fs_info->uino == NULL ) 23474: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->rhash + i); fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE; fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 23478: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if ( fs_info->uino == NULL ) 2347c: 1a00000a bne 234ac <== NOT EXECUTED 23480: ea000003 b 23494 <== NOT EXECUTED rtems_chain_initialize_empty(fs_info->vhash + i); fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); if ( fs_info->rhash == NULL ) { rtems_disk_release(vol->dd); 23484: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 23488: ebff8bff bl 648c <== NOT EXECUTED free(fs_info->vhash); 2348c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 23490: ea000013 b 234e4 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); if ( fs_info->uino == NULL ) { rtems_disk_release(vol->dd); 23494: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 23498: ebff8bfb bl 648c <== NOT EXECUTED free(fs_info->vhash); 2349c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 234a0: ebff9083 bl 76b4 <== NOT EXECUTED free(fs_info->rhash); 234a4: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 234a8: ea00000d b 234e4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 234ac: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED 234b0: e3a01001 mov r1, #1 <== NOT EXECUTED 234b4: ebff8f0e bl 70f4 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 234b8: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_disk_release(vol->dd); free(fs_info->vhash); free(fs_info->rhash); rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 234bc: e5840088 str r0, [r4, #136] ; 0x88 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 234c0: 11a07005 movne r7, r5 <== NOT EXECUTED 234c4: 1a00000b bne 234f8 <== NOT EXECUTED { rtems_disk_release(vol->dd); 234c8: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 234cc: ebff8bee bl 648c <== NOT EXECUTED free(fs_info->vhash); 234d0: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 234d4: ebff9076 bl 76b4 <== NOT EXECUTED free(fs_info->rhash); 234d8: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 234dc: ebff9074 bl 76b4 <== NOT EXECUTED free(fs_info->uino); 234e0: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 234e4: ebff9072 bl 76b4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 234e8: eb006bb6 bl 3e3c8 <__errno> <== NOT EXECUTED 234ec: e3a0300c mov r3, #12 <== NOT EXECUTED 234f0: e5803000 str r3, [r0] <== NOT EXECUTED 234f4: e3e07000 mvn r7, #0 <== NOT EXECUTED } return RC_OK; } 234f8: e1a00007 mov r0, r7 <== NOT EXECUTED 234fc: e28dd0b8 add sp, sp, #184 ; 0xb8 <== NOT EXECUTED 23500: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 000227c4 : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 227c4: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED 227c8: e5930078 ldr r0, [r3, #120] ; 0x78 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 227cc: e1510000 cmp r1, r0 <== NOT EXECUTED 227d0: 33a00000 movcc r0, #0 <== NOT EXECUTED 227d4: 23a00001 movcs r0, #1 <== NOT EXECUTED 227d8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00039f7c : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 39f7c: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 39f80: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 39f84: e1a05000 mov r5, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 39f88: e5940034 ldr r0, [r4, #52] ; 0x34 <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; if (count == 0) 39f8c: e3520000 cmp r2, #0 <== NOT EXECUTED ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; 39f90: e3a09000 mov r9, #0 <== NOT EXECUTED uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 39f94: e2800002 add r0, r0, #2 <== NOT EXECUTED ) { int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; 39f98: e58d900c str r9, [sp, #12] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 39f9c: e1a08003 mov r8, r3 <== NOT EXECUTED uint32_t data_cls_val = fs_info->vol.data_cls + 2; uint32_t i = 2; *cls_added = 0; if (count == 0) 39fa0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 39fa4: e1a0a001 mov sl, r1 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t cl4find = 2; uint32_t next_cln = 0; uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 39fa8: e58d0000 str r0, [sp] <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; 39fac: e5839000 str r9, [r3] <== NOT EXECUTED if (count == 0) 39fb0: 01a07002 moveq r7, r2 <== NOT EXECUTED 39fb4: 0a000058 beq 3a11c <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 39fb8: e5946044 ldr r6, [r4, #68] ; 0x44 <== NOT EXECUTED 39fbc: e3760001 cmn r6, #1 <== NOT EXECUTED 39fc0: 03a06002 moveq r6, #2 <== NOT EXECUTED 39fc4: e3a0b002 mov fp, #2 <== NOT EXECUTED 39fc8: ea000042 b 3a0d8 <== NOT EXECUTED * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 39fcc: ebffff61 bl 39d58 <== NOT EXECUTED if ( rc != RC_OK ) 39fd0: e2507000 subs r7, r0, #0 <== NOT EXECUTED 39fd4: 0a000004 beq 39fec <== NOT EXECUTED { if (*cls_added != 0) 39fd8: e5983000 ldr r3, [r8] <== NOT EXECUTED 39fdc: e3530000 cmp r3, #0 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 39fe0: 11a00005 movne r0, r5 <== NOT EXECUTED while (i < data_cls_val) { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); if ( rc != RC_OK ) { if (*cls_added != 0) 39fe4: 0a00004c beq 3a11c <== NOT EXECUTED 39fe8: ea000015 b 3a044 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 39fec: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 39ff0: e3520000 cmp r2, #0 <== NOT EXECUTED 39ff4: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 39ff8: 1a000031 bne 3a0c4 <== NOT EXECUTED /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 39ffc: e5983000 ldr r3, [r8] <== NOT EXECUTED 3a000: e3530000 cmp r3, #0 <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3a004: e1a01006 mov r1, r6 <== NOT EXECUTED 3a008: e3e02000 mvn r2, #0 <== NOT EXECUTED * wouldn't work properly */ if (*cls_added == 0) { *chain = cl4find; rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3a00c: e1a00005 mov r0, r5 <== NOT EXECUTED /* * We are enforced to process allocation of the first free cluster * by separate 'if' statement because otherwise undo function * wouldn't work properly */ if (*cls_added == 0) 3a010: 1a000004 bne 3a028 <== NOT EXECUTED { *chain = cl4find; 3a014: e58a6000 str r6, [sl] <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3a018: ebfffeb6 bl 39af8 <== NOT EXECUTED if ( rc != RC_OK ) 3a01c: e2507000 subs r7, r0, #0 <== NOT EXECUTED 3a020: 0a000017 beq 3a084 <== NOT EXECUTED 3a024: ea00003c b 3a11c <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 3a028: e1a00005 mov r0, r5 <== NOT EXECUTED 3a02c: ebfffeb1 bl 39af8 <== NOT EXECUTED if ( rc != RC_OK ) 3a030: e2507000 subs r7, r0, #0 <== NOT EXECUTED /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 3a034: e1a01009 mov r1, r9 <== NOT EXECUTED 3a038: e1a02006 mov r2, r6 <== NOT EXECUTED 3a03c: e1a00005 mov r0, r5 <== NOT EXECUTED } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); if ( rc != RC_OK ) 3a040: 0a000002 beq 3a050 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 3a044: e59a1000 ldr r1, [sl] <== NOT EXECUTED 3a048: ebffff9c bl 39ec0 <== NOT EXECUTED return rc; 3a04c: ea000032 b 3a11c <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 3a050: ebfffea8 bl 39af8 <== NOT EXECUTED if ( rc != RC_OK ) 3a054: e2507000 subs r7, r0, #0 <== NOT EXECUTED 3a058: 0a000009 beq 3a084 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 3a05c: e59a1000 ldr r1, [sl] <== NOT EXECUTED 3a060: e1a00005 mov r0, r5 <== NOT EXECUTED 3a064: ebffff95 bl 39ec0 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 3a068: e1a00005 mov r0, r5 <== NOT EXECUTED 3a06c: e1a01006 mov r1, r6 <== NOT EXECUTED 3a070: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 3a074: ebfffe9f bl 39af8 <== NOT EXECUTED fat_buf_release(fs_info); 3a078: e1a00004 mov r0, r4 <== NOT EXECUTED 3a07c: ebffa204 bl 22894 <== NOT EXECUTED return rc; 3a080: ea000025 b 3a11c <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 3a084: e5983000 ldr r3, [r8] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3a088: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3a08c: e2833001 add r3, r3, #1 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3a090: e1530002 cmp r3, r2 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3a094: e5883000 str r3, [r8] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 3a098: 1a000008 bne 3a0c0 <== NOT EXECUTED { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 3a09c: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED (*cls_added)++; /* have we satisfied request ? */ if (*cls_added == count) { fs_info->vol.next_cl = save_cln; 3a0a0: e5846044 str r6, [r4, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 3a0a4: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 3a0a8: 15982000 ldrne r2, [r8] <== NOT EXECUTED 3a0ac: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED 3a0b0: 15843040 strne r3, [r4, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 3a0b4: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED 3a0b8: e5836000 str r6, [r3] <== NOT EXECUTED 3a0bc: ea000013 b 3a110 <== NOT EXECUTED fat_buf_release(fs_info); return rc; 3a0c0: e1a09006 mov r9, r6 <== NOT EXECUTED } } i++; cl4find++; if (cl4find >= data_cls_val) 3a0c4: e59d2000 ldr r2, [sp] <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 3a0c8: e2866001 add r6, r6, #1 <== NOT EXECUTED if (cl4find >= data_cls_val) 3a0cc: e1560002 cmp r6, r2 <== NOT EXECUTED 3a0d0: 23a06002 movcs r6, #2 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 3a0d4: e28bb001 add fp, fp, #1 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 3a0d8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3a0dc: e15b0003 cmp fp, r3 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 3a0e0: e1a01006 mov r1, r6 <== NOT EXECUTED 3a0e4: e28d200c add r2, sp, #12 <== NOT EXECUTED 3a0e8: e1a00005 mov r0, r5 <== NOT EXECUTED /* * fs_info->vol.data_cls is exactly the count of data clusters * starting at cluster 2, so the maximum valid cluster number is * (fs_info->vol.data_cls + 1) */ while (i < data_cls_val) 3a0ec: 3affffb6 bcc 39fcc <== NOT EXECUTED if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 3a0f0: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 3a0f4: e5849044 str r9, [r4, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 3a0f8: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 3a0fc: 15982000 ldrne r2, [r8] <== NOT EXECUTED 3a100: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED *last_cl = save_cln; 3a104: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) fs_info->vol.free_cls -= (*cls_added); 3a108: 15843040 strne r3, [r4, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 3a10c: e5829000 str r9, [r2] <== NOT EXECUTED fat_buf_release(fs_info); 3a110: e1a00004 mov r0, r4 <== NOT EXECUTED 3a114: ebffa1de bl 22894 <== NOT EXECUTED 3a118: e3a07000 mov r7, #0 <== NOT EXECUTED return RC_OK; } 3a11c: e1a00007 mov r0, r7 <== NOT EXECUTED 3a120: e28dd010 add sp, sp, #16 <== NOT EXECUTED 3a124: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00039af8 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 39af8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 39afc: e3a03000 mov r3, #0 <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 39b00: e3510001 cmp r1, #1 <== NOT EXECUTED fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 39b04: e1a05001 mov r5, r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; uint32_t sec = 0; uint32_t ofs = 0; uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; 39b08: e58d3000 str r3, [sp] <== NOT EXECUTED fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 39b0c: e1a07002 mov r7, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 39b10: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint16_t fat16_clv = 0; uint32_t fat32_clv = 0; rtems_bdbuf_buffer *block0 = NULL; /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 39b14: 9a00008a bls 39d44 <== NOT EXECUTED 39b18: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED 39b1c: e2833001 add r3, r3, #1 <== NOT EXECUTED 39b20: e1510003 cmp r1, r3 <== NOT EXECUTED 39b24: 8a000086 bhi 39d44 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 39b28: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 39b2c: e2130001 ands r0, r3, #1 <== NOT EXECUTED 39b30: 108120a1 addne r2, r1, r1, lsr #1 <== NOT EXECUTED 39b34: 1a000002 bne 39b44 <== NOT EXECUTED 39b38: e3130002 tst r3, #2 <== NOT EXECUTED 39b3c: 11a02081 lslne r2, r1, #1 <== NOT EXECUTED 39b40: 01a02101 lsleq r2, r1, #2 <== NOT EXECUTED 39b44: e5d4a002 ldrb sl, [r4, #2] <== NOT EXECUTED 39b48: e594104c ldr r1, [r4, #76] ; 0x4c <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39b4c: e3500000 cmp r0, #0 <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 39b50: e081aa32 add sl, r1, r2, lsr sl <== NOT EXECUTED fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39b54: 108580a5 addne r8, r5, r5, lsr #1 <== NOT EXECUTED 39b58: 1a000002 bne 39b68 <== NOT EXECUTED 39b5c: e3130002 tst r3, #2 <== NOT EXECUTED 39b60: 11a08085 lslne r8, r5, #1 <== NOT EXECUTED 39b64: 01a08105 lsleq r8, r5, #2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39b68: e1a00004 mov r0, r4 <== NOT EXECUTED 39b6c: e1a0100a mov r1, sl <== NOT EXECUTED 39b70: e3a02001 mov r2, #1 <== NOT EXECUTED 39b74: e1a0300d mov r3, sp <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39b78: e1d4b0b0 ldrh fp, [r4] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39b7c: ebffa394 bl 229d4 <== NOT EXECUTED if (rc != RC_OK) 39b80: e3500000 cmp r0, #0 <== NOT EXECUTED sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39b84: e1a0900d mov r9, sp <== NOT EXECUTED if (rc != RC_OK) 39b88: 1a000071 bne 39d54 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 39b8c: e5d4600a ldrb r6, [r4, #10] <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39b90: e24bb001 sub fp, fp, #1 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 39b94: e3560002 cmp r6, #2 <== NOT EXECUTED if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + fs_info->vol.afat_loc; ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1); 39b98: e008800b and r8, r8, fp <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; switch ( fs_info->vol.type ) 39b9c: 0a00005a beq 39d0c <== NOT EXECUTED 39ba0: e3560004 cmp r6, #4 <== NOT EXECUTED 39ba4: 0a00005c beq 39d1c <== NOT EXECUTED 39ba8: e3560001 cmp r6, #1 <== NOT EXECUTED 39bac: 1a000064 bne 39d44 <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 39bb0: e3150001 tst r5, #1 <== NOT EXECUTED 39bb4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39bb8: 0a000026 beq 39c58 <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 39bbc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = 39bc0: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 39bc4: e202200f and r2, r2, #15 <== NOT EXECUTED 39bc8: e7c32008 strb r2, [r3, r8] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 39bcc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39bd0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 39bd4: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED switch ( fs_info->vol.type ) { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; 39bd8: e1a07a07 lsl r7, r7, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 39bdc: e1822827 orr r2, r2, r7, lsr #16 <== NOT EXECUTED 39be0: e7c32008 strb r2, [r3, r8] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 39be4: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 39be8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 39bec: e1580003 cmp r8, r3 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 39bf0: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED 39bf4: 1a00000e bne 39c34 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 39bf8: e28a1001 add r1, sl, #1 <== NOT EXECUTED 39bfc: e1a0300d mov r3, sp <== NOT EXECUTED 39c00: e1a00004 mov r0, r4 <== NOT EXECUTED 39c04: e1a02006 mov r2, r6 <== NOT EXECUTED 39c08: ebffa371 bl 229d4 <== NOT EXECUTED &block0); if (rc != RC_OK) 39c0c: e3500000 cmp r0, #0 <== NOT EXECUTED 39c10: 1a00004f bne 39d54 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 39c14: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39c18: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39c1c: e5c30000 strb r0, [r3] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 39c20: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39c24: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 39c28: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 39c2c: e1827c27 orr r7, r2, r7, lsr #24 <== NOT EXECUTED 39c30: ea000026 b 39cd0 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 39c34: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39c38: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39c3c: e2888001 add r8, r8, #1 <== NOT EXECUTED 39c40: e7c30008 strb r0, [r3, r8] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 39c44: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39c48: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 39c4c: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 39c50: e1827c27 orr r7, r2, r7, lsr #24 <== NOT EXECUTED 39c54: ea00002a b 39d04 <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 39c58: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39c5c: e7c30008 strb r0, [r3, r8] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 39c60: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39c64: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 39c68: e1a07a07 lsl r7, r7, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 39c6c: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 39c70: e1a07a27 lsr r7, r7, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 39c74: e1822007 orr r2, r2, r7 <== NOT EXECUTED 39c78: e7c32008 strb r2, [r3, r8] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) | (uint8_t )(fat16_clv & 0x00FF); fat_buf_mark_modified(fs_info); if ( ofs == (fs_info->vol.bps - 1) ) 39c7c: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 39c80: e2433001 sub r3, r3, #1 <== NOT EXECUTED 39c84: e1580003 cmp r8, r3 <== NOT EXECUTED 39c88: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED 39c8c: 1a000012 bne 39cdc <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 39c90: e28a1001 add r1, sl, #1 <== NOT EXECUTED 39c94: e1a0300d mov r3, sp <== NOT EXECUTED 39c98: e1a00004 mov r0, r4 <== NOT EXECUTED 39c9c: e1a02006 mov r2, r6 <== NOT EXECUTED 39ca0: ebffa34b bl 229d4 <== NOT EXECUTED &block0); if (rc != RC_OK) 39ca4: e3500000 cmp r0, #0 <== NOT EXECUTED 39ca8: 1a000029 bne 39d54 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 39cac: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39cb0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, &block0); if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) = 39cb4: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 39cb8: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 39cbc: e5c32000 strb r2, [r3] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 39cc0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39cc4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 39cc8: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 39ccc: e1827427 orr r7, r2, r7, lsr #8 <== NOT EXECUTED 39cd0: e5c37000 strb r7, [r3] <== NOT EXECUTED 39cd4: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED 39cd8: ea00001d b 39d54 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 39cdc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39ce0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39ce4: e2888001 add r8, r8, #1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 39ce8: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 39cec: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 39cf0: e7c32008 strb r2, [r3, r8] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = (*((uint8_t *)(block0->buffer + ofs+1))) | 39cf4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39cf8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; *((uint8_t *)(block0->buffer + ofs+1)) = 39cfc: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 39d00: e1827427 orr r7, r2, r7, lsr #8 <== NOT EXECUTED 39d04: e7c37008 strb r7, [r3, r8] <== NOT EXECUTED 39d08: ea000011 b 39d54 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 39d0c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39d10: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 39d14: e18370b8 strh r7, [r3, r8] <== NOT EXECUTED 39d18: ea000006 b 39d38 <== NOT EXECUTED case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); 39d1c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39d20: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = 39d24: e7932008 ldr r2, [r3, r8] <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 39d28: e3c7720f bic r7, r7, #-268435456 ; 0xf0000000 <== NOT EXECUTED break; case FAT_FAT32: fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK)); *((uint32_t *)(block0->buffer + ofs)) = 39d2c: e202220f and r2, r2, #-268435456 ; 0xf0000000 <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 39d30: e1827007 orr r7, r2, r7 <== NOT EXECUTED 39d34: e7837008 str r7, [r3, r8] <== NOT EXECUTED 39d38: e3a03001 mov r3, #1 <== NOT EXECUTED 39d3c: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 39d40: ea000003 b 39d54 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 39d44: eb00119f bl 3e3c8 <__errno> <== NOT EXECUTED 39d48: e3a03005 mov r3, #5 <== NOT EXECUTED 39d4c: e5803000 str r3, [r0] <== NOT EXECUTED 39d50: e3e00000 mvn r0, #0 <== NOT EXECUTED break; } return RC_OK; } 39d54: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00022cbc : * RC_OK on success, or -1 if error occured * and errno set appropriately */ int fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry) { 22cbc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 22cc0: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 22cc4: e5d4500a ldrb r5, [r4, #10] <== NOT EXECUTED 22cc8: e2155004 ands r5, r5, #4 <== NOT EXECUTED 22ccc: 0a000004 beq 22ce4 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 22cd0: e2841040 add r1, r4, #64 ; 0x40 <== NOT EXECUTED 22cd4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 22cd8: ebffffdf bl 22c5c <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 22cdc: e2505000 subs r5, r0, #0 <== NOT EXECUTED 22ce0: 13e05000 mvnne r5, #0 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 22ce4: e1a00004 mov r0, r4 <== NOT EXECUTED 22ce8: ebfffee9 bl 22894 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 22cec: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 22cf0: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22cf4: ebff8299 bl 3760 <== NOT EXECUTED 22cf8: e3500000 cmp r0, #0 <== NOT EXECUTED 22cfc: 13e05000 mvnne r5, #0 <== NOT EXECUTED 22d00: e3a07000 mov r7, #0 <== NOT EXECUTED rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; 22d04: e5948064 ldr r8, [r4, #100] ; 0x64 <== NOT EXECUTED 22d08: e0888007 add r8, r8, r7 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 22d0c: ea000000 b 22d14 <== NOT EXECUTED free(node); 22d10: ebff9267 bl 76b4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 22d14: e1a00008 mov r0, r8 <== NOT EXECUTED 22d18: ebffa5e4 bl c4b0 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->vhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 22d1c: e2506000 subs r6, r0, #0 <== NOT EXECUTED 22d20: 1afffffa bne 22d10 <== NOT EXECUTED 22d24: e287700c add r7, r7, #12 <== NOT EXECUTED fat_buf_release(fs_info); if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) rc = -1; for (i = 0; i < FAT_HASH_SIZE; i++) 22d28: e3570018 cmp r7, #24 <== NOT EXECUTED 22d2c: 1afffff4 bne 22d04 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 22d30: e5947068 ldr r7, [r4, #104] ; 0x68 <== NOT EXECUTED 22d34: e0877006 add r7, r7, r6 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 22d38: ea000000 b 22d40 <== NOT EXECUTED free(node); 22d3c: ebff925c bl 76b4 <== NOT EXECUTED 22d40: e1a00007 mov r0, r7 <== NOT EXECUTED 22d44: ebffa5d9 bl c4b0 <_Chain_Get> <== NOT EXECUTED for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; while ( (node = rtems_chain_get(the_chain)) != NULL ) 22d48: e3500000 cmp r0, #0 <== NOT EXECUTED 22d4c: 1afffffa bne 22d3c <== NOT EXECUTED 22d50: e286600c add r6, r6, #12 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } for (i = 0; i < FAT_HASH_SIZE; i++) 22d54: e3560018 cmp r6, #24 <== NOT EXECUTED 22d58: 1afffff4 bne 22d30 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 22d5c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22d60: ebff9253 bl 76b4 <== NOT EXECUTED free(fs_info->rhash); 22d64: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 22d68: ebff9251 bl 76b4 <== NOT EXECUTED free(fs_info->uino); 22d6c: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 22d70: ebff924f bl 76b4 <== NOT EXECUTED free(fs_info->sec_buf); 22d74: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 22d78: ebff924d bl 76b4 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 22d7c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 22d80: ebff8dc1 bl 648c <== NOT EXECUTED if (rc) 22d84: e3550000 cmp r5, #0 <== NOT EXECUTED 22d88: 0a000002 beq 22d98 <== NOT EXECUTED errno = EIO; 22d8c: eb006d8d bl 3e3c8 <__errno> <== NOT EXECUTED 22d90: e3a03005 mov r3, #5 <== NOT EXECUTED 22d94: e5803000 str r3, [r0] <== NOT EXECUTED return rc; } 22d98: e1a00005 mov r0, r5 <== NOT EXECUTED 22d9c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 0003a4f4 : #include int fchdir( int fd ) { 3a4f4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 3a4f8: e59f3148 ldr r3, [pc, #328] ; 3a648 <== NOT EXECUTED 3a4fc: e5933000 ldr r3, [r3] <== NOT EXECUTED 3a500: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 3a504: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 3a508: 2a000005 bcs 3a524 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 3a50c: e59f3138 ldr r3, [pc, #312] ; 3a64c <== NOT EXECUTED 3a510: e5934000 ldr r4, [r3] <== NOT EXECUTED 3a514: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 3a518: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 3a51c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3a520: 1a000002 bne 3a530 <== NOT EXECUTED 3a524: eb000fa7 bl 3e3c8 <__errno> <== NOT EXECUTED 3a528: e3a03009 mov r3, #9 <== NOT EXECUTED 3a52c: ea000011 b 3a578 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 3a530: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 3a534: e3530000 cmp r3, #0 <== NOT EXECUTED 3a538: 0a000002 beq 3a548 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 3a53c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 3a540: e3530000 cmp r3, #0 <== NOT EXECUTED 3a544: 1a000002 bne 3a554 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 3a548: eb000f9e bl 3e3c8 <__errno> <== NOT EXECUTED 3a54c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3a550: ea000008 b 3a578 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 3a554: e2844018 add r4, r4, #24 <== NOT EXECUTED 3a558: e1a00004 mov r0, r4 <== NOT EXECUTED 3a55c: e1a0e00f mov lr, pc <== NOT EXECUTED 3a560: e12fff13 bx r3 <== NOT EXECUTED 3a564: e3500001 cmp r0, #1 <== NOT EXECUTED 3a568: e1a06000 mov r6, r0 <== NOT EXECUTED 3a56c: 0a000003 beq 3a580 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 3a570: eb000f94 bl 3e3c8 <__errno> <== NOT EXECUTED 3a574: e3a03014 mov r3, #20 <== NOT EXECUTED 3a578: e5803000 str r3, [r0] <== NOT EXECUTED 3a57c: ea00001c b 3a5f4 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 3a580: e59f50c8 ldr r5, [pc, #200] ; 3a650 <== NOT EXECUTED 3a584: e5957000 ldr r7, [r5] <== NOT EXECUTED 3a588: e287c004 add ip, r7, #4 <== NOT EXECUTED 3a58c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3a590: e28de004 add lr, sp, #4 <== NOT EXECUTED 3a594: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3a598: e59c3000 ldr r3, [ip] <== NOT EXECUTED 3a59c: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 3a5a0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3a5a4: e287e004 add lr, r7, #4 <== NOT EXECUTED 3a5a8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 3a5ac: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 3a5b0: e3a0e000 mov lr, #0 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 3a5b4: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 3a5b8: e1a01006 mov r1, r6 <== NOT EXECUTED 3a5bc: e1a0200e mov r2, lr <== NOT EXECUTED 3a5c0: e59f008c ldr r0, [pc, #140] ; 3a654 <== NOT EXECUTED 3a5c4: e28d3018 add r3, sp, #24 <== NOT EXECUTED 3a5c8: e58de000 str lr, [sp] <== NOT EXECUTED 3a5cc: ebff341a bl 763c <== NOT EXECUTED 3a5d0: e3500000 cmp r0, #0 <== NOT EXECUTED 3a5d4: 0a000008 beq 3a5fc <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 3a5d8: e595c000 ldr ip, [r5] <== NOT EXECUTED 3a5dc: e28d4004 add r4, sp, #4 <== NOT EXECUTED 3a5e0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3a5e4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 3a5e8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3a5ec: e5943000 ldr r3, [r4] <== NOT EXECUTED 3a5f0: e58c3000 str r3, [ip] <== NOT EXECUTED 3a5f4: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 3a5f8: ea000010 b 3a640 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 3a5fc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3a600: e3530000 cmp r3, #0 <== NOT EXECUTED 3a604: 0a000004 beq 3a61c <== NOT EXECUTED 3a608: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3a60c: e3530000 cmp r3, #0 <== NOT EXECUTED 3a610: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 3a614: 11a0e00f movne lr, pc <== NOT EXECUTED 3a618: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 3a61c: e59f302c ldr r3, [pc, #44] ; 3a650 <== NOT EXECUTED 3a620: e28d4018 add r4, sp, #24 <== NOT EXECUTED 3a624: e593c000 ldr ip, [r3] <== NOT EXECUTED 3a628: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3a62c: e28cc004 add ip, ip, #4 <== NOT EXECUTED 3a630: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3a634: e5943000 ldr r3, [r4] <== NOT EXECUTED 3a638: e58c3000 str r3, [ip] <== NOT EXECUTED 3a63c: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 3a640: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 3a644: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 0002533c : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2533c: e59f3068 ldr r3, [pc, #104] ; 253ac <== NOT EXECUTED 25340: e5932000 ldr r2, [r3] <== NOT EXECUTED 25344: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 25348: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2534c: 2a000005 bcs 25368 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 25350: e59f3058 ldr r3, [pc, #88] ; 253b0 <== NOT EXECUTED 25354: e5933000 ldr r3, [r3] <== NOT EXECUTED 25358: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2535c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 25360: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 25364: 1a000002 bne 25374 <== NOT EXECUTED 25368: eb006416 bl 3e3c8 <__errno> <== NOT EXECUTED 2536c: e3a03009 mov r3, #9 <== NOT EXECUTED 25370: ea000005 b 2538c <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 25374: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 25378: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 2537c: e3520000 cmp r2, #0 <== NOT EXECUTED 25380: 1a000004 bne 25398 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 25384: eb00640f bl 3e3c8 <__errno> <== NOT EXECUTED 25388: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2538c: e5803000 str r3, [r0] <== NOT EXECUTED 25390: e3e00000 mvn r0, #0 <== NOT EXECUTED 25394: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 25398: e2830018 add r0, r3, #24 <== NOT EXECUTED 2539c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 253a0: e1a0e00f mov lr, pc <== NOT EXECUTED 253a4: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 253a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 000253b4 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 253b4: e59f3088 ldr r3, [pc, #136] ; 25444 <== NOT EXECUTED 253b8: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 253bc: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 253c0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 253c4: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 253c8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 253cc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 253d0: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 253d4: 2a000005 bcs 253f0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 253d8: e59f3068 ldr r3, [pc, #104] ; 25448 <== NOT EXECUTED 253dc: e5933000 ldr r3, [r3] <== NOT EXECUTED 253e0: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 253e4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 253e8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 253ec: 1a000002 bne 253fc <== NOT EXECUTED 253f0: eb0063f4 bl 3e3c8 <__errno> <== NOT EXECUTED 253f4: e3a03009 mov r3, #9 <== NOT EXECUTED 253f8: ea00000a b 25428 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 253fc: e3130004 tst r3, #4 <== NOT EXECUTED 25400: 1a000002 bne 25410 <== NOT EXECUTED 25404: eb0063ef bl 3e3c8 <__errno> <== NOT EXECUTED 25408: e3a03016 mov r3, #22 <== NOT EXECUTED 2540c: ea000005 b 25428 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 25410: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 25414: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 25418: e3530000 cmp r3, #0 <== NOT EXECUTED 2541c: 1a000004 bne 25434 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 25420: eb0063e8 bl 3e3c8 <__errno> <== NOT EXECUTED 25424: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25428: e5803000 str r3, [r0] <== NOT EXECUTED 2542c: e3e00000 mvn r0, #0 <== NOT EXECUTED 25430: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 25434: e2800018 add r0, r0, #24 <== NOT EXECUTED 25438: e1a0e00f mov lr, pc <== NOT EXECUTED 2543c: e12fff13 bx r3 <== NOT EXECUTED } 25440: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 0003a658 : int fcntl( int fd, int cmd, ... ) { 3a658: e92d000e push {r1, r2, r3} 3a65c: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3a660: e59f31a4 ldr r3, [pc, #420] ; 3a80c 3a664: e5933000 ldr r3, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 3a668: e28d201c add r2, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3a66c: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 3a670: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 3a674: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3a678: 2a000005 bcs 3a694 iop = rtems_libio_iop( fd ); 3a67c: e59f118c ldr r1, [pc, #396] ; 3a810 3a680: e591c000 ldr ip, [r1] 3a684: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 3a688: e5940014 ldr r0, [r4, #20] 3a68c: e3100c01 tst r0, #256 ; 0x100 3a690: 1a000002 bne 3a6a0 3a694: eb000f4b bl 3e3c8 <__errno> <== NOT EXECUTED 3a698: e3a03009 mov r3, #9 <== NOT EXECUTED 3a69c: ea000045 b 3a7b8 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 3a6a0: e3570009 cmp r7, #9 3a6a4: 979ff107 ldrls pc, [pc, r7, lsl #2] 3a6a8: ea000040 b 3a7b0 3a6ac: 0003a6d4 .word 0x0003a6d4 3a6b0: 0003a740 .word 0x0003a740 3a6b4: 0003a74c .word 0x0003a74c 3a6b8: 0003a76c .word 0x0003a76c 3a6bc: 0003a778 .word 0x0003a778 3a6c0: 0003a7a4 .word 0x0003a7a4 3a6c4: 0003a7a4 .word 0x0003a7a4 3a6c8: 0003a7a4 .word 0x0003a7a4 3a6cc: 0003a7a4 .word 0x0003a7a4 3a6d0: 0003a7a4 .word 0x0003a7a4 case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 3a6d4: e5922000 ldr r2, [r2] if ( fd2 ) 3a6d8: e3520000 cmp r2, #0 3a6dc: 0a000003 beq 3a6f0 diop = rtems_libio_iop( fd2 ); 3a6e0: e1520003 cmp r2, r3 <== NOT EXECUTED 3a6e4: 23a0c000 movcs ip, #0 <== NOT EXECUTED 3a6e8: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 3a6ec: ea000002 b 3a6fc <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 3a6f0: ebff34fa bl 7ae0 if ( diop == 0 ) { 3a6f4: e250c000 subs ip, r0, #0 3a6f8: 0a00003e beq 3a7f8 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3a6fc: e2846018 add r6, r4, #24 3a700: e8b6000f ldm r6!, {r0, r1, r2, r3} 3a704: e28c5018 add r5, ip, #24 3a708: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 3a70c: e59f30fc ldr r3, [pc, #252] ; 3a810 3a710: e5933000 ldr r3, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3a714: e5966000 ldr r6, [r6] ret = -1; break; } } diop->handlers = iop->handlers; 3a718: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 3a71c: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 3a720: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3a724: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 3a728: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 3a72c: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 3a730: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 3a734: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3a738: e1a05343 asr r5, r3, #6 3a73c: ea00001f b 3a7c0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 3a740: e1a055a0 lsr r5, r0, #11 3a744: e2055001 and r5, r5, #1 3a748: ea00001e b 3a7c8 * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 3a74c: e5925000 ldr r5, [r2] 3a750: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 3a754: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 3a758: 03c00b02 biceq r0, r0, #2048 ; 0x800 * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 3a75c: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 3a760: 05840014 streq r0, [r4, #20] * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 3a764: 0a000017 beq 3a7c8 3a768: ea00000b b 3a79c else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 3a76c: ebff3472 bl 793c 3a770: e1a05000 mov r5, r0 3a774: ea000011 b 3a7c0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 3a778: e5920000 ldr r0, [r2] 3a77c: ebff3504 bl 7b94 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 3a780: e5943014 ldr r3, [r4, #20] 3a784: e59f2088 ldr r2, [pc, #136] ; 3a814 3a788: e3c33c02 bic r3, r3, #512 ; 0x200 3a78c: e0002002 and r2, r0, r2 3a790: e3c33001 bic r3, r3, #1 3a794: e1823003 orr r3, r2, r3 3a798: e5843014 str r3, [r4, #20] 3a79c: e3a05000 mov r5, #0 3a7a0: ea000008 b 3a7c8 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 3a7a4: eb000f07 bl 3e3c8 <__errno> 3a7a8: e3a03086 mov r3, #134 ; 0x86 3a7ac: ea000001 b 3a7b8 ret = -1; break; default: errno = EINVAL; 3a7b0: eb000f04 bl 3e3c8 <__errno> 3a7b4: e3a03016 mov r3, #22 3a7b8: e5803000 str r3, [r0] 3a7bc: ea00000d b 3a7f8 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 3a7c0: e3550000 cmp r5, #0 3a7c4: ba00000c blt 3a7fc if (iop->handlers->fcntl_h) { 3a7c8: e594303c ldr r3, [r4, #60] ; 0x3c 3a7cc: e5933030 ldr r3, [r3, #48] ; 0x30 3a7d0: e3530000 cmp r3, #0 3a7d4: 0a000008 beq 3a7fc int err = (*iop->handlers->fcntl_h)( cmd, iop ); 3a7d8: e1a01004 mov r1, r4 3a7dc: e1a00007 mov r0, r7 3a7e0: e1a0e00f mov lr, pc 3a7e4: e12fff13 bx r3 if (err) { 3a7e8: e2504000 subs r4, r0, #0 3a7ec: 0a000002 beq 3a7fc errno = err; 3a7f0: eb000ef4 bl 3e3c8 <__errno> <== NOT EXECUTED 3a7f4: e5804000 str r4, [r0] <== NOT EXECUTED 3a7f8: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 3a7fc: e1a00005 mov r0, r5 3a800: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 3a804: e28dd00c add sp, sp, #12 3a808: e12fff1e bx lr =============================================================================== 00002970 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2970: e59f3068 ldr r3, [pc, #104] ; 29e0 2974: e5933000 ldr r3, [r3] 2978: e1500003 cmp r0, r3 #include int fdatasync( int fd ) { 297c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2980: 2a000007 bcs 29a4 iop = rtems_libio_iop( fd ); 2984: e59f3058 ldr r3, [pc, #88] ; 29e4 2988: e5933000 ldr r3, [r3] 298c: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2990: e5903014 ldr r3, [r0, #20] 2994: e3130c01 tst r3, #256 ; 0x100 2998: 0a000001 beq 29a4 rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF ); 299c: e3130004 tst r3, #4 29a0: 1a000002 bne 29b0 29a4: eb0033d0 bl f8ec <__errno> 29a8: e3a03009 mov r3, #9 29ac: ea000005 b 29c8 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 29b0: e590303c ldr r3, [r0, #60] ; 0x3c 29b4: e593302c ldr r3, [r3, #44] ; 0x2c 29b8: e3530000 cmp r3, #0 29bc: 1a000004 bne 29d4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 29c0: eb0033c9 bl f8ec <__errno> 29c4: e3a03086 mov r3, #134 ; 0x86 29c8: e5803000 str r3, [r0] 29cc: e3e00000 mvn r0, #0 29d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fdatasync_h)( iop ); 29d4: e1a0e00f mov lr, pc <== NOT EXECUTED 29d8: e12fff13 bx r3 <== NOT EXECUTED } 29dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00008da8 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8da8: e59f3360 ldr r3, [pc, #864] ; 9110 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 8dac: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr} 8db0: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8db4: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 8db8: e1a06000 mov r6, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8dbc: e1a02001 mov r2, r1 8dc0: e5930000 ldr r0, [r3] 8dc4: ebfff0f4 bl 519c 8dc8: e250a000 subs sl, r0, #0 8dcc: 13e05003 mvnne r5, #3 8dd0: 1a0000cc bne 9108 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 8dd4: e5964000 ldr r4, [r6] <== NOT EXECUTED if (pipe == NULL) { 8dd8: e3540000 cmp r4, #0 <== NOT EXECUTED 8ddc: 1a00004c bne 8f14 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 8de0: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED 8de4: ebffe505 bl 2200 <== NOT EXECUTED if (pipe == NULL) 8de8: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 8dec: e1a04000 mov r4, r0 <== NOT EXECUTED 8df0: e1a08000 mov r8, r0 <== NOT EXECUTED if (pipe == NULL) 8df4: 0a000044 beq 8f0c <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 8df8: e1a0100a mov r1, sl <== NOT EXECUTED 8dfc: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED 8e00: eb001881 bl f00c <== NOT EXECUTED pipe->Size = PIPE_BUF; 8e04: e3a00c02 mov r0, #512 ; 0x200 <== NOT EXECUTED 8e08: e5840004 str r0, [r4, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 8e0c: ebffe4fb bl 2200 <== NOT EXECUTED if (! pipe->Buffer) 8e10: e3500000 cmp r0, #0 <== NOT EXECUTED if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); 8e14: e5840000 str r0, [r4] <== NOT EXECUTED if (! pipe->Buffer) 8e18: 0a000039 beq 8f04 <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 8e1c: e59f52f0 ldr r5, [pc, #752] ; 9114 <== NOT EXECUTED 8e20: e59f02f0 ldr r0, [pc, #752] ; 9118 <== NOT EXECUTED 8e24: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 8e28: e1a0100a mov r1, sl <== NOT EXECUTED 8e2c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 8e30: e1a0200a mov r2, sl <== NOT EXECUTED 8e34: e284302c add r3, r4, #44 ; 0x2c <== NOT EXECUTED 8e38: eb000886 bl b058 <== NOT EXECUTED 8e3c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 8e40: 1a00002d bne 8efc <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 8e44: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 8e48: e59f02cc ldr r0, [pc, #716] ; 911c <== NOT EXECUTED 8e4c: e1a02001 mov r2, r1 <== NOT EXECUTED 8e50: e1830000 orr r0, r3, r0 <== NOT EXECUTED 8e54: e2843030 add r3, r4, #48 ; 0x30 <== NOT EXECUTED 8e58: eb00087e bl b058 <== NOT EXECUTED 8e5c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 8e60: 1a000023 bne 8ef4 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 8e64: e5d52000 ldrb r2, [r5] <== NOT EXECUTED 8e68: e59f02b0 ldr r0, [pc, #688] ; 9120 <== NOT EXECUTED 8e6c: e284c028 add ip, r4, #40 ; 0x28 <== NOT EXECUTED 8e70: e1820000 orr r0, r2, r0 <== NOT EXECUTED 8e74: e3a01001 mov r1, #1 <== NOT EXECUTED 8e78: e3a02010 mov r2, #16 <== NOT EXECUTED 8e7c: e58dc000 str ip, [sp] <== NOT EXECUTED 8e80: ebfff033 bl 4f54 <== NOT EXECUTED 8e84: e3500000 cmp r0, #0 <== NOT EXECUTED 8e88: 1a000017 bne 8eec <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 8e8c: e28d8004 add r8, sp, #4 <== NOT EXECUTED 8e90: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED 8e94: e1a02008 mov r2, r8 <== NOT EXECUTED 8e98: e59f0284 ldr r0, [pc, #644] ; 9124 <== NOT EXECUTED 8e9c: ebfff664 bl 6834 <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 8ea0: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED 8ea4: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED 8ea8: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 8eac: ebfff89e bl 712c <_Thread_Enable_dispatch> <== NOT EXECUTED 8eb0: e1a02008 mov r2, r8 <== NOT EXECUTED 8eb4: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED 8eb8: e59f0264 ldr r0, [pc, #612] ; 9124 <== NOT EXECUTED 8ebc: ebfff65c bl 6834 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 8ec0: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED 8ec4: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED 8ec8: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 8ecc: ebfff896 bl 712c <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 8ed0: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 8ed4: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED 8ed8: e2833001 add r3, r3, #1 <== NOT EXECUTED 8edc: e5c53000 strb r3, [r5] <== NOT EXECUTED c = 'a'; 8ee0: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED 8ee4: 05c53000 strbeq r3, [r5] <== NOT EXECUTED 8ee8: ea000009 b 8f14 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 8eec: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 8ef0: eb000886 bl b110 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 8ef4: e598002c ldr r0, [r8, #44] ; 0x2c <== NOT EXECUTED 8ef8: eb000884 bl b110 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 8efc: e5980000 ldr r0, [r8] <== NOT EXECUTED 8f00: ebffe3f2 bl 1ed0 <== NOT EXECUTED err_buf: free(pipe); 8f04: e1a00008 mov r0, r8 <== NOT EXECUTED 8f08: ebffe3f0 bl 1ed0 <== NOT EXECUTED 8f0c: e3e0500b mvn r5, #11 <== NOT EXECUTED 8f10: ea00000d b 8f4c <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 8f14: e3a01000 mov r1, #0 <== NOT EXECUTED 8f18: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8f1c: e1a02001 mov r2, r1 <== NOT EXECUTED 8f20: ebfff09d bl 519c <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 8f24: e5963000 ldr r3, [r6] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 8f28: e3500000 cmp r0, #0 <== NOT EXECUTED 8f2c: 01a05000 moveq r5, r0 <== NOT EXECUTED 8f30: 13e05003 mvnne r5, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 8f34: e3530000 cmp r3, #0 <== NOT EXECUTED 8f38: 1a000003 bne 8f4c <== NOT EXECUTED if (err) 8f3c: e3550000 cmp r5, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 8f40: 05864000 streq r4, [r6] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); 8f44: 11a00004 movne r0, r4 <== NOT EXECUTED 8f48: 1bffff4a blne 8c78 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 8f4c: e59f31bc ldr r3, [pc, #444] ; 9110 <== NOT EXECUTED 8f50: e5930000 ldr r0, [r3] <== NOT EXECUTED 8f54: ebfff0d6 bl 52b4 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 8f58: e3550000 cmp r5, #0 <== NOT EXECUTED 8f5c: 1a000069 bne 9108 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 8f60: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 8f64: e2033006 and r3, r3, #6 <== NOT EXECUTED 8f68: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 8f6c: e5964000 ldr r4, [r6] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 8f70: 0a000024 beq 9008 <== NOT EXECUTED 8f74: e3530006 cmp r3, #6 <== NOT EXECUTED 8f78: 0a000047 beq 909c <== NOT EXECUTED 8f7c: e3530002 cmp r3, #2 <== NOT EXECUTED 8f80: 1a000059 bne 90ec <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 8f84: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8f88: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 8f8c: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8f90: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 8f94: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8f98: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 8f9c: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 8fa0: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED 8fa4: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 8fa8: 0b000870 bleq b170 <== NOT EXECUTED if (pipe->Writers == 0) { 8fac: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 8fb0: e3530000 cmp r3, #0 <== NOT EXECUTED 8fb4: 1a00004c bne 90ec <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 8fb8: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 8fbc: e3130001 tst r3, #1 <== NOT EXECUTED 8fc0: 1a000049 bne 90ec <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 8fc4: e5948024 ldr r8, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 8fc8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8fcc: ebfff0b8 bl 52b4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 8fd0: e3a01000 mov r1, #0 <== NOT EXECUTED 8fd4: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED 8fd8: eb00087a bl b1c8 <== NOT EXECUTED 8fdc: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8fe0: e1a02001 mov r2, r1 <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) 8fe4: 1a000043 bne 90f8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8fe8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8fec: ebfff06a bl 519c <== NOT EXECUTED 8ff0: e3500000 cmp r0, #0 <== NOT EXECUTED 8ff4: 1a00003f bne 90f8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 8ff8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 8ffc: e1580003 cmp r8, r3 <== NOT EXECUTED 9000: 0afffff0 beq 8fc8 <== NOT EXECUTED 9004: ea000038 b 90ec <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 9008: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 900c: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 9010: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 9014: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 9018: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 901c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 9020: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 9024: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED 9028: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 902c: 0b00084f bleq b170 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 9030: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 9034: e3530000 cmp r3, #0 <== NOT EXECUTED 9038: 1a00002b bne 90ec <== NOT EXECUTED 903c: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 9040: e3130001 tst r3, #1 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 9044: 05948020 ldreq r8, [r4, #32] <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 9048: 0a000003 beq 905c <== NOT EXECUTED PIPE_UNLOCK(pipe); 904c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 9050: ebfff097 bl 52b4 <== NOT EXECUTED 9054: e3e05005 mvn r5, #5 <== NOT EXECUTED err = -ENXIO; goto out_error; 9058: ea000027 b 90fc <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 905c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 9060: ebfff093 bl 52b4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 9064: e3a01000 mov r1, #0 <== NOT EXECUTED 9068: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 906c: eb000855 bl b1c8 <== NOT EXECUTED 9070: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 9074: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 9078: 1a00001e bne 90f8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 907c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 9080: ebfff045 bl 519c <== NOT EXECUTED 9084: e3500000 cmp r0, #0 <== NOT EXECUTED 9088: 1a00001a bne 90f8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 908c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 9090: e1580003 cmp r8, r3 <== NOT EXECUTED 9094: 0afffff0 beq 905c <== NOT EXECUTED 9098: ea000013 b 90ec <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 909c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 90a0: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 90a4: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 90a8: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 90ac: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 90b0: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 90b4: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 90b8: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED 90bc: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 90c0: 0b00082a bleq b170 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 90c4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 90c8: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 90cc: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 90d0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 90d4: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 90d8: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 90dc: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 90e0: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED 90e4: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED 90e8: 0b000820 bleq b170 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 90ec: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 90f0: ebfff06f bl 52b4 <== NOT EXECUTED return 0; 90f4: ea000003 b 9108 <== NOT EXECUTED 90f8: e3e05003 mvn r5, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 90fc: e1a00006 mov r0, r6 <== NOT EXECUTED 9100: e1a01007 mov r1, r7 <== NOT EXECUTED 9104: ebfffee8 bl 8cac <== NOT EXECUTED return err; } 9108: e1a00005 mov r0, r5 910c: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 000029e8 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 29e8: e59f30ec ldr r3, [pc, #236] ; 2adc 29ec: e5933000 ldr r3, [r3] 29f0: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 29f4: e52de004 push {lr} ; (str lr, [sp, #-4]!) long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 29f8: 2a000005 bcs 2a14 iop = rtems_libio_iop(fd); 29fc: e59f30dc ldr r3, [pc, #220] ; 2ae0 2a00: e5933000 ldr r3, [r3] 2a04: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2a08: e5903014 ldr r3, [r0, #20] 2a0c: e3130c01 tst r3, #256 ; 0x100 2a10: 1a000004 bne 2a28 2a14: eb0033b4 bl f8ec <__errno> 2a18: e3a03009 mov r3, #9 2a1c: e5803000 str r3, [r0] 2a20: e3e00000 mvn r0, #0 2a24: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2a28: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2a2c: e351000b cmp r1, #11 2a30: 979ff101 ldrls pc, [pc, r1, lsl #2] 2a34: ea000023 b 2ac8 2a38: 00002a68 .word 0x00002a68 2a3c: 00002a70 .word 0x00002a70 2a40: 00002a78 .word 0x00002a78 2a44: 00002a80 .word 0x00002a80 2a48: 00002a88 .word 0x00002a88 2a4c: 00002a90 .word 0x00002a90 2a50: 00002a98 .word 0x00002a98 2a54: 00002aa0 .word 0x00002aa0 2a58: 00002aa8 .word 0x00002aa8 2a5c: 00002ab0 .word 0x00002ab0 2a60: 00002ab8 .word 0x00002ab8 2a64: 00002ac0 .word 0x00002ac0 case _PC_LINK_MAX: return_value = the_limits->link_max; 2a68: e5930038 ldr r0, [r3, #56] ; 0x38 break; 2a6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 2a70: e593003c ldr r0, [r3, #60] ; 0x3c break; 2a74: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 2a78: e5930040 ldr r0, [r3, #64] ; 0x40 break; 2a7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 2a80: e5930044 ldr r0, [r3, #68] ; 0x44 break; 2a84: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 2a88: e5930048 ldr r0, [r3, #72] ; 0x48 break; 2a8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2a90: e593004c ldr r0, [r3, #76] ; 0x4c break; 2a94: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2a98: e5930054 ldr r0, [r3, #84] ; 0x54 break; 2a9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2aa0: e5930058 ldr r0, [r3, #88] ; 0x58 break; 2aa4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2aa8: e5930064 ldr r0, [r3, #100] ; 0x64 break; 2aac: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2ab0: e5930050 ldr r0, [r3, #80] ; 0x50 break; 2ab4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2ab8: e593005c ldr r0, [r3, #92] ; 0x5c break; 2abc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2ac0: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2ac4: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2ac8: eb003387 bl f8ec <__errno> 2acc: e3a03016 mov r3, #22 2ad0: e5803000 str r3, [r0] 2ad4: e3e00000 mvn r0, #0 break; } return return_value; } 2ad8: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00001ed0 : void free( void *ptr ) { MSBUMP(free_calls, 1); 1ed0: e59f3088 ldr r3, [pc, #136] ; 1f60 1ed4: e593200c ldr r2, [r3, #12] 1ed8: e92d4030 push {r4, r5, lr} 1edc: e2822001 add r2, r2, #1 if ( !ptr ) 1ee0: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 1ee4: e583200c str r2, [r3, #12] if ( !ptr ) 1ee8: 08bd8030 popeq {r4, r5, pc} /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1eec: e59f3070 ldr r3, [pc, #112] ; 1f64 1ef0: e5933000 ldr r3, [r3] 1ef4: e3530003 cmp r3, #3 1ef8: 1a000005 bne 1f14 1efc: eb000065 bl 2098 1f00: e3500000 cmp r0, #0 1f04: 1a000002 bne 1f14 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1f08: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1f0c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1f10: ea000073 b 20e4 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1f14: e59f304c ldr r3, [pc, #76] ; 1f68 1f18: e5933000 ldr r3, [r3] 1f1c: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 1f20: 11a00004 movne r0, r4 1f24: 11a0e00f movne lr, pc 1f28: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1f2c: e59f5038 ldr r5, [pc, #56] ; 1f6c 1f30: e1a01004 mov r1, r4 1f34: e5950000 ldr r0, [r5] 1f38: eb0012f6 bl 6b18 <_Protected_heap_Free> 1f3c: e3500000 cmp r0, #0 1f40: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 1f44: e5952000 ldr r2, [r5] <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1f48: e59f0020 ldr r0, [pc, #32] ; 1f70 <== NOT EXECUTED 1f4c: e2822018 add r2, r2, #24 <== NOT EXECUTED 1f50: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 1f54: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1f58: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1f5c: ea00036f b 2d20 <== NOT EXECUTED =============================================================================== 000267b0 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 267b0: e59f3058 ldr r3, [pc, #88] ; 26810 <== NOT EXECUTED 267b4: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 267b8: e92d4010 push {r4, lr} <== NOT EXECUTED 267bc: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 267c0: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 267c4: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 267c8: e3530000 cmp r3, #0 <== NOT EXECUTED 267cc: 0a000004 beq 267e4 <== NOT EXECUTED 267d0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 267d4: e3530000 cmp r3, #0 <== NOT EXECUTED 267d8: 12800004 addne r0, r0, #4 <== NOT EXECUTED 267dc: 11a0e00f movne lr, pc <== NOT EXECUTED 267e0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 267e4: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 267e8: e3530000 cmp r3, #0 <== NOT EXECUTED 267ec: 0a000004 beq 26804 <== NOT EXECUTED 267f0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 267f4: e3530000 cmp r3, #0 <== NOT EXECUTED 267f8: 12840018 addne r0, r4, #24 <== NOT EXECUTED 267fc: 11a0e00f movne lr, pc <== NOT EXECUTED 26800: 112fff13 bxne r3 <== NOT EXECUTED free(env); 26804: e1a00004 mov r0, r4 <== NOT EXECUTED } } 26808: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 2680c: eaff83a8 b 76b4 <== NOT EXECUTED =============================================================================== 00019ffc : int fstat( int fd, struct stat *sbuf ) { 19ffc: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 1a000: e2515000 subs r5, r1, #0 1a004: 1a000002 bne 1a014 rtems_set_errno_and_return_minus_one( EFAULT ); 1a008: ebffd1b5 bl e6e4 <__errno> 1a00c: e3a0300e mov r3, #14 1a010: ea000014 b 1a068 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 1a014: e59f3080 ldr r3, [pc, #128] ; 1a09c 1a018: e5933000 ldr r3, [r3] 1a01c: e1500003 cmp r0, r3 1a020: 2a000008 bcs 1a048 1a024: e59f3074 ldr r3, [pc, #116] ; 1a0a0 1a028: e5934000 ldr r4, [r3] 1a02c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 1a030: e5943014 ldr r3, [r4, #20] 1a034: e3130c01 tst r3, #256 ; 0x100 1a038: 0a000002 beq 1a048 if ( !iop->handlers ) 1a03c: e594303c ldr r3, [r4, #60] ; 0x3c 1a040: e3530000 cmp r3, #0 1a044: 1a000002 bne 1a054 rtems_set_errno_and_return_minus_one( EBADF ); 1a048: ebffd1a5 bl e6e4 <__errno> 1a04c: e3a03009 mov r3, #9 1a050: ea000004 b 1a068 if ( !iop->handlers->fstat_h ) 1a054: e5933018 ldr r3, [r3, #24] 1a058: e3530000 cmp r3, #0 1a05c: 1a000004 bne 1a074 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1a060: ebffd19f bl e6e4 <__errno> <== NOT EXECUTED 1a064: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1a068: e5803000 str r3, [r0] 1a06c: e3e00000 mvn r0, #0 1a070: e8bd8030 pop {r4, r5, pc} /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 1a074: e3a01000 mov r1, #0 1a078: e3a02048 mov r2, #72 ; 0x48 1a07c: e1a00005 mov r0, r5 1a080: ebffd3e1 bl f00c return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 1a084: e2840018 add r0, r4, #24 1a088: e1a01005 mov r1, r5 1a08c: e594303c ldr r3, [r4, #60] ; 0x3c 1a090: e1a0e00f mov lr, pc 1a094: e593f018 ldr pc, [r3, #24] } 1a098: e8bd8030 pop {r4, r5, pc} =============================================================================== 00025500 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25500: e59f3068 ldr r3, [pc, #104] ; 25570 25504: e5933000 ldr r3, [r3] 25508: e1500003 cmp r0, r3 #include int fsync( int fd ) { 2550c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25510: 2a000008 bcs 25538 iop = rtems_libio_iop( fd ); 25514: e59f3058 ldr r3, [pc, #88] ; 25574 25518: e5933000 ldr r3, [r3] 2551c: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 25520: e5903014 ldr r3, [r0, #20] 25524: e3130c01 tst r3, #256 ; 0x100 25528: 0a000002 beq 25538 /* * Now process the fsync(). */ if ( !iop->handlers ) 2552c: e590303c ldr r3, [r0, #60] ; 0x3c 25530: e3530000 cmp r3, #0 25534: 1a000002 bne 25544 rtems_set_errno_and_return_minus_one( EBADF ); 25538: eb0063a2 bl 3e3c8 <__errno> <== NOT EXECUTED 2553c: e3a03009 mov r3, #9 <== NOT EXECUTED 25540: ea000004 b 25558 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 25544: e5933028 ldr r3, [r3, #40] ; 0x28 25548: e3530000 cmp r3, #0 2554c: 1a000004 bne 25564 rtems_set_errno_and_return_minus_one( ENOTSUP ); 25550: eb00639c bl 3e3c8 <__errno> 25554: e3a03086 mov r3, #134 ; 0x86 25558: e5803000 str r3, [r0] 2555c: e3e00000 mvn r0, #0 25560: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 25564: e1a0e00f mov lr, pc 25568: e12fff13 bx r3 } 2556c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000a29c : int ftruncate( int fd, off_t length ) { a29c: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a2a0: e59f30dc ldr r3, [pc, #220] ; a384 a2a4: e5933000 ldr r3, [r3] a2a8: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { a2ac: e24dd014 sub sp, sp, #20 a2b0: e1a05001 mov r5, r1 a2b4: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a2b8: 2a000005 bcs a2d4 iop = rtems_libio_iop( fd ); a2bc: e59f30c4 ldr r3, [pc, #196] ; a388 a2c0: e5934000 ldr r4, [r3] a2c4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); a2c8: e5943014 ldr r3, [r4, #20] a2cc: e3130c01 tst r3, #256 ; 0x100 a2d0: 1a000002 bne a2e0 a2d4: eb001102 bl e6e4 <__errno> <== NOT EXECUTED a2d8: e3a03009 mov r3, #9 <== NOT EXECUTED a2dc: ea00001e b a35c <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); a2e0: e3130004 tst r3, #4 a2e4: 0a000013 beq a338 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a2e8: e284e018 add lr, r4, #24 a2ec: e8be000f ldm lr!, {r0, r1, r2, r3} a2f0: e1a0c00d mov ip, sp a2f4: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) a2f8: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a2fc: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) a300: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a304: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) a308: 0a000011 beq a354 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) a30c: e1a0000d mov r0, sp a310: e1a0e00f mov lr, pc a314: e12fff13 bx r3 a318: e3500001 cmp r0, #1 a31c: 1a000002 bne a32c rtems_set_errno_and_return_minus_one( EISDIR ); a320: eb0010ef bl e6e4 <__errno> a324: e3a03015 mov r3, #21 a328: ea00000b b a35c rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); a32c: e5943014 ldr r3, [r4, #20] a330: e3130004 tst r3, #4 a334: 1a000002 bne a344 a338: eb0010e9 bl e6e4 <__errno> <== NOT EXECUTED a33c: e3a03016 mov r3, #22 <== NOT EXECUTED a340: ea000005 b a35c <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) a344: e594303c ldr r3, [r4, #60] ; 0x3c a348: e5933020 ldr r3, [r3, #32] a34c: e3530000 cmp r3, #0 a350: 1a000004 bne a368 rtems_set_errno_and_return_minus_one( ENOTSUP ); a354: eb0010e2 bl e6e4 <__errno> <== NOT EXECUTED a358: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a35c: e5803000 str r3, [r0] a360: e3e00000 mvn r0, #0 a364: ea000004 b a37c return (*iop->handlers->ftruncate_h)( iop, length ); a368: e1a00004 mov r0, r4 a36c: e1a01005 mov r1, r5 a370: e1a02006 mov r2, r6 a374: e1a0e00f mov lr, pc a378: e12fff13 bx r3 } a37c: e28dd014 add sp, sp, #20 a380: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00057fa8 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 57fa8: e59f30a8 ldr r3, [pc, #168] ; 58058 57fac: e5933000 ldr r3, [r3] 57fb0: e1500003 cmp r0, r3 57fb4: 359f30a0 ldrcc r3, [pc, #160] ; 5805c int getdents( int dd_fd, char *dd_buf, int dd_len ) { 57fb8: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 57fbc: 35934000 ldrcc r4, [r3] 57fc0: 23a04000 movcs r4, #0 57fc4: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 57fc8: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 57fcc: e24dd014 sub sp, sp, #20 57fd0: e1a06001 mov r6, r1 57fd4: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 57fd8: e8be000f ldm lr!, {r0, r1, r2, r3} 57fdc: e1a0c00d mov ip, sp 57fe0: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 57fe4: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 57fe8: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 57fec: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 57ff0: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 57ff4: 0a00000d beq 58030 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 57ff8: e1a0000d mov r0, sp 57ffc: e1a0e00f mov lr, pc 58000: e12fff13 bx r3 58004: e3500001 cmp r0, #1 58008: 0a000004 beq 58020 rtems_set_errno_and_return_minus_one( ENOTDIR ); 5800c: ebff98ed bl 3e3c8 <__errno> 58010: e3a03014 mov r3, #20 58014: e5803000 str r3, [r0] 58018: e3e00000 mvn r0, #0 5801c: ea00000b b 58050 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 58020: e594303c ldr r3, [r4, #60] ; 0x3c 58024: e5933008 ldr r3, [r3, #8] 58028: e3530000 cmp r3, #0 5802c: 1a000002 bne 5803c rtems_set_errno_and_return_minus_one( ENOTSUP ); 58030: ebff98e4 bl 3e3c8 <__errno> <== NOT EXECUTED 58034: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 58038: eafffff5 b 58014 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 5803c: e1a00004 mov r0, r4 58040: e1a01006 mov r1, r6 58044: e1a02005 mov r2, r5 58048: e1a0e00f mov lr, pc 5804c: e12fff13 bx r3 } 58050: e28dd014 add sp, sp, #20 58054: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00025690 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 25690: e59f3008 ldr r3, [pc, #8] ; 256a0 <== NOT EXECUTED 25694: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 25698: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 2569c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00025ca8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25ca8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 25cac: e59da01c ldr sl, [sp, #28] 25cb0: e1a06000 mov r6, r0 25cb4: e1a07001 mov r7, r1 25cb8: e1a04002 mov r4, r2 25cbc: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 25cc0: ebffffb7 bl 25ba4 if ((fp = fopen("/etc/group", "r")) == NULL) { 25cc4: e59f00a4 ldr r0, [pc, #164] ; 25d70 25cc8: e59f10a4 ldr r1, [pc, #164] ; 25d74 25ccc: eb00642d bl 3ed88 25cd0: e2505000 subs r5, r0, #0 25cd4: 1a000003 bne 25ce8 errno = EINVAL; 25cd8: eb0061ba bl 3e3c8 <__errno> <== NOT EXECUTED 25cdc: e3a03016 mov r3, #22 <== NOT EXECUTED 25ce0: e5803000 str r3, [r0] <== NOT EXECUTED 25ce4: ea00000c b 25d1c <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 25ce8: e1a01004 mov r1, r4 25cec: e1a02008 mov r2, r8 25cf0: e1a0300a mov r3, sl 25cf4: e1a00005 mov r0, r5 25cf8: ebfffef2 bl 258c8 25cfc: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 25d00: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 25d04: 1a000006 bne 25d24 errno = EINVAL; 25d08: eb0061ae bl 3e3c8 <__errno> <== NOT EXECUTED 25d0c: e3a03016 mov r3, #22 <== NOT EXECUTED 25d10: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 25d14: e1a00005 mov r0, r5 <== NOT EXECUTED 25d18: eb0061f7 bl 3e4fc <== NOT EXECUTED 25d1c: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 25d20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 25d24: e3560000 cmp r6, #0 25d28: 0a000004 beq 25d40 match = (strcmp(grp->gr_name, name) == 0); 25d2c: e5940000 ldr r0, [r4] 25d30: eb007a4a bl 44660 25d34: e2700001 rsbs r0, r0, #1 25d38: 33a00000 movcc r0, #0 25d3c: ea000003 b 25d50 } else { match = (grp->gr_gid == gid); 25d40: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 25d44: e1500007 cmp r0, r7 <== NOT EXECUTED 25d48: 13a00000 movne r0, #0 <== NOT EXECUTED 25d4c: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 25d50: e3500000 cmp r0, #0 25d54: 0affffe3 beq 25ce8 fclose(fp); 25d58: e1a00005 mov r0, r5 25d5c: eb0061e6 bl 3e4fc *result = grp; 25d60: e59d3020 ldr r3, [sp, #32] 25d64: e3a00000 mov r0, #0 25d68: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 25d6c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00025a00 : return NULL; return p; } struct group *getgrent(void) { 25a00: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 25a04: e59f402c ldr r4, [pc, #44] ; 25a38 <== NOT EXECUTED 25a08: e5940000 ldr r0, [r4] <== NOT EXECUTED 25a0c: e3500000 cmp r0, #0 <== NOT EXECUTED 25a10: 0a000006 beq 25a30 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 25a14: e2841008 add r1, r4, #8 <== NOT EXECUTED 25a18: e2842018 add r2, r4, #24 <== NOT EXECUTED 25a1c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25a20: ebffffa8 bl 258c8 <== NOT EXECUTED 25a24: e3500000 cmp r0, #0 <== NOT EXECUTED 25a28: 12840008 addne r0, r4, #8 <== NOT EXECUTED 25a2c: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25a30: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 25a34: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00025dac : struct group *getgrgid( gid_t gid ) { 25dac: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 25db0: e59f1028 ldr r1, [pc, #40] ; 25de0 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 25db4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 25db8: e28dc004 add ip, sp, #4 <== NOT EXECUTED 25dbc: e2812010 add r2, r1, #16 <== NOT EXECUTED 25dc0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25dc4: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 25dc8: e58dc000 str ip, [sp] <== NOT EXECUTED 25dcc: ebffffe9 bl 25d78 <== NOT EXECUTED 25dd0: e3500000 cmp r0, #0 <== NOT EXECUTED 25dd4: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 25dd8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 25ddc: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED =============================================================================== 00025d78 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25d78: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 25d7c: e1a0c002 mov ip, r2 <== NOT EXECUTED 25d80: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 25d84: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25d88: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 25d8c: e1a0300c mov r3, ip <== NOT EXECUTED 25d90: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 25d94: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 25d98: e1a0200e mov r2, lr <== NOT EXECUTED 25d9c: e3a00000 mov r0, #0 <== NOT EXECUTED 25da0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 25da4: ebffffbf bl 25ca8 <== NOT EXECUTED } 25da8: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED =============================================================================== 00025e78 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 25e78: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 25e7c: e59da01c ldr sl, [sp, #28] 25e80: e1a06000 mov r6, r0 25e84: e1a07001 mov r7, r1 25e88: e1a04002 mov r4, r2 25e8c: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 25e90: ebffff43 bl 25ba4 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 25e94: e59f00a4 ldr r0, [pc, #164] ; 25f40 25e98: e59f10a4 ldr r1, [pc, #164] ; 25f44 25e9c: eb0063b9 bl 3ed88 25ea0: e2505000 subs r5, r0, #0 25ea4: 1a000003 bne 25eb8 errno = EINVAL; 25ea8: eb006146 bl 3e3c8 <__errno> <== NOT EXECUTED 25eac: e3a03016 mov r3, #22 <== NOT EXECUTED 25eb0: e5803000 str r3, [r0] <== NOT EXECUTED 25eb4: ea00000c b 25eec <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 25eb8: e1a01004 mov r1, r4 25ebc: e1a02008 mov r2, r8 25ec0: e1a0300a mov r3, sl 25ec4: e1a00005 mov r0, r5 25ec8: ebfffedb bl 25a3c 25ecc: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 25ed0: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 25ed4: 1a000006 bne 25ef4 errno = EINVAL; 25ed8: eb00613a bl 3e3c8 <__errno> <== NOT EXECUTED 25edc: e3a03016 mov r3, #22 <== NOT EXECUTED 25ee0: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 25ee4: e1a00005 mov r0, r5 <== NOT EXECUTED 25ee8: eb006183 bl 3e4fc <== NOT EXECUTED 25eec: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 25ef0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 25ef4: e3560000 cmp r6, #0 25ef8: 0a000004 beq 25f10 match = (strcmp(pwd->pw_name, name) == 0); 25efc: e5940000 ldr r0, [r4] 25f00: eb0079d6 bl 44660 25f04: e2700001 rsbs r0, r0, #1 25f08: 33a00000 movcc r0, #0 25f0c: ea000003 b 25f20 } else { match = (pwd->pw_uid == uid); 25f10: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 25f14: e1500007 cmp r0, r7 <== NOT EXECUTED 25f18: 13a00000 movne r0, #0 <== NOT EXECUTED 25f1c: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 25f20: e3500000 cmp r0, #0 25f24: 0affffe3 beq 25eb8 fclose(fp); 25f28: e1a00005 mov r0, r5 25f2c: eb006172 bl 3e4fc *result = pwd; 25f30: e59d3020 ldr r3, [sp, #32] 25f34: e3a00000 mov r0, #0 25f38: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 25f3c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00025b68 : return NULL; return p; } struct passwd *getpwent(void) { 25b68: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 25b6c: e59f402c ldr r4, [pc, #44] ; 25ba0 <== NOT EXECUTED 25b70: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 25b74: e3500000 cmp r0, #0 <== NOT EXECUTED 25b78: 0a000006 beq 25b98 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 25b7c: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 25b80: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 25b84: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25b88: ebffffab bl 25a3c <== NOT EXECUTED 25b8c: e3500000 cmp r0, #0 <== NOT EXECUTED 25b90: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 25b94: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25b98: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 25b9c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00025f7c : struct passwd *getpwuid( uid_t uid ) { 25f7c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 25f80: e59f1028 ldr r1, [pc, #40] ; 25fb0 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 25f84: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 25f88: e28dc004 add ip, sp, #4 <== NOT EXECUTED 25f8c: e281201c add r2, r1, #28 <== NOT EXECUTED 25f90: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25f94: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 25f98: e58dc000 str ip, [sp] <== NOT EXECUTED 25f9c: ebffffe9 bl 25f48 <== NOT EXECUTED 25fa0: e3500000 cmp r0, #0 <== NOT EXECUTED 25fa4: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 25fa8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 25fac: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED =============================================================================== 00025f48 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 25f48: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 25f4c: e1a0c002 mov ip, r2 <== NOT EXECUTED 25f50: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 25f54: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 25f58: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 25f5c: e1a0300c mov r3, ip <== NOT EXECUTED 25f60: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 25f64: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 25f68: e1a0200e mov r2, lr <== NOT EXECUTED 25f6c: e3a00000 mov r0, #0 <== NOT EXECUTED 25f70: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 25f74: ebffffbf bl 25e78 <== NOT EXECUTED } 25f78: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED =============================================================================== 00001f74 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 1f74: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 1f78: e2504000 subs r4, r0, #0 1f7c: 1a000004 bne 1f94 errno = EFAULT; 1f80: eb0031d7 bl e6e4 <__errno> <== NOT EXECUTED 1f84: e3a0300e mov r3, #14 <== NOT EXECUTED 1f88: e5803000 str r3, [r0] <== NOT EXECUTED 1f8c: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 1f90: ea00000c b 1fc8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1f94: e10f5000 mrs r5, CPSR 1f98: e3853080 orr r3, r5, #128 ; 0x80 1f9c: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 1fa0: e1a0000d mov r0, sp 1fa4: eb000fc1 bl 5eb0 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1fa8: e129f005 msr CPSR_fc, r5 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 1fac: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 1fb0: e59d0004 ldr r0, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 1fb4: e3a01ffa mov r1, #1000 ; 0x3e8 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 1fb8: e5843000 str r3, [r4] time->tv_usec = useconds; 1fbc: eb005796 bl 17e1c <__aeabi_idiv> 1fc0: e5840004 str r0, [r4, #4] 1fc4: e3a00000 mov r0, #0 * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 1fc8: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== 000077c0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 77c0: e59f3008 ldr r3, [pc, #8] ; 77d0 <== NOT EXECUTED 77c4: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 77c8: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 77cc: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 000052d0 : int ioctl( int fd, ioctl_command_t command, ... ) { 52d0: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 52d4: e59f3080 ldr r3, [pc, #128] ; 535c 52d8: e5933000 ldr r3, [r3] 52dc: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 52e0: e92d4001 push {r0, lr} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 52e4: 2a00000b bcs 5318 iop = rtems_libio_iop( fd ); 52e8: e59f3070 ldr r3, [pc, #112] ; 5360 52ec: e5933000 ldr r3, [r3] 52f0: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 52f4: e5903014 ldr r3, [r0, #20] 52f8: e3130c01 tst r3, #256 ; 0x100 52fc: 0a000005 beq 5318 /* * Now process the ioctl(). */ if ( !iop->handlers ) 5300: e590303c ldr r3, [r0, #60] ; 0x3c iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 5304: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 5308: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 530c: e58d2000 str r2, [sp] 5310: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 5314: 1a000002 bne 5324 rtems_set_errno_and_return_minus_one( EBADF ); 5318: eb0034be bl 12618 <__errno> 531c: e3a03009 mov r3, #9 5320: ea000004 b 5338 if ( !iop->handlers->ioctl_h ) 5324: e5933010 ldr r3, [r3, #16] 5328: e3530000 cmp r3, #0 532c: 1a000004 bne 5344 rtems_set_errno_and_return_minus_one( ENOTSUP ); 5330: eb0034b8 bl 12618 <__errno> <== NOT EXECUTED 5334: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5338: e5803000 str r3, [r0] 533c: e3e00000 mvn r0, #0 5340: ea000002 b 5350 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 5344: e59d1008 ldr r1, [sp, #8] 5348: e1a0e00f mov lr, pc 534c: e12fff13 bx r3 return rc; } 5350: e8bd4008 pop {r3, lr} 5354: e28dd00c add sp, sp, #12 5358: e12fff1e bx lr =============================================================================== 000037ec : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 37ec: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 37f0: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 37f4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 37f8: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 37fc: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 3800: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3804: e1a04001 mov r4, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 3808: 0a000007 beq 382c <== NOT EXECUTED c = tolower (c); 380c: e59f2164 ldr r2, [pc, #356] ; 3978 <== NOT EXECUTED 3810: e5922000 ldr r2, [r2] <== NOT EXECUTED 3814: e0822005 add r2, r2, r5 <== NOT EXECUTED 3818: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 381c: e2022003 and r2, r2, #3 <== NOT EXECUTED 3820: e3520001 cmp r2, #1 <== NOT EXECUTED 3824: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 3828: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 382c: e355000d cmp r5, #13 <== NOT EXECUTED 3830: 1a000005 bne 384c <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 3834: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 3838: 1a00004c bne 3970 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 383c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3840: 03a0500d moveq r5, #13 <== NOT EXECUTED 3844: 13a0500a movne r5, #10 <== NOT EXECUTED 3848: ea000007 b 386c <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 384c: e355000a cmp r5, #10 <== NOT EXECUTED 3850: 1a000003 bne 3864 <== NOT EXECUTED 3854: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 3858: 03a0500a moveq r5, #10 <== NOT EXECUTED 385c: 13a0500d movne r5, #13 <== NOT EXECUTED 3860: ea000001 b 386c <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 3864: e3550000 cmp r5, #0 <== NOT EXECUTED 3868: 0a00002e beq 3928 <== NOT EXECUTED 386c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3870: e3130002 tst r3, #2 <== NOT EXECUTED 3874: 0a00002b beq 3928 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 3878: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 387c: e1520005 cmp r2, r5 <== NOT EXECUTED erase (tty, 0); 3880: 01a00004 moveq r0, r4 <== NOT EXECUTED 3884: 03a01000 moveq r1, #0 <== NOT EXECUTED } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { 3888: 0a000004 beq 38a0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 388c: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 3890: e1520005 cmp r2, r5 <== NOT EXECUTED 3894: 1a000003 bne 38a8 <== NOT EXECUTED erase (tty, 1); 3898: e1a00004 mov r0, r4 <== NOT EXECUTED 389c: e3a01001 mov r1, #1 <== NOT EXECUTED 38a0: ebffff5e bl 3620 <== NOT EXECUTED 38a4: ea00002f b 3968 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 38a8: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 38ac: e1520005 cmp r2, r5 <== NOT EXECUTED 38b0: 0a00001a beq 3920 <== NOT EXECUTED return 1; } else if (c == '\n') { 38b4: e355000a cmp r5, #10 <== NOT EXECUTED 38b8: 1a000009 bne 38e4 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 38bc: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 38c0: 11a00005 movne r0, r5 <== NOT EXECUTED 38c4: 11a01004 movne r1, r4 <== NOT EXECUTED 38c8: 1bffff34 blne 35a0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 38cc: e284101c add r1, r4, #28 <== NOT EXECUTED 38d0: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 38d4: e3a0000a mov r0, #10 <== NOT EXECUTED 38d8: e2832001 add r2, r3, #1 <== NOT EXECUTED 38dc: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 38e0: ea00000d b 391c <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 38e4: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 38e8: e1520005 cmp r2, r5 <== NOT EXECUTED 38ec: 0a000002 beq 38fc <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 38f0: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 38f4: e1520005 cmp r2, r5 <== NOT EXECUTED 38f8: 1a00000a bne 3928 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 38fc: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 3900: 11a00005 movne r0, r5 <== NOT EXECUTED 3904: 11a01004 movne r1, r4 <== NOT EXECUTED 3908: 1bffff24 blne 35a0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 390c: e284101c add r1, r4, #28 <== NOT EXECUTED 3910: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 3914: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 3918: e2832001 add r2, r3, #1 <== NOT EXECUTED 391c: e5842020 str r2, [r4, #32] <== NOT EXECUTED 3920: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 3924: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 3928: e59f304c ldr r3, [pc, #76] ; 397c <== NOT EXECUTED 392c: e5933000 ldr r3, [r3] <== NOT EXECUTED 3930: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3934: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3938: e1520003 cmp r2, r3 <== NOT EXECUTED 393c: aa00000b bge 3970 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 3940: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3944: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 3948: 11a00005 movne r0, r5 <== NOT EXECUTED 394c: 11a01004 movne r1, r4 <== NOT EXECUTED 3950: 1bffff12 blne 35a0 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3954: e284101c add r1, r4, #28 <== NOT EXECUTED 3958: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 395c: e2832001 add r2, r3, #1 <== NOT EXECUTED 3960: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 3964: e5842020 str r2, [r4, #32] <== NOT EXECUTED 3968: e3a00000 mov r0, #0 <== NOT EXECUTED 396c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3970: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 3974: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 0000d9b8 : int killinfo( pid_t pid, int sig, const union sigval *value ) { d9b8: e92d47f7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, lr} d9bc: e1a05000 mov r5, r0 d9c0: e1a04001 mov r4, r1 d9c4: e1a06002 mov r6, r2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) d9c8: ebfff279 bl a3b4 d9cc: e1550000 cmp r5, r0 d9d0: 0a000002 beq d9e0 rtems_set_errno_and_return_minus_one( ESRCH ); d9d4: eb000342 bl e6e4 <__errno> <== NOT EXECUTED d9d8: e3a03003 mov r3, #3 <== NOT EXECUTED d9dc: ea000003 b d9f0 <== NOT EXECUTED /* * Validate the signal passed. */ if ( !sig ) d9e0: e3540000 cmp r4, #0 d9e4: 1a000004 bne d9fc rtems_set_errno_and_return_minus_one( EINVAL ); d9e8: eb00033d bl e6e4 <__errno> <== NOT EXECUTED d9ec: e3a03016 mov r3, #22 <== NOT EXECUTED d9f0: e5803000 str r3, [r0] d9f4: e3e00000 mvn r0, #0 d9f8: ea000081 b dc04 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); d9fc: e2443001 sub r3, r4, #1 if ( !is_valid_signo(sig) ) da00: e353001f cmp r3, #31 da04: 8afffff7 bhi d9e8 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) da08: e59f11f8 ldr r1, [pc, #504] ; dc08 da0c: e3a0000c mov r0, #12 da10: e0221490 mla r2, r0, r4, r1 da14: e5922008 ldr r2, [r2, #8] da18: e3520001 cmp r2, #1 da1c: 0a000077 beq dc00 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) da20: e3540008 cmp r4, #8 da24: 13540004 cmpne r4, #4 da28: 0a000001 beq da34 da2c: e354000b cmp r4, #11 da30: 1a000003 bne da44 return pthread_kill( pthread_self(), sig ); da34: eb0001bf bl e138 da38: e1a01004 mov r1, r4 da3c: eb000187 bl e060 da40: ea00006f b dc04 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); da44: e3a05001 mov r5, #1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; da48: e88d0030 stm sp, {r4, r5} if ( !value ) { da4c: e3560000 cmp r6, #0 da50: e1a05315 lsl r5, r5, r3 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; da54: 15963000 ldrne r3, [r6] da58: 158d3008 strne r3, [sp, #8] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; da5c: e59f31a8 ldr r3, [pc, #424] ; dc0c da60: e5932000 ldr r2, [r3] da64: e2822001 add r2, r2, #1 */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; da68: 058d6008 streq r6, [sp, #8] da6c: e5832000 str r2, [r3] /* * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; da70: e59f3198 ldr r3, [pc, #408] ; dc10 da74: e5930000 ldr r0, [r3] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; da78: e5903108 ldr r3, [r0, #264] ; 0x108 da7c: e59330cc ldr r3, [r3, #204] ; 0xcc da80: e1d53003 bics r3, r5, r3 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; da84: 059f2188 ldreq r2, [pc, #392] ; dc14 da88: 04923004 ldreq r3, [r2], #4 * Is the currently executing thread interested? If so then it will * get it an execute it as soon as the dispatcher executes. */ the_thread = _Thread_Executing; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; da8c: 0a000009 beq dab8 da90: ea00003a b db80 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) da94: e5931030 ldr r1, [r3, #48] ; 0x30 da98: e1150001 tst r5, r1 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; da9c: e1a00003 mov r0, r3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; daa0: e5931108 ldr r1, [r3, #264] ; 0x108 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) daa4: 1a000035 bne db80 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) daa8: e59110cc ldr r1, [r1, #204] ; 0xcc daac: e1d51001 bics r1, r5, r1 dab0: 1a000032 bne db80 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { dab4: e5933000 ldr r3, [r3] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; dab8: e1530002 cmp r3, r2 dabc: 1afffff4 bne da94 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; dac0: e59f3150 ldr r3, [pc, #336] ; dc18 dac4: e5d31000 ldrb r1, [r3] dac8: e59f314c ldr r3, [pc, #332] ; dc1c dacc: e2811001 add r1, r1, #1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( dad0: e283800c add r8, r3, #12 dad4: e3a00000 mov r0, #0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) dad8: e5932008 ldr r2, [r3, #8] dadc: e3520000 cmp r2, #0 dae0: 0a000021 beq db6c continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; dae4: e5922004 ldr r2, [r2, #4] if ( !the_info ) continue; #endif maximum = the_info->maximum; object_table = the_info->local_table; dae8: e3a0c001 mov ip, #1 daec: e592901c ldr r9, [r2, #28] */ if ( !the_info ) continue; #endif maximum = the_info->maximum; daf0: e1d2a1b0 ldrh sl, [r2, #16] object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { daf4: ea00001a b db64 the_thread = (Thread_Control *) object_table[ index ]; daf8: e799210c ldr r2, [r9, ip, lsl #2] if ( !the_thread ) dafc: e3520000 cmp r2, #0 db00: 0a000012 beq db50 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) db04: e592e014 ldr lr, [r2, #20] db08: e15e0001 cmp lr, r1 db0c: 8a00000f bhi db50 DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; db10: e5926108 ldr r6, [r2, #264] ; 0x108 db14: e59660cc ldr r6, [r6, #204] ; 0xcc db18: e1d56006 bics r6, r5, r6 db1c: 0a00000b beq db50 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { db20: e15e0001 cmp lr, r1 db24: 3a00000b bcc db58 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { db28: e5907010 ldr r7, [r0, #16] db2c: e3570000 cmp r7, #0 db30: 0a000006 beq db50 /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { db34: e5926010 ldr r6, [r2, #16] db38: e3560000 cmp r6, #0 db3c: 0a000005 beq db58 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { db40: e3170201 tst r7, #268435456 ; 0x10000000 db44: 1a000001 bne db50 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { db48: e3160201 tst r6, #268435456 ; 0x10000000 db4c: 1a000001 bne db58 db50: e1a0e001 mov lr, r1 db54: ea000000 b db5c db58: e1a00002 mov r0, r2 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { db5c: e28cc001 add ip, ip, #1 db60: e1a0100e mov r1, lr db64: e15c000a cmp ip, sl db68: 9affffe2 bls daf8 db6c: e2833004 add r3, r3, #4 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { db70: e1530008 cmp r3, r8 db74: 1affffd7 bne dad8 } } } } if ( interested ) { db78: e3500000 cmp r0, #0 db7c: 0a000006 beq db9c * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; db80: e3a03001 mov r3, #1 db84: e5c03074 strb r3, [r0, #116] ; 0x74 /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { db88: e1a01004 mov r1, r4 db8c: e1a0200d mov r2, sp db90: eb0000a7 bl de34 <_POSIX_signals_Unblock_thread> db94: e3500000 cmp r0, #0 db98: 1a000017 bne dbfc /* * We may have woken up a thread but we definitely need to post the * signal to the process wide information set. */ _POSIX_signals_Set_process_signals( mask ); db9c: e1a00005 mov r0, r5 dba0: eb000092 bl ddf0 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { dba4: e3a0300c mov r3, #12 dba8: e0050493 mul r5, r3, r4 dbac: e59f3054 ldr r3, [pc, #84] ; dc08 dbb0: e7933005 ldr r3, [r3, r5] dbb4: e3530002 cmp r3, #2 dbb8: 1a00000f bne dbfc psiginfo = (POSIX_signals_Siginfo_node *) dbbc: e59f005c ldr r0, [pc, #92] ; dc20 dbc0: ebffdfc7 bl 5ae4 <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { dbc4: e250c000 subs ip, r0, #0 dbc8: 1a000003 bne dbdc _Thread_Enable_dispatch(); dbcc: ebffe556 bl 712c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); dbd0: eb0002c3 bl e6e4 <__errno> dbd4: e3a0300b mov r3, #11 dbd8: eaffff84 b d9f0 } psiginfo->Info = *siginfo; dbdc: e1a0300d mov r3, sp dbe0: e8930007 ldm r3, {r0, r1, r2} dbe4: e28c3008 add r3, ip, #8 dbe8: e8830007 stm r3, {r0, r1, r2} _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); dbec: e59f0030 ldr r0, [pc, #48] ; dc24 dbf0: e1a0100c mov r1, ip dbf4: e0800005 add r0, r0, r5 dbf8: ebffdfa5 bl 5a94 <_Chain_Append> } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); dbfc: ebffe54a bl 712c <_Thread_Enable_dispatch> dc00: e3a00000 mov r0, #0 return 0; } dc04: e8bd87fe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 0002600c : int link( const char *existing, const char *new ) { 2600c: e92d4070 push {r4, r5, r6, lr} 26010: e24dd034 sub sp, sp, #52 ; 0x34 26014: e1a05001 mov r5, r1 26018: e1a06000 mov r6, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 2601c: eb007bf7 bl 45000 26020: e28d4018 add r4, sp, #24 26024: e1a01000 mov r1, r0 26028: e3a0c001 mov ip, #1 2602c: e1a00006 mov r0, r6 26030: e3a02000 mov r2, #0 26034: e1a03004 mov r3, r4 26038: e58dc000 str ip, [sp] 2603c: ebff857e bl 763c 0, &existing_loc, true ); if ( result != 0 ) 26040: e3500000 cmp r0, #0 26044: 1a000014 bne 2609c /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 26048: e28d6004 add r6, sp, #4 2604c: e1a00005 mov r0, r5 26050: e28d1030 add r1, sp, #48 ; 0x30 26054: e1a02006 mov r2, r6 26058: ebff8bb0 bl 8f20 if ( !parent_loc.ops->evalformake_h ) { 2605c: e59d3010 ldr r3, [sp, #16] 26060: e5933004 ldr r3, [r3, #4] 26064: e3530000 cmp r3, #0 26068: 1a00000d bne 260a4 rtems_filesystem_freenode( &existing_loc ); 2606c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 26070: e3530000 cmp r3, #0 <== NOT EXECUTED 26074: 0a000005 beq 26090 <== NOT EXECUTED 26078: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2607c: e3530000 cmp r3, #0 <== NOT EXECUTED 26080: 0a000002 beq 26090 <== NOT EXECUTED 26084: e1a00004 mov r0, r4 <== NOT EXECUTED 26088: e1a0e00f mov lr, pc <== NOT EXECUTED 2608c: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 26090: eb0060cc bl 3e3c8 <__errno> <== NOT EXECUTED 26094: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 26098: e5803000 str r3, [r0] 2609c: e3e05000 mvn r5, #0 260a0: ea000053 b 261f4 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 260a4: e59d0030 ldr r0, [sp, #48] ; 0x30 260a8: e1a01006 mov r1, r6 260ac: e0850000 add r0, r5, r0 260b0: e28d202c add r2, sp, #44 ; 0x2c 260b4: e1a0e00f mov lr, pc 260b8: e12fff13 bx r3 if ( result != 0 ) { 260bc: e2505000 subs r5, r0, #0 260c0: 0a00000a beq 260f0 rtems_filesystem_freenode( &existing_loc ); 260c4: e59d3024 ldr r3, [sp, #36] ; 0x24 260c8: e3530000 cmp r3, #0 260cc: 0a000004 beq 260e4 260d0: e593301c ldr r3, [r3, #28] 260d4: e3530000 cmp r3, #0 260d8: 11a00004 movne r0, r4 260dc: 11a0e00f movne lr, pc 260e0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 260e4: eb0060b7 bl 3e3c8 <__errno> 260e8: e5805000 str r5, [r0] 260ec: eaffffea b 2609c /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 260f0: e59d3028 ldr r3, [sp, #40] ; 0x28 260f4: e59d2014 ldr r2, [sp, #20] 260f8: e1520003 cmp r2, r3 260fc: 0a000012 beq 2614c rtems_filesystem_freenode( &existing_loc ); 26100: e59d3024 ldr r3, [sp, #36] ; 0x24 26104: e3530000 cmp r3, #0 26108: 0a000004 beq 26120 2610c: e593301c ldr r3, [r3, #28] 26110: e3530000 cmp r3, #0 26114: 11a00004 movne r0, r4 26118: 11a0e00f movne lr, pc 2611c: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 26120: e59d3010 ldr r3, [sp, #16] 26124: e3530000 cmp r3, #0 26128: 0a000004 beq 26140 2612c: e593301c ldr r3, [r3, #28] 26130: e3530000 cmp r3, #0 26134: 128d0004 addne r0, sp, #4 26138: 11a0e00f movne lr, pc 2613c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 26140: eb0060a0 bl 3e3c8 <__errno> 26144: e3a03012 mov r3, #18 26148: eaffffd2 b 26098 } if ( !parent_loc.ops->link_h ) { 2614c: e59d3010 ldr r3, [sp, #16] 26150: e5933008 ldr r3, [r3, #8] 26154: e3530000 cmp r3, #0 26158: 1a00000f bne 2619c rtems_filesystem_freenode( &existing_loc ); 2615c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 26160: e3530000 cmp r3, #0 <== NOT EXECUTED 26164: 0a000004 beq 2617c <== NOT EXECUTED 26168: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2616c: e3530000 cmp r3, #0 <== NOT EXECUTED 26170: 11a00004 movne r0, r4 <== NOT EXECUTED 26174: 11a0e00f movne lr, pc <== NOT EXECUTED 26178: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 2617c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 26180: e3530000 cmp r3, #0 <== NOT EXECUTED 26184: 0affffc1 beq 26090 <== NOT EXECUTED 26188: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2618c: e3530000 cmp r3, #0 <== NOT EXECUTED 26190: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 26194: 1affffbb bne 26088 <== NOT EXECUTED 26198: eaffffbc b 26090 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 2619c: e1a01006 mov r1, r6 261a0: e1a00004 mov r0, r4 261a4: e59d202c ldr r2, [sp, #44] ; 0x2c 261a8: e1a0e00f mov lr, pc 261ac: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 261b0: e59d3024 ldr r3, [sp, #36] ; 0x24 261b4: e3530000 cmp r3, #0 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 261b8: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 261bc: 0a000004 beq 261d4 261c0: e593301c ldr r3, [r3, #28] 261c4: e3530000 cmp r3, #0 261c8: 11a00004 movne r0, r4 261cc: 11a0e00f movne lr, pc 261d0: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 261d4: e59d3010 ldr r3, [sp, #16] 261d8: e3530000 cmp r3, #0 261dc: 0a000004 beq 261f4 261e0: e593301c ldr r3, [r3, #28] 261e4: e3530000 cmp r3, #0 261e8: 128d0004 addne r0, sp, #4 261ec: 11a0e00f movne lr, pc 261f0: 112fff13 bxne r3 return result; } 261f4: e1a00005 mov r0, r5 261f8: e28dd034 add sp, sp, #52 ; 0x34 261fc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0001a0b8 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 1a0b8: e59fc0ec ldr ip, [pc, #236] ; 1a1ac 1a0bc: e59cc000 ldr ip, [ip] 1a0c0: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 1a0c4: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 1a0c8: 2a000005 bcs 1a0e4 iop = rtems_libio_iop( fd ); 1a0cc: e59fc0dc ldr ip, [pc, #220] ; 1a1b0 1a0d0: e59c4000 ldr r4, [ip] 1a0d4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 1a0d8: e5940014 ldr r0, [r4, #20] 1a0dc: e3100c01 tst r0, #256 ; 0x100 1a0e0: 1a000002 bne 1a0f0 1a0e4: ebffd17e bl e6e4 <__errno> <== NOT EXECUTED 1a0e8: e3a03009 mov r3, #9 <== NOT EXECUTED 1a0ec: ea00001c b 1a164 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 1a0f0: e594003c ldr r0, [r4, #60] ; 0x3c 1a0f4: e5900014 ldr r0, [r0, #20] 1a0f8: e3500000 cmp r0, #0 1a0fc: 1a000002 bne 1a10c rtems_set_errno_and_return_minus_one( ENOTSUP ); 1a100: ebffd177 bl e6e4 <__errno> <== NOT EXECUTED 1a104: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1a108: ea000015 b 1a164 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 1a10c: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 1a110: e284600c add r6, r4, #12 1a114: e8960060 ldm r6, {r5, r6} switch ( whence ) { 1a118: 0a000006 beq 1a138 1a11c: e3530002 cmp r3, #2 1a120: 0a000007 beq 1a144 1a124: e3530000 cmp r3, #0 1a128: 1a00000b bne 1a15c case SEEK_SET: iop->offset = offset; 1a12c: e584100c str r1, [r4, #12] 1a130: e5842010 str r2, [r4, #16] break; 1a134: ea00000e b 1a174 case SEEK_CUR: iop->offset += offset; 1a138: e091b005 adds fp, r1, r5 1a13c: e0a2c006 adc ip, r2, r6 1a140: ea000002 b 1a150 break; case SEEK_END: iop->offset = iop->size + offset; 1a144: e9941800 ldmib r4, {fp, ip} 1a148: e09bb001 adds fp, fp, r1 1a14c: e0acc002 adc ip, ip, r2 1a150: e584b00c str fp, [r4, #12] 1a154: e584c010 str ip, [r4, #16] break; 1a158: ea000005 b 1a174 default: rtems_set_errno_and_return_minus_one( EINVAL ); 1a15c: ebffd160 bl e6e4 <__errno> 1a160: e3a03016 mov r3, #22 1a164: e5803000 str r3, [r0] 1a168: e3e02000 mvn r2, #0 1a16c: e3e03000 mvn r3, #0 1a170: ea00000a b 1a1a0 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1a174: e594c03c ldr ip, [r4, #60] ; 0x3c 1a178: e1a00004 mov r0, r4 1a17c: e1a0e00f mov lr, pc 1a180: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 1a184: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1a188: e1a02000 mov r2, r0 1a18c: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 1a190: 1a000002 bne 1a1a0 1a194: e3710001 cmn r1, #1 iop->offset = old_offset; 1a198: 0584500c streq r5, [r4, #12] 1a19c: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 1a1a0: e1a01003 mov r1, r3 1a1a4: e1a00002 mov r0, r2 1a1a8: e8bd8870 pop {r4, r5, r6, fp, pc} =============================================================================== 0002631c : int _STAT_NAME( const char *path, struct stat *buf ) { 2631c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 26320: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 26324: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 26328: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2632c: 1a000002 bne 2633c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 26330: eb006024 bl 3e3c8 <__errno> <== NOT EXECUTED 26334: e3a0300e mov r3, #14 <== NOT EXECUTED 26338: ea000018 b 263a0 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 2633c: eb007b2f bl 45000 <== NOT EXECUTED 26340: e28d4004 add r4, sp, #4 <== NOT EXECUTED 26344: e3a0c000 mov ip, #0 <== NOT EXECUTED 26348: e1a01000 mov r1, r0 <== NOT EXECUTED 2634c: e1a0200c mov r2, ip <== NOT EXECUTED 26350: e1a00006 mov r0, r6 <== NOT EXECUTED 26354: e1a03004 mov r3, r4 <== NOT EXECUTED 26358: e58dc000 str ip, [sp] <== NOT EXECUTED 2635c: ebff84b6 bl 763c <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 26360: e2501000 subs r1, r0, #0 <== NOT EXECUTED 26364: 1a00000e bne 263a4 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 26368: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 2636c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 26370: e3530000 cmp r3, #0 <== NOT EXECUTED 26374: 1a00000c bne 263ac <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 26378: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2637c: e3530000 cmp r3, #0 <== NOT EXECUTED 26380: 0a000004 beq 26398 <== NOT EXECUTED 26384: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26388: e3530000 cmp r3, #0 <== NOT EXECUTED 2638c: 11a00004 movne r0, r4 <== NOT EXECUTED 26390: 11a0e00f movne lr, pc <== NOT EXECUTED 26394: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 26398: eb00600a bl 3e3c8 <__errno> <== NOT EXECUTED 2639c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 263a0: e5803000 str r3, [r0] <== NOT EXECUTED 263a4: e3e05000 mvn r5, #0 <== NOT EXECUTED 263a8: ea000010 b 263f0 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 263ac: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 263b0: e1a00005 mov r0, r5 <== NOT EXECUTED 263b4: eb006d3a bl 418a4 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 263b8: e1a01005 mov r1, r5 <== NOT EXECUTED 263bc: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 263c0: e1a00004 mov r0, r4 <== NOT EXECUTED 263c4: e1a0e00f mov lr, pc <== NOT EXECUTED 263c8: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 263cc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 263d0: e3530000 cmp r3, #0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 263d4: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 263d8: 0a000004 beq 263f0 <== NOT EXECUTED 263dc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 263e0: e3530000 cmp r3, #0 <== NOT EXECUTED 263e4: 11a00004 movne r0, r4 <== NOT EXECUTED 263e8: 11a0e00f movne lr, pc <== NOT EXECUTED 263ec: 112fff13 bxne r3 <== NOT EXECUTED return status; } 263f0: e1a00005 mov r0, r5 <== NOT EXECUTED 263f4: e28dd018 add sp, sp, #24 <== NOT EXECUTED 263f8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00002200 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 2200: e59f30d8 ldr r3, [pc, #216] ; 22e0 2204: e5932004 ldr r2, [r3, #4] 2208: e2822001 add r2, r2, #1 220c: e92d4070 push {r4, r5, r6, lr} 2210: e5832004 str r2, [r3, #4] 2214: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2218: ebffffb5 bl 20f4 /* * Validate the parameters */ if ( !size ) 221c: e3540000 cmp r4, #0 2220: 0a00002b beq 22d4 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2224: e59f30b8 ldr r3, [pc, #184] ; 22e4 2228: e5933000 ldr r3, [r3] 222c: e3530003 cmp r3, #3 2230: 1a000002 bne 2240 2234: ebffff97 bl 2098 2238: e3500000 cmp r0, #0 223c: 0a000024 beq 22d4 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 2240: e59f30a0 ldr r3, [pc, #160] ; 22e8 2244: e3a02000 mov r2, #0 2248: e5930000 ldr r0, [r3] 224c: e1a01004 mov r1, r4 2250: e1a03002 mov r3, r2 2254: eb00121c bl 6acc <_Protected_heap_Allocate_aligned_with_boundary> * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 2258: e2506000 subs r6, r0, #0 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 225c: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 2260: 1a00000c bne 2298 if (rtems_malloc_sbrk_helpers) 2264: e59f3080 ldr r3, [pc, #128] ; 22ec 2268: e5933000 ldr r3, [r3] 226c: e3530000 cmp r3, #0 2270: 0a000004 beq 2288 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 2274: e1a00004 mov r0, r4 <== NOT EXECUTED 2278: e1a0e00f mov lr, pc <== NOT EXECUTED 227c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 2280: e2505000 subs r5, r0, #0 <== NOT EXECUTED 2284: 1a000003 bne 2298 <== NOT EXECUTED errno = ENOMEM; 2288: eb003115 bl e6e4 <__errno> 228c: e3a0300c mov r3, #12 2290: e5803000 str r3, [r0] return (void *) 0; 2294: ea00000f b 22d8 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 2298: e59f3050 ldr r3, [pc, #80] ; 22f0 229c: e5933000 ldr r3, [r3] 22a0: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 22a4: 11a01004 movne r1, r4 22a8: 11a00005 movne r0, r5 22ac: 11a0e00f movne lr, pc 22b0: 112fff13 bxne r3 /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 22b4: e59f3038 ldr r3, [pc, #56] ; 22f4 22b8: e5933000 ldr r3, [r3] 22bc: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 22c0: 11a00005 movne r0, r5 22c4: 11a0e00f movne lr, pc 22c8: 1593f004 ldrne pc, [r3, #4] 22cc: e1a06005 mov r6, r5 22d0: ea000000 b 22d8 22d4: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 22d8: e1a00006 mov r0, r6 22dc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000020e4 : } void malloc_deferred_free( void *pointer ) { 20e4: e1a01000 mov r1, r0 <== 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 ); 20e8: e59f0000 ldr r0, [pc, #0] ; 20f0 <== NOT EXECUTED 20ec: ea000e68 b 5a94 <_Chain_Append> <== NOT EXECUTED =============================================================================== 000020f4 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 20f4: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 20f8: ea000000 b 2100 free(to_be_freed); 20fc: ebffff73 bl 1ed0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 2100: e59f000c ldr r0, [pc, #12] ; 2114 2104: eb000e76 bl 5ae4 <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 2108: e3500000 cmp r0, #0 210c: 1afffffa bne 20fc free(to_be_freed); } 2110: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000c844 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { c844: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; c848: e5904038 ldr r4, [r0, #56] ; 0x38 * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) c84c: e5943054 ldr r3, [r4, #84] ; 0x54 c850: e1530002 cmp r3, r2 c854: ba000003 blt c868 c858: 1a000005 bne c874 c85c: e5943050 ldr r3, [r4, #80] ; 0x50 c860: e1530001 cmp r3, r1 c864: 2a000002 bcs c874 return IMFS_memfile_extend( the_jnode, length ); c868: e1a00004 mov r0, r4 <== NOT EXECUTED c86c: ebffff9a bl c6dc <== NOT EXECUTED c870: ea000008 b c898 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; c874: e5841050 str r1, [r4, #80] ; 0x50 c878: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; c87c: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); c880: e3a01000 mov r1, #0 c884: e1a0000d mov r0, sp c888: ebffd5b9 bl 1f74 c88c: e59d3000 ldr r3, [sp] c890: e5843040 str r3, [r4, #64] ; 0x40 c894: e3a00000 mov r0, #0 return 0; } c898: e8bd801c pop {r2, r3, r4, pc} =============================================================================== 0000c89c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { c89c: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; c8a0: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { c8a4: e595304c ldr r3, [r5, #76] ; 0x4c c8a8: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { c8ac: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { c8b0: 1a00000b bne c8e4 if (iop->offset > the_jnode->info.linearfile.size) c8b4: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED c8b8: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED c8bc: e1520003 cmp r2, r3 <== NOT EXECUTED c8c0: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED c8c4: ca000003 bgt c8d8 <== NOT EXECUTED c8c8: 1a000014 bne c920 <== NOT EXECUTED c8cc: e590100c ldr r1, [r0, #12] <== NOT EXECUTED c8d0: e1510002 cmp r1, r2 <== NOT EXECUTED c8d4: 9a000011 bls c920 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; c8d8: e584200c str r2, [r4, #12] <== NOT EXECUTED c8dc: e5843010 str r3, [r4, #16] <== NOT EXECUTED c8e0: ea00000e b c920 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) c8e4: e1a00005 mov r0, r5 c8e8: e284200c add r2, r4, #12 c8ec: e8920006 ldm r2, {r1, r2} c8f0: ebffff79 bl c6dc c8f4: e3500000 cmp r0, #0 c8f8: 0a000005 beq c914 rtems_set_errno_and_return_minus_one( ENOSPC ); c8fc: eb000778 bl e6e4 <__errno> <== NOT EXECUTED c900: e3a0301c mov r3, #28 <== NOT EXECUTED c904: e5803000 str r3, [r0] <== NOT EXECUTED c908: e3e04000 mvn r4, #0 <== NOT EXECUTED c90c: e3e03000 mvn r3, #0 <== NOT EXECUTED c910: ea000004 b c928 <== NOT EXECUTED iop->size = the_jnode->info.file.size; c914: e2853050 add r3, r5, #80 ; 0x50 c918: e893000c ldm r3, {r2, r3} c91c: e984000c stmib r4, {r2, r3} } return iop->offset; c920: e284400c add r4, r4, #12 c924: e8940018 ldm r4, {r3, r4} } c928: e1a01004 mov r1, r4 c92c: e1a00003 mov r0, r3 c930: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000cbc0 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) cbc0: e5903014 ldr r3, [r0, #20] cbc4: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { cbc8: e92d4031 push {r0, r4, r5, lr} cbcc: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; cbd0: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) cbd4: 0a000017 beq cc38 && (the_jnode->type == IMFS_LINEAR_FILE)) { cbd8: e594304c ldr r3, [r4, #76] ; 0x4c cbdc: e3530006 cmp r3, #6 cbe0: 1a000014 bne cc38 uint32_t count = the_jnode->info.linearfile.size; cbe4: e594c050 ldr ip, [r4, #80] ; 0x50 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; cbe8: e3a02000 mov r2, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; cbec: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; cbf0: e3a00000 mov r0, #0 <== NOT EXECUTED cbf4: e3a01000 mov r1, #0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) cbf8: e35c0000 cmp ip, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; cbfc: e584304c str r3, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; cc00: e5842060 str r2, [r4, #96] ; 0x60 <== NOT EXECUTED * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; cc04: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; cc08: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED cc0c: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; cc10: e584205c str r2, [r4, #92] ; 0x5c <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; cc14: e5842058 str r2, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) cc18: 0a000006 beq cc38 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) cc1c: e1a02001 mov r2, r1 <== NOT EXECUTED cc20: e1a01000 mov r1, r0 <== NOT EXECUTED cc24: e1a00004 mov r0, r4 <== NOT EXECUTED cc28: e58dc000 str ip, [sp] <== NOT EXECUTED cc2c: ebffff40 bl c934 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) cc30: e3700001 cmn r0, #1 <== NOT EXECUTED cc34: 0a000009 beq cc60 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) cc38: e5953014 ldr r3, [r5, #20] cc3c: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; cc40: 12843050 addne r3, r4, #80 ; 0x50 cc44: 1893000c ldmne r3, {r2, r3} cc48: 1585200c strne r2, [r5, #12] cc4c: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; cc50: e2844050 add r4, r4, #80 ; 0x50 cc54: e8940018 ldm r4, {r3, r4} cc58: e9850018 stmib r5, {r3, r4} cc5c: e3a00000 mov r0, #0 return 0; } cc60: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 00002308 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2308: e92d41f0 push {r4, r5, r6, r7, r8, lr} 230c: e1a05001 mov r5, r1 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 2310: e2011a0f and r1, r1, #61440 ; 0xf000 2314: e3510901 cmp r1, #16384 ; 0x4000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2318: e24dd020 sub sp, sp, #32 231c: e1a06000 mov r6, r0 2320: e1a07002 mov r7, r2 2324: e1a08003 mov r8, r3 int result; /* * The file type is field within the mode. Check we have a sane mode set. */ switch (mode & S_IFMT) 2328: 0a00000b beq 235c 232c: 8a000003 bhi 2340 2330: e3510a01 cmp r1, #4096 ; 0x1000 2334: 0a000008 beq 235c 2338: e3510a02 cmp r1, #8192 ; 0x2000 233c: ea000002 b 234c 2340: e3510a06 cmp r1, #24576 ; 0x6000 2344: 0a000004 beq 235c 2348: e3510902 cmp r1, #32768 ; 0x8000 234c: 0a000002 beq 235c case S_IFBLK: case S_IFREG: case S_IFIFO: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 2350: eb0030e3 bl e6e4 <__errno> <== NOT EXECUTED 2354: e3a03016 mov r3, #22 <== NOT EXECUTED 2358: ea00000a b 2388 <== NOT EXECUTED } rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 235c: e28d4004 add r4, sp, #4 2360: e1a00006 mov r0, r6 2364: e28d101c add r1, sp, #28 2368: e1a02004 mov r2, r4 236c: eb000275 bl 2d48 if ( !temp_loc.ops->evalformake_h ) { 2370: e59d3010 ldr r3, [sp, #16] 2374: e5933004 ldr r3, [r3, #4] 2378: e3530000 cmp r3, #0 237c: 1a000004 bne 2394 rtems_set_errno_and_return_minus_one( ENOTSUP ); 2380: eb0030d7 bl e6e4 <__errno> <== NOT EXECUTED 2384: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2388: e5803000 str r3, [r0] <== NOT EXECUTED 238c: e3e05000 mvn r5, #0 2390: ea000022 b 2420 } result = (*temp_loc.ops->evalformake_h)( 2394: e59d001c ldr r0, [sp, #28] 2398: e1a01004 mov r1, r4 239c: e0860000 add r0, r6, r0 23a0: e28d2018 add r2, sp, #24 23a4: e1a0e00f mov lr, pc 23a8: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 23ac: e3500000 cmp r0, #0 23b0: 1afffff5 bne 238c return -1; if ( !temp_loc.ops->mknod_h ) { 23b4: e59d3010 ldr r3, [sp, #16] 23b8: e593c014 ldr ip, [r3, #20] 23bc: e35c0000 cmp ip, #0 23c0: 1a000006 bne 23e0 rtems_filesystem_freenode( &temp_loc ); 23c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23c8: e3530000 cmp r3, #0 <== NOT EXECUTED 23cc: 0affffeb beq 2380 <== NOT EXECUTED 23d0: e1a00004 mov r0, r4 <== NOT EXECUTED 23d4: e1a0e00f mov lr, pc <== NOT EXECUTED 23d8: e12fff13 bx r3 <== NOT EXECUTED 23dc: eaffffe7 b 2380 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 23e0: e1a01005 mov r1, r5 23e4: e1a03008 mov r3, r8 23e8: e58d4000 str r4, [sp] 23ec: e1a02007 mov r2, r7 23f0: e59d0018 ldr r0, [sp, #24] 23f4: e1a0e00f mov lr, pc 23f8: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 23fc: e59d3010 ldr r3, [sp, #16] 2400: e3530000 cmp r3, #0 if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 2404: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 2408: 0a000004 beq 2420 240c: e593301c ldr r3, [r3, #28] 2410: e3530000 cmp r3, #0 2414: 11a00004 movne r0, r4 2418: 11a0e00f movne lr, pc 241c: 112fff13 bxne r3 return result; } 2420: e1a00005 mov r0, r5 2424: e28dd020 add sp, sp, #32 2428: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000024b4 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 24b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 24b8: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 24bc: e24dd028 sub sp, sp, #40 ; 0x28 24c0: e58d300c str r3, [sp, #12] 24c4: e1a08000 mov r8, r0 24c8: e1a07001 mov r7, r1 24cc: e1a0b002 mov fp, r2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 24d0: 8a000004 bhi 24e8 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 24d4: e1a00002 mov r0, r2 24d8: eb0020c0 bl a7e0 if ( !mount_h ) 24dc: e3500000 cmp r0, #0 24e0: e58d0010 str r0, [sp, #16] 24e4: 1a000002 bne 24f4 rtems_set_errno_and_return_minus_one( EINVAL ); 24e8: eb00307d bl e6e4 <__errno> 24ec: e3a03016 mov r3, #22 24f0: ea000039 b 25dc { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 24f4: e2575000 subs r5, r7, #0 24f8: 13a05001 movne r5, #1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 24fc: e59f32ac ldr r3, [pc, #684] ; 27b0 2500: e3550000 cmp r5, #0 2504: 11a03007 movne r3, r7 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2508: e1a0000b mov r0, fp const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 250c: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2510: eb003478 bl f6f8 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2514: e3580000 cmp r8, #0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2518: e2806001 add r6, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 251c: 01a0a008 moveq sl, r8 2520: 0a000002 beq 2530 2524: e1a00008 mov r0, r8 2528: eb003472 bl f6f8 252c: e280a001 add sl, r0, #1 size_t target_length = strlen( target ); 2530: e59d0004 ldr r0, [sp, #4] 2534: eb00346f bl f6f8 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2538: e2861075 add r1, r6, #117 ; 0x75 253c: e0811000 add r1, r1, r0 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_length = strlen( target ); 2540: e58d0008 str r0, [sp, #8] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 2544: e081100a add r1, r1, sl 2548: e3a00001 mov r0, #1 254c: ebfffdd7 bl 1cb0 if ( mt_entry != NULL ) { 2550: e2504000 subs r4, r0, #0 2554: 0a00001e beq 25d4 char *str = (char *) mt_entry + sizeof( *mt_entry ); 2558: e2849074 add r9, r4, #116 ; 0x74 strcpy( str, filesystemtype ); 255c: e1a0100b mov r1, fp 2560: e1a00009 mov r0, r9 2564: eb003413 bl f5b8 mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 2568: e3580000 cmp r8, #0 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; str += filesystemtype_size; 256c: e0896006 add r6, r9, r6 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; 2570: e584906c str r9, [r4, #108] ; 0x6c str += filesystemtype_size; if ( source_or_null != NULL ) { 2574: 0a000004 beq 258c strcpy( str, source_or_null ); 2578: e1a00006 mov r0, r6 257c: e1a01008 mov r1, r8 2580: eb00340c bl f5b8 mt_entry->dev = str; 2584: e5846070 str r6, [r4, #112] ; 0x70 str += source_size; 2588: e086600a add r6, r6, sl } strcpy( str, target ); 258c: e59d1004 ldr r1, [sp, #4] 2590: e1a00006 mov r0, r6 2594: eb003407 bl f5b8 if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2598: e59fe214 ldr lr, [pc, #532] ; 27b4 259c: e8be000f ldm lr!, {r0, r1, r2, r3} 25a0: e284c038 add ip, r4, #56 ; 0x38 25a4: e8ac000f stmia ip!, {r0, r1, r2, r3} 25a8: e8be000f ldm lr!, {r0, r1, r2, r3} 25ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 25b0: e89e000f ldm lr, {r0, r1, r2, r3} 25b4: e88c000f stm ip, {r0, r1, r2, r3} ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 25b8: e59d300c ldr r3, [sp, #12] /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 25bc: e3550000 cmp r5, #0 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 25c0: e5846068 str r6, [r4, #104] ; 0x68 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 25c4: e5843030 str r3, [r4, #48] ; 0x30 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 25c8: e584402c str r4, [r4, #44] ; 0x2c /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 25cc: 0a000037 beq 26b0 25d0: ea000003 b 25e4 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 25d4: eb003042 bl e6e4 <__errno> <== NOT EXECUTED 25d8: e3a0300c mov r3, #12 <== NOT EXECUTED 25dc: e5803000 str r3, [r0] 25e0: ea00006f b 27a4 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 25e4: e28d6014 add r6, sp, #20 25e8: e3a0c001 mov ip, #1 25ec: e1a00007 mov r0, r7 25f0: e59d1008 ldr r1, [sp, #8] 25f4: e3a02007 mov r2, #7 25f8: e1a03006 mov r3, r6 25fc: e58dc000 str ip, [sp] 2600: ebfffe14 bl 1e58 2604: e3700001 cmn r0, #1 2608: 0a000058 beq 2770 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 260c: e59d3020 ldr r3, [sp, #32] 2610: e5933010 ldr r3, [r3, #16] 2614: e3530000 cmp r3, #0 2618: 0a00001b beq 268c /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 261c: e1a00006 mov r0, r6 2620: e1a0e00f mov lr, pc 2624: e12fff13 bx r3 2628: e3500001 cmp r0, #1 262c: 0a000003 beq 2640 errno = ENOTDIR; 2630: eb00302b bl e6e4 <__errno> 2634: e3a03014 mov r3, #20 2638: e5803000 str r3, [r0] goto cleanup_and_bail; 263c: ea00004c b 2774 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 2640: e59f0170 ldr r0, [pc, #368] ; 27b8 2644: e59d1014 ldr r1, [sp, #20] 2648: ebffff7c bl 2440 264c: e3500000 cmp r0, #0 2650: 0a000002 beq 2660 errno = EBUSY; 2654: eb003022 bl e6e4 <__errno> 2658: e3a03010 mov r3, #16 265c: eafffff5 b 2638 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 2660: e59d1014 ldr r1, [sp, #20] mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 2664: e59d2020 ldr r2, [sp, #32] * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 2668: e5841008 str r1, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 266c: e59d101c ldr r1, [sp, #28] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 2670: e5923020 ldr r3, [r2, #32] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; 2674: e5841010 str r1, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2678: e59d1024 ldr r1, [sp, #36] ; 0x24 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 267c: e3530000 cmp r3, #0 */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2680: e5841018 str r1, [r4, #24] * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 2684: e5842014 str r2, [r4, #20] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 2688: 1a000002 bne 2698 errno = ENOTSUP; 268c: eb003014 bl e6e4 <__errno> <== NOT EXECUTED 2690: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2694: eaffffe7 b 2638 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 2698: e1a00004 mov r0, r4 269c: e1a0e00f mov lr, pc 26a0: e12fff13 bx r3 26a4: e3500000 cmp r0, #0 26a8: 0a00000b beq 26dc 26ac: ea000030 b 2774 <== NOT EXECUTED } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 26b0: e59f3104 ldr r3, [pc, #260] ; 27bc 26b4: e5932000 ldr r2, [r3] 26b8: e2833004 add r3, r3, #4 26bc: e1520003 cmp r2, r3 26c0: 01a06005 moveq r6, r5 26c4: 0a000004 beq 26dc errno = EINVAL; 26c8: eb003005 bl e6e4 <__errno> <== NOT EXECUTED 26cc: e3a03016 mov r3, #22 <== NOT EXECUTED 26d0: e5803000 str r3, [r0] <== NOT EXECUTED 26d4: e1a06005 mov r6, r5 <== NOT EXECUTED goto cleanup_and_bail; 26d8: ea000025 b 2774 <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 26dc: e59d104c ldr r1, [sp, #76] ; 0x4c 26e0: e1a00004 mov r0, r4 26e4: e59d3010 ldr r3, [sp, #16] 26e8: e1a0e00f mov lr, pc 26ec: e12fff13 bx r3 26f0: e2507000 subs r7, r0, #0 26f4: 0a000007 beq 2718 /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 26f8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 26fc: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 2700: e3530000 cmp r3, #0 <== NOT EXECUTED 2704: 0a00001a beq 2774 <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 2708: e1a00004 mov r0, r4 <== NOT EXECUTED 270c: e1a0e00f mov lr, pc <== NOT EXECUTED 2710: e12fff13 bx r3 <== NOT EXECUTED 2714: ea000016 b 2774 <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 2718: e59f60a0 ldr r6, [pc, #160] ; 27c0 271c: e1a02007 mov r2, r7 2720: e1a01007 mov r1, r7 2724: e5960000 ldr r0, [r6] 2728: eb000a9b bl 519c RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 272c: e1a01004 mov r1, r4 2730: e59f0084 ldr r0, [pc, #132] ; 27bc 2734: eb000cd6 bl 5a94 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 2738: e5960000 ldr r0, [r6] 273c: eb000adc bl 52b4 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2740: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; 2744: 059f3078 ldreq r3, [pc, #120] ; 27c4 2748: 0284401c addeq r4, r4, #28 274c: 0593c000 ldreq ip, [r3] 2750: 08b4000f ldmeq r4!, {r0, r1, r2, r3} 2754: 028cc018 addeq ip, ip, #24 2758: 08ac000f stmiaeq ip!, {r0, r1, r2, r3} 275c: 05943000 ldreq r3, [r4] */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2760: 11a00007 movne r0, r7 rtems_filesystem_root = mt_entry->mt_fs_root; 2764: 058c3000 streq r3, [ip] 2768: 01a00005 moveq r0, r5 276c: ea00000d b 27a8 2770: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 2774: e1a00004 mov r0, r4 2778: ebfffdd4 bl 1ed0 if ( loc_to_free ) 277c: e3560000 cmp r6, #0 2780: 0a000007 beq 27a4 rtems_filesystem_freenode( loc_to_free ); 2784: e596300c ldr r3, [r6, #12] 2788: e3530000 cmp r3, #0 278c: 0a000004 beq 27a4 2790: e593301c ldr r3, [r3, #28] 2794: e3530000 cmp r3, #0 2798: 11a00006 movne r0, r6 279c: 11a0e00f movne lr, pc 27a0: 112fff13 bxne r3 27a4: e3e00000 mvn r0, #0 return -1; } 27a8: e28dd028 add sp, sp, #40 ; 0x28 27ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00031944 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 31944: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 31948: e24dd0a8 sub sp, sp, #168 ; 0xa8 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 3194c: e3a05000 mov r5, #0 <== NOT EXECUTED mode_t mode, const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 31950: e590e010 ldr lr, [r0, #16] <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 31954: e28da070 add sl, sp, #112 ; 0x70 <== NOT EXECUTED fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 31958: e3e0c000 mvn ip, #0 <== NOT EXECUTED msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 3195c: e1a04000 mov r4, r0 <== NOT EXECUTED 31960: e1a09002 mov r9, r2 <== NOT EXECUTED 31964: e1a06001 mov r6, r1 <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 31968: e3a02020 mov r2, #32 <== NOT EXECUTED 3196c: e1a01005 mov r1, r5 <== NOT EXECUTED 31970: e1a0000a mov r0, sl <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 31974: e58dc09c str ip, [sp, #156] ; 0x9c <== NOT EXECUTED msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 31978: e1a0b003 mov fp, r3 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; 3197c: e59e8034 ldr r8, [lr, #52] ; 0x34 <== NOT EXECUTED fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; dir_pos->sname.ofs = 0; dir_pos->lname.cln = FAT_FILE_SHORT_NAME; 31980: e58dc098 str ip, [sp, #152] ; 0x98 <== NOT EXECUTED fat_file_fd_t *parent_fat_fd = parent_loc->node_access; fat_file_fd_t *fat_fd = NULL; 31984: e58d50a0 str r5, [sp, #160] ; 0xa0 <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 31988: e1cd5ab6 strh r5, [sp, #166] ; 0xa6 <== NOT EXECUTED uint16_t date = 0; 3198c: e1cd5ab4 strh r5, [sp, #164] ; 0xa4 <== NOT EXECUTED static inline void fat_dir_pos_init( fat_dir_pos_t *dir_pos ) { dir_pos->sname.cln = 0; 31990: e58d5090 str r5, [sp, #144] ; 0x90 <== NOT EXECUTED dir_pos->sname.ofs = 0; 31994: e58d5094 str r5, [sp, #148] ; 0x94 <== NOT EXECUTED const fat_file_fd_t *link_fd) { int rc = RC_OK; ssize_t ret = 0; msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info; fat_file_fd_t *parent_fat_fd = parent_loc->node_access; 31998: e5947000 ldr r7, [r4] <== NOT EXECUTED uint32_t sec = 0; uint32_t byte = 0; fat_dir_pos_init(&dir_pos); memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE); 3199c: eb003fc0 bl 418a4 <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 319a0: e1a01005 mov r1, r5 <== NOT EXECUTED 319a4: e3a02040 mov r2, #64 ; 0x40 <== NOT EXECUTED 319a8: e28d0010 add r0, sp, #16 <== NOT EXECUTED 319ac: eb003fbc bl 418a4 <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 319b0: e1a0100b mov r1, fp <== NOT EXECUTED 319b4: e1a0200a mov r2, sl <== NOT EXECUTED 319b8: e3a0300b mov r3, #11 <== NOT EXECUTED 319bc: e1a00009 mov r0, r9 <== NOT EXECUTED 319c0: eb000786 bl 337e0 <== NOT EXECUTED 319c4: e58d000c str r0, [sp, #12] <== NOT EXECUTED /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; /* set up last write date and time */ time_ret = time(NULL); 319c8: e1a00005 mov r0, r5 <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, MSDOS_DIR_NAME(short_node), MSDOS_NAME_MAX); /* fill reserved field */ *MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE; 319cc: e5cd507c strb r5, [sp, #124] ; 0x7c <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 319d0: eb0061ff bl 4a1d4