=============================================================================== 00009208 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 9208: e5903000 ldr r3, [r0] 920c: 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; 9210: e5903010 ldr r3, [r0, #16] switch( node->type ) { 9214: 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; 9218: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 921c: e3520006 cmp r2, #6 9220: 979ff102 ldrls pc, [pc, r2, lsl #2] 9224: ea000010 b 926c <== NOT EXECUTED 9228: 00009244 .word 0x00009244 <== NOT EXECUTED 922c: 0000924c .word 0x0000924c <== NOT EXECUTED 9230: 00009254 .word 0x00009254 <== NOT EXECUTED 9234: 00009254 .word 0x00009254 <== NOT EXECUTED 9238: 0000925c .word 0x0000925c <== NOT EXECUTED 923c: 0000925c .word 0x0000925c <== NOT EXECUTED 9240: 00009264 .word 0x00009264 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 9244: e593300c ldr r3, [r3, #12] 9248: ea000006 b 9268 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 924c: e59f3020 ldr r3, [pc, #32] ; 9274 9250: ea000004 b 9268 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 9254: e59f301c ldr r3, [pc, #28] ; 9278 9258: ea000002 b 9268 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 925c: e5933008 ldr r3, [r3, #8] 9260: ea000000 b 9268 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 9264: e59f3010 ldr r3, [pc, #16] ; 927c 9268: e5803008 str r3, [r0, #8] break; } return 0; } 926c: e3a00000 mov r0, #0 9270: e12fff1e bx lr =============================================================================== 000090cc : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 90cc: 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 ) 90d0: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 90d4: e1a05001 mov r5, r1 90d8: e59d6014 ldr r6, [sp, #20] 90dc: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 90e0: 01a07004 moveq r7, r4 90e4: 0a000041 beq 91f0 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 90e8: e59f2108 ldr r2, [pc, #264] ; 91f8 90ec: e5922000 ldr r2, [r2] 90f0: e592202c ldr r2, [r2, #44] ; 0x2c 90f4: e1a00005 mov r0, r5 90f8: e1c32002 bic r2, r3, r2 90fc: ebffffc5 bl 9018 if ( !node ) 9100: e2507000 subs r7, r0, #0 9104: 0a000039 beq 91f0 return NULL; /* * Set the type specific information */ switch (type) { 9108: e2455001 sub r5, r5, #1 910c: e3550006 cmp r5, #6 9110: 979ff105 ldrls pc, [pc, r5, lsl #2] 9114: ea000025 b 91b0 <== NOT EXECUTED 9118: 00009134 .word 0x00009134 <== NOT EXECUTED 911c: 00009158 .word 0x00009158 <== NOT EXECUTED 9120: 00009150 .word 0x00009150 <== NOT EXECUTED 9124: 00009150 .word 0x00009150 <== NOT EXECUTED 9128: 00009180 .word 0x00009180 <== NOT EXECUTED 912c: 00009168 .word 0x00009168 <== NOT EXECUTED 9130: 000091a4 .word 0x000091a4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 9134: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 9138: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 913c: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; 9140: e3a02000 mov r2, #0 9144: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); 9148: e5873058 str r3, [r7, #88] ; 0x58 914c: ea00001c b 91c4 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; 9150: e5963000 ldr r3, [r6] 9154: ea000013 b 91a8 break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 9158: 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; 915c: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; 9160: e5872054 str r2, [r7, #84] ; 0x54 9164: ea00000f b 91a8 break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 9168: e3a03000 mov r3, #0 <== NOT EXECUTED 916c: e3a02000 mov r2, #0 <== NOT EXECUTED 9170: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED 9174: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; 9178: e3a03000 mov r3, #0 <== NOT EXECUTED 917c: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; 9180: 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; 9184: e3a01000 mov r1, #0 9188: e3a02000 mov r2, #0 918c: e5871050 str r1, [r7, #80] ; 0x50 9190: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; 9194: 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; 9198: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; 919c: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; 91a0: ea000007 b 91c4 case IMFS_FIFO: node->info.fifo.pipe = NULL; 91a4: e3a03000 mov r3, #0 91a8: e5873050 str r3, [r7, #80] ; 0x50 break; 91ac: ea000004 b 91c4 default: assert(0); 91b0: e59f0044 ldr r0, [pc, #68] ; 91fc <== NOT EXECUTED 91b4: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED 91b8: e59f2040 ldr r2, [pc, #64] ; 9200 <== NOT EXECUTED 91bc: e59f3040 ldr r3, [pc, #64] ; 9204 <== NOT EXECUTED 91c0: eb000391 bl a00c <__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; 91c4: e5943010 ldr r3, [r4, #16] 91c8: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; 91cc: e5923004 ldr r3, [r2, #4] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 91d0: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; 91d4: e2833001 add r3, r3, #1 91d8: 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; 91dc: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; 91e0: e5873038 str r3, [r7, #56] ; 0x38 91e4: e2800050 add r0, r0, #80 ; 0x50 91e8: e1a01007 mov r1, r7 91ec: ebfff215 bl 5a48 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 91f0: e1a00007 mov r0, r7 91f4: 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: eb0036d4 bl 11a08 !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} =============================================================================== 000093cc : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 93cc: 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 ) ) { 93d0: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 93d4: e24dd028 sub sp, sp, #40 ; 0x28 93d8: e1a0a002 mov sl, r2 93dc: e1a08000 mov r8, r0 93e0: e1a06001 mov r6, r1 93e4: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 93e8: 05935000 ldreq r5, [r3] 93ec: 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 ) ) { 93f0: 0a000084 beq 9608 assert( 0 ); 93f4: e59f02b4 ldr r0, [pc, #692] ; 96b0 <== NOT EXECUTED 93f8: e3a01f82 mov r1, #520 ; 0x208 <== NOT EXECUTED 93fc: e59f22b0 ldr r2, [pc, #688] ; 96b4 <== NOT EXECUTED 9400: e59f32b0 ldr r3, [pc, #688] ; 96b8 <== NOT EXECUTED 9404: eb000300 bl a00c <__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 ); 9408: e28d3024 add r3, sp, #36 ; 0x24 940c: e0880007 add r0, r8, r7 9410: e1a01006 mov r1, r6 9414: e1a0200d mov r2, sp 9418: eb000260 bl 9da0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 941c: e5943000 ldr r3, [r4] 9420: 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 ); 9424: e1a09000 mov r9, r0 pathnamelen -= len; 9428: e59db024 ldr fp, [sp, #36] ; 0x24 i += len; if ( !pathloc->node_access ) 942c: 0a000044 beq 9544 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 9430: e3500000 cmp r0, #0 9434: 0a000006 beq 9454 if ( node->type == IMFS_DIRECTORY ) 9438: e595104c ldr r1, [r5, #76] ; 0x4c 943c: e3510001 cmp r1, #1 9440: 1a000003 bne 9454 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 9444: e1a00004 mov r0, r4 9448: ebffff8c bl 9280 944c: e3500000 cmp r0, #0 9450: 0a00008f beq 9694 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 9454: 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; 9458: 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; 945c: 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; 9460: e5945000 ldr r5, [r4] switch( type ) { 9464: 0a000018 beq 94cc 9468: e3590004 cmp r9, #4 946c: 0a000062 beq 95fc 9470: e3590002 cmp r9, #2 9474: 1a000063 bne 9608 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 9478: e59f223c ldr r2, [pc, #572] ; 96bc 947c: e5923000 ldr r3, [r2] 9480: e5933018 ldr r3, [r3, #24] 9484: e1550003 cmp r5, r3 9488: 0a00005e beq 9608 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 948c: e594c010 ldr ip, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 9490: e59c301c ldr r3, [ip, #28] 9494: e1550003 cmp r5, r3 9498: 1a000005 bne 94b4 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { *pathloc = pathloc->mt_entry->mt_point_node; 949c: e28cc008 add ip, ip, #8 94a0: e8bc000f ldm ip!, {r0, r1, r2, r3} 94a4: e1a05004 mov r5, r4 94a8: e8a5000f stmia r5!, {r0, r1, r2, r3} 94ac: e1a03005 mov r3, r5 94b0: ea000062 b 9640 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 94b4: e5955008 ldr r5, [r5, #8] 94b8: e3550000 cmp r5, #0 94bc: 1a00004c bne 95f4 rtems_set_errno_and_return_minus_one( ENOENT ); 94c0: eb000fbf bl d3c4 <__errno> 94c4: e5809000 str r9, [r0] 94c8: ea000074 b 96a0 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 94cc: e595304c ldr r3, [r5, #76] ; 0x4c 94d0: e3530003 cmp r3, #3 94d4: 1a000006 bne 94f4 IMFS_evaluate_hard_link( pathloc, 0 ); 94d8: e1a00004 mov r0, r4 94dc: e3a01000 mov r1, #0 94e0: ebffff76 bl 92c0 node = pathloc->node_access; 94e4: e5945000 ldr r5, [r4] if ( !node ) 94e8: e3550000 cmp r5, #0 94ec: 1a000009 bne 9518 94f0: ea00000b b 9524 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 94f4: e3530004 cmp r3, #4 94f8: 1a000006 bne 9518 result = IMFS_evaluate_sym_link( pathloc, 0 ); 94fc: e1a00004 mov r0, r4 9500: e3a01000 mov r1, #0 9504: ebffff84 bl 931c node = pathloc->node_access; if ( result == -1 ) 9508: 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 ); 950c: e1a0b000 mov fp, r0 node = pathloc->node_access; 9510: e5945000 ldr r5, [r4] if ( result == -1 ) 9514: 0a000062 beq 96a4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 9518: e595304c ldr r3, [r5, #76] ; 0x4c 951c: e3530001 cmp r3, #1 9520: 0a000002 beq 9530 rtems_set_errno_and_return_minus_one( ENOTDIR ); 9524: eb000fa6 bl d3c4 <__errno> 9528: e3a03014 mov r3, #20 952c: ea00005a b 969c /* * Find the token name in the current node. */ node = IMFS_find_match_in_dir( node, token ); 9530: e1a00005 mov r0, r5 9534: e1a0100d mov r1, sp 9538: eb0001f0 bl 9d00 if ( !node ) 953c: e2505000 subs r5, r0, #0 9540: 1a000002 bne 9550 rtems_set_errno_and_return_minus_one( ENOENT ); 9544: eb000f9e bl d3c4 <__errno> 9548: e3a03002 mov r3, #2 954c: ea000052 b 969c * 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 )) { 9550: e595304c ldr r3, [r5, #76] ; 0x4c 9554: e3530001 cmp r3, #1 9558: 1a000025 bne 95f4 955c: e595305c ldr r3, [r5, #92] ; 0x5c 9560: e3530000 cmp r3, #0 9564: 1088b007 addne fp, r8, r7 9568: 1a000002 bne 9578 956c: ea000020 b 95f4 size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 9570: e2877001 add r7, r7, #1 --(*len); 9574: 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 ) { 9578: e5db0000 ldrb r0, [fp] 957c: ebffe60b bl 2db0 9580: e3500000 cmp r0, #0 ++(*index); --(*len); 9584: 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 ) { 9588: 0a000005 beq 95a4 958c: e5db3000 ldrb r3, [fp] 9590: e3530000 cmp r3, #0 9594: 0a000002 beq 95a4 9598: e3560000 cmp r6, #0 959c: e28bb001 add fp, fp, #1 95a0: 1afffff2 bne 9570 * 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] != '.')) { 95a4: e5dc3000 ldrb r3, [ip] 95a8: e353002e cmp r3, #46 ; 0x2e 95ac: 1a000003 bne 95c0 95b0: e0883007 add r3, r8, r7 95b4: e5d33001 ldrb r3, [r3, #1] 95b8: e353002e cmp r3, #46 ; 0x2e 95bc: 0a000009 beq 95e8 *pathloc = node->info.directory.mt_fs->mt_fs_root; 95c0: e595e05c ldr lr, [r5, #92] ; 0x5c 95c4: e28ee01c add lr, lr, #28 95c8: e8be000f ldm lr!, {r0, r1, r2, r3} 95cc: e1a05004 mov r5, r4 95d0: e8a5000f stmia r5!, {r0, r1, r2, r3} 95d4: e59e2000 ldr r2, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i], 95d8: 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; 95dc: e5852000 str r2, [r5] return (*pathloc->ops->evalpath_h)( &pathname[i], 95e0: e1a01006 mov r1, r6 95e4: ea00001b b 9658 pathnamelen, flags, pathloc ); } i += 2; pathnamelen -= 2; node = node->Parent; 95e8: 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; 95ec: e2877002 add r7, r7, #2 pathnamelen -= 2; 95f0: e2466002 sub r6, r6, #2 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 95f4: e5845000 str r5, [r4] 95f8: ea000002 b 9608 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 95fc: eb000f70 bl d3c4 <__errno> 9600: e3a0305b mov r3, #91 ; 0x5b 9604: ea000024 b 969c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 9608: e3590004 cmp r9, #4 960c: 13590000 cmpne r9, #0 9610: 1affff7c bne 9408 * 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 ) { 9614: e595304c ldr r3, [r5, #76] ; 0x4c 9618: e3530001 cmp r3, #1 961c: 1a000014 bne 9674 if ( node->info.directory.mt_fs != NULL ) { 9620: e595c05c ldr ip, [r5, #92] ; 0x5c 9624: e35c0000 cmp ip, #0 9628: 0a000011 beq 9674 *pathloc = node->info.directory.mt_fs->mt_fs_root; 962c: e28cc01c add ip, ip, #28 <== NOT EXECUTED 9630: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 9634: e1a0e004 mov lr, r4 <== NOT EXECUTED 9638: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 963c: e1a0300e mov r3, lr <== NOT EXECUTED return (*pathloc->ops->evalpath_h)( &pathname[i-len], 9640: 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; 9644: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 9648: 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; 964c: e5832000 str r2, [r3] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 9650: e0880000 add r0, r8, r0 9654: e0861001 add r1, r6, r1 9658: e1a0200a mov r2, sl 965c: e1a03004 mov r3, r4 9660: e594c00c ldr ip, [r4, #12] 9664: e1a0e00f mov lr, pc 9668: e59cf000 ldr pc, [ip] 966c: e1a0b000 mov fp, r0 9670: ea00000b b 96a4 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 9674: e1a00004 mov r0, r4 9678: ebfffee2 bl 9208 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 967c: e1a0100a mov r1, sl flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 9680: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 9684: e1a00004 mov r0, r4 9688: ebfffefc bl 9280 968c: e3500000 cmp r0, #0 9690: 1a000003 bne 96a4 rtems_set_errno_and_return_minus_one( EACCES ); 9694: eb000f4a bl d3c4 <__errno> 9698: e3a0300d mov r3, #13 969c: e5803000 str r3, [r0] 96a0: e3e0b000 mvn fp, #0 return result; } 96a4: e1a0000b mov r0, fp 96a8: e28dd028 add sp, sp, #40 ; 0x28 96ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00009774 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 9774: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 9778: e24dd028 sub sp, sp, #40 ; 0x28 977c: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 9780: 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 */ ) { 9784: e1a0a002 mov sl, r2 9788: e1a08000 mov r8, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 978c: eb001311 bl e3d8 9790: e3a05000 mov r5, #0 9794: 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 ); 9798: e28d3024 add r3, sp, #36 ; 0x24 979c: e0880005 add r0, r8, r5 97a0: e1a01007 mov r1, r7 97a4: e1a0200d mov r2, sp 97a8: eb00017c bl 9da0 pathlen -= len; i += len; if ( !pathloc->node_access ) 97ac: e5943000 ldr r3, [r4] 97b0: 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 ); 97b4: e1a09000 mov r9, r0 pathlen -= len; 97b8: e59db024 ldr fp, [sp, #36] ; 0x24 i += len; if ( !pathloc->node_access ) 97bc: 0a000080 beq 99c4 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 97c0: e3500000 cmp r0, #0 97c4: 0a000006 beq 97e4 if ( node->type == IMFS_DIRECTORY ) 97c8: e596104c ldr r1, [r6, #76] ; 0x4c 97cc: e3510001 cmp r1, #1 97d0: 1a000003 bne 97e4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 97d4: e1a00004 mov r0, r4 97d8: ebfffea8 bl 9280 97dc: e3500000 cmp r0, #0 97e0: 0a00008c beq 9a18 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 97e4: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 97e8: e085500b add r5, r5, fp */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 97ec: 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; 97f0: e1a06003 mov r6, r3 switch( type ) { 97f4: e3590004 cmp r9, #4 97f8: 979ff109 ldrls pc, [pc, r9, lsl #2] 97fc: eaffffe5 b 9798 <== NOT EXECUTED 9800: 00009984 .word 0x00009984 <== NOT EXECUTED 9804: 00009798 .word 0x00009798 <== NOT EXECUTED 9808: 00009814 .word 0x00009814 <== NOT EXECUTED 980c: 00009870 .word 0x00009870 <== NOT EXECUTED 9810: 00009990 .word 0x00009990 <== 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 ) 9814: e59f1218 ldr r1, [pc, #536] ; 9a34 9818: e5912000 ldr r2, [r1] 981c: e5922018 ldr r2, [r2, #24] 9820: e1530002 cmp r3, r2 9824: 0affffdb beq 9798 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 9828: e594c010 ldr ip, [r4, #16] 982c: e59c201c ldr r2, [ip, #28] 9830: e1530002 cmp r3, r2 9834: 1a000009 bne 9860 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 9838: e28cc008 add ip, ip, #8 983c: e8bc000f ldm ip!, {r0, r1, r2, r3} 9840: e1a0e004 mov lr, r4 9844: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9848: e59d3024 ldr r3, [sp, #36] ; 0x24 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 984c: e59c2000 ldr r2, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9850: e0635005 rsb r5, r3, r5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { *pathloc = pathloc->mt_entry->mt_point_node; 9854: e58e2000 str r2, [lr] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 9858: e0880005 add r0, r8, r5 985c: ea00003c b 9954 } } else { if ( !node->Parent ) 9860: e5936008 ldr r6, [r3, #8] 9864: e3560000 cmp r6, #0 9868: 1a000043 bne 997c 986c: ea000054 b 99c4 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 9870: e593304c ldr r3, [r3, #76] ; 0x4c 9874: e3530003 cmp r3, #3 9878: 0a000001 beq 9884 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 987c: e3530004 cmp r3, #4 9880: 1a000005 bne 989c result = IMFS_evaluate_link( pathloc, 0 ); 9884: e1a00004 mov r0, r4 9888: e3a01000 mov r1, #0 988c: ebffff8b bl 96c0 if ( result == -1 ) 9890: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 9894: e1a06000 mov r6, r0 if ( result == -1 ) 9898: 0a000062 beq 9a28 return -1; } node = pathloc->node_access; 989c: e5940000 ldr r0, [r4] if ( !node ) 98a0: e3500000 cmp r0, #0 98a4: 0a000053 beq 99f8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 98a8: e590304c ldr r3, [r0, #76] ; 0x4c 98ac: e3530001 cmp r3, #1 98b0: 1a000050 bne 99f8 /* * Find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 98b4: e1a0100d mov r1, sp 98b8: eb000110 bl 9d00 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 98bc: e2506000 subs r6, r0, #0 98c0: 0a000035 beq 999c done = true; else { if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) { 98c4: e596304c ldr r3, [r6, #76] ; 0x4c 98c8: e3530001 cmp r3, #1 98cc: 1a00002a bne 997c 98d0: e596305c ldr r3, [r6, #92] ; 0x5c 98d4: e3530000 cmp r3, #0 98d8: 10889005 addne r9, r8, r5 98dc: 1a000002 bne 98ec 98e0: ea000025 b 997c size_t *len, /* IN/OUT */ int *index /* IN/OUT */ ) { while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) { ++(*index); 98e4: e2855001 add r5, r5, #1 --(*len); 98e8: 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 ) { 98ec: e5d90000 ldrb r0, [r9] 98f0: ebffe52e bl 2db0 98f4: e3500000 cmp r0, #0 ++(*index); --(*len); 98f8: 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 ) { 98fc: 0a000005 beq 9918 9900: e5d93000 ldrb r3, [r9] 9904: e3530000 cmp r3, #0 9908: 0a000002 beq 9918 990c: e3570000 cmp r7, #0 9910: e2899001 add r9, r9, #1 9914: 1afffff2 bne 98e4 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] != '.')) { 9918: e5dc3000 ldrb r3, [ip] 991c: e353002e cmp r3, #46 ; 0x2e 9920: 1a000003 bne 9934 9924: e0883005 add r3, r8, r5 9928: e5d33001 ldrb r3, [r3, #1] 992c: e353002e cmp r3, #46 ; 0x2e 9930: 0a00000e beq 9970 *pathloc = node->info.directory.mt_fs->mt_fs_root; 9934: e596e05c ldr lr, [r6, #92] ; 0x5c 9938: e28ee01c add lr, lr, #28 993c: e8be000f ldm lr!, {r0, r1, r2, r3} 9940: e1a05004 mov r5, r4 9944: e8a5000f stmia r5!, {r0, r1, r2, r3} 9948: e59e2000 ldr r2, [lr] 994c: e5852000 str r2, [r5] return (*pathloc->ops->evalformake_h)( &path[i], 9950: e1a0000c mov r0, ip 9954: e1a01004 mov r1, r4 9958: e1a0200a mov r2, sl 995c: e594300c ldr r3, [r4, #12] 9960: e1a0e00f mov lr, pc 9964: e593f004 ldr pc, [r3, #4] 9968: e1a06000 mov r6, r0 996c: ea00002d b 9a28 pathloc, name ); } i += 2; pathlen -= 2; node = node->Parent; 9970: 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; 9974: e2855002 add r5, r5, #2 pathlen -= 2; 9978: e2477002 sub r7, r7, #2 node = node->Parent; } pathloc->node_access = node; 997c: e5846000 str r6, [r4] 9980: eaffff84 b 9798 } break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 9984: eb000e8e bl d3c4 <__errno> 9988: e3a03011 mov r3, #17 998c: ea000023 b 9a20 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 9990: eb000e8b bl d3c4 <__errno> 9994: e3a0305b mov r3, #91 ; 0x5b 9998: ea000020 b 9a20 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 999c: e59d3024 ldr r3, [sp, #36] ; 0x24 99a0: e0633005 rsb r3, r3, r5 99a4: e0883003 add r3, r8, r3 99a8: e58a3000 str r3, [sl] 99ac: 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++) { 99b0: ea000006 b 99d0 if ( !IMFS_is_separator( path[ i ] ) ) 99b4: ebffe4fd bl 2db0 99b8: e3500000 cmp r0, #0 99bc: e2855001 add r5, r5, #1 99c0: 1a000002 bne 99d0 rtems_set_errno_and_return_minus_one( ENOENT ); 99c4: eb000e7e bl d3c4 <__errno> 99c8: e3a03002 mov r3, #2 99cc: ea000013 b 9a20 /* * 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++) { 99d0: e5d53000 ldrb r3, [r5] 99d4: e2530000 subs r0, r3, #0 99d8: 1afffff5 bne 99b4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 99dc: e1a00004 mov r0, r4 99e0: ebfffe08 bl 9208 /* * The returned node must be a directory */ node = pathloc->node_access; 99e4: e5943000 ldr r3, [r4] 99e8: e593304c ldr r3, [r3, #76] ; 0x4c 99ec: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 99f0: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; 99f4: 0a000002 beq 9a04 if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 99f8: eb000e71 bl d3c4 <__errno> 99fc: e3a03014 mov r3, #20 9a00: ea000006 b 9a20 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 9a04: e1a00004 mov r0, r4 9a08: e3a01003 mov r1, #3 9a0c: ebfffe1b bl 9280 9a10: e3500000 cmp r0, #0 9a14: 1a000003 bne 9a28 rtems_set_errno_and_return_minus_one( EACCES ); 9a18: eb000e69 bl d3c4 <__errno> 9a1c: e3a0300d mov r3, #13 9a20: e5803000 str r3, [r0] 9a24: e3e06000 mvn r6, #0 return result; } 9a28: e1a00006 mov r0, r6 9a2c: e28dd028 add sp, sp, #40 ; 0x28 9a30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000092c0 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 92c0: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 92c4: e593204c ldr r2, [r3, #76] ; 0x4c 92c8: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 92cc: e92d4030 push {r4, r5, lr} 92d0: e1a04000 mov r4, r0 92d4: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 92d8: 159f0038 ldrne r0, [pc, #56] ; 9318 92dc: 1bfff131 blne 57a8 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 92e0: e5933050 ldr r3, [r3, #80] ; 0x50 92e4: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 92e8: ebffffc6 bl 9208 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 92ec: e1a00004 mov r0, r4 92f0: e1a01005 mov r1, r5 92f4: ebffffe1 bl 9280 92f8: e3500000 cmp r0, #0 92fc: 13a00000 movne r0, #0 9300: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 9304: eb00102e bl d3c4 <__errno> <== NOT EXECUTED 9308: e3a0300d mov r3, #13 <== NOT EXECUTED 930c: e5803000 str r3, [r0] <== NOT EXECUTED 9310: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 9314: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009280 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 9280: e3d13007 bics r3, r1, #7 int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 9284: e52de004 push {lr} ; (str lr, [sp, #-4]!) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 9288: 0a000004 beq 92a0 rtems_set_errno_and_return_minus_one( EPERM ); 928c: eb00104c bl d3c4 <__errno> <== NOT EXECUTED 9290: e3a03001 mov r3, #1 <== NOT EXECUTED 9294: e5803000 str r3, [r0] <== NOT EXECUTED 9298: e3e00000 mvn r0, #0 <== NOT EXECUTED 929c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 92a0: e5903000 ldr r3, [r0] 92a4: e5930030 ldr r0, [r3, #48] ; 0x30 92a8: e1a01301 lsl r1, r1, #6 92ac: e0010000 and r0, r1, r0 92b0: e1500001 cmp r0, r1 92b4: 13a00000 movne r0, #0 92b8: 03a00001 moveq r0, #1 return 1; return 0; } 92bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000931c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 931c: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 9320: e5906000 ldr r6, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 9324: e596304c ldr r3, [r6, #76] ; 0x4c 9328: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 932c: e1a04000 mov r4, r0 9330: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 9334: 159f0088 ldrne r0, [pc, #136] ; 93c4 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 9338: 1a000003 bne 934c rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 933c: e5963008 ldr r3, [r6, #8] 9340: e3530000 cmp r3, #0 9344: 1a000001 bne 9350 rtems_fatal_error_occurred( 0xBAD00000 ); 9348: e59f0078 ldr r0, [pc, #120] ; 93c8 <== NOT EXECUTED 934c: ebfff115 bl 57a8 <== 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; 9350: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 9354: e1a0100d mov r1, sp 9358: e5960050 ldr r0, [r6, #80] ; 0x50 935c: e1a02004 mov r2, r4 9360: eb0004de bl a6e0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 9364: e59d3000 ldr r3, [sp] 9368: e5966050 ldr r6, [r6, #80] ; 0x50 936c: e0866003 add r6, r6, r3 9370: e1a00006 mov r0, r6 9374: eb001417 bl e3d8 9378: e1a02005 mov r2, r5 937c: e1a01000 mov r1, r0 9380: e1a03004 mov r3, r4 9384: e1a00006 mov r0, r6 9388: eb00000f bl 93cc 938c: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 9390: e1a00004 mov r0, r4 9394: ebffff9b bl 9208 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 9398: e1a00004 mov r0, r4 939c: e1a01005 mov r1, r5 93a0: ebffffb6 bl 9280 93a4: e3500000 cmp r0, #0 93a8: 1a000003 bne 93bc rtems_set_errno_and_return_minus_one( EACCES ); 93ac: eb001004 bl d3c4 <__errno> <== NOT EXECUTED 93b0: e3a0300d mov r3, #13 <== NOT EXECUTED 93b4: e5803000 str r3, [r0] <== NOT EXECUTED 93b8: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 93bc: e1a00006 mov r0, r6 93c0: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== 00009b98 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 9b98: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 9b9c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 9ba0: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 9ba4: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 9ba8: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 9bac: ebfffc01 bl 8bb8 <== NOT EXECUTED if (! err) { 9bb0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 9bb4: 1a00000c bne 9bec <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 9bb8: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 9bbc: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 9bc0: 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) 9bc4: e1a00004 mov r0, r4 <== NOT EXECUTED 9bc8: eb000195 bl a224 <== NOT EXECUTED 9bcc: e3500000 cmp r0, #0 <== NOT EXECUTED 9bd0: 1a00000a bne 9c00 <== NOT EXECUTED 9bd4: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 9bd8: e3530000 cmp r3, #0 <== NOT EXECUTED 9bdc: 1a000007 bne 9c00 <== NOT EXECUTED free(jnode); 9be0: e1a00004 mov r0, r4 <== NOT EXECUTED 9be4: ebffe0b9 bl 1ed0 <== NOT EXECUTED 9be8: ea000004 b 9c00 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 9bec: aa000003 bge 9c00 <== NOT EXECUTED 9bf0: eb000df3 bl d3c4 <__errno> <== NOT EXECUTED 9bf4: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 9bf8: e5806000 str r6, [r0] <== NOT EXECUTED 9bfc: e3e06000 mvn r6, #0 <== NOT EXECUTED } 9c00: e1a00006 mov r0, r6 <== NOT EXECUTED 9c04: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00009a80 : void *buffer ) { int err; if (command == FIONBIO) { 9a80: e59f3068 ldr r3, [pc, #104] ; 9af0 <== NOT EXECUTED 9a84: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 9a88: e92d4010 push {r4, lr} <== NOT EXECUTED 9a8c: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 9a90: 1a00000b bne 9ac4 <== NOT EXECUTED if (buffer == NULL) 9a94: e3520000 cmp r2, #0 <== NOT EXECUTED 9a98: 03e0400d mvneq r4, #13 <== NOT EXECUTED 9a9c: 0a00000d beq 9ad8 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 9aa0: e5924000 ldr r4, [r2] <== NOT EXECUTED 9aa4: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 9aa8: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 9aac: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 9ab0: 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; 9ab4: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 9ab8: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 9abc: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 9ac0: ea000008 b 9ae8 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 9ac4: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 9ac8: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 9acc: ebfffb54 bl 8824 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9ad0: e2504000 subs r4, r0, #0 <== NOT EXECUTED 9ad4: aa000003 bge 9ae8 <== NOT EXECUTED 9ad8: eb000e39 bl d3c4 <__errno> <== NOT EXECUTED 9adc: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 9ae0: e5804000 str r4, [r0] <== NOT EXECUTED 9ae4: e3e04000 mvn r4, #0 <== NOT EXECUTED } 9ae8: e1a00004 mov r0, r4 <== NOT EXECUTED 9aec: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00009a38 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 9a38: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 9a3c: e58d0000 str r0, [sp] <== NOT EXECUTED 9a40: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 9a44: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 9a48: ebfffb5b bl 87bc <== NOT EXECUTED 9a4c: e1a03000 mov r3, r0 <== NOT EXECUTED 9a50: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9a54: 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); 9a58: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9a5c: aa000004 bge 9a74 <== NOT EXECUTED 9a60: eb000e57 bl d3c4 <__errno> <== NOT EXECUTED 9a64: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9a68: e5805000 str r5, [r0] <== NOT EXECUTED 9a6c: e3e03000 mvn r3, #0 <== NOT EXECUTED 9a70: e3e04000 mvn r4, #0 <== NOT EXECUTED } 9a74: e1a01004 mov r1, r4 <== NOT EXECUTED 9a78: e1a00003 mov r0, r3 <== NOT EXECUTED 9a7c: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009b48 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9b48: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 9b4c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 9b50: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 9b54: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 9b58: ebfffbad bl 8a14 <== NOT EXECUTED if (err > 0) 9b5c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 9b60: da000005 ble 9b7c <== NOT EXECUTED IMFS_update_atime(jnode); 9b64: e1a0000d mov r0, sp <== NOT EXECUTED 9b68: e3a01000 mov r1, #0 <== NOT EXECUTED 9b6c: ebffe100 bl 1f74 <== NOT EXECUTED 9b70: e59d3000 ldr r3, [sp] <== NOT EXECUTED 9b74: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 9b78: ea000004 b 9b90 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 9b7c: 0a000003 beq 9b90 <== NOT EXECUTED 9b80: eb000e0f bl d3c4 <__errno> <== NOT EXECUTED 9b84: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9b88: e5805000 str r5, [r0] <== NOT EXECUTED 9b8c: e3e05000 mvn r5, #0 <== NOT EXECUTED } 9b90: e1a00005 mov r0, r5 <== NOT EXECUTED 9b94: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009af4 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 9af4: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 9af8: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 9afc: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 9b00: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 9b04: ebfffb5e bl 8884 <== NOT EXECUTED if (err > 0) { 9b08: e2505000 subs r5, r0, #0 <== NOT EXECUTED 9b0c: da000006 ble 9b2c <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 9b10: e1a0000d mov r0, sp <== NOT EXECUTED 9b14: e3a01000 mov r1, #0 <== NOT EXECUTED 9b18: ebffe115 bl 1f74 <== NOT EXECUTED 9b1c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 9b20: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 9b24: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 9b28: ea000004 b 9b40 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 9b2c: 0a000003 beq 9b40 <== NOT EXECUTED 9b30: eb000e23 bl d3c4 <__errno> <== NOT EXECUTED 9b34: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 9b38: e5805000 str r5, [r0] <== NOT EXECUTED 9b3c: e3e05000 mvn r5, #0 <== NOT EXECUTED } 9b40: e1a00005 mov r0, r5 <== NOT EXECUTED 9b44: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009c44 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 9c44: 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; 9c48: e1a0c000 mov ip, r0 9c4c: 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 ) { 9c50: e1a05000 mov r5, r0 9c54: 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; 9c58: e8bc000f ldm ip!, {r0, r1, r2, r3} 9c5c: e1a0e00d mov lr, sp 9c60: e8ae000f stmia lr!, {r0, r1, r2, r3} 9c64: e59c3000 ldr r3, [ip] 9c68: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 9c6c: e3a03000 mov r3, #0 9c70: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 9c74: e1a0500d mov r5, sp 9c78: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 9c7c: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 9c80: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 9c84: ebfffd5f bl 9208 if ( jnode->type != IMFS_DIRECTORY ) { 9c88: e594204c ldr r2, [r4, #76] ; 0x4c 9c8c: e3520001 cmp r2, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 9c90: e2843054 add r3, r4, #84 ; 0x54 9c94: 1a000002 bne 9ca4 9c98: e5942050 ldr r2, [r4, #80] ; 0x50 9c9c: e1520003 cmp r2, r3 9ca0: 1a000005 bne 9cbc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 9ca4: e3a00000 mov r0, #0 9ca8: e1a0100d mov r1, sp 9cac: ebffdf1d bl 1928 if (result != 0) 9cb0: e3500000 cmp r0, #0 9cb4: 1a00000c bne 9cec 9cb8: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { 9cbc: e3540000 cmp r4, #0 9cc0: 0a00000b beq 9cf4 if ( jnode->type == IMFS_DIRECTORY ) { 9cc4: e594304c ldr r3, [r4, #76] ; 0x4c 9cc8: e3530001 cmp r3, #1 9ccc: 1affffe9 bne 9c78 9cd0: e5943050 ldr r3, [r4, #80] ; 0x50 9cd4: e2842054 add r2, r4, #84 ; 0x54 9cd8: e1530002 cmp r3, r2 9cdc: 0affffe5 beq 9c78 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 9ce0: e2534000 subs r4, r3, #0 9ce4: 1affffe3 bne 9c78 9ce8: ea000001 b 9cf4 <== NOT EXECUTED 9cec: e3e00000 mvn r0, #0 <== NOT EXECUTED 9cf0: ea000000 b 9cf8 <== NOT EXECUTED 9cf4: e3a00000 mov r0, #0 return 0; } 9cf8: e28dd014 add sp, sp, #20 9cfc: 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: eb001ebd bl 908c 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: eb002f78 bl d3c4 <__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: eb001c69 bl 87c4 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: eb002f5a bl d3c4 <__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: eb00335b bl e3d8 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: eb0021c7 bl 9da0 * 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: eb001e8b bl 90cc 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: eb002f46 bl d3c4 <__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} =============================================================================== 0000bcbc : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); bcbc: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { bcc0: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); bcc4: 059f0060 ldreq r0, [pc, #96] ; bd2c bcc8: 059f1060 ldreq r1, [pc, #96] ; bd30 bccc: 059f2060 ldreq r2, [pc, #96] ; bd34 bcd0: 059f3060 ldreq r3, [pc, #96] ; bd38 bcd4: 0a000006 beq bcf4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); bcd8: e593304c ldr r3, [r3, #76] ; 0x4c bcdc: e3530005 cmp r3, #5 bce0: 0a000004 beq bcf8 bce4: e59f0040 ldr r0, [pc, #64] ; bd2c <== NOT EXECUTED bce8: e59f104c ldr r1, [pc, #76] ; bd3c <== NOT EXECUTED bcec: e59f2040 ldr r2, [pc, #64] ; bd34 <== NOT EXECUTED bcf0: e59f3048 ldr r3, [pc, #72] ; bd40 <== NOT EXECUTED bcf4: ebfff8c4 bl a00c <__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 ); bcf8: e3a02001 mov r2, #1 bcfc: ebfffeaf bl b7c0 if ( *block_entry_ptr ) bd00: e5904000 ldr r4, [r0] bd04: 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 ); bd08: e1a05000 mov r5, r0 if ( *block_entry_ptr ) bd0c: 13a00000 movne r0, #0 bd10: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); bd14: ebfffe9c bl b78c if ( !memory ) bd18: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; bd1c: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) bd20: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; bd24: 11a00004 movne r0, r4 return 0; } bd28: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000bd44 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { bd44: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); bd48: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { bd4c: e1a05001 mov r5, r1 bd50: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); bd54: 059f0134 ldreq r0, [pc, #308] ; be90 bd58: 059f1134 ldreq r1, [pc, #308] ; be94 bd5c: 059f2134 ldreq r2, [pc, #308] ; be98 bd60: 059f3134 ldreq r3, [pc, #308] ; be9c bd64: 0a000006 beq bd84 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); bd68: e594304c ldr r3, [r4, #76] ; 0x4c bd6c: e3530005 cmp r3, #5 bd70: 0a000004 beq bd88 bd74: e59f0114 ldr r0, [pc, #276] ; be90 <== NOT EXECUTED bd78: e59f1120 ldr r1, [pc, #288] ; bea0 <== NOT EXECUTED bd7c: e59f2114 ldr r2, [pc, #276] ; be98 <== NOT EXECUTED bd80: e59f311c ldr r3, [pc, #284] ; bea4 <== NOT EXECUTED bd84: ebfff8a0 bl a00c <__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 ) bd88: e59f3118 ldr r3, [pc, #280] ; bea8 bd8c: e593b000 ldr fp, [r3] bd90: e1a0312b lsr r3, fp, #2 bd94: e2832001 add r2, r3, #1 bd98: e0010293 mul r1, r3, r2 bd9c: e2811001 add r1, r1, #1 bda0: e0020193 mul r2, r3, r1 bda4: e3a03000 mov r3, #0 bda8: e1530006 cmp r3, r6 bdac: e2422001 sub r2, r2, #1 bdb0: e003029b mul r3, fp, r2 bdb4: ca000005 bgt bdd0 bdb8: 1a000001 bne bdc4 bdbc: e1530005 cmp r3, r5 bdc0: 8a000002 bhi bdd0 rtems_set_errno_and_return_minus_one( EINVAL ); bdc4: eb00057e bl d3c4 <__errno> <== NOT EXECUTED bdc8: e3a03016 mov r3, #22 <== NOT EXECUTED bdcc: ea000025 b be68 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) bdd0: e5948054 ldr r8, [r4, #84] ; 0x54 bdd4: e1560008 cmp r6, r8 bdd8: e5947050 ldr r7, [r4, #80] ; 0x50 bddc: ca000002 bgt bdec bde0: 1a000028 bne be88 bde4: e1550007 cmp r5, r7 bde8: 9a000026 bls be88 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; bdec: e1a0cfcb asr ip, fp, #31 bdf0: e1a0300c mov r3, ip bdf4: e1a0200b mov r2, fp bdf8: e1a00005 mov r0, r5 bdfc: e1a01006 mov r1, r6 be00: e58dc000 str ip, [sp] be04: eb002e39 bl 176f0 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; be08: e59dc000 ldr ip, [sp] be0c: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; be10: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; be14: e1a0200b mov r2, fp be18: e1a00007 mov r0, r7 be1c: e1a0300c mov r3, ip be20: eb002e32 bl 176f0 <__divdi3> be24: e1a08000 mov r8, r0 be28: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { be2c: ea000011 b be78 if ( IMFS_memfile_addblock( the_jnode, block ) ) { be30: e1a00004 mov r0, r4 be34: e1a01007 mov r1, r7 be38: ebffff9f bl bcbc be3c: e3500000 cmp r0, #0 be40: 0a00000b beq be74 be44: ea000003 b be58 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); be48: e1a01007 mov r1, r7 <== NOT EXECUTED be4c: e1a00004 mov r0, r4 <== NOT EXECUTED be50: ebfffefa bl ba40 <== 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-- ) { be54: e2477001 sub r7, r7, #1 <== NOT EXECUTED be58: e1570008 cmp r7, r8 <== NOT EXECUTED be5c: 2afffff9 bcs be48 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); be60: eb000557 bl d3c4 <__errno> <== NOT EXECUTED be64: e3a0301c mov r3, #28 <== NOT EXECUTED be68: e5803000 str r3, [r0] <== NOT EXECUTED be6c: e3e00000 mvn r0, #0 <== NOT EXECUTED be70: ea000005 b be8c <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { be74: e2877001 add r7, r7, #1 be78: e157000a cmp r7, sl be7c: 9affffeb bls be30 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; be80: e5846054 str r6, [r4, #84] ; 0x54 be84: e5845050 str r5, [r4, #80] ; 0x50 be88: e3a00000 mov r0, #0 return 0; } be8c: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== 0000b7c0 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { b7c0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); b7c4: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { b7c8: e1a06001 mov r6, r1 b7cc: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); b7d0: 059f01d8 ldreq r0, [pc, #472] ; b9b0 b7d4: 03a01fe2 moveq r1, #904 ; 0x388 b7d8: 059f21d4 ldreq r2, [pc, #468] ; b9b4 b7dc: 059f31d4 ldreq r3, [pc, #468] ; b9b8 b7e0: 0a000006 beq b800 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); b7e4: e594304c ldr r3, [r4, #76] ; 0x4c b7e8: e3530005 cmp r3, #5 b7ec: 0a000004 beq b804 b7f0: e59f01b8 ldr r0, [pc, #440] ; b9b0 <== NOT EXECUTED b7f4: e59f21b8 ldr r2, [pc, #440] ; b9b4 <== NOT EXECUTED b7f8: e59f31bc ldr r3, [pc, #444] ; b9bc <== NOT EXECUTED b7fc: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED b800: ebfffa01 bl a00c <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { b804: e59f31b4 ldr r3, [pc, #436] ; b9c0 b808: e5935000 ldr r5, [r3] b80c: e1a05125 lsr r5, r5, #2 b810: e2453001 sub r3, r5, #1 b814: e1510003 cmp r1, r3 b818: 8a00000e bhi b858 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { b81c: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; b820: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { b824: 0a000007 beq b848 if ( !p ) { b828: e3500000 cmp r0, #0 b82c: 1a000003 bne b840 p = memfile_alloc_block(); b830: ebffffd5 bl b78c if ( !p ) b834: e3500000 cmp r0, #0 b838: 0a00005a beq b9a8 return 0; info->indirect = p; b83c: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; b840: e5940058 ldr r0, [r4, #88] ; 0x58 b844: ea000001 b b850 } if ( !p ) b848: e3500000 cmp r0, #0 b84c: 0a000055 beq b9a8 return 0; return &info->indirect[ my_block ]; b850: e0800106 add r0, r0, r6, lsl #2 b854: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { b858: e2852001 add r2, r5, #1 <== NOT EXECUTED b85c: e0030295 mul r3, r5, r2 <== NOT EXECUTED b860: e2432001 sub r2, r3, #1 <== NOT EXECUTED b864: e1510002 cmp r1, r2 <== NOT EXECUTED b868: 8a000015 bhi b8c4 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; b86c: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; b870: e1a00006 mov r0, r6 <== NOT EXECUTED b874: e1a01005 mov r1, r5 <== NOT EXECUTED b878: eb002cef bl 16c3c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b87c: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; b880: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b884: e1a00006 mov r0, r6 <== NOT EXECUTED b888: eb002c57 bl 169ec <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { b88c: 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; b890: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; b894: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { b898: 0a00003b beq b98c <== NOT EXECUTED if ( !p ) { b89c: e3530000 cmp r3, #0 <== NOT EXECUTED b8a0: 1a000003 bne b8b4 <== NOT EXECUTED p = memfile_alloc_block(); b8a4: ebffffb8 bl b78c <== NOT EXECUTED if ( !p ) b8a8: e2503000 subs r3, r0, #0 <== NOT EXECUTED b8ac: 0a00003d beq b9a8 <== NOT EXECUTED return 0; info->doubly_indirect = p; b8b0: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; b8b4: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED b8b8: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { b8bc: e3500000 cmp r0, #0 <== NOT EXECUTED b8c0: ea000028 b b968 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { b8c4: e2831001 add r1, r3, #1 <== NOT EXECUTED b8c8: e0020195 mul r2, r5, r1 <== NOT EXECUTED b8cc: e2422001 sub r2, r2, #1 <== NOT EXECUTED b8d0: e1560002 cmp r6, r2 <== NOT EXECUTED b8d4: 8a000033 bhi b9a8 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; b8d8: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; b8dc: e1a01005 mov r1, r5 <== NOT EXECUTED b8e0: e1a00006 mov r0, r6 <== NOT EXECUTED b8e4: eb002cd4 bl 16c3c <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b8e8: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; b8ec: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; b8f0: e1a00006 mov r0, r6 <== NOT EXECUTED b8f4: eb002c3c bl 169ec <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; b8f8: 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; b8fc: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; b900: eb002c39 bl 169ec <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; b904: 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; b908: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; b90c: e1a00006 mov r0, r6 <== NOT EXECUTED b910: eb002cc9 bl 16c3c <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { b914: 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; b918: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; b91c: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { b920: 0a000016 beq b980 <== NOT EXECUTED if ( !p ) { b924: e3530000 cmp r3, #0 <== NOT EXECUTED b928: 1a000003 bne b93c <== NOT EXECUTED p = memfile_alloc_block(); b92c: ebffff96 bl b78c <== NOT EXECUTED if ( !p ) b930: e2503000 subs r3, r0, #0 <== NOT EXECUTED b934: 0a00001b beq b9a8 <== NOT EXECUTED return 0; info->triply_indirect = p; b938: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; b93c: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { b940: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; b944: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { b948: 1a000003 bne b95c <== NOT EXECUTED p1 = memfile_alloc_block(); b94c: ebffff8e bl b78c <== NOT EXECUTED if ( !p1 ) b950: e2502000 subs r2, r0, #0 <== NOT EXECUTED b954: 0a000013 beq b9a8 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; b958: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; b95c: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED b960: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { b964: e3500000 cmp r0, #0 <== NOT EXECUTED b968: 1a00000c bne b9a0 <== NOT EXECUTED p2 = memfile_alloc_block(); b96c: ebffff86 bl b78c <== NOT EXECUTED if ( !p2 ) b970: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; b974: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) b978: 1a000008 bne b9a0 <== NOT EXECUTED b97c: ea000009 b b9a8 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) b980: e3530000 cmp r3, #0 <== NOT EXECUTED b984: 0a000007 beq b9a8 <== 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 ]; b988: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) b98c: e3530000 cmp r3, #0 <== NOT EXECUTED b990: 0a000004 beq b9a8 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; b994: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED if ( !p2 ) b998: e3500000 cmp r0, #0 <== NOT EXECUTED b99c: 0a000001 beq b9a8 <== NOT EXECUTED return 0; return (block_p *)&p2[ singly ]; b9a0: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED b9a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED b9a8: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } b9ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 0000c2cc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { c2cc: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); c2d0: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { c2d4: e1a06003 mov r6, r3 c2d8: e1a08001 mov r8, r1 c2dc: e1a09002 mov r9, r2 c2e0: e59d7030 ldr r7, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); c2e4: 059f024c ldreq r0, [pc, #588] ; c538 c2e8: 03a01f93 moveq r1, #588 ; 0x24c c2ec: 059f2248 ldreq r2, [pc, #584] ; c53c c2f0: 059f3248 ldreq r3, [pc, #584] ; c540 c2f4: 0a000007 beq c318 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || c2f8: e594304c ldr r3, [r4, #76] ; 0x4c c2fc: e2432005 sub r2, r3, #5 c300: e3520001 cmp r2, #1 c304: 9a000004 bls c31c c308: e59f0228 ldr r0, [pc, #552] ; c538 <== NOT EXECUTED c30c: e59f1230 ldr r1, [pc, #560] ; c544 <== NOT EXECUTED c310: e59f2224 ldr r2, [pc, #548] ; c53c <== NOT EXECUTED c314: e59f322c ldr r3, [pc, #556] ; c548 <== NOT EXECUTED c318: ebfff73b bl a00c <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); c31c: e3560000 cmp r6, #0 c320: 059f0210 ldreq r0, [pc, #528] ; c538 c324: 059f1220 ldreq r1, [pc, #544] ; c54c c328: 059f220c ldreq r2, [pc, #524] ; c53c c32c: 059f321c ldreq r3, [pc, #540] ; c550 c330: 0afffff8 beq c318 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) c334: e3570000 cmp r7, #0 c338: 1a000004 bne c350 rtems_set_errno_and_return_minus_one( EINVAL ); c33c: eb000420 bl d3c4 <__errno> <== NOT EXECUTED c340: e3a03016 mov r3, #22 <== NOT EXECUTED c344: e5803000 str r3, [r0] <== NOT EXECUTED c348: e3e07000 mvn r7, #0 <== NOT EXECUTED c34c: ea000077 b c530 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { c350: e3530006 cmp r3, #6 c354: 1a000012 bne c3a4 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) c358: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED c35c: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED c360: e1a0200a mov r2, sl <== NOT EXECUTED c364: e1a0300b mov r3, fp <== NOT EXECUTED c368: e3a01000 mov r1, #0 <== NOT EXECUTED c36c: e0522008 subs r2, r2, r8 <== NOT EXECUTED c370: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED c374: e1510003 cmp r1, r3 <== 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; c378: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) c37c: ca000002 bgt c38c <== NOT EXECUTED c380: 1a000002 bne c390 <== NOT EXECUTED c384: e1570002 cmp r7, r2 <== NOT EXECUTED c388: 9a000000 bls c390 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; c38c: e068700a rsb r7, r8, sl <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); c390: e0811008 add r1, r1, r8 <== NOT EXECUTED c394: e1a00006 mov r0, r6 <== NOT EXECUTED c398: e1a02007 mov r2, r7 <== NOT EXECUTED c39c: eb000616 bl dbfc <== NOT EXECUTED c3a0: ea00005d b c51c <== 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 ) c3a4: e5943054 ldr r3, [r4, #84] ; 0x54 c3a8: e3a02000 mov r2, #0 c3ac: e1520003 cmp r2, r3 c3b0: 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; c3b4: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) c3b8: e0872001 add r2, r7, r1 c3bc: ca000004 bgt c3d4 c3c0: 1a000001 bne c3cc c3c4: e1520005 cmp r2, r5 c3c8: 8a000001 bhi c3d4 c3cc: e1a05007 mov r5, r7 c3d0: ea000000 b c3d8 my_length = the_jnode->info.file.size - start; c3d4: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; c3d8: e59f3174 ldr r3, [pc, #372] ; c554 c3dc: e593a000 ldr sl, [r3] c3e0: e1a0b00a mov fp, sl c3e4: e1a0cfcb asr ip, fp, #31 c3e8: e1a0300c mov r3, ip c3ec: e1a00008 mov r0, r8 c3f0: e1a0200b mov r2, fp c3f4: e1a01009 mov r1, r9 c3f8: e58dc000 str ip, [sp] c3fc: eb002de5 bl 17b98 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; c400: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; c404: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; c408: e1a01009 mov r1, r9 c40c: e1a00008 mov r0, r8 c410: e1a0200b mov r2, fp c414: e1a0300c mov r3, ip c418: eb002cb4 bl 176f0 <__divdi3> if ( start_offset ) { c41c: 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; c420: e1a08000 mov r8, r0 if ( start_offset ) { c424: 0a000013 beq c478 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 ); c428: e1a00004 mov r0, r4 c42c: e1a01008 mov r1, r8 c430: e3a02000 mov r2, #0 c434: ebfffce1 bl b7c0 assert( block_ptr ); c438: e3500000 cmp r0, #0 c43c: 059f00f4 ldreq r0, [pc, #244] ; c538 c440: 059f1110 ldreq r1, [pc, #272] ; c558 c444: 0a00002c beq c4fc if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); c448: 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; c44c: e067a00a rsb sl, r7, sl c450: e155000a cmp r5, sl c454: 31a0a005 movcc sl, 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 ); c458: e0811007 add r1, r1, r7 c45c: e1a00006 mov r0, r6 c460: e1a0200a mov r2, sl c464: eb0005e4 bl dbfc dest += to_copy; c468: e086600a add r6, r6, sl block++; c46c: e2888001 add r8, r8, #1 my_length -= to_copy; c470: e06a5005 rsb r5, sl, r5 c474: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; c478: e59f30d4 ldr r3, [pc, #212] ; c554 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { c47c: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; c480: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { c484: ea00000f b c4c8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); c488: e1a00004 mov r0, r4 c48c: e1a01008 mov r1, r8 c490: e3a02000 mov r2, #0 c494: ebfffcc9 bl b7c0 assert( block_ptr ); c498: e3500000 cmp r0, #0 c49c: 059f0094 ldreq r0, [pc, #148] ; c538 c4a0: 059f10b4 ldreq r1, [pc, #180] ; c55c c4a4: 0a000014 beq c4fc if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); c4a8: e5901000 ldr r1, [r0] c4ac: e1a0200a mov r2, sl c4b0: e1a00006 mov r0, r6 c4b4: eb0005d0 bl dbfc dest += to_copy; c4b8: e086600a add r6, r6, sl block++; c4bc: e2888001 add r8, r8, #1 my_length -= to_copy; c4c0: e06a5005 rsb r5, sl, r5 copied += to_copy; c4c4: 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 ) { c4c8: e5993000 ldr r3, [r9] c4cc: e1550003 cmp r5, r3 c4d0: 2affffec bcs c488 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { c4d4: e3550000 cmp r5, #0 c4d8: 0a00000f beq c51c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); c4dc: e1a01008 mov r1, r8 c4e0: e1a00004 mov r0, r4 c4e4: e3a02000 mov r2, #0 c4e8: ebfffcb4 bl b7c0 assert( block_ptr ); c4ec: e2503000 subs r3, r0, #0 c4f0: 1a000004 bne c508 c4f4: e59f003c ldr r0, [pc, #60] ; c538 <== NOT EXECUTED c4f8: e59f1060 ldr r1, [pc, #96] ; c560 <== NOT EXECUTED c4fc: e59f2038 ldr r2, [pc, #56] ; c53c <== NOT EXECUTED c500: e59f305c ldr r3, [pc, #92] ; c564 <== NOT EXECUTED c504: eaffff83 b c318 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); c508: e1a00006 mov r0, r6 c50c: e5931000 ldr r1, [r3] c510: e1a02005 mov r2, r5 c514: eb0005b8 bl dbfc copied += my_length; c518: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); c51c: e28d0004 add r0, sp, #4 c520: e3a01000 mov r1, #0 c524: ebffd692 bl 1f74 c528: e59d3004 ldr r3, [sp, #4] c52c: e5843040 str r3, [r4, #64] ; 0x40 return copied; } c530: e1a00007 mov r0, r7 c534: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000ba8c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ba8c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ba90: e2504000 subs r4, r0, #0 ba94: 059f012c ldreq r0, [pc, #300] ; bbc8 ba98: 059f112c ldreq r1, [pc, #300] ; bbcc ba9c: 059f212c ldreq r2, [pc, #300] ; bbd0 baa0: 059f312c ldreq r3, [pc, #300] ; bbd4 baa4: 0a000006 beq bac4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); baa8: e594304c ldr r3, [r4, #76] ; 0x4c baac: e3530005 cmp r3, #5 bab0: 0a000004 beq bac8 bab4: e59f010c ldr r0, [pc, #268] ; bbc8 <== NOT EXECUTED bab8: e59f1118 ldr r1, [pc, #280] ; bbd8 <== NOT EXECUTED babc: e59f210c ldr r2, [pc, #268] ; bbd0 <== NOT EXECUTED bac0: e59f3114 ldr r3, [pc, #276] ; bbdc <== NOT EXECUTED bac4: ebfff950 bl a00c <__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; bac8: e59f2110 ldr r2, [pc, #272] ; bbe0 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; bacc: 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; bad0: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; bad4: 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; bad8: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); badc: 12840058 addne r0, r4, #88 ; 0x58 bae0: 11a01005 movne r1, r5 bae4: 1bffffb6 blne b9c4 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; bae8: e594305c ldr r3, [r4, #92] ; 0x5c baec: e3530000 cmp r3, #0 baf0: 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; baf8: 1a000008 bne bb20 bafc: ea00000d b bb38 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { bb00: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED bb04: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED bb08: e3520000 cmp r2, #0 <== NOT EXECUTED bb0c: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( bb10: 10830000 addne r0, r3, r0 <== NOT EXECUTED bb14: 11a01005 movne r1, r5 <== NOT EXECUTED bb18: 1bffffa9 blne b9c4 <== 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 ); bb2c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED bb30: e1a01005 mov r1, r5 <== NOT EXECUTED bb34: ebffffa2 bl b9c4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; bb38: e5943060 ldr r3, [r4, #96] ; 0x60 bb3c: e3530000 cmp r3, #0 bb40: 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; bb48: 1a000016 bne bba8 bb4c: ea00001b b bbc0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; bb50: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED bb54: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ bb58: e3570000 cmp r7, #0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; bb5c: 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 */ bb60: 0a000013 beq bbb4 <== NOT EXECUTED bb64: e3a08000 mov r8, #0 <== NOT EXECUTED bb68: ea000006 b bb88 <== 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( bb94: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED bb98: e1a01005 mov r1, r5 <== NOT EXECUTED bb9c: e0800009 add r0, r0, r9 <== NOT EXECUTED bba0: ebffff87 bl b9c4 <== 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( bbb4: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED bbb8: e1a01005 mov r1, r5 <== NOT EXECUTED bbbc: ebffff80 bl b9c4 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } bbc0: e3a00000 mov r0, #0 bbc4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 0000ba40 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ba40: 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 ); ba44: e3a02000 mov r2, #0 <== NOT EXECUTED ba48: ebffff5c bl b7c0 <== NOT EXECUTED assert( block_ptr ); ba4c: e2503000 subs r3, r0, #0 <== NOT EXECUTED ba50: 059f0024 ldreq r0, [pc, #36] ; ba7c <== NOT EXECUTED ba54: 059f1024 ldreq r1, [pc, #36] ; ba80 <== NOT EXECUTED ba58: 059f2024 ldreq r2, [pc, #36] ; ba84 <== NOT EXECUTED ba5c: 059f3024 ldreq r3, [pc, #36] ; ba88 <== NOT EXECUTED ba60: 0bfff969 bleq a00c <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; ba64: 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; ba68: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; ba6c: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); ba70: ebffff3d bl b76c <== NOT EXECUTED } return 1; } ba74: e3a00001 mov r0, #1 <== NOT EXECUTED ba78: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 0000bf9c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { bf9c: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); bfa0: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { bfa4: e1a08001 mov r8, r1 bfa8: e1a0a002 mov sl, r2 bfac: e1a06003 mov r6, r3 bfb0: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); bfb4: 059f0204 ldreq r0, [pc, #516] ; c1c0 bfb8: 059f1204 ldreq r1, [pc, #516] ; c1c4 bfbc: 059f2204 ldreq r2, [pc, #516] ; c1c8 bfc0: 059f3204 ldreq r3, [pc, #516] ; c1cc bfc4: 0a000006 beq bfe4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); bfc8: e594304c ldr r3, [r4, #76] ; 0x4c bfcc: e3530005 cmp r3, #5 bfd0: 0a000004 beq bfe8 bfd4: e59f01e4 ldr r0, [pc, #484] ; c1c0 <== NOT EXECUTED bfd8: e59f11f0 ldr r1, [pc, #496] ; c1d0 <== NOT EXECUTED bfdc: e59f21e4 ldr r2, [pc, #484] ; c1c8 <== NOT EXECUTED bfe0: e59f31ec ldr r3, [pc, #492] ; c1d4 <== NOT EXECUTED bfe4: ebfff808 bl a00c <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); bfe8: e3560000 cmp r6, #0 bfec: 059f01cc ldreq r0, [pc, #460] ; c1c0 bff0: 059f11e0 ldreq r1, [pc, #480] ; c1d8 bff4: 059f21cc ldreq r2, [pc, #460] ; c1c8 bff8: 059f31dc ldreq r3, [pc, #476] ; c1dc bffc: 0afffff8 beq bfe4 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) c000: e3550000 cmp r5, #0 c004: 1a000002 bne c014 rtems_set_errno_and_return_minus_one( EINVAL ); c008: eb0004ed bl d3c4 <__errno> <== NOT EXECUTED c00c: e3a03016 mov r3, #22 <== NOT EXECUTED c010: ea00000e b c050 <== 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 ) { c014: e5943054 ldr r3, [r4, #84] ; 0x54 c018: e3530000 cmp r3, #0 c01c: e0851001 add r1, r5, r1 c020: ba000003 blt c034 c024: 1a00000c bne c05c c028: e5943050 ldr r3, [r4, #80] ; 0x50 c02c: e1530001 cmp r3, r1 c030: 2a000009 bcs c05c status = IMFS_memfile_extend( the_jnode, last_byte ); c034: e1a00004 mov r0, r4 c038: e3a02000 mov r2, #0 c03c: ebffff40 bl bd44 if ( status ) c040: e3500000 cmp r0, #0 c044: 0a000004 beq c05c rtems_set_errno_and_return_minus_one( ENOSPC ); c048: eb0004dd bl d3c4 <__errno> <== NOT EXECUTED c04c: e3a0301c mov r3, #28 <== NOT EXECUTED c050: e5803000 str r3, [r0] <== NOT EXECUTED c054: e3e07000 mvn r7, #0 <== NOT EXECUTED c058: ea000056 b c1b8 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; c05c: e59f317c ldr r3, [pc, #380] ; c1e0 c060: e5939000 ldr r9, [r3] c064: e1a0b009 mov fp, r9 c068: e1a0cfcb asr ip, fp, #31 c06c: e1a0300c mov r3, ip c070: e1a00008 mov r0, r8 c074: e1a0200b mov r2, fp c078: e1a0100a mov r1, sl c07c: e58dc000 str ip, [sp] c080: eb002ec4 bl 17b98 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; c084: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; c088: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; c08c: e1a0100a mov r1, sl c090: e1a00008 mov r0, r8 c094: e1a0200b mov r2, fp c098: e1a0300c mov r3, ip c09c: eb002d93 bl 176f0 <__divdi3> if ( start_offset ) { c0a0: 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; c0a4: e1a08000 mov r8, r0 if ( start_offset ) { c0a8: 0a000013 beq c0fc 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 ); c0ac: e1a01008 mov r1, r8 c0b0: e1a00004 mov r0, r4 c0b4: e3a02000 mov r2, #0 c0b8: ebfffdc0 bl b7c0 assert( block_ptr ); c0bc: e3500000 cmp r0, #0 c0c0: 059f00f8 ldreq r0, [pc, #248] ; c1c0 c0c4: 03a01fc7 moveq r1, #796 ; 0x31c c0c8: 0a00002c beq c180 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 ); c0cc: 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; c0d0: e067a009 rsb sl, r7, r9 c0d4: e15a0005 cmp sl, r5 c0d8: 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 ); c0dc: e0800007 add r0, r0, r7 c0e0: e1a01006 mov r1, r6 c0e4: e1a0200a mov r2, sl c0e8: eb0006c3 bl dbfc src += to_copy; c0ec: e086600a add r6, r6, sl block++; c0f0: e2888001 add r8, r8, #1 my_length -= to_copy; c0f4: e06a5005 rsb r5, sl, r5 copied += to_copy; c0f8: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; c0fc: e59f30dc ldr r3, [pc, #220] ; c1e0 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { c100: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; c104: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { c108: ea00000f b c14c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); c10c: e1a00004 mov r0, r4 c110: e1a01008 mov r1, r8 c114: e3a02000 mov r2, #0 c118: ebfffda8 bl b7c0 assert( block_ptr ); c11c: e3500000 cmp r0, #0 c120: 059f0098 ldreq r0, [pc, #152] ; c1c0 c124: 03a01e33 moveq r1, #816 ; 0x330 c128: 0a000014 beq c180 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 ); c12c: e1a01006 mov r1, r6 c130: e5900000 ldr r0, [r0] c134: e1a0200a mov r2, sl c138: eb0006af bl dbfc src += to_copy; c13c: e086600a add r6, r6, sl block++; c140: e2888001 add r8, r8, #1 my_length -= to_copy; c144: 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( c148: 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 ) { c14c: e5993000 ldr r3, [r9] c150: e1550003 cmp r5, r3 c154: 2affffec bcs c10c */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { c158: e3550000 cmp r5, #0 c15c: 0a00000f beq c1a0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); c160: e1a01008 mov r1, r8 c164: e1a00004 mov r0, r4 c168: e3a02000 mov r2, #0 c16c: ebfffd93 bl b7c0 assert( block_ptr ); c170: e3500000 cmp r0, #0 c174: 1a000004 bne c18c c178: e59f0040 ldr r0, [pc, #64] ; c1c0 <== NOT EXECUTED c17c: e59f1060 ldr r1, [pc, #96] ; c1e4 <== NOT EXECUTED c180: e59f2040 ldr r2, [pc, #64] ; c1c8 <== NOT EXECUTED c184: e59f305c ldr r3, [pc, #92] ; c1e8 <== NOT EXECUTED c188: eaffff95 b bfe4 <== 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 ); c18c: e5900000 ldr r0, [r0] c190: e1a01006 mov r1, r6 c194: e1a02005 mov r2, r5 c198: eb000697 bl dbfc my_length = 0; copied += to_copy; c19c: e0877005 add r7, r7, r5 } IMFS_mtime_ctime_update( the_jnode ); c1a0: e28d0004 add r0, sp, #4 c1a4: e3a01000 mov r1, #0 c1a8: ebffd771 bl 1f74 c1ac: e59d3004 ldr r3, [sp, #4] c1b0: e5843048 str r3, [r4, #72] ; 0x48 c1b4: e5843044 str r3, [r4, #68] ; 0x44 return copied; } c1b8: e1a00007 mov r0, r7 c1bc: 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: eb003332 bl e3d8 170c: e28d303c add r3, sp, #60 ; 0x3c 1710: e1a01000 mov r1, r0 1714: e28d2004 add r2, sp, #4 1718: e1a00007 mov r0, r7 171c: eb00219f bl 9da0 /* * 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: eb002f18 bl d3c4 <__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: eb001e51 bl 90cc 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: eb002f0b bl d3c4 <__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: eb002f00 bl d3c4 <__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: eb003745 bl 11a08 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: eb0036f0 bl 118f4 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: eb0036c8 bl 11884 (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: eb0036c2 bl 11884 (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: eb00371e bl 11a08 <== 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: eb003715 bl 11a08 <== 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: eb00370e bl 11a08 <== 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: eb0036a6 bl 11884 <== 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: ea003dcf b 13540 =============================================================================== 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: eb002eef bl d3c4 <__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) =============================================================================== 00009f1c : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 9f1c: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 9f20: e593204c ldr r2, [r3, #76] ; 0x4c 9f24: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 9f28: e92d4810 push {r4, fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 9f2c: e3520005 cmp r2, #5 9f30: 979ff102 ldrls pc, [pc, r2, lsl #2] 9f34: ea000012 b 9f84 <== NOT EXECUTED 9f38: 00009f50 .word 0x00009f50 <== NOT EXECUTED 9f3c: 00009f84 .word 0x00009f84 <== NOT EXECUTED 9f40: 00009f70 .word 0x00009f70 <== NOT EXECUTED 9f44: 00009f64 .word 0x00009f64 <== NOT EXECUTED 9f48: 00009f64 .word 0x00009f64 <== NOT EXECUTED 9f4c: 00009f70 .word 0x00009f70 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 9f50: e2832050 add r2, r3, #80 ; 0x50 9f54: e8921004 ldm r2, {r2, ip} 9f58: e581c01c str ip, [r1, #28] 9f5c: e5812018 str r2, [r1, #24] break; 9f60: ea00000c b 9f98 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 9f64: e283c050 add ip, r3, #80 ; 0x50 9f68: e89c1800 ldm ip, {fp, ip} 9f6c: ea000001 b 9f78 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 9f70: e3a0b000 mov fp, #0 <== NOT EXECUTED 9f74: e3a0c000 mov ip, #0 <== NOT EXECUTED 9f78: e581b020 str fp, [r1, #32] 9f7c: e581c024 str ip, [r1, #36] ; 0x24 break; 9f80: ea000004 b 9f98 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 9f84: eb000d0e bl d3c4 <__errno> <== NOT EXECUTED 9f88: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9f8c: e5803000 str r3, [r0] <== NOT EXECUTED 9f90: e3e00000 mvn r0, #0 <== NOT EXECUTED 9f94: 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; 9f98: e5932030 ldr r2, [r3, #48] ; 0x30 9f9c: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 9fa0: e5932038 ldr r2, [r3, #56] ; 0x38 9fa4: 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; 9fa8: e5932040 ldr r2, [r3, #64] ; 0x40 9fac: 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 ); 9fb0: 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; 9fb4: 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; 9fb8: 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; 9fbc: 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; 9fc0: 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 ); 9fc4: 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; 9fc8: e5932048 ldr r2, [r3, #72] ; 0x48 buf->st_blksize = imfs_rq_memfile_bytes_per_block; 9fcc: e59fc030 ldr ip, [pc, #48] ; a004 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; 9fd0: 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; 9fd4: 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; 9fd8: 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; 9fdc: 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 ); 9fe0: 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; 9fe4: 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; 9fe8: 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 = 9fec: e59fc014 ldr ip, [pc, #20] ; a008 9ff0: e5810004 str r0, [r1, #4] 9ff4: 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; 9ff8: 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; 9ffc: e3a00000 mov r0, #0 return 0; } a000: 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: eb0032c9 bl e3d8 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: eb002135 bl 9da0 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 18c8: e1a00006 mov r0, r6 18cc: eb0032ad bl e388 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: eb001df4 bl 90cc 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: eb002eac bl d3c4 <__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: eb002e9a bl d3c4 <__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: eb001e1e bl 9208 /* * 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: eb002e6b bl d3c4 <__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: eb002e65 bl d3c4 <__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: 1b002ed5 blne dcec * 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: eb000f71 bl 5f84 <_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: 0b000d77 bleq 57a8 } } 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: eb001240 bl 6ae0 <_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: 159a60f0 ldrne r6, [sl, #240] ; 0xf0 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 5c20: 128a40c0 addne r4, sl, #192 ; 0xc0 <== 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 =============================================================================== 0003c678 : return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c678: 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; 3c67c: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c680: e24dd01c sub sp, sp, #28 <== NOT EXECUTED 3c684: e58d1008 str r1, [sp, #8] <== NOT EXECUTED rtems_rfs_bitmap_element* map_bits; int map_index; int map_offset; int rc; *found = false; 3c688: e5c26000 strb r6, [r2] <== NOT EXECUTED /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 3c68c: e28d1018 add r1, sp, #24 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c690: e58d200c str r2, [sp, #12] <== NOT EXECUTED 3c694: e1a04003 mov r4, r3 <== NOT EXECUTED 3c698: e1a05000 mov r5, r0 <== NOT EXECUTED *found = false; /* * Load the bitmap. */ rc = rtems_rfs_bitmap_load_map (control, &map); 3c69c: ebffff07 bl 3c2c0 <== NOT EXECUTED if (rc > 0) 3c6a0: e3500000 cmp r0, #0 <== NOT EXECUTED 3c6a4: ca000075 bgt 3c880 <== NOT EXECUTED return rc; /* * Calculate the bit we are testing plus the end point we search over. */ test_bit = *bit; 3c6a8: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED 3c6ac: e5903000 ldr r3, [r0] <== NOT EXECUTED end_bit = test_bit + (window * direction); if (end_bit < 0) 3c6b0: e093c584 adds ip, r3, r4, lsl #11 <== NOT EXECUTED 3c6b4: 41a0c006 movmi ip, r6 <== NOT EXECUTED 3c6b8: 4a000002 bmi 3c6c8 <== NOT EXECUTED end_bit = 0; else if (end_bit >= control->size) 3c6bc: e595200c ldr r2, [r5, #12] <== NOT EXECUTED 3c6c0: e15c0002 cmp ip, r2 <== NOT EXECUTED end_bit = control->size - 1; 3c6c4: 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]; 3c6c8: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED map_bits = &map[map_index]; 3c6cc: e59d7018 ldr r7, [sp, #24] <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3c6d0: e1a09104 lsl r9, r4, #2 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c6d4: 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)) 3c6d8: 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); 3c6dc: 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]; 3c6e0: e1a08543 asr r8, r3, #10 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3c6e4: e58d9004 str r9, [sp, #4] <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c6e8: 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)) 3c6ec: 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]; 3c6f0: e0828108 add r8, r2, r8, lsl #2 <== NOT EXECUTED map_bits = &map[map_index]; 3c6f4: 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); 3c6f8: 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); 3c6fc: 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)) 3c700: 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)) 3c704: e5980000 ldr r0, [r8] <== NOT EXECUTED 3c708: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c70c: 10865004 addne r5, r6, r4 <== NOT EXECUTED 3c710: 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)) 3c714: 1a000038 bne 3c7fc <== NOT EXECUTED 3c718: ea00003a b 3c808 <== 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); 3c71c: e3a09001 mov r9, #1 <== NOT EXECUTED 3c720: 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)) 3c724: 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); 3c728: 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)) 3c72c: 1a00001d bne 3c7a8 <== NOT EXECUTED 3c730: ea00001e b 3c7b0 <== 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); 3c734: e3a0b001 mov fp, #1 <== NOT EXECUTED 3c738: 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)) 3c73c: e597b000 ldr fp, [r7] <== NOT EXECUTED 3c740: e119000b tst r9, fp <== NOT EXECUTED 3c744: 0a000013 beq 3c798 <== 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); 3c748: 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); 3c74c: e5879000 str r9, [r7] <== NOT EXECUTED if (rtems_rfs_bitmap_match(*map_bits, 3c750: e3590000 cmp r9, #0 <== NOT EXECUTED RTEMS_RFS_BITMAP_ELEMENT_SET)) *search_bits = rtems_rfs_bitmap_set (*search_bits, 3c754: 05982000 ldreq r2, [r8] <== NOT EXECUTED 3c758: 059d0000 ldreq r0, [sp] <== NOT EXECUTED 3c75c: 01c22000 biceq r2, r2, r0 <== NOT EXECUTED 3c760: 05882000 streq r2, [r8] <== NOT EXECUTED 1 << search_offset); control->free--; 3c764: e59a0010 ldr r0, [sl, #16] <== NOT EXECUTED *bit = test_bit; *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 3c768: 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; 3c76c: e28d9008 add r9, sp, #8 <== NOT EXECUTED 3c770: 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--; 3c774: e2400001 sub r0, r0, #1 <== NOT EXECUTED *bit = test_bit; *found = true; 3c778: 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--; 3c77c: e58a0010 str r0, [sl, #16] <== NOT EXECUTED *bit = test_bit; *found = true; 3c780: e5cb2000 strb r2, [fp] <== NOT EXECUTED 3c784: 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; 3c788: e5893000 str r3, [r9] <== NOT EXECUTED *found = true; rtems_rfs_buffer_mark_dirty (control->buffer); 3c78c: e5c12000 strb r2, [r1] <== NOT EXECUTED 3c790: e3a00000 mov r0, #0 <== NOT EXECUTED 3c794: ea000039 b 3c880 <== NOT EXECUTED return 0; } if (test_bit == end_bit) 3c798: e153000c cmp r3, ip <== NOT EXECUTED 3c79c: 0a000003 beq 3c7b0 <== NOT EXECUTED 3c7a0: e0811004 add r1, r1, r4 <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c7a4: 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) 3c7a8: e351001f cmp r1, #31 <== NOT EXECUTED 3c7ac: 9affffe0 bls 3c734 <== NOT EXECUTED } } map_bits += direction; map_index += direction; map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1; 3c7b0: e3540000 cmp r4, #0 <== NOT EXECUTED 3c7b4: d3a0101f movle r1, #31 <== NOT EXECUTED 3c7b8: 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)) 3c7bc: 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; 3c7c0: e0813005 add r3, r1, r5 <== NOT EXECUTED search_offset += direction; if (((direction < 0) && (test_bit <= end_bit)) 3c7c4: e153000c cmp r3, ip <== NOT EXECUTED 3c7c8: c3a09000 movgt r9, #0 <== NOT EXECUTED 3c7cc: d2099001 andle r9, r9, #1 <== NOT EXECUTED 3c7d0: e3590000 cmp r9, #0 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3c7d4: e59d9004 ldr r9, [sp, #4] <== NOT EXECUTED return 0; } static int rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control, 3c7d8: e0866004 add r6, r6, r4 <== NOT EXECUTED map_offset += direction; test_bit += direction; } } map_bits += direction; 3c7dc: 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)) 3c7e0: 1a000014 bne 3c838 <== NOT EXECUTED 3c7e4: e59db014 ldr fp, [sp, #20] <== NOT EXECUTED 3c7e8: e153000c cmp r3, ip <== NOT EXECUTED 3c7ec: a3540000 cmpge r4, #0 <== NOT EXECUTED 3c7f0: e085500b add r5, r5, fp <== NOT EXECUTED 3c7f4: ca00000f bgt 3c838 <== NOT EXECUTED 3c7f8: 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) 3c7fc: e352001f cmp r2, #31 <== NOT EXECUTED 3c800: 9affffc5 bls 3c71c <== NOT EXECUTED 3c804: ea00000b b 3c838 <== 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) 3c808: 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; 3c80c: 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; 3c810: 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; 3c814: 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 (); 3c818: 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; 3c81c: 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); 3c820: 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; 3c824: 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 (); 3c828: 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; 3c82c: d3a0101f movle r1, #31 <== NOT EXECUTED map_offset = rtems_rfs_bitmap_element_bits () - 1; } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; 3c830: 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; 3c834: 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))); 3c838: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED 3c83c: e153000c cmp r3, ip <== NOT EXECUTED 3c840: b3a00000 movlt r0, #0 <== NOT EXECUTED 3c844: 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; 3c848: e3540000 cmp r4, #0 <== NOT EXECUTED 3c84c: d3a0201f movle r2, #31 <== NOT EXECUTED 3c850: c3a02000 movgt r2, #0 <== NOT EXECUTED } while (((direction < 0) && (test_bit >= end_bit)) || ((direction > 0) && (test_bit <= end_bit))); 3c854: e3500000 cmp r0, #0 <== NOT EXECUTED } map_bits += direction * bits_skipped; map_index += direction * bits_skipped; } search_bits += direction; 3c858: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 3c85c: 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))); 3c860: 1affffa7 bne 3c704 <== NOT EXECUTED 3c864: e153000c cmp r3, ip <== NOT EXECUTED 3c868: c3a00000 movgt r0, #0 <== NOT EXECUTED 3c86c: d3a00001 movle r0, #1 <== NOT EXECUTED 3c870: e3540000 cmp r4, #0 <== NOT EXECUTED 3c874: d3a00000 movle r0, #0 <== NOT EXECUTED 3c878: e3500000 cmp r0, #0 <== NOT EXECUTED 3c87c: 1affffa0 bne 3c704 <== NOT EXECUTED return 0; } 3c880: e28dd01c add sp, sp, #28 <== NOT EXECUTED 3c884: 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 =============================================================================== 0000ad80 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; ad80: e59f3110 ldr r3, [pc, #272] ; ae98 <_CORE_mutex_Seize_interrupt_trylock+0x118> ad84: e5933000 ldr r3, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; ad88: e3a02000 mov r2, #0 ad8c: e5832034 str r2, [r3, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { ad90: e590c050 ldr ip, [r0, #80] ; 0x50 ad94: e15c0002 cmp ip, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { ad98: e52de004 push {lr} ; (str lr, [sp, #-4]!) ad9c: 0a00002a beq ae4c <_CORE_mutex_Seize_interrupt_trylock+0xcc> the_mutex->lock = CORE_MUTEX_LOCKED; ada0: e5802050 str r2, [r0, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; ada4: e5902048 ldr r2, [r0, #72] ; 0x48 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; ada8: e593c008 ldr ip, [r3, #8] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || adac: e3520002 cmp r2, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; adb0: e580c060 str ip, [r0, #96] ; 0x60 the_mutex->nest_count = 1; adb4: e3a0c001 mov ip, #1 adb8: e580c054 str ip, [r0, #84] ; 0x54 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; adbc: e580305c str r3, [r0, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || adc0: 0a000001 beq adcc <_CORE_mutex_Seize_interrupt_trylock+0x4c> adc4: e3520003 cmp r2, #3 adc8: 1a00002c bne ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; adcc: e593c01c ldr ip, [r3, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { add0: e3520003 cmp r2, #3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; add4: e28c2001 add r2, ip, #1 add8: e583201c str r2, [r3, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { addc: 1a000027 bne ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; ade0: e590204c ldr r2, [r0, #76] ; 0x4c current = executing->current_priority; ade4: e593c014 ldr ip, [r3, #20] if ( current == ceiling ) { ade8: e15c0002 cmp ip, r2 adec: 0a000023 beq ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { adf0: 9a00000b bls ae24 <_CORE_mutex_Seize_interrupt_trylock+0xa4> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; adf4: e59f30a0 ldr r3, [pc, #160] ; ae9c <_CORE_mutex_Seize_interrupt_trylock+0x11c> adf8: e5932000 ldr r2, [r3] adfc: e2822001 add r2, r2, #1 ae00: e5832000 str r2, [r3] ae04: e5913000 ldr r3, [r1] ae08: e129f003 msr CPSR_fc, r3 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( ae0c: e3a02000 mov r2, #0 ae10: e590104c ldr r1, [r0, #76] ; 0x4c ae14: e590005c ldr r0, [r0, #92] ; 0x5c ae18: ebffef45 bl 6b34 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); ae1c: ebfff0a5 bl 70b8 <_Thread_Enable_dispatch> ae20: ea000018 b ae88 <_CORE_mutex_Seize_interrupt_trylock+0x108> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; ae24: e3a02006 mov r2, #6 ae28: e5832034 str r2, [r3, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ ae2c: e3a02000 mov r2, #0 ae30: e5802054 str r2, [r0, #84] ; 0x54 _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; ae34: e2822001 add r2, r2, #1 ae38: e5802050 str r2, [r0, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ ae3c: e593201c ldr r2, [r3, #28] ae40: e2422001 sub r2, r2, #1 ae44: e583201c str r2, [r3, #28] ae48: ea00000c b ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100> /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { ae4c: e590205c ldr r2, [r0, #92] ; 0x5c ae50: e1520003 cmp r2, r3 ae54: 1a00000d bne ae90 <_CORE_mutex_Seize_interrupt_trylock+0x110> switch ( the_mutex->Attributes.lock_nesting_behavior ) { ae58: e5903040 ldr r3, [r0, #64] ; 0x40 ae5c: e3530000 cmp r3, #0 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; ae60: 05903054 ldreq r3, [r0, #84] ; 0x54 ae64: 02833001 addeq r3, r3, #1 ae68: 05803054 streq r3, [r0, #84] ; 0x54 * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { ae6c: 0a000003 beq ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100> ae70: e3530001 cmp r3, #1 ae74: 1a000005 bne ae90 <_CORE_mutex_Seize_interrupt_trylock+0x110> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; ae78: e3a03002 mov r3, #2 <== NOT EXECUTED ae7c: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED ae80: e5913000 ldr r3, [r1] ae84: e129f003 msr CPSR_fc, r3 ae88: e3a00000 mov r0, #0 ae8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) ae90: e3a00001 mov r0, #1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } ae94: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 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 =============================================================================== 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 =============================================================================== 00007614 <_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 ) { 7614: 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; 7618: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 761c: e281503c add r5, r1, #60 ; 0x3c 7620: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 7624: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 7628: 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 ) ) 762c: 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 ]; 7630: 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; 7634: e581503c str r5, [r1, #60] ; 0x3c 7638: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 763c: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 7640: 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 ]; 7644: 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; 7648: 159f8154 ldrne r8, [pc, #340] ; 77a4 <_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 ) ) 764c: 1a000023 bne 76e0 <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 7650: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 7654: e10f5000 mrs r5, CPSR 7658: e3854080 orr r4, r5, #128 ; 0x80 765c: 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; 7660: e3e06000 mvn r6, #0 7664: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 7668: ea00000b b 769c <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 766c: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 7670: e1530006 cmp r3, r6 7674: 9a00000a bls 76a4 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7678: e10fa000 mrs sl, CPSR 767c: e129f005 msr CPSR_fc, r5 7680: 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) ) { 7684: e594a010 ldr sl, [r4, #16] 7688: e117000a tst r7, sl 768c: 1a000001 bne 7698 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7690: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 7694: eaffffee b 7654 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 7698: 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 ) ) { 769c: e1540008 cmp r4, r8 76a0: 1afffff1 bne 766c <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 76a4: e590c030 ldr ip, [r0, #48] ; 0x30 76a8: 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 ) ) { 76ac: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 76b0: 1a000038 bne 7798 <_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 ) 76b4: 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; 76b8: e3a03000 mov r3, #0 76bc: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 76c0: 0a00002a beq 7770 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 76c4: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 76c8: e5814000 str r4, [r1] the_node->previous = previous_node; 76cc: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 76d0: 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; 76d4: e5831000 str r1, [r3] search_node->previous = the_node; 76d8: e5841004 str r1, [r4, #4] 76dc: ea000021 b 7768 <_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; 76e0: e5d86000 ldrb r6, [r8] 76e4: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 76e8: e10f5000 mrs r5, CPSR 76ec: e3854080 orr r4, r5, #128 ; 0x80 76f0: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 76f4: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 76f8: ea00000b b 772c <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 76fc: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 7700: e1530006 cmp r3, r6 7704: 2a00000a bcs 7734 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 7708: e10fa000 mrs sl, CPSR 770c: e129f005 msr CPSR_fc, r5 7710: 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) ) { 7714: e594a010 ldr sl, [r4, #16] 7718: e117000a tst r7, sl 771c: 1a000001 bne 7728 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 7720: e129f005 msr CPSR_fc, r5 7724: eaffffed b 76e0 <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 7728: 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 ) ) { 772c: e154000c cmp r4, ip 7730: 1afffff1 bne 76fc <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7734: e590c030 ldr ip, [r0, #48] ; 0x30 7738: 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 ) ) { 773c: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7740: 1a000014 bne 7798 <_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 ) 7744: 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; 7748: e3a03000 mov r3, #0 774c: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 7750: 0a000006 beq 7770 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 7754: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 7758: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 775c: 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; 7760: e5841000 str r1, [r4] next_node->previous = the_node; 7764: e5831004 str r1, [r3, #4] 7768: e129f005 msr CPSR_fc, r5 776c: ea000007 b 7790 <_Thread_queue_Enqueue_priority+0x17c> 7770: 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; 7774: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 7778: e5814000 str r4, [r1] the_node->previous = previous_node; 777c: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 7780: 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; 7784: e5831000 str r1, [r3] search_node->previous = the_node; 7788: e5841004 str r1, [r4, #4] 778c: e129f00c msr CPSR_fc, ip 7790: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 7794: 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; 7798: e582c000 str ip, [r2] return the_thread_queue->sync_state; 779c: e5900030 ldr r0, [r0, #48] ; 0x30 } 77a0: 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: eb000ff2 bl 1917c <_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: eb000fe9 bl 1917c <_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: 3b000fbc blcc 190dc <_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: eb000221 bl 15a7c <_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: eb001002 bl 19230 <_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: eb000d38 bl 187b4 <_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: eb000aa4 bl 17d78 <_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: eb001026 bl 19390 <_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: eb001024 bl 19390 <_Watchdog_Remove> 152fc: eaffffa1 b 15188 <_Timer_server_Body+0x50> =============================================================================== 00020d4c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 20d4c: e3a00000 mov r0, #0 <== NOT EXECUTED 20d50: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00018f20 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 18f20: e1a04000 mov r4, r0 18f24: eb000229 bl 197d0 <___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(); 18f28: ebffffe0 bl 18eb0 rtems_shutdown_executive(status); 18f2c: e1a00004 mov r0, r4 18f30: eb00003b bl 19024 18f34: eafffffe b 18f34 <_exit+0x14> <== NOT EXECUTED =============================================================================== 00022ca8 <_fat_block_read>: uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 22ca8: 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; 22cac: e3a04000 mov r4, #0 <== NOT EXECUTED 22cb0: e28d7004 add r7, sp, #4 <== NOT EXECUTED uint32_t start, uint32_t offset, uint32_t count, void *buff ) { 22cb4: e1a05003 mov r5, r3 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 22cb8: 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; 22cbc: e5274004 str r4, [r7, #-4]! <== NOT EXECUTED 22cc0: e1a06002 mov r6, r2 <== NOT EXECUTED 22cc4: e1a08001 mov r8, r1 <== NOT EXECUTED uint32_t c = 0; while (count > 0) 22cc8: ea000012 b 22d18 <_fat_block_read+0x70> <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 22ccc: ebfffec4 bl 227e4 <== NOT EXECUTED if (rc != RC_OK) return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 22cd0: 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) 22cd4: e250b000 subs fp, r0, #0 <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); memcpy((buff + cmpltd), (block->buffer + ofs), c); 22cd8: 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) 22cdc: 13e04000 mvnne r4, #0 <== NOT EXECUTED 22ce0: 1a000012 bne 22d30 <_fat_block_read+0x88> <== NOT EXECUTED return -1; c = MIN(count, (fs_info->vol.bps - ofs)); 22ce4: e1d9a0b0 ldrh sl, [r9] <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 22ce8: 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)); 22cec: e066a00a rsb sl, r6, sl <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 22cf0: 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)); 22cf4: e15a0005 cmp sl, r5 <== NOT EXECUTED 22cf8: 21a0a005 movcs sl, r5 <== NOT EXECUTED memcpy((buff + cmpltd), (block->buffer + ofs), c); 22cfc: e0811006 add r1, r1, r6 <== NOT EXECUTED 22d00: e1a0200a mov r2, sl <== NOT EXECUTED 22d04: eb00752d bl 401c0 <== NOT EXECUTED count -= c; cmpltd += c; 22d08: 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; 22d0c: e06a5005 rsb r5, sl, r5 <== NOT EXECUTED cmpltd += c; blk++; 22d10: e2888001 add r8, r8, #1 <== NOT EXECUTED 22d14: 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) 22d18: e3550000 cmp r5, #0 <== NOT EXECUTED { rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 22d1c: e1a01008 mov r1, r8 <== NOT EXECUTED 22d20: e3a02001 mov r2, #1 <== NOT EXECUTED 22d24: e1a0300d mov r3, sp <== NOT EXECUTED 22d28: 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) 22d2c: 1affffe6 bne 22ccc <_fat_block_read+0x24> <== NOT EXECUTED cmpltd += c; blk++; ofs = 0; } return cmpltd; } 22d30: e1a00004 mov r0, r4 <== NOT EXECUTED 22d34: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000227dc <_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); 227dc: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED 227e0: eaffffaf b 226a4 <== NOT EXECUTED =============================================================================== 000229bc <_fat_block_write>: rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start, uint32_t offset, uint32_t count, const void *buff) { 229bc: 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; 229c0: e3a05000 mov r5, #0 <== NOT EXECUTED 229c4: 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) { 229c8: e1a07003 mov r7, r3 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 229cc: 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; 229d0: e5285004 str r5, [r8, #-4]! <== NOT EXECUTED 229d4: e1a0b002 mov fp, r2 <== NOT EXECUTED 229d8: e1a0a001 mov sl, r1 <== NOT EXECUTED uint32_t c = 0; while(count > 0) 229dc: ea00001e b 22a5c <_fat_block_write+0xa0> <== NOT EXECUTED { c = MIN(count, (fs_info->vol.bps - ofs)); 229e0: e1d630b0 ldrh r3, [r6] <== NOT EXECUTED 229e4: e06b4003 rsb r4, fp, r3 <== NOT EXECUTED 229e8: e1540007 cmp r4, r7 <== NOT EXECUTED 229ec: 21a04007 movcs r4, r7 <== NOT EXECUTED if (c == fs_info->vol.bps) 229f0: e1540003 cmp r4, r3 <== NOT EXECUTED rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block); 229f4: 01a00006 moveq r0, r6 <== NOT EXECUTED 229f8: 01a0100a moveq r1, sl <== NOT EXECUTED 229fc: 03a02002 moveq r2, #2 <== NOT EXECUTED 22a00: 01a0300d moveq r3, sp <== NOT EXECUTED else rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block); 22a04: 11a0100a movne r1, sl <== NOT EXECUTED 22a08: 13a02001 movne r2, #1 <== NOT EXECUTED 22a0c: 11a0300d movne r3, sp <== NOT EXECUTED 22a10: 11a00006 movne r0, r6 <== NOT EXECUTED 22a14: ebffff72 bl 227e4 <== NOT EXECUTED if (rc != RC_OK) 22a18: 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); 22a1c: e1a09000 mov r9, r0 <== NOT EXECUTED if (rc != RC_OK) 22a20: 13e05000 mvnne r5, #0 <== NOT EXECUTED 22a24: 1a00000e bne 22a64 <_fat_block_write+0xa8> <== NOT EXECUTED return -1; memcpy((block->buffer + ofs), (buff + cmpltd), c); 22a28: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22a2c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 22a30: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED 22a34: e080000b add r0, r0, fp <== NOT EXECUTED 22a38: e0831005 add r1, r3, r5 <== NOT EXECUTED 22a3c: e1a02004 mov r2, r4 <== NOT EXECUTED 22a40: eb0075de bl 401c0 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 22a44: e3a03001 mov r3, #1 <== NOT EXECUTED 22a48: e5c63080 strb r3, [r6, #128] ; 0x80 <== NOT EXECUTED fat_buf_mark_modified(fs_info); count -= c; cmpltd +=c; 22a4c: e0845005 add r5, r4, r5 <== NOT EXECUTED memcpy((block->buffer + ofs), (buff + cmpltd), c); fat_buf_mark_modified(fs_info); count -= c; 22a50: e0647007 rsb r7, r4, r7 <== NOT EXECUTED cmpltd +=c; blk++; 22a54: e28aa001 add sl, sl, #1 <== NOT EXECUTED 22a58: 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) 22a5c: e3570000 cmp r7, #0 <== NOT EXECUTED 22a60: 1affffde bne 229e0 <_fat_block_write+0x24> <== NOT EXECUTED cmpltd +=c; blk++; ofs = 0; } return cmpltd; } 22a64: e1a00005 mov r0, r5 <== NOT EXECUTED 22a68: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00039da4 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 39da4: e1a00001 mov r0, r1 <== NOT EXECUTED 39da8: e1a01002 mov r1, r2 <== NOT EXECUTED 39dac: e1a02003 mov r2, r3 <== NOT EXECUTED 39db0: eaffff8b b 39be4 <== NOT EXECUTED =============================================================================== 00020d2c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } 20d2c: e3a00001 mov r0, #1 <== NOT EXECUTED 20d30: 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 =============================================================================== 00020d44 <_kill_r>: #include int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { return 0; } 20d44: e3a00000 mov r0, #0 <== NOT EXECUTED 20d48: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00025f38 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 25f38: e1a00001 mov r0, r1 <== NOT EXECUTED 25f3c: e1a01002 mov r1, r2 <== NOT EXECUTED 25f40: eaffff7f b 25d44 <== NOT EXECUTED =============================================================================== 00026134 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 26134: e1a00001 mov r0, r1 <== NOT EXECUTED 26138: e1a01002 mov r1, r2 <== NOT EXECUTED 2613c: eaffffc4 b 26054 <== NOT EXECUTED =============================================================================== 00019008 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 19008: e1a00001 mov r0, r1 <== NOT EXECUTED 1900c: e1a01002 mov r1, r2 <== NOT EXECUTED 19010: ea00000e b 19050 <== 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 =============================================================================== 0000ced0 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); ced0: e1a00001 mov r0, r1 <== NOT EXECUTED ced4: eaffff71 b cca0 <== NOT EXECUTED =============================================================================== 00024dbc : #include int chdir( const char *pathname ) { 24dbc: e92d4030 push {r4, r5, lr} rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 24dc0: e2505000 subs r5, r0, #0 #include int chdir( const char *pathname ) { 24dc4: e24dd018 sub sp, sp, #24 rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 24dc8: 1a000002 bne 24dd8 rtems_set_errno_and_return_minus_one( EFAULT ); 24dcc: eb00604b bl 3cf00 <__errno> 24dd0: e3a0300e mov r3, #14 24dd4: ea000025 b 24e70 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 24dd8: eb007b45 bl 43af4 24ddc: e28d4004 add r4, sp, #4 24de0: e3a0c001 mov ip, #1 24de4: e1a01000 mov r1, r0 24de8: e1a0200c mov r2, ip 24dec: e1a00005 mov r0, r5 24df0: e1a03004 mov r3, r4 24df4: e58dc000 str ip, [sp] 24df8: ebff8a0f bl 763c pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 24dfc: e3500000 cmp r0, #0 24e00: 1a00001b bne 24e74 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 24e04: e59d2010 ldr r2, [sp, #16] 24e08: e5923010 ldr r3, [r2, #16] 24e0c: e3530000 cmp r3, #0 24e10: 1a000007 bne 24e34 rtems_filesystem_freenode( &loc ); 24e14: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 24e18: e3530000 cmp r3, #0 <== NOT EXECUTED 24e1c: 11a00004 movne r0, r4 <== NOT EXECUTED 24e20: 11a0e00f movne lr, pc <== NOT EXECUTED 24e24: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 24e28: eb006034 bl 3cf00 <__errno> <== NOT EXECUTED 24e2c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 24e30: ea00000e b 24e70 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 24e34: e1a00004 mov r0, r4 24e38: e1a0e00f mov lr, pc 24e3c: e12fff13 bx r3 24e40: e3500001 cmp r0, #1 24e44: 0a00000c beq 24e7c rtems_filesystem_freenode( &loc ); 24e48: e59d3010 ldr r3, [sp, #16] 24e4c: e3530000 cmp r3, #0 24e50: 0a000004 beq 24e68 24e54: e593301c ldr r3, [r3, #28] 24e58: e3530000 cmp r3, #0 24e5c: 11a00004 movne r0, r4 24e60: 11a0e00f movne lr, pc 24e64: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 24e68: eb006024 bl 3cf00 <__errno> 24e6c: e3a03014 mov r3, #20 24e70: e5803000 str r3, [r0] 24e74: e3e00000 mvn r0, #0 24e78: ea000012 b 24ec8 } rtems_filesystem_freenode( &rtems_filesystem_current ); 24e7c: e59f304c ldr r3, [pc, #76] ; 24ed0 24e80: e5930000 ldr r0, [r3] 24e84: e5903010 ldr r3, [r0, #16] 24e88: e3530000 cmp r3, #0 24e8c: 0a000004 beq 24ea4 24e90: e593301c ldr r3, [r3, #28] 24e94: e3530000 cmp r3, #0 24e98: 12800004 addne r0, r0, #4 24e9c: 11a0e00f movne lr, pc 24ea0: 112fff13 bxne r3 rtems_filesystem_current = loc; 24ea4: e59f3024 ldr r3, [pc, #36] ; 24ed0 24ea8: e28d4004 add r4, sp, #4 24eac: e593c000 ldr ip, [r3] 24eb0: e8b4000f ldm r4!, {r0, r1, r2, r3} 24eb4: e28cc004 add ip, ip, #4 24eb8: e8ac000f stmia ip!, {r0, r1, r2, r3} 24ebc: e5943000 ldr r3, [r4] 24ec0: e58c3000 str r3, [ip] 24ec4: e3a00000 mov r0, #0 return 0; } 24ec8: e28dd018 add sp, sp, #24 24ecc: 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: eb00f267 bl 43af4 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: eb00d754 bl 3cf00 <__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: eb00d744 bl 3cf00 <__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} =============================================================================== 00024ed4 : int chown( const char *path, uid_t owner, gid_t group ) { 24ed4: e92d40f0 push {r4, r5, r6, r7, lr} 24ed8: e1a01801 lsl r1, r1, #16 24edc: e24dd018 sub sp, sp, #24 24ee0: e1a02802 lsl r2, r2, #16 24ee4: e1a06821 lsr r6, r1, #16 24ee8: e1a05822 lsr r5, r2, #16 24eec: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 24ef0: eb007aff bl 43af4 24ef4: e28d4004 add r4, sp, #4 24ef8: e1a01000 mov r1, r0 24efc: e3a0c001 mov ip, #1 24f00: e1a00007 mov r0, r7 24f04: e3a02000 mov r2, #0 24f08: e1a03004 mov r3, r4 24f0c: e58dc000 str ip, [sp] 24f10: ebff89c9 bl 763c 24f14: e3500000 cmp r0, #0 24f18: 1a00000b bne 24f4c return -1; if ( !loc.ops->chown_h ) { 24f1c: e59d2010 ldr r2, [sp, #16] 24f20: e5923018 ldr r3, [r2, #24] 24f24: e3530000 cmp r3, #0 24f28: 1a000009 bne 24f54 rtems_filesystem_freenode( &loc ); 24f2c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 24f30: e3530000 cmp r3, #0 <== NOT EXECUTED 24f34: 11a00004 movne r0, r4 <== NOT EXECUTED 24f38: 11a0e00f movne lr, pc <== NOT EXECUTED 24f3c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 24f40: eb005fee bl 3cf00 <__errno> <== NOT EXECUTED 24f44: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 24f48: e5803000 str r3, [r0] <== NOT EXECUTED 24f4c: e3e05000 mvn r5, #0 24f50: ea00000d b 24f8c } result = (*loc.ops->chown_h)( &loc, owner, group ); 24f54: e1a02005 mov r2, r5 24f58: e1a01006 mov r1, r6 24f5c: e1a00004 mov r0, r4 24f60: e1a0e00f mov lr, pc 24f64: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 24f68: e59d3010 ldr r3, [sp, #16] 24f6c: 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 ); 24f70: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 24f74: 0a000004 beq 24f8c 24f78: e593301c ldr r3, [r3, #28] 24f7c: e3530000 cmp r3, #0 24f80: 11a00004 movne r0, r4 24f84: 11a0e00f movne lr, pc 24f88: 112fff13 bxne r3 return result; } 24f8c: e1a00005 mov r0, r5 24f90: e28dd018 add sp, sp, #24 24f94: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00024f98 : #include int chroot( const char *pathname ) { 24f98: 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) { 24f9c: e59f50d4 ldr r5, [pc, #212] ; 25078 24fa0: e59f30d4 ldr r3, [pc, #212] ; 2507c 24fa4: e5954000 ldr r4, [r5] 24fa8: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 24fac: e24dd018 sub sp, sp, #24 24fb0: 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) { 24fb4: 1a000007 bne 24fd8 rtems_libio_set_private_env(); /* try to set a new private env*/ 24fb8: eb00058c bl 265f0 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 24fbc: e5953000 ldr r3, [r5] 24fc0: e1530004 cmp r3, r4 24fc4: 1a000003 bne 24fd8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 24fc8: eb005fcc bl 3cf00 <__errno> <== NOT EXECUTED 24fcc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 24fd0: e5803000 str r3, [r0] <== NOT EXECUTED 24fd4: ea000008 b 24ffc <== NOT EXECUTED } result = chdir(pathname); 24fd8: e1a00006 mov r0, r6 24fdc: ebffff76 bl 24dbc if (result) { 24fe0: e250c000 subs ip, r0, #0 24fe4: 0a000006 beq 25004 rtems_set_errno_and_return_minus_one( errno ); 24fe8: eb005fc4 bl 3cf00 <__errno> <== NOT EXECUTED 24fec: e1a04000 mov r4, r0 <== NOT EXECUTED 24ff0: eb005fc2 bl 3cf00 <__errno> <== NOT EXECUTED 24ff4: e5903000 ldr r3, [r0] <== NOT EXECUTED 24ff8: e5843000 str r3, [r4] <== NOT EXECUTED 24ffc: e3e00000 mvn r0, #0 <== NOT EXECUTED 25000: ea00001a b 25070 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 25004: e1a0200c mov r2, ip 25008: e59f0070 ldr r0, [pc, #112] ; 25080 2500c: e3a01001 mov r1, #1 25010: e28d3004 add r3, sp, #4 25014: e58dc000 str ip, [sp] 25018: ebff8987 bl 763c 2501c: e3500000 cmp r0, #0 25020: 1afffff0 bne 24fe8 /* 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); 25024: e59f304c ldr r3, [pc, #76] ; 25078 25028: e5930000 ldr r0, [r3] 2502c: e5903024 ldr r3, [r0, #36] ; 0x24 25030: e3530000 cmp r3, #0 25034: 0a000004 beq 2504c 25038: e593301c ldr r3, [r3, #28] 2503c: e3530000 cmp r3, #0 25040: 12800018 addne r0, r0, #24 25044: 11a0e00f movne lr, pc 25048: 112fff13 bxne r3 rtems_filesystem_root = loc; 2504c: e59f3024 ldr r3, [pc, #36] ; 25078 25050: e28d4004 add r4, sp, #4 25054: e593c000 ldr ip, [r3] 25058: e8b4000f ldm r4!, {r0, r1, r2, r3} 2505c: e28cc018 add ip, ip, #24 25060: e8ac000f stmia ip!, {r0, r1, r2, r3} 25064: e5943000 ldr r3, [r4] 25068: e58c3000 str r3, [ip] 2506c: e3a00000 mov r0, #0 return 0; } 25070: e28dd018 add sp, sp, #24 25074: 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: eb003dd7 bl 11878 <== 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: eb003dbc bl 11878 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: eb003f20 bl 11e64 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 =============================================================================== 000080b0 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 80b0: 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 ) ) 80b4: e3d27007 bics r7, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 80b8: e1a09000 mov r9, r0 80bc: e1a04001 mov r4, r1 80c0: 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 ) ) 80c4: 0a000002 beq 80d4 rtems_set_errno_and_return_minus_one( EPERM ); 80c8: eb00063b bl 99bc <__errno> <== NOT EXECUTED 80cc: e3a03001 mov r3, #1 <== NOT EXECUTED 80d0: ea000005 b 80ec <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 80d4: e5936000 ldr r6, [r3] if (!device_name_table) 80d8: e3560000 cmp r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 80dc: 159fa090 ldrne sl, [pc, #144] ; 8174 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) 80e0: 1a000019 bne 814c rtems_set_errno_and_return_minus_one( EFAULT ); 80e4: eb000634 bl 99bc <__errno> <== NOT EXECUTED 80e8: e3a0300e mov r3, #14 <== NOT EXECUTED 80ec: e5803000 str r3, [r0] <== NOT EXECUTED 80f0: e3e00000 mvn r0, #0 <== NOT EXECUTED 80f4: 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) 80f8: e5968000 ldr r8, [r6] 80fc: e2581000 subs r1, r8, #0 8100: 0a00000f beq 8144 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8104: eb0009e2 bl a894 8108: e3500000 cmp r0, #0 810c: 1a00000c bne 8144 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8110: e7d80004 ldrb r0, [r8, r4] 8114: e3500000 cmp r0, #0 8118: 1a000009 bne 8144 /* 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; 811c: e59f3054 ldr r3, [pc, #84] ; 8178 8120: e5933000 ldr r3, [r3] 8124: e5933028 ldr r3, [r3, #40] ; 0x28 8128: 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; 812c: e59f3048 ldr r3, [pc, #72] ; 817c 8130: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 8134: e59f3044 ldr r3, [pc, #68] ; 8180 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 8138: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 813c: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 8140: 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++) { 8144: e2877001 add r7, r7, #1 8148: e2866014 add r6, r6, #20 814c: e59a3000 ldr r3, [sl] 8150: e1570003 cmp r7, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8154: e1a00009 mov r0, r9 8158: 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++) { 815c: 3affffe5 bcc 80f8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8160: eb000615 bl 99bc <__errno> 8164: e3a03002 mov r3, #2 8168: e5803000 str r3, [r0] 816c: e3e00000 mvn r0, #0 } 8170: 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: eb001a4f bl 7c00 <_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: eb0021bb bl 99bc <__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: eb0023e1 bl a274 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: eb002192 bl 99bc <__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: eb002188 bl 99bc <__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: eb002456 bl a514 <== NOT EXECUTED 13b8: e3500000 cmp r0, #0 <== NOT EXECUTED 13bc: 1a000003 bne 13d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 13c0: eb00217d bl 99bc <__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: eb002171 bl 99bc <__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: eb002502 bl a834 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: eb000f82 bl 5310 <== 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: 1b001b1c blne 8184 <== 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: eb002123 bl 99bc <__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) =============================================================================== 0000c7a4 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { c7a4: 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; c7a8: e5903014 ldr r3, [r0, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; c7ac: e280c00c add ip, r0, #12 c7b0: e89c1800 ldm ip, {fp, ip} args.buffer = buffer; args.count = count; args.flags = iop->flags; c7b4: e58d3014 str r3, [sp, #20] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; c7b8: e98d1800 stmib sp, {fp, ip} args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; c7bc: e3a03000 mov r3, #0 the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; c7c0: e58d2010 str r2, [sp, #16] args.flags = iop->flags; args.bytes_moved = 0; c7c4: e58d3018 str r3, [sp, #24] the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; c7c8: e58d100c str r1, [sp, #12] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; c7cc: e58d0000 str r0, [sp] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; c7d0: e5903038 ldr r3, [r0, #56] ; 0x38 args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( c7d4: e1a0200d mov r2, sp c7d8: e2830050 add r0, r3, #80 ; 0x50 c7dc: e8900003 ldm r0, {r0, r1} c7e0: eb00024e bl d120 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) c7e4: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; c7e8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); c7ec: 1b0002c7 blne d310 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } c7f0: e28dd01c add sp, sp, #28 <== NOT EXECUTED c7f4: 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: eb0012e4 bl 693c <== 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: 1b00072f blne 57a8 <== 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 =============================================================================== 00025404 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 25404: e59f300c ldr r3, [pc, #12] ; 25418 <== NOT EXECUTED 25408: e5930000 ldr r0, [r3] <== NOT EXECUTED 2540c: e3500000 cmp r0, #0 <== NOT EXECUTED 25410: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 25414: ea005f06 b 3d034 <== NOT EXECUTED =============================================================================== 0002541c : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 2541c: e59f300c ldr r3, [pc, #12] ; 25430 <== NOT EXECUTED 25420: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 25424: e3500000 cmp r0, #0 <== NOT EXECUTED 25428: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 2542c: ea005f00 b 3d034 <== 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 =============================================================================== 000227e4 : #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) { 227e4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 227e8: 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) 227ec: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 227f0: 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) { 227f4: e1a05001 mov r5, r1 <== NOT EXECUTED 227f8: e1a07002 mov r7, r2 <== NOT EXECUTED 227fc: 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) 22800: 1a00000f bne 22844 <== NOT EXECUTED { if (op_type == FAT_OP_TYPE_READ) 22804: e3520001 cmp r2, #1 <== NOT EXECUTED 22808: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 2280c: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22810: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 22814: 1a000002 bne 22824 <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 22818: e1a02005 mov r2, r5 <== NOT EXECUTED 2281c: ebff8ab1 bl 52e8 <== NOT EXECUTED 22820: ea000001 b 2282c <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 22824: e1a02005 mov r2, r5 <== NOT EXECUTED 22828: ebff8a7b bl 521c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2282c: e3500000 cmp r0, #0 <== NOT EXECUTED 22830: 1a000058 bne 22998 <== 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; 22834: 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; 22838: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 2283c: 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; 22840: 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) && 22844: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 22848: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 2284c: e1530002 cmp r3, r2 <== NOT EXECUTED 22850: 33a06000 movcc r6, #0 <== NOT EXECUTED 22854: 3a000003 bcc 22868 <== NOT EXECUTED 22858: e594601c ldr r6, [r4, #28] <== NOT EXECUTED 2285c: e1530006 cmp r3, r6 <== NOT EXECUTED 22860: 23a06000 movcs r6, #0 <== NOT EXECUTED 22864: 33a06001 movcc r6, #1 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.blk_num != blk) 22868: e1530005 cmp r3, r5 <== NOT EXECUTED 2286c: 0a00004e beq 229ac <== NOT EXECUTED { if (fs_info->c.modified) 22870: e5d48080 ldrb r8, [r4, #128] ; 0x80 <== NOT EXECUTED 22874: e3580000 cmp r8, #0 <== NOT EXECUTED 22878: 0a000032 beq 22948 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 2287c: e21660ff ands r6, r6, #255 ; 0xff <== NOT EXECUTED 22880: 0a000006 beq 228a0 <== NOT EXECUTED 22884: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 22888: e3530000 cmp r3, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, 2288c: 05943084 ldreq r3, [r4, #132] ; 0x84 <== NOT EXECUTED 22890: 05940088 ldreq r0, [r4, #136] ; 0x88 <== NOT EXECUTED 22894: 05931020 ldreq r1, [r3, #32] <== NOT EXECUTED 22898: 01d420b0 ldrheq r2, [r4] <== NOT EXECUTED 2289c: 0b007647 bleq 401c0 <== NOT EXECUTED fs_info->vol.bps); sc = rtems_bdbuf_release_modified(fs_info->c.buf); 228a0: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 228a4: ebff862d bl 4160 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; 228a8: e3a03000 mov r3, #0 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 228ac: 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; 228b0: 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; 228b4: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED fs_info->c.modified = 0; if (sc != RTEMS_SUCCESSFUL) 228b8: 1a000036 bne 22998 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); if (sec_of_fat && !fs_info->vol.mirror) 228bc: e3560000 cmp r6, #0 <== NOT EXECUTED 228c0: 0a000025 beq 2295c <== NOT EXECUTED 228c4: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 228c8: e3530000 cmp r3, #0 <== NOT EXECUTED 228cc: 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, 228d0: 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) 228d4: 0a000016 beq 22934 <== NOT EXECUTED 228d8: ea00001f b 2295c <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 228dc: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED 228e0: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 228e4: e0222691 mla r2, r1, r6, r2 <== NOT EXECUTED 228e8: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 228ec: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 228f0: ebff8a49 bl 521c <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 228f4: e3500000 cmp r0, #0 <== NOT EXECUTED 228f8: 1a000008 bne 22920 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 228fc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22900: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 22904: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 22908: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 2290c: eb00762b bl 401c0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 22910: e59d0000 ldr r0, [sp] <== NOT EXECUTED 22914: ebff8611 bl 4160 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 22918: e3500000 cmp r0, #0 <== NOT EXECUTED 2291c: 0a000002 beq 2292c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 22920: eb006976 bl 3cf00 <__errno> <== NOT EXECUTED 22924: e3a0300c mov r3, #12 <== NOT EXECUTED 22928: ea00001c b 229a0 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 2292c: e2866001 add r6, r6, #1 <== NOT EXECUTED 22930: e20660ff and r6, r6, #255 ; 0xff <== NOT EXECUTED 22934: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED 22938: e1520006 cmp r2, r6 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 2293c: 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++) 22940: 8affffe5 bhi 228dc <== NOT EXECUTED 22944: ea000004 b 2295c <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 22948: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 2294c: ebff8625 bl 41e8 <== NOT EXECUTED fs_info->c.state = FAT_CACHE_EMPTY; if (sc != RTEMS_SUCCESSFUL) 22950: e3500000 cmp r0, #0 <== NOT EXECUTED } } else { sc = rtems_bdbuf_release(fs_info->c.buf); fs_info->c.state = FAT_CACHE_EMPTY; 22954: e5c48081 strb r8, [r4, #129] ; 0x81 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22958: 1a00000e bne 22998 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); } if (op_type == FAT_OP_TYPE_READ) 2295c: e3570001 cmp r7, #1 <== NOT EXECUTED 22960: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 22964: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22968: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED 2296c: 1a000002 bne 2297c <== NOT EXECUTED sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf); 22970: e1a02005 mov r2, r5 <== NOT EXECUTED 22974: ebff8a5b bl 52e8 <== NOT EXECUTED 22978: ea000001 b 22984 <== NOT EXECUTED else sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf); 2297c: e1a02005 mov r2, r5 <== NOT EXECUTED 22980: ebff8a25 bl 521c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22984: 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; 22988: 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; 2298c: 0584507c streq r5, [r4, #124] ; 0x7c <== NOT EXECUTED fs_info->c.state = FAT_CACHE_ACTUAL; 22990: 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) 22994: 0a000004 beq 229ac <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 22998: eb006958 bl 3cf00 <__errno> <== NOT EXECUTED 2299c: e3a03005 mov r3, #5 <== NOT EXECUTED 229a0: e5803000 str r3, [r0] <== NOT EXECUTED 229a4: e3e00000 mvn r0, #0 <== NOT EXECUTED 229a8: ea000002 b 229b8 <== NOT EXECUTED fs_info->c.blk_num = blk; fs_info->c.state = FAT_CACHE_ACTUAL; } *buf = fs_info->c.buf; 229ac: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 229b0: e58a3000 str r3, [sl] <== NOT EXECUTED 229b4: e3a00000 mov r0, #0 <== NOT EXECUTED return RC_OK; } 229b8: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 000226a4 : return RC_OK; } int fat_buf_release(fat_fs_info_t *fs_info) { 226a4: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED 226a8: 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) 226ac: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED 226b0: e3500000 cmp r0, #0 <== NOT EXECUTED 226b4: 0a000047 beq 227d8 <== NOT EXECUTED return RC_OK; sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) && 226b8: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED 226bc: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 226c0: e1530002 cmp r3, r2 <== NOT EXECUTED 226c4: 33a05000 movcc r5, #0 <== NOT EXECUTED 226c8: 3a000003 bcc 226dc <== NOT EXECUTED 226cc: e594501c ldr r5, [r4, #28] <== NOT EXECUTED 226d0: e1530005 cmp r3, r5 <== NOT EXECUTED 226d4: 23a05000 movcs r5, #0 <== NOT EXECUTED 226d8: 33a05001 movcc r5, #1 <== NOT EXECUTED (fs_info->c.blk_num < fs_info->vol.rdir_loc)); if (fs_info->c.modified) 226dc: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 226e0: e3530000 cmp r3, #0 <== NOT EXECUTED 226e4: 0a000032 beq 227b4 <== NOT EXECUTED { if (sec_of_fat && !fs_info->vol.mirror) 226e8: e21550ff ands r5, r5, #255 ; 0xff <== NOT EXECUTED 226ec: 0a000006 beq 2270c <== NOT EXECUTED 226f0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 226f4: e3530000 cmp r3, #0 <== NOT EXECUTED memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps); 226f8: 05943084 ldreq r3, [r4, #132] ; 0x84 <== NOT EXECUTED 226fc: 05940088 ldreq r0, [r4, #136] ; 0x88 <== NOT EXECUTED 22700: 05931020 ldreq r1, [r3, #32] <== NOT EXECUTED 22704: 01d420b0 ldrheq r2, [r4] <== NOT EXECUTED 22708: 0b0076ac bleq 401c0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(fs_info->c.buf); 2270c: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 22710: ebff8692 bl 4160 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22714: e3500000 cmp r0, #0 <== NOT EXECUTED 22718: 1a000029 bne 227c4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); fs_info->c.modified = 0; if (sec_of_fat && !fs_info->vol.mirror) 2271c: 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; 22720: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) 22724: 0a000029 beq 227d0 <== NOT EXECUTED 22728: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED 2272c: e3530000 cmp r3, #0 <== NOT EXECUTED 22730: 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, 22734: 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) 22738: 0a000018 beq 227a0 <== NOT EXECUTED 2273c: ea000023 b 227d0 <== NOT EXECUTED { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) { sc = rtems_bdbuf_get(fs_info->vol.dev, 22740: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED 22744: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 22748: e0222591 mla r2, r1, r5, r2 <== NOT EXECUTED 2274c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 22750: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22754: ebff8ab0 bl 521c <== NOT EXECUTED fs_info->c.blk_num + fs_info->vol.fat_length * i, &b); if ( sc != RTEMS_SUCCESSFUL) 22758: e3500000 cmp r0, #0 <== NOT EXECUTED 2275c: 0a000004 beq 22774 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 22760: eb0069e6 bl 3cf00 <__errno> <== NOT EXECUTED 22764: e3a0300c mov r3, #12 <== NOT EXECUTED 22768: e5803000 str r3, [r0] <== NOT EXECUTED 2276c: e3e00000 mvn r0, #0 <== NOT EXECUTED 22770: ea000018 b 227d8 <== NOT EXECUTED memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps); 22774: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22778: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2277c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED 22780: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 22784: eb00768d bl 401c0 <== NOT EXECUTED sc = rtems_bdbuf_release_modified(b); 22788: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2278c: ebff8673 bl 4160 <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL) 22790: e3500000 cmp r0, #0 <== NOT EXECUTED 22794: 1afffff1 bne 22760 <== NOT EXECUTED if (sec_of_fat && !fs_info->vol.mirror) { rtems_bdbuf_buffer *b; for (i = 1; i < fs_info->vol.fats; i++) 22798: e2855001 add r5, r5, #1 <== NOT EXECUTED 2279c: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED 227a0: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED 227a4: e1520005 cmp r2, r5 <== NOT EXECUTED { sc = rtems_bdbuf_get(fs_info->vol.dev, 227a8: 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++) 227ac: 8affffe3 bhi 22740 <== NOT EXECUTED 227b0: ea000006 b 227d0 <== NOT EXECUTED } } } else { sc = rtems_bdbuf_release(fs_info->c.buf); 227b4: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED 227b8: ebff868a bl 41e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 227bc: e3500000 cmp r0, #0 <== NOT EXECUTED 227c0: 0a000002 beq 227d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); 227c4: eb0069cd bl 3cf00 <__errno> <== NOT EXECUTED 227c8: e3a03005 mov r3, #5 <== NOT EXECUTED 227cc: eaffffe5 b 22768 <== NOT EXECUTED } fs_info->c.state = FAT_CACHE_EMPTY; 227d0: e3a00000 mov r0, #0 <== NOT EXECUTED 227d4: e5c40081 strb r0, [r4, #129] ; 0x81 <== NOT EXECUTED return RC_OK; } 227d8: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00023328 : 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)) ) 23328: e2513000 subs r3, r1, #0 <== NOT EXECUTED fat_cluster_read( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, void *buff ) { 2332c: e1a0c002 mov ip, r2 <== NOT EXECUTED 23330: e92d4001 push {r0, lr} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 23334: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 23338: 1a000003 bne 2334c <== NOT EXECUTED 2333c: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 23340: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 23344: 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)) ) 23348: 1a000003 bne 2335c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2334c: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 23350: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 23354: e2433002 sub r3, r3, #2 <== NOT EXECUTED 23358: 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, 2335c: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 23360: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 23364: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 23368: e3a02000 mov r2, #0 <== NOT EXECUTED 2336c: e58dc000 str ip, [sp] <== NOT EXECUTED 23370: ebfffe4c bl 22ca8 <_fat_block_read> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 23374: e8bd8008 pop {r3, pc} <== NOT EXECUTED =============================================================================== 00022bb0 : 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)) ) 22bb0: e2513000 subs r3, r1, #0 <== NOT EXECUTED fat_cluster_write( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, const void *buff ) { 22bb4: e1a0c002 mov ip, r2 <== NOT EXECUTED 22bb8: e92d4001 push {r0, lr} <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 22bbc: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED 22bc0: 1a000003 bne 22bd4 <== NOT EXECUTED 22bc4: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 22bc8: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 22bcc: 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)) ) 22bd0: 1a000003 bne 22be4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22bd4: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED 22bd8: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED 22bdc: e2433002 sub r3, r3, #2 <== NOT EXECUTED 22be0: 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, 22be4: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED 22be8: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED 22bec: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 22bf0: e3a02000 mov r2, #0 <== NOT EXECUTED 22bf4: e58dc000 str ip, [sp] <== NOT EXECUTED 22bf8: ebffff6f bl 229bc <_fat_block_write> <== NOT EXECUTED fs_info->vol.spc << fs_info->vol.sec_log2, buff); } 22bfc: e8bd8008 pop {r3, pc} <== NOT EXECUTED =============================================================================== 00022a6c : fat_fat32_update_fsinfo_sector( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t free_count, uint32_t next_free ) { 22a6c: 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; 22a70: 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, 22a74: e1d533bc ldrh r3, [r5, #60] ; 0x3c <== NOT EXECUTED 22a78: 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); 22a7c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED le_next_free = CT_LE_L(next_free); 22a80: e58d2004 str r2, [sp, #4] <== NOT EXECUTED ret1 = _fat_block_write(mt_entry, 22a84: e1a01003 mov r1, r3 <== NOT EXECUTED 22a88: e3a02f7a mov r2, #488 ; 0x1e8 <== NOT EXECUTED 22a8c: 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 ) { 22a90: 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, 22a94: e58dc000 str ip, [sp] <== NOT EXECUTED 22a98: ebffffc7 bl 229bc <_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, 22a9c: e3a03004 mov r3, #4 <== NOT EXECUTED 22aa0: e1d513bc ldrh r1, [r5, #60] ; 0x3c <== NOT EXECUTED 22aa4: 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, 22aa8: 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, 22aac: e3a02f7b mov r2, #492 ; 0x1ec <== NOT EXECUTED 22ab0: e1a00004 mov r0, r4 <== NOT EXECUTED 22ab4: e58dc000 str ip, [sp] <== NOT EXECUTED 22ab8: ebffffbf bl 229bc <_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) ) 22abc: e1a06fa6 lsr r6, r6, #31 <== NOT EXECUTED 22ac0: e1960fa0 orrs r0, r6, r0, lsr #31 <== NOT EXECUTED return -1; return RC_OK; } 22ac4: 13e00000 mvnne r0, #0 <== NOT EXECUTED 22ac8: e8bd807e pop {r1, r2, r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 000222b8 : /* * 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) 222b8: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 222bc: e3530001 cmp r3, #1 <== NOT EXECUTED int fat_file_close( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 222c0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 222c4: e1a04001 mov r4, r1 <== NOT EXECUTED 222c8: e1a05000 mov r5, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 222cc: 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) 222d0: 9a000003 bls 222e4 <== NOT EXECUTED { fat_fd->links_num--; 222d4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 222d8: e5813008 str r3, [r1, #8] <== NOT EXECUTED 222dc: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 222e0: 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) 222e4: e5d17030 ldrb r7, [r1, #48] ; 0x30 <== NOT EXECUTED 222e8: e2177001 ands r7, r7, #1 <== NOT EXECUTED 222ec: 0a00000e beq 2232c <== NOT EXECUTED { rc = fat_file_truncate(mt_entry, fat_fd, 0); 222f0: e3a02000 mov r2, #0 <== NOT EXECUTED 222f4: ebfffe36 bl 21bd4 <== NOT EXECUTED if ( rc != RC_OK ) 222f8: e3500000 cmp r0, #0 <== NOT EXECUTED 222fc: 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 ); 22300: e1a00004 mov r0, r4 <== NOT EXECUTED 22304: ebffa84d bl c440 <_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) ) 22308: e1a00005 mov r0, r5 <== NOT EXECUTED 2230c: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 22310: eb0000af bl 225d4 <== NOT EXECUTED 22314: e3500000 cmp r0, #0 <== NOT EXECUTED 22318: 0a00000a beq 22348 <== NOT EXECUTED fat_free_unique_ino(mt_entry, fat_fd->ino); 2231c: e1a00005 mov r0, r5 <== NOT EXECUTED 22320: e594100c ldr r1, [r4, #12] <== NOT EXECUTED 22324: eb0000a0 bl 225ac <== NOT EXECUTED 22328: ea000006 b 22348 <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 2232c: e591100c ldr r1, [r1, #12] <== NOT EXECUTED 22330: eb0000a7 bl 225d4 <== NOT EXECUTED 22334: e3500000 cmp r0, #0 <== NOT EXECUTED { fat_fd->links_num = 0; 22338: 15847008 strne r7, [r4, #8] <== NOT EXECUTED free(fat_fd); } else { if (fat_ino_is_unique(mt_entry, fat_fd->ino)) 2233c: 1a000003 bne 22350 <== NOT EXECUTED 22340: e1a00004 mov r0, r4 <== NOT EXECUTED 22344: ebffa83d bl c440 <_Chain_Extract> <== NOT EXECUTED fat_fd->links_num = 0; } else { _hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd); free(fat_fd); 22348: e1a00004 mov r0, r4 <== NOT EXECUTED 2234c: ebff94d8 bl 76b4 <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 22350: e1a00006 mov r0, r6 <== NOT EXECUTED return rc; } 22354: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED } } /* * flush any modified "cached" buffer back to disk */ rc = fat_buf_release(fs_info); 22358: ea0000d1 b 226a4 <== NOT EXECUTED =============================================================================== 000219d0 : int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 219d0: 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) 219d4: e5914018 ldr r4, [r1, #24] <== NOT EXECUTED 219d8: e3540000 cmp r4, #0 <== NOT EXECUTED int fat_file_datasync( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 219dc: 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; 219e0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = fat_fd->cln; 219e4: 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) 219e8: 0a000036 beq 21ac8 <== 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; 219ec: 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); 219f0: 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; 219f4: 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); 219f8: eb000329 bl 226a4 <== NOT EXECUTED if (rc != RC_OK) 219fc: 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); 21a00: 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); 21a04: 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) 21a08: 0a000028 beq 21ab0 <== NOT EXECUTED 21a0c: ea00002d b 21ac8 <== 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)) ) 21a10: 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; 21a14: e5972034 ldr r2, [r7, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 21a18: 1a000003 bne 21a2c <== NOT EXECUTED 21a1c: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED 21a20: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 21a24: 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)) ) 21a28: 1a000003 bne 21a3c <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 21a2c: e5921030 ldr r1, [r2, #48] ; 0x30 <== NOT EXECUTED 21a30: e5d22005 ldrb r2, [r2, #5] <== NOT EXECUTED 21a34: e2438002 sub r8, r3, #2 <== NOT EXECUTED 21a38: e0818218 add r8, r1, r8, lsl r2 <== NOT EXECUTED 21a3c: 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++ ) 21a40: ea00000e b 21a80 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 21a44: e2851054 add r1, r5, #84 ; 0x54 <== NOT EXECUTED 21a48: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 21a4c: ebff8e25 bl 52e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 21a50: e3500000 cmp r0, #0 <== NOT EXECUTED 21a54: 1a000003 bne 21a68 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); sc = rtems_bdbuf_sync(block); 21a58: e59d0000 ldr r0, [sp] <== NOT EXECUTED 21a5c: ebff8c16 bl 4abc <== NOT EXECUTED if ( sc != RTEMS_SUCCESSFUL ) 21a60: e3500000 cmp r0, #0 <== NOT EXECUTED 21a64: 0a000004 beq 21a7c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 21a68: eb006d24 bl 3cf00 <__errno> <== NOT EXECUTED 21a6c: e3a03005 mov r3, #5 <== NOT EXECUTED 21a70: e5803000 str r3, [r0] <== NOT EXECUTED 21a74: e3e04000 mvn r4, #0 <== NOT EXECUTED 21a78: ea000012 b 21ac8 <== 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++ ) 21a7c: e2866001 add r6, r6, #1 <== NOT EXECUTED 21a80: e5d51004 ldrb r1, [r5, #4] <== NOT EXECUTED 21a84: e1560001 cmp r6, r1 <== NOT EXECUTED { /* ... sync it */ sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block); 21a88: e0862008 add r2, r6, r8 <== NOT EXECUTED 21a8c: 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++ ) 21a90: 3affffeb bcc 21a44 <== 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); 21a94: e1a00007 mov r0, r7 <== NOT EXECUTED 21a98: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 21a9c: e1a02009 mov r2, r9 <== NOT EXECUTED 21aa0: eb005e1c bl 39318 <== NOT EXECUTED if ( rc != RC_OK ) 21aa4: e3500000 cmp r0, #0 <== NOT EXECUTED 21aa8: 11a04000 movne r4, r0 <== NOT EXECUTED 21aac: 1a000005 bne 21ac8 <== 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) 21ab0: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 21ab4: e285100c add r1, r5, #12 <== NOT EXECUTED 21ab8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 21abc: e0031001 and r1, r3, r1 <== NOT EXECUTED 21ac0: e1510002 cmp r1, r2 <== NOT EXECUTED 21ac4: 3affffd1 bcc 21a10 <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); if ( rc != RC_OK ) return rc; } return rc; } 21ac8: e1a00004 mov r0, r4 <== NOT EXECUTED 21acc: e8bd87fc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00021ccc : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t new_length, uint32_t *a_length ) { 21ccc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 21cd0: 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; 21cd4: e58b2000 str r2, [fp] <== NOT EXECUTED if (new_length <= fat_fd->fat_file_size) 21cd8: 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 ) { 21cdc: 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; 21ce0: 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) 21ce4: 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 ) { 21ce8: e1a07002 mov r7, r2 <== NOT EXECUTED 21cec: e1a04001 mov r4, r1 <== NOT EXECUTED 21cf0: 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; 21cf4: 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; 21cf8: 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; 21cfc: 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) 21d00: 9a000061 bls 21e8c <== NOT EXECUTED return RC_OK; if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 21d04: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 21d08: e3530001 cmp r3, #1 <== NOT EXECUTED 21d0c: 1a000005 bne 21d28 <== NOT EXECUTED 21d10: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 21d14: e3530000 cmp r3, #0 <== NOT EXECUTED 21d18: 1a000002 bne 21d28 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21d1c: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED 21d20: e3130003 tst r3, #3 <== NOT EXECUTED 21d24: 1a00001a bne 21d94 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); bytes_remain = (fs_info->vol.bpc - 21d28: e1d620b6 ldrh r2, [r6, #6] <== NOT EXECUTED (fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) & 21d2c: 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 - 21d30: e0038009 and r8, r3, r9 <== NOT EXECUTED 21d34: e0688002 rsb r8, r8, r2 <== NOT EXECUTED 21d38: 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; 21d3c: e0699007 rsb r9, r9, r7 <== NOT EXECUTED if (bytes2add > bytes_remain) 21d40: e1590008 cmp r9, r8 <== NOT EXECUTED 21d44: 9a000050 bls 21e8c <== 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) 21d48: e0599008 subs r9, r9, r8 <== NOT EXECUTED 21d4c: 0a00004e beq 21e8c <== NOT EXECUTED return RC_OK; cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1; 21d50: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED 21d54: e249a001 sub sl, r9, #1 <== NOT EXECUTED 21d58: e1a0a33a lsr sl, sl, r3 <== NOT EXECUTED 21d5c: e28aa001 add sl, sl, #1 <== NOT EXECUTED rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add, 21d60: e28dc008 add ip, sp, #8 <== NOT EXECUTED 21d64: e1a00005 mov r0, r5 <== NOT EXECUTED 21d68: e28d1010 add r1, sp, #16 <== NOT EXECUTED 21d6c: e1a0200a mov r2, sl <== NOT EXECUTED 21d70: e28d3004 add r3, sp, #4 <== NOT EXECUTED 21d74: e58dc000 str ip, [sp] <== NOT EXECUTED 21d78: eb005def bl 3953c <== NOT EXECUTED &cls_added, &last_cl); /* this means that low level I/O error occured */ if (rc != RC_OK) 21d7c: e3500000 cmp r0, #0 <== NOT EXECUTED 21d80: 11a08000 movne r8, r0 <== NOT EXECUTED 21d84: 1a000041 bne 21e90 <== NOT EXECUTED return rc; /* this means that no space left on device */ if ((cls_added == 0) && (bytes_remain == 0)) 21d88: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 21d8c: e1988003 orrs r8, r8, r3 <== NOT EXECUTED 21d90: 1a000004 bne 21da8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOSPC); 21d94: eb006c59 bl 3cf00 <__errno> <== NOT EXECUTED 21d98: e3a0301c mov r3, #28 <== NOT EXECUTED 21d9c: e5803000 str r3, [r0] <== NOT EXECUTED 21da0: e3e08000 mvn r8, #0 <== NOT EXECUTED 21da4: ea000039 b 21e90 <== NOT EXECUTED /* check wether we satisfied request for 'cls2add' clusters */ if (cls2add != cls_added) 21da8: e15a0003 cmp sl, r3 <== NOT EXECUTED 21dac: 0a000008 beq 21dd4 <== NOT EXECUTED *a_length = new_length - 21db0: e1e03003 mvn r3, r3 <== NOT EXECUTED 21db4: e5d62008 ldrb r2, [r6, #8] <== NOT EXECUTED 21db8: e083a00a add sl, r3, sl <== NOT EXECUTED 21dbc: e047a21a sub sl, r7, sl, lsl r2 <== NOT EXECUTED 21dc0: e1d630b6 ldrh r3, [r6, #6] <== NOT EXECUTED 21dc4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 21dc8: e0099003 and r9, r9, r3 <== NOT EXECUTED 21dcc: e069900a rsb r9, r9, sl <== NOT EXECUTED 21dd0: 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 ) 21dd4: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED 21dd8: e3530000 cmp r3, #0 <== NOT EXECUTED { fat_fd->map.disk_cln = fat_fd->cln = chain; 21ddc: 059d2010 ldreq r2, [sp, #16] <== NOT EXECUTED fat_fd->map.file_cln = 0; 21de0: 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; 21de4: 05842038 streq r2, [r4, #56] ; 0x38 <== NOT EXECUTED 21de8: 0584201c streq r2, [r4, #28] <== NOT EXECUTED 21dec: 0a000014 beq 21e44 <== NOT EXECUTED fat_fd->map.file_cln = 0; } else { if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE) 21df0: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED 21df4: e3720001 cmn r2, #1 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; 21df8: 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) 21dfc: 1a000008 bne 21e24 <== NOT EXECUTED { old_last_cl = fat_fd->map.last_cln; } else { rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, 21e00: e28dc00c add ip, sp, #12 <== NOT EXECUTED 21e04: e2433001 sub r3, r3, #1 <== NOT EXECUTED 21e08: e1a00005 mov r0, r5 <== NOT EXECUTED 21e0c: e1a01004 mov r1, r4 <== NOT EXECUTED 21e10: e3a02001 mov r2, #1 <== NOT EXECUTED 21e14: e58dc000 str ip, [sp] <== NOT EXECUTED 21e18: ebffff3f bl 21b1c <== NOT EXECUTED (fat_fd->fat_file_size - 1), &old_last_cl); if ( rc != RC_OK ) 21e1c: e2508000 subs r8, r0, #0 <== NOT EXECUTED 21e20: 1a000014 bne 21e78 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, chain); return rc; } } rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain); 21e24: e1a00005 mov r0, r5 <== NOT EXECUTED 21e28: e28d100c add r1, sp, #12 <== NOT EXECUTED 21e2c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 21e30: eb005ca0 bl 390b8 <== NOT EXECUTED if ( rc != RC_OK ) 21e34: e2508000 subs r8, r0, #0 <== NOT EXECUTED 21e38: 1a00000e bne 21e78 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); return rc; } fat_buf_release(fs_info); 21e3c: e1a00006 mov r0, r6 <== NOT EXECUTED 21e40: eb000217 bl 226a4 <== NOT EXECUTED } /* update number of the last cluster of the file if it changed */ if (cls_added != 0) 21e44: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED 21e48: e3530000 cmp r3, #0 <== NOT EXECUTED 21e4c: 0a00000d beq 21e88 <== NOT EXECUTED { fat_fd->map.last_cln = last_cl; if (fat_fd->fat_file_type == FAT_DIRECTORY) 21e50: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 21e54: 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; 21e58: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 21e5c: e584303c str r3, [r4, #60] ; 0x3c <== NOT EXECUTED if (fat_fd->fat_file_type == FAT_DIRECTORY) 21e60: 1a000008 bne 21e88 <== NOT EXECUTED { rc = fat_init_clusters_chain(mt_entry, chain); 21e64: e1a00005 mov r0, r5 <== NOT EXECUTED 21e68: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 21e6c: eb000363 bl 22c00 <== NOT EXECUTED if ( rc != RC_OK ) 21e70: e2508000 subs r8, r0, #0 <== NOT EXECUTED 21e74: 0a000003 beq 21e88 <== NOT EXECUTED { fat_free_fat_clusters_chain(mt_entry, chain); 21e78: e1a00005 mov r0, r5 <== NOT EXECUTED 21e7c: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 21e80: eb005d7e bl 39480 <== NOT EXECUTED return rc; 21e84: ea000001 b 21e90 <== NOT EXECUTED } } } fat_fd->fat_file_size = new_length; 21e88: e5847018 str r7, [r4, #24] <== NOT EXECUTED return RC_OK; 21e8c: e3a08000 mov r8, #0 <== NOT EXECUTED } 21e90: e1a00008 mov r0, r8 <== NOT EXECUTED 21e94: e28dd014 add sp, sp, #20 <== NOT EXECUTED 21e98: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00021b1c : fat_file_ioctl( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, int cmd, ...) { 21b1c: e92d000c push {r2, r3} <== NOT EXECUTED 21b20: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 21b24: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 21b28: 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; 21b2c: e3a03000 mov r3, #0 <== NOT EXECUTED 21b30: 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); 21b34: e28d3018 add r3, sp, #24 <== NOT EXECUTED 21b38: 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; 21b3c: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t *ret; va_list ap; va_start(ap, cmd); switch (cmd) 21b40: 1a00001c bne 21bb8 <== 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 ) 21b44: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED va_start(ap, cmd); switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); 21b48: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED ret = va_arg(ap, uint32_t *); /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 21b4c: e1520003 cmp r2, r3 <== NOT EXECUTED switch (cmd) { case F_CLU_NUM: pos = va_arg(ap, uint32_t ); ret = va_arg(ap, uint32_t *); 21b50: e28d3020 add r3, sp, #32 <== NOT EXECUTED 21b54: e58d3000 str r3, [sp] <== NOT EXECUTED 21b58: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED /* sanity check */ if ( pos >= fat_fd->fat_file_size ) 21b5c: 3a000002 bcc 21b6c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 21b60: eb006ce6 bl 3cf00 <__errno> <== NOT EXECUTED 21b64: e3a03005 mov r3, #5 <== NOT EXECUTED 21b68: ea000014 b 21bc0 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 21b6c: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 21b70: e3530001 cmp r3, #1 <== NOT EXECUTED 21b74: 1a000007 bne 21b98 <== NOT EXECUTED 21b78: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED 21b7c: e3530000 cmp r3, #0 <== NOT EXECUTED 21b80: 1a000004 bne 21b98 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21b84: e5dc500a ldrb r5, [ip, #10] <== NOT EXECUTED 21b88: e3150003 tst r5, #3 <== NOT EXECUTED { /* cluster 0 (zero) reserved for root dir */ *ret = 0; 21b8c: 15843000 strne r3, [r4] <== NOT EXECUTED 21b90: 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))) 21b94: 1a00000b bne 21bc8 <== 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); 21b98: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED 21b9c: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED 21ba0: e28d3004 add r3, sp, #4 <== NOT EXECUTED 21ba4: ebffff64 bl 2193c <== NOT EXECUTED if ( rc != RC_OK ) 21ba8: e3500000 cmp r0, #0 <== NOT EXECUTED return rc; *ret = cur_cln; 21bac: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED 21bb0: 05843000 streq r3, [r4] <== NOT EXECUTED 21bb4: ea000003 b 21bc8 <== NOT EXECUTED break; default: errno = EINVAL; 21bb8: eb006cd0 bl 3cf00 <__errno> <== NOT EXECUTED 21bbc: e3a03016 mov r3, #22 <== NOT EXECUTED 21bc0: e5803000 str r3, [r0] <== NOT EXECUTED 21bc4: e3e00000 mvn r0, #0 <== NOT EXECUTED rc = -1; break; } return rc; } 21bc8: e8bd403c pop {r2, r3, r4, r5, lr} <== NOT EXECUTED 21bcc: e28dd008 add sp, sp, #8 <== NOT EXECUTED 21bd0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0002193c : rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd, uint32_t file_cln, uint32_t *disk_cln ) { 2193c: 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) 21940: e5918034 ldr r8, [r1, #52] ; 0x34 <== NOT EXECUTED 21944: 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 ) { 21948: e1a07003 mov r7, r3 <== NOT EXECUTED 2194c: e1a04001 mov r4, r1 <== NOT EXECUTED 21950: e1a05002 mov r5, r2 <== NOT EXECUTED 21954: 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; 21958: 05913038 ldreq r3, [r1, #56] ; 0x38 <== NOT EXECUTED uint32_t *disk_cln ) { int rc = RC_OK; if (file_cln == fat_fd->map.file_cln) 2195c: 0a000015 beq 219b8 <== NOT EXECUTED uint32_t count; uint32_t i; if (file_cln > fat_fd->map.file_cln) { cur_cln = fat_fd->map.disk_cln; 21960: 85913038 ldrhi r3, [r1, #56] ; 0x38 <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; } else { cur_cln = fat_fd->cln; 21964: 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; 21968: 858d3000 strhi r3, [sp] <== NOT EXECUTED count = file_cln - fat_fd->map.file_cln; 2196c: 80688002 rsbhi r8, r8, r2 <== NOT EXECUTED } else { cur_cln = fat_fd->cln; 21970: 958d3000 strls r3, [sp] <== NOT EXECUTED 21974: 91a08002 movls r8, r2 <== NOT EXECUTED 21978: 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); 2197c: e1a0a00d mov sl, sp <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 21980: ea000005 b 2199c <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21984: e59d1000 ldr r1, [sp] <== NOT EXECUTED 21988: eb005e62 bl 39318 <== NOT EXECUTED if ( rc != RC_OK ) 2198c: e2503000 subs r3, r0, #0 <== NOT EXECUTED return rc; 21990: 11a04fc3 asrne r4, r3, #31 <== NOT EXECUTED 21994: 1a00000a bne 219c4 <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 21998: e2866001 add r6, r6, #1 <== NOT EXECUTED 2199c: e1560008 cmp r6, r8 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 219a0: e1a00009 mov r0, r9 <== NOT EXECUTED 219a4: e1a0200d mov r2, sp <== NOT EXECUTED cur_cln = fat_fd->cln; count = file_cln; } /* skip over the clusters */ for (i = 0; i < count; i++) 219a8: 3afffff5 bcc 21984 <== NOT EXECUTED return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; fat_fd->map.disk_cln = cur_cln; 219ac: e59d3000 ldr r3, [sp] <== NOT EXECUTED if ( rc != RC_OK ) return rc; } /* update cache */ fat_fd->map.file_cln = file_cln; 219b0: e5845034 str r5, [r4, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = cur_cln; 219b4: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED *disk_cln = cur_cln; 219b8: e5873000 str r3, [r7] <== NOT EXECUTED 219bc: e3a04000 mov r4, #0 <== NOT EXECUTED 219c0: e3a03000 mov r3, #0 <== NOT EXECUTED } return RC_OK; } 219c4: e1a01004 mov r1, r4 <== NOT EXECUTED 219c8: e1a00003 mov r0, r3 <== NOT EXECUTED 219cc: e8bd87f8 pop {r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00021ad0 : 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) + 21ad0: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 21ad4: 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 ) { 21ad8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 21adc: e1a04001 mov r4, r1 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; 21ae0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 21ae4: e5946024 ldr r6, [r4, #36] ; 0x24 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 21ae8: e1a00004 mov r0, r4 <== NOT EXECUTED 21aec: ebffaa53 bl c440 <_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 ); 21af0: e1a062a6 lsr r6, r6, #5 <== NOT EXECUTED 21af4: e5953068 ldr r3, [r5, #104] ; 0x68 <== NOT EXECUTED 21af8: e2066001 and r6, r6, #1 <== NOT EXECUTED 21afc: e3a0000c mov r0, #12 <== NOT EXECUTED 21b00: e0203096 mla r0, r6, r0, r3 <== NOT EXECUTED 21b04: e1a01004 mov r1, r4 <== NOT EXECUTED 21b08: ebffaa41 bl c414 <_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; 21b0c: e5d43030 ldrb r3, [r4, #48] ; 0x30 <== NOT EXECUTED 21b10: e3833001 orr r3, r3, #1 <== NOT EXECUTED 21b14: e5c43030 strb r3, [r4, #48] ; 0x30 <== NOT EXECUTED } 21b18: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0002235c : fat_file_open( rtems_filesystem_mount_table_entry_t *mt_entry, fat_dir_pos_t *dir_pos, fat_file_fd_t **fat_fd ) { 2235c: 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) + 22360: e5916000 ldr r6, [r1] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 22364: e3560001 cmp r6, #1 <== NOT EXECUTED 22368: e1a08001 mov r8, r1 <== NOT EXECUTED 2236c: e1a0b000 mov fp, r0 <== NOT EXECUTED 22370: e1a0a002 mov sl, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 22374: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED 22378: 0a00000b beq 223ac <== 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)) ) 2237c: e3560000 cmp r6, #0 <== NOT EXECUTED 22380: 1a000003 bne 22394 <== NOT EXECUTED 22384: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 22388: e3130003 tst r3, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2238c: 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)) ) 22390: 1a000003 bne 223a4 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22394: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED 22398: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 2239c: e2466002 sub r6, r6, #2 <== NOT EXECUTED 223a0: 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) << 223a4: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 223a8: e1a06316 lsl r6, r6, r3 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 223ac: 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) + 223b0: e1a022a3 lsr r2, r3, #5 <== NOT EXECUTED 223b4: e08664a3 add r6, r6, r3, lsr #9 <== NOT EXECUTED 223b8: e202200f and r2, r2, #15 <== NOT EXECUTED 223bc: 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; 223c0: e2063001 and r3, r6, #1 <== NOT EXECUTED 223c4: e3a0200c mov r2, #12 <== NOT EXECUTED 223c8: e0070392 mul r7, r2, r3 <== NOT EXECUTED 223cc: e5943064 ldr r3, [r4, #100] ; 0x64 <== NOT EXECUTED 223d0: 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; 223d4: e2800004 add r0, r0, #4 <== NOT EXECUTED 223d8: e7933007 ldr r3, [r3, r7] <== NOT EXECUTED 223dc: ea00001c b 22454 <== NOT EXECUTED 223e0: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 223e4: 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) + 223e8: e242c002 sub ip, r2, #2 <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 223ec: 0a00000a beq 2241c <== 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)) ) 223f0: e3520000 cmp r2, #0 <== NOT EXECUTED 223f4: 1a000003 bne 22408 <== NOT EXECUTED 223f8: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED 223fc: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 22400: 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)) ) 22404: 1a000002 bne 22414 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22408: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED 2240c: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED 22410: 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) << 22414: e5d41003 ldrb r1, [r4, #3] <== NOT EXECUTED 22418: e1a02112 lsl r2, r2, r1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2241c: 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) 22420: e1a0c2a1 lsr ip, r1, #5 <== NOT EXECUTED 22424: e20cc00f and ip, ip, #15 <== NOT EXECUTED 22428: e08224a1 add r2, r2, r1, lsr #9 <== NOT EXECUTED 2242c: e08c2202 add r2, ip, r2, lsl #4 <== NOT EXECUTED 22430: e1560002 cmp r6, r2 <== NOT EXECUTED 22434: 1a000005 bne 22450 <== 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++; 22438: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED 2243c: e2822001 add r2, r2, #1 <== NOT EXECUTED 22440: 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; 22444: e58a3000 str r3, [sl] <== NOT EXECUTED lfat_fd->links_num++; 22448: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; 2244c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 22450: 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) ; ) 22454: e1530000 cmp r3, r0 <== NOT EXECUTED 22458: 1affffe0 bne 223e0 <== NOT EXECUTED 2245c: ea00004d b 22598 <== 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) + 22460: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED uint32_t cln ) { fat_fs_info_t *fs_info = mt_entry->fs_info; if (cln == 1) 22464: e3520001 cmp r2, #1 <== NOT EXECUTED 22468: 0a00000b beq 2249c <== 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)) ) 2246c: e3520000 cmp r2, #0 <== NOT EXECUTED 22470: 1a000003 bne 22484 <== NOT EXECUTED 22474: e5d4100a ldrb r1, [r4, #10] <== NOT EXECUTED 22478: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 2247c: 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)) ) 22480: 1a000003 bne 22494 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22484: e5d4c005 ldrb ip, [r4, #5] <== NOT EXECUTED 22488: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED 2248c: e2422002 sub r2, r2, #2 <== NOT EXECUTED 22490: 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) << 22494: e5d41003 ldrb r1, [r4, #3] <== NOT EXECUTED 22498: e1a02112 lsl r2, r2, r1 <== NOT EXECUTED (pos->ofs >> FAT_SECTOR512_BITS)) << 4) + 2249c: 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) 224a0: e1a0c2a1 lsr ip, r1, #5 <== NOT EXECUTED 224a4: e08224a1 add r2, r2, r1, lsr #9 <== NOT EXECUTED 224a8: e20cc00f and ip, ip, #15 <== NOT EXECUTED 224ac: e08c2202 add r2, ip, r2, lsl #4 <== NOT EXECUTED 224b0: e1560002 cmp r6, r2 <== NOT EXECUTED 224b4: 1a000004 bne 224cc <== NOT EXECUTED { if ( ((key2) == 0) || ((key2) == ffd->ino) ) 224b8: e3560000 cmp r6, #0 <== NOT EXECUTED 224bc: 0a000007 beq 224e0 <== NOT EXECUTED 224c0: e593200c ldr r2, [r3, #12] <== NOT EXECUTED 224c4: e1560002 cmp r6, r2 <== NOT EXECUTED 224c8: 0a000004 beq 224e0 <== NOT EXECUTED { *ret = (void *)the_node; return 0; } } the_node = the_node->next; 224cc: 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) ; ) 224d0: e1530000 cmp r3, r0 <== NOT EXECUTED 224d4: 1affffe1 bne 22460 <== NOT EXECUTED 224d8: e3e09000 mvn r9, #0 <== NOT EXECUTED 224dc: ea000000 b 224e4 <== NOT EXECUTED 224e0: 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)); 224e4: e3a00044 mov r0, #68 ; 0x44 <== NOT EXECUTED 224e8: ebff9618 bl 7d50 <== NOT EXECUTED if ( lfat_fd == NULL ) 224ec: 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)); 224f0: e1a05000 mov r5, r0 <== NOT EXECUTED 224f4: e58a0000 str r0, [sl] <== NOT EXECUTED if ( lfat_fd == NULL ) 224f8: 1a000004 bne 22510 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 224fc: eb006a7f bl 3cf00 <__errno> <== NOT EXECUTED 22500: e3a0300c mov r3, #12 <== NOT EXECUTED 22504: e5803000 str r3, [r0] <== NOT EXECUTED 22508: e3e00000 mvn r0, #0 <== NOT EXECUTED 2250c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED memset(lfat_fd, 0, sizeof(fat_file_fd_t)); 22510: e3a01000 mov r1, #0 <== NOT EXECUTED 22514: e3a02044 mov r2, #68 ; 0x44 <== NOT EXECUTED 22518: eb0077af bl 403dc <== NOT EXECUTED lfat_fd->links_num = 1; lfat_fd->flags &= ~FAT_FILE_REMOVED; 2251c: e5d5c030 ldrb ip, [r5, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 22520: 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; 22524: e3cce001 bic lr, ip, #1 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; lfat_fd->dir_pos = *dir_pos; 22528: e285c020 add ip, r5, #32 <== NOT EXECUTED if ( rc != RC_OK ) 2252c: 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; 22530: e3e08000 mvn r8, #0 <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; 22534: 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; 22538: e3a03001 mov r3, #1 <== NOT EXECUTED 2253c: e5853008 str r3, [r5, #8] <== NOT EXECUTED lfat_fd->flags &= ~FAT_FILE_REMOVED; 22540: e5c5e030 strb lr, [r5, #48] ; 0x30 <== NOT EXECUTED lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE; 22544: e585803c str r8, [r5, #60] ; 0x3c <== NOT EXECUTED lfat_fd->dir_pos = *dir_pos; if ( rc != RC_OK ) lfat_fd->ino = key; 22548: 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 ) 2254c: 1a00000b bne 22580 <== NOT EXECUTED lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 22550: e1a0000b mov r0, fp <== NOT EXECUTED 22554: eb000024 bl 225ec <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 22558: e3500000 cmp r0, #0 <== NOT EXECUTED if ( rc != RC_OK ) lfat_fd->ino = key; else { lfat_fd->ino = fat_get_unique_ino(mt_entry); 2255c: e585000c str r0, [r5, #12] <== NOT EXECUTED if ( lfat_fd->ino == 0 ) 22560: 1a000006 bne 22580 <== NOT EXECUTED { free((*fat_fd)); 22564: e59a0000 ldr r0, [sl] <== NOT EXECUTED 22568: ebff9451 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 ); 2256c: eb006a63 bl 3cf00 <__errno> <== NOT EXECUTED 22570: e3a0300c mov r3, #12 <== NOT EXECUTED 22574: e5803000 str r3, [r0] <== NOT EXECUTED 22578: e1a00008 mov r0, r8 <== NOT EXECUTED 2257c: 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 ); 22580: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22584: e1a01005 mov r1, r5 <== NOT EXECUTED 22588: e0800007 add r0, r0, r7 <== NOT EXECUTED 2258c: ebffa7a0 bl c414 <_Chain_Append> <== NOT EXECUTED 22590: e3a00000 mov r0, #0 <== NOT EXECUTED * other fields of fat-file descriptor will be initialized on upper * level */ return RC_OK; } 22594: 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; 22598: e5943068 ldr r3, [r4, #104] ; 0x68 <== NOT EXECUTED 2259c: e0830007 add r0, r3, r7 <== NOT EXECUTED 225a0: e2800004 add r0, r0, #4 <== NOT EXECUTED 225a4: e7933007 ldr r3, [r3, r7] <== NOT EXECUTED 225a8: eaffffc8 b 224d0 <== NOT EXECUTED =============================================================================== 000220d0 : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 220d0: 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) 220d4: e2535000 subs r5, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, uint8_t *buf ) { 220d8: e1a08000 mov r8, r0 <== NOT EXECUTED 220dc: e1a06001 mov r6, r1 <== NOT EXECUTED 220e0: e1a07002 mov r7, r2 <== NOT EXECUTED int rc = RC_OK; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 220e4: 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) 220e8: 0a00006d beq 222a4 <== NOT EXECUTED /* * >= because start is offset and computed from 0 and file_size * computed from 1 */ if ( start >= fat_fd->fat_file_size ) 220ec: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 220f0: e1520003 cmp r2, r3 <== NOT EXECUTED 220f4: 2a00006a bcs 222a4 <== NOT EXECUTED return FAT_EOF; if ((count > fat_fd->fat_file_size) || 220f8: e1550003 cmp r5, r3 <== NOT EXECUTED 220fc: 8a000002 bhi 2210c <== NOT EXECUTED 22100: e0652003 rsb r2, r5, r3 <== NOT EXECUTED 22104: e1570002 cmp r7, r2 <== NOT EXECUTED 22108: 9a000000 bls 22110 <== NOT EXECUTED (start > fat_fd->fat_file_size - count)) count = fat_fd->fat_file_size - start; 2210c: e0675003 rsb r5, 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 { 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; 22118: e3a03000 mov r3, #0 <== NOT EXECUTED 2211c: 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)) && 22120: 1a000019 bne 2218c <== NOT EXECUTED 22124: e5963024 ldr r3, [r6, #36] ; 0x24 <== NOT EXECUTED 22128: e3530000 cmp r3, #0 <== NOT EXECUTED 2212c: 1a000016 bne 2218c <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 22130: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 22134: e3130003 tst r3, #3 <== NOT EXECUTED 22138: 0a000013 beq 2218c <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 2213c: 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)) ) 22140: e3520000 cmp r2, #0 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22144: 15d40005 ldrbne r0, [r4, #5] <== NOT EXECUTED 22148: 15941030 ldrne r1, [r4, #48] ; 0x30 <== NOT EXECUTED 2214c: 12423002 subne r3, r2, #2 <== NOT EXECUTED 22150: 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); 22154: 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; 22158: 0594301c ldreq r3, [r4, #28] <== NOT EXECUTED 2215c: e5d41002 ldrb r1, [r4, #2] <== NOT EXECUTED 22160: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED 22164: e2422001 sub r2, r2, #1 <== NOT EXECUTED 22168: e0831137 add r1, r3, r7, lsr r1 <== NOT EXECUTED 2216c: e0072002 and r2, r7, r2 <== NOT EXECUTED 22170: e1a00008 mov r0, r8 <== NOT EXECUTED 22174: e1a03005 mov r3, r5 <== NOT EXECUTED 22178: e58dc000 str ip, [sp] <== NOT EXECUTED 2217c: eb0002c9 bl 22ca8 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 22180: e3500000 cmp r0, #0 <== NOT EXECUTED 22184: aa000049 bge 222b0 <== NOT EXECUTED 22188: ea000047 b 222ac <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 2218c: e5d43008 ldrb r3, [r4, #8] <== NOT EXECUTED 22190: 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); 22194: e28db00c add fp, sp, #12 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 22198: 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); 2219c: e1a02003 mov r2, r3 <== NOT EXECUTED 221a0: e1a00008 mov r0, r8 <== NOT EXECUTED 221a4: e1a01006 mov r1, r6 <== NOT EXECUTED 221a8: 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); 221ac: e1d4a0b6 ldrh sl, [r4, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 221b0: ebfffde1 bl 2193c <== NOT EXECUTED if (rc != RC_OK) 221b4: e3500000 cmp r0, #0 <== NOT EXECUTED 221b8: 1a00003c bne 222b0 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 221bc: e24aa001 sub sl, sl, #1 <== NOT EXECUTED 221c0: e007a00a and sl, r7, sl <== NOT EXECUTED 221c4: e58da004 str sl, [sp, #4] <== NOT EXECUTED 221c8: e1a0100a mov r1, sl <== NOT EXECUTED 221cc: e1a09000 mov r9, r0 <== NOT EXECUTED 221d0: e1a0a000 mov sl, r0 <== NOT EXECUTED 221d4: ea000026 b 22274 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 221d8: e1d4c0b6 ldrh ip, [r4, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 221dc: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 221e0: e061c00c rsb ip, r1, ip <== NOT EXECUTED 221e4: e15c0005 cmp ip, r5 <== NOT EXECUTED 221e8: 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)) ) 221ec: 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; 221f0: 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) + 221f4: 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)) ) 221f8: 1a000003 bne 2220c <== NOT EXECUTED 221fc: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED 22200: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 22204: 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)) ) 22208: 1a000002 bne 22218 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 2220c: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 22210: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 22214: 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); 22218: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 2221c: e5d49002 ldrb r9, [r4, #2] <== NOT EXECUTED 22220: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED 22224: e2422001 sub r2, r2, #1 <== NOT EXECUTED 22228: e083e00a add lr, r3, sl <== NOT EXECUTED 2222c: e0012002 and r2, r1, r2 <== NOT EXECUTED 22230: e1a0300c mov r3, ip <== NOT EXECUTED 22234: e1a00008 mov r0, r8 <== NOT EXECUTED 22238: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED 2223c: e58de000 str lr, [sp] <== NOT EXECUTED if ( ret < 0 ) return -1; count -= c; cmpltd += c; 22240: 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; 22244: 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); 22248: eb000296 bl 22ca8 <_fat_block_read> <== NOT EXECUTED if ( ret < 0 ) 2224c: 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); 22250: e1a0200b mov r2, fp <== NOT EXECUTED 22254: 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 ) 22258: ba000013 blt 222ac <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 2225c: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22260: e1a01009 mov r1, r9 <== NOT EXECUTED 22264: eb005c2b bl 39318 <== NOT EXECUTED if ( rc != RC_OK ) 22268: e3500000 cmp r0, #0 <== NOT EXECUTED 2226c: 1a00000f bne 222b0 <== NOT EXECUTED ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 22270: 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) 22274: e3550000 cmp r5, #0 <== NOT EXECUTED 22278: 1affffd6 bne 221d8 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2227c: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 22280: e5d43008 ldrb r3, [r4, #8] <== NOT EXECUTED 22284: e24c7001 sub r7, ip, #1 <== NOT EXECUTED 22288: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 2228c: e087700a add r7, r7, sl <== NOT EXECUTED 22290: 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; 22294: 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 + 22298: 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; 2229c: e1a0000a mov r0, sl <== NOT EXECUTED 222a0: ea000002 b 222b0 <== NOT EXECUTED 222a4: e3a00000 mov r0, #0 <== NOT EXECUTED 222a8: ea000000 b 222b0 <== NOT EXECUTED 222ac: e3e00000 mvn r0, #0 <== NOT EXECUTED } 222b0: e28dd010 add sp, sp, #16 <== NOT EXECUTED 222b4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00021884 : * RC_OK */ int fat_file_reopen(fat_file_fd_t *fat_fd) { fat_fd->links_num++; 21884: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED 21888: e2833001 add r3, r3, #1 <== NOT EXECUTED 2188c: e5803008 str r3, [r0, #8] <== NOT EXECUTED return RC_OK; } 21890: e3a00000 mov r0, #0 <== NOT EXECUTED 21894: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00021898 : 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)) && 21898: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED 2189c: e3530001 cmp r3, #1 <== NOT EXECUTED int fat_file_size( rtems_filesystem_mount_table_entry_t *mt_entry, fat_file_fd_t *fat_fd ) { 218a0: 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; 218a4: 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 ) { 218a8: e1a04001 mov r4, r1 <== NOT EXECUTED 218ac: e1a08000 mov r8, r0 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 218b0: 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)) && 218b4: 1a000007 bne 218d8 <== NOT EXECUTED 218b8: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED 218bc: e3500000 cmp r0, #0 <== NOT EXECUTED 218c0: 1a000004 bne 218d8 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 218c4: e5d5200a ldrb r2, [r5, #10] <== NOT EXECUTED 218c8: e3120003 tst r2, #3 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; 218cc: 15953028 ldrne r3, [r5, #40] ; 0x28 <== NOT EXECUTED 218d0: 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))) 218d4: 1a000017 bne 21938 <== NOT EXECUTED { fat_fd->fat_file_size = fs_info->vol.rdir_size; return rc; } fat_fd->fat_file_size = 0; 218d8: 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; 218dc: e28d6004 add r6, sp, #4 <== NOT EXECUTED 218e0: 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; 218e4: e584c018 str ip, [r4, #24] <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 218e8: ea000007 b 2190c <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 218ec: eb005e89 bl 39318 <== NOT EXECUTED if ( rc != RC_OK ) 218f0: e3500000 cmp r0, #0 <== NOT EXECUTED 218f4: 1a00000f bne 21938 <== NOT EXECUTED return rc; fat_fd->fat_file_size += fs_info->vol.bpc; 218f8: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED 218fc: e1d530b6 ldrh r3, [r5, #6] <== NOT EXECUTED 21900: e0823003 add r3, r2, r3 <== NOT EXECUTED 21904: e5843018 str r3, [r4, #24] <== NOT EXECUTED 21908: 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) 2190c: e59d7000 ldr r7, [sp] <== NOT EXECUTED 21910: e285300c add r3, r5, #12 <== NOT EXECUTED 21914: e8930408 ldm r3, {r3, sl} <== NOT EXECUTED 21918: e0073003 and r3, r7, r3 <== NOT EXECUTED 2191c: e153000a cmp r3, sl <== NOT EXECUTED { save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 21920: e1a00008 mov r0, r8 <== NOT EXECUTED 21924: e1a0200d mov r2, sp <== NOT EXECUTED 21928: 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) 2192c: 3affffee bcc 218ec <== NOT EXECUTED if ( rc != RC_OK ) return rc; fat_fd->fat_file_size += fs_info->vol.bpc; } fat_fd->map.last_cln = save_cln; 21930: e584c03c str ip, [r4, #60] ; 0x3c <== NOT EXECUTED 21934: e3a00000 mov r0, #0 <== NOT EXECUTED return rc; } 21938: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00021bd4 : 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 ) 21bd4: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED 21bd8: 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 ) { 21bdc: e92d4073 push {r0, r1, r4, r5, r6, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 21be0: 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 ) { 21be4: e1a05001 mov r5, r1 <== NOT EXECUTED 21be8: 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 ) 21bec: 2a000030 bcs 21cb4 <== 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; 21bf0: e3a04000 mov r4, #0 <== NOT EXECUTED 21bf4: e58d4004 str r4, [sp, #4] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 21bf8: 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; 21bfc: e3e04000 mvn r4, #0 <== NOT EXECUTED 21c00: e58d4000 str r4, [sp] <== NOT EXECUTED if ( new_length >= fat_fd->fat_file_size ) return rc; assert(fat_fd->fat_file_size); 21c04: 059f00b0 ldreq r0, [pc, #176] ; 21cbc <== NOT EXECUTED 21c08: 059f10b0 ldreq r1, [pc, #176] ; 21cc0 <== NOT EXECUTED 21c0c: 059f20b0 ldreq r2, [pc, #176] ; 21cc4 <== NOT EXECUTED 21c10: 059f30b0 ldreq r3, [pc, #176] ; 21cc8 <== NOT EXECUTED 21c14: 0b000c06 bleq 24c34 <__assert_func> <== NOT EXECUTED cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2; 21c18: e1dc40b6 ldrh r4, [ip, #6] <== NOT EXECUTED 21c1c: e5dcc008 ldrb ip, [ip, #8] <== NOT EXECUTED 21c20: e2444001 sub r4, r4, #1 <== NOT EXECUTED 21c24: e0844002 add r4, r4, r2 <== NOT EXECUTED 21c28: e1a04c34 lsr r4, r4, ip <== NOT EXECUTED if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size) 21c2c: e1530c14 cmp r3, r4, lsl ip <== NOT EXECUTED 21c30: 9a00001f bls 21cb4 <== NOT EXECUTED return RC_OK; if (cl_start != 0) 21c34: e3540000 cmp r4, #0 <== NOT EXECUTED 21c38: 0a000004 beq 21c50 <== NOT EXECUTED { rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln); 21c3c: e2442001 sub r2, r4, #1 <== NOT EXECUTED 21c40: e1a0300d mov r3, sp <== NOT EXECUTED 21c44: ebffff3c bl 2193c <== NOT EXECUTED if (rc != RC_OK) 21c48: e3500000 cmp r0, #0 <== NOT EXECUTED 21c4c: 1a000019 bne 21cb8 <== NOT EXECUTED return rc; } rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 21c50: e1a00006 mov r0, r6 <== NOT EXECUTED 21c54: e1a01005 mov r1, r5 <== NOT EXECUTED 21c58: e1a02004 mov r2, r4 <== NOT EXECUTED 21c5c: e28d3004 add r3, sp, #4 <== NOT EXECUTED 21c60: ebffff35 bl 2193c <== NOT EXECUTED if (rc != RC_OK) 21c64: e3500000 cmp r0, #0 <== NOT EXECUTED 21c68: 1a000012 bne 21cb8 <== NOT EXECUTED return rc; rc = fat_free_fat_clusters_chain(mt_entry, cur_cln); 21c6c: e1a00006 mov r0, r6 <== NOT EXECUTED 21c70: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 21c74: eb005e01 bl 39480 <== NOT EXECUTED if (rc != RC_OK) 21c78: e3500000 cmp r0, #0 <== NOT EXECUTED 21c7c: 1a00000d bne 21cb8 <== NOT EXECUTED return rc; if (cl_start != 0) 21c80: e3540000 cmp r4, #0 <== NOT EXECUTED 21c84: 0a00000b beq 21cb8 <== NOT EXECUTED { rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC); 21c88: e1a00006 mov r0, r6 <== NOT EXECUTED 21c8c: e59d1000 ldr r1, [sp] <== NOT EXECUTED 21c90: e3e02000 mvn r2, #0 <== NOT EXECUTED 21c94: eb005d07 bl 390b8 <== NOT EXECUTED if ( rc != RC_OK ) 21c98: e3500000 cmp r0, #0 <== NOT EXECUTED return rc; fat_fd->map.file_cln = cl_start - 1; fat_fd->map.disk_cln = new_last_cln; 21c9c: 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; 21ca0: 02444001 subeq r4, r4, #1 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; fat_fd->map.last_cln = new_last_cln; 21ca4: 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; 21ca8: 05854034 streq r4, [r5, #52] ; 0x34 <== NOT EXECUTED fat_fd->map.disk_cln = new_last_cln; 21cac: 05853038 streq r3, [r5, #56] ; 0x38 <== NOT EXECUTED 21cb0: ea000000 b 21cb8 <== NOT EXECUTED fat_fd->map.last_cln = new_last_cln; 21cb4: e3a00000 mov r0, #0 <== NOT EXECUTED } return RC_OK; } 21cb8: e8bd807c pop {r2, r3, r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00021e9c : fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 21e9c: 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 ) 21ea0: e2534000 subs r4, r3, #0 <== NOT EXECUTED fat_file_fd_t *fat_fd, uint32_t start, uint32_t count, const uint8_t *buf ) { 21ea4: e1a06001 mov r6, r1 <== NOT EXECUTED 21ea8: e1a08000 mov r8, r0 <== NOT EXECUTED 21eac: e1a07002 mov r7, r2 <== NOT EXECUTED int rc = 0; ssize_t ret = 0; fat_fs_info_t *fs_info = mt_entry->fs_info; 21eb0: 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 ) 21eb4: 01a01004 moveq r1, r4 <== NOT EXECUTED 21eb8: 0a000081 beq 220c4 <== NOT EXECUTED return cmpltd; if ( start > fat_fd->fat_file_size ) 21ebc: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED 21ec0: 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; 21ec4: 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; 21ec8: 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; 21ecc: e58d300c str r3, [sp, #12] <== NOT EXECUTED uint32_t c = 0; if ( count == 0 ) return cmpltd; if ( start > fat_fd->fat_file_size ) 21ed0: 8a000005 bhi 21eec <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ((count > fat_fd->size_limit) || 21ed4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED 21ed8: e1540003 cmp r4, r3 <== NOT EXECUTED 21edc: 8a000002 bhi 21eec <== NOT EXECUTED 21ee0: e0643003 rsb r3, r4, r3 <== NOT EXECUTED 21ee4: e1520003 cmp r2, r3 <== NOT EXECUTED 21ee8: 9a000003 bls 21efc <== NOT EXECUTED (start > fat_fd->size_limit - count)) rtems_set_errno_and_return_minus_one( EIO ); 21eec: eb006c03 bl 3cf00 <__errno> <== NOT EXECUTED 21ef0: e3a03005 mov r3, #5 <== NOT EXECUTED 21ef4: e5803000 str r3, [r0] <== NOT EXECUTED 21ef8: ea000070 b 220c0 <== NOT EXECUTED rc = fat_file_extend(mt_entry, fat_fd, start + count, &c); 21efc: e084a002 add sl, r4, r2 <== NOT EXECUTED 21f00: e1a0200a mov r2, sl <== NOT EXECUTED 21f04: e28d3008 add r3, sp, #8 <== NOT EXECUTED 21f08: ebffff6f bl 21ccc <== NOT EXECUTED if (rc != RC_OK) 21f0c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 21f10: 1a00006b bne 220c4 <== NOT EXECUTED /* * check whether there was enough room on device to locate * file of 'start + count' bytes */ if (c != (start + count)) 21f14: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED 21f18: e153000a cmp r3, sl <== NOT EXECUTED count = c - start; 21f1c: 10674003 rsbne r4, r7, r3 <== NOT EXECUTED if ((FAT_FD_OF_ROOT_DIR(fat_fd)) && 21f20: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED 21f24: e3530001 cmp r3, #1 <== NOT EXECUTED 21f28: 1a00001e bne 21fa8 <== NOT EXECUTED 21f2c: e5963024 ldr r3, [r6, #36] ; 0x24 <== NOT EXECUTED 21f30: e3530000 cmp r3, #0 <== NOT EXECUTED 21f34: 1a00001b bne 21fa8 <== NOT EXECUTED (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16))) 21f38: e5d5300a ldrb r3, [r5, #10] <== NOT EXECUTED 21f3c: e3130003 tst r3, #3 <== NOT EXECUTED 21f40: 0a000018 beq 21fa8 <== NOT EXECUTED { sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln); 21f44: 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)) ) 21f48: 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; 21f4c: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) ) 21f50: 1a000003 bne 21f64 <== NOT EXECUTED 21f54: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED 21f58: e3110003 tst r1, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 21f5c: 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)) ) 21f60: 1a000003 bne 21f74 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 21f64: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED 21f68: e5d30005 ldrb r0, [r3, #5] <== NOT EXECUTED 21f6c: e2423002 sub r3, r2, #2 <== NOT EXECUTED 21f70: 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); 21f74: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED 21f78: e5d51002 ldrb r1, [r5, #2] <== NOT EXECUTED 21f7c: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED 21f80: e2422001 sub r2, r2, #1 <== NOT EXECUTED 21f84: e0831137 add r1, r3, r7, lsr r1 <== NOT EXECUTED 21f88: e0072002 and r2, r7, r2 <== NOT EXECUTED 21f8c: e1a00008 mov r0, r8 <== NOT EXECUTED 21f90: e1a03004 mov r3, r4 <== NOT EXECUTED 21f94: e58dc000 str ip, [sp] <== NOT EXECUTED 21f98: eb000287 bl 229bc <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 21f9c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 21fa0: aa000047 bge 220c4 <== NOT EXECUTED 21fa4: ea000045 b 220c0 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 21fa8: e5d53008 ldrb r3, [r5, #8] <== NOT EXECUTED 21fac: 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); 21fb0: e28da00c add sl, sp, #12 <== NOT EXECUTED return -1; return ret; } cl_start = start >> fs_info->vol.bpc_log2; 21fb4: 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); 21fb8: e1a02003 mov r2, r3 <== NOT EXECUTED 21fbc: e1a00008 mov r0, r8 <== NOT EXECUTED 21fc0: e1a01006 mov r1, r6 <== NOT EXECUTED 21fc4: 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); 21fc8: e1d5b0b6 ldrh fp, [r5, #6] <== NOT EXECUTED rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln); 21fcc: ebfffe5a bl 2193c <== NOT EXECUTED if (rc != RC_OK) 21fd0: 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); 21fd4: e1a01000 mov r1, r0 <== NOT EXECUTED if (rc != RC_OK) 21fd8: 1a000039 bne 220c4 <== NOT EXECUTED return ret; } cl_start = start >> fs_info->vol.bpc_log2; save_ofs = ofs = start & (fs_info->vol.bpc - 1); 21fdc: e24bb001 sub fp, fp, #1 <== NOT EXECUTED 21fe0: e007b00b and fp, r7, fp <== NOT EXECUTED 21fe4: e1a09000 mov r9, r0 <== NOT EXECUTED 21fe8: e1a0100b mov r1, fp <== NOT EXECUTED 21fec: e1a0a000 mov sl, r0 <== NOT EXECUTED 21ff0: ea000027 b 22094 <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 21ff4: e1d5c0b6 ldrh ip, [r5, #6] <== NOT EXECUTED sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln); 21ff8: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 21ffc: e061c00c rsb ip, r1, ip <== NOT EXECUTED 22000: e15c0004 cmp ip, r4 <== NOT EXECUTED 22004: 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)) ) 22008: 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; 2200c: 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) + 22010: 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)) ) 22014: 1a000003 bne 22028 <== NOT EXECUTED 22018: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED 2201c: e3120003 tst r2, #3 <== NOT EXECUTED return fs_info->vol.rdir_loc; 22020: 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)) ) 22024: 1a000002 bne 22034 <== NOT EXECUTED return fs_info->vol.rdir_loc; return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) + 22028: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED 2202c: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED 22030: 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); 22034: 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); 22038: 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); 2203c: 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); 22040: e2422001 sub r2, r2, #1 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); 22044: e0012002 and r2, r1, r2 <== NOT EXECUTED 22048: e080e00a add lr, r0, sl <== NOT EXECUTED 2204c: e1a0300c mov r3, ip <== NOT EXECUTED 22050: e1a00008 mov r0, r8 <== NOT EXECUTED 22054: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED 22058: e58de000 str lr, [sp] <== NOT EXECUTED if (rc != RC_OK) return rc; while (count > 0) { c = MIN(count, (fs_info->vol.bpc - ofs)); 2205c: 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); 22060: eb000255 bl 229bc <_fat_block_write> <== NOT EXECUTED if ( ret < 0 ) 22064: 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); 22068: e28d200c add r2, sp, #12 <== NOT EXECUTED 2206c: 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 ) 22070: ba000012 blt 220c0 <== NOT EXECUTED return -1; count -= c; cmpltd += c; save_cln = cur_cln; 22074: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22078: e1a01009 mov r1, r9 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; 2207c: e59d7008 ldr r7, [sp, #8] <== NOT EXECUTED cmpltd += c; save_cln = cur_cln; rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22080: eb005ca4 bl 39318 <== NOT EXECUTED if ( rc != RC_OK ) 22084: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22088: 1a00000d bne 220c4 <== NOT EXECUTED ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd); if ( ret < 0 ) return -1; count -= c; cmpltd += c; 2208c: 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; 22090: 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) 22094: e3540000 cmp r4, #0 <== NOT EXECUTED 22098: 1affffd5 bne 21ff4 <== NOT EXECUTED ofs = 0; } /* update cache */ /* XXX: check this - I'm not sure :( */ fat_fd->map.file_cln = cl_start + 2209c: e5d53008 ldrb r3, [r5, #8] <== NOT EXECUTED 220a0: e24bb001 sub fp, fp, #1 <== NOT EXECUTED 220a4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED 220a8: e08bb00a add fp, fp, sl <== NOT EXECUTED 220ac: 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; 220b0: 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 + 220b4: 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; 220b8: e1a0100a mov r1, sl <== NOT EXECUTED 220bc: ea000000 b 220c4 <== NOT EXECUTED 220c0: e3e01000 mvn r1, #0 <== NOT EXECUTED } 220c4: e1a00001 mov r0, r1 <== NOT EXECUTED 220c8: e28dd010 add sp, sp, #16 <== NOT EXECUTED 220cc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00039480 : int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 39480: 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; 39484: e3a03000 mov r3, #0 <== NOT EXECUTED 39488: e28da004 add sl, sp, #4 <== NOT EXECUTED int fat_free_fat_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t chain ) { 3948c: e1a08000 mov r8, r0 <== NOT EXECUTED 39490: 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; 39494: e1a05003 mov r5, r3 <== NOT EXECUTED 39498: 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; 3949c: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = chain; uint32_t next_cln = 0; 394a0: e1a06001 mov r6, r1 <== NOT EXECUTED 394a4: e1a07003 mov r7, r3 <== NOT EXECUTED uint32_t freed_cls_cnt = 0; while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) 394a8: ea000011 b 394f4 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 394ac: ebffff99 bl 39318 <== NOT EXECUTED fat_buf_release(fs_info); return rc; } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 394b0: 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 ) 394b4: 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); 394b8: e1a02006 mov r2, r6 <== NOT EXECUTED 394bc: 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 ) 394c0: 0a000006 beq 394e0 <== NOT EXECUTED { if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 394c4: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED 394c8: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 394cc: 10855003 addne r5, r5, r3 <== NOT EXECUTED 394d0: 15845040 strne r5, [r4, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 394d4: e1a00004 mov r0, r4 <== NOT EXECUTED 394d8: ebffa471 bl 226a4 <== NOT EXECUTED return rc; 394dc: ea000014 b 39534 <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE); 394e0: ebfffef4 bl 390b8 <== NOT EXECUTED if ( rc != RC_OK ) rc1 = rc; freed_cls_cnt++; cur_cln = next_cln; 394e4: 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 ) 394e8: e3500000 cmp r0, #0 <== NOT EXECUTED 394ec: 11a07000 movne r7, r0 <== NOT EXECUTED rc1 = rc; freed_cls_cnt++; 394f0: 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) 394f4: e284300c add r3, r4, #12 <== NOT EXECUTED 394f8: e8931008 ldm r3, {r3, ip} <== NOT EXECUTED 394fc: e0063003 and r3, r6, r3 <== NOT EXECUTED 39500: e153000c cmp r3, ip <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln); 39504: e1a01006 mov r1, r6 <== NOT EXECUTED 39508: e1a0200d mov r2, sp <== NOT EXECUTED 3950c: 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) 39510: 3affffe5 bcc 394ac <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE) 39514: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED 39518: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls += freed_cls_cnt; 3951c: 10855003 addne r5, r5, r3 <== NOT EXECUTED freed_cls_cnt++; cur_cln = next_cln; } fs_info->vol.next_cl = chain; 39520: 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; 39524: 15845040 strne r5, [r4, #64] ; 0x40 <== NOT EXECUTED fat_buf_release(fs_info); 39528: e1a00004 mov r0, r4 <== NOT EXECUTED 3952c: ebffa45c bl 226a4 <== NOT EXECUTED 39530: e1a06007 mov r6, r7 <== NOT EXECUTED if (rc1 != RC_OK) return rc1; return RC_OK; } 39534: e1a00006 mov r0, r6 <== NOT EXECUTED 39538: e8bd87f8 pop {r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 000225ac : 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; 225ac: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino); 225b0: e5932078 ldr r2, [r3, #120] ; 0x78 <== NOT EXECUTED 225b4: e593306c ldr r3, [r3, #108] ; 0x6c <== NOT EXECUTED 225b8: e0622001 rsb r2, r2, r1 <== NOT EXECUTED 225bc: e7d301a2 ldrb r0, [r3, r2, lsr #3] <== NOT EXECUTED 225c0: e2021007 and r1, r2, #7 <== NOT EXECUTED 225c4: e3a0c001 mov ip, #1 <== NOT EXECUTED 225c8: e1c0111c bic r1, r0, ip, lsl r1 <== NOT EXECUTED 225cc: e7c311a2 strb r1, [r3, r2, lsr #3] <== NOT EXECUTED } 225d0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00039318 : fat_get_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t *ret_val ) { 39318: 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; 3931c: 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)) ) 39320: 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 ) { 39324: 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; 39328: 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 ) { 3932c: e1a05002 mov r5, r2 <== NOT EXECUTED int rc = RC_OK; register fat_fs_info_t *fs_info = mt_entry->fs_info; 39330: 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)) ) 39334: 9a00004b bls 39468 <== NOT EXECUTED 39338: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED 3933c: e2833001 add r3, r3, #1 <== NOT EXECUTED 39340: e1510003 cmp r1, r3 <== NOT EXECUTED 39344: 8a000047 bhi 39468 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 39348: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED 3934c: e2130001 ands r0, r3, #1 <== NOT EXECUTED 39350: 108120a1 addne r2, r1, r1, lsr #1 <== NOT EXECUTED 39354: 1a000002 bne 39364 <== NOT EXECUTED 39358: e3130002 tst r3, #2 <== NOT EXECUTED 3935c: 11a02081 lslne r2, r1, #1 <== NOT EXECUTED 39360: 01a02101 lsleq r2, r1, #2 <== NOT EXECUTED 39364: e5d6a002 ldrb sl, [r6, #2] <== NOT EXECUTED 39368: 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); 3936c: 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) + 39370: 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); 39374: 108480a4 addne r8, r4, r4, lsr #1 <== NOT EXECUTED 39378: 1a000002 bne 39388 <== NOT EXECUTED 3937c: e3130002 tst r3, #2 <== NOT EXECUTED 39380: 11a08084 lslne r8, r4, #1 <== NOT EXECUTED 39384: 01a08104 lsleq r8, r4, #2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39388: e1a00006 mov r0, r6 <== NOT EXECUTED 3938c: e1a0100a mov r1, sl <== NOT EXECUTED 39390: e3a02001 mov r2, #1 <== NOT EXECUTED 39394: 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); 39398: e1d6b0b0 ldrh fp, [r6] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3939c: ebffa510 bl 227e4 <== NOT EXECUTED if (rc != RC_OK) 393a0: 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); 393a4: e1a0900d mov r9, sp <== NOT EXECUTED if (rc != RC_OK) 393a8: 1a000032 bne 39478 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 393ac: 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); 393b0: 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 ) 393b4: 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); 393b8: 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 ) 393bc: 0a000020 beq 39444 <== NOT EXECUTED 393c0: e3520004 cmp r2, #4 <== NOT EXECUTED 393c4: 0a000022 beq 39454 <== NOT EXECUTED 393c8: e3520001 cmp r2, #1 <== NOT EXECUTED 393cc: 1a000025 bne 39468 <== 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))); 393d0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 393d4: e593b020 ldr fp, [r3, #32] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 393d8: 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))); 393dc: e7db3008 ldrb r3, [fp, r8] <== NOT EXECUTED if ( ofs == (fs_info->vol.bps - 1) ) 393e0: e2411001 sub r1, r1, #1 <== NOT EXECUTED 393e4: 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))); 393e8: e5853000 str r3, [r5] <== NOT EXECUTED *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 393ec: 108b8008 addne r8, fp, r8 <== NOT EXECUTED 393f0: 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) ) 393f4: 1a00000a bne 39424 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 393f8: e1a00006 mov r0, r6 <== NOT EXECUTED 393fc: e28a1001 add r1, sl, #1 <== NOT EXECUTED 39400: e1a0300d mov r3, sp <== NOT EXECUTED 39404: ebffa4f6 bl 227e4 <== NOT EXECUTED &block0); if (rc != RC_OK) 39408: e3500000 cmp r0, #0 <== NOT EXECUTED 3940c: 11a07000 movne r7, r0 <== NOT EXECUTED 39410: 1a000018 bne 39478 <== NOT EXECUTED return rc; *ret_val |= (*((uint8_t *)(block0->buffer)))<<8; 39414: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39418: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3941c: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 39420: e5953000 ldr r3, [r5] <== NOT EXECUTED } else { *ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8; 39424: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 39428: e5853000 str r3, [r5] <== NOT EXECUTED 3942c: e5953000 ldr r3, [r5] <== NOT EXECUTED } if ( FAT_CLUSTER_IS_ODD(cln) ) 39430: e3140001 tst r4, #1 <== NOT EXECUTED *ret_val = (*ret_val) >> FAT12_SHIFT; else *ret_val = (*ret_val) & FAT_FAT12_MASK; 39434: 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; 39438: 11a03223 lsrne r3, r3, #4 <== NOT EXECUTED else *ret_val = (*ret_val) & FAT_FAT12_MASK; 3943c: 01a03a23 lsreq r3, r3, #20 <== NOT EXECUTED 39440: ea000006 b 39460 <== NOT EXECUTED break; case FAT_FAT16: *ret_val = *((uint16_t *)(block0->buffer + ofs)); *ret_val = CF_LE_W(*ret_val); 39444: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39448: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3944c: e19330b8 ldrh r3, [r3, r8] <== NOT EXECUTED 39450: ea000002 b 39460 <== NOT EXECUTED break; case FAT_FAT32: *ret_val = *((uint32_t *)(block0->buffer + ofs)); *ret_val = CF_LE_L(*ret_val); 39454: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39458: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3945c: e7933008 ldr r3, [r3, r8] <== NOT EXECUTED 39460: e5853000 str r3, [r5] <== NOT EXECUTED break; 39464: ea000003 b 39478 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one(EIO); 39468: eb000ea4 bl 3cf00 <__errno> <== NOT EXECUTED 3946c: e3a03005 mov r3, #5 <== NOT EXECUTED 39470: e5803000 str r3, [r0] <== NOT EXECUTED 39474: e3e07000 mvn r7, #0 <== NOT EXECUTED break; } return RC_OK; } 39478: e1a00007 mov r0, r7 <== NOT EXECUTED 3947c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000225ec : * 0 means FAILED !!! * */ uint32_t fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry) { 225ec: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED register fat_fs_info_t *fs_info = mt_entry->fs_info; 225f0: 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++) 225f4: e3a05000 mov r5, #0 <== NOT EXECUTED 225f8: ea000024 b 22690 <== NOT EXECUTED { if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino)) 225fc: e5943070 ldr r3, [r4, #112] ; 0x70 <== NOT EXECUTED 22600: e594706c ldr r7, [r4, #108] ; 0x6c <== NOT EXECUTED 22604: e7d701a3 ldrb r0, [r7, r3, lsr #3] <== NOT EXECUTED 22608: e203c007 and ip, r3, #7 <== NOT EXECUTED 2260c: e1a08c50 asr r8, r0, ip <== NOT EXECUTED 22610: 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++; 22614: 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)) 22618: e08731a3 add r3, r7, r3, lsr #3 <== NOT EXECUTED 2261c: 1a000006 bne 2263c <== NOT EXECUTED { FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino); 22620: e3a02001 mov r2, #1 <== NOT EXECUTED 22624: e1800c12 orr r0, r0, r2, lsl ip <== NOT EXECUTED 22628: e5c30000 strb r0, [r3] <== NOT EXECUTED return (fs_info->uino_base + fs_info->index); 2262c: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 22630: e5940070 ldr r0, [r4, #112] ; 0x70 <== NOT EXECUTED 22634: e0800003 add r0, r0, r3 <== NOT EXECUTED 22638: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED } fs_info->index++; if (fs_info->index >= fs_info->uino_pool_size) 2263c: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED 22640: 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++; 22644: e5846070 str r6, [r4, #112] ; 0x70 <== NOT EXECUTED if (fs_info->index >= fs_info->uino_pool_size) fs_info->index = 0; 22648: 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++) 2264c: e2822001 add r2, r2, #1 <== NOT EXECUTED 22650: e1520001 cmp r2, r1 <== NOT EXECUTED 22654: 3affffe8 bcc 225fc <== 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)) 22658: e5942078 ldr r2, [r4, #120] ; 0x78 <== NOT EXECUTED 2265c: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED 22660: e0623003 rsb r3, r2, r3 <== NOT EXECUTED 22664: e1a01081 lsl r1, r1, #1 <== NOT EXECUTED 22668: e1510003 cmp r1, r3 <== NOT EXECUTED 2266c: 2a00000a bcs 2269c <== NOT EXECUTED { fs_info->uino_pool_size <<= 1; 22670: e5841074 str r1, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size); 22674: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 22678: ebff9919 bl 8ae4 <== NOT EXECUTED if (fs_info->uino != NULL) 2267c: 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); 22680: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if (fs_info->uino != NULL) 22684: 0a000004 beq 2269c <== NOT EXECUTED fs_info->index = fs_info->uino_pool_size; 22688: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED 2268c: 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++) 22690: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED 22694: e3a02000 mov r2, #0 <== NOT EXECUTED 22698: eaffffec b 22650 <== NOT EXECUTED 2269c: e3a00000 mov r0, #0 <== NOT EXECUTED } else resrc_unsuff = true; } return 0; } 226a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00022c00 : int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 22c00: 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; 22c04: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t cur_cln = start_cln; 22c08: e58d1000 str r1, [sp] <== NOT EXECUTED int fat_init_clusters_chain( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t start_cln ) { 22c0c: 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)); 22c10: e3a01001 mov r1, #1 <== NOT EXECUTED 22c14: e1d500b6 ldrh r0, [r5, #6] <== NOT EXECUTED 22c18: ebff9135 bl 70f4 <== NOT EXECUTED if ( buf == NULL ) 22c1c: e2504000 subs r4, r0, #0 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22c20: 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 ) 22c24: 1a000011 bne 22c70 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); 22c28: eb0068b4 bl 3cf00 <__errno> <== NOT EXECUTED 22c2c: e3a03005 mov r3, #5 <== NOT EXECUTED 22c30: e5803000 str r3, [r0] <== NOT EXECUTED 22c34: e3e08000 mvn r8, #0 <== NOT EXECUTED 22c38: ea000018 b 22ca0 <== NOT EXECUTED while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val) { ret = fat_cluster_write(mt_entry, cur_cln, buf); 22c3c: ebffffdb bl 22bb0 <== NOT EXECUTED 22c40: e1a08000 mov r8, r0 <== NOT EXECUTED if ( ret == -1 ) 22c44: e3780001 cmn r8, #1 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22c48: e1a0200d mov r2, sp <== NOT EXECUTED 22c4c: 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 ) 22c50: 0a000003 beq 22c64 <== NOT EXECUTED { free(buf); return -1; } rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln); 22c54: e59d1000 ldr r1, [sp] <== NOT EXECUTED 22c58: eb0059ae bl 39318 <== NOT EXECUTED if ( rc != RC_OK ) 22c5c: e2508000 subs r8, r0, #0 <== NOT EXECUTED 22c60: 0a000002 beq 22c70 <== NOT EXECUTED { free(buf); 22c64: e1a00004 mov r0, r4 <== NOT EXECUTED 22c68: ebff9291 bl 76b4 <== NOT EXECUTED return rc; 22c6c: ea00000b b 22ca0 <== 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) 22c70: e59d3000 ldr r3, [sp] <== NOT EXECUTED 22c74: e595e00c ldr lr, [r5, #12] <== NOT EXECUTED 22c78: e595c010 ldr ip, [r5, #16] <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 22c7c: 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) 22c80: e003300e and r3, r3, lr <== NOT EXECUTED 22c84: e153000c cmp r3, ip <== NOT EXECUTED { ret = fat_cluster_write(mt_entry, cur_cln, buf); 22c88: e1a02004 mov r2, r4 <== NOT EXECUTED 22c8c: 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) 22c90: 3affffe9 bcc 22c3c <== NOT EXECUTED free(buf); return rc; } } free(buf); 22c94: e1a00004 mov r0, r4 <== NOT EXECUTED 22c98: ebff9285 bl 76b4 <== NOT EXECUTED 22c9c: e3a08000 mov r8, #0 <== NOT EXECUTED return rc; } 22ca0: e1a00008 mov r0, r8 <== NOT EXECUTED 22ca4: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00022d38 : * 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) { 22d38: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED 22d3c: e24dd0b8 sub sp, sp, #184 ; 0xb8 <== NOT EXECUTED 22d40: 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; 22d44: e3a06000 mov r6, #0 <== NOT EXECUTED rc = stat(mt_entry->dev, &stat_buf); 22d48: e5900070 ldr r0, [r0, #112] ; 0x70 <== NOT EXECUTED 22d4c: 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; 22d50: 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; 22d54: 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); 22d58: ebff9835 bl 8e34 <== NOT EXECUTED if (rc == -1) 22d5c: 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); 22d60: e1a07000 mov r7, r0 <== NOT EXECUTED if (rc == -1) 22d64: 0a000167 beq 23308 <== NOT EXECUTED return rc; /* Must be a block device. */ if (!S_ISBLK(stat_buf.st_mode)) 22d68: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED 22d6c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED 22d70: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED 22d74: 0a000002 beq 22d84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOTTY); 22d78: eb006860 bl 3cf00 <__errno> <== NOT EXECUTED 22d7c: e3a03019 mov r3, #25 <== NOT EXECUTED 22d80: ea00015e b 23300 <== NOT EXECUTED /* check that device is registred as block device and lock it */ vol->dd = rtems_disk_obtain(stat_buf.st_rdev); 22d84: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 22d88: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22d8c: ebff8d42 bl 629c <== NOT EXECUTED if (vol->dd == NULL) 22d90: 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); 22d94: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if (vol->dd == NULL) 22d98: 0a00000a beq 22dc8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); vol->dev = stat_buf.st_rdev; 22d9c: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED 22da0: 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); 22da4: 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; 22da8: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 22dac: 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); 22db0: e28d30b4 add r3, sp, #180 ; 0xb4 <== NOT EXECUTED 22db4: ebff894b bl 52e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22db8: e3500000 cmp r0, #0 <== NOT EXECUTED 22dbc: 0a000004 beq 22dd4 <== NOT EXECUTED { rtems_disk_release(vol->dd); 22dc0: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 22dc4: ebff8db0 bl 648c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO); 22dc8: eb00684c bl 3cf00 <__errno> <== NOT EXECUTED 22dcc: e3a03005 mov r3, #5 <== NOT EXECUTED 22dd0: ea00014a b 23300 <== NOT EXECUTED } memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE); 22dd4: e59d30b4 ldr r3, [sp, #180] ; 0xb4 <== NOT EXECUTED 22dd8: e3a0205a mov r2, #90 ; 0x5a <== NOT EXECUTED 22ddc: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED 22de0: e28d0004 add r0, sp, #4 <== NOT EXECUTED 22de4: eb0074f5 bl 401c0 <== NOT EXECUTED sc = rtems_bdbuf_release( block); 22de8: e59d00b4 ldr r0, [sp, #180] ; 0xb4 <== NOT EXECUTED 22dec: ebff84fd bl 41e8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 22df0: e3500000 cmp r0, #0 <== NOT EXECUTED 22df4: 1afffff1 bne 22dc0 <== 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); 22df8: e5dd2010 ldrb r2, [sp, #16] <== NOT EXECUTED 22dfc: e5dd300f ldrb r3, [sp, #15] <== NOT EXECUTED 22e00: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED if ( (vol->bps != 512) && 22e04: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 22e08: 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); 22e0c: e1c430b0 strh r3, [r4] <== NOT EXECUTED if ( (vol->bps != 512) && 22e10: 0a000003 beq 22e24 <== NOT EXECUTED 22e14: e3530b02 cmp r3, #2048 ; 0x800 <== NOT EXECUTED 22e18: 0a000001 beq 22e24 <== NOT EXECUTED 22e1c: e3530a01 cmp r3, #4096 ; 0x1000 <== NOT EXECUTED 22e20: 1a0000ad bne 230dc <== 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; 22e24: e3a02000 mov r2, #0 <== NOT EXECUTED 22e28: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED 22e2c: e1a034a3 lsr r3, r3, #9 <== NOT EXECUTED 22e30: ea000003 b 22e44 <== NOT EXECUTED i >>= 1, vol->sec_mul++); 22e34: e5d42003 ldrb r2, [r4, #3] <== NOT EXECUTED 22e38: e2822001 add r2, r2, #1 <== NOT EXECUTED 22e3c: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED 22e40: 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; 22e44: e3130001 tst r3, #1 <== NOT EXECUTED 22e48: 0afffff9 beq 22e34 <== NOT EXECUTED i >>= 1, vol->sec_mul++); for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0; 22e4c: e3a03000 mov r3, #0 <== NOT EXECUTED 22e50: e5c43002 strb r3, [r4, #2] <== NOT EXECUTED 22e54: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 22e58: ea000003 b 22e6c <== NOT EXECUTED i >>= 1, vol->sec_log2++); 22e5c: e5d42002 ldrb r2, [r4, #2] <== NOT EXECUTED 22e60: e2822001 add r2, r2, #1 <== NOT EXECUTED 22e64: e5c42002 strb r2, [r4, #2] <== NOT EXECUTED 22e68: 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; 22e6c: e3130001 tst r3, #1 <== NOT EXECUTED 22e70: 0afffff9 beq 22e5c <== NOT EXECUTED i >>= 1, vol->sec_log2++); vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec); 22e74: e5dd2011 ldrb r2, [sp, #17] <== NOT EXECUTED /* * "sectors per cluster" of zero is invalid * (and would hang the following loop) */ if (vol->spc == 0) 22e78: 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; 22e7c: 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); 22e80: 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; 22e84: 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) 22e88: 1a000003 bne 22e9c <== NOT EXECUTED 22e8c: ea000092 b 230dc <== 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++); 22e90: e2833001 add r3, r3, #1 <== NOT EXECUTED 22e94: e5c43005 strb r3, [r4, #5] <== NOT EXECUTED 22e98: 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; 22e9c: e3120001 tst r2, #1 <== NOT EXECUTED 22ea0: e5d43005 ldrb r3, [r4, #5] <== NOT EXECUTED 22ea4: 0afffff9 beq 22e90 <== 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) 22ea8: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED 22eac: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED 22eb0: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 22eb4: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 22eb8: 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; 22ebc: 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) 22ec0: 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; 22ec4: 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) 22ec8: 9a000004 bls 22ee0 <== NOT EXECUTED 22ecc: ea000082 b 230dc <== 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++); 22ed0: e5d42008 ldrb r2, [r4, #8] <== NOT EXECUTED 22ed4: e2822001 add r2, r2, #1 <== NOT EXECUTED 22ed8: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED 22edc: 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; 22ee0: e3130001 tst r3, #1 <== NOT EXECUTED 22ee4: 0afffff9 beq 22ed0 <== NOT EXECUTED i >>= 1, vol->bpc_log2++); vol->fats = FAT_GET_BR_FAT_NUM(boot_rec); 22ee8: e5dd3014 ldrb r3, [sp, #20] <== NOT EXECUTED 22eec: e5c43009 strb r3, [r4, #9] <== NOT EXECUTED vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec); 22ef0: e5dd2013 ldrb r2, [sp, #19] <== NOT EXECUTED 22ef4: e5dd3012 ldrb r3, [sp, #18] <== NOT EXECUTED 22ef8: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 22efc: 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)) / 22f00: 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); 22f04: e5dd2016 ldrb r2, [sp, #22] <== NOT EXECUTED 22f08: 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)) / 22f0c: 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); 22f10: 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)) / 22f14: 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); 22f18: 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)) / 22f1c: eb00c7f9 bl 54f08 <__aeabi_idiv> <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 22f20: e5d43002 ldrb r3, [r4, #2] <== NOT EXECUTED 22f24: 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)) / 22f28: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED vol->bps; vol->rdir_size = vol->rdir_secs << vol->sec_log2; 22f2c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0) 22f30: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED 22f34: e5dd301a ldrb r3, [sp, #26] <== NOT EXECUTED 22f38: 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); 22f3c: 05dd302a ldrbeq r3, [sp, #42] ; 0x2a <== NOT EXECUTED 22f40: 05dd2029 ldrbeq r2, [sp, #41] ; 0x29 <== NOT EXECUTED 22f44: 05dd1028 ldrbeq r1, [sp, #40] ; 0x28 <== NOT EXECUTED 22f48: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED 22f4c: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED 22f50: 05dd202b ldrbeq r2, [sp, #43] ; 0x2b <== NOT EXECUTED 22f54: 01833001 orreq r3, r3, r1 <== NOT EXECUTED 22f58: 01833c02 orreq r3, r3, r2, lsl #24 <== NOT EXECUTED 22f5c: e5843018 str r3, [r4, #24] <== NOT EXECUTED vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length + 22f60: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED 22f64: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED 22f68: e0030291 mul r3, r1, r2 <== NOT EXECUTED 22f6c: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 22f70: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED 22f74: 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; 22f78: 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 + 22f7c: e0813003 add r3, r1, r3 <== NOT EXECUTED 22f80: 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; 22f84: e584201c str r2, [r4, #28] <== NOT EXECUTED if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0) 22f88: e5dd2018 ldrb r2, [sp, #24] <== NOT EXECUTED 22f8c: e5dd3017 ldrb r3, [sp, #23] <== NOT EXECUTED 22f90: 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); 22f94: 05dd3026 ldrbeq r3, [sp, #38] ; 0x26 <== NOT EXECUTED 22f98: 05dd2025 ldrbeq r2, [sp, #37] ; 0x25 <== NOT EXECUTED 22f9c: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED 22fa0: 05dd1024 ldrbeq r1, [sp, #36] ; 0x24 <== NOT EXECUTED 22fa4: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED 22fa8: 05dd2027 ldrbeq r2, [sp, #39] ; 0x27 <== NOT EXECUTED 22fac: 01833001 orreq r3, r3, r1 <== NOT EXECUTED 22fb0: 01833c02 orreq r3, r3, r2, lsl #24 <== NOT EXECUTED 22fb4: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED data_secs = vol->tot_secs - vol->data_fsec; vol->data_cls = data_secs / vol->spc; 22fb8: e5d41004 ldrb r1, [r4, #4] <== NOT EXECUTED 22fbc: e284302c add r3, r4, #44 ; 0x2c <== NOT EXECUTED 22fc0: e8930009 ldm r3, {r0, r3} <== NOT EXECUTED 22fc4: e0400003 sub r0, r0, r3 <== NOT EXECUTED 22fc8: eb00c78a bl 54df8 <__aeabi_uidiv> <== NOT EXECUTED /* determine FAT type at least */ if ( vol->data_cls < FAT_FAT12_MAX_CLN) 22fcc: e59f3340 ldr r3, [pc, #832] ; 23314 <== NOT EXECUTED 22fd0: 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; 22fd4: 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; 22fd8: 93a03001 movls r3, #1 <== NOT EXECUTED 22fdc: 95c4300a strbls r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT12_MASK; 22fe0: 959f3330 ldrls r3, [pc, #816] ; 23318 <== NOT EXECUTED 22fe4: 9a000005 bls 23000 <== NOT EXECUTED vol->eoc_val = FAT_FAT12_EOC; } else { if ( vol->data_cls < FAT_FAT16_MAX_CLN) 22fe8: e59f332c ldr r3, [pc, #812] ; 2331c <== NOT EXECUTED 22fec: e1500003 cmp r0, r3 <== NOT EXECUTED 22ff0: 8a000005 bhi 2300c <== NOT EXECUTED { vol->type = FAT_FAT16; 22ff4: e3a03002 mov r3, #2 <== NOT EXECUTED 22ff8: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT16_MASK; 22ffc: e59f331c ldr r3, [pc, #796] ; 23320 <== NOT EXECUTED 23000: e584300c str r3, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT16_EOC; 23004: e2433007 sub r3, r3, #7 <== NOT EXECUTED 23008: ea000004 b 23020 <== NOT EXECUTED } else { vol->type = FAT_FAT32; 2300c: e3a03004 mov r3, #4 <== NOT EXECUTED 23010: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED vol->mask = FAT_FAT32_MASK; 23014: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED 23018: e584300c str r3, [r4, #12] <== NOT EXECUTED vol->eoc_val = FAT_FAT32_EOC; 2301c: e3e0327f mvn r3, #-268435449 ; 0xf0000007 <== NOT EXECUTED 23020: 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; 23024: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 23028: e3530004 cmp r3, #4 <== NOT EXECUTED 2302c: 1a000059 bne 23198 <== NOT EXECUTED } } if (vol->type == FAT_FAT32) { vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec); 23030: e5dd3032 ldrb r3, [sp, #50] ; 0x32 <== NOT EXECUTED 23034: e5dd2031 ldrb r2, [sp, #49] ; 0x31 <== NOT EXECUTED 23038: e5dd1030 ldrb r1, [sp, #48] ; 0x30 <== NOT EXECUTED 2303c: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 23040: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 23044: e5dd2033 ldrb r2, [sp, #51] ; 0x33 <== NOT EXECUTED 23048: e1833001 orr r3, r3, r1 <== NOT EXECUTED 2304c: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 23050: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR; 23054: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED 23058: e2033080 and r3, r3, #128 ; 0x80 <== NOT EXECUTED 2305c: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED if (vol->mirror) 23060: e3530000 cmp r3, #0 <== NOT EXECUTED vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM; 23064: 15dd302c ldrbne r3, [sp, #44] ; 0x2c <== NOT EXECUTED 23068: 1203300f andne r3, r3, #15 <== NOT EXECUTED else vol->afat = 0; 2306c: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec); 23070: e5dd1035 ldrb r1, [sp, #53] ; 0x35 <== NOT EXECUTED 23074: e5dd3034 ldrb r3, [sp, #52] ; 0x34 <== NOT EXECUTED 23078: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED if( vol->info_sec == 0 ) 2307c: 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); 23080: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED if( vol->info_sec == 0 ) 23084: 0a000014 beq 230dc <== 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, 23088: e28d60a8 add r6, sp, #168 ; 0xa8 <== NOT EXECUTED 2308c: e1a00005 mov r0, r5 <== NOT EXECUTED 23090: e3a02000 mov r2, #0 <== NOT EXECUTED 23094: e3a03004 mov r3, #4 <== NOT EXECUTED 23098: e58d6000 str r6, [sp] <== NOT EXECUTED 2309c: ebffff01 bl 22ca8 <_fat_block_read> <== NOT EXECUTED FAT_FSI_LEADSIG_SIZE, fs_info_sector); if ( ret < 0 ) 230a0: e3500000 cmp r0, #0 <== NOT EXECUTED 230a4: ba00001b blt 23118 <== NOT EXECUTED { rtems_disk_release(vol->dd); return -1; } if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) != 230a8: e5dd20aa ldrb r2, [sp, #170] ; 0xaa <== NOT EXECUTED 230ac: e5dd30a9 ldrb r3, [sp, #169] ; 0xa9 <== NOT EXECUTED 230b0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED 230b4: e5dd10a8 ldrb r1, [sp, #168] ; 0xa8 <== NOT EXECUTED 230b8: e1822403 orr r2, r2, r3, lsl #8 <== NOT EXECUTED 230bc: e5dd30ab ldrb r3, [sp, #171] ; 0xab <== NOT EXECUTED 230c0: e1822001 orr r2, r2, r1 <== NOT EXECUTED 230c4: e1822c03 orr r2, r2, r3, lsl #24 <== NOT EXECUTED 230c8: e59f3254 ldr r3, [pc, #596] ; 23324 <== NOT EXECUTED 230cc: e1520003 cmp r2, r3 <== NOT EXECUTED 230d0: 0a000006 beq 230f0 <== 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); 230d4: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 230d8: ebfffd71 bl 226a4 <== 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); 230dc: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 230e0: ebff8ce9 bl 648c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 230e4: eb006785 bl 3cf00 <__errno> <== NOT EXECUTED 230e8: e3a03016 mov r3, #22 <== NOT EXECUTED 230ec: ea000083 b 23300 <== NOT EXECUTED } else { ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO, 230f0: e1d413bc ldrh r1, [r4, #60] ; 0x3c <== NOT EXECUTED 230f4: e1a00005 mov r0, r5 <== NOT EXECUTED 230f8: e3a02f79 mov r2, #484 ; 0x1e4 <== NOT EXECUTED 230fc: e3a0300c mov r3, #12 <== NOT EXECUTED 23100: e58d6000 str r6, [sp] <== NOT EXECUTED 23104: ebfffee7 bl 22ca8 <_fat_block_read> <== NOT EXECUTED FAT_USEFUL_INFO_SIZE, fs_info_sector); if ( ret < 0 ) 23108: e3500000 cmp r0, #0 <== NOT EXECUTED 2310c: aa000004 bge 23124 <== 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); 23110: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 23114: ebfffd62 bl 226a4 <== 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); 23118: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 2311c: ebff8cda bl 648c <== NOT EXECUTED 23120: ea000077 b 23304 <== NOT EXECUTED return -1; } vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector); 23124: e5dd30ae ldrb r3, [sp, #174] ; 0xae <== NOT EXECUTED 23128: e5dd20ad ldrb r2, [sp, #173] ; 0xad <== NOT EXECUTED 2312c: e5dd10ac ldrb r1, [sp, #172] ; 0xac <== NOT EXECUTED 23130: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 23134: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 23138: e5dd20af ldrb r2, [sp, #175] ; 0xaf <== NOT EXECUTED 2313c: e1833001 orr r3, r3, r1 <== NOT EXECUTED 23140: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED 23144: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector); 23148: e5dd30b2 ldrb r3, [sp, #178] ; 0xb2 <== NOT EXECUTED 2314c: e5dd20b1 ldrb r2, [sp, #177] ; 0xb1 <== NOT EXECUTED 23150: e5dd10b0 ldrb r1, [sp, #176] ; 0xb0 <== NOT EXECUTED 23154: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED 23158: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED 2315c: e5dd20b3 ldrb r2, [sp, #179] ; 0xb3 <== NOT EXECUTED 23160: e1833001 orr r3, r3, r1 <== NOT EXECUTED 23164: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 23168: 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); 2316c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF, 23170: e1a00005 mov r0, r5 <== NOT EXECUTED 23174: e1a02001 mov r2, r1 <== NOT EXECUTED 23178: ebfffe3b bl 22a6c <== NOT EXECUTED 0xFFFFFFFF); if ( rc != RC_OK ) 2317c: e2507000 subs r7, r0, #0 <== NOT EXECUTED 23180: 0a00000b beq 231b4 <== 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); 23184: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 23188: ebfffd45 bl 226a4 <== 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); 2318c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 23190: ebff8cbd bl 648c <== NOT EXECUTED return rc; 23194: ea00005b b 23308 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 23198: e3a03000 mov r3, #0 <== NOT EXECUTED vol->mirror = 0; vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 2319c: e3e02000 mvn r2, #0 <== NOT EXECUTED } else { vol->rdir_cl = 0; vol->mirror = 0; vol->afat = 0; 231a0: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED vol->free_cls = 0xFFFFFFFF; vol->next_cl = 0xFFFFFFFF; 231a4: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED } } } else { vol->rdir_cl = 0; 231a8: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED vol->mirror = 0; 231ac: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED vol->afat = 0; vol->free_cls = 0xFFFFFFFF; 231b0: 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); 231b4: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED 231b8: ebfffd39 bl 226a4 <== NOT EXECUTED vol->next_cl = 0xFFFFFFFF; } _fat_block_release(mt_entry); vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat; 231bc: e5d41050 ldrb r1, [r4, #80] ; 0x50 <== NOT EXECUTED 231c0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 231c4: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED 231c8: 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)); 231cc: 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; 231d0: 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)); 231d4: e3a0100c mov r1, #12 <== NOT EXECUTED 231d8: ebff8fc5 bl 70f4 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 231dc: 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)); 231e0: e1a03000 mov r3, r0 <== NOT EXECUTED 231e4: e5840064 str r0, [r4, #100] ; 0x64 <== NOT EXECUTED if ( fs_info->vhash == NULL ) 231e8: 0a000010 beq 23230 <== 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); 231ec: 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); 231f0: e280c004 add ip, r0, #4 <== NOT EXECUTED the_chain->permanent_null = NULL; 231f4: e3a05000 mov r5, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 231f8: e280e010 add lr, r0, #16 <== NOT EXECUTED the_chain->permanent_null = NULL; 231fc: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 23200: e5833008 str r3, [r3, #8] <== NOT EXECUTED fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control)); 23204: e3a00002 mov r0, #2 <== NOT EXECUTED 23208: e3a0100c mov r1, #12 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2320c: e583e00c str lr, [r3, #12] <== NOT EXECUTED 23210: e583c000 str ip, [r3] <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 23214: 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; 23218: e5825004 str r5, [r2, #4] <== NOT EXECUTED 2321c: ebff8fb4 bl 70f4 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 23220: 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)); 23224: e5840068 str r0, [r4, #104] ; 0x68 <== NOT EXECUTED if ( fs_info->rhash == NULL ) 23228: 1a000003 bne 2323c <== NOT EXECUTED 2322c: ea000018 b 23294 <== 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); 23230: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 23234: ebff8c94 bl 648c <== NOT EXECUTED 23238: ea00002e b 232f8 <== 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); 2323c: 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); 23240: e2802004 add r2, r0, #4 <== NOT EXECUTED 23244: e2801010 add r1, r0, #16 <== NOT EXECUTED 23248: e580100c str r1, [r0, #12] <== NOT EXECUTED 2324c: e8800024 stm r0, {r2, r5} <== NOT EXECUTED the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 23250: 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; 23254: e5835004 str r5, [r3, #4] <== NOT EXECUTED the_chain->last = _Chain_Head(the_chain); 23258: 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; 2325c: e594202c ldr r2, [r4, #44] ; 0x2c <== NOT EXECUTED 23260: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED 23264: 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; 23268: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; 2326c: e1a03203 lsl r3, r3, #4 <== NOT EXECUTED 23270: 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; 23274: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4; fs_info->index = 0; 23278: e5845070 str r5, [r4, #112] ; 0x70 <== NOT EXECUTED fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char)); 2327c: e3a01001 mov r1, #1 <== NOT EXECUTED 23280: ebff8f9b bl 70f4 <== NOT EXECUTED if ( fs_info->uino == NULL ) 23284: 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)); 23288: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED if ( fs_info->uino == NULL ) 2328c: 1a00000a bne 232bc <== NOT EXECUTED 23290: ea000003 b 232a4 <== 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); 23294: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 23298: ebff8c7b bl 648c <== NOT EXECUTED free(fs_info->vhash); 2329c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 232a0: ea000013 b 232f4 <== 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); 232a4: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 232a8: ebff8c77 bl 648c <== NOT EXECUTED free(fs_info->vhash); 232ac: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 232b0: ebff90ff bl 76b4 <== NOT EXECUTED free(fs_info->rhash); 232b4: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 232b8: ea00000d b 232f4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); } fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t)); 232bc: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED 232c0: e3a01001 mov r1, #1 <== NOT EXECUTED 232c4: ebff8f8a bl 70f4 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 232c8: 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)); 232cc: e5840088 str r0, [r4, #136] ; 0x88 <== NOT EXECUTED if (fs_info->sec_buf == NULL) 232d0: 11a07005 movne r7, r5 <== NOT EXECUTED 232d4: 1a00000b bne 23308 <== NOT EXECUTED { rtems_disk_release(vol->dd); 232d8: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 232dc: ebff8c6a bl 648c <== NOT EXECUTED free(fs_info->vhash); 232e0: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 232e4: ebff90f2 bl 76b4 <== NOT EXECUTED free(fs_info->rhash); 232e8: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 232ec: ebff90f0 bl 76b4 <== NOT EXECUTED free(fs_info->uino); 232f0: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 232f4: ebff90ee bl 76b4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 232f8: eb006700 bl 3cf00 <__errno> <== NOT EXECUTED 232fc: e3a0300c mov r3, #12 <== NOT EXECUTED 23300: e5803000 str r3, [r0] <== NOT EXECUTED 23304: e3e07000 mvn r7, #0 <== NOT EXECUTED } return RC_OK; } 23308: e1a00007 mov r0, r7 <== NOT EXECUTED 2330c: e28dd0b8 add sp, sp, #184 ; 0xb8 <== NOT EXECUTED 23310: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 000225d4 : inline bool fat_ino_is_unique( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t ino ) { 225d4: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED 225d8: e5930078 ldr r0, [r3, #120] ; 0x78 <== NOT EXECUTED fat_fs_info_t *fs_info = mt_entry->fs_info; return (ino >= fs_info->uino_base); } 225dc: e1510000 cmp r1, r0 <== NOT EXECUTED 225e0: 33a00000 movcc r0, #0 <== NOT EXECUTED 225e4: 23a00001 movcs r0, #1 <== NOT EXECUTED 225e8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0003953c : uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3953c: 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; 39540: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 39544: 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; 39548: e5940034 ldr r0, [r4, #52] ; 0x34 <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; if (count == 0) 3954c: 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; 39550: e3a09000 mov r9, #0 <== NOT EXECUTED uint32_t save_cln = 0; uint32_t data_cls_val = fs_info->vol.data_cls + 2; 39554: 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; 39558: e58d900c str r9, [sp, #12] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 3955c: 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) 39560: e58d2004 str r2, [sp, #4] <== NOT EXECUTED uint32_t *chain, uint32_t count, uint32_t *cls_added, uint32_t *last_cl ) { 39564: 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; 39568: e58d0000 str r0, [sp] <== NOT EXECUTED uint32_t i = 2; *cls_added = 0; 3956c: e5839000 str r9, [r3] <== NOT EXECUTED if (count == 0) 39570: 01a07002 moveq r7, r2 <== NOT EXECUTED 39574: 0a000058 beq 396dc <== NOT EXECUTED return rc; if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE) 39578: e5946044 ldr r6, [r4, #68] ; 0x44 <== NOT EXECUTED 3957c: e3760001 cmn r6, #1 <== NOT EXECUTED 39580: 03a06002 moveq r6, #2 <== NOT EXECUTED 39584: e3a0b002 mov fp, #2 <== NOT EXECUTED 39588: ea000042 b 39698 <== 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); 3958c: ebffff61 bl 39318 <== NOT EXECUTED if ( rc != RC_OK ) 39590: e2507000 subs r7, r0, #0 <== NOT EXECUTED 39594: 0a000004 beq 395ac <== NOT EXECUTED { if (*cls_added != 0) 39598: e5983000 ldr r3, [r8] <== NOT EXECUTED 3959c: e3530000 cmp r3, #0 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); 395a0: 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) 395a4: 0a00004c beq 396dc <== NOT EXECUTED 395a8: ea000015 b 39604 <== NOT EXECUTED fat_free_fat_clusters_chain(mt_entry, (*chain)); return rc; } if (next_cln == FAT_GENFAT_FREE) 395ac: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED 395b0: e3520000 cmp r2, #0 <== NOT EXECUTED 395b4: e58d2008 str r2, [sp, #8] <== NOT EXECUTED 395b8: 1a000031 bne 39684 <== 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) 395bc: e5983000 ldr r3, [r8] <== NOT EXECUTED 395c0: 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); 395c4: e1a01006 mov r1, r6 <== NOT EXECUTED 395c8: 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); 395cc: 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) 395d0: 1a000004 bne 395e8 <== NOT EXECUTED { *chain = cl4find; 395d4: e58a6000 str r6, [sl] <== NOT EXECUTED rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 395d8: ebfffeb6 bl 390b8 <== NOT EXECUTED if ( rc != RC_OK ) 395dc: e2507000 subs r7, r0, #0 <== NOT EXECUTED 395e0: 0a000017 beq 39644 <== NOT EXECUTED 395e4: ea00003c b 396dc <== NOT EXECUTED } } else { /* set EOC value to new allocated cluster */ rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC); 395e8: e1a00005 mov r0, r5 <== NOT EXECUTED 395ec: ebfffeb1 bl 390b8 <== NOT EXECUTED if ( rc != RC_OK ) 395f0: 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); 395f4: e1a01009 mov r1, r9 <== NOT EXECUTED 395f8: e1a02006 mov r2, r6 <== NOT EXECUTED 395fc: 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 ) 39600: 0a000002 beq 39610 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 39604: e59a1000 ldr r1, [sl] <== NOT EXECUTED 39608: ebffff9c bl 39480 <== NOT EXECUTED return rc; 3960c: ea000032 b 396dc <== NOT EXECUTED } rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find); 39610: ebfffea8 bl 390b8 <== NOT EXECUTED if ( rc != RC_OK ) 39614: e2507000 subs r7, r0, #0 <== NOT EXECUTED 39618: 0a000009 beq 39644 <== NOT EXECUTED { /* cleanup activity */ fat_free_fat_clusters_chain(mt_entry, (*chain)); 3961c: e59a1000 ldr r1, [sl] <== NOT EXECUTED 39620: e1a00005 mov r0, r5 <== NOT EXECUTED 39624: ebffff95 bl 39480 <== NOT EXECUTED /* trying to save last allocated cluster for future use */ fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_FREE); 39628: e1a00005 mov r0, r5 <== NOT EXECUTED 3962c: e1a01006 mov r1, r6 <== NOT EXECUTED 39630: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED 39634: ebfffe9f bl 390b8 <== NOT EXECUTED fat_buf_release(fs_info); 39638: e1a00004 mov r0, r4 <== NOT EXECUTED 3963c: ebffa418 bl 226a4 <== NOT EXECUTED return rc; 39640: ea000025 b 396dc <== NOT EXECUTED } } save_cln = cl4find; (*cls_added)++; 39644: e5983000 ldr r3, [r8] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 39648: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 3964c: e2833001 add r3, r3, #1 <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 39650: e1530002 cmp r3, r2 <== NOT EXECUTED return rc; } } save_cln = cl4find; (*cls_added)++; 39654: e5883000 str r3, [r8] <== NOT EXECUTED /* have we satisfied request ? */ if (*cls_added == count) 39658: 1a000008 bne 39680 <== NOT EXECUTED { fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 3965c: 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; 39660: e5846044 str r6, [r4, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 39664: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 39668: 15982000 ldrne r2, [r8] <== NOT EXECUTED 3966c: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED 39670: 15843040 strne r3, [r4, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 39674: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED 39678: e5836000 str r6, [r3] <== NOT EXECUTED 3967c: ea000013 b 396d0 <== NOT EXECUTED fat_buf_release(fs_info); return rc; 39680: e1a09006 mov r9, r6 <== NOT EXECUTED } } i++; cl4find++; if (cl4find >= data_cls_val) 39684: e59d2000 ldr r2, [sp] <== NOT EXECUTED fat_buf_release(fs_info); return rc; } } i++; cl4find++; 39688: e2866001 add r6, r6, #1 <== NOT EXECUTED if (cl4find >= data_cls_val) 3968c: e1560002 cmp r6, r2 <== NOT EXECUTED 39690: 23a06002 movcs r6, #2 <== NOT EXECUTED *last_cl = save_cln; fat_buf_release(fs_info); return rc; } } i++; 39694: 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) 39698: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3969c: e15b0003 cmp fp, r3 <== NOT EXECUTED { rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln); 396a0: e1a01006 mov r1, r6 <== NOT EXECUTED 396a4: e28d200c add r2, sp, #12 <== NOT EXECUTED 396a8: 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) 396ac: 3affffb6 bcc 3958c <== NOT EXECUTED if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; if (fs_info->vol.free_cls != 0xFFFFFFFF) 396b0: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED cl4find++; if (cl4find >= data_cls_val) cl4find = 2; } fs_info->vol.next_cl = save_cln; 396b4: e5849044 str r9, [r4, #68] ; 0x44 <== NOT EXECUTED if (fs_info->vol.free_cls != 0xFFFFFFFF) 396b8: e3730001 cmn r3, #1 <== NOT EXECUTED fs_info->vol.free_cls -= (*cls_added); 396bc: 15982000 ldrne r2, [r8] <== NOT EXECUTED 396c0: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED *last_cl = save_cln; 396c4: 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); 396c8: 15843040 strne r3, [r4, #64] ; 0x40 <== NOT EXECUTED *last_cl = save_cln; 396cc: e5829000 str r9, [r2] <== NOT EXECUTED fat_buf_release(fs_info); 396d0: e1a00004 mov r0, r4 <== NOT EXECUTED 396d4: ebffa3f2 bl 226a4 <== NOT EXECUTED 396d8: e3a07000 mov r7, #0 <== NOT EXECUTED return RC_OK; } 396dc: e1a00007 mov r0, r7 <== NOT EXECUTED 396e0: e28dd010 add sp, sp, #16 <== NOT EXECUTED 396e4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 000390b8 : fat_set_fat_cluster( rtems_filesystem_mount_table_entry_t *mt_entry, uint32_t cln, uint32_t in_val ) { 390b8: 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; 390bc: e3a03000 mov r3, #0 <== NOT EXECUTED /* sanity check */ if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) ) 390c0: 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 ) { 390c4: 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; 390c8: 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 ) { 390cc: e1a07002 mov r7, r2 <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 390d0: 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)) ) 390d4: 9a00008a bls 39304 <== NOT EXECUTED 390d8: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED 390dc: e2833001 add r3, r3, #1 <== NOT EXECUTED 390e0: e1510003 cmp r1, r3 <== NOT EXECUTED 390e4: 8a000086 bhi 39304 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EIO); sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) + 390e8: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED 390ec: e2130001 ands r0, r3, #1 <== NOT EXECUTED 390f0: 108120a1 addne r2, r1, r1, lsr #1 <== NOT EXECUTED 390f4: 1a000002 bne 39104 <== NOT EXECUTED 390f8: e3130002 tst r3, #2 <== NOT EXECUTED 390fc: 11a02081 lslne r2, r1, #1 <== NOT EXECUTED 39100: 01a02101 lsleq r2, r1, #2 <== NOT EXECUTED 39104: e5d4a002 ldrb sl, [r4, #2] <== NOT EXECUTED 39108: 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); 3910c: 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) + 39110: 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); 39114: 108580a5 addne r8, r5, r5, lsr #1 <== NOT EXECUTED 39118: 1a000002 bne 39128 <== NOT EXECUTED 3911c: e3130002 tst r3, #2 <== NOT EXECUTED 39120: 11a08085 lslne r8, r5, #1 <== NOT EXECUTED 39124: 01a08105 lsleq r8, r5, #2 <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 39128: e1a00004 mov r0, r4 <== NOT EXECUTED 3912c: e1a0100a mov r1, sl <== NOT EXECUTED 39130: e3a02001 mov r2, #1 <== NOT EXECUTED 39134: 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); 39138: e1d4b0b0 ldrh fp, [r4] <== NOT EXECUTED rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0); 3913c: ebffa5a8 bl 227e4 <== NOT EXECUTED if (rc != RC_OK) 39140: 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); 39144: e1a0900d mov r9, sp <== NOT EXECUTED if (rc != RC_OK) 39148: 1a000071 bne 39314 <== NOT EXECUTED return rc; switch ( fs_info->vol.type ) 3914c: 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); 39150: 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 ) 39154: 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); 39158: 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 ) 3915c: 0a00005a beq 392cc <== NOT EXECUTED 39160: e3560004 cmp r6, #4 <== NOT EXECUTED 39164: 0a00005c beq 392dc <== NOT EXECUTED 39168: e3560001 cmp r6, #1 <== NOT EXECUTED 3916c: 1a000064 bne 39304 <== NOT EXECUTED { case FAT_FAT12: if ( FAT_CLUSTER_IS_ODD(cln) ) 39170: e3150001 tst r5, #1 <== NOT EXECUTED 39174: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39178: 0a000026 beq 39218 <== NOT EXECUTED { fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; 3917c: 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)) = 39180: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 39184: e202200f and r2, r2, #15 <== NOT EXECUTED 39188: e7c32008 strb r2, [r3, r8] <== NOT EXECUTED (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 3918c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39190: 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)) = 39194: 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; 39198: e1a07a07 lsl r7, r7, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) & 0x0F; *((uint8_t *)(block0->buffer + ofs)) = 3919c: e1822827 orr r2, r2, r7, lsr #16 <== NOT EXECUTED 391a0: 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) ) 391a4: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 391a8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 391ac: e1580003 cmp r8, r3 <== NOT EXECUTED } static inline void fat_buf_mark_modified(fat_fs_info_t *fs_info) { fs_info->c.modified = true; 391b0: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED 391b4: 1a00000e bne 391f4 <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 391b8: e28a1001 add r1, sl, #1 <== NOT EXECUTED 391bc: e1a0300d mov r3, sp <== NOT EXECUTED 391c0: e1a00004 mov r0, r4 <== NOT EXECUTED 391c4: e1a02006 mov r2, r6 <== NOT EXECUTED 391c8: ebffa585 bl 227e4 <== NOT EXECUTED &block0); if (rc != RC_OK) 391cc: e3500000 cmp r0, #0 <== NOT EXECUTED 391d0: 1a00004f bne 39314 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) &= 0x00; 391d4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 391d8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 391dc: e5c30000 strb r0, [r3] <== NOT EXECUTED *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 391e0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 391e4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED if (rc != RC_OK) return rc; *((uint8_t *)(block0->buffer)) &= 0x00; *((uint8_t *)(block0->buffer)) = 391e8: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 391ec: e1827c27 orr r7, r2, r7, lsr #24 <== NOT EXECUTED 391f0: ea000026 b 39290 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; 391f4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 391f8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 391fc: e2888001 add r8, r8, #1 <== NOT EXECUTED 39200: e7c30008 strb r0, [r3, r8] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) | 39204: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39208: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED } else { *((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00; *((uint8_t *)(block0->buffer + ofs + 1)) = 3920c: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 39210: e1827c27 orr r7, r2, r7, lsr #24 <== NOT EXECUTED 39214: ea00002a b 392c4 <== NOT EXECUTED } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; *((uint8_t *)(block0->buffer + ofs)) &= 0x00; 39218: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 3921c: e7c30008 strb r0, [r3, r8] <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) = (*((uint8_t *)(block0->buffer + ofs))) | 39220: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39224: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 39228: e1a07a07 lsl r7, r7, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 3922c: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED (uint8_t )((fat16_clv & 0xFF00)>>8); } } else { fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK; 39230: e1a07a27 lsr r7, r7, #20 <== NOT EXECUTED *((uint8_t *)(block0->buffer + ofs)) &= 0x00; *((uint8_t *)(block0->buffer + ofs)) = 39234: e1822007 orr r2, r2, r7 <== NOT EXECUTED 39238: 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) ) 3923c: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED 39240: e2433001 sub r3, r3, #1 <== NOT EXECUTED 39244: e1580003 cmp r8, r3 <== NOT EXECUTED 39248: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED 3924c: 1a000012 bne 3929c <== NOT EXECUTED { rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ, 39250: e28a1001 add r1, sl, #1 <== NOT EXECUTED 39254: e1a0300d mov r3, sp <== NOT EXECUTED 39258: e1a00004 mov r0, r4 <== NOT EXECUTED 3925c: e1a02006 mov r2, r6 <== NOT EXECUTED 39260: ebffa55f bl 227e4 <== NOT EXECUTED &block0); if (rc != RC_OK) 39264: e3500000 cmp r0, #0 <== NOT EXECUTED 39268: 1a000029 bne 39314 <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; 3926c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39270: 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)) = 39274: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 39278: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 3927c: e5c32000 strb r2, [r3] <== NOT EXECUTED (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) | 39280: e59d3000 ldr r3, [sp] <== NOT EXECUTED 39284: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED return rc; *((uint8_t *)(block0->buffer)) = (*((uint8_t *)(block0->buffer))) & 0xF0; *((uint8_t *)(block0->buffer)) = 39288: e5d32000 ldrb r2, [r3] <== NOT EXECUTED 3928c: e1827427 orr r7, r2, r7, lsr #8 <== NOT EXECUTED 39290: e5c37000 strb r7, [r3] <== NOT EXECUTED 39294: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED 39298: ea00001d b 39314 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = (*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0; 3929c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 392a0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 392a4: e2888001 add r8, r8, #1 <== NOT EXECUTED fat_buf_mark_modified(fs_info); } else { *((uint8_t *)(block0->buffer + ofs + 1)) = 392a8: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 392ac: e3c2200f bic r2, r2, #15 <== NOT EXECUTED 392b0: 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))) | 392b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 392b8: 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)) = 392bc: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED 392c0: e1827427 orr r7, r2, r7, lsr #8 <== NOT EXECUTED 392c4: e7c37008 strb r7, [r3, r8] <== NOT EXECUTED 392c8: ea000011 b 39314 <== NOT EXECUTED } } break; case FAT_FAT16: *((uint16_t *)(block0->buffer + ofs)) = 392cc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 392d0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 392d4: e18370b8 strh r7, [r3, r8] <== NOT EXECUTED 392d8: ea000006 b 392f8 <== 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)); 392dc: e59d3000 ldr r3, [sp] <== NOT EXECUTED 392e0: 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)) = 392e4: e7932008 ldr r2, [r3, r8] <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 392e8: 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)) = 392ec: e202220f and r2, r2, #-268435456 ; 0xf0000000 <== NOT EXECUTED (*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000)); *((uint32_t *)(block0->buffer + ofs)) = 392f0: e1827007 orr r7, r2, r7 <== NOT EXECUTED 392f4: e7837008 str r7, [r3, r8] <== NOT EXECUTED 392f8: e3a03001 mov r3, #1 <== NOT EXECUTED 392fc: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED 39300: ea000003 b 39314 <== NOT EXECUTED fat_buf_mark_modified(fs_info); break; default: rtems_set_errno_and_return_minus_one(EIO); 39304: eb000efd bl 3cf00 <__errno> <== NOT EXECUTED 39308: e3a03005 mov r3, #5 <== NOT EXECUTED 3930c: e5803000 str r3, [r0] <== NOT EXECUTED 39310: e3e00000 mvn r0, #0 <== NOT EXECUTED break; } return RC_OK; } 39314: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00022acc : * 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) { 22acc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED int rc = RC_OK; fat_fs_info_t *fs_info = mt_entry->fs_info; 22ad0: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED int i = 0; if (fs_info->vol.type & FAT_FAT32) 22ad4: e5d4500a ldrb r5, [r4, #10] <== NOT EXECUTED 22ad8: e2155004 ands r5, r5, #4 <== NOT EXECUTED 22adc: 0a000004 beq 22af4 <== NOT EXECUTED { rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls, 22ae0: e2841040 add r1, r4, #64 ; 0x40 <== NOT EXECUTED 22ae4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 22ae8: ebffffdf bl 22a6c <== NOT EXECUTED fs_info->vol.next_cl); if ( rc != RC_OK ) 22aec: e2505000 subs r5, r0, #0 <== NOT EXECUTED 22af0: 13e05000 mvnne r5, #0 <== NOT EXECUTED rc = -1; } fat_buf_release(fs_info); 22af4: e1a00004 mov r0, r4 <== NOT EXECUTED 22af8: ebfffee9 bl 226a4 <== NOT EXECUTED if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL) 22afc: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED 22b00: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED 22b04: ebff8315 bl 3760 <== NOT EXECUTED 22b08: e3500000 cmp r0, #0 <== NOT EXECUTED 22b0c: 13e05000 mvnne r5, #0 <== NOT EXECUTED 22b10: 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; 22b14: e5948064 ldr r8, [r4, #100] ; 0x64 <== NOT EXECUTED 22b18: e0888007 add r8, r8, r7 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 22b1c: ea000000 b 22b24 <== NOT EXECUTED free(node); 22b20: ebff92e3 bl 76b4 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 22b24: e1a00008 mov r0, r8 <== NOT EXECUTED 22b28: ebffa64d bl c464 <_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 ) 22b2c: e2506000 subs r6, r0, #0 <== NOT EXECUTED 22b30: 1afffffa bne 22b20 <== NOT EXECUTED 22b34: 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++) 22b38: e3570018 cmp r7, #24 <== NOT EXECUTED 22b3c: 1afffff4 bne 22b14 <== NOT EXECUTED } for (i = 0; i < FAT_HASH_SIZE; i++) { rtems_chain_node *node = NULL; rtems_chain_control *the_chain = fs_info->rhash + i; 22b40: e5947068 ldr r7, [r4, #104] ; 0x68 <== NOT EXECUTED 22b44: e0877006 add r7, r7, r6 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) 22b48: ea000000 b 22b50 <== NOT EXECUTED free(node); 22b4c: ebff92d8 bl 76b4 <== NOT EXECUTED 22b50: e1a00007 mov r0, r7 <== NOT EXECUTED 22b54: ebffa642 bl c464 <_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 ) 22b58: e3500000 cmp r0, #0 <== NOT EXECUTED 22b5c: 1afffffa bne 22b4c <== NOT EXECUTED 22b60: 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++) 22b64: e3560018 cmp r6, #24 <== NOT EXECUTED 22b68: 1afffff4 bne 22b40 <== NOT EXECUTED while ( (node = rtems_chain_get(the_chain)) != NULL ) free(node); } free(fs_info->vhash); 22b6c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22b70: ebff92cf bl 76b4 <== NOT EXECUTED free(fs_info->rhash); 22b74: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 22b78: ebff92cd bl 76b4 <== NOT EXECUTED free(fs_info->uino); 22b7c: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED 22b80: ebff92cb bl 76b4 <== NOT EXECUTED free(fs_info->sec_buf); 22b84: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED 22b88: ebff92c9 bl 76b4 <== NOT EXECUTED rtems_disk_release(fs_info->vol.dd); 22b8c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 22b90: ebff8e3d bl 648c <== NOT EXECUTED if (rc) 22b94: e3550000 cmp r5, #0 <== NOT EXECUTED 22b98: 0a000002 beq 22ba8 <== NOT EXECUTED errno = EIO; 22b9c: eb0068d7 bl 3cf00 <__errno> <== NOT EXECUTED 22ba0: e3a03005 mov r3, #5 <== NOT EXECUTED 22ba4: e5803000 str r3, [r0] <== NOT EXECUTED return rc; } 22ba8: e1a00005 mov r0, r5 <== NOT EXECUTED 22bac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00039a80 : #include int fchdir( int fd ) { 39a80: 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 ); 39a84: e59f3148 ldr r3, [pc, #328] ; 39bd4 <== NOT EXECUTED 39a88: e5933000 ldr r3, [r3] <== NOT EXECUTED 39a8c: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 39a90: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 39a94: 2a000005 bcs 39ab0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 39a98: e59f3138 ldr r3, [pc, #312] ; 39bd8 <== NOT EXECUTED 39a9c: e5934000 ldr r4, [r3] <== NOT EXECUTED 39aa0: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 39aa4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 39aa8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 39aac: 1a000002 bne 39abc <== NOT EXECUTED 39ab0: eb000d12 bl 3cf00 <__errno> <== NOT EXECUTED 39ab4: e3a03009 mov r3, #9 <== NOT EXECUTED 39ab8: ea000011 b 39b04 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 39abc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 39ac0: e3530000 cmp r3, #0 <== NOT EXECUTED 39ac4: 0a000002 beq 39ad4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 39ac8: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 39acc: e3530000 cmp r3, #0 <== NOT EXECUTED 39ad0: 1a000002 bne 39ae0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 39ad4: eb000d09 bl 3cf00 <__errno> <== NOT EXECUTED 39ad8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 39adc: ea000008 b 39b04 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 39ae0: e2844018 add r4, r4, #24 <== NOT EXECUTED 39ae4: e1a00004 mov r0, r4 <== NOT EXECUTED 39ae8: e1a0e00f mov lr, pc <== NOT EXECUTED 39aec: e12fff13 bx r3 <== NOT EXECUTED 39af0: e3500001 cmp r0, #1 <== NOT EXECUTED 39af4: e1a06000 mov r6, r0 <== NOT EXECUTED 39af8: 0a000003 beq 39b0c <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 39afc: eb000cff bl 3cf00 <__errno> <== NOT EXECUTED 39b00: e3a03014 mov r3, #20 <== NOT EXECUTED 39b04: e5803000 str r3, [r0] <== NOT EXECUTED 39b08: ea00001c b 39b80 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 39b0c: e59f50c8 ldr r5, [pc, #200] ; 39bdc <== NOT EXECUTED 39b10: e5957000 ldr r7, [r5] <== NOT EXECUTED 39b14: e287c004 add ip, r7, #4 <== NOT EXECUTED 39b18: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 39b1c: e28de004 add lr, sp, #4 <== NOT EXECUTED 39b20: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 39b24: e59c3000 ldr r3, [ip] <== NOT EXECUTED 39b28: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 39b2c: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 39b30: e287e004 add lr, r7, #4 <== NOT EXECUTED 39b34: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 39b38: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 39b3c: e3a0e000 mov lr, #0 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 39b40: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 39b44: e1a01006 mov r1, r6 <== NOT EXECUTED 39b48: e1a0200e mov r2, lr <== NOT EXECUTED 39b4c: e59f008c ldr r0, [pc, #140] ; 39be0 <== NOT EXECUTED 39b50: e28d3018 add r3, sp, #24 <== NOT EXECUTED 39b54: e58de000 str lr, [sp] <== NOT EXECUTED 39b58: ebff36b7 bl 763c <== NOT EXECUTED 39b5c: e3500000 cmp r0, #0 <== NOT EXECUTED 39b60: 0a000008 beq 39b88 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 39b64: e595c000 ldr ip, [r5] <== NOT EXECUTED 39b68: e28d4004 add r4, sp, #4 <== NOT EXECUTED 39b6c: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 39b70: e28cc004 add ip, ip, #4 <== NOT EXECUTED 39b74: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 39b78: e5943000 ldr r3, [r4] <== NOT EXECUTED 39b7c: e58c3000 str r3, [ip] <== NOT EXECUTED 39b80: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 39b84: ea000010 b 39bcc <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 39b88: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 39b8c: e3530000 cmp r3, #0 <== NOT EXECUTED 39b90: 0a000004 beq 39ba8 <== NOT EXECUTED 39b94: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 39b98: e3530000 cmp r3, #0 <== NOT EXECUTED 39b9c: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 39ba0: 11a0e00f movne lr, pc <== NOT EXECUTED 39ba4: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 39ba8: e59f302c ldr r3, [pc, #44] ; 39bdc <== NOT EXECUTED 39bac: e28d4018 add r4, sp, #24 <== NOT EXECUTED 39bb0: e593c000 ldr ip, [r3] <== NOT EXECUTED 39bb4: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 39bb8: e28cc004 add ip, ip, #4 <== NOT EXECUTED 39bbc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 39bc0: e5943000 ldr r3, [r4] <== NOT EXECUTED 39bc4: e58c3000 str r3, [ip] <== NOT EXECUTED 39bc8: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 39bcc: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 39bd0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 00025084 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25084: e59f3068 ldr r3, [pc, #104] ; 250f4 <== NOT EXECUTED 25088: e5932000 ldr r2, [r3] <== NOT EXECUTED 2508c: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 25090: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25094: 2a000005 bcs 250b0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 25098: e59f3058 ldr r3, [pc, #88] ; 250f8 <== NOT EXECUTED 2509c: e5933000 ldr r3, [r3] <== NOT EXECUTED 250a0: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 250a4: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 250a8: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 250ac: 1a000002 bne 250bc <== NOT EXECUTED 250b0: eb005f92 bl 3cf00 <__errno> <== NOT EXECUTED 250b4: e3a03009 mov r3, #9 <== NOT EXECUTED 250b8: ea000005 b 250d4 <== NOT EXECUTED /* * Now process the fchmod(). */ if ( !iop->handlers->fchmod_h ) 250bc: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 250c0: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 250c4: e3520000 cmp r2, #0 <== NOT EXECUTED 250c8: 1a000004 bne 250e0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 250cc: eb005f8b bl 3cf00 <__errno> <== NOT EXECUTED 250d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 250d4: e5803000 str r3, [r0] <== NOT EXECUTED 250d8: e3e00000 mvn r0, #0 <== NOT EXECUTED 250dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 250e0: e2830018 add r0, r3, #24 <== NOT EXECUTED 250e4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 250e8: e1a0e00f mov lr, pc <== NOT EXECUTED 250ec: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 250f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 000250fc : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 250fc: e59f3088 ldr r3, [pc, #136] ; 2518c <== NOT EXECUTED 25100: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 25104: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 25108: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2510c: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 25110: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 25114: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 25118: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2511c: 2a000005 bcs 25138 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 25120: e59f3068 ldr r3, [pc, #104] ; 25190 <== NOT EXECUTED 25124: e5933000 ldr r3, [r3] <== NOT EXECUTED 25128: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2512c: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 25130: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 25134: 1a000002 bne 25144 <== NOT EXECUTED 25138: eb005f70 bl 3cf00 <__errno> <== NOT EXECUTED 2513c: e3a03009 mov r3, #9 <== NOT EXECUTED 25140: ea00000a b 25170 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 25144: e3130004 tst r3, #4 <== NOT EXECUTED 25148: 1a000002 bne 25158 <== NOT EXECUTED 2514c: eb005f6b bl 3cf00 <__errno> <== NOT EXECUTED 25150: e3a03016 mov r3, #22 <== NOT EXECUTED 25154: ea000005 b 25170 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 25158: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 2515c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 25160: e3530000 cmp r3, #0 <== NOT EXECUTED 25164: 1a000004 bne 2517c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 25168: eb005f64 bl 3cf00 <__errno> <== NOT EXECUTED 2516c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25170: e5803000 str r3, [r0] <== NOT EXECUTED 25174: e3e00000 mvn r0, #0 <== NOT EXECUTED 25178: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 2517c: e2800018 add r0, r0, #24 <== NOT EXECUTED 25180: e1a0e00f mov lr, pc <== NOT EXECUTED 25184: e12fff13 bx r3 <== NOT EXECUTED } 25188: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00039be4 : int fcntl( int fd, int cmd, ... ) { 39be4: e92d000e push {r1, r2, r3} 39be8: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 39bec: e59f31a4 ldr r3, [pc, #420] ; 39d98 39bf0: e5933000 ldr r3, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 39bf4: e28d201c add r2, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 39bf8: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 39bfc: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 39c00: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 39c04: 2a000005 bcs 39c20 iop = rtems_libio_iop( fd ); 39c08: e59f118c ldr r1, [pc, #396] ; 39d9c 39c0c: e591c000 ldr ip, [r1] 39c10: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 39c14: e5940014 ldr r0, [r4, #20] 39c18: e3100c01 tst r0, #256 ; 0x100 39c1c: 1a000002 bne 39c2c 39c20: eb000cb6 bl 3cf00 <__errno> <== NOT EXECUTED 39c24: e3a03009 mov r3, #9 <== NOT EXECUTED 39c28: ea000045 b 39d44 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 39c2c: e3570009 cmp r7, #9 39c30: 979ff107 ldrls pc, [pc, r7, lsl #2] 39c34: ea000040 b 39d3c 39c38: 00039c60 .word 0x00039c60 39c3c: 00039ccc .word 0x00039ccc 39c40: 00039cd8 .word 0x00039cd8 39c44: 00039cf8 .word 0x00039cf8 39c48: 00039d04 .word 0x00039d04 39c4c: 00039d30 .word 0x00039d30 39c50: 00039d30 .word 0x00039d30 39c54: 00039d30 .word 0x00039d30 39c58: 00039d30 .word 0x00039d30 39c5c: 00039d30 .word 0x00039d30 case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 39c60: e5922000 ldr r2, [r2] if ( fd2 ) 39c64: e3520000 cmp r2, #0 39c68: 0a000003 beq 39c7c diop = rtems_libio_iop( fd2 ); 39c6c: e1520003 cmp r2, r3 <== NOT EXECUTED 39c70: 23a0c000 movcs ip, #0 <== NOT EXECUTED 39c74: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 39c78: ea000002 b 39c88 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 39c7c: ebff3797 bl 7ae0 if ( diop == 0 ) { 39c80: e250c000 subs ip, r0, #0 39c84: 0a00003e beq 39d84 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 39c88: e2846018 add r6, r4, #24 39c8c: e8b6000f ldm r6!, {r0, r1, r2, r3} 39c90: e28c5018 add r5, ip, #24 39c94: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 39c98: e59f30fc ldr r3, [pc, #252] ; 39d9c 39c9c: e5933000 ldr r3, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 39ca0: e5966000 ldr r6, [r6] ret = -1; break; } } diop->handlers = iop->handlers; 39ca4: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 39ca8: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 39cac: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 39cb0: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 39cb4: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 39cb8: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 39cbc: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 39cc0: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 39cc4: e1a05343 asr r5, r3, #6 39cc8: ea00001f b 39d4c break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 39ccc: e1a055a0 lsr r5, r0, #11 39cd0: e2055001 and r5, r5, #1 39cd4: ea00001e b 39d54 * 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 ) ) 39cd8: e5925000 ldr r5, [r2] 39cdc: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 39ce0: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 39ce4: 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; 39ce8: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 39cec: 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 ) ) 39cf0: 0a000017 beq 39d54 39cf4: ea00000b b 39d28 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 39cf8: ebff370f bl 793c 39cfc: e1a05000 mov r5, r0 39d00: ea000011 b 39d4c break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 39d04: e5920000 ldr r0, [r2] 39d08: ebff37a1 bl 7b94 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 39d0c: e5943014 ldr r3, [r4, #20] 39d10: e59f2088 ldr r2, [pc, #136] ; 39da0 39d14: e3c33c02 bic r3, r3, #512 ; 0x200 39d18: e0002002 and r2, r0, r2 39d1c: e3c33001 bic r3, r3, #1 39d20: e1823003 orr r3, r2, r3 39d24: e5843014 str r3, [r4, #20] 39d28: e3a05000 mov r5, #0 39d2c: ea000008 b 39d54 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 39d30: eb000c72 bl 3cf00 <__errno> 39d34: e3a03086 mov r3, #134 ; 0x86 39d38: ea000001 b 39d44 ret = -1; break; default: errno = EINVAL; 39d3c: eb000c6f bl 3cf00 <__errno> 39d40: e3a03016 mov r3, #22 39d44: e5803000 str r3, [r0] 39d48: ea00000d b 39d84 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 39d4c: e3550000 cmp r5, #0 39d50: ba00000c blt 39d88 if (iop->handlers->fcntl_h) { 39d54: e594303c ldr r3, [r4, #60] ; 0x3c 39d58: e5933030 ldr r3, [r3, #48] ; 0x30 39d5c: e3530000 cmp r3, #0 39d60: 0a000008 beq 39d88 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 39d64: e1a01004 mov r1, r4 39d68: e1a00007 mov r0, r7 39d6c: e1a0e00f mov lr, pc 39d70: e12fff13 bx r3 if (err) { 39d74: e2504000 subs r4, r0, #0 39d78: 0a000002 beq 39d88 errno = err; 39d7c: eb000c5f bl 3cf00 <__errno> <== NOT EXECUTED 39d80: e5804000 str r4, [r0] <== NOT EXECUTED 39d84: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 39d88: e1a00005 mov r0, r5 39d8c: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 39d90: e28dd00c add sp, sp, #12 39d94: 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: eb002f08 bl e5cc <__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: eb002f01 bl e5cc <__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 =============================================================================== 00008cb4 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8cb4: e59f331c ldr r3, [pc, #796] ; 8fd8 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 8cb8: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} 8cbc: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8cc0: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 8cc4: e1a06000 mov r6, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 8cc8: e1a02001 mov r2, r1 8ccc: e5930000 ldr r0, [r3] 8cd0: ebfff131 bl 519c 8cd4: e250a000 subs sl, r0, #0 8cd8: 13e05003 mvnne r5, #3 8cdc: 1a0000bb bne 8fd0 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 8ce0: e5964000 ldr r4, [r6] <== NOT EXECUTED if (pipe == NULL) { 8ce4: e3540000 cmp r4, #0 <== NOT EXECUTED 8ce8: 1a00003b bne 8ddc <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 8cec: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED 8cf0: ebffe542 bl 2200 <== NOT EXECUTED if (pipe == NULL) 8cf4: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 8cf8: e1a04000 mov r4, r0 <== NOT EXECUTED 8cfc: e1a08000 mov r8, r0 <== NOT EXECUTED if (pipe == NULL) 8d00: 0a000033 beq 8dd4 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 8d04: e1a0100a mov r1, sl <== NOT EXECUTED 8d08: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED 8d0c: eb0013f6 bl dcec <== NOT EXECUTED pipe->Size = PIPE_BUF; 8d10: e3a00c02 mov r0, #512 ; 0x200 <== NOT EXECUTED 8d14: e5840004 str r0, [r4, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 8d18: ebffe538 bl 2200 <== NOT EXECUTED if (! pipe->Buffer) 8d1c: 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); 8d20: e5840000 str r0, [r4] <== NOT EXECUTED if (! pipe->Buffer) 8d24: 0a000028 beq 8dcc <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 8d28: e59f52ac ldr r5, [pc, #684] ; 8fdc <== NOT EXECUTED 8d2c: e59f02ac ldr r0, [pc, #684] ; 8fe0 <== NOT EXECUTED 8d30: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 8d34: e1a0100a mov r1, sl <== NOT EXECUTED 8d38: e1830000 orr r0, r3, r0 <== NOT EXECUTED 8d3c: e1a0200a mov r2, sl <== NOT EXECUTED 8d40: e284302c add r3, r4, #44 ; 0x2c <== NOT EXECUTED 8d44: eb000678 bl a72c <== NOT EXECUTED 8d48: e2501000 subs r1, r0, #0 <== NOT EXECUTED 8d4c: 1a00001c bne 8dc4 <== 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( 8d50: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 8d54: e59f0288 ldr r0, [pc, #648] ; 8fe4 <== NOT EXECUTED 8d58: e1a02001 mov r2, r1 <== NOT EXECUTED 8d5c: e1830000 orr r0, r3, r0 <== NOT EXECUTED 8d60: e2843030 add r3, r4, #48 ; 0x30 <== NOT EXECUTED 8d64: eb000670 bl a72c <== NOT EXECUTED 8d68: e2503000 subs r3, r0, #0 <== NOT EXECUTED 8d6c: 1a000012 bne 8dbc <== 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( 8d70: e5d52000 ldrb r2, [r5] <== NOT EXECUTED 8d74: e59f026c ldr r0, [pc, #620] ; 8fe8 <== NOT EXECUTED 8d78: e284c028 add ip, r4, #40 ; 0x28 <== NOT EXECUTED 8d7c: e1820000 orr r0, r2, r0 <== NOT EXECUTED 8d80: e3a01001 mov r1, #1 <== NOT EXECUTED 8d84: e3a02010 mov r2, #16 <== NOT EXECUTED 8d88: e58dc000 str ip, [sp] <== NOT EXECUTED 8d8c: ebfff070 bl 4f54 <== NOT EXECUTED 8d90: e3500000 cmp r0, #0 <== NOT EXECUTED 8d94: 1a000006 bne 8db4 <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 8d98: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 8d9c: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED 8da0: e2833001 add r3, r3, #1 <== NOT EXECUTED 8da4: e5c53000 strb r3, [r5] <== NOT EXECUTED c = 'a'; 8da8: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED 8dac: 05c53000 strbeq r3, [r5] <== NOT EXECUTED 8db0: ea000009 b 8ddc <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 8db4: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 8db8: eb000689 bl a7e4 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 8dbc: e598002c ldr r0, [r8, #44] ; 0x2c <== NOT EXECUTED 8dc0: eb000687 bl a7e4 <== NOT EXECUTED err_rbar: free(pipe->Buffer); 8dc4: e5980000 ldr r0, [r8] <== NOT EXECUTED 8dc8: ebffe440 bl 1ed0 <== NOT EXECUTED err_buf: free(pipe); 8dcc: e1a00008 mov r0, r8 <== NOT EXECUTED 8dd0: ebffe43e bl 1ed0 <== NOT EXECUTED 8dd4: e3e0500b mvn r5, #11 <== NOT EXECUTED 8dd8: ea00000d b 8e14 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 8ddc: e3a01000 mov r1, #0 <== NOT EXECUTED 8de0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8de4: e1a02001 mov r2, r1 <== NOT EXECUTED 8de8: ebfff0eb bl 519c <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 8dec: e5963000 ldr r3, [r6] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 8df0: e3500000 cmp r0, #0 <== NOT EXECUTED 8df4: 01a05000 moveq r5, r0 <== NOT EXECUTED 8df8: 13e05003 mvnne r5, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 8dfc: e3530000 cmp r3, #0 <== NOT EXECUTED 8e00: 1a000003 bne 8e14 <== NOT EXECUTED if (err) 8e04: e3550000 cmp r5, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 8e08: 05864000 streq r4, [r6] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); 8e0c: 11a00004 movne r0, r4 <== NOT EXECUTED 8e10: 1bffff5b blne 8b84 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 8e14: e59f31bc ldr r3, [pc, #444] ; 8fd8 <== NOT EXECUTED 8e18: e5930000 ldr r0, [r3] <== NOT EXECUTED 8e1c: ebfff124 bl 52b4 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 8e20: e3550000 cmp r5, #0 <== NOT EXECUTED 8e24: 1a000069 bne 8fd0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 8e28: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 8e2c: e2033006 and r3, r3, #6 <== NOT EXECUTED 8e30: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 8e34: e5964000 ldr r4, [r6] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 8e38: 0a000024 beq 8ed0 <== NOT EXECUTED 8e3c: e3530006 cmp r3, #6 <== NOT EXECUTED 8e40: 0a000047 beq 8f64 <== NOT EXECUTED 8e44: e3530002 cmp r3, #2 <== NOT EXECUTED 8e48: 1a000059 bne 8fb4 <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 8e4c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8e50: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 8e54: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8e58: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 8e5c: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 8e60: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 8e64: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 8e68: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED 8e6c: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED 8e70: 0b000673 bleq a844 <== NOT EXECUTED if (pipe->Writers == 0) { 8e74: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 8e78: e3530000 cmp r3, #0 <== NOT EXECUTED 8e7c: 1a00004c bne 8fb4 <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 8e80: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 8e84: e3130001 tst r3, #1 <== NOT EXECUTED 8e88: 1a000049 bne 8fb4 <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 8e8c: e5948024 ldr r8, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 8e90: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8e94: ebfff106 bl 52b4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 8e98: e3a01000 mov r1, #0 <== NOT EXECUTED 8e9c: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED 8ea0: eb00067d bl a89c <== NOT EXECUTED 8ea4: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8ea8: 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)) 8eac: 1a000043 bne 8fc0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8eb0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8eb4: ebfff0b8 bl 519c <== NOT EXECUTED 8eb8: e3500000 cmp r0, #0 <== NOT EXECUTED 8ebc: 1a00003f bne 8fc0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 8ec0: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 8ec4: e1580003 cmp r8, r3 <== NOT EXECUTED 8ec8: 0afffff0 beq 8e90 <== NOT EXECUTED 8ecc: ea000038 b 8fb4 <== NOT EXECUTED break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) 8ed0: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 8ed4: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8ed8: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 8edc: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8ee0: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 8ee4: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8ee8: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 8eec: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED 8ef0: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED 8ef4: 0b000652 bleq a844 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 8ef8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED 8efc: e3530000 cmp r3, #0 <== NOT EXECUTED 8f00: 1a00002b bne 8fb4 <== NOT EXECUTED 8f04: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED 8f08: e3130001 tst r3, #1 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 8f0c: 05948020 ldreq r8, [r4, #32] <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 8f10: 0a000003 beq 8f24 <== NOT EXECUTED PIPE_UNLOCK(pipe); 8f14: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8f18: ebfff0e5 bl 52b4 <== NOT EXECUTED 8f1c: e3e05005 mvn r5, #5 <== NOT EXECUTED err = -ENXIO; goto out_error; 8f20: ea000027 b 8fc4 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 8f24: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8f28: ebfff0e1 bl 52b4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 8f2c: e3a01000 mov r1, #0 <== NOT EXECUTED 8f30: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED 8f34: eb000658 bl a89c <== NOT EXECUTED 8f38: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8f3c: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) 8f40: 1a00001e bne 8fc0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) 8f44: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8f48: ebfff093 bl 519c <== NOT EXECUTED 8f4c: e3500000 cmp r0, #0 <== NOT EXECUTED 8f50: 1a00001a bne 8fc0 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 8f54: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 8f58: e1580003 cmp r8, r3 <== NOT EXECUTED 8f5c: 0afffff0 beq 8f24 <== NOT EXECUTED 8f60: ea000013 b 8fb4 <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) 8f64: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 8f68: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 8f6c: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 8f70: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) 8f74: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 8f78: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) 8f7c: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); 8f80: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED 8f84: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED 8f88: 0b00062d bleq a844 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) 8f8c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 8f90: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8f94: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 8f98: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8f9c: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 8fa0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) 8fa4: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 8fa8: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED 8fac: 028d1004 addeq r1, sp, #4 <== NOT EXECUTED 8fb0: 0b000623 bleq a844 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); 8fb4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED 8fb8: ebfff0bd bl 52b4 <== NOT EXECUTED return 0; 8fbc: ea000003 b 8fd0 <== NOT EXECUTED 8fc0: e3e05003 mvn r5, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); 8fc4: e1a00006 mov r0, r6 <== NOT EXECUTED 8fc8: e1a01007 mov r1, r7 <== NOT EXECUTED 8fcc: ebfffef9 bl 8bb8 <== NOT EXECUTED return err; } 8fd0: e1a00005 mov r0, r5 8fd4: e8bd85fc pop {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: eb002eec bl e5cc <__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: eb002ebf bl e5cc <__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: eb0012d9 bl 6aa4 <_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 =============================================================================== 000264e8 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 264e8: e59f3058 ldr r3, [pc, #88] ; 26548 <== NOT EXECUTED 264ec: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 264f0: e92d4010 push {r4, lr} <== NOT EXECUTED 264f4: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 264f8: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 264fc: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 26500: e3530000 cmp r3, #0 <== NOT EXECUTED 26504: 0a000004 beq 2651c <== NOT EXECUTED 26508: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2650c: e3530000 cmp r3, #0 <== NOT EXECUTED 26510: 12800004 addne r0, r0, #4 <== NOT EXECUTED 26514: 11a0e00f movne lr, pc <== NOT EXECUTED 26518: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 2651c: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 26520: e3530000 cmp r3, #0 <== NOT EXECUTED 26524: 0a000004 beq 2653c <== NOT EXECUTED 26528: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2652c: e3530000 cmp r3, #0 <== NOT EXECUTED 26530: 12840018 addne r0, r4, #24 <== NOT EXECUTED 26534: 11a0e00f movne lr, pc <== NOT EXECUTED 26538: 112fff13 bxne r3 <== NOT EXECUTED free(env); 2653c: e1a00004 mov r0, r4 <== NOT EXECUTED } } 26540: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 26544: eaff845a b 76b4 <== NOT EXECUTED =============================================================================== 00018cdc : int fstat( int fd, struct stat *sbuf ) { 18cdc: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 18ce0: e2515000 subs r5, r1, #0 18ce4: 1a000002 bne 18cf4 rtems_set_errno_and_return_minus_one( EFAULT ); 18ce8: ebffd1b5 bl d3c4 <__errno> 18cec: e3a0300e mov r3, #14 18cf0: ea000014 b 18d48 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 18cf4: e59f3080 ldr r3, [pc, #128] ; 18d7c 18cf8: e5933000 ldr r3, [r3] 18cfc: e1500003 cmp r0, r3 18d00: 2a000008 bcs 18d28 18d04: e59f3074 ldr r3, [pc, #116] ; 18d80 18d08: e5934000 ldr r4, [r3] 18d0c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 18d10: e5943014 ldr r3, [r4, #20] 18d14: e3130c01 tst r3, #256 ; 0x100 18d18: 0a000002 beq 18d28 if ( !iop->handlers ) 18d1c: e594303c ldr r3, [r4, #60] ; 0x3c 18d20: e3530000 cmp r3, #0 18d24: 1a000002 bne 18d34 rtems_set_errno_and_return_minus_one( EBADF ); 18d28: ebffd1a5 bl d3c4 <__errno> 18d2c: e3a03009 mov r3, #9 18d30: ea000004 b 18d48 if ( !iop->handlers->fstat_h ) 18d34: e5933018 ldr r3, [r3, #24] 18d38: e3530000 cmp r3, #0 18d3c: 1a000004 bne 18d54 rtems_set_errno_and_return_minus_one( ENOTSUP ); 18d40: ebffd19f bl d3c4 <__errno> <== NOT EXECUTED 18d44: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 18d48: e5803000 str r3, [r0] 18d4c: e3e00000 mvn r0, #0 18d50: 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) ); 18d54: e3a01000 mov r1, #0 18d58: e3a02048 mov r2, #72 ; 0x48 18d5c: e1a00005 mov r0, r5 18d60: ebffd3e1 bl dcec return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 18d64: e2840018 add r0, r4, #24 18d68: e1a01005 mov r1, r5 18d6c: e594303c ldr r3, [r4, #60] ; 0x3c 18d70: e1a0e00f mov lr, pc 18d74: e593f018 ldr pc, [r3, #24] } 18d78: e8bd8030 pop {r4, r5, pc} =============================================================================== 00025248 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25248: e59f3068 ldr r3, [pc, #104] ; 252b8 2524c: e5933000 ldr r3, [r3] 25250: e1500003 cmp r0, r3 #include int fsync( int fd ) { 25254: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 25258: 2a000008 bcs 25280 iop = rtems_libio_iop( fd ); 2525c: e59f3058 ldr r3, [pc, #88] ; 252bc 25260: e5933000 ldr r3, [r3] 25264: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 25268: e5903014 ldr r3, [r0, #20] 2526c: e3130c01 tst r3, #256 ; 0x100 25270: 0a000002 beq 25280 /* * Now process the fsync(). */ if ( !iop->handlers ) 25274: e590303c ldr r3, [r0, #60] ; 0x3c 25278: e3530000 cmp r3, #0 2527c: 1a000002 bne 2528c rtems_set_errno_and_return_minus_one( EBADF ); 25280: eb005f1e bl 3cf00 <__errno> <== NOT EXECUTED 25284: e3a03009 mov r3, #9 <== NOT EXECUTED 25288: ea000004 b 252a0 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 2528c: e5933028 ldr r3, [r3, #40] ; 0x28 25290: e3530000 cmp r3, #0 25294: 1a000004 bne 252ac rtems_set_errno_and_return_minus_one( ENOTSUP ); 25298: eb005f18 bl 3cf00 <__errno> 2529c: e3a03086 mov r3, #134 ; 0x86 252a0: e5803000 str r3, [r0] 252a4: e3e00000 mvn r0, #0 252a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 252ac: e1a0e00f mov lr, pc 252b0: e12fff13 bx r3 } 252b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000a0f4 : int ftruncate( int fd, off_t length ) { a0f4: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a0f8: e59f30dc ldr r3, [pc, #220] ; a1dc a0fc: e5933000 ldr r3, [r3] a100: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { a104: e24dd014 sub sp, sp, #20 a108: e1a05001 mov r5, r1 a10c: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a110: 2a000005 bcs a12c iop = rtems_libio_iop( fd ); a114: e59f30c4 ldr r3, [pc, #196] ; a1e0 a118: e5934000 ldr r4, [r3] a11c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); a120: e5943014 ldr r3, [r4, #20] a124: e3130c01 tst r3, #256 ; 0x100 a128: 1a000002 bne a138 a12c: eb000ca4 bl d3c4 <__errno> <== NOT EXECUTED a130: e3a03009 mov r3, #9 <== NOT EXECUTED a134: ea00001e b a1b4 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); a138: e3130004 tst r3, #4 a13c: 0a000013 beq a190 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a140: e284e018 add lr, r4, #24 a144: e8be000f ldm lr!, {r0, r1, r2, r3} a148: e1a0c00d mov ip, sp a14c: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) a150: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a154: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) a158: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a15c: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) a160: 0a000011 beq a1ac rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) a164: e1a0000d mov r0, sp a168: e1a0e00f mov lr, pc a16c: e12fff13 bx r3 a170: e3500001 cmp r0, #1 a174: 1a000002 bne a184 rtems_set_errno_and_return_minus_one( EISDIR ); a178: eb000c91 bl d3c4 <__errno> a17c: e3a03015 mov r3, #21 a180: ea00000b b a1b4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); a184: e5943014 ldr r3, [r4, #20] a188: e3130004 tst r3, #4 a18c: 1a000002 bne a19c a190: eb000c8b bl d3c4 <__errno> <== NOT EXECUTED a194: e3a03016 mov r3, #22 <== NOT EXECUTED a198: ea000005 b a1b4 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) a19c: e594303c ldr r3, [r4, #60] ; 0x3c a1a0: e5933020 ldr r3, [r3, #32] a1a4: e3530000 cmp r3, #0 a1a8: 1a000004 bne a1c0 rtems_set_errno_and_return_minus_one( ENOTSUP ); a1ac: eb000c84 bl d3c4 <__errno> <== NOT EXECUTED a1b0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a1b4: e5803000 str r3, [r0] a1b8: e3e00000 mvn r0, #0 a1bc: ea000004 b a1d4 return (*iop->handlers->ftruncate_h)( iop, length ); a1c0: e1a00004 mov r0, r4 a1c4: e1a01005 mov r1, r5 a1c8: e1a02006 mov r2, r6 a1cc: e1a0e00f mov lr, pc a1d0: e12fff13 bx r3 } a1d4: e28dd014 add sp, sp, #20 a1d8: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00056a9c : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 56a9c: e59f30a8 ldr r3, [pc, #168] ; 56b4c 56aa0: e5933000 ldr r3, [r3] 56aa4: e1500003 cmp r0, r3 56aa8: 359f30a0 ldrcc r3, [pc, #160] ; 56b50 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 56aac: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 56ab0: 35934000 ldrcc r4, [r3] 56ab4: 23a04000 movcs r4, #0 56ab8: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56abc: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 56ac0: e24dd014 sub sp, sp, #20 56ac4: e1a06001 mov r6, r1 56ac8: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56acc: e8be000f ldm lr!, {r0, r1, r2, r3} 56ad0: e1a0c00d mov ip, sp 56ad4: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 56ad8: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56adc: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 56ae0: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 56ae4: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 56ae8: 0a00000d beq 56b24 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 56aec: e1a0000d mov r0, sp 56af0: e1a0e00f mov lr, pc 56af4: e12fff13 bx r3 56af8: e3500001 cmp r0, #1 56afc: 0a000004 beq 56b14 rtems_set_errno_and_return_minus_one( ENOTDIR ); 56b00: ebff98fe bl 3cf00 <__errno> 56b04: e3a03014 mov r3, #20 56b08: e5803000 str r3, [r0] 56b0c: e3e00000 mvn r0, #0 56b10: ea00000b b 56b44 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 56b14: e594303c ldr r3, [r4, #60] ; 0x3c 56b18: e5933008 ldr r3, [r3, #8] 56b1c: e3530000 cmp r3, #0 56b20: 1a000002 bne 56b30 rtems_set_errno_and_return_minus_one( ENOTSUP ); 56b24: ebff98f5 bl 3cf00 <__errno> <== NOT EXECUTED 56b28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 56b2c: eafffff5 b 56b08 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 56b30: e1a00004 mov r0, r4 56b34: e1a01006 mov r1, r6 56b38: e1a02005 mov r2, r5 56b3c: e1a0e00f mov lr, pc 56b40: e12fff13 bx r3 } 56b44: e28dd014 add sp, sp, #20 56b48: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000253d8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 253d8: e59f3008 ldr r3, [pc, #8] ; 253e8 <== NOT EXECUTED 253dc: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 253e0: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 253e4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 000259e0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 259e0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 259e4: e59da01c ldr sl, [sp, #28] 259e8: e1a06000 mov r6, r0 259ec: e1a07001 mov r7, r1 259f0: e1a04002 mov r4, r2 259f4: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 259f8: ebffffb7 bl 258dc if ((fp = fopen("/etc/group", "r")) == NULL) { 259fc: e59f00a4 ldr r0, [pc, #164] ; 25aa8 25a00: e59f10a4 ldr r1, [pc, #164] ; 25aac 25a04: eb005fad bl 3d8c0 25a08: e2505000 subs r5, r0, #0 25a0c: 1a000003 bne 25a20 errno = EINVAL; 25a10: eb005d3a bl 3cf00 <__errno> <== NOT EXECUTED 25a14: e3a03016 mov r3, #22 <== NOT EXECUTED 25a18: e5803000 str r3, [r0] <== NOT EXECUTED 25a1c: ea00000c b 25a54 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 25a20: e1a01004 mov r1, r4 25a24: e1a02008 mov r2, r8 25a28: e1a0300a mov r3, sl 25a2c: e1a00005 mov r0, r5 25a30: ebfffef2 bl 25600 25a34: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 25a38: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 25a3c: 1a000006 bne 25a5c errno = EINVAL; 25a40: eb005d2e bl 3cf00 <__errno> <== NOT EXECUTED 25a44: e3a03016 mov r3, #22 <== NOT EXECUTED 25a48: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 25a4c: e1a00005 mov r0, r5 <== NOT EXECUTED 25a50: eb005d77 bl 3d034 <== NOT EXECUTED 25a54: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 25a58: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 25a5c: e3560000 cmp r6, #0 25a60: 0a000004 beq 25a78 match = (strcmp(grp->gr_name, name) == 0); 25a64: e5940000 ldr r0, [r4] 25a68: eb0075b9 bl 43154 25a6c: e2700001 rsbs r0, r0, #1 25a70: 33a00000 movcc r0, #0 25a74: ea000003 b 25a88 } else { match = (grp->gr_gid == gid); 25a78: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 25a7c: e1500007 cmp r0, r7 <== NOT EXECUTED 25a80: 13a00000 movne r0, #0 <== NOT EXECUTED 25a84: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 25a88: e3500000 cmp r0, #0 25a8c: 0affffe3 beq 25a20 fclose(fp); 25a90: e1a00005 mov r0, r5 25a94: eb005d66 bl 3d034 *result = grp; 25a98: e59d3020 ldr r3, [sp, #32] 25a9c: e3a00000 mov r0, #0 25aa0: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 25aa4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00025738 : return NULL; return p; } struct group *getgrent(void) { 25738: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 2573c: e59f402c ldr r4, [pc, #44] ; 25770 <== NOT EXECUTED 25740: e5940000 ldr r0, [r4] <== NOT EXECUTED 25744: e3500000 cmp r0, #0 <== NOT EXECUTED 25748: 0a000006 beq 25768 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 2574c: e2841008 add r1, r4, #8 <== NOT EXECUTED 25750: e2842018 add r2, r4, #24 <== NOT EXECUTED 25754: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25758: ebffffa8 bl 25600 <== NOT EXECUTED 2575c: e3500000 cmp r0, #0 <== NOT EXECUTED 25760: 12840008 addne r0, r4, #8 <== NOT EXECUTED 25764: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25768: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 2576c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00025ae4 : struct group *getgrgid( gid_t gid ) { 25ae4: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 25ae8: e59f1028 ldr r1, [pc, #40] ; 25b18 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 25aec: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 25af0: e28dc004 add ip, sp, #4 <== NOT EXECUTED 25af4: e2812010 add r2, r1, #16 <== NOT EXECUTED 25af8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25afc: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 25b00: e58dc000 str ip, [sp] <== NOT EXECUTED 25b04: ebffffe9 bl 25ab0 <== NOT EXECUTED 25b08: e3500000 cmp r0, #0 <== NOT EXECUTED 25b0c: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 25b10: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 25b14: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED =============================================================================== 00025ab0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25ab0: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 25ab4: e1a0c002 mov ip, r2 <== NOT EXECUTED 25ab8: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 25abc: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 25ac0: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 25ac4: e1a0300c mov r3, ip <== NOT EXECUTED 25ac8: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 25acc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 25ad0: e1a0200e mov r2, lr <== NOT EXECUTED 25ad4: e3a00000 mov r0, #0 <== NOT EXECUTED 25ad8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 25adc: ebffffbf bl 259e0 <== NOT EXECUTED } 25ae0: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED =============================================================================== 00020d24 : */ pid_t getpid( void ) { return _Objects_Local_node; } 20d24: e3a00001 mov r0, #1 <== NOT EXECUTED 20d28: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00025bb0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 25bb0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 25bb4: e59da01c ldr sl, [sp, #28] 25bb8: e1a06000 mov r6, r0 25bbc: e1a07001 mov r7, r1 25bc0: e1a04002 mov r4, r2 25bc4: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 25bc8: ebffff43 bl 258dc if ((fp = fopen("/etc/passwd", "r")) == NULL) { 25bcc: e59f00a4 ldr r0, [pc, #164] ; 25c78 25bd0: e59f10a4 ldr r1, [pc, #164] ; 25c7c 25bd4: eb005f39 bl 3d8c0 25bd8: e2505000 subs r5, r0, #0 25bdc: 1a000003 bne 25bf0 errno = EINVAL; 25be0: eb005cc6 bl 3cf00 <__errno> <== NOT EXECUTED 25be4: e3a03016 mov r3, #22 <== NOT EXECUTED 25be8: e5803000 str r3, [r0] <== NOT EXECUTED 25bec: ea00000c b 25c24 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 25bf0: e1a01004 mov r1, r4 25bf4: e1a02008 mov r2, r8 25bf8: e1a0300a mov r3, sl 25bfc: e1a00005 mov r0, r5 25c00: ebfffedb bl 25774 25c04: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 25c08: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 25c0c: 1a000006 bne 25c2c errno = EINVAL; 25c10: eb005cba bl 3cf00 <__errno> <== NOT EXECUTED 25c14: e3a03016 mov r3, #22 <== NOT EXECUTED 25c18: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 25c1c: e1a00005 mov r0, r5 <== NOT EXECUTED 25c20: eb005d03 bl 3d034 <== NOT EXECUTED 25c24: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 25c28: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 25c2c: e3560000 cmp r6, #0 25c30: 0a000004 beq 25c48 match = (strcmp(pwd->pw_name, name) == 0); 25c34: e5940000 ldr r0, [r4] 25c38: eb007545 bl 43154 25c3c: e2700001 rsbs r0, r0, #1 25c40: 33a00000 movcc r0, #0 25c44: ea000003 b 25c58 } else { match = (pwd->pw_uid == uid); 25c48: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 25c4c: e1500007 cmp r0, r7 <== NOT EXECUTED 25c50: 13a00000 movne r0, #0 <== NOT EXECUTED 25c54: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 25c58: e3500000 cmp r0, #0 25c5c: 0affffe3 beq 25bf0 fclose(fp); 25c60: e1a00005 mov r0, r5 25c64: eb005cf2 bl 3d034 *result = pwd; 25c68: e59d3020 ldr r3, [sp, #32] 25c6c: e3a00000 mov r0, #0 25c70: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 25c74: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 000258a0 : return NULL; return p; } struct passwd *getpwent(void) { 258a0: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 258a4: e59f402c ldr r4, [pc, #44] ; 258d8 <== NOT EXECUTED 258a8: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 258ac: e3500000 cmp r0, #0 <== NOT EXECUTED 258b0: 0a000006 beq 258d0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 258b4: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 258b8: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 258bc: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 258c0: ebffffab bl 25774 <== NOT EXECUTED 258c4: e3500000 cmp r0, #0 <== NOT EXECUTED 258c8: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 258cc: 18bd8010 popne {r4, pc} <== NOT EXECUTED 258d0: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 258d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00025cb4 : struct passwd *getpwuid( uid_t uid ) { 25cb4: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 25cb8: e59f1028 ldr r1, [pc, #40] ; 25ce8 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 25cbc: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 25cc0: e28dc004 add ip, sp, #4 <== NOT EXECUTED 25cc4: e281201c add r2, r1, #28 <== NOT EXECUTED 25cc8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 25ccc: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 25cd0: e58dc000 str ip, [sp] <== NOT EXECUTED 25cd4: ebffffe9 bl 25c80 <== NOT EXECUTED 25cd8: e3500000 cmp r0, #0 <== NOT EXECUTED 25cdc: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 25ce0: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 25ce4: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED =============================================================================== 00025c80 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 25c80: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 25c84: e1a0c002 mov ip, r2 <== NOT EXECUTED 25c88: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 25c8c: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 25c90: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 25c94: e1a0300c mov r3, ip <== NOT EXECUTED 25c98: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 25c9c: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 25ca0: e1a0200e mov r2, lr <== NOT EXECUTED 25ca4: e3a00000 mov r0, #0 <== NOT EXECUTED 25ca8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 25cac: ebffffbf bl 25bb0 <== NOT EXECUTED } 25cb0: 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: eb002d0f bl d3c4 <__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: eb000fae bl 5e64 <_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: eb0052ce bl 16afc <__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: eb003004 bl 11330 <__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: eb002ffe bl 11330 <__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 =============================================================================== 00020d3c : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 20d3c: e3a00000 mov r0, #0 <== NOT EXECUTED 20d40: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00025d44 : int link( const char *existing, const char *new ) { 25d44: e92d4070 push {r4, r5, r6, lr} 25d48: e24dd034 sub sp, sp, #52 ; 0x34 25d4c: e1a05001 mov r5, r1 25d50: e1a06000 mov r6, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 25d54: eb007766 bl 43af4 25d58: e28d4018 add r4, sp, #24 25d5c: e1a01000 mov r1, r0 25d60: e3a0c001 mov ip, #1 25d64: e1a00006 mov r0, r6 25d68: e3a02000 mov r2, #0 25d6c: e1a03004 mov r3, r4 25d70: e58dc000 str ip, [sp] 25d74: ebff8630 bl 763c 0, &existing_loc, true ); if ( result != 0 ) 25d78: e3500000 cmp r0, #0 25d7c: 1a000014 bne 25dd4 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 25d80: e28d6004 add r6, sp, #4 25d84: e1a00005 mov r0, r5 25d88: e28d1030 add r1, sp, #48 ; 0x30 25d8c: e1a02006 mov r2, r6 25d90: ebff8c62 bl 8f20 if ( !parent_loc.ops->evalformake_h ) { 25d94: e59d3010 ldr r3, [sp, #16] 25d98: e5933004 ldr r3, [r3, #4] 25d9c: e3530000 cmp r3, #0 25da0: 1a00000d bne 25ddc rtems_filesystem_freenode( &existing_loc ); 25da4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 25da8: e3530000 cmp r3, #0 <== NOT EXECUTED 25dac: 0a000005 beq 25dc8 <== NOT EXECUTED 25db0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 25db4: e3530000 cmp r3, #0 <== NOT EXECUTED 25db8: 0a000002 beq 25dc8 <== NOT EXECUTED 25dbc: e1a00004 mov r0, r4 <== NOT EXECUTED 25dc0: e1a0e00f mov lr, pc <== NOT EXECUTED 25dc4: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 25dc8: eb005c4c bl 3cf00 <__errno> <== NOT EXECUTED 25dcc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 25dd0: e5803000 str r3, [r0] 25dd4: e3e05000 mvn r5, #0 25dd8: ea000053 b 25f2c } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 25ddc: e59d0030 ldr r0, [sp, #48] ; 0x30 25de0: e1a01006 mov r1, r6 25de4: e0850000 add r0, r5, r0 25de8: e28d202c add r2, sp, #44 ; 0x2c 25dec: e1a0e00f mov lr, pc 25df0: e12fff13 bx r3 if ( result != 0 ) { 25df4: e2505000 subs r5, r0, #0 25df8: 0a00000a beq 25e28 rtems_filesystem_freenode( &existing_loc ); 25dfc: e59d3024 ldr r3, [sp, #36] ; 0x24 25e00: e3530000 cmp r3, #0 25e04: 0a000004 beq 25e1c 25e08: e593301c ldr r3, [r3, #28] 25e0c: e3530000 cmp r3, #0 25e10: 11a00004 movne r0, r4 25e14: 11a0e00f movne lr, pc 25e18: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 25e1c: eb005c37 bl 3cf00 <__errno> 25e20: e5805000 str r5, [r0] 25e24: eaffffea b 25dd4 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 25e28: e59d3028 ldr r3, [sp, #40] ; 0x28 25e2c: e59d2014 ldr r2, [sp, #20] 25e30: e1520003 cmp r2, r3 25e34: 0a000012 beq 25e84 rtems_filesystem_freenode( &existing_loc ); 25e38: e59d3024 ldr r3, [sp, #36] ; 0x24 25e3c: e3530000 cmp r3, #0 25e40: 0a000004 beq 25e58 25e44: e593301c ldr r3, [r3, #28] 25e48: e3530000 cmp r3, #0 25e4c: 11a00004 movne r0, r4 25e50: 11a0e00f movne lr, pc 25e54: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 25e58: e59d3010 ldr r3, [sp, #16] 25e5c: e3530000 cmp r3, #0 25e60: 0a000004 beq 25e78 25e64: e593301c ldr r3, [r3, #28] 25e68: e3530000 cmp r3, #0 25e6c: 128d0004 addne r0, sp, #4 25e70: 11a0e00f movne lr, pc 25e74: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 25e78: eb005c20 bl 3cf00 <__errno> 25e7c: e3a03012 mov r3, #18 25e80: eaffffd2 b 25dd0 } if ( !parent_loc.ops->link_h ) { 25e84: e59d3010 ldr r3, [sp, #16] 25e88: e5933008 ldr r3, [r3, #8] 25e8c: e3530000 cmp r3, #0 25e90: 1a00000f bne 25ed4 rtems_filesystem_freenode( &existing_loc ); 25e94: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 25e98: e3530000 cmp r3, #0 <== NOT EXECUTED 25e9c: 0a000004 beq 25eb4 <== NOT EXECUTED 25ea0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 25ea4: e3530000 cmp r3, #0 <== NOT EXECUTED 25ea8: 11a00004 movne r0, r4 <== NOT EXECUTED 25eac: 11a0e00f movne lr, pc <== NOT EXECUTED 25eb0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 25eb4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 25eb8: e3530000 cmp r3, #0 <== NOT EXECUTED 25ebc: 0affffc1 beq 25dc8 <== NOT EXECUTED 25ec0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 25ec4: e3530000 cmp r3, #0 <== NOT EXECUTED 25ec8: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 25ecc: 1affffbb bne 25dc0 <== NOT EXECUTED 25ed0: eaffffbc b 25dc8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 25ed4: e1a01006 mov r1, r6 25ed8: e1a00004 mov r0, r4 25edc: e59d202c ldr r2, [sp, #44] ; 0x2c 25ee0: e1a0e00f mov lr, pc 25ee4: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 25ee8: e59d3024 ldr r3, [sp, #36] ; 0x24 25eec: 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 ); 25ef0: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 25ef4: 0a000004 beq 25f0c 25ef8: e593301c ldr r3, [r3, #28] 25efc: e3530000 cmp r3, #0 25f00: 11a00004 movne r0, r4 25f04: 11a0e00f movne lr, pc 25f08: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 25f0c: e59d3010 ldr r3, [sp, #16] 25f10: e3530000 cmp r3, #0 25f14: 0a000004 beq 25f2c 25f18: e593301c ldr r3, [r3, #28] 25f1c: e3530000 cmp r3, #0 25f20: 128d0004 addne r0, sp, #4 25f24: 11a0e00f movne lr, pc 25f28: 112fff13 bxne r3 return result; } 25f2c: e1a00005 mov r0, r5 25f30: e28dd034 add sp, sp, #52 ; 0x34 25f34: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00018d98 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 18d98: e59fc0ec ldr ip, [pc, #236] ; 18e8c 18d9c: e59cc000 ldr ip, [ip] 18da0: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 18da4: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 18da8: 2a000005 bcs 18dc4 iop = rtems_libio_iop( fd ); 18dac: e59fc0dc ldr ip, [pc, #220] ; 18e90 18db0: e59c4000 ldr r4, [ip] 18db4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 18db8: e5940014 ldr r0, [r4, #20] 18dbc: e3100c01 tst r0, #256 ; 0x100 18dc0: 1a000002 bne 18dd0 18dc4: ebffd17e bl d3c4 <__errno> <== NOT EXECUTED 18dc8: e3a03009 mov r3, #9 <== NOT EXECUTED 18dcc: ea00001c b 18e44 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 18dd0: e594003c ldr r0, [r4, #60] ; 0x3c 18dd4: e5900014 ldr r0, [r0, #20] 18dd8: e3500000 cmp r0, #0 18ddc: 1a000002 bne 18dec rtems_set_errno_and_return_minus_one( ENOTSUP ); 18de0: ebffd177 bl d3c4 <__errno> <== NOT EXECUTED 18de4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 18de8: ea000015 b 18e44 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 18dec: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 18df0: e284600c add r6, r4, #12 18df4: e8960060 ldm r6, {r5, r6} switch ( whence ) { 18df8: 0a000006 beq 18e18 18dfc: e3530002 cmp r3, #2 18e00: 0a000007 beq 18e24 18e04: e3530000 cmp r3, #0 18e08: 1a00000b bne 18e3c case SEEK_SET: iop->offset = offset; 18e0c: e584100c str r1, [r4, #12] 18e10: e5842010 str r2, [r4, #16] break; 18e14: ea00000e b 18e54 case SEEK_CUR: iop->offset += offset; 18e18: e091b005 adds fp, r1, r5 18e1c: e0a2c006 adc ip, r2, r6 18e20: ea000002 b 18e30 break; case SEEK_END: iop->offset = iop->size + offset; 18e24: e9941800 ldmib r4, {fp, ip} 18e28: e09bb001 adds fp, fp, r1 18e2c: e0acc002 adc ip, ip, r2 18e30: e584b00c str fp, [r4, #12] 18e34: e584c010 str ip, [r4, #16] break; 18e38: ea000005 b 18e54 default: rtems_set_errno_and_return_minus_one( EINVAL ); 18e3c: ebffd160 bl d3c4 <__errno> 18e40: e3a03016 mov r3, #22 18e44: e5803000 str r3, [r0] 18e48: e3e02000 mvn r2, #0 18e4c: e3e03000 mvn r3, #0 18e50: ea00000a b 18e80 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 18e54: e594c03c ldr ip, [r4, #60] ; 0x3c 18e58: e1a00004 mov r0, r4 18e5c: e1a0e00f mov lr, pc 18e60: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 18e64: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 18e68: e1a02000 mov r2, r0 18e6c: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 18e70: 1a000002 bne 18e80 18e74: e3710001 cmn r1, #1 iop->offset = old_offset; 18e78: 0584500c streq r5, [r4, #12] 18e7c: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 18e80: e1a01003 mov r1, r3 18e84: e1a00002 mov r0, r2 18e88: e8bd8870 pop {r4, r5, r6, fp, pc} =============================================================================== 00026054 : int _STAT_NAME( const char *path, struct stat *buf ) { 26054: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 26058: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 2605c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 26060: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 26064: 1a000002 bne 26074 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 26068: eb005ba4 bl 3cf00 <__errno> <== NOT EXECUTED 2606c: e3a0300e mov r3, #14 <== NOT EXECUTED 26070: ea000018 b 260d8 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 26074: eb00769e bl 43af4 <== NOT EXECUTED 26078: e28d4004 add r4, sp, #4 <== NOT EXECUTED 2607c: e3a0c000 mov ip, #0 <== NOT EXECUTED 26080: e1a01000 mov r1, r0 <== NOT EXECUTED 26084: e1a0200c mov r2, ip <== NOT EXECUTED 26088: e1a00006 mov r0, r6 <== NOT EXECUTED 2608c: e1a03004 mov r3, r4 <== NOT EXECUTED 26090: e58dc000 str ip, [sp] <== NOT EXECUTED 26094: ebff8568 bl 763c <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 26098: e2501000 subs r1, r0, #0 <== NOT EXECUTED 2609c: 1a00000e bne 260dc <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 260a0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 260a4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 260a8: e3530000 cmp r3, #0 <== NOT EXECUTED 260ac: 1a00000c bne 260e4 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 260b0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 260b4: e3530000 cmp r3, #0 <== NOT EXECUTED 260b8: 0a000004 beq 260d0 <== NOT EXECUTED 260bc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 260c0: e3530000 cmp r3, #0 <== NOT EXECUTED 260c4: 11a00004 movne r0, r4 <== NOT EXECUTED 260c8: 11a0e00f movne lr, pc <== NOT EXECUTED 260cc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 260d0: eb005b8a bl 3cf00 <__errno> <== NOT EXECUTED 260d4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 260d8: e5803000 str r3, [r0] <== NOT EXECUTED 260dc: e3e05000 mvn r5, #0 <== NOT EXECUTED 260e0: ea000010 b 26128 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 260e4: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 260e8: e1a00005 mov r0, r5 <== NOT EXECUTED 260ec: eb0068ba bl 403dc <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 260f0: e1a01005 mov r1, r5 <== NOT EXECUTED 260f4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 260f8: e1a00004 mov r0, r4 <== NOT EXECUTED 260fc: e1a0e00f mov lr, pc <== NOT EXECUTED 26100: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 26104: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 26108: 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 ); 2610c: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 26110: 0a000004 beq 26128 <== NOT EXECUTED 26114: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 26118: e3530000 cmp r3, #0 <== NOT EXECUTED 2611c: 11a00004 movne r0, r4 <== NOT EXECUTED 26120: 11a0e00f movne lr, pc <== NOT EXECUTED 26124: 112fff13 bxne r3 <== NOT EXECUTED return status; } 26128: e1a00005 mov r0, r5 <== NOT EXECUTED 2612c: e28dd018 add sp, sp, #24 <== NOT EXECUTED 26130: 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: eb0011ff bl 6a58 <_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: eb002c4d bl d3c4 <__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: ea000e55 b 5a48 <_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: eb000e63 bl 5a98 <_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) =============================================================================== 0000beac : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { beac: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; beb0: 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 ) beb4: e5943054 ldr r3, [r4, #84] ; 0x54 beb8: e1530002 cmp r3, r2 bebc: ba000003 blt bed0 bec0: 1a000005 bne bedc bec4: e5943050 ldr r3, [r4, #80] ; 0x50 bec8: e1530001 cmp r3, r1 becc: 2a000002 bcs bedc return IMFS_memfile_extend( the_jnode, length ); bed0: e1a00004 mov r0, r4 <== NOT EXECUTED bed4: ebffff9a bl bd44 <== NOT EXECUTED bed8: ea000008 b bf00 <== 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; bedc: e5841050 str r1, [r4, #80] ; 0x50 bee0: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; bee4: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); bee8: e3a01000 mov r1, #0 beec: e1a0000d mov r0, sp bef0: ebffd81f bl 1f74 bef4: e59d3000 ldr r3, [sp] bef8: e5843040 str r3, [r4, #64] ; 0x40 befc: e3a00000 mov r0, #0 return 0; } bf00: e8bd801c pop {r2, r3, r4, pc} =============================================================================== 0000bf04 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { bf04: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; bf08: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { bf0c: e595304c ldr r3, [r5, #76] ; 0x4c bf10: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { bf14: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { bf18: 1a00000b bne bf4c if (iop->offset > the_jnode->info.linearfile.size) bf1c: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED bf20: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED bf24: e1520003 cmp r2, r3 <== NOT EXECUTED bf28: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED bf2c: ca000003 bgt bf40 <== NOT EXECUTED bf30: 1a000014 bne bf88 <== NOT EXECUTED bf34: e590100c ldr r1, [r0, #12] <== NOT EXECUTED bf38: e1510002 cmp r1, r2 <== NOT EXECUTED bf3c: 9a000011 bls bf88 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; bf40: e584200c str r2, [r4, #12] <== NOT EXECUTED bf44: e5843010 str r3, [r4, #16] <== NOT EXECUTED bf48: ea00000e b bf88 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) bf4c: e1a00005 mov r0, r5 bf50: e284200c add r2, r4, #12 bf54: e8920006 ldm r2, {r1, r2} bf58: ebffff79 bl bd44 bf5c: e3500000 cmp r0, #0 bf60: 0a000005 beq bf7c rtems_set_errno_and_return_minus_one( ENOSPC ); bf64: eb000516 bl d3c4 <__errno> <== NOT EXECUTED bf68: e3a0301c mov r3, #28 <== NOT EXECUTED bf6c: e5803000 str r3, [r0] <== NOT EXECUTED bf70: e3e04000 mvn r4, #0 <== NOT EXECUTED bf74: e3e03000 mvn r3, #0 <== NOT EXECUTED bf78: ea000004 b bf90 <== NOT EXECUTED iop->size = the_jnode->info.file.size; bf7c: e2853050 add r3, r5, #80 ; 0x50 bf80: e893000c ldm r3, {r2, r3} bf84: e984000c stmib r4, {r2, r3} } return iop->offset; bf88: e284400c add r4, r4, #12 bf8c: e8940018 ldm r4, {r3, r4} } bf90: e1a01004 mov r1, r4 bf94: e1a00003 mov r0, r3 bf98: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000c228 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) c228: e5903014 ldr r3, [r0, #20] c22c: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { c230: e92d4031 push {r0, r4, r5, lr} c234: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; c238: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) c23c: 0a000017 beq c2a0 && (the_jnode->type == IMFS_LINEAR_FILE)) { c240: e594304c ldr r3, [r4, #76] ; 0x4c c244: e3530006 cmp r3, #6 c248: 1a000014 bne c2a0 uint32_t count = the_jnode->info.linearfile.size; c24c: 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; c250: 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; c254: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; c258: e3a00000 mov r0, #0 <== NOT EXECUTED c25c: 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) c260: 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; c264: 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; c268: 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; c26c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; c270: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED c274: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; c278: 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; c27c: 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) c280: 0a000006 beq c2a0 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) c284: e1a02001 mov r2, r1 <== NOT EXECUTED c288: e1a01000 mov r1, r0 <== NOT EXECUTED c28c: e1a00004 mov r0, r4 <== NOT EXECUTED c290: e58dc000 str ip, [sp] <== NOT EXECUTED c294: ebffff40 bl bf9c <== 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) c298: e3700001 cmn r0, #1 <== NOT EXECUTED c29c: 0a000009 beq c2c8 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) c2a0: e5953014 ldr r3, [r5, #20] c2a4: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; c2a8: 12843050 addne r3, r4, #80 ; 0x50 c2ac: 1893000c ldmne r3, {r2, r3} c2b0: 1585200c strne r2, [r5, #12] c2b4: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; c2b8: e2844050 add r4, r4, #80 ; 0x50 c2bc: e8940018 ldm r4, {r3, r4} c2c0: e9850018 stmib r5, {r3, r4} c2c4: e3a00000 mov r0, #0 return 0; } c2c8: 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: eb002c1b bl d3c4 <__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: eb002c0f bl d3c4 <__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: eb002048 bl a600 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: eb002bb5 bl d3c4 <__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: eb002fb0 bl e3d8 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: eb002faa bl e3d8 252c: e280a001 add sl, r0, #1 size_t target_length = strlen( target ); 2530: e59d0004 ldr r0, [sp, #4] 2534: eb002fa7 bl e3d8 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: eb002f4b bl e298 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: eb002f44 bl e298 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: eb002f3f bl e298 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: eb002b7a bl d3c4 <__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: eb002b63 bl d3c4 <__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: eb002b5a bl d3c4 <__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: eb002b4c bl d3c4 <__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: eb002b3d bl d3c4 <__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: eb000cc3 bl 5a48 <_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} =============================================================================== 00030f04 : msdos_node_type_t type, const char *name, int name_len, mode_t mode, const fat_file_fd_t *link_fd) { 30f04: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED 30f08: 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; 30f0c: 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; 30f10: 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); 30f14: 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; 30f18: 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) { 30f1c: e1a04000 mov r4, r0 <== NOT EXECUTED 30f20: e1a09002 mov r9, r2 <== NOT EXECUTED 30f24: 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); 30f28: e3a02020 mov r2, #32 <== NOT EXECUTED 30f2c: e1a01005 mov r1, r5 <== NOT EXECUTED 30f30: e1a0000a mov r0, sl <== NOT EXECUTED dir_pos->lname.ofs = FAT_FILE_SHORT_NAME; 30f34: 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) { 30f38: 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; 30f3c: 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; 30f40: 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; 30f44: e58d50a0 str r5, [sp, #160] ; 0xa0 <== NOT EXECUTED time_t time_ret = 0; uint16_t time_val = 0; 30f48: e1cd5ab6 strh r5, [sp, #166] ; 0xa6 <== NOT EXECUTED uint16_t date = 0; 30f4c: 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; 30f50: e58d5090 str r5, [sp, #144] ; 0x90 <== NOT EXECUTED dir_pos->sname.ofs = 0; 30f54: 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; 30f58: 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); 30f5c: eb003d1e bl 403dc <== NOT EXECUTED memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2); 30f60: e1a01005 mov r1, r5 <== NOT EXECUTED 30f64: e3a02040 mov r2, #64 ; 0x40 <== NOT EXECUTED 30f68: e28d0010 add r0, sp, #16 <== NOT EXECUTED 30f6c: eb003d1a bl 403dc <== NOT EXECUTED name_type = msdos_long_to_short (name, name_len, 30f70: e1a0100b mov r1, fp <== NOT EXECUTED 30f74: e1a0200a mov r2, sl <== NOT EXECUTED 30f78: e3a0300b mov r3, #11 <== NOT EXECUTED 30f7c: e1a00009 mov r0, r9 <== NOT EXECUTED 30f80: eb000786 bl 32da0 <== NOT EXECUTED 30f84: 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); 30f88: 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; 30f8c: e5cd507c strb r5, [sp, #124] ; 0x7c <== NOT EXECUTED /* set up last write date and time */ time_ret = time(NULL); 30f90: eb005f4c bl 48cc8