00007868 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 7868: e5903000 ldr r3, [r0] 786c: 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; 7870: e5903010 ldr r3, [r0, #16] switch( node->type ) { 7874: 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; 7878: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 787c: e3520006 cmp r2, #6 7880: 979ff102 ldrls pc, [pc, r2, lsl #2] 7884: ea000010 b 78cc <== NOT EXECUTED 7888: 000078a4 .word 0x000078a4 <== NOT EXECUTED 788c: 000078ac .word 0x000078ac <== NOT EXECUTED 7890: 000078b4 .word 0x000078b4 <== NOT EXECUTED 7894: 000078b4 .word 0x000078b4 <== NOT EXECUTED 7898: 000078bc .word 0x000078bc <== NOT EXECUTED 789c: 000078bc .word 0x000078bc <== NOT EXECUTED 78a0: 000078c4 .word 0x000078c4 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 78a4: e5933008 ldr r3, [r3, #8] 78a8: ea000006 b 78c8 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 78ac: e59f3020 ldr r3, [pc, #32] ; 78d4 78b0: ea000004 b 78c8 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 78b4: e59f301c ldr r3, [pc, #28] ; 78d8 78b8: ea000002 b 78c8 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 78bc: e5933004 ldr r3, [r3, #4] 78c0: ea000000 b 78c8 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 78c4: e59f3010 ldr r3, [pc, #16] ; 78dc 78c8: e5803008 str r3, [r0, #8] break; } return 0; } 78cc: e3a00000 mov r0, #0 78d0: e12fff1e bx lr 78d4: 00018d34 .word 0x00018d34 78d8: 00018d6c .word 0x00018d6c 78dc: 00018cdc .word 0x00018cdc 0000c390 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { c390: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} c394: e1a02802 lsl r2, r2, #16 c398: e1a01801 lsl r1, r1, #16 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; c39c: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { c3a0: e1a07821 lsr r7, r1, #16 c3a4: e1a06822 lsr r6, r2, #16 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); c3a8: eb000441 bl d4b4 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) c3ac: e1d453bc ldrh r5, [r4, #60] ; 0x3c c3b0: e3500000 cmp r0, #0 c3b4: 11550000 cmpne r5, r0 c3b8: 03a05000 moveq r5, #0 c3bc: 13a05001 movne r5, #1 c3c0: 0a000004 beq c3d8 rtems_set_errno_and_return_minus_one( EPERM ); c3c4: eb001532 bl 11894 <__errno> <== NOT EXECUTED c3c8: e3a03001 mov r3, #1 <== NOT EXECUTED c3cc: e5803000 str r3, [r0] <== NOT EXECUTED c3d0: e3e00000 mvn r0, #0 <== NOT EXECUTED c3d4: ea000007 b c3f8 <== NOT EXECUTED #endif jnode->st_uid = owner; c3d8: e1c473bc strh r7, [r4, #60] ; 0x3c jnode->st_gid = group; c3dc: e1c463be strh r6, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); c3e0: e1a0000d mov r0, sp c3e4: e1a01005 mov r1, r5 c3e8: ebffd8cc bl 2720 c3ec: e59d3000 ldr r3, [sp] c3f0: e5843048 str r3, [r4, #72] ; 0x48 c3f4: e1a00005 mov r0, r5 return 0; } c3f8: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} 0000b1b0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b1b0: 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 ) b1b4: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b1b8: e1a05001 mov r5, r1 b1bc: e59d6014 ldr r6, [sp, #20] b1c0: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) b1c4: 01a07004 moveq r7, r4 b1c8: 0a000041 beq b2d4 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); b1cc: e59f2108 ldr r2, [pc, #264] ; b2dc b1d0: e5922000 ldr r2, [r2] b1d4: e592202c ldr r2, [r2, #44] ; 0x2c b1d8: e1a00005 mov r0, r5 b1dc: e1c32002 bic r2, r3, r2 b1e0: ebffffc4 bl b0f8 if ( !node ) b1e4: e2507000 subs r7, r0, #0 b1e8: 0a000039 beq b2d4 return NULL; /* * Set the type specific information */ switch (type) { b1ec: e2455001 sub r5, r5, #1 b1f0: e3550006 cmp r5, #6 b1f4: 979ff105 ldrls pc, [pc, r5, lsl #2] b1f8: ea000025 b b294 <== NOT EXECUTED b1fc: 0000b218 .word 0x0000b218 <== NOT EXECUTED b200: 0000b23c .word 0x0000b23c <== NOT EXECUTED b204: 0000b234 .word 0x0000b234 <== NOT EXECUTED b208: 0000b234 .word 0x0000b234 <== NOT EXECUTED b20c: 0000b264 .word 0x0000b264 <== NOT EXECUTED b210: 0000b24c .word 0x0000b24c <== NOT EXECUTED b214: 0000b288 .word 0x0000b288 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b218: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); b21c: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b220: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; b224: e3a02000 mov r2, #0 b228: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); b22c: e5873058 str r3, [r7, #88] ; 0x58 b230: ea00001c b b2a8 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; b234: e5963000 ldr r3, [r6] b238: ea000013 b b28c break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; b23c: 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; b240: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; b244: e5872054 str r2, [r7, #84] ; 0x54 b248: ea00000f b b28c break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; b24c: e3a03000 mov r3, #0 <== NOT EXECUTED b250: e3a02000 mov r2, #0 <== NOT EXECUTED b254: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED b258: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; b25c: e3a03000 mov r3, #0 <== NOT EXECUTED b260: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; b264: 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; b268: e3a01000 mov r1, #0 b26c: e3a02000 mov r2, #0 b270: e5871050 str r1, [r7, #80] ; 0x50 b274: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; b278: 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; b27c: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; b280: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; b284: ea000007 b b2a8 case IMFS_FIFO: node->info.fifo.pipe = NULL; b288: e3a03000 mov r3, #0 b28c: e5873050 str r3, [r7, #80] ; 0x50 break; b290: ea000004 b b2a8 default: assert(0); b294: e59f0044 ldr r0, [pc, #68] ; b2e0 <== NOT EXECUTED b298: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED b29c: e59f2040 ldr r2, [pc, #64] ; b2e4 <== NOT EXECUTED b2a0: e59f3040 ldr r3, [pc, #64] ; b2e8 <== NOT EXECUTED b2a4: ebfff4de bl 8624 <__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; b2a8: e5943010 ldr r3, [r4, #16] b2ac: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; b2b0: e5923000 ldr r3, [r2] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; b2b4: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; b2b8: e2833001 add r3, r3, #1 b2bc: e5823000 str r3, [r2] * 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; b2c0: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; b2c4: e5873038 str r3, [r7, #56] ; 0x38 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); b2c8: e2800050 add r0, r0, #80 ; 0x50 b2cc: e1a01007 mov r1, r7 b2d0: ebffe62e bl 4b90 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } b2d4: e1a00007 mov r0, r7 b2d8: e8bd80f0 pop {r4, r5, r6, r7, pc} b2dc: 00018538 .word 0x00018538 b2e0: 00019701 .word 0x00019701 b2e4: 00019038 .word 0x00019038 b2e8: 000194d1 .word 0x000194d1 00002d0c : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d0c: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2d10: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2d14: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d18: 059f00a4 ldreq r0, [pc, #164] ; 2dc4 2d1c: 03a01084 moveq r1, #132 ; 0x84 2d20: 059f20a0 ldreq r2, [pc, #160] ; 2dc8 2d24: 059f30a0 ldreq r3, [pc, #160] ; 2dcc 2d28: 0a000005 beq 2d44 assert( level >= 0 ); 2d2c: e3510000 cmp r1, #0 2d30: aa000004 bge 2d48 2d34: e59f0088 ldr r0, [pc, #136] ; 2dc4 <== NOT EXECUTED 2d38: e59f2088 ldr r2, [pc, #136] ; 2dc8 <== NOT EXECUTED 2d3c: e59f308c ldr r3, [pc, #140] ; 2dd0 <== NOT EXECUTED 2d40: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 2d44: eb0001d7 bl 34a8 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 2d48: e590304c ldr r3, [r0, #76] ; 0x4c 2d4c: e3530001 cmp r3, #1 2d50: 159f006c ldrne r0, [pc, #108] ; 2dc4 2d54: 13a01088 movne r1, #136 ; 0x88 2d58: 159f2068 ldrne r2, [pc, #104] ; 2dc8 2d5c: 159f3070 ldrne r3, [pc, #112] ; 2dd4 2d60: 1afffff7 bne 2d44 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2d64: e280a054 add sl, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d68: 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, "...." ); 2d6c: e59f8064 ldr r8, [pc, #100] ; 2dd8 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2d70: e2817001 add r7, r1, #1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d74: ea00000f b 2db8 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 2d78: e3a06000 mov r6, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2d7c: 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++ ) 2d80: e2866001 add r6, r6, #1 fprintf(stdout, "...." ); 2d84: e5931008 ldr r1, [r3, #8] 2d88: e59f004c ldr r0, [pc, #76] ; 2ddc 2d8c: eb003998 bl 113f4 !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++ ) 2d90: e1560005 cmp r6, r5 2d94: dafffff8 ble 2d7c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2d98: e1a00004 mov r0, r4 2d9c: ebffff7e bl 2b9c if ( the_jnode->type == IMFS_DIRECTORY ) 2da0: e594304c ldr r3, [r4, #76] ; 0x4c 2da4: e3530001 cmp r3, #1 IMFS_dump_directory( the_jnode, level + 1 ); 2da8: 01a00004 moveq r0, r4 2dac: 01a01007 moveq r1, r7 2db0: 0bffffd5 bleq 2d0c 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 ) { 2db4: e5944000 ldr r4, [r4] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2db8: e154000a cmp r4, sl 2dbc: 1affffed bne 2d78 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 2dc0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2dc4: 000228f6 .word 0x000228f6 2dc8: 000214d0 .word 0x000214d0 2dcc: 000229ac .word 0x000229ac 2dd0: 000229ba .word 0x000229ba 2dd4: 000229c5 .word 0x000229c5 2dd8: 00020f64 .word 0x00020f64 2ddc: 000229eb .word 0x000229eb 00007a70 : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 7a70: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7a74: e24dd040 sub sp, sp, #64 ; 0x40 7a78: e1a04003 mov r4, r3 7a7c: e1a0a000 mov sl, r0 7a80: e1a06001 mov r6, r1 7a84: e58d2000 str r2, [sp] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7a88: e5935000 ldr r5, [r3] 7a8c: e3a09001 mov r9, #1 7a90: e3a07000 mov r7, #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 ); 7a94: e28d8004 add r8, sp, #4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 7a98: ea000054 b 7bf0 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 7a9c: e28d303c add r3, sp, #60 ; 0x3c 7aa0: e08a0007 add r0, sl, r7 7aa4: e1a01006 mov r1, r6 7aa8: e1a02008 mov r2, r8 7aac: eb0001e7 bl 8250 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 7ab0: e5943000 ldr r3, [r4] 7ab4: 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 ); 7ab8: e1a09000 mov r9, r0 pathnamelen -= len; 7abc: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 7ac0: 0a000042 beq 7bd0 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7ac4: e3500000 cmp r0, #0 7ac8: 0a000006 beq 7ae8 if ( node->type == IMFS_DIRECTORY ) 7acc: e595104c ldr r1, [r5, #76] ; 0x4c 7ad0: e3510001 cmp r1, #1 7ad4: 1a000003 bne 7ae8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 7ad8: e1a00004 mov r0, r4 7adc: ebffff7f bl 78e0 7ae0: e3500000 cmp r0, #0 7ae4: 0a000068 beq 7c8c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 7ae8: 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; 7aec: 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; 7af0: 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; 7af4: e5945000 ldr r5, [r4] switch( type ) { 7af8: 0a000013 beq 7b4c 7afc: e3590004 cmp r9, #4 7b00: 0a000037 beq 7be4 7b04: e3590002 cmp r9, #2 7b08: 1a000038 bne 7bf0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7b0c: e59f2194 ldr r2, [pc, #404] ; 7ca8 7b10: e5923000 ldr r3, [r2] 7b14: e5933018 ldr r3, [r3, #24] 7b18: e1550003 cmp r5, r3 7b1c: 0a000033 beq 7bf0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 7b20: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 7b24: e59e301c ldr r3, [lr, #28] 7b28: e1550003 cmp r5, r3 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 7b2c: 028ee008 addeq lr, lr, #8 7b30: 0a000038 beq 7c18 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 7b34: e5955008 ldr r5, [r5, #8] 7b38: e3550000 cmp r5, #0 7b3c: 1a000026 bne 7bdc rtems_set_errno_and_return_minus_one( ENOENT ); 7b40: eb001384 bl c958 <__errno> 7b44: e5809000 str r9, [r0] 7b48: ea000052 b 7c98 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 7b4c: e595304c ldr r3, [r5, #76] ; 0x4c 7b50: e3530003 cmp r3, #3 7b54: 1a000006 bne 7b74 IMFS_evaluate_hard_link( pathloc, 0 ); 7b58: e1a00004 mov r0, r4 7b5c: e3a01000 mov r1, #0 7b60: ebffff71 bl 792c node = pathloc->node_access; 7b64: e5945000 ldr r5, [r4] if ( !node ) 7b68: e3550000 cmp r5, #0 7b6c: 1a000009 bne 7b98 7b70: ea00000b b 7ba4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 7b74: e3530004 cmp r3, #4 7b78: 1a000006 bne 7b98 result = IMFS_evaluate_sym_link( pathloc, 0 ); 7b7c: e1a00004 mov r0, r4 7b80: e3a01000 mov r1, #0 7b84: ebffff7f bl 7988 node = pathloc->node_access; if ( result == -1 ) 7b88: 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 ); 7b8c: e1a0b000 mov fp, r0 node = pathloc->node_access; 7b90: e5945000 ldr r5, [r4] if ( result == -1 ) 7b94: 0a000040 beq 7c9c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7b98: e595304c ldr r3, [r5, #76] ; 0x4c 7b9c: e3530001 cmp r3, #1 7ba0: 0a000002 beq 7bb0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 7ba4: eb00136b bl c958 <__errno> 7ba8: e3a03014 mov r3, #20 7bac: ea000038 b 7c94 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 7bb0: e595e05c ldr lr, [r5, #92] ; 0x5c 7bb4: e35e0000 cmp lr, #0 7bb8: 1a000015 bne 7c14 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7bbc: e1a00005 mov r0, r5 7bc0: e1a01008 mov r1, r8 7bc4: eb000179 bl 81b0 if ( !node ) 7bc8: e2505000 subs r5, r0, #0 7bcc: 1a000002 bne 7bdc rtems_set_errno_and_return_minus_one( ENOENT ); 7bd0: eb001360 bl c958 <__errno> 7bd4: e3a03002 mov r3, #2 7bd8: ea00002d b 7c94 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 7bdc: e5845000 str r5, [r4] 7be0: ea000002 b 7bf0 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7be4: eb00135b bl c958 <__errno> 7be8: e3a0305b mov r3, #91 ; 0x5b 7bec: ea000028 b 7c94 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 7bf0: e3590004 cmp r9, #4 7bf4: 13590000 cmpne r9, #0 7bf8: 1affffa7 bne 7a9c * 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 ) { 7bfc: e595304c ldr r3, [r5, #76] ; 0x4c 7c00: e3530001 cmp r3, #1 7c04: 1a000018 bne 7c6c if ( node->info.directory.mt_fs != NULL ) { 7c08: e595e05c ldr lr, [r5, #92] ; 0x5c 7c0c: e35e0000 cmp lr, #0 7c10: 0a000015 beq 7c6c newloc = node->info.directory.mt_fs->mt_fs_root; 7c14: e28ee01c add lr, lr, #28 7c18: e8be000f ldm lr!, {r0, r1, r2, r3} 7c1c: e28dc028 add ip, sp, #40 ; 0x28 7c20: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7c24: e28d5028 add r5, sp, #40 ; 0x28 7c28: e8b5000f ldm r5!, {r0, r1, r2, r3} 7c2c: e1a05004 mov r5, r4 * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 7c30: e59ee000 ldr lr, [lr] *pathloc = newloc; 7c34: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7c38: e59d103c ldr r1, [sp, #60] ; 0x3c */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 7c3c: e585e000 str lr, [r5] * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 7c40: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7c44: e0610007 rsb r0, r1, r7 7c48: e08a0000 add r0, sl, r0 7c4c: e0861001 add r1, r6, r1 7c50: e59d2000 ldr r2, [sp] 7c54: e1a03004 mov r3, r4 7c58: e594c00c ldr ip, [r4, #12] 7c5c: e1a0e00f mov lr, pc 7c60: e59cf000 ldr pc, [ip] 7c64: e1a0b000 mov fp, r0 7c68: ea00000b b 7c9c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7c6c: e1a00004 mov r0, r4 7c70: ebfffefc bl 7868 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 7c74: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7c78: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 7c7c: e1a00004 mov r0, r4 7c80: ebffff16 bl 78e0 7c84: e3500000 cmp r0, #0 7c88: 1a000003 bne 7c9c rtems_set_errno_and_return_minus_one( EACCES ); 7c8c: eb001331 bl c958 <__errno> 7c90: e3a0300d mov r3, #13 7c94: e5803000 str r3, [r0] 7c98: e3e0b000 mvn fp, #0 return result; } 7c9c: e1a0000b mov r0, fp 7ca0: e28dd040 add sp, sp, #64 ; 0x40 7ca4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 7ca8: 00018538 .word 0x00018538 00007d60 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 7d60: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7d64: e24dd040 sub sp, sp, #64 ; 0x40 7d68: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7d6c: 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 */ ) { 7d70: e58d2000 str r2, [sp] 7d74: e1a07000 mov r7, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7d78: eb0016e7 bl d91c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7d7c: e59fa224 ldr sl, [pc, #548] ; 7fa8 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7d80: e3a05000 mov r5, #0 7d84: e1a08000 mov r8, r0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 7d88: e1a01008 mov r1, r8 7d8c: e28d303c add r3, sp, #60 ; 0x3c 7d90: e0870005 add r0, r7, r5 7d94: e28d2004 add r2, sp, #4 7d98: eb00012c bl 8250 pathlen -= len; i += len; if ( !pathloc->node_access ) 7d9c: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 7da0: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 7da4: 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 ); 7da8: e1a09000 mov r9, r0 pathlen -= len; 7dac: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 7db0: 0a000060 beq 7f38 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7db4: e3500000 cmp r0, #0 7db8: 0a000006 beq 7dd8 if ( node->type == IMFS_DIRECTORY ) 7dbc: e596104c ldr r1, [r6, #76] ; 0x4c 7dc0: e3510001 cmp r1, #1 7dc4: 1a000003 bne 7dd8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 7dc8: e1a00004 mov r0, r4 7dcc: ebfffec3 bl 78e0 7dd0: e3500000 cmp r0, #0 7dd4: 0a00006c beq 7f8c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 7dd8: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 7ddc: e085500b add r5, r5, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 7de0: e1a06003 mov r6, r3 switch( type ) { 7de4: e3590004 cmp r9, #4 7de8: 979ff109 ldrls pc, [pc, r9, lsl #2] 7dec: eaffffe5 b 7d88 <== NOT EXECUTED 7df0: 00007ef4 .word 0x00007ef4 <== NOT EXECUTED 7df4: 00007d88 .word 0x00007d88 <== NOT EXECUTED 7df8: 00007e04 .word 0x00007e04 <== NOT EXECUTED 7dfc: 00007e38 .word 0x00007e38 <== NOT EXECUTED 7e00: 00007f00 .word 0x00007f00 <== 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 ) 7e04: e59a2000 ldr r2, [sl] 7e08: e5922018 ldr r2, [r2, #24] 7e0c: e1530002 cmp r3, r2 7e10: 0affffdc beq 7d88 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 7e14: e594e010 ldr lr, [r4, #16] 7e18: e59e201c ldr r2, [lr, #28] 7e1c: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 7e20: 028ee008 addeq lr, lr, #8 7e24: 0a000018 beq 7e8c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 7e28: e5936008 ldr r6, [r3, #8] 7e2c: e3560000 cmp r6, #0 7e30: 1a00002d bne 7eec 7e34: ea00003f b 7f38 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 7e38: e593304c ldr r3, [r3, #76] ; 0x4c 7e3c: e3530003 cmp r3, #3 7e40: 0a000001 beq 7e4c result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 7e44: e3530004 cmp r3, #4 7e48: 1a000005 bne 7e64 result = IMFS_evaluate_link( pathloc, 0 ); 7e4c: e1a00004 mov r0, r4 7e50: e3a01000 mov r1, #0 7e54: ebffff94 bl 7cac if ( result == -1 ) 7e58: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 7e5c: e1a06000 mov r6, r0 if ( result == -1 ) 7e60: 0a00004d beq 7f9c return -1; } node = pathloc->node_access; 7e64: e5940000 ldr r0, [r4] if ( !node ) 7e68: e3500000 cmp r0, #0 7e6c: 0a00003e beq 7f6c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7e70: e590304c ldr r3, [r0, #76] ; 0x4c 7e74: e3530001 cmp r3, #1 7e78: 1a00003b bne 7f6c /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { 7e7c: e590e05c ldr lr, [r0, #92] ; 0x5c 7e80: e35e0000 cmp lr, #0 7e84: 0a000014 beq 7edc newloc = node->info.directory.mt_fs->mt_fs_root; 7e88: e28ee01c add lr, lr, #28 7e8c: e8be000f ldm lr!, {r0, r1, r2, r3} 7e90: e28dc028 add ip, sp, #40 ; 0x28 7e94: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7e98: e28d6028 add r6, sp, #40 ; 0x28 7e9c: e8b6000f ldm r6!, {r0, r1, r2, r3} 7ea0: e1a06004 mov r6, r4 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 7ea4: e59ee000 ldr lr, [lr] *pathloc = newloc; 7ea8: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7eac: e59d303c ldr r3, [sp, #60] ; 0x3c * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 7eb0: e586e000 str lr, [r6] * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 7eb4: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7eb8: e0635005 rsb r5, r3, r5 7ebc: e0870005 add r0, r7, r5 7ec0: e1a01004 mov r1, r4 7ec4: e59d2000 ldr r2, [sp] 7ec8: e594300c ldr r3, [r4, #12] 7ecc: e1a0e00f mov lr, pc 7ed0: e593f004 ldr pc, [r3, #4] 7ed4: e1a06000 mov r6, r0 7ed8: ea00002f b 7f9c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7edc: e28d1004 add r1, sp, #4 7ee0: eb0000b2 bl 81b0 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 7ee4: e2506000 subs r6, r0, #0 7ee8: 0a000007 beq 7f0c done = true; else pathloc->node_access = node; 7eec: e5846000 str r6, [r4] 7ef0: eaffffa4 b 7d88 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 7ef4: eb001297 bl c958 <__errno> 7ef8: e3a03011 mov r3, #17 7efc: ea000024 b 7f94 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7f00: eb001294 bl c958 <__errno> 7f04: e3a0305b mov r3, #91 ; 0x5b 7f08: ea000021 b 7f94 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 7f0c: e59d303c ldr r3, [sp, #60] ; 0x3c 7f10: e59d2000 ldr r2, [sp] 7f14: e0633005 rsb r3, r3, r5 7f18: e0873003 add r3, r7, r3 7f1c: e5823000 str r3, [r2] 7f20: e0875005 add r5, r7, r5 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 7f24: ea000006 b 7f44 if ( !IMFS_is_separator( path[ i ] ) ) 7f28: e353005c cmp r3, #92 ; 0x5c 7f2c: 1353002f cmpne r3, #47 ; 0x2f /* * 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++) { 7f30: e2855001 add r5, r5, #1 if ( !IMFS_is_separator( path[ i ] ) ) 7f34: 0a000002 beq 7f44 rtems_set_errno_and_return_minus_one( ENOENT ); 7f38: eb001286 bl c958 <__errno> 7f3c: e3a03002 mov r3, #2 7f40: ea000013 b 7f94 /* * 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++) { 7f44: e5d53000 ldrb r3, [r5] 7f48: e3530000 cmp r3, #0 7f4c: 1afffff5 bne 7f28 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7f50: e1a00004 mov r0, r4 7f54: ebfffe43 bl 7868 /* * The returned node must be a directory */ node = pathloc->node_access; 7f58: e5943000 ldr r3, [r4] 7f5c: e593304c ldr r3, [r3, #76] ; 0x4c 7f60: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7f64: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; 7f68: 0a000002 beq 7f78 if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 7f6c: eb001279 bl c958 <__errno> 7f70: e3a03014 mov r3, #20 7f74: ea000006 b 7f94 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 7f78: e1a00004 mov r0, r4 7f7c: e3a01003 mov r1, #3 7f80: ebfffe56 bl 78e0 7f84: e3500000 cmp r0, #0 7f88: 1a000003 bne 7f9c rtems_set_errno_and_return_minus_one( EACCES ); 7f8c: eb001271 bl c958 <__errno> 7f90: e3a0300d mov r3, #13 7f94: e5803000 str r3, [r0] 7f98: e3e06000 mvn r6, #0 return result; } 7f9c: e1a00006 mov r0, r6 7fa0: e28dd040 add sp, sp, #64 ; 0x40 7fa4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 7fa8: 00018538 .word 0x00018538 0000792c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 792c: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 7930: e593204c ldr r2, [r3, #76] ; 0x4c 7934: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7938: e92d4030 push {r4, r5, lr} 793c: e1a04000 mov r4, r0 7940: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 7944: 159f0038 ldrne r0, [pc, #56] ; 7984 7948: 1bfff3d6 blne 48a8 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 794c: e5933050 ldr r3, [r3, #80] ; 0x50 7950: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 7954: ebffffc3 bl 7868 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 7958: e1a00004 mov r0, r4 795c: e1a01005 mov r1, r5 7960: ebffffde bl 78e0 7964: e3500000 cmp r0, #0 7968: 13a00000 movne r0, #0 796c: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 7970: eb0013f8 bl c958 <__errno> <== NOT EXECUTED 7974: e3a0300d mov r3, #13 <== NOT EXECUTED 7978: e5803000 str r3, [r0] <== NOT EXECUTED 797c: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 7980: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 7984: abcd0000 .word 0xabcd0000 00007988 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7988: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 798c: e590e000 ldr lr, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 7990: e59e304c ldr r3, [lr, #76] ; 0x4c 7994: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7998: e1a04000 mov r4, r0 799c: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 79a0: 159f00bc ldrne r0, [pc, #188] ; 7a64 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 79a4: 1a000003 bne 79b8 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 79a8: e59e3008 ldr r3, [lr, #8] 79ac: e3530000 cmp r3, #0 79b0: 1a000001 bne 79bc rtems_fatal_error_occurred( 0xBAD00000 ); 79b4: e59f00ac ldr r0, [pc, #172] ; 7a68 <== NOT EXECUTED 79b8: ebfff3ba bl 48a8 <== 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; 79bc: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 79c0: e59e3050 ldr r3, [lr, #80] ; 0x50 79c4: e5d33000 ldrb r3, [r3] 79c8: e353002f cmp r3, #47 ; 0x2f 79cc: 1353005c cmpne r3, #92 ; 0x5c 79d0: 13a06000 movne r6, #0 79d4: 03a06001 moveq r6, #1 79d8: 0a000001 beq 79e4 79dc: e3530000 cmp r3, #0 79e0: 1a000008 bne 7a08 79e4: e59f3080 ldr r3, [pc, #128] ; 7a6c 79e8: e593c000 ldr ip, [r3] 79ec: e28cc018 add ip, ip, #24 79f0: e8bc000f ldm ip!, {r0, r1, r2, r3} 79f4: e1a06004 mov r6, r4 79f8: e8a6000f stmia r6!, {r0, r1, r2, r3} 79fc: e59c2000 ldr r2, [ip] 7a00: e5862000 str r2, [r6] 7a04: e3a06001 mov r6, #1 * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 7a08: e59e3050 ldr r3, [lr, #80] ; 0x50 7a0c: e0836006 add r6, r3, r6 7a10: e1a00006 mov r0, r6 7a14: eb0017c0 bl d91c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7a18: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 7a1c: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7a20: e1a03004 mov r3, r4 7a24: e1a00006 mov r0, r6 7a28: eb000010 bl 7a70 7a2c: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 7a30: e1a00004 mov r0, r4 7a34: ebffff8b bl 7868 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 7a38: e1a00004 mov r0, r4 7a3c: e1a01005 mov r1, r5 7a40: ebffffa6 bl 78e0 7a44: e3500000 cmp r0, #0 7a48: 1a000003 bne 7a5c rtems_set_errno_and_return_minus_one( EACCES ); 7a4c: eb0013c1 bl c958 <__errno> <== NOT EXECUTED 7a50: e3a0300d mov r3, #13 <== NOT EXECUTED 7a54: e5803000 str r3, [r0] <== NOT EXECUTED 7a58: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 7a5c: e1a00006 mov r0, r6 7a60: e8bd8070 pop {r4, r5, r6, pc} 7a64: abcd0000 .word 0xabcd0000 7a68: bad00000 .word 0xbad00000 7a6c: 00018538 .word 0x00018538 0000b2ec : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { b2ec: e92d4073 push {r0, r1, r4, r5, r6, lr} IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; b2f0: e5904000 ldr r4, [r0] int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { b2f4: e1a06001 mov r6, r1 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); b2f8: ebfff57e bl 88f8 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) b2fc: e1d453bc ldrh r5, [r4, #60] ; 0x3c b300: e3500000 cmp r0, #0 b304: 11550000 cmpne r5, r0 b308: 03a05000 moveq r5, #0 b30c: 13a05001 movne r5, #1 b310: 0a000004 beq b328 rtems_set_errno_and_return_minus_one( EPERM ); b314: eb00058f bl c958 <__errno> <== NOT EXECUTED b318: e3a03001 mov r3, #1 <== NOT EXECUTED b31c: e5803000 str r3, [r0] <== NOT EXECUTED b320: e3e00000 mvn r0, #0 <== NOT EXECUTED b324: ea00000c b b35c <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); b328: e5943030 ldr r3, [r4, #48] ; 0x30 b32c: e1a06a06 lsl r6, r6, #20 b330: e3c33eff bic r3, r3, #4080 ; 0xff0 b334: e3c3300f bic r3, r3, #15 b338: e1a06a26 lsr r6, r6, #20 b33c: e1866003 orr r6, r6, r3 b340: e5846030 str r6, [r4, #48] ; 0x30 IMFS_update_ctime( jnode ); b344: e1a0000d mov r0, sp b348: e1a01005 mov r1, r5 b34c: ebfff56e bl 890c b350: e59d3000 ldr r3, [sp] b354: e5843048 str r3, [r4, #72] ; 0x48 b358: e1a00005 mov r0, r5 return 0; } b35c: e8bd807c pop {r2, r3, r4, r5, r6, pc} 0000810c : } int IMFS_fifo_close( rtems_libio_t *iop ) { 810c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8110: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 8114: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 8118: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 811c: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 8120: eb000ad3 bl ac74 <== NOT EXECUTED if (! err) { 8124: e2506000 subs r6, r0, #0 <== NOT EXECUTED 8128: 1a00000c bne 8160 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 812c: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8130: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 8134: 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) 8138: e1a00004 mov r0, r4 <== NOT EXECUTED 813c: eb00021c bl 89b4 <== NOT EXECUTED 8140: e3500000 cmp r0, #0 <== NOT EXECUTED 8144: 1a00000a bne 8174 <== NOT EXECUTED 8148: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 814c: e3530000 cmp r3, #0 <== NOT EXECUTED 8150: 1a000007 bne 8174 <== NOT EXECUTED free(jnode); 8154: e1a00004 mov r0, r4 <== NOT EXECUTED 8158: eb00017e bl 8758 <== NOT EXECUTED 815c: ea000004 b 8174 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 8160: aa000003 bge 8174 <== NOT EXECUTED 8164: eb0011fb bl c958 <__errno> <== NOT EXECUTED 8168: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 816c: e5806000 str r6, [r0] <== NOT EXECUTED 8170: e3e06000 mvn r6, #0 <== NOT EXECUTED } 8174: e1a00006 mov r0, r6 <== NOT EXECUTED 8178: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00007ff4 : void *buffer ) { int err; if (command == FIONBIO) { 7ff4: e59f3068 ldr r3, [pc, #104] ; 8064 <== NOT EXECUTED 7ff8: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 7ffc: e92d4010 push {r4, lr} <== NOT EXECUTED 8000: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 8004: 1a00000b bne 8038 <== NOT EXECUTED if (buffer == NULL) 8008: e3520000 cmp r2, #0 <== NOT EXECUTED 800c: 03e0400d mvneq r4, #13 <== NOT EXECUTED 8010: 0a00000d beq 804c <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 8014: e5924000 ldr r4, [r2] <== NOT EXECUTED 8018: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 801c: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 8020: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8024: 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; 8028: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 802c: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8030: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 8034: ea000008 b 805c <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8038: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 803c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 8040: eb000a21 bl a8cc <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8044: e2504000 subs r4, r0, #0 <== NOT EXECUTED 8048: aa000003 bge 805c <== NOT EXECUTED 804c: eb001241 bl c958 <__errno> <== NOT EXECUTED 8050: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 8054: e5804000 str r4, [r0] <== NOT EXECUTED 8058: e3e04000 mvn r4, #0 <== NOT EXECUTED } 805c: e1a00004 mov r0, r4 <== NOT EXECUTED 8060: e8bd8010 pop {r4, pc} <== NOT EXECUTED 8064: 8004667e .word 0x8004667e 00007fac : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 7fac: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 7fb0: e58d0000 str r0, [sp] <== NOT EXECUTED 7fb4: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 7fb8: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 7fbc: eb000a28 bl a864 <== NOT EXECUTED 7fc0: e1a03000 mov r3, r0 <== NOT EXECUTED 7fc4: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7fc8: 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); 7fcc: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7fd0: aa000004 bge 7fe8 <== NOT EXECUTED 7fd4: eb00125f bl c958 <__errno> <== NOT EXECUTED 7fd8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 7fdc: e5805000 str r5, [r0] <== NOT EXECUTED 7fe0: e3e03000 mvn r3, #0 <== NOT EXECUTED 7fe4: e3e04000 mvn r4, #0 <== NOT EXECUTED } 7fe8: e1a01004 mov r1, r4 <== NOT EXECUTED 7fec: e1a00003 mov r0, r3 <== NOT EXECUTED 7ff0: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED 000080bc : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 80bc: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 80c0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 80c4: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 80c8: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 80cc: eb000a16 bl a92c <== NOT EXECUTED if (err > 0) 80d0: e2505000 subs r5, r0, #0 <== NOT EXECUTED 80d4: da000005 ble 80f0 <== NOT EXECUTED IMFS_update_atime(jnode); 80d8: e1a0000d mov r0, sp <== NOT EXECUTED 80dc: e3a01000 mov r1, #0 <== NOT EXECUTED 80e0: eb000209 bl 890c <== NOT EXECUTED 80e4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 80e8: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 80ec: ea000004 b 8104 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 80f0: 0a000003 beq 8104 <== NOT EXECUTED 80f4: eb001217 bl c958 <__errno> <== NOT EXECUTED 80f8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 80fc: e5805000 str r5, [r0] <== NOT EXECUTED 8100: e3e05000 mvn r5, #0 <== NOT EXECUTED } 8104: e1a00005 mov r0, r5 <== NOT EXECUTED 8108: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00008068 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8068: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 806c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8070: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 8074: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 8078: eb000a87 bl aa9c <== NOT EXECUTED if (err > 0) { 807c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8080: da000006 ble 80a0 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 8084: e1a0000d mov r0, sp <== NOT EXECUTED 8088: e3a01000 mov r1, #0 <== NOT EXECUTED 808c: eb00021e bl 890c <== NOT EXECUTED 8090: e59d3000 ldr r3, [sp] <== NOT EXECUTED 8094: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 8098: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 809c: ea000004 b 80b4 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 80a0: 0a000003 beq 80b4 <== NOT EXECUTED 80a4: eb00122b bl c958 <__errno> <== NOT EXECUTED 80a8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 80ac: e5805000 str r5, [r0] <== NOT EXECUTED 80b0: e3e05000 mvn r5, #0 <== NOT EXECUTED } 80b4: e1a00005 mov r0, r5 <== NOT EXECUTED 80b8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 0000cf40 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { cf40: 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; cf44: e1a0c000 mov ip, r0 cf48: 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 ) { cf4c: e1a05000 mov r5, r0 cf50: 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; cf54: e8bc000f ldm ip!, {r0, r1, r2, r3} cf58: e1a0e00d mov lr, sp cf5c: e8ae000f stmia lr!, {r0, r1, r2, r3} cf60: e59c3000 ldr r3, [ip] cf64: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; cf68: e3a03000 mov r3, #0 cf6c: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); cf70: e1a0500d mov r5, sp cf74: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; cf78: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; cf7c: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); cf80: ebfffd9a bl c5f0 if ( jnode->type != IMFS_DIRECTORY ) { cf84: e594204c ldr r2, [r4, #76] ; 0x4c cf88: e3520001 cmp r2, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; cf8c: e2843054 add r3, r4, #84 ; 0x54 cf90: 1a000002 bne cfa0 cf94: e5942050 ldr r2, [r4, #80] ; 0x50 cf98: e1520003 cmp r2, r3 cf9c: 1a000005 bne cfb8 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); cfa0: e3a00000 mov r0, #0 cfa4: e1a0100d mov r1, sp cfa8: ebffd430 bl 2070 if (result != 0) cfac: e3500000 cmp r0, #0 cfb0: 1a00000c bne cfe8 cfb4: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { cfb8: e3540000 cmp r4, #0 cfbc: 0a00000b beq cff0 if ( jnode->type == IMFS_DIRECTORY ) { cfc0: e594304c ldr r3, [r4, #76] ; 0x4c cfc4: e3530001 cmp r3, #1 cfc8: 1affffe9 bne cf74 cfcc: e5943050 ldr r3, [r4, #80] ; 0x50 cfd0: e2842054 add r2, r4, #84 ; 0x54 cfd4: e1530002 cmp r3, r2 cfd8: 0affffe5 beq cf74 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); cfdc: e2534000 subs r4, r3, #0 cfe0: 1affffe3 bne cf74 cfe4: ea000001 b cff0 <== NOT EXECUTED cfe8: e3e00000 mvn r0, #0 <== NOT EXECUTED cfec: ea000000 b cff4 <== NOT EXECUTED cff0: e3a00000 mov r0, #0 return 0; } cff4: e28dd014 add sp, sp, #20 cff8: e8bd8070 pop {r4, r5, r6, pc} 00008318 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8318: e59fc0c8 ldr ip, [pc, #200] ; 83e8 831c: 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 ) { 8320: e92d40f0 push {r4, r5, r6, r7, lr} 8324: e1a06002 mov r6, r2 8328: e1a05003 mov r5, r3 832c: e1a04000 mov r4, r0 8330: 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, 8334: e3a02000 mov r2, #0 8338: 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) { 833c: e153000c cmp r3, ip 8340: e2822001 add r2, r2, #1 8344: 0a000003 beq 8358 8348: e3520006 cmp r2, #6 834c: e1a03083 lsl r3, r3, #1 8350: 1afffff9 bne 833c 8354: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8358: e59f208c ldr r2, [pc, #140] ; 83ec 835c: e5823000 str r3, [r2] /* * 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(); 8360: eb000b82 bl b170 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; 8364: e59fe084 ldr lr, [pc, #132] ; 83f0 /* * 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(); 8368: 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; 836c: e8be000f ldm lr!, {r0, r1, r2, r3} 8370: e284c038 add ip, r4, #56 ; 0x38 8374: e8ac000f stmia ip!, {r0, r1, r2, r3} 8378: e8be000f ldm lr!, {r0, r1, r2, r3} 837c: e8ac000f stmia ip!, {r0, r1, r2, r3} 8380: 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; 8384: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8388: 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; 838c: e5845024 str r5, [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 ) ); 8390: e3a00001 mov r0, #1 8394: e3a0100c mov r1, #12 8398: eb0000b2 bl 8668 if ( !fs_info ) { 839c: e3500000 cmp r0, #0 83a0: 1a000006 bne 83c0 free(temp_mt_entry->mt_fs_root.node_access); 83a4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 83a8: eb0000ea bl 8758 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 83ac: eb001169 bl c958 <__errno> <== NOT EXECUTED 83b0: e3a0300c mov r3, #12 <== NOT EXECUTED 83b4: e5803000 str r3, [r0] <== NOT EXECUTED 83b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 83bc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 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; 83c0: e594201c ldr r2, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 83c4: e3a03001 mov r3, #1 83c8: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 83cc: e5805008 str r5, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 83d0: e5806004 str r6, [r0, #4] fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 83d4: 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; 83d8: e5823038 str r3, [r2, #56] ; 0x38 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 83dc: eb000922 bl a86c 83e0: e3a00000 mov r0, #0 return 0; } 83e4: e8bd80f0 pop {r4, r5, r6, r7, pc} 83e8: 000183a4 .word 0x000183a4 83ec: 00019afc .word 0x00019afc 83f0: 00019008 .word 0x00019008 00001d78 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1d78: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d7c: 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 */ ) { 1d80: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d84: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1d88: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1d8c: 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 */ ) { 1d90: e1a05001 mov r5, r1 1d94: 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 ) 1d98: 9a000002 bls 1da8 rtems_set_errno_and_return_minus_one( EMLINK ); 1d9c: eb003ebc bl 11894 <__errno> 1da0: e3a0301f mov r3, #31 1da4: ea000012 b 1df4 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 1da8: e1a00002 mov r0, r2 1dac: eb004291 bl 127f8 1db0: e28d4004 add r4, sp, #4 1db4: e1a01000 mov r1, r0 1db8: e1a02004 mov r2, r4 1dbc: e28d3044 add r3, sp, #68 ; 0x44 1dc0: e1a00006 mov r0, r6 1dc4: eb002cb4 bl d09c * 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( 1dc8: e28dc028 add ip, sp, #40 ; 0x28 1dcc: e1a00005 mov r0, r5 1dd0: e1a02004 mov r2, r4 1dd4: e3a01003 mov r1, #3 1dd8: e59f3054 ldr r3, [pc, #84] ; 1e34 1ddc: e58dc000 str ip, [sp] 1de0: eb0029b3 bl c4b4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 1de4: e3500000 cmp r0, #0 1de8: 1a000004 bne 1e00 rtems_set_errno_and_return_minus_one( ENOMEM ); 1dec: eb003ea8 bl 11894 <__errno> <== NOT EXECUTED 1df0: e3a0300c mov r3, #12 <== NOT EXECUTED 1df4: e5803000 str r3, [r0] 1df8: e3e00000 mvn r0, #0 1dfc: ea00000a b 1e2c /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 1e00: e59d3028 ldr r3, [sp, #40] ; 0x28 1e04: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1e08: e2822001 add r2, r2, #1 1e0c: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 1e10: e28d003c add r0, sp, #60 ; 0x3c 1e14: e3a01000 mov r1, #0 1e18: eb000240 bl 2720 1e1c: e59d203c ldr r2, [sp, #60] ; 0x3c 1e20: e59d3028 ldr r3, [sp, #40] ; 0x28 1e24: e5832048 str r2, [r3, #72] ; 0x48 1e28: e3a00000 mov r0, #0 return 0; } 1e2c: e28dd048 add sp, sp, #72 ; 0x48 1e30: e8bd8070 pop {r4, r5, r6, pc} 1e34: 0000a1ff .word 0x0000a1ff 0000fbdc : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); fbdc: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { fbe0: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); fbe4: 059f0060 ldreq r0, [pc, #96] ; fc4c fbe8: 059f1060 ldreq r1, [pc, #96] ; fc50 fbec: 059f2060 ldreq r2, [pc, #96] ; fc54 fbf0: 059f3060 ldreq r3, [pc, #96] ; fc58 fbf4: 0a000006 beq fc14 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); fbf8: e593304c ldr r3, [r3, #76] ; 0x4c fbfc: e3530005 cmp r3, #5 fc00: 0a000004 beq fc18 fc04: e59f0040 ldr r0, [pc, #64] ; fc4c <== NOT EXECUTED fc08: e59f104c ldr r1, [pc, #76] ; fc5c <== NOT EXECUTED fc0c: e59f2040 ldr r2, [pc, #64] ; fc54 <== NOT EXECUTED fc10: e59f3048 ldr r3, [pc, #72] ; fc60 <== NOT EXECUTED fc14: ebfff5ad bl d2d0 <__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 ); fc18: e3a02001 mov r2, #1 fc1c: ebfffeab bl f6d0 if ( *block_entry_ptr ) fc20: e5904000 ldr r4, [r0] fc24: 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 ); fc28: e1a05000 mov r5, r0 if ( *block_entry_ptr ) fc2c: 13a00000 movne r0, #0 fc30: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); fc34: ebfffe98 bl f69c if ( !memory ) fc38: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; fc3c: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) fc40: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; fc44: 11a00004 movne r0, r4 return 0; } fc48: e8bd8030 pop {r4, r5, pc} fc4c: 0001ed7f .word 0x0001ed7f fc50: 00000169 .word 0x00000169 fc54: 0001e548 .word 0x0001e548 fc58: 0001edc5 .word 0x0001edc5 fc5c: 0000016d .word 0x0000016d fc60: 0001edcf .word 0x0001edcf 0000fc64 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { fc64: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); fc68: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { fc6c: e1a05001 mov r5, r1 fc70: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); fc74: 059f0134 ldreq r0, [pc, #308] ; fdb0 fc78: 059f1134 ldreq r1, [pc, #308] ; fdb4 fc7c: 059f2134 ldreq r2, [pc, #308] ; fdb8 fc80: 059f3134 ldreq r3, [pc, #308] ; fdbc fc84: 0a000006 beq fca4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); fc88: e594304c ldr r3, [r4, #76] ; 0x4c fc8c: e3530005 cmp r3, #5 fc90: 0a000004 beq fca8 fc94: e59f0114 ldr r0, [pc, #276] ; fdb0 <== NOT EXECUTED fc98: e59f1120 ldr r1, [pc, #288] ; fdc0 <== NOT EXECUTED fc9c: e59f2114 ldr r2, [pc, #276] ; fdb8 <== NOT EXECUTED fca0: e59f311c ldr r3, [pc, #284] ; fdc4 <== NOT EXECUTED fca4: ebfff589 bl d2d0 <__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 ) fca8: e59f3118 ldr r3, [pc, #280] ; fdc8 fcac: e593b000 ldr fp, [r3] fcb0: e1a0312b lsr r3, fp, #2 fcb4: e2832001 add r2, r3, #1 fcb8: e0010293 mul r1, r3, r2 fcbc: e2811001 add r1, r1, #1 fcc0: e0020193 mul r2, r3, r1 fcc4: e3a03000 mov r3, #0 fcc8: e1530006 cmp r3, r6 fccc: e2422001 sub r2, r2, #1 fcd0: e003029b mul r3, fp, r2 fcd4: ca000005 bgt fcf0 fcd8: 1a000001 bne fce4 fcdc: e1530005 cmp r3, r5 fce0: 8a000002 bhi fcf0 rtems_set_errno_and_return_minus_one( EINVAL ); fce4: eb0006ea bl 11894 <__errno> <== NOT EXECUTED fce8: e3a03016 mov r3, #22 <== NOT EXECUTED fcec: ea000025 b fd88 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) fcf0: e5948054 ldr r8, [r4, #84] ; 0x54 fcf4: e1560008 cmp r6, r8 fcf8: e5947050 ldr r7, [r4, #80] ; 0x50 fcfc: ca000002 bgt fd0c fd00: 1a000028 bne fda8 fd04: e1550007 cmp r5, r7 fd08: 9a000026 bls fda8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; fd0c: e1a0cfcb asr ip, fp, #31 fd10: e1a0300c mov r3, ip fd14: e1a0200b mov r2, fp fd18: e1a00005 mov r0, r5 fd1c: e1a01006 mov r1, r6 fd20: e58dc000 str ip, [sp] fd24: eb002f3d bl 1ba20 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; fd28: e59dc000 ldr ip, [sp] fd2c: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; fd30: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; fd34: e1a0200b mov r2, fp fd38: e1a00007 mov r0, r7 fd3c: e1a0300c mov r3, ip fd40: eb002f36 bl 1ba20 <__divdi3> fd44: e1a08000 mov r8, r0 fd48: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { fd4c: ea000011 b fd98 if ( IMFS_memfile_addblock( the_jnode, block ) ) { fd50: e1a00004 mov r0, r4 fd54: e1a01007 mov r1, r7 fd58: ebffff9f bl fbdc fd5c: e3500000 cmp r0, #0 fd60: 0a00000b beq fd94 fd64: ea000003 b fd78 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); fd68: e1a01007 mov r1, r7 <== NOT EXECUTED fd6c: e1a00004 mov r0, r4 <== NOT EXECUTED fd70: ebfffefa bl f960 <== 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-- ) { fd74: e2477001 sub r7, r7, #1 <== NOT EXECUTED fd78: e1570008 cmp r7, r8 <== NOT EXECUTED fd7c: 2afffff9 bcs fd68 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); fd80: eb0006c3 bl 11894 <__errno> <== NOT EXECUTED fd84: e3a0301c mov r3, #28 <== NOT EXECUTED fd88: e5803000 str r3, [r0] <== NOT EXECUTED fd8c: e3e00000 mvn r0, #0 <== NOT EXECUTED fd90: ea000005 b fdac <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { fd94: e2877001 add r7, r7, #1 fd98: e157000a cmp r7, sl fd9c: 9affffeb bls fd50 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; fda0: e5846054 str r6, [r4, #84] ; 0x54 fda4: e5845050 str r5, [r4, #80] ; 0x50 fda8: e3a00000 mov r0, #0 return 0; } fdac: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} fdb0: 0001ed7f .word 0x0001ed7f fdb4: 00000131 .word 0x00000131 fdb8: 0001e560 .word 0x0001e560 fdbc: 0001edc5 .word 0x0001edc5 fdc0: 00000135 .word 0x00000135 fdc4: 0001edcf .word 0x0001edcf fdc8: 0001f144 .word 0x0001f144 0000f6d0 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { f6d0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f6d4: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { f6d8: e1a06001 mov r6, r1 f6dc: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); f6e0: 059f01e8 ldreq r0, [pc, #488] ; f8d0 f6e4: 03a01fe2 moveq r1, #904 ; 0x388 f6e8: 059f21e4 ldreq r2, [pc, #484] ; f8d4 f6ec: 059f31e4 ldreq r3, [pc, #484] ; f8d8 f6f0: 0a000006 beq f710 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); f6f4: e594304c ldr r3, [r4, #76] ; 0x4c f6f8: e3530005 cmp r3, #5 f6fc: 0a000004 beq f714 f700: e59f01c8 ldr r0, [pc, #456] ; f8d0 <== NOT EXECUTED f704: e59f21c8 ldr r2, [pc, #456] ; f8d4 <== NOT EXECUTED f708: e59f31cc ldr r3, [pc, #460] ; f8dc <== NOT EXECUTED f70c: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED f710: ebfff6ee bl d2d0 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { f714: e59f31c4 ldr r3, [pc, #452] ; f8e0 f718: e5935000 ldr r5, [r3] f71c: e1a05125 lsr r5, r5, #2 f720: e2453001 sub r3, r5, #1 f724: e1510003 cmp r1, r3 f728: 8a00000e bhi f768 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { f72c: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; f730: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { f734: 0a000007 beq f758 if ( !p ) { f738: e3500000 cmp r0, #0 f73c: 1a000003 bne f750 p = memfile_alloc_block(); f740: ebffffd5 bl f69c if ( !p ) f744: e3500000 cmp r0, #0 f748: 0a00005e beq f8c8 return 0; info->indirect = p; f74c: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; f750: e5940058 ldr r0, [r4, #88] ; 0x58 f754: ea000001 b f760 } if ( !p ) f758: e3500000 cmp r0, #0 f75c: 0a000059 beq f8c8 return 0; return &info->indirect[ my_block ]; f760: e0800106 add r0, r0, r6, lsl #2 f764: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { f768: e2852001 add r2, r5, #1 <== NOT EXECUTED f76c: e0030295 mul r3, r5, r2 <== NOT EXECUTED f770: e2432001 sub r2, r3, #1 <== NOT EXECUTED f774: e1510002 cmp r1, r2 <== NOT EXECUTED f778: 8a00001b bhi f7ec <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; f77c: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f780: e1a00006 mov r0, r6 <== NOT EXECUTED f784: e1a01005 mov r1, r5 <== NOT EXECUTED f788: eb002df2 bl 1af58 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f78c: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f790: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f794: e1a00006 mov r0, r6 <== NOT EXECUTED f798: eb002d5a bl 1ad08 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { f79c: 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; f7a0: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; f7a4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { f7a8: 0a000009 beq f7d4 <== NOT EXECUTED if ( !p ) { f7ac: e3530000 cmp r3, #0 <== NOT EXECUTED f7b0: 1a000003 bne f7c4 <== NOT EXECUTED p = memfile_alloc_block(); f7b4: ebffffb8 bl f69c <== NOT EXECUTED if ( !p ) f7b8: e2503000 subs r3, r0, #0 <== NOT EXECUTED f7bc: 0a000041 beq f8c8 <== NOT EXECUTED return 0; info->doubly_indirect = p; f7c0: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; f7c4: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED f7c8: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { f7cc: e3500000 cmp r0, #0 <== NOT EXECUTED f7d0: ea00002e b f890 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) f7d4: e3530000 cmp r3, #0 <== NOT EXECUTED f7d8: 0a00003a beq f8c8 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; f7dc: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) f7e0: e3500000 cmp r0, #0 <== NOT EXECUTED f7e4: 1a000035 bne f8c0 <== NOT EXECUTED f7e8: ea000036 b f8c8 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { f7ec: e2831001 add r1, r3, #1 <== NOT EXECUTED f7f0: e0020195 mul r2, r5, r1 <== NOT EXECUTED f7f4: e2422001 sub r2, r2, #1 <== NOT EXECUTED f7f8: e1560002 cmp r6, r2 <== NOT EXECUTED f7fc: 8a000031 bhi f8c8 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; f800: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f804: e1a01005 mov r1, r5 <== NOT EXECUTED f808: e1a00006 mov r0, r6 <== NOT EXECUTED f80c: eb002dd1 bl 1af58 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f810: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f814: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f818: e1a00006 mov r0, r6 <== NOT EXECUTED f81c: eb002d39 bl 1ad08 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; f820: 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; f824: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; f828: eb002d36 bl 1ad08 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; f82c: 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; f830: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; f834: e1a00006 mov r0, r6 <== NOT EXECUTED f838: eb002dc6 bl 1af58 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { f83c: 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; f840: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; f844: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { f848: 0a000016 beq f8a8 <== NOT EXECUTED if ( !p ) { f84c: e3530000 cmp r3, #0 <== NOT EXECUTED f850: 1a000003 bne f864 <== NOT EXECUTED p = memfile_alloc_block(); f854: ebffff90 bl f69c <== NOT EXECUTED if ( !p ) f858: e2503000 subs r3, r0, #0 <== NOT EXECUTED f85c: 0a000019 beq f8c8 <== NOT EXECUTED return 0; info->triply_indirect = p; f860: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; f864: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { f868: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; f86c: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { f870: 1a000003 bne f884 <== NOT EXECUTED p1 = memfile_alloc_block(); f874: ebffff88 bl f69c <== NOT EXECUTED if ( !p1 ) f878: e2502000 subs r2, r0, #0 <== NOT EXECUTED f87c: 0a000011 beq f8c8 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; f880: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; f884: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED f888: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { f88c: e3500000 cmp r0, #0 <== NOT EXECUTED f890: 1a00000a bne f8c0 <== NOT EXECUTED p2 = memfile_alloc_block(); f894: ebffff80 bl f69c <== NOT EXECUTED if ( !p2 ) f898: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; f89c: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) f8a0: 1a000006 bne f8c0 <== NOT EXECUTED f8a4: ea000007 b f8c8 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) f8a8: e3530000 cmp r3, #0 <== NOT EXECUTED f8ac: 0a000005 beq f8c8 <== 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 ]; f8b0: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) f8b4: e3530000 cmp r3, #0 <== NOT EXECUTED f8b8: 0a000002 beq f8c8 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; f8bc: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED f8c0: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED f8c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED f8c8: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } f8cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED f8d0: 0001ed7f .word 0x0001ed7f f8d4: 0001e4d8 .word 0x0001e4d8 f8d8: 0001edc5 .word 0x0001edc5 f8dc: 0001edcf .word 0x0001edcf f8e0: 0001f144 .word 0x0001f144 000101ec : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 101ec: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 101f0: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 101f4: e1a06003 mov r6, r3 101f8: e1a08001 mov r8, r1 101fc: e1a09002 mov r9, r2 10200: e59d7030 ldr r7, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); 10204: 059f024c ldreq r0, [pc, #588] ; 10458 10208: 03a01f93 moveq r1, #588 ; 0x24c 1020c: 059f2248 ldreq r2, [pc, #584] ; 1045c 10210: 059f3248 ldreq r3, [pc, #584] ; 10460 10214: 0a000007 beq 10238 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 10218: e594304c ldr r3, [r4, #76] ; 0x4c 1021c: e2432005 sub r2, r3, #5 10220: e3520001 cmp r2, #1 10224: 9a000004 bls 1023c 10228: e59f0228 ldr r0, [pc, #552] ; 10458 <== NOT EXECUTED 1022c: e59f1230 ldr r1, [pc, #560] ; 10464 <== NOT EXECUTED 10230: e59f2224 ldr r2, [pc, #548] ; 1045c <== NOT EXECUTED 10234: e59f322c ldr r3, [pc, #556] ; 10468 <== NOT EXECUTED 10238: ebfff424 bl d2d0 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 1023c: e3560000 cmp r6, #0 10240: 059f0210 ldreq r0, [pc, #528] ; 10458 10244: 059f1220 ldreq r1, [pc, #544] ; 1046c 10248: 059f220c ldreq r2, [pc, #524] ; 1045c 1024c: 059f321c ldreq r3, [pc, #540] ; 10470 10250: 0afffff8 beq 10238 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 10254: e3570000 cmp r7, #0 10258: 1a000004 bne 10270 rtems_set_errno_and_return_minus_one( EINVAL ); 1025c: eb00058c bl 11894 <__errno> <== NOT EXECUTED 10260: e3a03016 mov r3, #22 <== NOT EXECUTED 10264: e5803000 str r3, [r0] <== NOT EXECUTED 10268: e3e07000 mvn r7, #0 <== NOT EXECUTED 1026c: ea000077 b 10450 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 10270: e3530006 cmp r3, #6 10274: 1a000012 bne 102c4 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 10278: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED 1027c: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED 10280: e1a0200a mov r2, sl <== NOT EXECUTED 10284: e1a0300b mov r3, fp <== NOT EXECUTED 10288: e3a01000 mov r1, #0 <== NOT EXECUTED 1028c: e0522008 subs r2, r2, r8 <== NOT EXECUTED 10290: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED 10294: 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; 10298: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 1029c: ca000002 bgt 102ac <== NOT EXECUTED 102a0: 1a000002 bne 102b0 <== NOT EXECUTED 102a4: e1570002 cmp r7, r2 <== NOT EXECUTED 102a8: 9a000000 bls 102b0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 102ac: e068700a rsb r7, r8, sl <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 102b0: e0811008 add r1, r1, r8 <== NOT EXECUTED 102b4: e1a00006 mov r0, r6 <== NOT EXECUTED 102b8: e1a02007 mov r2, r7 <== NOT EXECUTED 102bc: eb000782 bl 120cc <== NOT EXECUTED 102c0: ea00005d b 1043c <== 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 ) 102c4: e5943054 ldr r3, [r4, #84] ; 0x54 102c8: e3a02000 mov r2, #0 102cc: e1520003 cmp r2, r3 102d0: 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; 102d4: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 102d8: e0872001 add r2, r7, r1 102dc: ca000004 bgt 102f4 102e0: 1a000001 bne 102ec 102e4: e1520005 cmp r2, r5 102e8: 8a000001 bhi 102f4 102ec: e1a05007 mov r5, r7 <== NOT EXECUTED 102f0: ea000000 b 102f8 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 102f4: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 102f8: e59f3174 ldr r3, [pc, #372] ; 10474 102fc: e593a000 ldr sl, [r3] 10300: e1a0b00a mov fp, sl 10304: e1a0cfcb asr ip, fp, #31 10308: e1a0300c mov r3, ip 1030c: e1a00008 mov r0, r8 10310: e1a0200b mov r2, fp 10314: e1a01009 mov r1, r9 10318: e58dc000 str ip, [sp] 1031c: eb002ee9 bl 1bec8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10320: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10324: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10328: e1a01009 mov r1, r9 1032c: e1a00008 mov r0, r8 10330: e1a0200b mov r2, fp 10334: e1a0300c mov r3, ip 10338: eb002db8 bl 1ba20 <__divdi3> if ( start_offset ) { 1033c: 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; 10340: e1a08000 mov r8, r0 if ( start_offset ) { 10344: 0a000013 beq 10398 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 ); 10348: e1a00004 mov r0, r4 1034c: e1a01008 mov r1, r8 10350: e3a02000 mov r2, #0 10354: ebfffcdd bl f6d0 assert( block_ptr ); 10358: e3500000 cmp r0, #0 1035c: 059f00f4 ldreq r0, [pc, #244] ; 10458 10360: 059f1110 ldreq r1, [pc, #272] ; 10478 10364: 0a00002c beq 1041c if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 10368: 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; 1036c: e067a00a rsb sl, r7, sl 10370: e155000a cmp r5, sl 10374: 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 ); 10378: e0811007 add r1, r1, r7 1037c: e1a00006 mov r0, r6 10380: e1a0200a mov r2, sl 10384: eb000750 bl 120cc dest += to_copy; 10388: e086600a add r6, r6, sl block++; 1038c: e2888001 add r8, r8, #1 my_length -= to_copy; 10390: e06a5005 rsb r5, sl, r5 10394: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10398: e59f30d4 ldr r3, [pc, #212] ; 10474 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1039c: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 103a0: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 103a4: ea00000f b 103e8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 103a8: e1a00004 mov r0, r4 103ac: e1a01008 mov r1, r8 103b0: e3a02000 mov r2, #0 103b4: ebfffcc5 bl f6d0 assert( block_ptr ); 103b8: e3500000 cmp r0, #0 103bc: 059f0094 ldreq r0, [pc, #148] ; 10458 103c0: 059f10b4 ldreq r1, [pc, #180] ; 1047c 103c4: 0a000014 beq 1041c if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 103c8: e5901000 ldr r1, [r0] 103cc: e1a0200a mov r2, sl 103d0: e1a00006 mov r0, r6 103d4: eb00073c bl 120cc dest += to_copy; 103d8: e086600a add r6, r6, sl block++; 103dc: e2888001 add r8, r8, #1 my_length -= to_copy; 103e0: e06a5005 rsb r5, sl, r5 copied += to_copy; 103e4: 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 ) { 103e8: e5993000 ldr r3, [r9] 103ec: e1550003 cmp r5, r3 103f0: 2affffec bcs 103a8 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 103f4: e3550000 cmp r5, #0 103f8: 0a00000f beq 1043c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 103fc: e1a01008 mov r1, r8 10400: e1a00004 mov r0, r4 10404: e3a02000 mov r2, #0 10408: ebfffcb0 bl f6d0 assert( block_ptr ); 1040c: e2503000 subs r3, r0, #0 10410: 1a000004 bne 10428 10414: e59f003c ldr r0, [pc, #60] ; 10458 <== NOT EXECUTED 10418: e59f1060 ldr r1, [pc, #96] ; 10480 <== NOT EXECUTED 1041c: e59f2038 ldr r2, [pc, #56] ; 1045c <== NOT EXECUTED 10420: e59f305c ldr r3, [pc, #92] ; 10484 <== NOT EXECUTED 10424: eaffff83 b 10238 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 10428: e1a00006 mov r0, r6 1042c: e5931000 ldr r1, [r3] 10430: e1a02005 mov r2, r5 10434: eb000724 bl 120cc copied += my_length; 10438: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); 1043c: e28d0004 add r0, sp, #4 10440: e3a01000 mov r1, #0 10444: ebffc8b5 bl 2720 10448: e59d3004 ldr r3, [sp, #4] 1044c: e5843040 str r3, [r4, #64] ; 0x40 return copied; } 10450: e1a00007 mov r0, r7 10454: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 10458: 0001ed7f .word 0x0001ed7f 1045c: 0001e588 .word 0x0001e588 10460: 0001edc5 .word 0x0001edc5 10464: 00000251 .word 0x00000251 10468: 0001ee39 .word 0x0001ee39 1046c: 0000025a .word 0x0000025a 10470: 0001ee84 .word 0x0001ee84 10474: 0001f144 .word 0x0001f144 10478: 00000296 .word 0x00000296 1047c: 000002a7 .word 0x000002a7 10480: 000002b9 .word 0x000002b9 10484: 0001edff .word 0x0001edff 0000f9ac : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { f9ac: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f9b0: e2504000 subs r4, r0, #0 f9b4: 059f012c ldreq r0, [pc, #300] ; fae8 f9b8: 059f112c ldreq r1, [pc, #300] ; faec f9bc: 059f212c ldreq r2, [pc, #300] ; faf0 f9c0: 059f312c ldreq r3, [pc, #300] ; faf4 f9c4: 0a000006 beq f9e4 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); f9c8: e594304c ldr r3, [r4, #76] ; 0x4c f9cc: e3530005 cmp r3, #5 f9d0: 0a000004 beq f9e8 f9d4: e59f010c ldr r0, [pc, #268] ; fae8 <== NOT EXECUTED f9d8: e59f1118 ldr r1, [pc, #280] ; faf8 <== NOT EXECUTED f9dc: e59f210c ldr r2, [pc, #268] ; faf0 <== NOT EXECUTED f9e0: e59f3114 ldr r3, [pc, #276] ; fafc <== NOT EXECUTED f9e4: ebfff639 bl d2d0 <__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; f9e8: e59f2110 ldr r2, [pc, #272] ; fb00 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f9ec: 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; f9f0: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; f9f4: 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; f9f8: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); f9fc: 12840058 addne r0, r4, #88 ; 0x58 fa00: 11a01005 movne r1, r5 fa04: 1bffffb6 blne f8e4 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fa08: e594305c ldr r3, [r4, #92] ; 0x5c fa0c: e3530000 cmp r3, #0 fa10: 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; fa18: 1a000008 bne fa40 fa1c: ea00000d b fa58 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { fa20: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED fa24: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED fa28: e3520000 cmp r2, #0 <== NOT EXECUTED fa2c: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( fa30: 10830000 addne r0, r3, r0 <== NOT EXECUTED fa34: 11a01005 movne r1, r5 <== NOT EXECUTED fa38: 1bffffa9 blne f8e4 <== 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 ); fa4c: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED fa50: e1a01005 mov r1, r5 <== NOT EXECUTED fa54: ebffffa2 bl f8e4 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fa58: e5943060 ldr r3, [r4, #96] ; 0x60 fa5c: e3530000 cmp r3, #0 fa60: 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; fa68: 1a000016 bne fac8 fa6c: ea00001b b fae0 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; fa70: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED fa74: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ fa78: e3570000 cmp r7, #0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fa7c: 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 */ fa80: 0a000013 beq fad4 <== NOT EXECUTED fa84: e3a08000 mov r8, #0 <== NOT EXECUTED fa88: ea000006 b faa8 <== 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( fab4: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED fab8: e1a01005 mov r1, r5 <== NOT EXECUTED fabc: e0800009 add r0, r0, r9 <== NOT EXECUTED fac0: ebffff87 bl f8e4 <== 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( fad4: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED fad8: e1a01005 mov r1, r5 <== NOT EXECUTED fadc: ebffff80 bl f8e4 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } fae0: e3a00000 mov r0, #0 fae4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} fae8: 0001ed7f .word 0x0001ed7f faec: 000001ee .word 0x000001ee faf0: 0001e534 .word 0x0001e534 faf4: 0001edc5 .word 0x0001edc5 faf8: 000001f2 .word 0x000001f2 fafc: 0001edcf .word 0x0001edcf fb00: 0001f144 .word 0x0001f144 0000f960 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { f960: 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 ); f964: e3a02000 mov r2, #0 <== NOT EXECUTED f968: ebffff58 bl f6d0 <== NOT EXECUTED assert( block_ptr ); f96c: e2503000 subs r3, r0, #0 <== NOT EXECUTED f970: 059f0024 ldreq r0, [pc, #36] ; f99c <== NOT EXECUTED f974: 059f1024 ldreq r1, [pc, #36] ; f9a0 <== NOT EXECUTED f978: 059f2024 ldreq r2, [pc, #36] ; f9a4 <== NOT EXECUTED f97c: 059f3024 ldreq r3, [pc, #36] ; f9a8 <== NOT EXECUTED f980: 0bfff652 bleq d2d0 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; f984: 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; f988: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; f98c: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); f990: ebffff39 bl f67c <== NOT EXECUTED } return 1; } f994: e3a00001 mov r0, #1 <== NOT EXECUTED f998: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED f99c: 0001ed7f .word 0x0001ed7f f9a0: 00000196 .word 0x00000196 f9a4: 0001e518 .word 0x0001e518 f9a8: 0001edff .word 0x0001edff 0000febc : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { febc: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); fec0: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { fec4: e1a08001 mov r8, r1 fec8: e1a0a002 mov sl, r2 fecc: e1a06003 mov r6, r3 fed0: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); fed4: 059f0204 ldreq r0, [pc, #516] ; 100e0 fed8: 059f1204 ldreq r1, [pc, #516] ; 100e4 fedc: 059f2204 ldreq r2, [pc, #516] ; 100e8 fee0: 059f3204 ldreq r3, [pc, #516] ; 100ec fee4: 0a000006 beq ff04 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); fee8: e594304c ldr r3, [r4, #76] ; 0x4c feec: e3530005 cmp r3, #5 fef0: 0a000004 beq ff08 fef4: e59f01e4 ldr r0, [pc, #484] ; 100e0 <== NOT EXECUTED fef8: e59f11f0 ldr r1, [pc, #496] ; 100f0 <== NOT EXECUTED fefc: e59f21e4 ldr r2, [pc, #484] ; 100e8 <== NOT EXECUTED ff00: e59f31ec ldr r3, [pc, #492] ; 100f4 <== NOT EXECUTED ff04: ebfff4f1 bl d2d0 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); ff08: e3560000 cmp r6, #0 ff0c: 059f01cc ldreq r0, [pc, #460] ; 100e0 ff10: 059f11e0 ldreq r1, [pc, #480] ; 100f8 ff14: 059f21cc ldreq r2, [pc, #460] ; 100e8 ff18: 059f31dc ldreq r3, [pc, #476] ; 100fc ff1c: 0afffff8 beq ff04 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) ff20: e3550000 cmp r5, #0 ff24: 1a000002 bne ff34 rtems_set_errno_and_return_minus_one( EINVAL ); ff28: eb000659 bl 11894 <__errno> <== NOT EXECUTED ff2c: e3a03016 mov r3, #22 <== NOT EXECUTED ff30: ea00000e b ff70 <== 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 ) { ff34: e5943054 ldr r3, [r4, #84] ; 0x54 ff38: e3530000 cmp r3, #0 ff3c: e0851001 add r1, r5, r1 ff40: ba000003 blt ff54 ff44: 1a00000c bne ff7c ff48: e5943050 ldr r3, [r4, #80] ; 0x50 ff4c: e1530001 cmp r3, r1 ff50: 2a000009 bcs ff7c status = IMFS_memfile_extend( the_jnode, last_byte ); ff54: e1a00004 mov r0, r4 ff58: e3a02000 mov r2, #0 ff5c: ebffff40 bl fc64 if ( status ) ff60: e3500000 cmp r0, #0 ff64: 0a000004 beq ff7c rtems_set_errno_and_return_minus_one( ENOSPC ); ff68: eb000649 bl 11894 <__errno> <== NOT EXECUTED ff6c: e3a0301c mov r3, #28 <== NOT EXECUTED ff70: e5803000 str r3, [r0] <== NOT EXECUTED ff74: e3e07000 mvn r7, #0 <== NOT EXECUTED ff78: ea000056 b 100d8 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ff7c: e59f317c ldr r3, [pc, #380] ; 10100 ff80: e5939000 ldr r9, [r3] ff84: e1a0b009 mov fp, r9 ff88: e1a0cfcb asr ip, fp, #31 ff8c: e1a0300c mov r3, ip ff90: e1a00008 mov r0, r8 ff94: e1a0200b mov r2, fp ff98: e1a0100a mov r1, sl ff9c: e58dc000 str ip, [sp] ffa0: eb002fc8 bl 1bec8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffa4: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; ffa8: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; ffac: e1a0100a mov r1, sl ffb0: e1a00008 mov r0, r8 ffb4: e1a0200b mov r2, fp ffb8: e1a0300c mov r3, ip ffbc: eb002e97 bl 1ba20 <__divdi3> if ( start_offset ) { ffc0: 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; ffc4: e1a08000 mov r8, r0 if ( start_offset ) { ffc8: 0a000013 beq 1001c 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 ); ffcc: e1a01008 mov r1, r8 ffd0: e1a00004 mov r0, r4 ffd4: e3a02000 mov r2, #0 ffd8: ebfffdbc bl f6d0 assert( block_ptr ); ffdc: e3500000 cmp r0, #0 ffe0: 059f00f8 ldreq r0, [pc, #248] ; 100e0 ffe4: 03a01fc7 moveq r1, #796 ; 0x31c ffe8: 0a00002c beq 100a0 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 ); ffec: 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; fff0: e067a009 rsb sl, r7, r9 fff4: e15a0005 cmp sl, r5 fff8: 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 ); fffc: e0800007 add r0, r0, r7 10000: e1a01006 mov r1, r6 10004: e1a0200a mov r2, sl 10008: eb00082f bl 120cc src += to_copy; 1000c: e086600a add r6, r6, sl block++; 10010: e2888001 add r8, r8, #1 my_length -= to_copy; 10014: e06a5005 rsb r5, sl, r5 copied += to_copy; 10018: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 1001c: e59f30dc ldr r3, [pc, #220] ; 10100 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10020: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10024: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10028: ea00000f b 1006c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1002c: e1a00004 mov r0, r4 10030: e1a01008 mov r1, r8 10034: e3a02000 mov r2, #0 10038: ebfffda4 bl f6d0 assert( block_ptr ); 1003c: e3500000 cmp r0, #0 10040: 059f0098 ldreq r0, [pc, #152] ; 100e0 10044: 03a01e33 moveq r1, #816 ; 0x330 10048: 0a000014 beq 100a0 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 ); 1004c: e1a01006 mov r1, r6 10050: e5900000 ldr r0, [r0] 10054: e1a0200a mov r2, sl 10058: eb00081b bl 120cc src += to_copy; 1005c: e086600a add r6, r6, sl block++; 10060: e2888001 add r8, r8, #1 my_length -= to_copy; 10064: 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( 10068: 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 ) { 1006c: e5993000 ldr r3, [r9] 10070: e1550003 cmp r5, r3 10074: 2affffec bcs 1002c */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 10078: e3550000 cmp r5, #0 1007c: 0a00000f beq 100c0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10080: e1a01008 mov r1, r8 10084: e1a00004 mov r0, r4 10088: e3a02000 mov r2, #0 1008c: ebfffd8f bl f6d0 assert( block_ptr ); 10090: e3500000 cmp r0, #0 10094: 1a000004 bne 100ac 10098: e59f0040 ldr r0, [pc, #64] ; 100e0 <== NOT EXECUTED 1009c: e59f1060 ldr r1, [pc, #96] ; 10104 <== NOT EXECUTED 100a0: e59f2040 ldr r2, [pc, #64] ; 100e8 <== NOT EXECUTED 100a4: e59f305c ldr r3, [pc, #92] ; 10108 <== NOT EXECUTED 100a8: eaffff95 b ff04 <== 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 ); 100ac: e5900000 ldr r0, [r0] 100b0: e1a01006 mov r1, r6 100b4: e1a02005 mov r2, r5 100b8: eb000803 bl 120cc my_length = 0; copied += to_copy; 100bc: e0877005 add r7, r7, r5 } IMFS_mtime_ctime_update( the_jnode ); 100c0: e28d0004 add r0, sp, #4 100c4: e3a01000 mov r1, #0 100c8: ebffc994 bl 2720 100cc: e59d3004 ldr r3, [sp, #4] 100d0: e5843048 str r3, [r4, #72] ; 0x48 100d4: e5843044 str r3, [r4, #68] ; 0x44 return copied; } 100d8: e1a00007 mov r0, r7 100dc: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 100e0: 0001ed7f .word 0x0001ed7f 100e4: 000002e3 .word 0x000002e3 100e8: 0001e574 .word 0x0001e574 100ec: 0001edc5 .word 0x0001edc5 100f0: 000002e7 .word 0x000002e7 100f4: 0001edcf .word 0x0001edcf 100f8: 000002ef .word 0x000002ef 100fc: 0001ee09 .word 0x0001ee09 10100: 0001f144 .word 0x0001f144 10104: 00000346 .word 0x00000346 10108: 0001edff .word 0x0001edff 000083f4 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 83f4: e92d40f0 push {r4, r5, r6, r7, lr} 83f8: e24dd040 sub sp, sp, #64 ; 0x40 83fc: e1a04001 mov r4, r1 8400: e1a07000 mov r7, r0 8404: e1a06002 mov r6, r2 8408: 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 ); 840c: eb001542 bl d91c 8410: e28d303c add r3, sp, #60 ; 0x3c 8414: e1a01000 mov r1, r0 8418: e28d2004 add r2, sp, #4 841c: e1a00007 mov r0, r7 8420: ebffff8a bl 8250 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8424: e2043a0f and r3, r4, #61440 ; 0xf000 8428: e3530901 cmp r3, #16384 ; 0x4000 842c: 0a00000e beq 846c type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 8430: e3530902 cmp r3, #32768 ; 0x8000 8434: 03a01005 moveq r1, #5 8438: 0a00000c beq 8470 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 843c: e3530a06 cmp r3, #24576 ; 0x6000 8440: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8444: 058d6028 streq r6, [sp, #40] ; 0x28 8448: 058d502c streq r5, [sp, #44] ; 0x2c 844c: 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) ) { 8450: 0a000006 beq 8470 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 8454: e3530a01 cmp r3, #4096 ; 0x1000 8458: 03a01007 moveq r1, #7 845c: 0a000003 beq 8470 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 8460: eb00113c bl c958 <__errno> <== NOT EXECUTED 8464: e3a03016 mov r3, #22 <== NOT EXECUTED 8468: ea00000b b 849c <== NOT EXECUTED 846c: 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( 8470: e28dc028 add ip, sp, #40 ; 0x28 8474: e59d0054 ldr r0, [sp, #84] ; 0x54 8478: e1a03004 mov r3, r4 847c: e28d2004 add r2, sp, #4 8480: e58dc000 str ip, [sp] 8484: eb000b49 bl b1b0 new_name, mode, &info ); if ( !new_node ) 8488: e3500000 cmp r0, #0 848c: 13a00000 movne r0, #0 8490: 1a000003 bne 84a4 rtems_set_errno_and_return_minus_one( ENOMEM ); 8494: eb00112f bl c958 <__errno> <== NOT EXECUTED 8498: e3a0300c mov r3, #12 <== NOT EXECUTED 849c: e5803000 str r3, [r0] <== NOT EXECUTED 84a0: e3e00000 mvn r0, #0 <== NOT EXECUTED return 0; } 84a4: e28dd040 add sp, sp, #64 ; 0x40 84a8: e8bd80f0 pop {r4, r5, r6, r7, pc} 00001ef0 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1ef0: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1ef4: e593204c ldr r2, [r3, #76] ; 0x4c 1ef8: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1efc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1f00: 0a000004 beq 1f18 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1f04: eb003e62 bl 11894 <__errno> <== NOT EXECUTED 1f08: e3a03014 mov r3, #20 <== NOT EXECUTED 1f0c: e5803000 str r3, [r0] <== NOT EXECUTED 1f10: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f14: 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; 1f18: e583005c str r0, [r3, #92] ; 0x5c 1f1c: e3a00000 mov r0, #0 return 0; } 1f20: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00002b9c : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2b9c: e92d4030 push {r4, r5, lr} assert( the_jnode ); 2ba0: e2504000 subs r4, r0, #0 2ba4: 059f0130 ldreq r0, [pc, #304] ; 2cdc 2ba8: 03a01038 moveq r1, #56 ; 0x38 2bac: 059f212c ldreq r2, [pc, #300] ; 2ce0 2bb0: 059f312c ldreq r3, [pc, #300] ; 2ce4 2bb4: 0a00002f beq 2c78 fprintf(stdout, "%s", the_jnode->name ); 2bb8: e59f5128 ldr r5, [pc, #296] ; 2ce8 2bbc: e5953000 ldr r3, [r5] 2bc0: e284000c add r0, r4, #12 2bc4: e5931008 ldr r1, [r3, #8] 2bc8: eb003a09 bl 113f4 switch( the_jnode->type ) { 2bcc: e594204c ldr r2, [r4, #76] ; 0x4c 2bd0: e2423001 sub r3, r2, #1 2bd4: e3530006 cmp r3, #6 2bd8: 979ff103 ldrls pc, [pc, r3, lsl #2] 2bdc: ea000034 b 2cb4 <== NOT EXECUTED 2be0: 00002bfc .word 0x00002bfc <== NOT EXECUTED 2be4: 00002c10 .word 0x00002c10 <== NOT EXECUTED 2be8: 00002c58 .word 0x00002c58 <== NOT EXECUTED 2bec: 00002c7c .word 0x00002c7c <== NOT EXECUTED 2bf0: 00002c40 .word 0x00002c40 <== NOT EXECUTED 2bf4: 00002c24 .word 0x00002c24 <== NOT EXECUTED 2bf8: 00002c98 .word 0x00002c98 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2bfc: e5953000 ldr r3, [r5] 2c00: e3a0002f mov r0, #47 ; 0x2f 2c04: e5931008 ldr r1, [r3, #8] 2c08: eb0039b4 bl 112e0 break; 2c0c: ea00002f b 2cd0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2c10: e5952000 ldr r2, [r5] 2c14: e5943054 ldr r3, [r4, #84] ; 0x54 2c18: e5920008 ldr r0, [r2, #8] 2c1c: e59f10c8 ldr r1, [pc, #200] ; 2cec 2c20: ea000003 b 2c34 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2c24: e5952000 ldr r2, [r5] <== NOT EXECUTED 2c28: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2c2c: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 2c30: e59f10b8 ldr r1, [pc, #184] ; 2cf0 <== NOT EXECUTED 2c34: e5942050 ldr r2, [r4, #80] ; 0x50 2c38: eb00398c bl 11270 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 2c3c: ea000023 b 2cd0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2c40: e5953000 ldr r3, [r5] 2c44: e5942050 ldr r2, [r4, #80] ; 0x50 2c48: e5930008 ldr r0, [r3, #8] 2c4c: e59f10a0 ldr r1, [pc, #160] ; 2cf4 2c50: eb003986 bl 11270 (uint32_t)the_jnode->info.file.size ); #endif break; 2c54: ea00001d b 2cd0 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2c58: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c5c: e59f0094 ldr r0, [pc, #148] ; 2cf8 <== NOT EXECUTED 2c60: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c64: eb0039e2 bl 113f4 <== NOT EXECUTED assert(0); 2c68: e59f006c ldr r0, [pc, #108] ; 2cdc <== NOT EXECUTED 2c6c: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 2c70: e59f2068 ldr r2, [pc, #104] ; 2ce0 <== NOT EXECUTED 2c74: e59f3080 ldr r3, [pc, #128] ; 2cfc <== NOT EXECUTED 2c78: eb00020a bl 34a8 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2c7c: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c80: e59f0070 ldr r0, [pc, #112] ; 2cf8 <== NOT EXECUTED 2c84: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c88: eb0039d9 bl 113f4 <== NOT EXECUTED assert(0); 2c8c: e59f0048 ldr r0, [pc, #72] ; 2cdc <== NOT EXECUTED 2c90: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 2c94: eafffff5 b 2c70 <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2c98: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c9c: e59f005c ldr r0, [pc, #92] ; 2d00 <== NOT EXECUTED 2ca0: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2ca4: eb0039d2 bl 113f4 <== NOT EXECUTED assert(0); 2ca8: e59f002c ldr r0, [pc, #44] ; 2cdc <== NOT EXECUTED 2cac: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 2cb0: eaffffee b 2c70 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2cb4: e5953000 ldr r3, [r5] <== NOT EXECUTED 2cb8: e59f1044 ldr r1, [pc, #68] ; 2d04 <== NOT EXECUTED 2cbc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2cc0: eb00396a bl 11270 <== NOT EXECUTED assert(0); 2cc4: e59f0010 ldr r0, [pc, #16] ; 2cdc <== NOT EXECUTED 2cc8: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 2ccc: eaffffe7 b 2c70 <== NOT EXECUTED break; } puts(""); 2cd0: e59f0030 ldr r0, [pc, #48] ; 2d08 } 2cd4: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2cd8: ea004091 b 12f24 2cdc: 000228f6 .word 0x000228f6 2ce0: 000214bc .word 0x000214bc 2ce4: 0002293f .word 0x0002293f 2ce8: 00020f64 .word 0x00020f64 2cec: 00022949 .word 0x00022949 2cf0: 0002295c .word 0x0002295c 2cf4: 0002296b .word 0x0002296b 2cf8: 00022977 .word 0x00022977 2cfc: 000222dd .word 0x000222dd 2d00: 0002298b .word 0x0002298b 2d04: 0002299e .word 0x0002299e 2d08: 00022b2f .word 0x00022b2f 00001f30 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 1f30: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 1f34: e593004c ldr r0, [r3, #76] ; 0x4c 1f38: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 1f3c: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 1f40: 03a00000 moveq r0, #0 1f44: 0a000006 beq 1f64 rtems_set_errno_and_return_minus_one( EINVAL ); 1f48: eb003e51 bl 11894 <__errno> <== NOT EXECUTED 1f4c: e3a03016 mov r3, #22 <== NOT EXECUTED 1f50: e5803000 str r3, [r0] <== NOT EXECUTED 1f54: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f58: 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]; 1f5c: 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++ ) 1f60: e2800001 add r0, r0, #1 1f64: e1500002 cmp r0, r2 1f68: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 1f6c: e593c050 ldr ip, [r3, #80] ; 0x50 1f70: e7dcc000 ldrb ip, [ip, r0] 1f74: e35c0000 cmp ip, #0 1f78: 1afffff7 bne 1f5c buf[i] = node->info.sym_link.name[i]; return i; } 1f7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001f80 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 1f80: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 1f84: e5914000 ldr r4, [r1] <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 1f88: e1a05002 mov r5, r2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 1f8c: e1a01003 mov r1, r3 <== NOT EXECUTED 1f90: e284000c add r0, r4, #12 <== NOT EXECUTED 1f94: e3a02020 mov r2, #32 <== NOT EXECUTED 1f98: eb00422e bl 12858 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 1f9c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 1fa0: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1fa4: 11a00004 movne r0, r4 <== NOT EXECUTED 1fa8: 1b0011a6 blne 6648 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1fac: e5953000 ldr r3, [r5] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 1fb0: e1a01004 mov r1, r4 <== NOT EXECUTED 1fb4: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 1fb8: e5843008 str r3, [r4, #8] <== NOT EXECUTED 1fbc: eb001196 bl 661c <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1fc0: e1a0000d mov r0, sp <== NOT EXECUTED 1fc4: e3a01000 mov r1, #0 <== NOT EXECUTED 1fc8: eb0001d4 bl 2720 <== NOT EXECUTED 1fcc: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 1fd0: e3a00000 mov r0, #0 <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1fd4: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 1fd8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00008560 : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 8560: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 8564: e593204c ldr r2, [r3, #76] ; 0x4c 8568: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 856c: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 8570: e3520005 cmp r2, #5 8574: 979ff102 ldrls pc, [pc, r2, lsl #2] 8578: ea000012 b 85c8 <== NOT EXECUTED 857c: 00008594 .word 0x00008594 <== NOT EXECUTED 8580: 000085c8 .word 0x000085c8 <== NOT EXECUTED 8584: 000085b4 .word 0x000085b4 <== NOT EXECUTED 8588: 000085a8 .word 0x000085a8 <== NOT EXECUTED 858c: 000085a8 .word 0x000085a8 <== NOT EXECUTED 8590: 000085b4 .word 0x000085b4 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 8594: e5930054 ldr r0, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 8598: e5932050 ldr r2, [r3, #80] ; 0x50 859c: e581001c str r0, [r1, #28] 85a0: e5812018 str r2, [r1, #24] break; 85a4: ea00000c b 85dc case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 85a8: e283c050 add ip, r3, #80 ; 0x50 85ac: e89c1800 ldm ip, {fp, ip} 85b0: ea000001 b 85bc case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 85b4: e3a0b000 mov fp, #0 <== NOT EXECUTED 85b8: e3a0c000 mov ip, #0 <== NOT EXECUTED 85bc: e581b020 str fp, [r1, #32] 85c0: e581c024 str ip, [r1, #36] ; 0x24 break; 85c4: ea000004 b 85dc default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 85c8: eb0010e2 bl c958 <__errno> <== NOT EXECUTED 85cc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 85d0: e5803000 str r3, [r0] <== NOT EXECUTED 85d4: e3e00000 mvn r0, #0 <== NOT EXECUTED 85d8: e8bd8800 pop {fp, pc} <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 85dc: e5932038 ldr r2, [r3, #56] ; 0x38 85e0: 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; 85e4: e5932040 ldr r2, [r3, #64] ; 0x40 85e8: e5812028 str r2, [r1, #40] ; 0x28 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 85ec: e1d3c3b4 ldrh ip, [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; 85f0: e5932044 ldr r2, [r3, #68] ; 0x44 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 85f4: e1c1c1b0 strh ip, [r1, #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; 85f8: e5812030 str r2, [r1, #48] ; 0x30 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 85fc: e5932030 ldr r2, [r3, #48] ; 0x30 8600: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8604: e1d323bc ldrh r2, [r3, #60] ; 0x3c 8608: e1c121b2 strh r2, [r1, #18] 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; 860c: e5930048 ldr r0, [r3, #72] ; 0x48 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; 8610: e1d333be ldrh r3, [r3, #62] ; 0x3e buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8614: e5810038 str r0, [r1, #56] ; 0x38 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; 8618: 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; 861c: e3a00000 mov r0, #0 return 0; } 8620: e8bd8800 pop {fp, pc} 00001fdc : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1fdc: e92d40f0 push {r4, r5, r6, r7, lr} 1fe0: e1a05000 mov r5, r0 1fe4: 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 ); 1fe8: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1fec: e1a07002 mov r7, r2 1ff0: 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 ); 1ff4: eb0041ff bl 127f8 1ff8: e28d4004 add r4, sp, #4 1ffc: e1a01000 mov r1, r0 2000: e1a02004 mov r2, r4 2004: e28d303c add r3, sp, #60 ; 0x3c 2008: e1a00007 mov r0, r7 200c: eb002c22 bl d09c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 2010: e1a00006 mov r0, r6 2014: eb0041e3 bl 127a8 if (info.sym_link.name == NULL) { 2018: 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); 201c: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 2020: 0a00000b beq 2054 * 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( 2024: e28dc028 add ip, sp, #40 ; 0x28 2028: e1a00005 mov r0, r5 202c: e1a02004 mov r2, r4 2030: e3a01004 mov r1, #4 2034: e59f3030 ldr r3, [pc, #48] ; 206c 2038: e58dc000 str ip, [sp] 203c: eb00291c bl c4b4 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2040: e3500000 cmp r0, #0 2044: 13a00000 movne r0, #0 2048: 1a000005 bne 2064 free(info.sym_link.name); 204c: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 2050: eb000189 bl 267c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 2054: eb003e0e bl 11894 <__errno> <== NOT EXECUTED 2058: e3a0300c mov r3, #12 <== NOT EXECUTED 205c: e5803000 str r3, [r0] <== NOT EXECUTED 2060: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 2064: e28dd040 add sp, sp, #64 ; 0x40 2068: e8bd80f0 pop {r4, r5, r6, r7, pc} 206c: 0000a1ff .word 0x0000a1ff 00002070 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2070: 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; 2074: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2078: e595304c ldr r3, [r5, #76] ; 0x4c 207c: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2080: e24dd01c sub sp, sp, #28 2084: e1a04001 mov r4, r1 2088: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 208c: 1a000025 bne 2128 if ( !node->info.hard_link.link_node ) 2090: e595e050 ldr lr, [r5, #80] ; 0x50 2094: e35e0000 cmp lr, #0 2098: 1a000003 bne 20ac rtems_set_errno_and_return_minus_one( EINVAL ); 209c: eb003dfc bl 11894 <__errno> <== NOT EXECUTED 20a0: e3a03016 mov r3, #22 <== NOT EXECUTED 20a4: e5803000 str r3, [r0] <== NOT EXECUTED 20a8: ea000014 b 2100 <== NOT EXECUTED the_link = *loc; 20ac: e1a07001 mov r7, r1 20b0: e8b7000f ldm r7!, {r0, r1, r2, r3} 20b4: e1a0c00d mov ip, sp 20b8: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 20bc: e28d801c add r8, sp, #28 20c0: 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; 20c4: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20c8: 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; 20cc: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20d0: eb002946 bl c5f0 /* * 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) 20d4: e5953050 ldr r3, [r5, #80] ; 0x50 20d8: e1d323b4 ldrh r2, [r3, #52] ; 0x34 20dc: e3520001 cmp r2, #1 20e0: 1a000008 bne 2108 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 20e4: e1a0100d mov r1, sp 20e8: e1a00006 mov r0, r6 20ec: e59d3008 ldr r3, [sp, #8] 20f0: e1a0e00f mov lr, pc 20f4: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 20f8: e3500000 cmp r0, #0 20fc: 0a000009 beq 2128 2100: e3e00000 mvn r0, #0 2104: ea00000c b 213c return -1; } else { node->info.hard_link.link_node->st_nlink --; 2108: e2422001 sub r2, r2, #1 210c: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 2110: e28d0014 add r0, sp, #20 2114: e3a01000 mov r1, #0 2118: eb000180 bl 2720 211c: e5953050 ldr r3, [r5, #80] ; 0x50 2120: e59d2014 ldr r2, [sp, #20] 2124: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2128: e1a00006 mov r0, r6 212c: e1a01004 mov r1, r4 2130: e5943008 ldr r3, [r4, #8] 2134: e1a0e00f mov lr, pc 2138: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 213c: e28dd01c add sp, sp, #28 2140: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00002144 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2144: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2148: e593204c ldr r2, [r3, #76] ; 0x4c 214c: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2150: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2154: 0a000002 beq 2164 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2158: eb003dcd bl 11894 <__errno> <== NOT EXECUTED 215c: e3a03014 mov r3, #20 <== NOT EXECUTED 2160: ea000004 b 2178 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 2164: e593205c ldr r2, [r3, #92] ; 0x5c 2168: e3520000 cmp r2, #0 216c: 1a000004 bne 2184 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 2170: eb003dc7 bl 11894 <__errno> <== NOT EXECUTED 2174: e3a03016 mov r3, #22 <== NOT EXECUTED 2178: e5803000 str r3, [r0] <== NOT EXECUTED 217c: e3e00000 mvn r0, #0 <== NOT EXECUTED 2180: 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; 2184: e3a00000 mov r0, #0 2188: e583005c str r0, [r3, #92] ; 0x5c return 0; } 218c: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001410 : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1410: e59f30c8 ldr r3, [pc, #200] ; 14e0 1414: e5933000 ldr r3, [r3] 1418: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 141c: e92d4070 push {r4, r5, r6, lr} 1420: e1a04000 mov r4, r0 1424: e1a05001 mov r5, r1 1428: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 142c: 11a0e00f movne lr, pc 1430: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1434: eb001dfd bl 8c30 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1438: e59f30a4 ldr r3, [pc, #164] ; 14e4 143c: e5933000 ldr r3, [r3] 1440: e3530000 cmp r3, #0 1444: 0a000006 beq 1464 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1448: e1a00004 mov r0, r4 <== NOT EXECUTED 144c: e1a01006 mov r1, r6 <== NOT EXECUTED 1450: e1a0e00f mov lr, pc <== NOT EXECUTED 1454: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1458: e0845005 add r5, r4, r5 <== NOT EXECUTED 145c: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 1460: 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 ( 1464: e59f307c ldr r3, [pc, #124] ; 14e8 1468: e5d31000 ldrb r1, [r3] 146c: e3510000 cmp r1, #0 1470: 1a000005 bne 148c !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1474: e59f3070 ldr r3, [pc, #112] ; 14ec 1478: e5d33028 ldrb r3, [r3, #40] ; 0x28 147c: e3530000 cmp r3, #0 ) { memset( heap_begin, 0, heap_size ); 1480: 11a00004 movne r0, r4 1484: 11a02005 movne r2, r5 1488: 1b002f7c blne d280 * 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 ) { 148c: e59f3054 ldr r3, [pc, #84] ; 14e8 1490: e5d33000 ldrb r3, [r3] 1494: e3530000 cmp r3, #0 1498: 1a000008 bne 14c0 void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 149c: e59f304c ldr r3, [pc, #76] ; 14f0 14a0: e1a01004 mov r1, r4 14a4: e5930000 ldr r0, [r3] 14a8: e1a02005 mov r2, r5 14ac: e3a03004 mov r3, #4 14b0: eb000ed4 bl 5008 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 14b4: e3500000 cmp r0, #0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 14b8: 0280001a addeq r0, r0, #26 14bc: 0b000cf9 bleq 48a8 } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 14c0: e59f3028 ldr r3, [pc, #40] ; 14f0 14c4: e59f4028 ldr r4, [pc, #40] ; 14f4 14c8: e5930000 ldr r0, [r3] 14cc: e5945000 ldr r5, [r4] 14d0: eb00118b bl 5b04 <_Protected_heap_Get_size> 14d4: e0800005 add r0, r0, r5 14d8: e5840000 str r0, [r4] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 14dc: e8bd8070 pop {r4, r5, r6, pc} 14e0: 000199a8 .word 0x000199a8 14e4: 000199ac .word 0x000199ac 14e8: 000199a5 .word 0x000199a5 14ec: 00018454 .word 0x00018454 14f0: 000183ac .word 0x000183ac 14f4: 00019b90 .word 0x00019b90 00003784 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 3784: 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 ) 3788: e250a000 subs sl, r0, #0 <== NOT EXECUTED 378c: 0a000043 beq 38a0 <== NOT EXECUTED return; if ( !print_handler ) 3790: e59f310c ldr r3, [pc, #268] ; 38a4 <== NOT EXECUTED 3794: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 3798: e3570000 cmp r7, #0 <== NOT EXECUTED 379c: 0a00003f beq 38a0 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 37a0: e37a0001 cmn sl, #1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 37a4: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 37a8: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 37ac: 1a000005 bne 37c8 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 37b0: e59f40f0 ldr r4, [pc, #240] ; 38a8 <== NOT EXECUTED 37b4: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 37b8: e3530000 cmp r3, #0 <== NOT EXECUTED 37bc: 13a06000 movne r6, #0 <== NOT EXECUTED 37c0: 11a0a006 movne sl, r6 <== NOT EXECUTED 37c4: 0a000035 beq 38a0 <== 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); 37c8: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 37cc: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 37d0: e2455010 sub r5, r5, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 37d4: e1a00009 mov r0, r9 <== NOT EXECUTED 37d8: e1a01005 mov r1, r5 <== NOT EXECUTED 37dc: ebffffda bl 374c <== NOT EXECUTED if ( high_water_mark ) 37e0: e2508000 subs r8, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 37e4: 10899005 addne r9, r9, r5 <== NOT EXECUTED 37e8: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 37ec: e35a0000 cmp sl, #0 <== NOT EXECUTED 37f0: e59f30ac ldr r3, [pc, #172] ; 38a4 <== NOT EXECUTED 37f4: 0a00000c beq 382c <== NOT EXECUTED (*print_handler)( 37f8: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 37fc: e28d2008 add r2, sp, #8 <== NOT EXECUTED 3800: e1a0000a mov r0, sl <== NOT EXECUTED 3804: e3a01005 mov r1, #5 <== NOT EXECUTED 3808: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 380c: eb00166b bl 91c0 <== NOT EXECUTED 3810: e1a0200a mov r2, sl <== NOT EXECUTED 3814: e1a03000 mov r3, r0 <== NOT EXECUTED 3818: e59f108c ldr r1, [pc, #140] ; 38ac <== NOT EXECUTED 381c: e1a00009 mov r0, r9 <== NOT EXECUTED 3820: e1a0e00f mov lr, pc <== NOT EXECUTED 3824: e12fff17 bx r7 <== NOT EXECUTED 3828: ea000004 b 3840 <== 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 ); 382c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3830: e59f1078 ldr r1, [pc, #120] ; 38b0 <== NOT EXECUTED 3834: e3e02000 mvn r2, #0 <== NOT EXECUTED 3838: e1a0e00f mov lr, pc <== NOT EXECUTED 383c: e12fff17 bx r7 <== NOT EXECUTED } (*print_handler)( 3840: e5943000 ldr r3, [r4] <== NOT EXECUTED 3844: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3848: e59f4054 ldr r4, [pc, #84] ; 38a4 <== NOT EXECUTED 384c: e58d6000 str r6, [sp] <== NOT EXECUTED 3850: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 3854: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3858: e0823003 add r3, r2, r3 <== NOT EXECUTED 385c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3860: e59f104c ldr r1, [pc, #76] ; 38b4 <== NOT EXECUTED 3864: e1a0e00f mov lr, pc <== NOT EXECUTED 3868: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 386c: e5943000 ldr r3, [r4] <== NOT EXECUTED 3870: e3530000 cmp r3, #0 <== NOT EXECUTED 3874: 1a000004 bne 388c <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 3878: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 387c: e59f1034 ldr r1, [pc, #52] ; 38b8 <== NOT EXECUTED 3880: e1a0e00f mov lr, pc <== NOT EXECUTED 3884: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 3888: ea000004 b 38a0 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 388c: e1a02008 mov r2, r8 <== NOT EXECUTED 3890: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3894: e59f1020 ldr r1, [pc, #32] ; 38bc <== NOT EXECUTED 3898: e1a0e00f mov lr, pc <== NOT EXECUTED 389c: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED } } 38a0: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 38a4: 0005e1b0 .word 0x0005e1b0 38a8: 00060c9c .word 0x00060c9c 38ac: 00057acd .word 0x00057acd 38b0: 00057ada .word 0x00057ada 38b4: 00057ae8 .word 0x00057ae8 38b8: 00057b06 .word 0x00057b06 38bc: 00057b13 .word 0x00057b13 0000374c : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 374c: e2800010 add r0, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 3750: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 3754: e0801001 add r1, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 3758: e59f3020 ldr r3, [pc, #32] ; 3780 <== 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++) 375c: ea000003 b 3770 <== NOT EXECUTED if (*base != U32_PATTERN) 3760: e5902000 ldr r2, [r0] <== NOT EXECUTED 3764: e1520003 cmp r2, r3 <== NOT EXECUTED 3768: 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++) 376c: e2800004 add r0, r0, #4 <== NOT EXECUTED 3770: e1500001 cmp r0, r1 <== NOT EXECUTED 3774: 3afffff9 bcc 3760 <== NOT EXECUTED 3778: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 377c: e12fff1e bx lr <== NOT EXECUTED 3780: a5a5a5a5 .word 0xa5a5a5a5 00005294 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5294: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 5298: e1a04001 mov r4, r1 529c: e1a06000 mov r6, r0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 52a0: e1a0100d mov r1, sp 52a4: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 52a8: e1a08002 mov r8, r2 52ac: e20370ff and r7, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 52b0: eb00006f bl 5474 <_POSIX_Mutex_Get> 52b4: e3500000 cmp r0, #0 52b8: 0a000032 beq 5388 <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 52bc: e59f30d0 ldr r3, [pc, #208] ; 5394 <_POSIX_Condition_variables_Wait_support+0x100> 52c0: e5932000 ldr r2, [r3] 52c4: e2422001 sub r2, r2, #1 52c8: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 52cc: e1a0100d mov r1, sp 52d0: e1a00006 mov r0, r6 52d4: ebffff7c bl 50cc <_POSIX_Condition_variables_Get> switch ( location ) { 52d8: e59d3000 ldr r3, [sp] 52dc: e3530000 cmp r3, #0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 52e0: e1a0a000 mov sl, r0 switch ( location ) { 52e4: 1a000027 bne 5388 <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 52e8: e5903014 ldr r3, [r0, #20] 52ec: e3530000 cmp r3, #0 52f0: 0a000004 beq 5308 <_POSIX_Condition_variables_Wait_support+0x74> 52f4: e5942000 ldr r2, [r4] 52f8: e1530002 cmp r3, r2 52fc: 0a000001 beq 5308 <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch(); 5300: eb000baa bl 81b0 <_Thread_Enable_dispatch> 5304: ea00001f b 5388 <_POSIX_Condition_variables_Wait_support+0xf4> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 5308: e1a00004 mov r0, r4 530c: eb0000de bl 568c _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 5310: e3570000 cmp r7, #0 5314: 1a000015 bne 5370 <_POSIX_Condition_variables_Wait_support+0xdc> the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5318: e59f5078 ldr r5, [pc, #120] ; 5398 <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 531c: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5320: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 5324: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5328: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 532c: e5961000 ldr r1, [r6] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 5330: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 5334: e5831020 str r1, [r3, #32] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 5338: e3a01001 mov r1, #1 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 533c: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 5340: e1a00002 mov r0, r2 5344: e58a1048 str r1, [sl, #72] ; 0x48 5348: e59f204c ldr r2, [pc, #76] ; 539c <_POSIX_Condition_variables_Wait_support+0x108> 534c: e1a01008 mov r1, r8 5350: eb000ccf bl 8694 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 5354: eb000b95 bl 81b0 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 5358: e5953000 ldr r3, [r5] 535c: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 5360: e3550074 cmp r5, #116 ; 0x74 5364: 13550000 cmpne r5, #0 5368: 0a000002 beq 5378 <_POSIX_Condition_variables_Wait_support+0xe4> 536c: ea000006 b 538c <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 5370: eb000b8e bl 81b0 <_Thread_Enable_dispatch> 5374: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 5378: e1a00004 mov r0, r4 537c: eb0000a3 bl 5610 if ( mutex_status ) 5380: e3500000 cmp r0, #0 5384: 0a000000 beq 538c <_POSIX_Condition_variables_Wait_support+0xf8> 5388: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 538c: e1a00005 mov r0, r5 5390: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} 5394: 0001c6ac .word 0x0001c6ac 5398: 0001c760 .word 0x0001c760 539c: 00008a40 .word 0x00008a40 00006660 <_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 ) { 6660: 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; 6664: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6668: e281503c add r5, r1, #60 ; 0x3c 666c: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 6670: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 6674: 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 ) ) 6678: 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 ]; 667c: 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; 6680: e581503c str r5, [r1, #60] ; 0x3c 6684: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 6688: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 668c: 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 ]; 6690: 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; 6694: 159f8154 ldrne r8, [pc, #340] ; 67f0 <_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 ) ) 6698: 1a000023 bne 672c <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 669c: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 66a0: e10f5000 mrs r5, CPSR 66a4: e3854080 orr r4, r5, #128 ; 0x80 66a8: 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; 66ac: e3e06000 mvn r6, #0 66b0: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 66b4: ea00000b b 66e8 <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 66b8: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 66bc: e1530006 cmp r3, r6 66c0: 9a00000a bls 66f0 <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 66c4: e10fa000 mrs sl, CPSR 66c8: e129f005 msr CPSR_fc, r5 66cc: 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) ) { 66d0: e594a010 ldr sl, [r4, #16] 66d4: e117000a tst r7, sl 66d8: 1a000001 bne 66e4 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 66dc: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 66e0: eaffffee b 66a0 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 66e4: 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 ) ) { 66e8: e1540008 cmp r4, r8 66ec: 1afffff1 bne 66b8 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 66f0: e590c030 ldr ip, [r0, #48] ; 0x30 66f4: 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 ) ) { 66f8: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 66fc: 1a000038 bne 67e4 <_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 ) 6700: 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; 6704: e3a03000 mov r3, #0 6708: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 670c: 0a00002a beq 67bc <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 6710: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6714: e5814000 str r4, [r1] the_node->previous = previous_node; 6718: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 671c: 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; 6720: e5831000 str r1, [r3] search_node->previous = the_node; 6724: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6728: ea000021 b 67b4 <_Thread_queue_Enqueue_priority+0x154> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 672c: e5d86000 ldrb r6, [r8] 6730: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6734: e10f5000 mrs r5, CPSR 6738: e3854080 orr r4, r5, #128 ; 0x80 673c: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6740: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6744: ea00000b b 6778 <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 6748: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 674c: e1530006 cmp r3, r6 6750: 2a00000a bcs 6780 <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 6754: e10fa000 mrs sl, CPSR 6758: e129f005 msr CPSR_fc, r5 675c: 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) ) { 6760: e594a010 ldr sl, [r4, #16] 6764: e117000a tst r7, sl 6768: 1a000001 bne 6774 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 676c: e129f005 msr CPSR_fc, r5 6770: eaffffed b 672c <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 6774: 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 ) ) { 6778: e154000c cmp r4, ip 677c: 1afffff1 bne 6748 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6780: e590c030 ldr ip, [r0, #48] ; 0x30 6784: 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 ) ) { 6788: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 678c: 1a000014 bne 67e4 <_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 ) 6790: 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; 6794: e3a03000 mov r3, #0 6798: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 679c: 0a000006 beq 67bc <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 67a0: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 67a4: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 67a8: 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; 67ac: e5841000 str r1, [r4] next_node->previous = the_node; 67b0: e5831004 str r1, [r3, #4] 67b4: e129f005 msr CPSR_fc, r5 67b8: ea000007 b 67dc <_Thread_queue_Enqueue_priority+0x17c> 67bc: 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; 67c0: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 67c4: e5814000 str r4, [r1] the_node->previous = previous_node; 67c8: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 67cc: 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; 67d0: e5831000 str r1, [r3] search_node->previous = the_node; 67d4: e5841004 str r1, [r4, #4] 67d8: e129f00c msr CPSR_fc, ip 67dc: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 67e0: 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; 67e4: e582c000 str ip, [r2] return the_thread_queue->sync_state; 67e8: e5900030 ldr r0, [r0, #48] ; 0x30 } 67ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 67f0: 00018450 .word 0x00018450 00013cec <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13cec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13cf0: e24dd020 sub sp, sp, #32 13cf4: e28d3014 add r3, sp, #20 13cf8: 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; 13cfc: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 13d00: e283a004 add sl, r3, #4 13d04: 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); 13d08: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d0c: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d10: e2803040 add r3, r0, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d14: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; 13d18: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d1c: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; 13d20: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); 13d24: e58d5010 str r5, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d28: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d2c: e58d3000 str r3, [sp] * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13d30: e1a04000 mov r4, r0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d34: 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 ); 13d38: 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; 13d3c: e28d2014 add r2, sp, #20 13d40: 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; 13d44: e59f2168 ldr r2, [pc, #360] ; 13eb4 <_Timer_server_Body+0x1c8> 13d48: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 13d4c: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d50: e1a02005 mov r2, r5 13d54: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 13d58: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d5c: e1a0000b mov r0, fp 13d60: eb001049 bl 17e8c <_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(); 13d64: e59f314c ldr r3, [pc, #332] ; 13eb8 <_Timer_server_Body+0x1cc> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 13d68: 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(); 13d6c: 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 ) { 13d70: e1560002 cmp r6, r2 13d74: 9a000004 bls 13d8c <_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 ); 13d78: e0621006 rsb r1, r2, r6 13d7c: e1a00007 mov r0, r7 13d80: e1a02005 mov r2, r5 13d84: eb001040 bl 17e8c <_Watchdog_Adjust_to_chain> 13d88: ea000003 b 13d9c <_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 ); 13d8c: 30662002 rsbcc r2, r6, r2 13d90: 31a00007 movcc r0, r7 13d94: 33a01001 movcc r1, #1 13d98: 3b001013 blcc 17dec <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 13d9c: 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 ); 13da0: e5940078 ldr r0, [r4, #120] ; 0x78 13da4: eb00023b bl 14698 <_Chain_Get> if ( timer == NULL ) { 13da8: e2501000 subs r1, r0, #0 13dac: 0a00000a beq 13ddc <_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 ) { 13db0: e5913038 ldr r3, [r1, #56] ; 0x38 13db4: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 13db8: 02811010 addeq r1, r1, #16 13dbc: 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 ) { 13dc0: 0a000003 beq 13dd4 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 13dc4: e3530003 cmp r3, #3 13dc8: 1afffff4 bne 13da0 <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 13dcc: e2811010 add r1, r1, #16 13dd0: e1a00007 mov r0, r7 13dd4: eb001059 bl 17f40 <_Watchdog_Insert> 13dd8: eafffff0 b 13da0 <_Timer_server_Body+0xb4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13ddc: e10f3000 mrs r3, CPSR 13de0: e3832080 orr r2, r3, #128 ; 0x80 13de4: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 13de8: e59d2014 ldr r2, [sp, #20] 13dec: e152000a cmp r2, sl 13df0: 1a000005 bne 13e0c <_Timer_server_Body+0x120> ts->insert_chain = NULL; 13df4: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13df8: 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 ) ) { 13dfc: e59d3008 ldr r3, [sp, #8] 13e00: e1530008 cmp r3, r8 13e04: 1a000002 bne 13e14 <_Timer_server_Body+0x128> 13e08: ea000015 b 13e64 <_Timer_server_Body+0x178> 13e0c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 13e10: eaffffcb b 13d44 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13e14: e10f2000 mrs r2, CPSR 13e18: e3823080 orr r3, r2, #128 ; 0x80 13e1c: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 13e20: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 13e24: e1530008 cmp r3, r8 13e28: 0a00000b beq 13e5c <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 13e2c: 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 ) { 13e30: e3530000 cmp r3, #0 the_chain->first = new_first; 13e34: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); 13e38: e5815004 str r5, [r1, #4] 13e3c: 0a000006 beq 13e5c <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 13e40: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13e44: 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 ); 13e48: e2830020 add r0, r3, #32 13e4c: e8900003 ldm r0, {r0, r1} 13e50: e1a0e00f mov lr, pc 13e54: e593f01c ldr pc, [r3, #28] } 13e58: eaffffed b 13e14 <_Timer_server_Body+0x128> 13e5c: e129f002 msr CPSR_fc, r2 13e60: eaffffb5 b 13d3c <_Timer_server_Body+0x50> } else { ts->active = false; 13e64: e5c4907c strb r9, [r4, #124] ; 0x7c 13e68: e59f304c ldr r3, [pc, #76] ; 13ebc <_Timer_server_Body+0x1d0> 13e6c: e5932000 ldr r2, [r3] 13e70: e2822001 add r2, r2, #1 13e74: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 13e78: e3a01008 mov r1, #8 13e7c: e5940000 ldr r0, [r4] 13e80: eb000d7d bl 1747c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 13e84: e1a00004 mov r0, r4 13e88: ebffff6b bl 13c3c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 13e8c: e1a00004 mov r0, r4 13e90: ebffff7f bl 13c94 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 13e94: eb000adf bl 16a18 <_Thread_Enable_dispatch> ts->active = true; 13e98: e3a03001 mov r3, #1 13e9c: 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 ); 13ea0: e59d0004 ldr r0, [sp, #4] 13ea4: eb00107e bl 180a4 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13ea8: e59d0000 ldr r0, [sp] 13eac: eb00107c bl 180a4 <_Watchdog_Remove> 13eb0: eaffffa1 b 13d3c <_Timer_server_Body+0x50> 13eb4: 00039384 .word 0x00039384 13eb8: 000392b4 .word 0x000392b4 13ebc: 0003922c .word 0x0003922c 00017ac8 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 17ac8: e1a04000 mov r4, r0 17acc: eb000227 bl 18370 <___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(); 17ad0: ebffffe0 bl 17a58 rtems_shutdown_executive(status); 17ad4: e1a00004 mov r0, r4 17ad8: eb00003b bl 17bcc 17adc: eafffffe b 17adc <_exit+0x14> <== NOT EXECUTED 00033800 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 33800: e1a00001 mov r0, r1 <== NOT EXECUTED 33804: e1a01002 mov r1, r2 <== NOT EXECUTED 33808: e1a02003 mov r2, r3 <== NOT EXECUTED 3380c: eaffff8b b 33640 <== NOT EXECUTED 0000b42c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } b42c: e3a00001 mov r0, #1 <== NOT EXECUTED b430: e12fff1e bx lr <== NOT EXECUTED 00008964 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 8964: eaffffe8 b 890c <== NOT EXECUTED 00022e48 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 22e48: e1a00001 mov r0, r1 <== NOT EXECUTED 22e4c: e1a01002 mov r1, r2 <== NOT EXECUTED 22e50: eaffff68 b 22bf8 <== NOT EXECUTED 00023044 <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 23044: e1a00001 mov r0, r1 <== NOT EXECUTED 23048: e1a01002 mov r1, r2 <== NOT EXECUTED 2304c: eaffffc4 b 22f64 <== NOT EXECUTED 00017bb0 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 17bb0: e1a00001 mov r0, r1 <== NOT EXECUTED 17bb4: e1a01002 mov r1, r2 <== NOT EXECUTED 17bb8: ea00000e b 17bf8 <== NOT EXECUTED 00052c9c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 52c9c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 52ca0: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 52ca4: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 52ca8: e1a05001 mov r5, r1 <== NOT EXECUTED 52cac: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 52cb0: ebfec8d7 bl 5014 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 52cb4: e2507000 subs r7, r0, #0 <== NOT EXECUTED 52cb8: 1a000019 bne 52d24 <_rename_r+0x88> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 52cbc: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 52cc0: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 52cc4: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 52cc8: 0a000001 beq 52cd4 <_rename_r+0x38> <== NOT EXECUTED 52ccc: e3530000 cmp r3, #0 <== NOT EXECUTED 52cd0: 1a000009 bne 52cfc <_rename_r+0x60> <== NOT EXECUTED 52cd4: e59f33ac ldr r3, [pc, #940] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52cd8: e593e000 ldr lr, [r3] <== NOT EXECUTED 52cdc: e28ee018 add lr, lr, #24 <== NOT EXECUTED 52ce0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52ce4: e28dc018 add ip, sp, #24 <== NOT EXECUTED 52ce8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52cec: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52cf0: e3a04000 mov r4, #0 <== NOT EXECUTED 52cf4: e58c3000 str r3, [ip] <== NOT EXECUTED 52cf8: ea000013 b 52d4c <_rename_r+0xb0> <== NOT EXECUTED 52cfc: e59f3384 ldr r3, [pc, #900] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52d00: e593e000 ldr lr, [r3] <== NOT EXECUTED 52d04: e28ee004 add lr, lr, #4 <== NOT EXECUTED 52d08: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52d0c: e28dc018 add ip, sp, #24 <== NOT EXECUTED 52d10: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52d14: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52d18: e1a04007 mov r4, r7 <== NOT EXECUTED 52d1c: e58c3000 str r3, [ip] <== NOT EXECUTED 52d20: ea000009 b 52d4c <_rename_r+0xb0> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 52d24: e3a0c000 mov ip, #0 <== NOT EXECUTED 52d28: e1a00005 mov r0, r5 <== NOT EXECUTED 52d2c: e1a01007 mov r1, r7 <== NOT EXECUTED 52d30: e3a02002 mov r2, #2 <== NOT EXECUTED 52d34: e28d3018 add r3, sp, #24 <== NOT EXECUTED 52d38: e58dc000 str ip, [sp] <== NOT EXECUTED 52d3c: ebfec8fc bl 5134 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 52d40: e3500000 cmp r0, #0 <== NOT EXECUTED 52d44: 03a04001 moveq r4, #1 <== NOT EXECUTED 52d48: 1a000025 bne 52de4 <_rename_r+0x148> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 52d4c: e28de018 add lr, sp, #24 <== NOT EXECUTED 52d50: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52d54: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 52d58: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52d5c: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 52d60: e0855007 add r5, r5, r7 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 52d64: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 52d68: e1a00005 mov r0, r5 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 52d6c: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 52d70: ebffb35e bl 3faf0 <== NOT EXECUTED 52d74: e1a01000 mov r1, r0 <== NOT EXECUTED 52d78: e1a00005 mov r0, r5 <== NOT EXECUTED 52d7c: ebfec898 bl 4fe4 <== NOT EXECUTED 52d80: e0855000 add r5, r5, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 52d84: e1a00005 mov r0, r5 <== NOT EXECUTED * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 52d88: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 52d8c: ebffb357 bl 3faf0 <== NOT EXECUTED 52d90: e3a0c000 mov ip, #0 <== NOT EXECUTED 52d94: e1a01000 mov r1, r0 <== NOT EXECUTED 52d98: e1a0200c mov r2, ip <== NOT EXECUTED 52d9c: e1a00005 mov r0, r5 <== NOT EXECUTED 52da0: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED 52da4: e58dc000 str ip, [sp] <== NOT EXECUTED 52da8: ebfec8a9 bl 5054 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 52dac: e2505000 subs r5, r0, #0 <== NOT EXECUTED 52db0: 0a00000d beq 52dec <_rename_r+0x150> <== NOT EXECUTED if ( free_old_parentloc ) 52db4: e3540000 cmp r4, #0 <== NOT EXECUTED 52db8: 0a000007 beq 52ddc <_rename_r+0x140> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52dbc: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52dc0: e3530000 cmp r3, #0 <== NOT EXECUTED 52dc4: 0a000004 beq 52ddc <_rename_r+0x140> <== NOT EXECUTED 52dc8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52dcc: e3530000 cmp r3, #0 <== NOT EXECUTED 52dd0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52dd4: 11a0e00f movne lr, pc <== NOT EXECUTED 52dd8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 52ddc: ebff98b8 bl 390c4 <__errno> <== NOT EXECUTED 52de0: e5805000 str r5, [r0] <== NOT EXECUTED 52de4: e3e06000 mvn r6, #0 <== NOT EXECUTED 52de8: ea0000a3 b 5307c <_rename_r+0x3e0> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 52dec: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 52df0: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 52df4: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 52df8: 13a05000 movne r5, #0 <== NOT EXECUTED 52dfc: 03a05001 moveq r5, #1 <== NOT EXECUTED 52e00: 0a000001 beq 52e0c <_rename_r+0x170> <== NOT EXECUTED 52e04: e3530000 cmp r3, #0 <== NOT EXECUTED 52e08: 1a000009 bne 52e34 <_rename_r+0x198> <== NOT EXECUTED 52e0c: e59f3274 ldr r3, [pc, #628] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52e10: e593e000 ldr lr, [r3] <== NOT EXECUTED 52e14: e28ee018 add lr, lr, #24 <== NOT EXECUTED 52e18: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52e1c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 52e20: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52e24: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52e28: e3a00001 mov r0, #1 <== NOT EXECUTED 52e2c: e58c3000 str r3, [ip] <== NOT EXECUTED 52e30: ea000008 b 52e58 <_rename_r+0x1bc> <== NOT EXECUTED 52e34: e59f324c ldr r3, [pc, #588] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52e38: e593e000 ldr lr, [r3] <== NOT EXECUTED 52e3c: e28ee004 add lr, lr, #4 <== NOT EXECUTED 52e40: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52e44: e28dc004 add ip, sp, #4 <== NOT EXECUTED 52e48: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52e4c: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52e50: e58c3000 str r3, [ip] <== NOT EXECUTED 52e54: e1a00005 mov r0, r5 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 52e58: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52e5c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 52e60: e3530000 cmp r3, #0 <== NOT EXECUTED 52e64: 0a00004d beq 52fa0 <_rename_r+0x304> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 52e68: e28d5004 add r5, sp, #4 <== NOT EXECUTED 52e6c: e0860000 add r0, r6, r0 <== NOT EXECUTED 52e70: e1a01005 mov r1, r5 <== NOT EXECUTED 52e74: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 52e78: e1a0e00f mov lr, pc <== NOT EXECUTED 52e7c: e12fff13 bx r3 <== NOT EXECUTED if ( result != 0 ) { 52e80: e2506000 subs r6, r0, #0 <== NOT EXECUTED 52e84: 0a00001c beq 52efc <_rename_r+0x260> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 52e88: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52e8c: e3530000 cmp r3, #0 <== NOT EXECUTED 52e90: 0a000004 beq 52ea8 <_rename_r+0x20c> <== NOT EXECUTED 52e94: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52e98: e3530000 cmp r3, #0 <== NOT EXECUTED 52e9c: 11a00005 movne r0, r5 <== NOT EXECUTED 52ea0: 11a0e00f movne lr, pc <== NOT EXECUTED 52ea4: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 52ea8: e3540000 cmp r4, #0 <== NOT EXECUTED 52eac: 0a000007 beq 52ed0 <_rename_r+0x234> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52eb0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52eb4: e3530000 cmp r3, #0 <== NOT EXECUTED 52eb8: 0a000004 beq 52ed0 <_rename_r+0x234> <== NOT EXECUTED 52ebc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52ec0: e3530000 cmp r3, #0 <== NOT EXECUTED 52ec4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52ec8: 11a0e00f movne lr, pc <== NOT EXECUTED 52ecc: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 52ed0: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52ed4: e3530000 cmp r3, #0 <== NOT EXECUTED 52ed8: 0a000004 beq 52ef0 <_rename_r+0x254> <== NOT EXECUTED 52edc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52ee0: e3530000 cmp r3, #0 <== NOT EXECUTED 52ee4: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52ee8: 11a0e00f movne lr, pc <== NOT EXECUTED 52eec: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 52ef0: ebff9873 bl 390c4 <__errno> <== NOT EXECUTED 52ef4: e5806000 str r6, [r0] <== NOT EXECUTED 52ef8: eaffffb9 b 52de4 <_rename_r+0x148> <== NOT EXECUTED /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 52efc: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 52f00: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 52f04: e1520003 cmp r2, r3 <== NOT EXECUTED 52f08: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52f0c: 0a00001b beq 52f80 <_rename_r+0x2e4> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 52f10: e3530000 cmp r3, #0 <== NOT EXECUTED 52f14: 0a000004 beq 52f2c <_rename_r+0x290> <== NOT EXECUTED 52f18: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f1c: e3530000 cmp r3, #0 <== NOT EXECUTED 52f20: 11a00005 movne r0, r5 <== NOT EXECUTED 52f24: 11a0e00f movne lr, pc <== NOT EXECUTED 52f28: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 52f2c: e3540000 cmp r4, #0 <== NOT EXECUTED 52f30: 0a000007 beq 52f54 <_rename_r+0x2b8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52f34: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52f38: e3530000 cmp r3, #0 <== NOT EXECUTED 52f3c: 0a000004 beq 52f54 <_rename_r+0x2b8> <== NOT EXECUTED 52f40: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f44: e3530000 cmp r3, #0 <== NOT EXECUTED 52f48: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52f4c: 11a0e00f movne lr, pc <== NOT EXECUTED 52f50: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 52f54: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52f58: e3530000 cmp r3, #0 <== NOT EXECUTED 52f5c: 0a000004 beq 52f74 <_rename_r+0x2d8> <== NOT EXECUTED 52f60: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f64: e3530000 cmp r3, #0 <== NOT EXECUTED 52f68: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52f6c: 11a0e00f movne lr, pc <== NOT EXECUTED 52f70: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 52f74: ebff9852 bl 390c4 <__errno> <== NOT EXECUTED 52f78: e3a03012 mov r3, #18 <== NOT EXECUTED 52f7c: ea00001b b 52ff0 <_rename_r+0x354> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 52f80: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 52f84: e35c0000 cmp ip, #0 <== NOT EXECUTED 52f88: 1a00001a bne 52ff8 <_rename_r+0x35c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 52f8c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f90: e3530000 cmp r3, #0 <== NOT EXECUTED 52f94: 11a00005 movne r0, r5 <== NOT EXECUTED 52f98: 11a0e00f movne lr, pc <== NOT EXECUTED 52f9c: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 52fa0: e3540000 cmp r4, #0 <== NOT EXECUTED 52fa4: 0a000007 beq 52fc8 <_rename_r+0x32c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52fa8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52fac: e3530000 cmp r3, #0 <== NOT EXECUTED 52fb0: 0a000004 beq 52fc8 <_rename_r+0x32c> <== NOT EXECUTED 52fb4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52fb8: e3530000 cmp r3, #0 <== NOT EXECUTED 52fbc: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52fc0: 11a0e00f movne lr, pc <== NOT EXECUTED 52fc4: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 52fc8: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52fcc: e3530000 cmp r3, #0 <== NOT EXECUTED 52fd0: 0a000004 beq 52fe8 <_rename_r+0x34c> <== NOT EXECUTED 52fd4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52fd8: e3530000 cmp r3, #0 <== NOT EXECUTED 52fdc: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52fe0: 11a0e00f movne lr, pc <== NOT EXECUTED 52fe4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 52fe8: ebff9835 bl 390c4 <__errno> <== NOT EXECUTED 52fec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 52ff0: e5803000 str r3, [r0] <== NOT EXECUTED 52ff4: eaffff7a b 52de4 <_rename_r+0x148> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 52ff8: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 52ffc: e28d0018 add r0, sp, #24 <== NOT EXECUTED 53000: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 53004: e1a02005 mov r2, r5 <== NOT EXECUTED 53008: e1a0e00f mov lr, pc <== NOT EXECUTED 5300c: e12fff1c bx ip <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 53010: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 53014: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 53018: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 5301c: 0a000004 beq 53034 <_rename_r+0x398> <== NOT EXECUTED 53020: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 53024: e3530000 cmp r3, #0 <== NOT EXECUTED 53028: 11a00005 movne r0, r5 <== NOT EXECUTED 5302c: 11a0e00f movne lr, pc <== NOT EXECUTED 53030: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 53034: e3540000 cmp r4, #0 <== NOT EXECUTED 53038: 0a000007 beq 5305c <_rename_r+0x3c0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5303c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 53040: e3530000 cmp r3, #0 <== NOT EXECUTED 53044: 0a000004 beq 5305c <_rename_r+0x3c0> <== NOT EXECUTED 53048: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5304c: e3530000 cmp r3, #0 <== NOT EXECUTED 53050: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 53054: 11a0e00f movne lr, pc <== NOT EXECUTED 53058: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 5305c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 53060: e3530000 cmp r3, #0 <== NOT EXECUTED 53064: 0a000004 beq 5307c <_rename_r+0x3e0> <== NOT EXECUTED 53068: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5306c: e3530000 cmp r3, #0 <== NOT EXECUTED 53070: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 53074: 11a0e00f movne lr, pc <== NOT EXECUTED 53078: 112fff13 bxne r3 <== NOT EXECUTED return result; } 5307c: e1a00006 mov r0, r6 <== NOT EXECUTED 53080: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 53084: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 53088: 000534b8 .word 0x000534b8 000068e0 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 68e0: e1a00001 mov r0, r1 <== NOT EXECUTED 68e4: e1a01002 mov r1, r2 <== NOT EXECUTED 68e8: eaffffc4 b 6800 <== NOT EXECUTED 0000c388 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); c388: e1a00001 mov r0, r1 <== NOT EXECUTED c38c: eaffff5c b c104 <== NOT EXECUTED 000219b4 : #include int chdir( const char *pathname ) { 219b4: e92d4030 push {r4, r5, lr} 219b8: e24dd018 sub sp, sp, #24 219bc: e1a05000 mov r5, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 219c0: eb00784a bl 3faf0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 219c4: e28d4004 add r4, sp, #4 219c8: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 219cc: e1a01000 mov r1, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 219d0: e1a0200c mov r2, ip 219d4: e1a00005 mov r0, r5 219d8: e1a03004 mov r3, r4 219dc: e58dc000 str ip, [sp] 219e0: ebff8dd3 bl 5134 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 219e4: e3500000 cmp r0, #0 219e8: 1a00000b bne 21a1c /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 219ec: e59d2010 ldr r2, [sp, #16] 219f0: e5923010 ldr r3, [r2, #16] 219f4: e3530000 cmp r3, #0 219f8: 1a000009 bne 21a24 rtems_filesystem_freenode( &loc ); 219fc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21a00: e3530000 cmp r3, #0 <== NOT EXECUTED 21a04: 11a00004 movne r0, r4 <== NOT EXECUTED 21a08: 11a0e00f movne lr, pc <== NOT EXECUTED 21a0c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21a10: eb005dab bl 390c4 <__errno> <== NOT EXECUTED 21a14: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21a18: e5803000 str r3, [r0] 21a1c: e3e00000 mvn r0, #0 21a20: ea000022 b 21ab0 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 21a24: e1a00004 mov r0, r4 21a28: e1a0e00f mov lr, pc 21a2c: e12fff13 bx r3 21a30: e3500001 cmp r0, #1 21a34: 0a00000a beq 21a64 rtems_filesystem_freenode( &loc ); 21a38: e59d3010 ldr r3, [sp, #16] 21a3c: e3530000 cmp r3, #0 21a40: 0a000004 beq 21a58 21a44: e593301c ldr r3, [r3, #28] 21a48: e3530000 cmp r3, #0 21a4c: 11a00004 movne r0, r4 21a50: 11a0e00f movne lr, pc 21a54: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 21a58: eb005d99 bl 390c4 <__errno> 21a5c: e3a03014 mov r3, #20 21a60: eaffffec b 21a18 } rtems_filesystem_freenode( &rtems_filesystem_current ); 21a64: e59f304c ldr r3, [pc, #76] ; 21ab8 21a68: e5930000 ldr r0, [r3] 21a6c: e5903010 ldr r3, [r0, #16] 21a70: e3530000 cmp r3, #0 21a74: 0a000004 beq 21a8c 21a78: e593301c ldr r3, [r3, #28] 21a7c: e3530000 cmp r3, #0 21a80: 12800004 addne r0, r0, #4 21a84: 11a0e00f movne lr, pc 21a88: 112fff13 bxne r3 rtems_filesystem_current = loc; 21a8c: e59f3024 ldr r3, [pc, #36] ; 21ab8 21a90: e28d4004 add r4, sp, #4 21a94: e593c000 ldr ip, [r3] 21a98: e8b4000f ldm r4!, {r0, r1, r2, r3} 21a9c: e28cc004 add ip, ip, #4 21aa0: e8ac000f stmia ip!, {r0, r1, r2, r3} 21aa4: e5943000 ldr r3, [r4] 21aa8: e58c3000 str r3, [ip] 21aac: e3a00000 mov r0, #0 return 0; } 21ab0: e28dd018 add sp, sp, #24 21ab4: e8bd8030 pop {r4, r5, pc} 21ab8: 000534b8 .word 0x000534b8 00004e4c : int chmod( const char *path, mode_t mode ) { 4e4c: e92d4070 push {r4, r5, r6, lr} 4e50: e24dd018 sub sp, sp, #24 4e54: e1a05001 mov r5, r1 4e58: 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 ); 4e5c: eb00eb23 bl 3faf0 4e60: e28d4004 add r4, sp, #4 4e64: e1a01000 mov r1, r0 4e68: e3a0c001 mov ip, #1 4e6c: e1a00006 mov r0, r6 4e70: e3a02000 mov r2, #0 4e74: e1a03004 mov r3, r4 4e78: e58dc000 str ip, [sp] 4e7c: eb0000ac bl 5134 if ( status != 0 ) 4e80: e3500000 cmp r0, #0 4e84: 1a00000d bne 4ec0 return -1; if ( !loc.handlers ){ 4e88: e59d300c ldr r3, [sp, #12] 4e8c: e3530000 cmp r3, #0 4e90: 1a00000c bne 4ec8 rtems_filesystem_freenode( &loc ); 4e94: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4e98: e3530000 cmp r3, #0 <== NOT EXECUTED 4e9c: 0a000004 beq 4eb4 <== NOT EXECUTED 4ea0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4ea4: e3530000 cmp r3, #0 <== NOT EXECUTED 4ea8: 11a00004 movne r0, r4 <== NOT EXECUTED 4eac: 11a0e00f movne lr, pc <== NOT EXECUTED 4eb0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4eb4: eb00d082 bl 390c4 <__errno> <== NOT EXECUTED 4eb8: e3a03009 mov r3, #9 <== NOT EXECUTED 4ebc: e5803000 str r3, [r0] <== NOT EXECUTED 4ec0: e3e05000 mvn r5, #0 4ec4: ea00001a b 4f34 } if ( !loc.handlers->fchmod_h ){ 4ec8: e593301c ldr r3, [r3, #28] 4ecc: e3530000 cmp r3, #0 4ed0: 1a00000a bne 4f00 rtems_filesystem_freenode( &loc ); 4ed4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4ed8: e3530000 cmp r3, #0 <== NOT EXECUTED 4edc: 0a000004 beq 4ef4 <== NOT EXECUTED 4ee0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4ee4: e3530000 cmp r3, #0 <== NOT EXECUTED 4ee8: 11a00004 movne r0, r4 <== NOT EXECUTED 4eec: 11a0e00f movne lr, pc <== NOT EXECUTED 4ef0: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4ef4: eb00d072 bl 390c4 <__errno> <== NOT EXECUTED 4ef8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4efc: eaffffee b 4ebc <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4f00: e1a01005 mov r1, r5 4f04: e1a00004 mov r0, r4 4f08: e1a0e00f mov lr, pc 4f0c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 4f10: e59d3010 ldr r3, [sp, #16] 4f14: 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 ); 4f18: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 4f1c: 0a000004 beq 4f34 4f20: e593301c ldr r3, [r3, #28] 4f24: e3530000 cmp r3, #0 4f28: 11a00004 movne r0, r4 4f2c: 11a0e00f movne lr, pc 4f30: 112fff13 bxne r3 return result; } 4f34: e1a00005 mov r0, r5 4f38: e28dd018 add sp, sp, #24 4f3c: e8bd8070 pop {r4, r5, r6, pc} 00021abc : int chown( const char *path, uid_t owner, gid_t group ) { 21abc: e92d40f0 push {r4, r5, r6, r7, lr} 21ac0: e1a01801 lsl r1, r1, #16 21ac4: e24dd018 sub sp, sp, #24 21ac8: e1a02802 lsl r2, r2, #16 21acc: e1a06821 lsr r6, r1, #16 21ad0: e1a05822 lsr r5, r2, #16 21ad4: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 21ad8: eb007804 bl 3faf0 21adc: e28d4004 add r4, sp, #4 21ae0: e1a01000 mov r1, r0 21ae4: e3a0c001 mov ip, #1 21ae8: e1a00007 mov r0, r7 21aec: e3a02000 mov r2, #0 21af0: e1a03004 mov r3, r4 21af4: e58dc000 str ip, [sp] 21af8: ebff8d8d bl 5134 21afc: e3500000 cmp r0, #0 21b00: 1a00000b bne 21b34 return -1; if ( !loc.ops->chown_h ) { 21b04: e59d2010 ldr r2, [sp, #16] 21b08: e5923018 ldr r3, [r2, #24] 21b0c: e3530000 cmp r3, #0 21b10: 1a000009 bne 21b3c rtems_filesystem_freenode( &loc ); 21b14: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21b18: e3530000 cmp r3, #0 <== NOT EXECUTED 21b1c: 11a00004 movne r0, r4 <== NOT EXECUTED 21b20: 11a0e00f movne lr, pc <== NOT EXECUTED 21b24: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21b28: eb005d65 bl 390c4 <__errno> <== NOT EXECUTED 21b2c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21b30: e5803000 str r3, [r0] <== NOT EXECUTED 21b34: e3e05000 mvn r5, #0 21b38: ea00000d b 21b74 } result = (*loc.ops->chown_h)( &loc, owner, group ); 21b3c: e1a02005 mov r2, r5 21b40: e1a01006 mov r1, r6 21b44: e1a00004 mov r0, r4 21b48: e1a0e00f mov lr, pc 21b4c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 21b50: e59d3010 ldr r3, [sp, #16] 21b54: 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 ); 21b58: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 21b5c: 0a000004 beq 21b74 21b60: e593301c ldr r3, [r3, #28] 21b64: e3530000 cmp r3, #0 21b68: 11a00004 movne r0, r4 21b6c: 11a0e00f movne lr, pc 21b70: 112fff13 bxne r3 return result; } 21b74: e1a00005 mov r0, r5 21b78: e28dd018 add sp, sp, #24 21b7c: e8bd80f0 pop {r4, r5, r6, r7, pc} 00021b80 : #include int chroot( const char *pathname ) { 21b80: 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) { 21b84: e59f50d4 ldr r5, [pc, #212] ; 21c60 21b88: e59f30d4 ldr r3, [pc, #212] ; 21c64 21b8c: e5954000 ldr r4, [r5] 21b90: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 21b94: e24dd018 sub sp, sp, #24 21b98: 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) { 21b9c: 1a000007 bne 21bc0 rtems_libio_set_private_env(); /* try to set a new private env*/ 21ba0: eb0005dc bl 23318 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 21ba4: e5953000 ldr r3, [r5] 21ba8: e1530004 cmp r3, r4 21bac: 1a000003 bne 21bc0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 21bb0: eb005d43 bl 390c4 <__errno> <== NOT EXECUTED 21bb4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21bb8: e5803000 str r3, [r0] <== NOT EXECUTED 21bbc: ea000008 b 21be4 <== NOT EXECUTED } result = chdir(pathname); 21bc0: e1a00006 mov r0, r6 21bc4: ebffff7a bl 219b4 if (result) { 21bc8: e250c000 subs ip, r0, #0 21bcc: 0a000006 beq 21bec rtems_set_errno_and_return_minus_one( errno ); 21bd0: eb005d3b bl 390c4 <__errno> <== NOT EXECUTED 21bd4: e1a04000 mov r4, r0 <== NOT EXECUTED 21bd8: eb005d39 bl 390c4 <__errno> <== NOT EXECUTED 21bdc: e5903000 ldr r3, [r0] <== NOT EXECUTED 21be0: e5843000 str r3, [r4] <== NOT EXECUTED 21be4: e3e00000 mvn r0, #0 <== NOT EXECUTED 21be8: ea00001a b 21c58 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 21bec: e1a0200c mov r2, ip 21bf0: e59f0070 ldr r0, [pc, #112] ; 21c68 21bf4: e3a01001 mov r1, #1 21bf8: e28d3004 add r3, sp, #4 21bfc: e58dc000 str ip, [sp] 21c00: ebff8d4b bl 5134 21c04: e3500000 cmp r0, #0 21c08: 1afffff0 bne 21bd0 /* 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); 21c0c: e59f304c ldr r3, [pc, #76] ; 21c60 21c10: e5930000 ldr r0, [r3] 21c14: e5903024 ldr r3, [r0, #36] ; 0x24 21c18: e3530000 cmp r3, #0 21c1c: 0a000004 beq 21c34 21c20: e593301c ldr r3, [r3, #28] 21c24: e3530000 cmp r3, #0 21c28: 12800018 addne r0, r0, #24 21c2c: 11a0e00f movne lr, pc 21c30: 112fff13 bxne r3 rtems_filesystem_root = loc; 21c34: e59f3024 ldr r3, [pc, #36] ; 21c60 21c38: e28d4004 add r4, sp, #4 21c3c: e593c000 ldr ip, [r3] 21c40: e8b4000f ldm r4!, {r0, r1, r2, r3} 21c44: e28cc018 add ip, ip, #24 21c48: e8ac000f stmia ip!, {r0, r1, r2, r3} 21c4c: e5943000 ldr r3, [r4] 21c50: e58c3000 str r3, [ip] 21c54: e3a00000 mov r0, #0 return 0; } 21c58: e28dd018 add sp, sp, #24 21c5c: e8bd8070 pop {r4, r5, r6, pc} 21c60: 000534b8 .word 0x000534b8 21c64: 00060d00 .word 0x00060d00 21c68: 00058c91 .word 0x00058c91 000076a4 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 76a4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 76a8: e5935000 ldr r5, [r3] if (!device_name_table) 76ac: e3550000 cmp r5, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 76b0: e1a04003 mov r4, r3 76b4: e1a09000 mov r9, r0 76b8: e1a08001 mov r8, r1 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 76bc: 13a06000 movne r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 76c0: 159fa090 ldrne sl, [pc, #144] ; 7758 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 76c4: 1a000019 bne 7730 rtems_set_errno_and_return_minus_one( EFAULT ); 76c8: eb000b5d bl a444 <__errno> <== NOT EXECUTED 76cc: e3a0300e mov r3, #14 <== NOT EXECUTED 76d0: e5803000 str r3, [r0] <== NOT EXECUTED 76d4: e3e00000 mvn r0, #0 <== NOT EXECUTED 76d8: 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) 76dc: e5957000 ldr r7, [r5] 76e0: e2571000 subs r1, r7, #0 76e4: 0a00000f beq 7728 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 76e8: eb000f0b bl b31c 76ec: e3500000 cmp r0, #0 76f0: 1a00000c bne 7728 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 76f4: e7d70008 ldrb r0, [r7, r8] 76f8: e3500000 cmp r0, #0 76fc: 1a000009 bne 7728 /* 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; 7700: e59f3054 ldr r3, [pc, #84] ; 775c 7704: e5933000 ldr r3, [r3] 7708: e5933028 ldr r3, [r3, #40] ; 0x28 770c: e5843010 str r3, [r4, #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; 7710: e59f3048 ldr r3, [pc, #72] ; 7760 7714: e5843008 str r3, [r4, #8] pathloc->ops = &devFS_ops; 7718: e59f3044 ldr r3, [pc, #68] ; 7764 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 771c: e5845000 str r5, [r4] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 7720: e584300c str r3, [r4, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 7724: 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++) { 7728: e2866001 add r6, r6, #1 772c: e2855014 add r5, r5, #20 7730: e59a3000 ldr r3, [sl] 7734: e1560003 cmp r6, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 7738: e1a00009 mov r0, r9 773c: e1a02008 mov r2, r8 /* 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++) { 7740: 3affffe5 bcc 76dc pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 7744: eb000b3e bl a444 <__errno> 7748: e3a03002 mov r3, #2 774c: e5803000 str r3, [r0] 7750: e3e00000 mvn r0, #0 } 7754: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 7758: 0000d0c4 .word 0x0000d0c4 775c: 0000d2ac .word 0x0000d2ac 7760: 0000d218 .word 0x0000d218 7764: 0000d250 .word 0x0000d250 00000b64 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b64: 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( b68: e59f7058 ldr r7, [pc, #88] ; bc8 b6c: e5973000 ldr r3, [r7] b70: e3a06014 mov r6, #20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b74: 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( b78: e0000396 mul r0, r6, r3 b7c: eb00199c bl 71f4 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) b80: e2505000 subs r5, r0, #0 b84: 1a000004 bne b9c rtems_set_errno_and_return_minus_one( ENOMEM ); b88: eb00262d bl a444 <__errno> <== NOT EXECUTED b8c: e3a0300c mov r3, #12 <== NOT EXECUTED b90: e5803000 str r3, [r0] <== NOT EXECUTED b94: e3e00000 mvn r0, #0 <== NOT EXECUTED b98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( b9c: e5972000 ldr r2, [r7] ba0: e3a01000 mov r1, #0 ba4: e0020296 mul r2, r6, r2 ba8: eb002853 bl acfc 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; bac: e59f3018 ldr r3, [pc, #24] ; bcc temp_mt_entry->mt_fs_root.ops = &devFS_ops; bb0: 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; bb4: 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; bb8: 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; bbc: 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; bc0: e3a00000 mov r0, #0 return 0; } bc4: e8bd80f0 pop {r4, r5, r6, r7, pc} bc8: 0000d0c4 .word 0x0000d0c4 bcc: 0000d218 .word 0x0000d218 00000bd0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { bd0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} bd4: 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') && bd8: e5d00000 ldrb r0, [r0] bdc: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { be0: e1a05001 mov r5, r1 be4: e58d2000 str r2, [sp] be8: 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') && bec: 1a000008 bne c14 bf0: e5d43001 ldrb r3, [r4, #1] bf4: e3530065 cmp r3, #101 ; 0x65 bf8: 1a000005 bne c14 (path[2] == 'v') && (path[3] == '\0')) bfc: e5d43002 ldrb r3, [r4, #2] c00: e3530076 cmp r3, #118 ; 0x76 c04: 1a000002 bne c14 c08: e5d40003 ldrb r0, [r4, #3] c0c: e3500000 cmp r0, #0 c10: 0a000039 beq cfc return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) c14: e205aa0f and sl, r5, #61440 ; 0xf000 c18: e35a0a02 cmp sl, #8192 ; 0x2000 c1c: 135a0a06 cmpne sl, #24576 ; 0x6000 c20: 03a0a000 moveq sl, #0 c24: 13a0a001 movne sl, #1 c28: 0a000002 beq c38 rtems_set_errno_and_return_minus_one( EINVAL ); c2c: eb002604 bl a444 <__errno> <== NOT EXECUTED c30: e3a03016 mov r3, #22 <== NOT EXECUTED c34: ea000008 b c5c <== 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; c38: e59d3028 ldr r3, [sp, #40] ; 0x28 c3c: e5936000 ldr r6, [r3] if (!device_name_table) c40: e3560000 cmp r6, #0 c44: 13e07000 mvnne r7, #0 c48: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ c4c: 159fb0ac ldrne fp, [pc, #172] ; d00 c50: 1a000010 bne c98 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 ); c54: eb0025fa bl a444 <__errno> <== NOT EXECUTED c58: e3a0300e mov r3, #14 <== NOT EXECUTED c5c: e5803000 str r3, [r0] <== NOT EXECUTED c60: e3e00000 mvn r0, #0 <== NOT EXECUTED c64: ea000024 b cfc <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) c68: e796300a ldr r3, [r6, sl] c6c: e2531000 subs r1, r3, #0 c70: 0a000005 beq c8c slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) c74: eb0028c8 bl af9c <== NOT EXECUTED c78: e3500000 cmp r0, #0 <== NOT EXECUTED c7c: 1a000003 bne c90 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); c80: eb0025ef bl a444 <__errno> <== NOT EXECUTED c84: e3a03011 mov r3, #17 <== NOT EXECUTED c88: eafffff3 b c5c <== NOT EXECUTED c8c: 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++){ c90: e2888001 add r8, r8, #1 c94: e28aa014 add sl, sl, #20 c98: e59b3000 ldr r3, [fp] c9c: 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) ca0: 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++){ ca4: 3affffef bcc c68 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ca8: e3770001 cmn r7, #1 cac: 1a000004 bne cc4 rtems_set_errno_and_return_minus_one( ENOMEM ); cb0: eb0025e3 bl a444 <__errno> <== NOT EXECUTED cb4: e3a0300c mov r3, #12 <== NOT EXECUTED cb8: e5803000 str r3, [r0] <== NOT EXECUTED cbc: e1a00007 mov r0, r7 <== NOT EXECUTED cc0: ea00000d b cfc <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( cc4: e10f8000 mrs r8, CPSR cc8: e3883080 orr r3, r8, #128 ; 0x80 ccc: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; cd0: e3a02014 mov r2, #20 cd4: e0030792 mul r3, r2, r7 device_name_table[slot].device_name_length = strlen(path); cd8: 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; cdc: e7864003 str r4, [r6, r3] ce0: e0866003 add r6, r6, r3 device_name_table[slot].device_name_length = strlen(path); ce4: eb002974 bl b2bc device_name_table[slot].major = major; ce8: e59d3000 ldr r3, [sp] device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; cec: 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); cf0: e9860209 stmib r6, {r0, r3, r9} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( cf4: e129f008 msr CPSR_fc, r8 cf8: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } cfc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} d00: 0000d0c4 .word 0x0000d0c4 00000d80 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { d80: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED d84: e1a03000 mov r3, r0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d88: 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; d8c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; d90: e3a02000 mov r2, #0 <== NOT EXECUTED d94: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d98: 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; d9c: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; da0: e283c00c add ip, r3, #12 <== NOT EXECUTED da4: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; da8: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( dac: e2820008 add r0, r2, #8 <== NOT EXECUTED db0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED db4: 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; db8: 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; dbc: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( dc0: eb000ed4 bl 4918 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) dc4: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; dc8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); dcc: 1b001a65 blne 7768 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } dd0: e28dd01c add sp, sp, #28 <== NOT EXECUTED dd4: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00000dd8 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; dd8: e5903000 ldr r3, [r0] if (!the_dev) ddc: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { de0: 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) de4: 1a000004 bne dfc rtems_set_errno_and_return_minus_one( EFAULT ); de8: eb002595 bl a444 <__errno> <== NOT EXECUTED dec: e3a0300e mov r3, #14 <== NOT EXECUTED df0: e5803000 str r3, [r0] <== NOT EXECUTED df4: e3e00000 mvn r0, #0 <== NOT EXECUTED df8: 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; dfc: 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 ); e00: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; e04: e5933008 ldr r3, [r3, #8] buf->st_mode = the_dev->mode; e08: 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 ); e0c: e5813018 str r3, [r1, #24] e10: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; e14: e3a00000 mov r0, #0 return 0; } e18: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000a7ac : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { a7ac: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; a7b0: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a7b4: e280c00c add ip, r0, #12 <== NOT EXECUTED a7b8: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; a7bc: e58d3014 str r3, [sp, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a7c0: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a7c4: e3a03000 mov r3, #0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; a7c8: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; a7cc: e58d3018 str r3, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; a7d0: e58d100c str r1, [sp, #12] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; a7d4: e58d0000 str r0, [sp] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; a7d8: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( a7dc: e1a0200d mov r2, sp <== NOT EXECUTED a7e0: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED a7e4: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a7e8: eb000513 bl bc3c <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a7ec: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a7f0: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a7f4: 1b00062e blne c0b4 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } a7f8: e28dd01c add sp, sp, #28 <== NOT EXECUTED a7fc: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00002b58 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b58: e59030b4 ldr r3, [r0, #180] ; 0xb4 2b5c: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2b60: e92d4030 push {r4, r5, lr} 2b64: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b68: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2b6c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2b70: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2b74: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2b78: 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) { 2b7c: ea00000a b 2bac <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2b80: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b84: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2b88: e3a01000 mov r1, #0 <== NOT EXECUTED 2b8c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2b90: e1a02001 mov r2, r1 <== NOT EXECUTED 2b94: eb0005af bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2b98: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2b9c: 1b000741 blne 48a8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2ba0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ba4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ba8: 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) { 2bac: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 2bb0: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 2bb4: e1510002 cmp r1, r2 <== NOT EXECUTED 2bb8: 1afffff0 bne 2b80 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2bbc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2bc0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00001f3c : int dup2( int fildes, int fildes2 ) { 1f3c: e92d4070 push {r4, r5, r6, lr} 1f40: e24dd048 sub sp, sp, #72 ; 0x48 1f44: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f48: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 1f4c: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f50: eb00019b bl 25c4 if ( status == -1 ) 1f54: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f58: e1a0500d mov r5, sp if ( status == -1 ) 1f5c: 0a000009 beq 1f88 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 1f60: e1a0100d mov r1, sp 1f64: e1a00004 mov r0, r4 1f68: eb000195 bl 25c4 if ( status == -1 ) 1f6c: e3700001 cmn r0, #1 1f70: 0a000004 beq 1f88 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 1f74: e1a00006 mov r0, r6 <== NOT EXECUTED 1f78: e1a02004 mov r2, r4 <== NOT EXECUTED 1f7c: e3a01000 mov r1, #0 <== NOT EXECUTED 1f80: eb00008d bl 21bc <== NOT EXECUTED 1f84: ea000000 b 1f8c <== NOT EXECUTED 1f88: e3e00000 mvn r0, #0 } 1f8c: e28dd048 add sp, sp, #72 ; 0x48 1f90: e8bd8070 pop {r4, r5, r6, pc} 00002658 : * 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')) { 2658: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 265c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2660: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 2664: e1a04001 mov r4, r1 <== NOT EXECUTED 2668: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 266c: 0a000015 beq 26c8 <== NOT EXECUTED 2670: e59f305c ldr r3, [pc, #92] ; 26d4 <== NOT EXECUTED 2674: e5933000 ldr r3, [r3] <== NOT EXECUTED 2678: e0833000 add r3, r3, r0 <== NOT EXECUTED 267c: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 2680: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2684: 13a03001 movne r3, #1 <== NOT EXECUTED 2688: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 268c: 0a00000d beq 26c8 <== NOT EXECUTED 2690: e350000a cmp r0, #10 <== NOT EXECUTED 2694: 0a00000b beq 26c8 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2698: 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] = '^'; 269c: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 26a0: e1a0000d mov r0, sp <== NOT EXECUTED 26a4: e3a01002 mov r1, #2 <== NOT EXECUTED 26a8: 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; 26ac: 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] = '^'; 26b0: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 26b4: ebffff4d bl 23f0 <== NOT EXECUTED tty->column += 2; 26b8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 26bc: e2833002 add r3, r3, #2 <== NOT EXECUTED 26c0: 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')) { 26c4: ea000001 b 26d0 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 26c8: e1a01004 mov r1, r4 <== NOT EXECUTED 26cc: ebffff8b bl 2500 <== NOT EXECUTED } } 26d0: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED 26d4: 000185e0 .word 0x000185e0 00022224 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 22224: e59f300c ldr r3, [pc, #12] ; 22238 <== NOT EXECUTED 22228: e5930000 ldr r0, [r3] <== NOT EXECUTED 2222c: e3500000 cmp r0, #0 <== NOT EXECUTED 22230: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 22234: ea005bef b 391f8 <== NOT EXECUTED 22238: 000609b8 .word 0x000609b8 0002223c : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 2223c: e59f300c ldr r3, [pc, #12] ; 22250 <== NOT EXECUTED 22240: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 22244: e3500000 cmp r0, #0 <== NOT EXECUTED 22248: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 2224c: ea005be9 b 391f8 <== NOT EXECUTED 22250: 000609b8 .word 0x000609b8 000026d8 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 26d8: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 26dc: 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) { 26e0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 26e4: e1a04000 mov r4, r0 <== NOT EXECUTED 26e8: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 26ec: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 26f0: e3510000 cmp r1, #0 <== NOT EXECUTED 26f4: 0a000062 beq 2884 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 26f8: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 26fc: e2132008 ands r2, r3, #8 <== NOT EXECUTED tty->ccount = 0; 2700: 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)) { 2704: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2708: e2133010 ands r3, r3, #16 <== NOT EXECUTED 270c: 1a00005c bne 2884 <== NOT EXECUTED tty->ccount = 0; 2710: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2714: e1a01004 mov r1, r4 <== NOT EXECUTED 2718: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 271c: ebffffcd bl 2658 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 2720: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2724: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 2728: 11a01004 movne r1, r4 <== NOT EXECUTED 272c: 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) 2730: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2734: ea00000c b 276c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2738: e2411001 sub r1, r1, #1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 273c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2740: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2744: e594201c ldr r2, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2748: e3130008 tst r3, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 274c: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2750: 0a000048 beq 2878 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2754: e3570000 cmp r7, #0 <== NOT EXECUTED 2758: 1a000005 bne 2774 <== NOT EXECUTED 275c: e3130010 tst r3, #16 <== NOT EXECUTED 2760: 1a000003 bne 2774 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 2764: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2768: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 276c: 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); 2770: eaffffb8 b 2658 <== NOT EXECUTED } else if (c == '\t') { 2774: e3550009 cmp r5, #9 <== NOT EXECUTED 2778: 1a000020 bne 2800 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 277c: 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; 2780: 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)) { 2784: e596c000 ldr ip, [r6] <== NOT EXECUTED 2788: e3a02000 mov r2, #0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 278c: ea00000d b 27c8 <== NOT EXECUTED c = tty->cbuf[i++]; 2790: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 2794: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED if (c == '\t') { 2798: e3500009 cmp r0, #9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 279c: 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; 27a0: 03855007 orreq r5, r5, #7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 27a4: 0a000005 beq 27c0 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 27a8: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 27ac: e3100020 tst r0, #32 <== NOT EXECUTED 27b0: 0a000002 beq 27c0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 27b4: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 27b8: 12855002 addne r5, r5, #2 <== NOT EXECUTED 27bc: ea000000 b 27c4 <== NOT EXECUTED } else { col++; 27c0: e2855001 add r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 27c4: e2822001 add r2, r2, #1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 27c8: e1520001 cmp r2, r1 <== NOT EXECUTED 27cc: 1affffef bne 2790 <== NOT EXECUTED 27d0: ea000006 b 27f0 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 27d4: e59f00bc ldr r0, [pc, #188] ; 2898 <== NOT EXECUTED 27d8: e3a01001 mov r1, #1 <== NOT EXECUTED 27dc: e1a02004 mov r2, r4 <== NOT EXECUTED 27e0: ebffff02 bl 23f0 <== NOT EXECUTED tty->column--; 27e4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27e8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 27ec: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 27f0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27f4: e1530005 cmp r3, r5 <== NOT EXECUTED 27f8: cafffff5 bgt 27d4 <== NOT EXECUTED 27fc: ea00001d b 2878 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 2800: e5962000 ldr r2, [r6] <== NOT EXECUTED 2804: e2855001 add r5, r5, #1 <== NOT EXECUTED 2808: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 280c: e3120020 tst r2, #32 <== NOT EXECUTED 2810: 0a000009 beq 283c <== NOT EXECUTED 2814: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2818: 0a000007 beq 283c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 281c: e59f0078 ldr r0, [pc, #120] ; 289c <== NOT EXECUTED 2820: e3a01003 mov r1, #3 <== NOT EXECUTED 2824: e1a02004 mov r2, r4 <== NOT EXECUTED 2828: ebfffef0 bl 23f0 <== NOT EXECUTED if (tty->column) 282c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2830: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2834: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2838: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 283c: e5963000 ldr r3, [r6] <== NOT EXECUTED 2840: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 2844: e3130020 tst r3, #32 <== NOT EXECUTED 2848: 0a000002 beq 2858 <== NOT EXECUTED 284c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2850: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2854: 0a000007 beq 2878 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2858: e59f003c ldr r0, [pc, #60] ; 289c <== NOT EXECUTED 285c: e3a01003 mov r1, #3 <== NOT EXECUTED 2860: e1a02004 mov r2, r4 <== NOT EXECUTED 2864: ebfffee1 bl 23f0 <== NOT EXECUTED if (tty->column) 2868: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 286c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2870: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2874: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 2878: e3570000 cmp r7, #0 <== NOT EXECUTED 287c: 1a000001 bne 2888 <== NOT EXECUTED 2880: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2884: e59f6014 ldr r6, [pc, #20] ; 28a0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2888: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 288c: e3510000 cmp r1, #0 <== NOT EXECUTED 2890: 1affffa8 bne 2738 <== NOT EXECUTED 2894: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2898: 000194e7 .word 0x000194e7 289c: 000194e5 .word 0x000194e5 28a0: 000185e0 .word 0x000185e0 000334c8 : #include int fchdir( int fd ) { 334c8: 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 ); 334cc: e59f315c ldr r3, [pc, #348] ; 33630 <== NOT EXECUTED 334d0: e5933000 ldr r3, [r3] <== NOT EXECUTED 334d4: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 334d8: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 334dc: 2a000005 bcs 334f8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 334e0: e59f314c ldr r3, [pc, #332] ; 33634 <== NOT EXECUTED 334e4: e5934000 ldr r4, [r3] <== NOT EXECUTED 334e8: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 334ec: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 334f0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 334f4: 1a000002 bne 33504 <== NOT EXECUTED 334f8: eb0016f1 bl 390c4 <__errno> <== NOT EXECUTED 334fc: e3a03009 mov r3, #9 <== NOT EXECUTED 33500: ea000016 b 33560 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 33504: e3130002 tst r3, #2 <== NOT EXECUTED 33508: 1a000002 bne 33518 <== NOT EXECUTED 3350c: eb0016ec bl 390c4 <__errno> <== NOT EXECUTED 33510: e3a03016 mov r3, #22 <== NOT EXECUTED 33514: ea000011 b 33560 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 33518: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 3351c: e3530000 cmp r3, #0 <== NOT EXECUTED 33520: 0a000002 beq 33530 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 33524: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 33528: e3530000 cmp r3, #0 <== NOT EXECUTED 3352c: 1a000002 bne 3353c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 33530: eb0016e3 bl 390c4 <__errno> <== NOT EXECUTED 33534: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 33538: ea000008 b 33560 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 3353c: e2844018 add r4, r4, #24 <== NOT EXECUTED 33540: e1a00004 mov r0, r4 <== NOT EXECUTED 33544: e1a0e00f mov lr, pc <== NOT EXECUTED 33548: e12fff13 bx r3 <== NOT EXECUTED 3354c: e3500001 cmp r0, #1 <== NOT EXECUTED 33550: e1a06000 mov r6, r0 <== NOT EXECUTED 33554: 0a000003 beq 33568 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 33558: eb0016d9 bl 390c4 <__errno> <== NOT EXECUTED 3355c: e3a03014 mov r3, #20 <== NOT EXECUTED 33560: e5803000 str r3, [r0] <== NOT EXECUTED 33564: ea00001c b 335dc <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 33568: e59f50c8 ldr r5, [pc, #200] ; 33638 <== NOT EXECUTED 3356c: e5957000 ldr r7, [r5] <== NOT EXECUTED 33570: e287c004 add ip, r7, #4 <== NOT EXECUTED 33574: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 33578: e28de004 add lr, sp, #4 <== NOT EXECUTED 3357c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 33580: e59c3000 ldr r3, [ip] <== NOT EXECUTED 33584: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 33588: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3358c: e287e004 add lr, r7, #4 <== NOT EXECUTED 33590: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 33594: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 33598: e3a0e000 mov lr, #0 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 3359c: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 335a0: e1a01006 mov r1, r6 <== NOT EXECUTED 335a4: e1a0200e mov r2, lr <== NOT EXECUTED 335a8: e59f008c ldr r0, [pc, #140] ; 3363c <== NOT EXECUTED 335ac: e28d3018 add r3, sp, #24 <== NOT EXECUTED 335b0: e58de000 str lr, [sp] <== NOT EXECUTED 335b4: ebff46de bl 5134 <== NOT EXECUTED 335b8: e3500000 cmp r0, #0 <== NOT EXECUTED 335bc: 0a000008 beq 335e4 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 335c0: e595c000 ldr ip, [r5] <== NOT EXECUTED 335c4: e28d4004 add r4, sp, #4 <== NOT EXECUTED 335c8: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 335cc: e28cc004 add ip, ip, #4 <== NOT EXECUTED 335d0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 335d4: e5943000 ldr r3, [r4] <== NOT EXECUTED 335d8: e58c3000 str r3, [ip] <== NOT EXECUTED 335dc: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 335e0: ea000010 b 33628 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 335e4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 335e8: e3530000 cmp r3, #0 <== NOT EXECUTED 335ec: 0a000004 beq 33604 <== NOT EXECUTED 335f0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 335f4: e3530000 cmp r3, #0 <== NOT EXECUTED 335f8: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 335fc: 11a0e00f movne lr, pc <== NOT EXECUTED 33600: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 33604: e59f302c ldr r3, [pc, #44] ; 33638 <== NOT EXECUTED 33608: e28d4018 add r4, sp, #24 <== NOT EXECUTED 3360c: e593c000 ldr ip, [r3] <== NOT EXECUTED 33610: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 33614: e28cc004 add ip, ip, #4 <== NOT EXECUTED 33618: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 3361c: e5943000 ldr r3, [r4] <== NOT EXECUTED 33620: e58c3000 str r3, [ip] <== NOT EXECUTED 33624: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 33628: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 3362c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 33630: 000531e0 .word 0x000531e0 33634: 00060ca4 .word 0x00060ca4 33638: 000534b8 .word 0x000534b8 3363c: 00058c91 .word 0x00058c91 00021e74 : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21e74: e59f307c ldr r3, [pc, #124] ; 21ef8 <== NOT EXECUTED 21e78: e5932000 ldr r2, [r3] <== NOT EXECUTED 21e7c: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 21e80: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21e84: 2a000005 bcs 21ea0 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21e88: e59f306c ldr r3, [pc, #108] ; 21efc <== NOT EXECUTED 21e8c: e5933000 ldr r3, [r3] <== NOT EXECUTED 21e90: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21e94: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 21e98: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 21e9c: 1a000002 bne 21eac <== NOT EXECUTED 21ea0: eb005c87 bl 390c4 <__errno> <== NOT EXECUTED 21ea4: e3a03009 mov r3, #9 <== NOT EXECUTED 21ea8: ea00000a b 21ed8 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21eac: e3120004 tst r2, #4 <== NOT EXECUTED 21eb0: 1a000002 bne 21ec0 <== NOT EXECUTED 21eb4: eb005c82 bl 390c4 <__errno> <== NOT EXECUTED 21eb8: e3a03016 mov r3, #22 <== NOT EXECUTED 21ebc: ea000005 b 21ed8 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 21ec0: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 21ec4: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 21ec8: e3520000 cmp r2, #0 <== NOT EXECUTED 21ecc: 1a000004 bne 21ee4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21ed0: eb005c7b bl 390c4 <__errno> <== NOT EXECUTED 21ed4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21ed8: e5803000 str r3, [r0] <== NOT EXECUTED 21edc: e3e00000 mvn r0, #0 <== NOT EXECUTED 21ee0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 21ee4: e2830018 add r0, r3, #24 <== NOT EXECUTED 21ee8: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 21eec: e1a0e00f mov lr, pc <== NOT EXECUTED 21ef0: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 21ef4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21ef8: 000531e0 .word 0x000531e0 21efc: 00060ca4 .word 0x00060ca4 00021f00 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f00: e59f3088 ldr r3, [pc, #136] ; 21f90 <== NOT EXECUTED 21f04: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21f08: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 21f0c: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f10: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21f14: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 21f18: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 21f1c: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f20: 2a000005 bcs 21f3c <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21f24: e59f3068 ldr r3, [pc, #104] ; 21f94 <== NOT EXECUTED 21f28: e5933000 ldr r3, [r3] <== NOT EXECUTED 21f2c: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21f30: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 21f34: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 21f38: 1a000002 bne 21f48 <== NOT EXECUTED 21f3c: eb005c60 bl 390c4 <__errno> <== NOT EXECUTED 21f40: e3a03009 mov r3, #9 <== NOT EXECUTED 21f44: ea00000a b 21f74 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21f48: e3130004 tst r3, #4 <== NOT EXECUTED 21f4c: 1a000002 bne 21f5c <== NOT EXECUTED 21f50: eb005c5b bl 390c4 <__errno> <== NOT EXECUTED 21f54: e3a03016 mov r3, #22 <== NOT EXECUTED 21f58: ea000005 b 21f74 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 21f5c: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 21f60: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 21f64: e3530000 cmp r3, #0 <== NOT EXECUTED 21f68: 1a000004 bne 21f80 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21f6c: eb005c54 bl 390c4 <__errno> <== NOT EXECUTED 21f70: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21f74: e5803000 str r3, [r0] <== NOT EXECUTED 21f78: e3e00000 mvn r0, #0 <== NOT EXECUTED 21f7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 21f80: e2800018 add r0, r0, #24 <== NOT EXECUTED 21f84: e1a0e00f mov lr, pc <== NOT EXECUTED 21f88: e12fff13 bx r3 <== NOT EXECUTED } 21f8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21f90: 000531e0 .word 0x000531e0 21f94: 00060ca4 .word 0x00060ca4 00033640 : int fcntl( int fd, int cmd, ... ) { 33640: e92d000e push {r1, r2, r3} 33644: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33648: e59f31a4 ldr r3, [pc, #420] ; 337f4 3364c: e5933000 ldr r3, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 33650: e28d201c add r2, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33654: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 33658: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 3365c: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33660: 2a000005 bcs 3367c iop = rtems_libio_iop( fd ); 33664: e59f118c ldr r1, [pc, #396] ; 337f8 33668: e591c000 ldr ip, [r1] 3366c: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 33670: e5940014 ldr r0, [r4, #20] 33674: e3100c01 tst r0, #256 ; 0x100 33678: 1a000002 bne 33688 3367c: eb001690 bl 390c4 <__errno> <== NOT EXECUTED 33680: e3a03009 mov r3, #9 <== NOT EXECUTED 33684: ea000045 b 337a0 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 33688: e3570009 cmp r7, #9 3368c: 979ff107 ldrls pc, [pc, r7, lsl #2] 33690: ea000040 b 33798 33694: 000336bc .word 0x000336bc <== NOT EXECUTED 33698: 00033728 .word 0x00033728 <== NOT EXECUTED 3369c: 00033734 .word 0x00033734 <== NOT EXECUTED 336a0: 00033754 .word 0x00033754 <== NOT EXECUTED 336a4: 00033760 .word 0x00033760 <== NOT EXECUTED 336a8: 0003378c .word 0x0003378c <== NOT EXECUTED 336ac: 0003378c .word 0x0003378c <== NOT EXECUTED 336b0: 0003378c .word 0x0003378c <== NOT EXECUTED 336b4: 0003378c .word 0x0003378c <== NOT EXECUTED 336b8: 0003378c .word 0x0003378c <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 336bc: e5922000 ldr r2, [r2] if ( fd2 ) 336c0: e3520000 cmp r2, #0 336c4: 0a000003 beq 336d8 diop = rtems_libio_iop( fd2 ); 336c8: e1520003 cmp r2, r3 <== NOT EXECUTED 336cc: 23a0c000 movcs ip, #0 <== NOT EXECUTED 336d0: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 336d4: ea000002 b 336e4 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 336d8: ebff47ae bl 5598 if ( diop == 0 ) { 336dc: e250c000 subs ip, r0, #0 336e0: 0a00003e beq 337e0 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 336e4: e2846018 add r6, r4, #24 336e8: e8b6000f ldm r6!, {r0, r1, r2, r3} 336ec: e28c5018 add r5, ip, #24 336f0: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 336f4: e59f30fc ldr r3, [pc, #252] ; 337f8 336f8: e5933000 ldr r3, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 336fc: e5966000 ldr r6, [r6] ret = -1; break; } } diop->handlers = iop->handlers; 33700: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 33704: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 33708: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 3370c: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 33710: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 33714: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 33718: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 3371c: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 33720: e1a05343 asr r5, r3, #6 33724: ea00001f b 337a8 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 33728: e1a055a0 lsr r5, r0, #11 3372c: e2055001 and r5, r5, #1 33730: ea00001e b 337b0 * 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 ) ) 33734: e5925000 ldr r5, [r2] 33738: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 3373c: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 33740: 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; 33744: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 33748: 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 ) ) 3374c: 0a000017 beq 337b0 33750: ea00000b b 33784 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 33754: ebff4726 bl 53f4 33758: e1a05000 mov r5, r0 3375c: ea000011 b 337a8 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 33760: e5920000 ldr r0, [r2] 33764: ebff47b8 bl 564c /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 33768: e5943014 ldr r3, [r4, #20] 3376c: e59f2088 ldr r2, [pc, #136] ; 337fc 33770: e3c33c02 bic r3, r3, #512 ; 0x200 33774: e0002002 and r2, r0, r2 33778: e3c33001 bic r3, r3, #1 3377c: e1823003 orr r3, r2, r3 33780: e5843014 str r3, [r4, #20] 33784: e3a05000 mov r5, #0 33788: ea000008 b 337b0 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 3378c: eb00164c bl 390c4 <__errno> 33790: e3a03086 mov r3, #134 ; 0x86 33794: ea000001 b 337a0 ret = -1; break; default: errno = EINVAL; 33798: eb001649 bl 390c4 <__errno> 3379c: e3a03016 mov r3, #22 337a0: e5803000 str r3, [r0] 337a4: ea00000d b 337e0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 337a8: e3550000 cmp r5, #0 337ac: ba00000c blt 337e4 if (iop->handlers->fcntl_h) { 337b0: e594303c ldr r3, [r4, #60] ; 0x3c 337b4: e5933030 ldr r3, [r3, #48] ; 0x30 337b8: e3530000 cmp r3, #0 337bc: 0a000008 beq 337e4 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 337c0: e1a01004 mov r1, r4 337c4: e1a00007 mov r0, r7 337c8: e1a0e00f mov lr, pc 337cc: e12fff13 bx r3 if (err) { 337d0: e2504000 subs r4, r0, #0 337d4: 0a000002 beq 337e4 errno = err; 337d8: eb001639 bl 390c4 <__errno> <== NOT EXECUTED 337dc: e5804000 str r4, [r0] <== NOT EXECUTED 337e0: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 337e4: e1a00005 mov r0, r5 337e8: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 337ec: e28dd00c add sp, sp, #12 337f0: e12fff1e bx lr 337f4: 000531e0 .word 0x000531e0 337f8: 00060ca4 .word 0x00060ca4 337fc: 00000201 .word 0x00000201 0000ad70 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ad70: e59f3368 ldr r3, [pc, #872] ; b0e0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ad74: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr} ad78: e1a08001 mov r8, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ad7c: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ad80: e1a07000 mov r7, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ad84: e1a02001 mov r2, r1 ad88: e5930000 ldr r0, [r3] ad8c: ebffe531 bl 4258 ad90: e250a000 subs sl, r0, #0 ad94: 13e06003 mvnne r6, #3 ad98: 1a0000ce bne b0d8 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; ad9c: e5974000 ldr r4, [r7] <== NOT EXECUTED if (pipe == NULL) { ada0: e3540000 cmp r4, #0 <== NOT EXECUTED ada4: 1a00004f bne aee8 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ada8: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED adac: ebfff7b3 bl 8c80 <== NOT EXECUTED if (pipe == NULL) adb0: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); adb4: e1a05000 mov r5, r0 <== NOT EXECUTED adb8: e1a04000 mov r4, r0 <== NOT EXECUTED if (pipe == NULL) adbc: 03e0600b mvneq r6, #11 <== NOT EXECUTED adc0: 0a000056 beq af20 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); adc4: e1a0100a mov r1, sl <== NOT EXECUTED adc8: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED adcc: eb00092b bl d280 <== NOT EXECUTED pipe->Size = PIPE_BUF; add0: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); add4: e1a00003 mov r0, r3 <== NOT EXECUTED pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; add8: e5853004 str r3, [r5, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); addc: ebfff7a7 bl 8c80 <== NOT EXECUTED if (! pipe->Buffer) ade0: 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); ade4: e5850000 str r0, [r5] <== NOT EXECUTED if (! pipe->Buffer) ade8: 03e0600b mvneq r6, #11 <== NOT EXECUTED adec: 0a00003a beq aedc <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( adf0: e59f62ec ldr r6, [pc, #748] ; b0e4 <== NOT EXECUTED adf4: e59f02ec ldr r0, [pc, #748] ; b0e8 <== NOT EXECUTED adf8: e5d63000 ldrb r3, [r6] <== NOT EXECUTED adfc: e1a0100a mov r1, sl <== NOT EXECUTED ae00: e1830000 orr r0, r3, r0 <== NOT EXECUTED ae04: e1a0200a mov r2, sl <== NOT EXECUTED ae08: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED ae0c: eb000287 bl b830 <== NOT EXECUTED ae10: e2501000 subs r1, r0, #0 <== NOT EXECUTED ae14: 1a00002d bne aed0 <== 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( ae18: e5d63000 ldrb r3, [r6] <== NOT EXECUTED ae1c: e59f02c8 ldr r0, [pc, #712] ; b0ec <== NOT EXECUTED ae20: e1a02001 mov r2, r1 <== NOT EXECUTED ae24: e1830000 orr r0, r3, r0 <== NOT EXECUTED ae28: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED ae2c: eb00027f bl b830 <== NOT EXECUTED ae30: e2503000 subs r3, r0, #0 <== NOT EXECUTED ae34: 1a000023 bne aec8 <== 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( ae38: e5d62000 ldrb r2, [r6] <== NOT EXECUTED ae3c: e59f02ac ldr r0, [pc, #684] ; b0f0 <== NOT EXECUTED ae40: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED ae44: e1820000 orr r0, r2, r0 <== NOT EXECUTED ae48: e3a01001 mov r1, #1 <== NOT EXECUTED ae4c: e3a02010 mov r2, #16 <== NOT EXECUTED ae50: e58dc000 str ip, [sp] <== NOT EXECUTED ae54: ebffe46d bl 4010 <== NOT EXECUTED ae58: e3500000 cmp r0, #0 <== NOT EXECUTED ae5c: 1a000017 bne aec0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ae60: e28d5004 add r5, sp, #4 <== NOT EXECUTED ae64: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED ae68: e1a02005 mov r2, r5 <== NOT EXECUTED ae6c: e59f0280 ldr r0, [pc, #640] ; b0f4 <== NOT EXECUTED ae70: ebffea7d bl 586c <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state ae74: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED ae78: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED ae7c: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); ae80: ebffec95 bl 60dc <_Thread_Enable_dispatch> <== NOT EXECUTED ae84: e1a02005 mov r2, r5 <== NOT EXECUTED ae88: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED ae8c: e59f0260 ldr r0, [pc, #608] ; b0f4 <== NOT EXECUTED ae90: ebffea75 bl 586c <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state ae94: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED ae98: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED ae9c: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); aea0: ebffec8d bl 60dc <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') aea4: e5d63000 ldrb r3, [r6] <== NOT EXECUTED aea8: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED aeac: e2833001 add r3, r3, #1 <== NOT EXECUTED aeb0: e5c63000 strb r3, [r6] <== NOT EXECUTED c = 'a'; aeb4: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED aeb8: 05c63000 strbeq r3, [r6] <== NOT EXECUTED aebc: ea000009 b aee8 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); aec0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED aec4: eb000287 bl b8e8 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); aec8: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED aecc: eb000285 bl b8e8 <== NOT EXECUTED err_rbar: free(pipe->Buffer); aed0: e5950000 ldr r0, [r5] <== NOT EXECUTED aed4: ebfff61f bl 8758 <== NOT EXECUTED aed8: e3e06003 mvn r6, #3 <== NOT EXECUTED err_buf: free(pipe); aedc: e1a00005 mov r0, r5 <== NOT EXECUTED aee0: ebfff61c bl 8758 <== NOT EXECUTED aee4: ea00000d b af20 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) aee8: e3a01000 mov r1, #0 <== NOT EXECUTED aeec: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED aef0: e1a02001 mov r2, r1 <== NOT EXECUTED aef4: ebffe4d7 bl 4258 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { aef8: e5973000 ldr r3, [r7] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) aefc: e3500000 cmp r0, #0 <== NOT EXECUTED af00: 01a06000 moveq r6, r0 <== NOT EXECUTED af04: 13e06003 mvnne r6, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { af08: e3530000 cmp r3, #0 <== NOT EXECUTED af0c: 1a000003 bne af20 <== NOT EXECUTED if (err) af10: e3560000 cmp r6, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; af14: 05874000 streq r4, [r7] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); af18: 11a00004 movne r0, r4 <== NOT EXECUTED af1c: 1bffff47 blne ac40 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); af20: e59f31b8 ldr r3, [pc, #440] ; b0e0 <== NOT EXECUTED af24: e5930000 ldr r0, [r3] <== NOT EXECUTED af28: ebffe510 bl 4370 <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) af2c: e3560000 cmp r6, #0 <== NOT EXECUTED af30: 1a000068 bne b0d8 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { af34: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED af38: e2023006 and r3, r2, #6 <== NOT EXECUTED af3c: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; af40: e5974000 ldr r4, [r7] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { af44: 0a000024 beq afdc <== NOT EXECUTED af48: e3530006 cmp r3, #6 <== NOT EXECUTED af4c: 0a000046 beq b06c <== NOT EXECUTED af50: e3530002 cmp r3, #2 <== NOT EXECUTED af54: 1a000058 bne b0bc <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) af58: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; af5c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) af60: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; af64: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) af68: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; af6c: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) af70: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); af74: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED af78: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED af7c: 0b000271 bleq b948 <== NOT EXECUTED if (pipe->Writers == 0) { af80: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED af84: e3530000 cmp r3, #0 <== NOT EXECUTED af88: 1a00004b bne b0bc <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) af8c: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED af90: e3130001 tst r3, #1 <== NOT EXECUTED af94: 1a000048 bne b0bc <== NOT EXECUTED break; prevCounter = pipe->writerCounter; af98: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); af9c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED afa0: ebffe4f2 bl 4370 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) afa4: e3a01000 mov r1, #0 <== NOT EXECUTED afa8: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED afac: eb00027b bl b9a0 <== NOT EXECUTED afb0: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) afb4: 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)) afb8: 1a000042 bne b0c8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) afbc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED afc0: ebffe4a4 bl 4258 <== NOT EXECUTED afc4: e3500000 cmp r0, #0 <== NOT EXECUTED afc8: 1a00003e bne b0c8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); afcc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED afd0: e1550003 cmp r5, r3 <== NOT EXECUTED afd4: 0afffff0 beq af9c <== NOT EXECUTED afd8: ea000037 b b0bc <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { afdc: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED afe0: e3530000 cmp r3, #0 <== NOT EXECUTED afe4: 1a000002 bne aff4 <== NOT EXECUTED afe8: e3120001 tst r2, #1 <== NOT EXECUTED afec: 13e06005 mvnne r6, #5 <== NOT EXECUTED aff0: 1a000035 bne b0cc <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) aff4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; aff8: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) affc: e3530000 cmp r3, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b000: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b004: e2833001 add r3, r3, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b008: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b00c: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b010: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b014: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b018: 0b00024a bleq b948 <== NOT EXECUTED if (pipe->Readers == 0) { b01c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b020: e3530000 cmp r3, #0 <== NOT EXECUTED b024: 1a000024 bne b0bc <== NOT EXECUTED prevCounter = pipe->readerCounter; b028: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); b02c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b030: ebffe4ce bl 4370 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) b034: e3a01000 mov r1, #0 <== NOT EXECUTED b038: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b03c: eb000257 bl b9a0 <== NOT EXECUTED b040: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b044: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) b048: 1a00001e bne b0c8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b04c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b050: ebffe480 bl 4258 <== NOT EXECUTED b054: e3500000 cmp r0, #0 <== NOT EXECUTED b058: 1a00001a bne b0c8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); b05c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED b060: e1550003 cmp r5, r3 <== NOT EXECUTED b064: 0afffff0 beq b02c <== NOT EXECUTED b068: ea000013 b b0bc <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b06c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b070: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b074: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b078: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b07c: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b080: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b084: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); b088: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED b08c: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b090: 0b00022c bleq b948 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) b094: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b098: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b09c: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b0a0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b0a4: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b0a8: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b0ac: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b0b0: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b0b4: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b0b8: 0b000222 bleq b948 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); b0bc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b0c0: ebffe4aa bl 4370 <== NOT EXECUTED return 0; b0c4: ea000003 b b0d8 <== NOT EXECUTED b0c8: e3e06003 mvn r6, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); b0cc: e1a00007 mov r0, r7 <== NOT EXECUTED b0d0: e1a01008 mov r1, r8 <== NOT EXECUTED b0d4: ebfffee6 bl ac74 <== NOT EXECUTED return err; } b0d8: e1a00006 mov r0, r6 b0dc: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc} b0e0: 00019b00 .word 0x00019b00 b0e4: 000185cc .word 0x000185cc b0e8: 50497200 .word 0x50497200 b0ec: 50497700 .word 0x50497700 b0f0: 50497300 .word 0x50497300 b0f4: 0001a5e4 .word 0x0001a5e4 0000867c : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 867c: e59f3030 ldr r3, [pc, #48] ; 86b4 <== NOT EXECUTED 8680: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 8684: ea000006 b 86a4 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 8688: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 868c: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 8690: e15c0000 cmp ip, r0 <== NOT EXECUTED 8694: 1a000001 bne 86a0 <== NOT EXECUTED 8698: e3a00001 mov r0, #1 <== NOT EXECUTED 869c: e12fff1e bx lr <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 86a0: e5922000 ldr r2, [r2] <== NOT EXECUTED 86a4: e1520003 cmp r2, r3 <== NOT EXECUTED 86a8: 1afffff6 bne 8688 <== NOT EXECUTED 86ac: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 86b0: e12fff1e bx lr <== NOT EXECUTED 86b4: 00060ce8 .word 0x00060ce8 00002410 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2410: e59f3100 ldr r3, [pc, #256] ; 2518 2414: e5933000 ldr r3, [r3] 2418: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 241c: 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); 2420: 2a000005 bcs 243c iop = rtems_libio_iop(fd); 2424: e59f30f0 ldr r3, [pc, #240] ; 251c 2428: e5933000 ldr r3, [r3] 242c: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2430: e5903014 ldr r3, [r0, #20] 2434: e3130c01 tst r3, #256 ; 0x100 2438: 1a000002 bne 2448 243c: eb0032d8 bl efa4 <__errno> 2440: e3a03009 mov r3, #9 2444: ea000003 b 2458 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2448: e3130002 tst r3, #2 244c: 1a000004 bne 2464 2450: eb0032d3 bl efa4 <__errno> <== NOT EXECUTED 2454: e3a03016 mov r3, #22 <== NOT EXECUTED 2458: e5803000 str r3, [r0] 245c: e3e00000 mvn r0, #0 2460: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2464: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2468: e351000b cmp r1, #11 246c: 979ff101 ldrls pc, [pc, r1, lsl #2] 2470: ea000023 b 2504 2474: 000024a4 .word 0x000024a4 <== NOT EXECUTED 2478: 000024ac .word 0x000024ac <== NOT EXECUTED 247c: 000024b4 .word 0x000024b4 <== NOT EXECUTED 2480: 000024bc .word 0x000024bc <== NOT EXECUTED 2484: 000024c4 .word 0x000024c4 <== NOT EXECUTED 2488: 000024cc .word 0x000024cc <== NOT EXECUTED 248c: 000024d4 .word 0x000024d4 <== NOT EXECUTED 2490: 000024dc .word 0x000024dc <== NOT EXECUTED 2494: 000024e4 .word 0x000024e4 <== NOT EXECUTED 2498: 000024ec .word 0x000024ec <== NOT EXECUTED 249c: 000024f4 .word 0x000024f4 <== NOT EXECUTED 24a0: 000024fc .word 0x000024fc <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 24a4: e5930038 ldr r0, [r3, #56] ; 0x38 break; 24a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 24ac: e593003c ldr r0, [r3, #60] ; 0x3c break; 24b0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 24b4: e5930040 ldr r0, [r3, #64] ; 0x40 break; 24b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 24bc: e5930044 ldr r0, [r3, #68] ; 0x44 break; 24c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 24c4: e5930048 ldr r0, [r3, #72] ; 0x48 break; 24c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 24cc: e593004c ldr r0, [r3, #76] ; 0x4c break; 24d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 24d4: e5930054 ldr r0, [r3, #84] ; 0x54 break; 24d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 24dc: e5930058 ldr r0, [r3, #88] ; 0x58 break; 24e0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 24e4: e5930064 ldr r0, [r3, #100] ; 0x64 break; 24e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 24ec: e5930050 ldr r0, [r3, #80] ; 0x50 break; 24f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 24f4: e593005c ldr r0, [r3, #92] ; 0x5c break; 24f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 24fc: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2500: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2504: eb0032a6 bl efa4 <__errno> 2508: e3a03016 mov r3, #22 250c: e5803000 str r3, [r0] 2510: e3e00000 mvn r0, #0 break; } return return_value; } 2514: e49df004 pop {pc} ; (ldr pc, [sp], #4) 2518: 0001bdb0 .word 0x0001bdb0 251c: 0001d90c .word 0x0001d90c 00008758 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8758: e59f3088 ldr r3, [pc, #136] ; 87e8 875c: e593200c ldr r2, [r3, #12] 8760: e92d4030 push {r4, r5, lr} 8764: e2822001 add r2, r2, #1 if ( !ptr ) 8768: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 876c: e583200c str r2, [r3, #12] if ( !ptr ) 8770: 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()) && 8774: e59f3070 ldr r3, [pc, #112] ; 87ec 8778: e5933000 ldr r3, [r3] 877c: e3530003 cmp r3, #3 8780: 1a000005 bne 879c 8784: eb00011d bl 8c00 8788: e3500000 cmp r0, #0 878c: 1a000002 bne 879c !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 8790: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 8794: 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); 8798: ea00012b b 8c4c <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 879c: e59f304c ldr r3, [pc, #76] ; 87f0 87a0: e5933000 ldr r3, [r3] 87a4: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 87a8: 11a00004 movne r0, r4 87ac: 11a0e00f movne lr, pc 87b0: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 87b4: e59f5038 ldr r5, [pc, #56] ; 87f4 87b8: e1a01004 mov r1, r4 87bc: e5950000 ldr r0, [r5] 87c0: eb00068b bl a1f4 <_Protected_heap_Free> 87c4: e3500000 cmp r0, #0 87c8: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 87cc: 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", 87d0: e59f0020 ldr r0, [pc, #32] ; 87f8 <== NOT EXECUTED 87d4: e2822018 add r2, r2, #24 <== NOT EXECUTED 87d8: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 87dc: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 87e0: 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", 87e4: eaffe598 b 1e4c <== NOT EXECUTED 87e8: 00019b90 .word 0x00019b90 87ec: 00019e90 .word 0x00019e90 87f0: 000199a8 .word 0x000199a8 87f4: 000183ac .word 0x000183ac 87f8: 000196a2 .word 0x000196a2 00023210 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 23210: e59f3058 ldr r3, [pc, #88] ; 23270 <== NOT EXECUTED 23214: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 23218: e92d4010 push {r4, lr} <== NOT EXECUTED 2321c: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 23220: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 23224: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 23228: e3530000 cmp r3, #0 <== NOT EXECUTED 2322c: 0a000004 beq 23244 <== NOT EXECUTED 23230: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23234: e3530000 cmp r3, #0 <== NOT EXECUTED 23238: 12800004 addne r0, r0, #4 <== NOT EXECUTED 2323c: 11a0e00f movne lr, pc <== NOT EXECUTED 23240: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 23244: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 23248: e3530000 cmp r3, #0 <== NOT EXECUTED 2324c: 0a000004 beq 23264 <== NOT EXECUTED 23250: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23254: e3530000 cmp r3, #0 <== NOT EXECUTED 23258: 12840018 addne r0, r4, #24 <== NOT EXECUTED 2325c: 11a0e00f movne lr, pc <== NOT EXECUTED 23260: 112fff13 bxne r3 <== NOT EXECUTED free(env); 23264: e1a00004 mov r0, r4 <== NOT EXECUTED } } 23268: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 2326c: eaff87e3 b 5200 <== NOT EXECUTED 23270: 00060d00 .word 0x00060d00 00017884 : int fstat( int fd, struct stat *sbuf ) { 17884: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 17888: e2515000 subs r5, r1, #0 1788c: 1a000002 bne 1789c rtems_set_errno_and_return_minus_one( EFAULT ); 17890: ebffd430 bl c958 <__errno> 17894: e3a0300e mov r3, #14 17898: ea000014 b 178f0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 1789c: e59f3080 ldr r3, [pc, #128] ; 17924 178a0: e5933000 ldr r3, [r3] 178a4: e1500003 cmp r0, r3 178a8: 2a000008 bcs 178d0 178ac: e59f3074 ldr r3, [pc, #116] ; 17928 178b0: e5934000 ldr r4, [r3] 178b4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 178b8: e5943014 ldr r3, [r4, #20] 178bc: e3130c01 tst r3, #256 ; 0x100 178c0: 0a000002 beq 178d0 if ( !iop->handlers ) 178c4: e594303c ldr r3, [r4, #60] ; 0x3c 178c8: e3530000 cmp r3, #0 178cc: 1a000002 bne 178dc rtems_set_errno_and_return_minus_one( EBADF ); 178d0: ebffd420 bl c958 <__errno> 178d4: e3a03009 mov r3, #9 178d8: ea000004 b 178f0 if ( !iop->handlers->fstat_h ) 178dc: e5933018 ldr r3, [r3, #24] 178e0: e3530000 cmp r3, #0 178e4: 1a000004 bne 178fc rtems_set_errno_and_return_minus_one( ENOTSUP ); 178e8: ebffd41a bl c958 <__errno> <== NOT EXECUTED 178ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 178f0: e5803000 str r3, [r0] 178f4: e3e00000 mvn r0, #0 178f8: 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) ); 178fc: e3a01000 mov r1, #0 17900: e3a02048 mov r2, #72 ; 0x48 17904: e1a00005 mov r0, r5 17908: ebffd65c bl d280 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 1790c: e2840018 add r0, r4, #24 17910: e1a01005 mov r1, r5 17914: e594303c ldr r3, [r4, #60] ; 0x3c 17918: e1a0e00f mov lr, pc 1791c: e593f018 ldr pc, [r3, #24] } 17920: e8bd8030 pop {r4, r5, pc} 17924: 000183a0 .word 0x000183a0 17928: 00019b84 .word 0x00019b84 0002204c : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2204c: e59f307c ldr r3, [pc, #124] ; 220d0 22050: e5933000 ldr r3, [r3] 22054: e1500003 cmp r0, r3 #include int fsync( int fd ) { 22058: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2205c: 2a00000d bcs 22098 iop = rtems_libio_iop( fd ); 22060: e59f306c ldr r3, [pc, #108] ; 220d4 22064: e5933000 ldr r3, [r3] 22068: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 2206c: e5903014 ldr r3, [r0, #20] 22070: e3130c01 tst r3, #256 ; 0x100 22074: 0a000007 beq 22098 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 22078: e3130004 tst r3, #4 2207c: 1a000002 bne 2208c 22080: eb005c0f bl 390c4 <__errno> 22084: e3a03016 mov r3, #22 22088: ea00000a b 220b8 /* * Now process the fsync(). */ if ( !iop->handlers ) 2208c: e590303c ldr r3, [r0, #60] ; 0x3c 22090: e3530000 cmp r3, #0 22094: 1a000002 bne 220a4 rtems_set_errno_and_return_minus_one( EBADF ); 22098: eb005c09 bl 390c4 <__errno> <== NOT EXECUTED 2209c: e3a03009 mov r3, #9 <== NOT EXECUTED 220a0: ea000004 b 220b8 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 220a4: e5933028 ldr r3, [r3, #40] ; 0x28 220a8: e3530000 cmp r3, #0 220ac: 1a000004 bne 220c4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 220b0: eb005c03 bl 390c4 <__errno> 220b4: e3a03086 mov r3, #134 ; 0x86 220b8: e5803000 str r3, [r0] 220bc: e3e00000 mvn r0, #0 220c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 220c4: e1a0e00f mov lr, pc 220c8: e12fff13 bx r3 } 220cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) 220d0: 000531e0 .word 0x000531e0 220d4: 00060ca4 .word 0x00060ca4 000087fc : int ftruncate( int fd, off_t length ) { 87fc: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8800: e59f30d4 ldr r3, [pc, #212] ; 88dc 8804: e5933000 ldr r3, [r3] 8808: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 880c: e24dd014 sub sp, sp, #20 8810: e1a05001 mov r5, r1 8814: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8818: 2a000005 bcs 8834 iop = rtems_libio_iop( fd ); 881c: e59f30bc ldr r3, [pc, #188] ; 88e0 8820: e5934000 ldr r4, [r3] 8824: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 8828: e5943014 ldr r3, [r4, #20] 882c: e3130c01 tst r3, #256 ; 0x100 8830: 1a000002 bne 8840 8834: eb001047 bl c958 <__errno> <== NOT EXECUTED 8838: e3a03009 mov r3, #9 <== NOT EXECUTED 883c: ea00001c b 88b4 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8840: e284e018 add lr, r4, #24 8844: e8be000f ldm lr!, {r0, r1, r2, r3} 8848: e1a0c00d mov ip, sp 884c: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 8850: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8854: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 8858: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 885c: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 8860: 0a000011 beq 88ac rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 8864: e1a0000d mov r0, sp 8868: e1a0e00f mov lr, pc 886c: e12fff13 bx r3 8870: e3500001 cmp r0, #1 8874: 1a000002 bne 8884 rtems_set_errno_and_return_minus_one( EISDIR ); 8878: eb001036 bl c958 <__errno> 887c: e3a03015 mov r3, #21 8880: ea00000b b 88b4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8884: e5943014 ldr r3, [r4, #20] 8888: e3130004 tst r3, #4 888c: 1a000002 bne 889c 8890: eb001030 bl c958 <__errno> <== NOT EXECUTED 8894: e3a03016 mov r3, #22 <== NOT EXECUTED 8898: ea000005 b 88b4 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 889c: e594303c ldr r3, [r4, #60] ; 0x3c 88a0: e5933020 ldr r3, [r3, #32] 88a4: e3530000 cmp r3, #0 88a8: 1a000004 bne 88c0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 88ac: eb001029 bl c958 <__errno> <== NOT EXECUTED 88b0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 88b4: e5803000 str r3, [r0] 88b8: e3e00000 mvn r0, #0 88bc: ea000004 b 88d4 return (*iop->handlers->ftruncate_h)( iop, length ); 88c0: e1a00004 mov r0, r4 88c4: e1a01005 mov r1, r5 88c8: e1a02006 mov r2, r6 88cc: e1a0e00f mov lr, pc 88d0: e12fff13 bx r3 } 88d4: e28dd014 add sp, sp, #20 88d8: e8bd8070 pop {r4, r5, r6, pc} 88dc: 000183a0 .word 0x000183a0 88e0: 00019b84 .word 0x00019b84 00052bc8 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 52bc8: e59f30a8 ldr r3, [pc, #168] ; 52c78 52bcc: e5933000 ldr r3, [r3] 52bd0: e1500003 cmp r0, r3 52bd4: 359f30a0 ldrcc r3, [pc, #160] ; 52c7c int getdents( int dd_fd, char *dd_buf, int dd_len ) { 52bd8: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 52bdc: 35934000 ldrcc r4, [r3] 52be0: 23a04000 movcs r4, #0 52be4: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52be8: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 52bec: e24dd014 sub sp, sp, #20 52bf0: e1a06001 mov r6, r1 52bf4: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52bf8: e8be000f ldm lr!, {r0, r1, r2, r3} 52bfc: e1a0c00d mov ip, sp 52c00: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 52c04: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52c08: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 52c0c: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52c10: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 52c14: 0a00000d beq 52c50 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 52c18: e1a0000d mov r0, sp 52c1c: e1a0e00f mov lr, pc 52c20: e12fff13 bx r3 52c24: e3500001 cmp r0, #1 52c28: 0a000004 beq 52c40 rtems_set_errno_and_return_minus_one( ENOTDIR ); 52c2c: ebff9924 bl 390c4 <__errno> 52c30: e3a03014 mov r3, #20 52c34: e5803000 str r3, [r0] 52c38: e3e00000 mvn r0, #0 52c3c: ea00000b b 52c70 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 52c40: e594303c ldr r3, [r4, #60] ; 0x3c 52c44: e5933008 ldr r3, [r3, #8] 52c48: e3530000 cmp r3, #0 52c4c: 1a000002 bne 52c5c rtems_set_errno_and_return_minus_one( ENOTSUP ); 52c50: ebff991b bl 390c4 <__errno> <== NOT EXECUTED 52c54: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 52c58: eafffff5 b 52c34 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 52c5c: e1a00004 mov r0, r4 52c60: e1a01006 mov r1, r6 52c64: e1a02005 mov r2, r5 52c68: e1a0e00f mov lr, pc 52c6c: e12fff13 bx r3 } 52c70: e28dd014 add sp, sp, #20 52c74: e8bd8070 pop {r4, r5, r6, pc} 52c78: 000531e0 .word 0x000531e0 52c7c: 00060ca4 .word 0x00060ca4 000221e8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 221e8: e59f3008 ldr r3, [pc, #8] ; 221f8 <== NOT EXECUTED 221ec: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 221f0: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 221f4: e12fff1e bx lr <== NOT EXECUTED 221f8: 000534b8 .word 0x000534b8 00022800 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 22800: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 22804: e59da01c ldr sl, [sp, #28] 22808: e1a06000 mov r6, r0 2280c: e1a07001 mov r7, r1 22810: e1a04002 mov r4, r2 22814: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 22818: ebffffb7 bl 226fc if ((fp = fopen("/etc/group", "r")) == NULL) { 2281c: e59f00a4 ldr r0, [pc, #164] ; 228c8 22820: e59f10a4 ldr r1, [pc, #164] ; 228cc 22824: eb005c96 bl 39a84 22828: e2505000 subs r5, r0, #0 2282c: 1a000003 bne 22840 errno = EINVAL; 22830: eb005a23 bl 390c4 <__errno> <== NOT EXECUTED 22834: e3a03016 mov r3, #22 <== NOT EXECUTED 22838: e5803000 str r3, [r0] <== NOT EXECUTED 2283c: ea00000c b 22874 <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 22840: e1a01004 mov r1, r4 22844: e1a02008 mov r2, r8 22848: e1a0300a mov r3, sl 2284c: e1a00005 mov r0, r5 22850: ebfffef2 bl 22420 22854: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 22858: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 2285c: 1a000006 bne 2287c errno = EINVAL; 22860: eb005a17 bl 390c4 <__errno> <== NOT EXECUTED 22864: e3a03016 mov r3, #22 <== NOT EXECUTED 22868: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 2286c: e1a00005 mov r0, r5 <== NOT EXECUTED 22870: eb005a60 bl 391f8 <== NOT EXECUTED 22874: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 22878: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 2287c: e3560000 cmp r6, #0 22880: 0a000004 beq 22898 match = (strcmp(grp->gr_name, name) == 0); 22884: e5940000 ldr r0, [r4] 22888: eb007230 bl 3f150 2288c: e2700001 rsbs r0, r0, #1 22890: 33a00000 movcc r0, #0 22894: ea000003 b 228a8 } else { match = (grp->gr_gid == gid); 22898: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 2289c: e1500007 cmp r0, r7 <== NOT EXECUTED 228a0: 13a00000 movne r0, #0 <== NOT EXECUTED 228a4: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 228a8: e3500000 cmp r0, #0 228ac: 0affffe3 beq 22840 fclose(fp); 228b0: e1a00005 mov r0, r5 228b4: eb005a4f bl 391f8 *result = grp; 228b8: e59d3020 ldr r3, [sp, #32] 228bc: e3a00000 mov r0, #0 228c0: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 228c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 228c8: 00057694 .word 0x00057694 228cc: 0005840c .word 0x0005840c 00022558 : return NULL; return p; } struct group *getgrent(void) { 22558: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 2255c: e59f402c ldr r4, [pc, #44] ; 22590 <== NOT EXECUTED 22560: e5940000 ldr r0, [r4] <== NOT EXECUTED 22564: e3500000 cmp r0, #0 <== NOT EXECUTED 22568: 0a000006 beq 22588 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 2256c: e2841008 add r1, r4, #8 <== NOT EXECUTED 22570: e2842018 add r2, r4, #24 <== NOT EXECUTED 22574: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22578: ebffffa8 bl 22420 <== NOT EXECUTED 2257c: e3500000 cmp r0, #0 <== NOT EXECUTED 22580: 12840008 addne r0, r4, #8 <== NOT EXECUTED 22584: 18bd8010 popne {r4, pc} <== NOT EXECUTED 22588: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 2258c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 22590: 000609b8 .word 0x000609b8 00022904 : struct group *getgrgid( gid_t gid ) { 22904: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 22908: e59f1028 ldr r1, [pc, #40] ; 22938 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 2290c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 22910: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22914: e2812010 add r2, r1, #16 <== NOT EXECUTED 22918: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2291c: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22920: e58dc000 str ip, [sp] <== NOT EXECUTED 22924: ebffffe9 bl 228d0 <== NOT EXECUTED 22928: e3500000 cmp r0, #0 <== NOT EXECUTED 2292c: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 22930: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 22934: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 22938: 000609c0 .word 0x000609c0 000228d0 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 228d0: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 228d4: e1a0c002 mov ip, r2 <== NOT EXECUTED 228d8: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 228dc: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 228e0: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 228e4: e1a0300c mov r3, ip <== NOT EXECUTED 228e8: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 228ec: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 228f0: e1a0200e mov r2, lr <== NOT EXECUTED 228f4: e3a00000 mov r0, #0 <== NOT EXECUTED 228f8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 228fc: ebffffbf bl 22800 <== NOT EXECUTED } 22900: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 000229d0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 229d0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 229d4: e59da01c ldr sl, [sp, #28] 229d8: e1a06000 mov r6, r0 229dc: e1a07001 mov r7, r1 229e0: e1a04002 mov r4, r2 229e4: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 229e8: ebffff43 bl 226fc if ((fp = fopen("/etc/passwd", "r")) == NULL) { 229ec: e59f00a4 ldr r0, [pc, #164] ; 22a98 229f0: e59f10a4 ldr r1, [pc, #164] ; 22a9c 229f4: eb005c22 bl 39a84 229f8: e2505000 subs r5, r0, #0 229fc: 1a000003 bne 22a10 errno = EINVAL; 22a00: eb0059af bl 390c4 <__errno> <== NOT EXECUTED 22a04: e3a03016 mov r3, #22 <== NOT EXECUTED 22a08: e5803000 str r3, [r0] <== NOT EXECUTED 22a0c: ea00000c b 22a44 <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22a10: e1a01004 mov r1, r4 22a14: e1a02008 mov r2, r8 22a18: e1a0300a mov r3, sl 22a1c: e1a00005 mov r0, r5 22a20: ebfffedb bl 22594 22a24: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 22a28: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22a2c: 1a000006 bne 22a4c errno = EINVAL; 22a30: eb0059a3 bl 390c4 <__errno> <== NOT EXECUTED 22a34: e3a03016 mov r3, #22 <== NOT EXECUTED 22a38: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 22a3c: e1a00005 mov r0, r5 <== NOT EXECUTED 22a40: eb0059ec bl 391f8 <== NOT EXECUTED 22a44: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 22a48: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 22a4c: e3560000 cmp r6, #0 22a50: 0a000004 beq 22a68 match = (strcmp(pwd->pw_name, name) == 0); 22a54: e5940000 ldr r0, [r4] 22a58: eb0071bc bl 3f150 22a5c: e2700001 rsbs r0, r0, #1 22a60: 33a00000 movcc r0, #0 22a64: ea000003 b 22a78 } else { match = (pwd->pw_uid == uid); 22a68: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 22a6c: e1500007 cmp r0, r7 <== NOT EXECUTED 22a70: 13a00000 movne r0, #0 <== NOT EXECUTED 22a74: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 22a78: e3500000 cmp r0, #0 22a7c: 0affffe3 beq 22a10 fclose(fp); 22a80: e1a00005 mov r0, r5 22a84: eb0059db bl 391f8 *result = pwd; 22a88: e59d3020 ldr r3, [sp, #32] 22a8c: e3a00000 mov r0, #0 22a90: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 22a94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 22a98: 000575e6 .word 0x000575e6 22a9c: 0005840c .word 0x0005840c 000226c0 : return NULL; return p; } struct passwd *getpwent(void) { 226c0: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 226c4: e59f402c ldr r4, [pc, #44] ; 226f8 <== NOT EXECUTED 226c8: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 226cc: e3500000 cmp r0, #0 <== NOT EXECUTED 226d0: 0a000006 beq 226f0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 226d4: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 226d8: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 226dc: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 226e0: ebffffab bl 22594 <== NOT EXECUTED 226e4: e3500000 cmp r0, #0 <== NOT EXECUTED 226e8: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 226ec: 18bd8010 popne {r4, pc} <== NOT EXECUTED 226f0: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 226f4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 226f8: 000609b8 .word 0x000609b8 00022ad4 : struct passwd *getpwuid( uid_t uid ) { 22ad4: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22ad8: e59f1028 ldr r1, [pc, #40] ; 22b08 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 22adc: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22ae0: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22ae4: e281201c add r2, r1, #28 <== NOT EXECUTED 22ae8: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22aec: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22af0: e58dc000 str ip, [sp] <== NOT EXECUTED 22af4: ebffffe9 bl 22aa0 <== NOT EXECUTED 22af8: e3500000 cmp r0, #0 <== NOT EXECUTED 22afc: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 22b00: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 22b04: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 22b08: 00060a98 .word 0x00060a98 00022aa0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22aa0: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22aa4: e1a0c002 mov ip, r2 <== NOT EXECUTED 22aa8: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22aac: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22ab0: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22ab4: e1a0300c mov r3, ip <== NOT EXECUTED 22ab8: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22abc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22ac0: e1a0200e mov r2, lr <== NOT EXECUTED 22ac4: e3a00000 mov r0, #0 <== NOT EXECUTED 22ac8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22acc: ebffffbf bl 229d0 <== NOT EXECUTED } 22ad0: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 0000890c : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 890c: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 8910: e2504000 subs r4, r0, #0 8914: 1a000004 bne 892c errno = EFAULT; 8918: eb00100e bl c958 <__errno> <== NOT EXECUTED 891c: e3a0300e mov r3, #14 <== NOT EXECUTED 8920: e5803000 str r3, [r0] <== NOT EXECUTED 8924: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 8928: ea00000c b 8960 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 892c: e10f5000 mrs r5, CPSR 8930: e3853080 orr r3, r5, #128 ; 0x80 8934: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 8938: e1a0000d mov r0, sp 893c: eb0004de bl 9cbc <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 8940: 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; 8944: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 8948: e59d0004 ldr r0, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 894c: 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; 8950: e5843000 str r3, [r4] time->tv_usec = useconds; 8954: eb0035b6 bl 16034 <__aeabi_idiv> 8958: e5840004 str r0, [r4, #4] 895c: 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; } 8960: e8bd803c pop {r2, r3, r4, r5, pc} 0000530c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 530c: e59f3008 ldr r3, [pc, #8] ; 531c <== NOT EXECUTED 5310: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 5314: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 5318: e12fff1e bx lr <== NOT EXECUTED 531c: 000534b8 .word 0x000534b8 00004abc : int ioctl( int fd, ioctl_command_t command, ... ) { 4abc: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ac0: e59f3080 ldr r3, [pc, #128] ; 4b48 4ac4: e5933000 ldr r3, [r3] 4ac8: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 4acc: e92d4001 push {r0, lr} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ad0: 2a00000b bcs 4b04 iop = rtems_libio_iop( fd ); 4ad4: e59f3070 ldr r3, [pc, #112] ; 4b4c 4ad8: e5933000 ldr r3, [r3] 4adc: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 4ae0: e5903014 ldr r3, [r0, #20] 4ae4: e3130c01 tst r3, #256 ; 0x100 4ae8: 0a000005 beq 4b04 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4aec: 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 *); 4af0: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4af4: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 4af8: e58d2000 str r2, [sp] 4afc: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 4b00: 1a000002 bne 4b10 rtems_set_errno_and_return_minus_one( EBADF ); 4b04: eb00345b bl 11c78 <__errno> 4b08: e3a03009 mov r3, #9 4b0c: ea000004 b 4b24 if ( !iop->handlers->ioctl_h ) 4b10: e5933010 ldr r3, [r3, #16] 4b14: e3530000 cmp r3, #0 4b18: 1a000004 bne 4b30 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b1c: eb003455 bl 11c78 <__errno> <== NOT EXECUTED 4b20: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4b24: e5803000 str r3, [r0] 4b28: e3e00000 mvn r0, #0 4b2c: ea000002 b 4b3c rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4b30: e59d1008 ldr r1, [sp, #8] 4b34: e1a0e00f mov lr, pc 4b38: e12fff13 bx r3 return rc; } 4b3c: e8bd4008 pop {r3, lr} 4b40: e28dd00c add sp, sp, #12 4b44: e12fff1e bx lr 4b48: 0001db90 .word 0x0001db90 4b4c: 0001f7b4 .word 0x0001f7b4 000028a4 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 28a4: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 28a8: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28ac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 28b0: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 28b4: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 28b8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28bc: e1a04001 mov r4, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 28c0: 0a000007 beq 28e4 <== NOT EXECUTED c = tolower (c); 28c4: e59f2164 ldr r2, [pc, #356] ; 2a30 <== NOT EXECUTED 28c8: e5922000 ldr r2, [r2] <== NOT EXECUTED 28cc: e0822005 add r2, r2, r5 <== NOT EXECUTED 28d0: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 28d4: e2022003 and r2, r2, #3 <== NOT EXECUTED 28d8: e3520001 cmp r2, #1 <== NOT EXECUTED 28dc: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 28e0: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 28e4: e355000d cmp r5, #13 <== NOT EXECUTED 28e8: 1a000005 bne 2904 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 28ec: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 28f0: 1a00004c bne 2a28 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 28f4: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 28f8: 03a0500d moveq r5, #13 <== NOT EXECUTED 28fc: 13a0500a movne r5, #10 <== NOT EXECUTED 2900: ea000007 b 2924 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 2904: e355000a cmp r5, #10 <== NOT EXECUTED 2908: 1a000003 bne 291c <== NOT EXECUTED 290c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 2910: 03a0500a moveq r5, #10 <== NOT EXECUTED 2914: 13a0500d movne r5, #13 <== NOT EXECUTED 2918: ea000001 b 2924 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 291c: e3550000 cmp r5, #0 <== NOT EXECUTED 2920: 0a00002e beq 29e0 <== NOT EXECUTED 2924: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2928: e3130002 tst r3, #2 <== NOT EXECUTED 292c: 0a00002b beq 29e0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2930: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 2934: e1520005 cmp r2, r5 <== NOT EXECUTED erase (tty, 0); 2938: 01a00004 moveq r0, r4 <== NOT EXECUTED 293c: 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]) { 2940: 0a000004 beq 2958 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2944: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 2948: e1520005 cmp r2, r5 <== NOT EXECUTED 294c: 1a000003 bne 2960 <== NOT EXECUTED erase (tty, 1); 2950: e1a00004 mov r0, r4 <== NOT EXECUTED 2954: e3a01001 mov r1, #1 <== NOT EXECUTED 2958: ebffff5e bl 26d8 <== NOT EXECUTED 295c: ea00002f b 2a20 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2960: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 2964: e1520005 cmp r2, r5 <== NOT EXECUTED 2968: 0a00001a beq 29d8 <== NOT EXECUTED return 1; } else if (c == '\n') { 296c: e355000a cmp r5, #10 <== NOT EXECUTED 2970: 1a000009 bne 299c <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 2974: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2978: 11a00005 movne r0, r5 <== NOT EXECUTED 297c: 11a01004 movne r1, r4 <== NOT EXECUTED 2980: 1bffff34 blne 2658 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2984: e284101c add r1, r4, #28 <== NOT EXECUTED 2988: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 298c: e3a0000a mov r0, #10 <== NOT EXECUTED 2990: e2832001 add r2, r3, #1 <== NOT EXECUTED 2994: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 2998: ea00000d b 29d4 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 299c: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 29a0: e1520005 cmp r2, r5 <== NOT EXECUTED 29a4: 0a000002 beq 29b4 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 29a8: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 29ac: e1520005 cmp r2, r5 <== NOT EXECUTED 29b0: 1a00000a bne 29e0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29b4: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 29b8: 11a00005 movne r0, r5 <== NOT EXECUTED 29bc: 11a01004 movne r1, r4 <== NOT EXECUTED 29c0: 1bffff24 blne 2658 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 29c4: e284101c add r1, r4, #28 <== NOT EXECUTED 29c8: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 29cc: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 29d0: e2832001 add r2, r3, #1 <== NOT EXECUTED 29d4: e5842020 str r2, [r4, #32] <== NOT EXECUTED 29d8: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 29dc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 29e0: e59f304c ldr r3, [pc, #76] ; 2a34 <== NOT EXECUTED 29e4: e5933000 ldr r3, [r3] <== NOT EXECUTED 29e8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 29ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED 29f0: e1520003 cmp r2, r3 <== NOT EXECUTED 29f4: aa00000b bge 2a28 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29f8: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 29fc: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 2a00: 11a00005 movne r0, r5 <== NOT EXECUTED 2a04: 11a01004 movne r1, r4 <== NOT EXECUTED 2a08: 1bffff12 blne 2658 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2a0c: e284101c add r1, r4, #28 <== NOT EXECUTED 2a10: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2a14: e2832001 add r2, r3, #1 <== NOT EXECUTED 2a18: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 2a1c: e5842020 str r2, [r4, #32] <== NOT EXECUTED 2a20: e3a00000 mov r0, #0 <== NOT EXECUTED 2a24: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a28: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 2a2c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a30: 000185e0 .word 0x000185e0 2a34: 00018524 .word 0x00018524 00022bf8 : int link( const char *existing, const char *new ) { 22bf8: e92d4030 push {r4, r5, lr} 22bfc: e24dd030 sub sp, sp, #48 ; 0x30 22c00: e1a04001 mov r4, r1 22c04: e1a05000 mov r5, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 22c08: eb0073b8 bl 3faf0 22c0c: e3a0c001 mov ip, #1 22c10: e1a01000 mov r1, r0 22c14: e3a02000 mov r2, #0 22c18: e1a00005 mov r0, r5 22c1c: e28d3018 add r3, sp, #24 22c20: e58dc000 str ip, [sp] 22c24: ebff8942 bl 5134 0, &existing_loc, true ); if ( result != 0 ) 22c28: e3500000 cmp r0, #0 22c2c: 1a00002a bne 22cdc /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 22c30: e5d43000 ldrb r3, [r4] 22c34: e353002f cmp r3, #47 ; 0x2f 22c38: 1353005c cmpne r3, #92 ; 0x5c 22c3c: 13a05000 movne r5, #0 22c40: 03a05001 moveq r5, #1 22c44: 0a000001 beq 22c50 22c48: e3530000 cmp r3, #0 22c4c: 1a000009 bne 22c78 22c50: e59f31ec ldr r3, [pc, #492] ; 22e44 22c54: e593e000 ldr lr, [r3] 22c58: e28ee018 add lr, lr, #24 22c5c: e8be000f ldm lr!, {r0, r1, r2, r3} 22c60: e28dc004 add ip, sp, #4 22c64: e8ac000f stmia ip!, {r0, r1, r2, r3} 22c68: e59e3000 ldr r3, [lr] 22c6c: e3a00001 mov r0, #1 22c70: e58c3000 str r3, [ip] 22c74: ea000008 b 22c9c 22c78: e59f31c4 ldr r3, [pc, #452] ; 22e44 22c7c: e593e000 ldr lr, [r3] 22c80: e28ee004 add lr, lr, #4 22c84: e8be000f ldm lr!, {r0, r1, r2, r3} 22c88: e28dc004 add ip, sp, #4 22c8c: e8ac000f stmia ip!, {r0, r1, r2, r3} 22c90: e59e3000 ldr r3, [lr] 22c94: e58c3000 str r3, [ip] 22c98: e1a00005 mov r0, r5 if ( !parent_loc.ops->evalformake_h ) { 22c9c: e59d3010 ldr r3, [sp, #16] 22ca0: e5933004 ldr r3, [r3, #4] 22ca4: e3530000 cmp r3, #0 22ca8: 1a00000d bne 22ce4 rtems_filesystem_freenode( &existing_loc ); 22cac: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22cb0: e3530000 cmp r3, #0 <== NOT EXECUTED 22cb4: 0a000005 beq 22cd0 <== NOT EXECUTED 22cb8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22cbc: e3530000 cmp r3, #0 <== NOT EXECUTED 22cc0: 0a000002 beq 22cd0 <== NOT EXECUTED 22cc4: e28d0018 add r0, sp, #24 <== NOT EXECUTED 22cc8: e1a0e00f mov lr, pc <== NOT EXECUTED 22ccc: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22cd0: eb0058fb bl 390c4 <__errno> <== NOT EXECUTED 22cd4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22cd8: e5803000 str r3, [r0] 22cdc: e3e05000 mvn r5, #0 22ce0: ea000054 b 22e38 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 22ce4: e28d5004 add r5, sp, #4 22ce8: e0840000 add r0, r4, r0 22cec: e1a01005 mov r1, r5 22cf0: e28d202c add r2, sp, #44 ; 0x2c 22cf4: e1a0e00f mov lr, pc 22cf8: e12fff13 bx r3 if ( result != 0 ) { 22cfc: e2504000 subs r4, r0, #0 22d00: 0a00000a beq 22d30 rtems_filesystem_freenode( &existing_loc ); 22d04: e59d3024 ldr r3, [sp, #36] ; 0x24 22d08: e3530000 cmp r3, #0 22d0c: 0a000004 beq 22d24 22d10: e593301c ldr r3, [r3, #28] 22d14: e3530000 cmp r3, #0 22d18: 128d0018 addne r0, sp, #24 22d1c: 11a0e00f movne lr, pc 22d20: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 22d24: eb0058e6 bl 390c4 <__errno> 22d28: e5804000 str r4, [r0] 22d2c: eaffffea b 22cdc /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 22d30: e59d3028 ldr r3, [sp, #40] ; 0x28 22d34: e59d2014 ldr r2, [sp, #20] 22d38: e1520003 cmp r2, r3 22d3c: 0a000012 beq 22d8c rtems_filesystem_freenode( &existing_loc ); 22d40: e59d3024 ldr r3, [sp, #36] ; 0x24 22d44: e3530000 cmp r3, #0 22d48: 0a000004 beq 22d60 22d4c: e593301c ldr r3, [r3, #28] 22d50: e3530000 cmp r3, #0 22d54: 128d0018 addne r0, sp, #24 22d58: 11a0e00f movne lr, pc 22d5c: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22d60: e59d3010 ldr r3, [sp, #16] 22d64: e3530000 cmp r3, #0 22d68: 0a000004 beq 22d80 22d6c: e593301c ldr r3, [r3, #28] 22d70: e3530000 cmp r3, #0 22d74: 128d0004 addne r0, sp, #4 22d78: 11a0e00f movne lr, pc 22d7c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 22d80: eb0058cf bl 390c4 <__errno> 22d84: e3a03012 mov r3, #18 22d88: eaffffd2 b 22cd8 } if ( !parent_loc.ops->link_h ) { 22d8c: e59d3010 ldr r3, [sp, #16] 22d90: e5933008 ldr r3, [r3, #8] 22d94: e3530000 cmp r3, #0 22d98: 1a00000f bne 22ddc rtems_filesystem_freenode( &existing_loc ); 22d9c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22da0: e3530000 cmp r3, #0 <== NOT EXECUTED 22da4: 0a000004 beq 22dbc <== NOT EXECUTED 22da8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22dac: e3530000 cmp r3, #0 <== NOT EXECUTED 22db0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 22db4: 11a0e00f movne lr, pc <== NOT EXECUTED 22db8: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 22dbc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22dc0: e3530000 cmp r3, #0 <== NOT EXECUTED 22dc4: 0affffc1 beq 22cd0 <== NOT EXECUTED 22dc8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22dcc: e3530000 cmp r3, #0 <== NOT EXECUTED 22dd0: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 22dd4: 1affffbb bne 22cc8 <== NOT EXECUTED 22dd8: eaffffbc b 22cd0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 22ddc: e28d4018 add r4, sp, #24 22de0: e1a01005 mov r1, r5 22de4: e1a00004 mov r0, r4 22de8: e59d202c ldr r2, [sp, #44] ; 0x2c 22dec: e1a0e00f mov lr, pc 22df0: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 22df4: e59d3024 ldr r3, [sp, #36] ; 0x24 22df8: 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 ); 22dfc: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 22e00: 0a000004 beq 22e18 22e04: e593301c ldr r3, [r3, #28] 22e08: e3530000 cmp r3, #0 22e0c: 11a00004 movne r0, r4 22e10: 11a0e00f movne lr, pc 22e14: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22e18: e59d3010 ldr r3, [sp, #16] 22e1c: e3530000 cmp r3, #0 22e20: 0a000004 beq 22e38 22e24: e593301c ldr r3, [r3, #28] 22e28: e3530000 cmp r3, #0 22e2c: 128d0004 addne r0, sp, #4 22e30: 11a0e00f movne lr, pc 22e34: 112fff13 bxne r3 return result; } 22e38: e1a00005 mov r0, r5 22e3c: e28dd030 add sp, sp, #48 ; 0x30 22e40: e8bd8030 pop {r4, r5, pc} 22e44: 000534b8 .word 0x000534b8 00017940 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17940: e59fc0ec ldr ip, [pc, #236] ; 17a34 17944: e59cc000 ldr ip, [ip] 17948: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 1794c: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17950: 2a000005 bcs 1796c iop = rtems_libio_iop( fd ); 17954: e59fc0dc ldr ip, [pc, #220] ; 17a38 17958: e59c4000 ldr r4, [ip] 1795c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 17960: e5940014 ldr r0, [r4, #20] 17964: e3100c01 tst r0, #256 ; 0x100 17968: 1a000002 bne 17978 1796c: ebffd3f9 bl c958 <__errno> 17970: e3a03009 mov r3, #9 17974: ea00001c b 179ec /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 17978: e594003c ldr r0, [r4, #60] ; 0x3c 1797c: e5900014 ldr r0, [r0, #20] 17980: e3500000 cmp r0, #0 17984: 1a000002 bne 17994 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17988: ebffd3f2 bl c958 <__errno> <== NOT EXECUTED 1798c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17990: ea000015 b 179ec <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 17994: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 17998: e284600c add r6, r4, #12 1799c: e8960060 ldm r6, {r5, r6} switch ( whence ) { 179a0: 0a000006 beq 179c0 179a4: e3530002 cmp r3, #2 179a8: 0a000007 beq 179cc 179ac: e3530000 cmp r3, #0 179b0: 1a00000b bne 179e4 case SEEK_SET: iop->offset = offset; 179b4: e584100c str r1, [r4, #12] 179b8: e5842010 str r2, [r4, #16] break; 179bc: ea00000e b 179fc case SEEK_CUR: iop->offset += offset; 179c0: e091b005 adds fp, r1, r5 179c4: e0a2c006 adc ip, r2, r6 179c8: ea000002 b 179d8 break; case SEEK_END: iop->offset = iop->size + offset; 179cc: e9941800 ldmib r4, {fp, ip} 179d0: e09bb001 adds fp, fp, r1 179d4: e0acc002 adc ip, ip, r2 179d8: e584b00c str fp, [r4, #12] 179dc: e584c010 str ip, [r4, #16] break; 179e0: ea000005 b 179fc default: rtems_set_errno_and_return_minus_one( EINVAL ); 179e4: ebffd3db bl c958 <__errno> 179e8: e3a03016 mov r3, #22 179ec: e5803000 str r3, [r0] 179f0: e3e02000 mvn r2, #0 179f4: e3e03000 mvn r3, #0 179f8: ea00000a b 17a28 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 179fc: e594c03c ldr ip, [r4, #60] ; 0x3c 17a00: e1a00004 mov r0, r4 17a04: e1a0e00f mov lr, pc 17a08: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 17a0c: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 17a10: e1a02000 mov r2, r0 17a14: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 17a18: 1a000002 bne 17a28 17a1c: e3710001 cmn r1, #1 iop->offset = old_offset; 17a20: 0584500c streq r5, [r4, #12] 17a24: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17a28: e1a01003 mov r1, r3 17a2c: e1a00002 mov r0, r2 17a30: e8bd8870 pop {r4, r5, r6, fp, pc} 17a34: 000183a0 .word 0x000183a0 17a38: 00019b84 .word 0x00019b84 00022f64 : int _STAT_NAME( const char *path, struct stat *buf ) { 22f64: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22f68: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 22f6c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 22f70: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22f74: 1a000002 bne 22f84 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 22f78: eb005851 bl 390c4 <__errno> <== NOT EXECUTED 22f7c: e3a0300e mov r3, #14 <== NOT EXECUTED 22f80: ea000018 b 22fe8 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 22f84: eb0072d9 bl 3faf0 <== NOT EXECUTED 22f88: e28d4004 add r4, sp, #4 <== NOT EXECUTED 22f8c: e3a0c000 mov ip, #0 <== NOT EXECUTED 22f90: e1a01000 mov r1, r0 <== NOT EXECUTED 22f94: e1a0200c mov r2, ip <== NOT EXECUTED 22f98: e1a00006 mov r0, r6 <== NOT EXECUTED 22f9c: e1a03004 mov r3, r4 <== NOT EXECUTED 22fa0: e58dc000 str ip, [sp] <== NOT EXECUTED 22fa4: ebff8862 bl 5134 <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 22fa8: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22fac: 1a00000e bne 22fec <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 22fb0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22fb4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 22fb8: e3530000 cmp r3, #0 <== NOT EXECUTED 22fbc: 1a00000c bne 22ff4 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22fc0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22fc4: e3530000 cmp r3, #0 <== NOT EXECUTED 22fc8: 0a000004 beq 22fe0 <== NOT EXECUTED 22fcc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22fd0: e3530000 cmp r3, #0 <== NOT EXECUTED 22fd4: 11a00004 movne r0, r4 <== NOT EXECUTED 22fd8: 11a0e00f movne lr, pc <== NOT EXECUTED 22fdc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22fe0: eb005837 bl 390c4 <__errno> <== NOT EXECUTED 22fe4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22fe8: e5803000 str r3, [r0] <== NOT EXECUTED 22fec: e3e05000 mvn r5, #0 <== NOT EXECUTED 22ff0: ea000010 b 23038 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 22ff4: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 22ff8: e1a00005 mov r0, r5 <== NOT EXECUTED 22ffc: eb0064e8 bl 3c3a4 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 23000: e1a01005 mov r1, r5 <== NOT EXECUTED 23004: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 23008: e1a00004 mov r0, r4 <== NOT EXECUTED 2300c: e1a0e00f mov lr, pc <== NOT EXECUTED 23010: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23014: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23018: 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 ); 2301c: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23020: 0a000004 beq 23038 <== NOT EXECUTED 23024: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23028: e3530000 cmp r3, #0 <== NOT EXECUTED 2302c: 11a00004 movne r0, r4 <== NOT EXECUTED 23030: 11a0e00f movne lr, pc <== NOT EXECUTED 23034: 112fff13 bxne r3 <== NOT EXECUTED return status; } 23038: e1a00005 mov r0, r5 <== NOT EXECUTED 2303c: e28dd018 add sp, sp, #24 <== NOT EXECUTED 23040: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00008c80 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8c80: e59f30d8 ldr r3, [pc, #216] ; 8d60 8c84: e5932004 ldr r2, [r3, #4] 8c88: e2822001 add r2, r2, #1 8c8c: e92d4070 push {r4, r5, r6, lr} 8c90: e5832004 str r2, [r3, #4] 8c94: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8c98: ebffffef bl 8c5c /* * Validate the parameters */ if ( !size ) 8c9c: e3540000 cmp r4, #0 8ca0: 0a00002b beq 8d54 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8ca4: e59f30b8 ldr r3, [pc, #184] ; 8d64 8ca8: e5933000 ldr r3, [r3] 8cac: e3530003 cmp r3, #3 8cb0: 1a000002 bne 8cc0 8cb4: ebffffd1 bl 8c00 8cb8: e3500000 cmp r0, #0 8cbc: 0a000024 beq 8d54 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8cc0: e59f30a0 ldr r3, [pc, #160] ; 8d68 8cc4: e3a02000 mov r2, #0 8cc8: e5930000 ldr r0, [r3] 8ccc: e1a01004 mov r1, r4 8cd0: e1a03002 mov r3, r2 8cd4: eb000533 bl a1a8 <_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 ) { 8cd8: 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; 8cdc: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 8ce0: 1a00000c bne 8d18 if (rtems_malloc_sbrk_helpers) 8ce4: e59f3080 ldr r3, [pc, #128] ; 8d6c 8ce8: e5933000 ldr r3, [r3] 8cec: e3530000 cmp r3, #0 8cf0: 0a000004 beq 8d08 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8cf4: e1a00004 mov r0, r4 <== NOT EXECUTED 8cf8: e1a0e00f mov lr, pc <== NOT EXECUTED 8cfc: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 8d00: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8d04: 1a000003 bne 8d18 <== NOT EXECUTED errno = ENOMEM; 8d08: eb000f12 bl c958 <__errno> 8d0c: e3a0300c mov r3, #12 8d10: e5803000 str r3, [r0] return (void *) 0; 8d14: ea00000f b 8d58 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8d18: e59f3050 ldr r3, [pc, #80] ; 8d70 8d1c: e5933000 ldr r3, [r3] 8d20: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 8d24: 11a01004 movne r1, r4 8d28: 11a00005 movne r0, r5 8d2c: 11a0e00f movne lr, pc 8d30: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8d34: e59f3038 ldr r3, [pc, #56] ; 8d74 8d38: e5933000 ldr r3, [r3] 8d3c: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8d40: 11a00005 movne r0, r5 8d44: 11a0e00f movne lr, pc 8d48: 1593f004 ldrne pc, [r3, #4] 8d4c: e1a06005 mov r6, r5 8d50: ea000000 b 8d58 8d54: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8d58: e1a00006 mov r0, r6 8d5c: e8bd8070 pop {r4, r5, r6, pc} 8d60: 00019b90 .word 0x00019b90 8d64: 00019e90 .word 0x00019e90 8d68: 000183ac .word 0x000183ac 8d6c: 000199ac .word 0x000199ac 8d70: 000199b0 .word 0x000199b0 8d74: 000199a8 .word 0x000199a8 00008c4c : } void malloc_deferred_free( void *pointer ) { 8c4c: e1a01000 mov r1, r0 <== NOT EXECUTED 8c50: e59f0000 ldr r0, [pc, #0] ; 8c58 <== NOT EXECUTED 8c54: eaffefcd b 4b90 <_Chain_Append> <== NOT EXECUTED 8c58: 0001a1ec .word 0x0001a1ec 00008c5c : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8c5c: 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) 8c60: ea000000 b 8c68 free(to_be_freed); 8c64: ebfffebb bl 8758 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 8c68: e59f000c ldr r0, [pc, #12] ; 8c7c 8c6c: eb0003aa bl 9b1c <_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) 8c70: e3500000 cmp r0, #0 8c74: 1afffffa bne 8c64 free(to_be_freed); } 8c78: e49df004 pop {pc} ; (ldr pc, [sp], #4) 8c7c: 0001a1ec .word 0x0001a1ec 0000fdcc : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { fdcc: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; fdd0: 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 ) fdd4: e5943054 ldr r3, [r4, #84] ; 0x54 fdd8: e1530002 cmp r3, r2 fddc: ba000003 blt fdf0 fde0: 1a000005 bne fdfc fde4: e5943050 ldr r3, [r4, #80] ; 0x50 fde8: e1530001 cmp r3, r1 fdec: 2a000002 bcs fdfc return IMFS_memfile_extend( the_jnode, length ); fdf0: e1a00004 mov r0, r4 <== NOT EXECUTED fdf4: ebffff9a bl fc64 <== NOT EXECUTED fdf8: ea000008 b fe20 <== 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; fdfc: e5841050 str r1, [r4, #80] ; 0x50 fe00: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; fe04: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); fe08: e3a01000 mov r1, #0 fe0c: e1a0000d mov r0, sp fe10: ebffca42 bl 2720 fe14: e59d3000 ldr r3, [sp] fe18: e5843040 str r3, [r4, #64] ; 0x40 fe1c: e3a00000 mov r0, #0 return 0; } fe20: e8bd801c pop {r2, r3, r4, pc} 0000fe24 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { fe24: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; fe28: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { fe2c: e595304c ldr r3, [r5, #76] ; 0x4c fe30: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { fe34: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { fe38: 1a00000b bne fe6c if (iop->offset > the_jnode->info.linearfile.size) fe3c: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED fe40: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED fe44: e1520003 cmp r2, r3 <== NOT EXECUTED fe48: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED fe4c: ca000003 bgt fe60 <== NOT EXECUTED fe50: 1a000014 bne fea8 <== NOT EXECUTED fe54: e590100c ldr r1, [r0, #12] <== NOT EXECUTED fe58: e1510002 cmp r1, r2 <== NOT EXECUTED fe5c: 9a000011 bls fea8 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; fe60: e584200c str r2, [r4, #12] <== NOT EXECUTED fe64: e5843010 str r3, [r4, #16] <== NOT EXECUTED fe68: ea00000e b fea8 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) fe6c: e1a00005 mov r0, r5 fe70: e284200c add r2, r4, #12 fe74: e8920006 ldm r2, {r1, r2} fe78: ebffff79 bl fc64 fe7c: e3500000 cmp r0, #0 fe80: 0a000005 beq fe9c rtems_set_errno_and_return_minus_one( ENOSPC ); fe84: eb000682 bl 11894 <__errno> <== NOT EXECUTED fe88: e3a0301c mov r3, #28 <== NOT EXECUTED fe8c: e5803000 str r3, [r0] <== NOT EXECUTED fe90: e3e04000 mvn r4, #0 <== NOT EXECUTED fe94: e3e03000 mvn r3, #0 <== NOT EXECUTED fe98: ea000004 b feb0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; fe9c: e2853050 add r3, r5, #80 ; 0x50 fea0: e893000c ldm r3, {r2, r3} fea4: e984000c stmib r4, {r2, r3} } return iop->offset; fea8: e284400c add r4, r4, #12 feac: e8940018 ldm r4, {r3, r4} } feb0: e1a01004 mov r1, r4 feb4: e1a00003 mov r0, r3 feb8: e8bd8030 pop {r4, r5, pc} 00010148 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 10148: e5903014 ldr r3, [r0, #20] 1014c: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 10150: e92d4031 push {r0, r4, r5, lr} 10154: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 10158: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 1015c: 0a000017 beq 101c0 && (the_jnode->type == IMFS_LINEAR_FILE)) { 10160: e594304c ldr r3, [r4, #76] ; 0x4c 10164: e3530006 cmp r3, #6 10168: 1a000014 bne 101c0 uint32_t count = the_jnode->info.linearfile.size; 1016c: 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; 10170: 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; 10174: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; 10178: e3a00000 mov r0, #0 <== NOT EXECUTED 1017c: 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) 10180: 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; 10184: 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; 10188: 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; 1018c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 10190: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED 10194: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 10198: 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; 1019c: 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) 101a0: 0a000006 beq 101c0 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 101a4: e1a02001 mov r2, r1 <== NOT EXECUTED 101a8: e1a01000 mov r1, r0 <== NOT EXECUTED 101ac: e1a00004 mov r0, r4 <== NOT EXECUTED 101b0: e58dc000 str ip, [sp] <== NOT EXECUTED 101b4: ebffff40 bl febc <== 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) 101b8: e3700001 cmn r0, #1 <== NOT EXECUTED 101bc: 0a000009 beq 101e8 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 101c0: e5953014 ldr r3, [r5, #20] 101c4: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 101c8: 12843050 addne r3, r4, #80 ; 0x50 101cc: 1893000c ldmne r3, {r2, r3} 101d0: 1585200c strne r2, [r5, #12] 101d4: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; 101d8: e2844050 add r4, r4, #80 ; 0x50 101dc: e8940018 ldm r4, {r3, r4} 101e0: e9850018 stmib r5, {r3, r4} 101e4: e3a00000 mov r0, #0 return 0; } 101e8: e8bd8038 pop {r3, r4, r5, pc} 00001508 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1508: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 150c: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1510: e24dd01c sub sp, sp, #28 1514: e1a05001 mov r5, r1 1518: e1a06000 mov r6, r0 151c: e1a07002 mov r7, r2 1520: e1a08003 mov r8, r3 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 1524: 1a000002 bne 1534 rtems_set_errno_and_return_minus_one( EINVAL ); 1528: eb002d0a bl c958 <__errno> <== NOT EXECUTED 152c: e3a03016 mov r3, #22 <== NOT EXECUTED 1530: ea000020 b 15b8 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1534: e5d03000 ldrb r3, [r0] 1538: e353002f cmp r3, #47 ; 0x2f 153c: 1353005c cmpne r3, #92 ; 0x5c 1540: 13a04000 movne r4, #0 1544: 03a04001 moveq r4, #1 1548: 0a000001 beq 1554 154c: e3530000 cmp r3, #0 1550: 1a000009 bne 157c 1554: e59f3100 ldr r3, [pc, #256] ; 165c 1558: e593e000 ldr lr, [r3] 155c: e28ee018 add lr, lr, #24 1560: e8be000f ldm lr!, {r0, r1, r2, r3} 1564: e28dc004 add ip, sp, #4 1568: e8ac000f stmia ip!, {r0, r1, r2, r3} 156c: e59e3000 ldr r3, [lr] 1570: e3a00001 mov r0, #1 1574: e58c3000 str r3, [ip] 1578: ea000008 b 15a0 157c: e59f30d8 ldr r3, [pc, #216] ; 165c 1580: e593e000 ldr lr, [r3] 1584: e28ee004 add lr, lr, #4 1588: e8be000f ldm lr!, {r0, r1, r2, r3} 158c: e28dc004 add ip, sp, #4 1590: e8ac000f stmia ip!, {r0, r1, r2, r3} 1594: e59e3000 ldr r3, [lr] 1598: e58c3000 str r3, [ip] 159c: e1a00004 mov r0, r4 if ( !temp_loc.ops->evalformake_h ) { 15a0: e59d3010 ldr r3, [sp, #16] 15a4: e5933004 ldr r3, [r3, #4] 15a8: e3530000 cmp r3, #0 15ac: 1a000004 bne 15c4 rtems_set_errno_and_return_minus_one( ENOTSUP ); 15b0: eb002ce8 bl c958 <__errno> <== NOT EXECUTED 15b4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 15b8: e5803000 str r3, [r0] <== NOT EXECUTED 15bc: e3e05000 mvn r5, #0 15c0: ea000022 b 1650 } result = (*temp_loc.ops->evalformake_h)( 15c4: e28d4004 add r4, sp, #4 15c8: e0860000 add r0, r6, r0 15cc: e1a01004 mov r1, r4 15d0: e28d2018 add r2, sp, #24 15d4: e1a0e00f mov lr, pc 15d8: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 15dc: e3500000 cmp r0, #0 15e0: 1afffff5 bne 15bc return -1; if ( !temp_loc.ops->mknod_h ) { 15e4: e59d3010 ldr r3, [sp, #16] 15e8: e593c014 ldr ip, [r3, #20] 15ec: e35c0000 cmp ip, #0 15f0: 1a000006 bne 1610 rtems_filesystem_freenode( &temp_loc ); 15f4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 15f8: e3530000 cmp r3, #0 <== NOT EXECUTED 15fc: 0affffeb beq 15b0 <== NOT EXECUTED 1600: e1a00004 mov r0, r4 <== NOT EXECUTED 1604: e1a0e00f mov lr, pc <== NOT EXECUTED 1608: e12fff13 bx r3 <== NOT EXECUTED 160c: eaffffe7 b 15b0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 1610: e1a01005 mov r1, r5 1614: e1a03008 mov r3, r8 1618: e58d4000 str r4, [sp] 161c: e1a02007 mov r2, r7 1620: e59d0018 ldr r0, [sp, #24] 1624: e1a0e00f mov lr, pc 1628: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 162c: e59d3010 ldr r3, [sp, #16] 1630: 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 ); 1634: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 1638: 0a000004 beq 1650 163c: e593301c ldr r3, [r3, #28] 1640: e3530000 cmp r3, #0 1644: 11a00004 movne r0, r4 1648: 11a0e00f movne lr, pc 164c: 112fff13 bxne r3 return result; } 1650: e1a00005 mov r0, r5 1654: e28dd01c add sp, sp, #28 1658: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 165c: 00018538 .word 0x00018538 0000167c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 167c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1680: e2517000 subs r7, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1684: e24dd018 sub sp, sp, #24 1688: e1a06000 mov r6, r0 168c: e1a09002 mov r9, r2 1690: e1a0b003 mov fp, r3 1694: e59da03c ldr sl, [sp, #60] ; 0x3c /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1698: 0a000001 beq 16a4 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 169c: e3520001 cmp r2, #1 16a0: 9a000002 bls 16b0 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 16a4: eb002cab bl c958 <__errno> 16a8: e3a03016 mov r3, #22 16ac: ea000014 b 1704 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 16b0: e5975024 ldr r5, [r7, #36] ; 0x24 16b4: e3550000 cmp r5, #0 16b8: 1a000004 bne 16d0 errno = ENOTSUP; 16bc: eb002ca5 bl c958 <__errno> <== NOT EXECUTED 16c0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 16c4: e5803000 str r3, [r0] <== NOT EXECUTED 16c8: e1a08005 mov r8, r5 <== NOT EXECUTED goto cleanup_and_bail; 16cc: ea00006d b 1888 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 16d0: e3530000 cmp r3, #0 16d4: 03a0006c moveq r0, #108 ; 0x6c 16d8: 0a000002 beq 16e8 size += strlen( device ) + 1; 16dc: e1a00003 mov r0, r3 <== NOT EXECUTED 16e0: eb00308d bl d91c <== NOT EXECUTED 16e4: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 16e8: eb001d64 bl 8c80 if ( !temp_mt_entry ) { 16ec: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 16f0: e1a04000 mov r4, r0 16f4: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 16f8: 1a000003 bne 170c errno = ENOMEM; 16fc: eb002c95 bl c958 <__errno> <== NOT EXECUTED 1700: e3a0300c mov r3, #12 <== NOT EXECUTED 1704: e5803000 str r3, [r0] 1708: ea00006a b 18b8 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 170c: e35b0000 cmp fp, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 1710: e5809030 str r9, [r0, #48] ; 0x30 if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; 1714: e584002c str r0, [r4, #44] ; 0x2c if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 1718: 0580b068 streq fp, [r0, #104] ; 0x68 temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); 171c: 1280306c addne r3, r0, #108 ; 0x6c strcpy( temp_mt_entry->dev, device ); 1720: 11a00003 movne r0, r3 1724: 11a0100b movne r1, fp } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = 1728: 15843068 strne r3, [r4, #104] ; 0x68 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 172c: 1b00303e blne d82c /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 1730: e35a0000 cmp sl, #0 1734: 0a000035 beq 1810 if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1738: e1a0000a mov r0, sl 173c: eb003076 bl d91c * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1740: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1744: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1748: e3a0c001 mov ip, #1 174c: e1a0000a mov r0, sl 1750: e3a02007 mov r2, #7 1754: e1a03005 mov r3, r5 1758: e58dc000 str ip, [sp] 175c: ebfffec9 bl 1288 1760: e3700001 cmn r0, #1 1764: 0a000046 beq 1884 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 1768: e59d3010 ldr r3, [sp, #16] 176c: e5933010 ldr r3, [r3, #16] 1770: e3530000 cmp r3, #0 1774: 1a000002 bne 1784 errno = ENOTSUP; 1778: eb002c76 bl c958 <__errno> <== NOT EXECUTED 177c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1780: ea000006 b 17a0 <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1784: e1a00005 mov r0, r5 1788: e1a0e00f mov lr, pc 178c: e12fff13 bx r3 1790: e3500001 cmp r0, #1 1794: 0a000003 beq 17a8 errno = ENOTDIR; 1798: eb002c6e bl c958 <__errno> 179c: e3a03014 mov r3, #20 17a0: e5803000 str r3, [r0] goto cleanup_and_bail; 17a4: ea000037 b 1888 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17a8: e59f2140 ldr r2, [pc, #320] ; 18f0 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 17ac: e59d1004 ldr r1, [sp, #4] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17b0: e4923004 ldr r3, [r2], #4 17b4: ea000003 b 17c8 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 17b8: e593001c ldr r0, [r3, #28] 17bc: e1500001 cmp r0, r1 17c0: 0a000003 beq 17d4 * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 17c4: e5933000 ldr r3, [r3] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 17c8: e1530002 cmp r3, r2 17cc: 1afffff9 bne 17b8 17d0: ea00003b b 18c4 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 17d4: eb002c5f bl c958 <__errno> 17d8: e3a03010 mov r3, #16 17dc: ea000001 b 17e8 * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 17e0: eb002c5c bl c958 <__errno> <== NOT EXECUTED 17e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17e8: e5803000 str r3, [r0] 17ec: e28d5004 add r5, sp, #4 goto cleanup_and_bail; 17f0: ea000024 b 1888 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 17f4: e1a00004 mov r0, r4 17f8: e1a0e00f mov lr, pc 17fc: e12fff13 bx r3 1800: e3500000 cmp r0, #0 1804: e28d5004 add r5, sp, #4 1808: 0a000008 beq 1830 180c: ea00001d b 1888 <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 1810: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 1814: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 1818: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 181c: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 1820: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 1824: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 1828: e584a018 str sl, [r4, #24] 182c: e1a0500a mov r5, sl } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 1830: e1a00004 mov r0, r4 1834: e1a0e00f mov lr, pc 1838: e597f024 ldr pc, [r7, #36] ; 0x24 183c: e2507000 subs r7, r0, #0 1840: 0a000007 beq 1864 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 1844: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1848: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 184c: e3530000 cmp r3, #0 <== NOT EXECUTED 1850: 0a00000c beq 1888 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1854: e1a00004 mov r0, r4 <== NOT EXECUTED 1858: e1a0e00f mov lr, pc <== NOT EXECUTED 185c: e12fff13 bx r3 <== NOT EXECUTED 1860: ea000008 b 1888 <== 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 ); 1864: e59f0084 ldr r0, [pc, #132] ; 18f0 1868: e1a01004 mov r1, r4 186c: eb000cc7 bl 4b90 <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 1870: e3560000 cmp r6, #0 1874: 01a00006 moveq r0, r6 *mt_entry = temp_mt_entry; 1878: 15864000 strne r4, [r6] 187c: 11a00007 movne r0, r7 1880: ea00000d b 18bc 1884: e3a05000 mov r5, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1888: e1a00008 mov r0, r8 188c: eb001bb1 bl 8758 if ( loc_to_free ) 1890: e3550000 cmp r5, #0 1894: 0a000007 beq 18b8 rtems_filesystem_freenode( loc_to_free ); 1898: e595300c ldr r3, [r5, #12] 189c: e3530000 cmp r3, #0 18a0: 0a000004 beq 18b8 18a4: e593301c ldr r3, [r3, #28] 18a8: e3530000 cmp r3, #0 18ac: 11a00005 movne r0, r5 18b0: 11a0e00f movne lr, pc 18b4: 112fff13 bxne r3 18b8: e3e00000 mvn r0, #0 return -1; } 18bc: e28dd018 add sp, sp, #24 18c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 18c4: e59d2010 ldr r2, [sp, #16] * 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. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 18c8: e5841008 str r1, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 18cc: e59d100c ldr r1, [sp, #12] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 18d0: e5923020 ldr r3, [r2, #32] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 18d4: e5841010 str r1, [r4, #16] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 18d8: e59d1014 ldr r1, [sp, #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 ){ 18dc: e3530000 cmp r3, #0 */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 18e0: e5841018 str r1, [r4, #24] * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 18e4: 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 ){ 18e8: 1affffc1 bne 17f4 18ec: eaffffbb b 17e0 <== NOT EXECUTED 18f0: 00019bbc .word 0x00019bbc 00001964 : */ int newlib_free_buffers( FILE *fp ) { 1964: e92d4010 push {r4, lr} 1968: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 196c: eb002cf8 bl cd54 1970: e3500002 cmp r0, #2 1974: 8a00000b bhi 19a8 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1978: e1d430bc ldrh r3, [r4, #12] 197c: e3130080 tst r3, #128 ; 0x80 1980: 0a00000a beq 19b0 free( fp->_bf._base ); 1984: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 1988: eb001b72 bl 8758 <== NOT EXECUTED fp->_flags &= ~__SMBF; 198c: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1990: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1994: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1998: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 199c: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 19a0: e5843000 str r3, [r4] <== NOT EXECUTED 19a4: ea000001 b 19b0 <== NOT EXECUTED } break; default: fclose(fp); 19a8: e1a00004 mov r0, r4 <== NOT EXECUTED 19ac: eb002c36 bl ca8c <== NOT EXECUTED } return 0; } 19b0: e3a00000 mov r0, #0 19b4: e8bd8010 pop {r4, pc} 00001bd8 : int open( const char *pathname, int flags, ... ) { 1bd8: e92d000e push {r1, r2, r3} 1bdc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 1be0: e24dd01c sub sp, sp, #28 1be4: e59d503c ldr r5, [sp, #60] ; 0x3c /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1be8: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 1bec: e2138001 ands r8, r3, #1 1bf0: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 1bf4: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1bf8: e28d3044 add r3, sp, #68 ; 0x44 eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 1bfc: 13888002 orrne r8, r8, #2 int open( const char *pathname, int flags, ... ) { 1c00: e1a06000 mov r6, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1c04: e58d3018 str r3, [sp, #24] 1c08: e59d9040 ldr r9, [sp, #64] ; 0x40 * code does not require changes here since network file * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); 1c0c: eb001bc1 bl 8b18 if ( iop == 0 ) { 1c10: e2504000 subs r4, r0, #0 1c14: 03a05017 moveq r5, #23 1c18: 0a000077 beq 1dfc /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 1c1c: e1a00006 mov r0, r6 1c20: eb002f3d bl d91c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c24: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 1c28: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c2c: e1a02008 mov r2, r8 1c30: e1a00006 mov r0, r6 1c34: e3a08001 mov r8, #1 1c38: e1a03007 mov r3, r7 1c3c: e58d8000 str r8, [sp] 1c40: ebfffd90 bl 1288 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1c44: e3700001 cmn r0, #1 1c48: 1a00001f bne 1ccc if ( errno != ENOENT ) { 1c4c: eb002b41 bl c958 <__errno> 1c50: e5903000 ldr r3, [r0] 1c54: e3530002 cmp r3, #2 1c58: 1a00000a bne 1c88 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1c5c: e215ac02 ands sl, r5, #512 ; 0x200 1c60: 01a0700a moveq r7, sl 1c64: 01a05003 moveq r5, r3 1c68: 0a000056 beq 1dc8 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1c6c: e1a00006 mov r0, r6 1c70: e3891902 orr r1, r9, #32768 ; 0x8000 1c74: e3a02000 mov r2, #0 1c78: e3a03000 mov r3, #0 1c7c: ebfffe21 bl 1508 if ( rc ) { 1c80: e250a000 subs sl, r0, #0 1c84: 0a000003 beq 1c98 rc = errno; 1c88: eb002b32 bl c958 <__errno> 1c8c: e3a07000 mov r7, #0 1c90: e5905000 ldr r5, [r0] goto done; 1c94: ea000049 b 1dc0 } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 1c98: e1a00006 mov r0, r6 1c9c: eb002f1e bl d91c 1ca0: e1a03007 mov r3, r7 1ca4: e1a01000 mov r1, r0 1ca8: e1a0200a mov r2, sl 1cac: e1a00006 mov r0, r6 1cb0: e58d8000 str r8, [sp] 1cb4: ebfffd73 bl 1288 if ( status != 0 ) { /* The file did not exist */ 1cb8: e3500000 cmp r0, #0 1cbc: 11a0700a movne r7, sl 1cc0: 13a0500d movne r5, #13 1cc4: 1a00003f bne 1dc8 1cc8: ea000003 b 1cdc rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1ccc: e2053c0a and r3, r5, #2560 ; 0xa00 1cd0: e3530c0a cmp r3, #2560 ; 0xa00 1cd4: 03a05011 moveq r5, #17 1cd8: 0a00003a beq 1dc8 * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; 1cdc: e28d701c add r7, sp, #28 1ce0: e5373018 ldr r3, [r7, #-24]! 1ce4: e5843038 str r3, [r4, #56] ; 0x38 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1ce8: e59d300c ldr r3, [sp, #12] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1cec: e1a00005 mov r0, r5 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1cf0: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1cf4: e5948014 ldr r8, [r4, #20] 1cf8: eb001bb3 bl 8bcc 1cfc: e180e008 orr lr, r0, r8 iop->pathinfo = loc; 1d00: e8b7000f ldm r7!, {r0, r1, r2, r3} 1d04: e284c018 add ip, r4, #24 1d08: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 1d0c: e594303c ldr r3, [r4, #60] ; 0x3c */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1d10: e5972000 ldr r2, [r7] if ( !iop->handlers || !iop->handlers->open_h ) { 1d14: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1d18: e58c2000 str r2, [ip] * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1d1c: e584e014 str lr, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 1d20: 0a000041 beq 1e2c 1d24: e593c000 ldr ip, [r3] 1d28: e35c0000 cmp ip, #0 1d2c: 0a00003e beq 1e2c rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1d30: e1a01006 mov r1, r6 1d34: e1a03009 mov r3, r9 1d38: e1a00004 mov r0, r4 1d3c: e1a02005 mov r2, r5 1d40: e1a0e00f mov lr, pc 1d44: e12fff1c bx ip if ( rc ) { 1d48: e3500000 cmp r0, #0 1d4c: 0a000003 beq 1d60 rc = errno; 1d50: eb002b00 bl c958 <__errno> 1d54: e28d7004 add r7, sp, #4 1d58: e5905000 ldr r5, [r0] goto done; 1d5c: ea000017 b 1dc0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1d60: e3150b01 tst r5, #1024 ; 0x400 1d64: 0a000028 beq 1e0c rc = ftruncate( iop - rtems_libio_iops, 0 ); 1d68: e59f30c8 ldr r3, [pc, #200] ; 1e38 1d6c: e5930000 ldr r0, [r3] 1d70: e0600004 rsb r0, r0, r4 1d74: e1a00340 asr r0, r0, #6 1d78: e3a01000 mov r1, #0 1d7c: e3a02000 mov r2, #0 1d80: eb001a9d bl 87fc if ( rc ) { 1d84: e2505000 subs r5, r0, #0 1d88: 0a00001f beq 1e0c if(errno) rc = errno; 1d8c: eb002af1 bl c958 <__errno> <== NOT EXECUTED 1d90: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d94: e3530000 cmp r3, #0 <== NOT EXECUTED 1d98: 0a000001 beq 1da4 <== NOT EXECUTED 1d9c: eb002aed bl c958 <__errno> <== NOT EXECUTED 1da0: e5905000 ldr r5, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 1da4: e59f308c ldr r3, [pc, #140] ; 1e38 <== NOT EXECUTED 1da8: e5933000 ldr r3, [r3] <== NOT EXECUTED 1dac: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 1db0: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 1db4: eb001a3e bl 86b4 <== NOT EXECUTED 1db8: e3a04000 mov r4, #0 <== NOT EXECUTED 1dbc: e1a07004 mov r7, r4 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1dc0: e3550000 cmp r5, #0 1dc4: 0a000010 beq 1e0c if ( iop ) 1dc8: e3540000 cmp r4, #0 rtems_libio_free( iop ); 1dcc: 11a00004 movne r0, r4 1dd0: 1b001b39 blne 8abc if ( loc_to_free ) 1dd4: e3570000 cmp r7, #0 1dd8: 0a000007 beq 1dfc rtems_filesystem_freenode( loc_to_free ); 1ddc: e597300c ldr r3, [r7, #12] 1de0: e3530000 cmp r3, #0 1de4: 0a000004 beq 1dfc 1de8: e593301c ldr r3, [r3, #28] 1dec: e3530000 cmp r3, #0 1df0: 11a00007 movne r0, r7 1df4: 11a0e00f movne lr, pc 1df8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 1dfc: eb002ad5 bl c958 <__errno> 1e00: e5805000 str r5, [r0] 1e04: e3e00000 mvn r0, #0 1e08: ea000003 b 1e1c } return iop - rtems_libio_iops; 1e0c: e59f3024 ldr r3, [pc, #36] ; 1e38 1e10: e5930000 ldr r0, [r3] 1e14: e0604004 rsb r4, r0, r4 1e18: e1a00344 asr r0, r4, #6 } 1e1c: e28dd01c add sp, sp, #28 1e20: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 1e24: e28dd00c add sp, sp, #12 1e28: e12fff1e bx lr if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1e2c: e28d7004 add r7, sp, #4 <== NOT EXECUTED 1e30: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 1e34: eaffffe3 b 1dc8 <== NOT EXECUTED 1e38: 00019b84 .word 0x00019b84 00001b74 : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1b74: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1b78: e52de004 push {lr} ; (str lr, [sp, #-4]!) int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1b7c: e59f0048 ldr r0, [pc, #72] ; 1bcc 1b80: e1a02001 mov r2, r1 1b84: eb000013 bl 1bd8 1b88: e3700001 cmn r0, #1 1b8c: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1b90: e59f0034 ldr r0, [pc, #52] ; 1bcc 1b94: e3a01001 mov r1, #1 1b98: e3a02000 mov r2, #0 1b9c: eb00000d bl 1bd8 1ba0: e3700001 cmn r0, #1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 1ba4: 059f0024 ldreq r0, [pc, #36] ; 1bd0 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1ba8: 0a000006 beq 1bc8 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1bac: e59f0018 ldr r0, [pc, #24] ; 1bcc 1bb0: e3a01001 mov r1, #1 1bb4: e3a02000 mov r2, #0 1bb8: eb000006 bl 1bd8 1bbc: e3700001 cmn r0, #1 1bc0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 1bc4: e59f0008 ldr r0, [pc, #8] ; 1bd4 <== NOT EXECUTED 1bc8: eb000b36 bl 48a8 <== NOT EXECUTED 1bcc: 0001949b .word 0x0001949b 1bd0: 55544431 .word 0x55544431 1bd4: 55544432 .word 0x55544432 00002500 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2500: e92d4011 push {r0, r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 2504: e5913034 ldr r3, [r1, #52] ; 0x34 2508: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 250c: e1a04001 mov r4, r1 2510: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 2514: 0a000047 beq 2638 switch (c) { 2518: e5dd2000 ldrb r2, [sp] 251c: e2421008 sub r1, r2, #8 2520: e3510005 cmp r1, #5 2524: 979ff101 ldrls pc, [pc, r1, lsl #2] 2528: ea00002e b 25e8 252c: 000025d4 .word 0x000025d4 <== NOT EXECUTED 2530: 000025a8 .word 0x000025a8 <== NOT EXECUTED 2534: 00002544 .word 0x00002544 <== NOT EXECUTED 2538: 000025e8 .word 0x000025e8 <== NOT EXECUTED 253c: 000025e8 .word 0x000025e8 <== NOT EXECUTED 2540: 00002570 .word 0x00002570 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 2544: e3130020 tst r3, #32 tty->column = 0; 2548: 13a03000 movne r3, #0 254c: 15843028 strne r3, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 2550: e5943034 ldr r3, [r4, #52] ; 0x34 2554: e3130004 tst r3, #4 2558: 0a000036 beq 2638 rtems_termios_puts ("\r", 1, tty); 255c: e59f00e8 ldr r0, [pc, #232] ; 264c 2560: e3a01001 mov r1, #1 2564: e1a02004 mov r2, r4 2568: ebffffa0 bl 23f0 256c: ea00000b b 25a0 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 2570: e3130010 tst r3, #16 <== NOT EXECUTED 2574: 0a000002 beq 2584 <== NOT EXECUTED 2578: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 257c: e3520000 cmp r2, #0 <== NOT EXECUTED 2580: 0a000030 beq 2648 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2584: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 2588: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { 258c: 0a000029 beq 2638 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 2590: e3130020 tst r3, #32 <== NOT EXECUTED case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) return; if (tty->termios.c_oflag & OCRNL) { c = '\n'; 2594: e3a0300a mov r3, #10 <== NOT EXECUTED 2598: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 259c: 0a000025 beq 2638 <== NOT EXECUTED tty->column = 0; 25a0: e3a03000 mov r3, #0 25a4: ea000022 b 2634 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25a8: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25ac: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25b0: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25b4: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25b8: e2611008 rsb r1, r1, #8 25bc: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25c0: 1a00001b bne 2634 tty->column += i; 25c4: e5843028 str r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 25c8: e1a02004 mov r2, r4 25cc: e59f007c ldr r0, [pc, #124] ; 2650 25d0: ea00001b b 2644 } tty->column += i; break; case '\b': if (tty->column > 0) 25d4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 25d8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 25dc: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 25e0: ca000013 bgt 2634 <== NOT EXECUTED 25e4: ea000013 b 2638 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 25e8: e3130002 tst r3, #2 25ec: 0a000007 beq 2610 c = toupper(c); 25f0: e59f305c ldr r3, [pc, #92] ; 2654 <== NOT EXECUTED 25f4: e5933000 ldr r3, [r3] <== NOT EXECUTED 25f8: e0833002 add r3, r3, r2 <== NOT EXECUTED 25fc: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 2600: e2033003 and r3, r3, #3 <== NOT EXECUTED 2604: e3530002 cmp r3, #2 <== NOT EXECUTED 2608: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 260c: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 2610: e59f303c ldr r3, [pc, #60] ; 2654 2614: e5932000 ldr r2, [r3] 2618: e5dd3000 ldrb r3, [sp] 261c: e0823003 add r3, r2, r3 2620: e5d33001 ldrb r3, [r3, #1] 2624: e3130020 tst r3, #32 2628: 1a000002 bne 2638 tty->column++; 262c: e5943028 ldr r3, [r4, #40] ; 0x28 2630: e2833001 add r3, r3, #1 2634: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 2638: e1a02004 mov r2, r4 263c: e1a0000d mov r0, sp 2640: e3a01001 mov r1, #1 2644: ebffff69 bl 23f0 } 2648: e8bd8018 pop {r3, r4, pc} 264c: 0001960b .word 0x0001960b 2650: 000194dc .word 0x000194dc 2654: 000185e0 .word 0x000185e0 0000bf38 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { bf38: e92d4070 push {r4, r5, r6, lr} bf3c: e24dd028 sub sp, sp, #40 ; 0x28 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) bf40: e28d5004 add r5, sp, #4 bf44: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { bf48: e1a04000 mov r4, r0 rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) bf4c: e3a01003 mov r1, #3 bf50: e59f0140 ldr r0, [pc, #320] ; c098 bf54: e3a02007 mov r2, #7 bf58: e1a03005 mov r3, r5 bf5c: e58dc000 str ip, [sp] bf60: ebffd4c8 bl 1288 bf64: e3500000 cmp r0, #0 bf68: 0a000009 beq bf94 != 0) { if (errno != ENOENT) bf6c: eb000279 bl c958 <__errno> bf70: e5903000 ldr r3, [r0] bf74: e3530002 cmp r3, #2 bf78: 1a000043 bne c08c return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) bf7c: e59f0114 ldr r0, [pc, #276] ; c098 bf80: e59f1114 ldr r1, [pc, #276] ; c09c bf84: ebffd55b bl 14f8 bf88: e3500000 cmp r0, #0 bf8c: 0a000008 beq bfb4 bf90: ea00003d b c08c <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); bf94: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED bf98: e3530000 cmp r3, #0 <== NOT EXECUTED bf9c: 0a000004 beq bfb4 <== NOT EXECUTED bfa0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED bfa4: e3530000 cmp r3, #0 <== NOT EXECUTED bfa8: 11a00005 movne r0, r5 <== NOT EXECUTED bfac: 11a0e00f movne lr, pc <== NOT EXECUTED bfb0: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); bfb4: e28d5018 add r5, sp, #24 bfb8: e59f10e0 ldr r1, [pc, #224] ; c0a0 bfbc: e3a0200a mov r2, #10 bfc0: e1a00005 mov r0, r5 bfc4: eb000471 bl d190 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); bfc8: e59f30d4 ldr r3, [pc, #212] ; c0a4 bfcc: e1d3c0b0 ldrh ip, [r3] bfd0: e1a0200c mov r2, ip bfd4: e28cc001 add ip, ip, #1 bfd8: e59f10c8 ldr r1, [pc, #200] ; c0a8 bfdc: e1c3c0b0 strh ip, [r3] bfe0: e285000a add r0, r5, #10 bfe4: eb00050f bl d428 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { bfe8: e1a00005 mov r0, r5 bfec: e3a01d06 mov r1, #384 ; 0x180 bff0: eb00003f bl c0f4 bff4: e2506000 subs r6, r0, #0 bff8: 0a000001 beq c004 if (errno != EEXIST){ bffc: eb000255 bl c958 <__errno> <== NOT EXECUTED c000: ea000021 b c08c <== NOT EXECUTED return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); c004: e1a00005 mov r0, r5 c008: e3a01901 mov r1, #16384 ; 0x4000 c00c: ebffd6f1 bl 1bd8 if (filsdes[0] < 0) { c010: e3500000 cmp r0, #0 return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); c014: e5840000 str r0, [r4] if (filsdes[0] < 0) { c018: aa000003 bge c02c err = errno; c01c: eb00024d bl c958 <__errno> c020: e5906000 ldr r6, [r0] /* Delete file at errors, or else if pipe is successfully created the file node will be deleted after it is closed by all. */ unlink(fifopath); c024: e1a00005 mov r0, r5 c028: ea000014 b c080 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); c02c: e59f3078 ldr r3, [pc, #120] ; c0ac <== NOT EXECUTED c030: e5933000 ldr r3, [r3] <== NOT EXECUTED c034: e1500003 cmp r0, r3 <== NOT EXECUTED c038: 359f3070 ldrcc r3, [pc, #112] ; c0b0 <== NOT EXECUTED c03c: 35936000 ldrcc r6, [r3] <== NOT EXECUTED c040: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; c044: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED c048: e3c33001 bic r3, r3, #1 <== NOT EXECUTED c04c: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); c050: e28d0018 add r0, sp, #24 <== NOT EXECUTED c054: e3a01001 mov r1, #1 <== NOT EXECUTED c058: ebffd6de bl 1bd8 <== NOT EXECUTED if (filsdes[1] < 0) { c05c: e3500000 cmp r0, #0 <== NOT EXECUTED else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); iop->flags &= ~LIBIO_FLAGS_NO_DELAY; filsdes[1] = open(fifopath, O_WRONLY); c060: e5840004 str r0, [r4, #4] <== NOT EXECUTED if (filsdes[1] < 0) { c064: a3a06000 movge r6, #0 <== NOT EXECUTED c068: aa000003 bge c07c <== NOT EXECUTED err = errno; c06c: eb000239 bl c958 <__errno> <== NOT EXECUTED c070: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); c074: e5940000 ldr r0, [r4] <== NOT EXECUTED c078: ebfff18d bl 86b4 <== NOT EXECUTED } unlink(fifopath); c07c: e28d0018 add r0, sp, #24 <== NOT EXECUTED c080: eb00001f bl c104 } rtems_set_errno_and_return_minus_one(err); c084: eb000233 bl c958 <__errno> c088: e5806000 str r6, [r0] } c08c: e3e00000 mvn r0, #0 c090: e28dd028 add sp, sp, #40 ; 0x28 c094: e8bd8070 pop {r4, r5, r6, pc} c098: 00019754 .word 0x00019754 c09c: 000003ff .word 0x000003ff c0a0: 00019759 .word 0x00019759 c0a4: 00019b06 .word 0x00019b06 c0a8: 00019764 .word 0x00019764 c0ac: 000183a0 .word 0x000183a0 c0b0: 00019b84 .word 0x00019b84 0000ac40 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { ac40: e92d4010 push {r4, lr} <== NOT EXECUTED ac44: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); ac48: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED ac4c: eb000325 bl b8e8 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ac50: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED ac54: eb000323 bl b8e8 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ac58: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac5c: ebffe556 bl 41bc <== NOT EXECUTED free(pipe->Buffer); ac60: e5940000 ldr r0, [r4] <== NOT EXECUTED ac64: ebfff6bb bl 8758 <== NOT EXECUTED free(pipe); ac68: e1a00004 mov r0, r4 <== NOT EXECUTED } ac6c: e8bd4010 pop {r4, lr} <== NOT EXECUTED { rtems_barrier_delete(pipe->readBarrier); rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe); ac70: eafff6b8 b 8758 <== NOT EXECUTED 0000a8cc : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { a8cc: e59f3054 ldr r3, [pc, #84] ; a928 <== NOT EXECUTED a8d0: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a8d4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED a8d8: e1a04000 mov r4, r0 <== NOT EXECUTED a8dc: e1a05002 mov r5, r2 <== NOT EXECUTED if (cmd == FIONREAD) { a8e0: 13e00015 mvnne r0, #21 <== NOT EXECUTED a8e4: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) a8e8: e3520000 cmp r2, #0 <== NOT EXECUTED a8ec: 03e0000d mvneq r0, #13 <== NOT EXECUTED a8f0: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) a8f4: e3a01000 mov r1, #0 <== NOT EXECUTED a8f8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a8fc: e1a02001 mov r2, r1 <== NOT EXECUTED a900: ebffe654 bl 4258 <== NOT EXECUTED a904: e2506000 subs r6, r0, #0 <== NOT EXECUTED a908: 13e00003 mvnne r0, #3 <== NOT EXECUTED a90c: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; a910: e594300c ldr r3, [r4, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); a914: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; a918: e5853000 str r3, [r5] <== NOT EXECUTED PIPE_UNLOCK(pipe); a91c: ebffe693 bl 4370 <== NOT EXECUTED a920: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } a924: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED a928: 4004667f .word 0x4004667f 0000a864 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } a864: e3e0001c mvn r0, #28 <== NOT EXECUTED a868: e12fff1e bx lr <== NOT EXECUTED 0000a92c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a92c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED a930: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a934: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a938: e1a04000 mov r4, r0 <== NOT EXECUTED a93c: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a940: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED a944: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a948: e1a0a003 mov sl, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a94c: ebffe641 bl 4258 <== NOT EXECUTED a950: e2506000 subs r6, r0, #0 <== NOT EXECUTED a954: 13e06003 mvnne r6, #3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a958: 01a0b00d moveq fp, sp <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a95c: 0a000045 beq aa78 <== NOT EXECUTED a960: ea00004b b aa94 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) a964: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a968: e3530000 cmp r3, #0 <== NOT EXECUTED a96c: 0a000043 beq aa80 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { a970: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED a974: e2177001 ands r7, r7, #1 <== NOT EXECUTED a978: 13e0700a mvnne r7, #10 <== NOT EXECUTED a97c: 1a000040 bne aa84 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a980: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED a984: e2833001 add r3, r3, #1 <== NOT EXECUTED a988: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); a98c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a990: ebffe676 bl 4370 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) a994: e1a01007 mov r1, r7 <== NOT EXECUTED a998: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a99c: eb0003ff bl b9a0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a9a0: e1a01007 mov r1, r7 <== NOT EXECUTED a9a4: e1a02001 mov r2, r1 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) a9a8: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a9ac: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) a9b0: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a9b4: ebffe627 bl 4258 <== NOT EXECUTED a9b8: e3500000 cmp r0, #0 <== NOT EXECUTED a9bc: 13e07003 mvnne r7, #3 <== NOT EXECUTED a9c0: 1a000031 bne aa8c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a9c4: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a9c8: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a9cc: e2433001 sub r3, r3, #1 <== NOT EXECUTED a9d0: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a9d4: 1a00002a bne aa84 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { a9d8: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a9dc: e3520000 cmp r2, #0 <== NOT EXECUTED a9e0: 0affffdf beq a964 <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; a9e4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a9e8: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); a9ec: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a9f0: e1520007 cmp r2, r7 <== NOT EXECUTED a9f4: 31a07002 movcc r7, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; a9f8: e0638008 rsb r8, r3, r8 <== NOT EXECUTED a9fc: e5941000 ldr r1, [r4] <== NOT EXECUTED if (chunk > chunk1) { aa00: e1570008 cmp r7, r8 <== NOT EXECUTED aa04: e0890006 add r0, r9, r6 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); aa08: d0811003 addle r1, r1, r3 <== NOT EXECUTED aa0c: d1a02007 movle r2, r7 <== NOT EXECUTED } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { aa10: da000006 ble aa30 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); aa14: e0811003 add r1, r1, r3 <== NOT EXECUTED aa18: e1a02008 mov r2, r8 <== NOT EXECUTED aa1c: eb0009db bl d190 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); aa20: e0860008 add r0, r6, r8 <== NOT EXECUTED aa24: e5941000 ldr r1, [r4] <== NOT EXECUTED aa28: e0890000 add r0, r9, r0 <== NOT EXECUTED aa2c: e0682007 rsb r2, r8, r7 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); aa30: eb0009d6 bl d190 <== NOT EXECUTED pipe->Start += chunk; aa34: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED aa38: e0870000 add r0, r7, r0 <== NOT EXECUTED aa3c: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; aa40: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED aa44: eb002dca bl 16174 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; aa48: e594300c ldr r3, [r4, #12] <== NOT EXECUTED aa4c: e0673003 rsb r3, r7, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) aa50: e3530000 cmp r3, #0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; aa54: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; aa58: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; aa5c: 05843008 streq r3, [r4, #8] <== NOT EXECUTED if (pipe->waitingWriters > 0) aa60: e594301c ldr r3, [r4, #28] <== NOT EXECUTED aa64: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); aa68: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED aa6c: 11a0100d movne r1, sp <== NOT EXECUTED aa70: 1b0003b4 blne b948 <== NOT EXECUTED read += chunk; aa74: e0866007 add r6, r6, r7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { aa78: e1560005 cmp r6, r5 <== NOT EXECUTED aa7c: 3affffd5 bcc a9d8 <== NOT EXECUTED aa80: e3a07000 mov r7, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); aa84: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED aa88: ebffe638 bl 4370 <== NOT EXECUTED out_nolock: if (read > 0) aa8c: e3560000 cmp r6, #0 <== NOT EXECUTED aa90: d1a06007 movle r6, r7 <== NOT EXECUTED return read; return ret; } aa94: e1a00006 mov r0, r6 <== NOT EXECUTED aa98: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0000ac74 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ac74: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; ac78: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ac7c: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ac80: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ac84: e1a06000 mov r6, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ac88: e1a02001 mov r2, r1 <== NOT EXECUTED ac8c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac90: ebffe570 bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) ac94: e3500000 cmp r0, #0 <== NOT EXECUTED ac98: 1a000010 bne ace0 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); ac9c: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) aca0: e3150002 tst r5, #2 <== NOT EXECUTED pipe->Readers --; aca4: 15943010 ldrne r3, [r4, #16] <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); aca8: e2055006 and r5, r5, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; acac: 12433001 subne r3, r3, #1 <== NOT EXECUTED acb0: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) acb4: e3150004 tst r5, #4 <== NOT EXECUTED pipe->Writers --; acb8: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED acbc: 12433001 subne r3, r3, #1 <== NOT EXECUTED acc0: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, acc4: e59f30a0 ldr r3, [pc, #160] ; ad6c <== NOT EXECUTED acc8: e3a01000 mov r1, #0 <== NOT EXECUTED accc: e5930000 ldr r0, [r3] <== NOT EXECUTED acd0: e1a02001 mov r2, r1 <== NOT EXECUTED acd4: ebffe55f bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) acd8: e3500000 cmp r0, #0 <== NOT EXECUTED acdc: 0a000000 beq ace4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); ace0: ebffe6f0 bl 48a8 <== NOT EXECUTED PIPE_UNLOCK(pipe); ace4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ace8: ebffe5a0 bl 4370 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { acec: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED acf0: e3530000 cmp r3, #0 <== NOT EXECUTED acf4: 1a000006 bne ad14 <== NOT EXECUTED acf8: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED acfc: e3570000 cmp r7, #0 <== NOT EXECUTED ad00: 1a000003 bne ad14 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); ad04: e1a00004 mov r0, r4 <== NOT EXECUTED ad08: ebffffcc bl ac40 <== NOT EXECUTED *pipep = NULL; ad0c: e5867000 str r7, [r6] <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { ad10: ea000010 b ad58 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ad14: e2552004 subs r2, r5, #4 <== NOT EXECUTED ad18: 13a02001 movne r2, #1 <== NOT EXECUTED ad1c: e3530000 cmp r3, #0 <== NOT EXECUTED ad20: 13a02000 movne r2, #0 <== NOT EXECUTED ad24: e3520000 cmp r2, #0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); ad28: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ad2c: 1a000007 bne ad50 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) ad30: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED ad34: e2553002 subs r3, r5, #2 <== NOT EXECUTED ad38: 13a03001 movne r3, #1 <== NOT EXECUTED ad3c: e3520000 cmp r2, #0 <== NOT EXECUTED ad40: 13a03000 movne r3, #0 <== NOT EXECUTED ad44: e3530000 cmp r3, #0 <== NOT EXECUTED ad48: 0a000002 beq ad58 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ad4c: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED ad50: e1a0100d mov r1, sp <== NOT EXECUTED ad54: eb0002fb bl b948 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); ad58: e59f300c ldr r3, [pc, #12] ; ad6c <== NOT EXECUTED ad5c: e5930000 ldr r0, [r3] <== NOT EXECUTED ad60: ebffe582 bl 4370 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } ad64: e3a00000 mov r0, #0 <== NOT EXECUTED ad68: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED ad6c: 00019b00 .word 0x00019b00 0000aa9c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { aa9c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) aaa0: e2525000 subs r5, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { aaa4: e1a04000 mov r4, r0 <== NOT EXECUTED aaa8: e1a0b001 mov fp, r1 <== NOT EXECUTED aaac: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) aab0: 01a06005 moveq r6, r5 <== NOT EXECUTED aab4: 0a00005f beq ac38 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) aab8: e3a01000 mov r1, #0 <== NOT EXECUTED aabc: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED aac0: e1a02001 mov r2, r1 <== NOT EXECUTED aac4: ebffe5e3 bl 4258 <== NOT EXECUTED aac8: e3500000 cmp r0, #0 <== NOT EXECUTED aacc: 13e06003 mvnne r6, #3 <== NOT EXECUTED aad0: 1a000058 bne ac38 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { aad4: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED aad8: e3560000 cmp r6, #0 <== NOT EXECUTED aadc: 0a000022 beq ab6c <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; aae0: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED aae4: e1550009 cmp r5, r9 <== NOT EXECUTED aae8: 91a09005 movls r9, r5 <== NOT EXECUTED aaec: 83a09001 movhi r9, #1 <== NOT EXECUTED aaf0: e1a06000 mov r6, r0 <== NOT EXECUTED aaf4: ea000043 b ac08 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { aaf8: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED aafc: e2177001 ands r7, r7, #1 <== NOT EXECUTED ab00: 13e0700a mvnne r7, #10 <== NOT EXECUTED ab04: 1a000042 bne ac14 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ab08: e594301c ldr r3, [r4, #28] <== NOT EXECUTED ab0c: e2833001 add r3, r3, #1 <== NOT EXECUTED ab10: e584301c str r3, [r4, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); ab14: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ab18: ebffe614 bl 4370 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) ab1c: e1a01007 mov r1, r7 <== NOT EXECUTED ab20: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED ab24: eb00039d bl b9a0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ab28: e1a01007 mov r1, r7 <== NOT EXECUTED ab2c: e1a02001 mov r2, r1 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ab30: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ab34: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ab38: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ab3c: ebffe5c5 bl 4258 <== NOT EXECUTED ab40: e3500000 cmp r0, #0 <== NOT EXECUTED ab44: 13e07003 mvnne r7, #3 <== NOT EXECUTED ab48: 1a000038 bne ac30 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ab4c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED if (ret != 0) ab50: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ab54: e2433001 sub r3, r3, #1 <== NOT EXECUTED ab58: e584301c str r3, [r4, #28] <== NOT EXECUTED if (ret != 0) ab5c: 1a00002c bne ac14 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { ab60: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED ab64: e3530000 cmp r3, #0 <== NOT EXECUTED ab68: 1a000001 bne ab74 <== NOT EXECUTED ab6c: e3e0701f mvn r7, #31 <== NOT EXECUTED ab70: ea000027 b ac14 <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { ab74: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED ab78: e594200c ldr r2, [r4, #12] <== NOT EXECUTED ab7c: e062300a rsb r3, r2, sl <== NOT EXECUTED ab80: e1530009 cmp r3, r9 <== NOT EXECUTED ab84: 3affffdb bcc aaf8 <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); ab88: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED ab8c: e1a0100a mov r1, sl <== NOT EXECUTED ab90: e0820000 add r0, r2, r0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ab94: e0667005 rsb r7, r6, r5 <== NOT EXECUTED ab98: e1530007 cmp r3, r7 <== NOT EXECUTED ab9c: 31a07003 movcc r7, r3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); aba0: eb002d73 bl 16174 <__umodsi3> <== NOT EXECUTED aba4: e5943000 ldr r3, [r4] <== NOT EXECUTED aba8: e060a00a rsb sl, r0, sl <== NOT EXECUTED if (chunk > chunk1) { abac: e157000a cmp r7, sl <== NOT EXECUTED abb0: e08b1006 add r1, fp, r6 <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); abb4: d0830000 addle r0, r3, r0 <== NOT EXECUTED abb8: d1a02007 movle r2, r7 <== NOT EXECUTED } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { abbc: da000006 ble abdc <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); abc0: e1a0200a mov r2, sl <== NOT EXECUTED abc4: e0830000 add r0, r3, r0 <== NOT EXECUTED abc8: eb000970 bl d190 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); abcc: e08a1006 add r1, sl, r6 <== NOT EXECUTED abd0: e5940000 ldr r0, [r4] <== NOT EXECUTED abd4: e08b1001 add r1, fp, r1 <== NOT EXECUTED abd8: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); abdc: eb00096b bl d190 <== NOT EXECUTED pipe->Length += chunk; abe0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) abe4: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; abe8: e0833007 add r3, r3, r7 <== NOT EXECUTED if (pipe->waitingReaders > 0) abec: e3520000 cmp r2, #0 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; abf0: e584300c str r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); abf4: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED abf8: 11a0100d movne r1, sp <== NOT EXECUTED abfc: 1b000351 blne b948 <== NOT EXECUTED written += chunk; ac00: e0866007 add r6, r6, r7 <== NOT EXECUTED ac04: e3a09001 mov r9, #1 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { ac08: e1560005 cmp r6, r5 <== NOT EXECUTED ac0c: 3affffd8 bcc ab74 <== NOT EXECUTED ac10: e3a07000 mov r7, #0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); ac14: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac18: ebffe5d4 bl 4370 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) ac1c: e3770020 cmn r7, #32 <== NOT EXECUTED ac20: 1a000002 bne ac30 <== NOT EXECUTED kill(getpid(), SIGPIPE); ac24: eb0001fe bl b424 <== NOT EXECUTED ac28: e3a0100d mov r1, #13 <== NOT EXECUTED ac2c: eb00026b bl b5e0 <== NOT EXECUTED #endif if (written > 0) ac30: e3560000 cmp r6, #0 <== NOT EXECUTED ac34: d1a06007 movle r6, r7 <== NOT EXECUTED return written; return ret; } ac38: e1a00006 mov r0, r6 <== NOT EXECUTED ac3c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00017ae0 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17ae0: e59f30b0 ldr r3, [pc, #176] ; 17b98 17ae4: e5933000 ldr r3, [r3] 17ae8: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 17aec: e92d4070 push {r4, r5, r6, lr} 17af0: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17af4: 2a000005 bcs 17b10 iop = rtems_libio_iop( fd ); 17af8: e59f309c ldr r3, [pc, #156] ; 17b9c 17afc: e5934000 ldr r4, [r3] 17b00: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 17b04: e5943014 ldr r3, [r4, #20] 17b08: e3130c01 tst r3, #256 ; 0x100 17b0c: 1a000002 bne 17b1c 17b10: ebffd390 bl c958 <__errno> 17b14: e3a03009 mov r3, #9 17b18: ea00000f b 17b5c rtems_libio_check_buffer( buffer ); 17b1c: e3510000 cmp r1, #0 17b20: 0a000004 beq 17b38 rtems_libio_check_count( count ); 17b24: e3520000 cmp r2, #0 17b28: 01a00002 moveq r0, r2 17b2c: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 17b30: e3130002 tst r3, #2 17b34: 1a000002 bne 17b44 17b38: ebffd386 bl c958 <__errno> <== NOT EXECUTED 17b3c: e3a03016 mov r3, #22 <== NOT EXECUTED 17b40: ea000005 b 17b5c <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 17b44: e594303c ldr r3, [r4, #60] ; 0x3c 17b48: e5933008 ldr r3, [r3, #8] 17b4c: e3530000 cmp r3, #0 17b50: 1a000004 bne 17b68 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17b54: ebffd37f bl c958 <__errno> <== NOT EXECUTED 17b58: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17b5c: e5803000 str r3, [r0] 17b60: e3e00000 mvn r0, #0 17b64: e8bd8070 pop {r4, r5, r6, pc} rc = (*iop->handlers->read_h)( iop, buffer, count ); 17b68: e1a00004 mov r0, r4 17b6c: e1a0e00f mov lr, pc 17b70: e12fff13 bx r3 if ( rc > 0 ) 17b74: e3500000 cmp r0, #0 17b78: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 17b7c: e284600c add r6, r4, #12 17b80: e8960060 ldm r6, {r5, r6} 17b84: e0952000 adds r2, r5, r0 17b88: e0a63fc0 adc r3, r6, r0, asr #31 17b8c: e584200c str r2, [r4, #12] 17b90: e5843010 str r3, [r4, #16] return rc; } 17b94: e8bd8070 pop {r4, r5, r6, pc} 17b98: 000183a0 .word 0x000183a0 17b9c: 00019b84 .word 0x00019b84 00023458 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 23458: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 2345c: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 23460: e24dd018 sub sp, sp, #24 23464: e1a05002 mov r5, r2 23468: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 2346c: 1a000002 bne 2347c rtems_set_errno_and_return_minus_one( EFAULT ); 23470: eb005713 bl 390c4 <__errno> <== NOT EXECUTED 23474: e3a0300e mov r3, #14 <== NOT EXECUTED 23478: ea000028 b 23520 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 2347c: eb00719b bl 3faf0 23480: e28d4004 add r4, sp, #4 23484: e3a0c000 mov ip, #0 23488: e1a01000 mov r1, r0 2348c: e1a0200c mov r2, ip 23490: e1a00007 mov r0, r7 23494: e1a03004 mov r3, r4 23498: e58dc000 str ip, [sp] 2349c: ebff8724 bl 5134 0, &loc, false ); if ( result != 0 ) 234a0: e3500000 cmp r0, #0 234a4: 1a00001e bne 23524 return -1; if ( !loc.ops->node_type_h ){ 234a8: e59d2010 ldr r2, [sp, #16] 234ac: e5923010 ldr r3, [r2, #16] 234b0: e3530000 cmp r3, #0 234b4: 0a000012 beq 23504 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 234b8: e1a00004 mov r0, r4 234bc: e1a0e00f mov lr, pc 234c0: e12fff13 bx r3 234c4: e3500004 cmp r0, #4 234c8: e59d2010 ldr r2, [sp, #16] 234cc: 0a000009 beq 234f8 rtems_filesystem_freenode( &loc ); 234d0: e3520000 cmp r2, #0 234d4: 0a000004 beq 234ec 234d8: e592301c ldr r3, [r2, #28] 234dc: e3530000 cmp r3, #0 234e0: 11a00004 movne r0, r4 234e4: 11a0e00f movne lr, pc 234e8: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 234ec: eb0056f4 bl 390c4 <__errno> 234f0: e3a03016 mov r3, #22 234f4: ea000009 b 23520 } if ( !loc.ops->readlink_h ){ 234f8: e592303c ldr r3, [r2, #60] ; 0x3c 234fc: e3530000 cmp r3, #0 23500: 1a000009 bne 2352c rtems_filesystem_freenode( &loc ); 23504: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23508: e3530000 cmp r3, #0 <== NOT EXECUTED 2350c: 11a00004 movne r0, r4 <== NOT EXECUTED 23510: 11a0e00f movne lr, pc <== NOT EXECUTED 23514: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23518: eb0056e9 bl 390c4 <__errno> <== NOT EXECUTED 2351c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23520: e5803000 str r3, [r0] 23524: e3e05000 mvn r5, #0 23528: ea00000d b 23564 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 2352c: e1a02005 mov r2, r5 23530: e1a01006 mov r1, r6 23534: e1a00004 mov r0, r4 23538: e1a0e00f mov lr, pc 2353c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 23540: e59d3010 ldr r3, [sp, #16] 23544: e3530000 cmp r3, #0 if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 23548: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 2354c: 0a000004 beq 23564 23550: e593301c ldr r3, [r3, #28] 23554: e3530000 cmp r3, #0 23558: 11a00004 movne r0, r4 2355c: 11a0e00f movne lr, pc 23560: 112fff13 bxne r3 return result; } 23564: e1a00005 mov r0, r5 23568: e28dd018 add sp, sp, #24 2356c: e8bd80f0 pop {r4, r5, r6, r7, pc} 00003320 : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3320: e59f3138 ldr r3, [pc, #312] ; 3460 3324: e5933000 ldr r3, [r3] 3328: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 332c: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3330: e1a08002 mov r8, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3334: 2a000005 bcs 3350 iop = rtems_libio_iop( fd ); 3338: e59f3124 ldr r3, [pc, #292] ; 3464 333c: e5936000 ldr r6, [r3] 3340: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 3344: e5963014 ldr r3, [r6, #20] 3348: e3130c01 tst r3, #256 ; 0x100 334c: 1a000002 bne 335c 3350: eb002eaa bl ee00 <__errno> <== NOT EXECUTED 3354: e3a03009 mov r3, #9 <== NOT EXECUTED 3358: ea00001e b 33d8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 335c: e3130002 tst r3, #2 3360: 0a00001a beq 33d0 /* * Argument validation on IO vector */ if ( !iov ) 3364: e3510000 cmp r1, #0 3368: 0a000018 beq 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 336c: e3520000 cmp r2, #0 3370: da000016 ble 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 3374: e3520b01 cmp r2, #1024 ; 0x400 3378: ca000014 bgt 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 337c: e596303c ldr r3, [r6, #60] ; 0x3c 3380: e5933008 ldr r3, [r3, #8] 3384: e3530000 cmp r3, #0 3388: 1a000002 bne 3398 rtems_set_errno_and_return_minus_one( ENOTSUP ); 338c: eb002e9b bl ee00 <__errno> <== NOT EXECUTED 3390: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3394: ea00000f b 33d8 <== NOT EXECUTED 3398: e3a03000 mov r3, #0 339c: e1a05001 mov r5, r1 33a0: e1a02001 mov r2, r1 33a4: e1a01003 mov r1, r3 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 33a8: e5920000 ldr r0, [r2] 33ac: e3500000 cmp r0, #0 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 33b0: e2833001 add r3, r3, #1 ssize_t old; if ( !iov[v].iov_base ) 33b4: 0a000005 beq 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 33b8: e592c004 ldr ip, [r2, #4] 33bc: e35c0000 cmp ip, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 33c0: e081000c add r0, r1, ip ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 33c4: 0a000001 beq 33d0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 33c8: e1500001 cmp r0, r1 33cc: aa000003 bge 33e0 rtems_set_errno_and_return_minus_one( EINVAL ); 33d0: eb002e8a bl ee00 <__errno> 33d4: e3a03016 mov r3, #22 33d8: e5803000 str r3, [r0] 33dc: ea00000d b 3418 * are obvious errors in the iovec. So this extra loop ensures * that we do not do anything if there is an argument error. */ all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { 33e0: e1530008 cmp r3, r8 33e4: e2822008 add r2, r2, #8 33e8: b1a01000 movlt r1, r0 33ec: baffffed blt 33a8 33f0: e3a07000 mov r7, #0 33f4: e1a04007 mov r4, r7 /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 33f8: e8950006 ldm r5, {r1, r2} 33fc: e596303c ldr r3, [r6, #60] ; 0x3c 3400: e1a00006 mov r0, r6 3404: e1a0e00f mov lr, pc 3408: e593f008 ldr pc, [r3, #8] if ( bytes < 0 ) 340c: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3410: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3414: aa000001 bge 3420 3418: e3e04000 mvn r4, #0 341c: ea00000d b 3458 return -1; if ( bytes > 0 ) { 3420: 0a000006 beq 3440 iop->offset += bytes; 3424: e286c00c add ip, r6, #12 <== NOT EXECUTED 3428: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 342c: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 3430: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 3434: e586200c str r2, [r6, #12] <== NOT EXECUTED 3438: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 343c: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 3440: e5953004 ldr r3, [r5, #4] 3444: e1500003 cmp r0, r3 3448: 1a000002 bne 3458 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 344c: e1570008 cmp r7, r8 <== NOT EXECUTED 3450: e2855008 add r5, r5, #8 <== NOT EXECUTED 3454: baffffe7 blt 33f8 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 3458: e1a00004 mov r0, r4 345c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 3460: 0001c0b0 .word 0x0001c0b0 3464: 0001ecd8 .word 0x0001ecd8 00017bf8 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17bf8: e59f310c ldr r3, [pc, #268] ; 17d0c /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17bfc: e59f210c ldr r2, [pc, #268] ; 17d10 17c00: e592c000 ldr ip, [r2] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17c04: e5932010 ldr r2, [r3, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17c08: e35c0003 cmp ip, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17c0c: e2822001 add r2, r2, #1 17c10: e92d40f1 push {r0, r4, r5, r6, r7, lr} 17c14: e5832010 str r2, [r3, #16] 17c18: e1a04000 mov r4, r0 17c1c: e1a05001 mov r5, r1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17c20: 1a000007 bne 17c44 if (_Thread_Dispatch_disable_level > 0) 17c24: e59f30e8 ldr r3, [pc, #232] ; 17d14 17c28: e5933000 ldr r3, [r3] 17c2c: e3530000 cmp r3, #0 17c30: 1a000032 bne 17d00 return (void *) 0; if (_ISR_Nest_level > 0) 17c34: e59f30dc ldr r3, [pc, #220] ; 17d18 17c38: e5933000 ldr r3, [r3] 17c3c: e3530000 cmp r3, #0 17c40: 1a00002e bne 17d00 } /* * Continue with realloc(). */ if ( !ptr ) 17c44: e3540000 cmp r4, #0 17c48: 1a000003 bne 17c5c return malloc( size ); 17c4c: e1a00005 mov r0, r5 17c50: ebffc40a bl 8c80 17c54: e1a04000 mov r4, r0 17c58: ea000029 b 17d04 if ( !size ) { 17c5c: e3550000 cmp r5, #0 17c60: 1a000003 bne 17c74 free( ptr ); 17c64: e1a00004 mov r0, r4 <== NOT EXECUTED 17c68: ebffc2ba bl 8758 <== NOT EXECUTED 17c6c: e1a04005 mov r4, r5 <== NOT EXECUTED return (void *) 0; 17c70: ea000023 b 17d04 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 17c74: e59f60a0 ldr r6, [pc, #160] ; 17d1c 17c78: e1a01004 mov r1, r4 17c7c: e5960000 ldr r0, [r6] 17c80: e1a0200d mov r2, sp 17c84: eb000055 bl 17de0 <_Protected_heap_Get_block_size> 17c88: e2507000 subs r7, r0, #0 17c8c: 1a000004 bne 17ca4 errno = EINVAL; 17c90: ebffd330 bl c958 <__errno> 17c94: e3a03016 mov r3, #22 17c98: e5803000 str r3, [r0] 17c9c: e1a04007 mov r4, r7 return (void *) 0; 17ca0: ea000017 b 17d04 #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 17ca4: e5960000 ldr r0, [r6] 17ca8: e1a01004 mov r1, r4 17cac: e1a02005 mov r2, r5 17cb0: eb00005b bl 17e24 <_Protected_heap_Resize_block> 17cb4: e3500000 cmp r0, #0 17cb8: 1a000011 bne 17d04 * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 17cbc: e1a00005 mov r0, r5 17cc0: ebffc3ee bl 8c80 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 17cc4: e59f3040 ldr r3, [pc, #64] ; 17d0c 17cc8: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 17ccc: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 17cd0: e2422001 sub r2, r2, #1 17cd4: e5832004 str r2, [r3, #4] if ( !new_area ) { 17cd8: 0a000008 beq 17d00 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 17cdc: e59d2000 ldr r2, [sp] 17ce0: e1a01004 mov r1, r4 17ce4: e1550002 cmp r5, r2 17ce8: 31a02005 movcc r2, r5 17cec: ebffd527 bl d190 free( ptr ); 17cf0: e1a00004 mov r0, r4 17cf4: ebffc297 bl 8758 17cf8: e1a04006 mov r4, r6 return new_area; 17cfc: ea000000 b 17d04 17d00: e3a04000 mov r4, #0 } 17d04: e1a00004 mov r0, r4 17d08: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 17d0c: 00019b90 .word 0x00019b90 17d10: 00019e90 .word 0x00019e90 17d14: 00019cec .word 0x00019cec 17d18: 00019d7c .word 0x00019d7c 17d1c: 000183ac .word 0x000183ac 00006568 : #include int rmdir( const char *pathname ) { 6568: e92d4070 push {r4, r5, r6, lr} 656c: e24dd02c sub sp, sp, #44 ; 0x2c 6570: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 6574: ebfffaa6 bl 5014 if ( parentpathlen == 0 ) 6578: e2505000 subs r5, r0, #0 657c: 1a000019 bne 65e8 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6580: e5d63000 ldrb r3, [r6] 6584: e353002f cmp r3, #47 ; 0x2f 6588: 1353005c cmpne r3, #92 ; 0x5c 658c: 0a000001 beq 6598 6590: e3530000 cmp r3, #0 <== NOT EXECUTED 6594: 1a000009 bne 65c0 <== NOT EXECUTED 6598: e59f325c ldr r3, [pc, #604] ; 67fc 659c: e593e000 ldr lr, [r3] 65a0: e28ee018 add lr, lr, #24 65a4: e8be000f ldm lr!, {r0, r1, r2, r3} 65a8: e28dc018 add ip, sp, #24 65ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 65b0: e59e3000 ldr r3, [lr] 65b4: e3a04000 mov r4, #0 65b8: e58c3000 str r3, [ip] 65bc: ea000013 b 6610 65c0: e59f3234 ldr r3, [pc, #564] ; 67fc <== NOT EXECUTED 65c4: e593e000 ldr lr, [r3] <== NOT EXECUTED 65c8: e28ee004 add lr, lr, #4 <== NOT EXECUTED 65cc: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 65d0: e28dc018 add ip, sp, #24 <== NOT EXECUTED 65d4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 65d8: e59e3000 ldr r3, [lr] <== NOT EXECUTED 65dc: e1a04005 mov r4, r5 <== NOT EXECUTED 65e0: e58c3000 str r3, [ip] <== NOT EXECUTED 65e4: ea000009 b 6610 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 65e8: e3a0c000 mov ip, #0 65ec: e1a00006 mov r0, r6 65f0: e1a01005 mov r1, r5 65f4: e3a02002 mov r2, #2 65f8: e28d3018 add r3, sp, #24 65fc: e58dc000 str ip, [sp] 6600: ebfffacb bl 5134 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 6604: e3500000 cmp r0, #0 6608: 1a000077 bne 67ec 660c: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6610: e28de018 add lr, sp, #24 6614: e8be000f ldm lr!, {r0, r1, r2, r3} 6618: e28dc004 add ip, sp, #4 661c: e8ac000f stmia ip!, {r0, r1, r2, r3} 6620: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 6624: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6628: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 662c: e1a00005 mov r0, r5 6630: eb00e52e bl 3faf0 6634: e1a01000 mov r1, r0 6638: e1a00005 mov r0, r5 663c: ebfffa68 bl 4fe4 6640: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 6644: e1a00006 mov r0, r6 6648: eb00e528 bl 3faf0 664c: e28d5004 add r5, sp, #4 6650: e3a0c000 mov ip, #0 6654: e1a01000 mov r1, r0 6658: e1a0200c mov r2, ip 665c: e1a00006 mov r0, r6 6660: e1a03005 mov r3, r5 6664: e58dc000 str ip, [sp] 6668: ebfffa79 bl 5054 0, &loc, false ); if ( result != 0 ) { 666c: e3500000 cmp r0, #0 6670: 0a00000b beq 66a4 if ( free_parentloc ) 6674: e3540000 cmp r4, #0 6678: 0a00005b beq 67ec rtems_filesystem_freenode( &parentloc ); 667c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6680: e3530000 cmp r3, #0 <== NOT EXECUTED 6684: 0a000058 beq 67ec <== NOT EXECUTED 6688: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 668c: e3530000 cmp r3, #0 <== NOT EXECUTED 6690: 0a000055 beq 67ec <== NOT EXECUTED 6694: e28d0018 add r0, sp, #24 <== NOT EXECUTED 6698: e1a0e00f mov lr, pc <== NOT EXECUTED 669c: e12fff13 bx r3 <== NOT EXECUTED 66a0: ea000051 b 67ec <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66a4: e59d2010 ldr r2, [sp, #16] 66a8: e5923010 ldr r3, [r2, #16] 66ac: e3530000 cmp r3, #0 rtems_filesystem_freenode( &loc ); 66b0: 0592301c ldreq r3, [r2, #28] /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66b4: 0a000021 beq 6740 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 66b8: e1a00005 mov r0, r5 66bc: e1a0e00f mov lr, pc 66c0: e12fff13 bx r3 66c4: e3500001 cmp r0, #1 66c8: 0a000014 beq 6720 rtems_filesystem_freenode( &loc ); 66cc: e59d3010 ldr r3, [sp, #16] 66d0: e3530000 cmp r3, #0 66d4: 0a000004 beq 66ec 66d8: e593301c ldr r3, [r3, #28] 66dc: e3530000 cmp r3, #0 66e0: 11a00005 movne r0, r5 66e4: 11a0e00f movne lr, pc 66e8: 112fff13 bxne r3 if ( free_parentloc ) 66ec: e3540000 cmp r4, #0 66f0: 0a000007 beq 6714 rtems_filesystem_freenode( &parentloc ); 66f4: e59d3024 ldr r3, [sp, #36] ; 0x24 66f8: e3530000 cmp r3, #0 66fc: 0a000004 beq 6714 6700: e593301c ldr r3, [r3, #28] 6704: e3530000 cmp r3, #0 6708: 128d0018 addne r0, sp, #24 670c: 11a0e00f movne lr, pc 6710: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 6714: eb00ca6a bl 390c4 <__errno> 6718: e3a03014 mov r3, #20 671c: ea000017 b 6780 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 6720: e59d300c ldr r3, [sp, #12] 6724: e5933034 ldr r3, [r3, #52] ; 0x34 6728: e3530000 cmp r3, #0 672c: 1a000015 bne 6788 rtems_filesystem_freenode( &loc ); 6730: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6734: e3530000 cmp r3, #0 <== NOT EXECUTED 6738: 0a000004 beq 6750 <== NOT EXECUTED 673c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6740: e3530000 cmp r3, #0 <== NOT EXECUTED 6744: 11a00005 movne r0, r5 <== NOT EXECUTED 6748: 11a0e00f movne lr, pc <== NOT EXECUTED 674c: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) 6750: e3540000 cmp r4, #0 <== NOT EXECUTED 6754: 0a000007 beq 6778 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 6758: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 675c: e3530000 cmp r3, #0 <== NOT EXECUTED 6760: 0a000004 beq 6778 <== NOT EXECUTED 6764: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6768: e3530000 cmp r3, #0 <== NOT EXECUTED 676c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 6770: 11a0e00f movne lr, pc <== NOT EXECUTED 6774: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6778: eb00ca51 bl 390c4 <__errno> <== NOT EXECUTED 677c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6780: e5803000 str r3, [r0] 6784: ea000018 b 67ec } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 6788: e28d0018 add r0, sp, #24 678c: e1a01005 mov r1, r5 6790: e1a0e00f mov lr, pc 6794: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 6798: e59d3010 ldr r3, [sp, #16] 679c: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 67a0: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); 67a4: 0a000004 beq 67bc 67a8: e593301c ldr r3, [r3, #28] 67ac: e3530000 cmp r3, #0 67b0: 11a00005 movne r0, r5 67b4: 11a0e00f movne lr, pc 67b8: 112fff13 bxne r3 if ( free_parentloc ) 67bc: e3540000 cmp r4, #0 67c0: 0a00000a beq 67f0 rtems_filesystem_freenode( &parentloc ); 67c4: e59d3024 ldr r3, [sp, #36] ; 0x24 67c8: e3530000 cmp r3, #0 67cc: 0a000007 beq 67f0 67d0: e593301c ldr r3, [r3, #28] 67d4: e3530000 cmp r3, #0 67d8: 0a000004 beq 67f0 67dc: e28d0018 add r0, sp, #24 67e0: e1a0e00f mov lr, pc 67e4: e12fff13 bx r3 67e8: ea000000 b 67f0 67ec: e3e06000 mvn r6, #0 return result; } 67f0: e1a00006 mov r0, r6 67f4: e28dd02c add sp, sp, #44 ; 0x2c 67f8: e8bd8070 pop {r4, r5, r6, pc} 67fc: 000534b8 .word 0x000534b8 00012200 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 12200: e59f0000 ldr r0, [pc, #0] ; 12208 <== NOT EXECUTED 12204: e12fff1e bx lr <== NOT EXECUTED 12208: 00021e9c .word 0x00021e9c 0000eb40 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { eb40: e92d4010 push {r4, lr} eb44: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); eb48: eb000006 bl eb68 if (nap) eb4c: e3500000 cmp r0, #0 eb50: 0a000001 beq eb5c return nap->name; return rtems_assoc_name_bad(local_value); } eb54: e5900000 ldr r0, [r0] eb58: e8bd8010 pop {r4, pc} nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); eb5c: e1a00004 mov r0, r4 <== NOT EXECUTED } eb60: e8bd4010 pop {r4, lr} <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); eb64: ea000da5 b 12200 <== NOT EXECUTED 0000c0e0 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c0e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); c0e4: eb0001fe bl c8e4 <== NOT EXECUTED if (nap) c0e8: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; c0ec: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } c0f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 0000114c : size_t length ) { const char *p; if ( !name ) 114c: e3500000 cmp r0, #0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 1150: e92d4070 push {r4, r5, r6, lr} 1154: e1a04001 mov r4, r1 1158: e1a05002 mov r5, r2 const char *p; if ( !name ) 115c: 0a00001c beq 11d4 return NULL; if ( !value ) 1160: e3510000 cmp r1, #0 1164: 0a00001b beq 11d8 return NULL; if ( !length ) 1168: e3520000 cmp r2, #0 116c: 0a000018 beq 11d4 return NULL; value[0] = '\0'; 1170: e3a06000 mov r6, #0 1174: e5c16000 strb r6, [r1] p = rtems_bsp_cmdline_get_param_raw( name ); 1178: eb000018 bl 11e0 if ( !p ) 117c: e3500000 cmp r0, #0 1180: 0a000013 beq 11d4 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 11a0: e3160001 tst r6, #1 11a4: 1a000001 bne 11b0 11a8: e3520020 cmp r2, #32 11ac: 0a000009 beq 11d8 break; value[i++] = *p++; 11b0: e7c42003 strb r2, [r4, r3] 11b4: e2833001 add r3, r3, #1 value[i] = '\0'; 11b8: e7c41003 strb r1, [r4, r3] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 11c8: e1530005 cmp r3, r5 11cc: 3afffff0 bcc 1194 11d0: ea000000 b 11d8 <== NOT EXECUTED 11d4: e3a04000 mov r4, #0 return NULL; copy_string( p, value, length ); return value; } 11d8: e1a00004 mov r0, r4 11dc: e8bd8070 pop {r4, r5, r6, pc} 00001208 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 1208: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 120c: e1a05000 mov r5, r0 <== NOT EXECUTED 1210: e1a04001 mov r4, r1 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 1214: ebffffcc bl 114c <== NOT EXECUTED if ( !p ) 1218: e2506000 subs r6, r0, #0 <== NOT EXECUTED 121c: 0a000018 beq 1284 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 1220: e1a00005 mov r0, r5 <== NOT EXECUTED 1224: eb0031a0 bl d8ac <== NOT EXECUTED if ( *rhs != '=' ) 1228: e7d63000 ldrb r3, [r6, r0] <== NOT EXECUTED 122c: e353003d cmp r3, #61 ; 0x3d <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 1230: e0866000 add r6, r6, r0 <== NOT EXECUTED if ( *rhs != '=' ) 1234: 1a000012 bne 1284 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 1238: e5d63001 ldrb r3, [r6, #1] <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 123c: e2866001 add r6, r6, #1 <== NOT EXECUTED if ( *rhs == '\"' ) 1240: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED rhs++; 1244: 02866001 addeq r6, r6, #1 <== NOT EXECUTED 1248: e1a02004 mov r2, r4 <== NOT EXECUTED 124c: e3a0c000 mov ip, #0 <== NOT EXECUTED 1250: ea000000 b 1258 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 1254: e5421001 strb r1, [r2, #-1] <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1258: e7d6100c ldrb r1, [r6, ip] <== NOT EXECUTED 125c: e3510000 cmp r1, #0 <== NOT EXECUTED *d++ = *rhs++; 1260: e1a03002 mov r3, r2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1264: e28cc001 add ip, ip, #1 <== NOT EXECUTED 1268: e2822001 add r2, r2, #1 <== NOT EXECUTED 126c: 1afffff8 bne 1254 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 1270: e5532001 ldrb r2, [r3, #-1] <== NOT EXECUTED 1274: e3520022 cmp r2, #34 ; 0x22 <== NOT EXECUTED 1278: 02433001 subeq r3, r3, #1 <== NOT EXECUTED d--; *d = '\0'; 127c: e5c31000 strb r1, [r3] <== NOT EXECUTED return value; 1280: ea000000 b 1288 <== NOT EXECUTED 1284: e3a04000 mov r4, #0 <== NOT EXECUTED } 1288: e1a00004 mov r0, r4 <== NOT EXECUTED 128c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00001db4 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1db4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1db8: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1dbc: e24dd040 sub sp, sp, #64 ; 0x40 1dc0: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1dc4: 0a000059 beq 1f30 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 1dc8: e28d4030 add r4, sp, #48 ; 0x30 1dcc: e1a00004 mov r0, r4 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dd0: e28d5028 add r5, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 1dd4: eb0012a5 bl 6870 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dd8: e1a01004 mov r1, r4 1ddc: e1a02005 mov r2, r5 1de0: e59f0150 ldr r0, [pc, #336] ; 1f38 1de4: eb001b95 bl 8c40 <_Timespec_Subtract> } } } #endif (*print)( 1de8: e1a00008 mov r0, r8 1dec: e59f1148 ldr r1, [pc, #328] ; 1f3c 1df0: e1a0e00f mov lr, pc 1df4: e12fff1a bx sl 1df8: e59f4140 ldr r4, [pc, #320] ; 1f40 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1dfc: e59fb140 ldr fp, [pc, #320] ; 1f44 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 1e00: e5943004 ldr r3, [r4, #4] 1e04: e3530000 cmp r3, #0 1e08: 0a00003b beq 1efc continue; information = _Objects_Information_table[ api_index ][ 1 ]; 1e0c: e5936004 ldr r6, [r3, #4] if ( information ) { 1e10: e3560000 cmp r6, #0 1e14: 13a07001 movne r7, #1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 1e18: 128d9018 addne r9, sp, #24 1e1c: 11a05004 movne r5, r4 api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 1e20: 1a00002f bne 1ee4 1e24: ea000034 b 1efc <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 1e28: e596301c ldr r3, [r6, #28] 1e2c: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 1e30: e3540000 cmp r4, #0 1e34: 0a000029 beq 1ee0 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1e38: e5940008 ldr r0, [r4, #8] 1e3c: eb000e09 bl 5668 (*print)( 1e40: e28d3008 add r3, sp, #8 1e44: e5942008 ldr r2, [r4, #8] 1e48: e1a00008 mov r0, r8 1e4c: e59f10f4 ldr r1, [pc, #244] ; 1f48 1e50: e1a0e00f mov lr, pc 1e54: e12fff1a bx sl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 1e58: e2843084 add r3, r4, #132 ; 0x84 1e5c: e893000c ldm r3, {r2, r3} 1e60: e58d2020 str r2, [sp, #32] 1e64: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1e68: e59b2000 ldr r2, [fp] 1e6c: e5943008 ldr r3, [r4, #8] 1e70: e5922008 ldr r2, [r2, #8] 1e74: e1520003 cmp r2, r3 1e78: 1a000006 bne 1e98 Timestamp_Control used; _Timestamp_Subtract( 1e7c: e59f00c8 ldr r0, [pc, #200] ; 1f4c 1e80: e28d1030 add r1, sp, #48 ; 0x30 1e84: e1a02009 mov r2, r9 1e88: eb001b6c bl 8c40 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 1e8c: e28d0020 add r0, sp, #32 1e90: e1a01009 mov r1, r9 1e94: eb001b2f bl 8b58 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 1e98: e28d203c add r2, sp, #60 ; 0x3c 1e9c: e28d3038 add r3, sp, #56 ; 0x38 1ea0: e28d0020 add r0, sp, #32 1ea4: e28d1028 add r1, sp, #40 ; 0x28 1ea8: eb001b3e bl 8ba8 <_Timespec_Divide> /* * Print the information */ (*print)( context, 1eac: e3a01ffa mov r1, #1000 ; 0x3e8 1eb0: e59d0024 ldr r0, [sp, #36] ; 0x24 1eb4: eb006474 bl 1b08c <__aeabi_uidiv> 1eb8: e59d203c ldr r2, [sp, #60] ; 0x3c 1ebc: e58d2000 str r2, [sp] 1ec0: e59d2038 ldr r2, [sp, #56] ; 0x38 1ec4: e1a03000 mov r3, r0 1ec8: e58d2004 str r2, [sp, #4] 1ecc: e1a00008 mov r0, r8 1ed0: e59f1078 ldr r1, [pc, #120] ; 1f50 1ed4: e59d2020 ldr r2, [sp, #32] 1ed8: e1a0e00f mov lr, pc 1edc: e12fff1a bx sl api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 1ee0: e2877001 add r7, r7, #1 1ee4: e1d631b0 ldrh r3, [r6, #16] 1ee8: e1570003 cmp r7, r3 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1eec: e3a0100d mov r1, #13 1ef0: e28d2008 add r2, sp, #8 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 1ef4: 9affffcb bls 1e28 1ef8: e1a04005 mov r4, r5 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1efc: e59f3050 ldr r3, [pc, #80] ; 1f54 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 1f00: e2844004 add r4, r4, #4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1f04: e1540003 cmp r4, r3 1f08: 1affffbc bne 1e00 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 1f0c: e3a01ffa mov r1, #1000 ; 0x3e8 1f10: e59d002c ldr r0, [sp, #44] ; 0x2c 1f14: eb00645c bl 1b08c <__aeabi_uidiv> 1f18: e59f1038 ldr r1, [pc, #56] ; 1f58 1f1c: e1a03000 mov r3, r0 1f20: e59d2028 ldr r2, [sp, #40] ; 0x28 1f24: e1a00008 mov r0, r8 1f28: e1a0e00f mov lr, pc 1f2c: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 1f30: e28dd040 add sp, sp, #64 ; 0x40 1f34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 1f38: 0002816c .word 0x0002816c 1f3c: 0001eae0 .word 0x0001eae0 1f40: 00027be8 .word 0x00027be8 1f44: 00027ce0 .word 0x00027ce0 1f48: 0001ec52 .word 0x0001ec52 1f4c: 00027ce8 .word 0x00027ce8 1f50: 0001ec65 .word 0x0001ec65 1f54: 00027bf8 .word 0x00027bf8 1f58: 0001ec7d .word 0x0001ec7d 0000c0b4 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { c0b4: e92d4010 push {r4, lr} <== NOT EXECUTED c0b8: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) c0bc: e59f0018 ldr r0, [pc, #24] ; c0dc <== NOT EXECUTED c0c0: eb000006 bl c0e0 <== NOT EXECUTED c0c4: e2504000 subs r4, r0, #0 <== NOT EXECUTED c0c8: 0a000001 beq c0d4 <== NOT EXECUTED { errno = rc; c0cc: eb000221 bl c958 <__errno> <== NOT EXECUTED c0d0: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } c0d4: e3e00000 mvn r0, #0 <== NOT EXECUTED c0d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED c0dc: 0001904c .word 0x0001904c 00005f08 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 5f08: e92d000e push {r1, r2, r3} <== NOT EXECUTED 5f0c: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 5f10: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f14: e1a02003 mov r2, r3 <== NOT EXECUTED 5f18: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 5f1c: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f20: ebffff84 bl 5d38 <== NOT EXECUTED va_end(arglist); return chars_written; } 5f24: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f28: e28dd00c add sp, sp, #12 <== NOT EXECUTED 5f2c: e12fff1e bx lr <== NOT EXECUTED 00001168 : } int rtems_filesystem_dirname( const char *pathname ) { 1168: e92d4010 push {r4, lr} 116c: e1a04000 mov r4, r0 int len = strlen( pathname ); 1170: eb0031e9 bl d91c 1174: e0844000 add r4, r4, r0 while ( len ) { 1178: ea000007 b 119c len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 117c: e5543001 ldrb r3, [r4, #-1] 1180: e353002f cmp r3, #47 ; 0x2f 1184: 1353005c cmpne r3, #92 ; 0x5c ) { int len = strlen( pathname ); while ( len ) { len--; 1188: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 118c: 08bd8010 popeq {r4, pc} 1190: e3530000 cmp r3, #0 1194: e2444001 sub r4, r4, #1 1198: 08bd8010 popeq {r4, pc} const char *pathname ) { int len = strlen( pathname ); while ( len ) { 119c: e3500000 cmp r0, #0 11a0: 1afffff5 bne 117c if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 11a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00001288 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1288: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 128c: e2505000 subs r5, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1290: e1a07001 mov r7, r1 1294: e1a06002 mov r6, r2 1298: e1a0c003 mov ip, r3 129c: e59da020 ldr sl, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 12a0: 1a000002 bne 12b0 rtems_set_errno_and_return_minus_one( EFAULT ); 12a4: eb002dab bl c958 <__errno> 12a8: e3a0300e mov r3, #14 12ac: ea000003 b 12c0 if ( !pathloc ) 12b0: e3530000 cmp r3, #0 12b4: 1a000004 bne 12cc rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 12b8: eb002da6 bl c958 <__errno> <== NOT EXECUTED 12bc: e3a03005 mov r3, #5 <== NOT EXECUTED 12c0: e5803000 str r3, [r0] return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 12c4: e3e00000 mvn r0, #0 12c8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 12cc: e5d53000 ldrb r3, [r5] 12d0: e353002f cmp r3, #47 ; 0x2f 12d4: 1353005c cmpne r3, #92 ; 0x5c 12d8: 13a08000 movne r8, #0 12dc: 03a08001 moveq r8, #1 12e0: 0a000001 beq 12ec 12e4: e3530000 cmp r3, #0 12e8: 1a000009 bne 1314 12ec: e59f305c ldr r3, [pc, #92] ; 1350 12f0: e5934000 ldr r4, [r3] 12f4: e2844018 add r4, r4, #24 12f8: e8b4000f ldm r4!, {r0, r1, r2, r3} 12fc: e1a0800c mov r8, ip 1300: e8a8000f stmia r8!, {r0, r1, r2, r3} 1304: e5942000 ldr r2, [r4] 1308: e5882000 str r2, [r8] 130c: e3a08001 mov r8, #1 1310: ea000007 b 1334 1314: e59f3034 ldr r3, [pc, #52] ; 1350 1318: e5934000 ldr r4, [r3] 131c: e2844004 add r4, r4, #4 1320: e8b4000f ldm r4!, {r0, r1, r2, r3} 1324: e1a0900c mov r9, ip 1328: e8a9000f stmia r9!, {r0, r1, r2, r3} 132c: e5942000 ldr r2, [r4] 1330: e5892000 str r2, [r9] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1334: e0681007 rsb r1, r8, r7 1338: e0850008 add r0, r5, r8 133c: e1a02006 mov r2, r6 1340: e1a0300c mov r3, ip 1344: e58da020 str sl, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 1348: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 134c: eaffff95 b 11a8 1350: 00018538 .word 0x00018538 000011a8 : /* * Verify Input parameters. */ if ( !pathname ) 11a8: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 11ac: e92d4030 push {r4, r5, lr} 11b0: e1a05002 mov r5, r2 11b4: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 11b8: 1a000002 bne 11c8 rtems_set_errno_and_return_minus_one( EFAULT ); 11bc: eb002de5 bl c958 <__errno> <== NOT EXECUTED 11c0: e3a0300e mov r3, #14 <== NOT EXECUTED 11c4: ea000027 b 1268 <== NOT EXECUTED if ( !pathloc ) 11c8: e3530000 cmp r3, #0 11cc: 1a000002 bne 11dc rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 11d0: eb002de0 bl c958 <__errno> <== NOT EXECUTED 11d4: e3a03005 mov r3, #5 <== NOT EXECUTED 11d8: ea000022 b 1268 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 11dc: e593c00c ldr ip, [r3, #12] 11e0: e59cc000 ldr ip, [ip] 11e4: e35c0000 cmp ip, #0 11e8: 0a00001c beq 1260 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 11ec: e1a0e00f mov lr, pc 11f0: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 11f4: e59d200c ldr r2, [sp, #12] 11f8: e2703001 rsbs r3, r0, #1 11fc: 33a03000 movcc r3, #0 1200: e3520000 cmp r2, #0 1204: 03a03000 moveq r3, #0 1208: e3530000 cmp r3, #0 120c: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 1210: e594200c ldr r2, [r4, #12] 1214: e5923010 ldr r3, [r2, #16] 1218: e3530000 cmp r3, #0 121c: 0a00000a beq 124c rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 1220: e1a00004 mov r0, r4 1224: e1a0e00f mov lr, pc 1228: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 122c: e2400003 sub r0, r0, #3 1230: e3500001 cmp r0, #1 1234: 83a00000 movhi r0, #0 1238: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 123c: e594200c ldr r2, [r4, #12] 1240: e5923034 ldr r3, [r2, #52] ; 0x34 1244: e3530000 cmp r3, #0 1248: 1a000009 bne 1274 rtems_filesystem_freenode( pathloc ); 124c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1250: e3530000 cmp r3, #0 <== NOT EXECUTED 1254: 11a00004 movne r0, r4 <== NOT EXECUTED 1258: 11a0e00f movne lr, pc <== NOT EXECUTED 125c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1260: eb002dbc bl c958 <__errno> <== NOT EXECUTED 1264: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1268: e5803000 str r3, [r0] <== NOT EXECUTED 126c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1270: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 1274: e1a00004 mov r0, r4 1278: e1a01005 mov r1, r5 127c: e1a0e00f mov lr, pc 1280: e12fff13 bx r3 } } return result; } 1284: e8bd8030 pop {r4, r5, pc} 00001008 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1008: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 100c: e59f6100 ldr r6, [pc, #256] ; 1114 1010: e5963000 ldr r3, [r6] 1014: e3a02012 mov r2, #18 1018: e583202c str r2, [r3, #44] ; 0x2c * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 101c: e24dd01c sub sp, sp, #28 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 1020: eb00018e bl 1660 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1024: e59f30ec ldr r3, [pc, #236] ; 1118 1028: e5933000 ldr r3, [r3] 102c: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 1030: 059f00e4 ldreq r0, [pc, #228] ; 111c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1034: 0a000009 beq 1060 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1038: e59f30e0 ldr r3, [pc, #224] ; 1120 103c: e5932000 ldr r2, [r3] status = mount( 1040: e592300c ldr r3, [r2, #12] 1044: e58d3000 str r3, [sp] 1048: e28d0018 add r0, sp, #24 104c: e892000e ldm r2, {r1, r2, r3} 1050: eb000189 bl 167c &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 1054: e3700001 cmn r0, #1 1058: 1a000001 bne 1064 rtems_fatal_error_occurred( 0xABCD0002 ); 105c: e59f00c0 ldr r0, [pc, #192] ; 1124 <== NOT EXECUTED 1060: eb000e10 bl 48a8 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1064: e59de018 ldr lr, [sp, #24] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1068: e5967000 ldr r7, [r6] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 106c: e28ee01c add lr, lr, #28 1070: e8be000f ldm lr!, {r0, r1, r2, r3} 1074: e287c018 add ip, r7, #24 1078: e8ac000f stmia ip!, {r0, r1, r2, r3} 107c: e59e3000 ldr r3, [lr] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1080: e3a05000 mov r5, #0 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1084: e28d4004 add r4, sp, #4 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1088: e58c3000 str r3, [ip] &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 108c: e1c753b0 strh r5, [r7, #48] ; 0x30 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1090: e1a03004 mov r3, r4 1094: e3a01001 mov r1, #1 1098: e1a02005 mov r2, r5 109c: e59f0084 ldr r0, [pc, #132] ; 1128 rtems_filesystem_root = loc; 10a0: e1a07004 mov r7, r4 * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10a4: e58d5000 str r5, [sp] 10a8: eb000076 bl 1288 rtems_filesystem_root = loc; 10ac: e596c000 ldr ip, [r6] 10b0: e8b7000f ldm r7!, {r0, r1, r2, r3} 10b4: e28cc018 add ip, ip, #24 10b8: e8ac000f stmia ip!, {r0, r1, r2, r3} 10bc: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10c0: e1a02005 mov r2, r5 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 10c4: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10c8: e3a01001 mov r1, #1 10cc: e1a03004 mov r3, r4 10d0: e59f0050 ldr r0, [pc, #80] ; 1128 10d4: e58d5000 str r5, [sp] 10d8: eb00006a bl 1288 rtems_filesystem_current = loc; 10dc: e596c000 ldr ip, [r6] 10e0: e8b4000f ldm r4!, {r0, r1, r2, r3} 10e4: e28cc004 add ip, ip, #4 10e8: e8ac000f stmia ip!, {r0, r1, r2, r3} 10ec: e5973000 ldr r3, [r7] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 10f0: e59f0034 ldr r0, [pc, #52] ; 112c /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 10f4: e58c3000 str r3, [ip] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 10f8: e59f1030 ldr r1, [pc, #48] ; 1130 10fc: eb0000fd bl 14f8 if ( status != 0 ) 1100: e1500005 cmp r0, r5 rtems_fatal_error_occurred( 0xABCD0003 ); 1104: 159f0028 ldrne r0, [pc, #40] ; 1134 * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) 1108: 1affffd4 bne 1060 * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 110c: e28dd01c add sp, sp, #28 1110: e8bd80f0 pop {r4, r5, r6, r7, pc} 1114: 00018538 .word 0x00018538 1118: 00018af0 .word 0x00018af0 111c: abcd0001 .word 0xabcd0001 1120: 000183a8 .word 0x000183a8 1124: abcd0002 .word 0xabcd0002 1128: 000194d3 .word 0x000194d3 112c: 000194d5 .word 0x000194d5 1130: 000001ff .word 0x000001ff 1134: abcd0003 .word 0xabcd0003 00008664 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 8664: e5903000 ldr r3, [r0] <== NOT EXECUTED 8668: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 866c: e1530000 cmp r3, r0 <== NOT EXECUTED 8670: 13a00000 movne r0, #0 <== NOT EXECUTED 8674: 03a00001 moveq r0, #1 <== NOT EXECUTED 8678: e12fff1e bx lr <== NOT EXECUTED 00000ec8 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ec8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED ecc: e24dd018 sub sp, sp, #24 <== NOT EXECUTED ed0: e1a05001 mov r5, r1 <== NOT EXECUTED ed4: e1a06000 mov r6, r0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); ed8: eb00328f bl d91c <== NOT EXECUTED edc: e28d4004 add r4, sp, #4 <== NOT EXECUTED ee0: e1a01000 mov r1, r0 <== NOT EXECUTED ee4: e3a02000 mov r2, #0 <== NOT EXECUTED ee8: e1a03004 mov r3, r4 <== NOT EXECUTED eec: e3a0c001 mov ip, #1 <== NOT EXECUTED ef0: e1a00006 mov r0, r6 <== NOT EXECUTED ef4: e58dc000 str ip, [sp] <== NOT EXECUTED ef8: eb0000e2 bl 1288 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { efc: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED f00: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED f04: e3530000 cmp r3, #0 <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); f08: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; f0c: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { f10: 1a000009 bne f3c <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f14: e592301c ldr r3, [r2, #28] <== NOT EXECUTED f18: e3530000 cmp r3, #0 <== NOT EXECUTED f1c: 11a00004 movne r0, r4 <== NOT EXECUTED f20: 11a0e00f movne lr, pc <== NOT EXECUTED f24: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); f28: eb002e8a bl c958 <__errno> <== NOT EXECUTED f2c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f30: e5803000 str r3, [r0] <== NOT EXECUTED f34: e3e00000 mvn r0, #0 <== NOT EXECUTED f38: ea000026 b fd8 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); f3c: e1a00004 mov r0, r4 <== NOT EXECUTED f40: e1a0e00f mov lr, pc <== NOT EXECUTED f44: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { f48: e3570000 cmp r7, #0 <== NOT EXECUTED f4c: 03500002 cmpeq r0, #2 <== NOT EXECUTED f50: 03a0a000 moveq sl, #0 <== NOT EXECUTED f54: 13a0a001 movne sl, #1 <== NOT EXECUTED f58: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED f5c: 0a000008 beq f84 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f60: e3570000 cmp r7, #0 <== NOT EXECUTED f64: 0a000018 beq fcc <== NOT EXECUTED f68: e597301c ldr r3, [r7, #28] <== NOT EXECUTED f6c: e3530000 cmp r3, #0 <== NOT EXECUTED f70: 0a000015 beq fcc <== NOT EXECUTED f74: e1a00004 mov r0, r4 <== NOT EXECUTED f78: e1a0e00f mov lr, pc <== NOT EXECUTED f7c: e12fff13 bx r3 <== NOT EXECUTED f80: ea000011 b fcc <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; f84: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); f88: e1a00006 mov r0, r6 <== NOT EXECUTED f8c: eb003262 bl d91c <== NOT EXECUTED f90: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; f94: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED f98: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; f9c: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); fa0: e3570000 cmp r7, #0 <== NOT EXECUTED } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; fa4: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); fa8: 0a000009 beq fd4 <== NOT EXECUTED fac: e597301c ldr r3, [r7, #28] <== NOT EXECUTED fb0: e3530000 cmp r3, #0 <== NOT EXECUTED fb4: 0a000006 beq fd4 <== NOT EXECUTED fb8: e1a00004 mov r0, r4 <== NOT EXECUTED fbc: e1a0e00f mov lr, pc <== NOT EXECUTED fc0: e12fff13 bx r3 <== NOT EXECUTED fc4: e1a0000a mov r0, sl <== NOT EXECUTED fc8: ea000002 b fd8 <== NOT EXECUTED fcc: e3a0000d mov r0, #13 <== NOT EXECUTED fd0: ea000000 b fd8 <== NOT EXECUTED fd4: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } fd8: e28dd018 add sp, sp, #24 <== NOT EXECUTED fdc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 00001354 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1354: e92d4011 push {r0, r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1358: e59f4098 ldr r4, [pc, #152] ; 13f8 135c: e5940000 ldr r0, [r4] 1360: e3500000 cmp r0, #0 1364: 0a000013 beq 13b8 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1368: e3a01040 mov r1, #64 ; 0x40 136c: eb001cbd bl 8668 1370: e59f3084 ldr r3, [pc, #132] ; 13fc sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1374: e3500000 cmp r0, #0 uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1378: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 137c: 0280001a addeq r0, r0, #26 if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1380: 0a000015 beq 13dc rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1384: e59f3074 ldr r3, [pc, #116] ; 1400 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1388: e5941000 ldr r1, [r4] rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 138c: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1390: e3a03000 mov r3, #0 1394: ea000000 b 139c iop->data1 = iop + 1; 1398: e500000c str r0, [r0, #-12] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 139c: e2833001 add r3, r3, #1 13a0: e1530001 cmp r3, r1 iop->data1 = iop + 1; 13a4: e1a02000 mov r2, r0 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 13a8: e2800040 add r0, r0, #64 ; 0x40 13ac: 3afffff9 bcc 1398 iop->data1 = iop + 1; iop->data1 = NULL; 13b0: e3a03000 mov r3, #0 13b4: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 13b8: e59fc044 ldr ip, [pc, #68] ; 1404 13bc: e59f0044 ldr r0, [pc, #68] ; 1408 13c0: e3a01001 mov r1, #1 13c4: e3a02054 mov r2, #84 ; 0x54 13c8: e3a03000 mov r3, #0 13cc: e58dc000 str ip, [sp] 13d0: eb000b0e bl 4010 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 13d4: e3500000 cmp r0, #0 13d8: 0a000000 beq 13e0 rtems_fatal_error_occurred( rc ); 13dc: eb000d31 bl 48a8 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 13e0: e59f3024 ldr r3, [pc, #36] ; 140c 13e4: e5933000 ldr r3, [r3] 13e8: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 13ec: 11a0e00f movne lr, pc 13f0: 112fff13 bxne r3 } 13f4: e8bd8018 pop {r3, r4, pc} 13f8: 000183a0 .word 0x000183a0 13fc: 00019b84 .word 0x00019b84 1400: 00019b88 .word 0x00019b88 1404: 00019b8c .word 0x00019b8c 1408: 4c42494f .word 0x4c42494f 140c: 0001839c .word 0x0001839c 00023318 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 23318: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 2331c: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 23320: e24dd01c sub sp, sp, #28 rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 23324: e1a01000 mov r1, r0 23328: e28d2018 add r2, sp, #24 2332c: eb000638 bl 24c14 if (sc != RTEMS_SUCCESSFUL) return sc; 23330: e2508000 subs r8, r0, #0 23334: 1a00003f bne 23438 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 23338: e59f4104 ldr r4, [pc, #260] ; 23444 2333c: e59f3104 ldr r3, [pc, #260] ; 23448 23340: e5942000 ldr r2, [r4] 23344: e1520003 cmp r2, r3 23348: 1a00000f bne 2338c rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 2334c: e2800048 add r0, r0, #72 ; 0x48 23350: ebff892c bl 5808 if (!tmp) 23354: e2505000 subs r5, r0, #0 23358: 03a0801a moveq r8, #26 2335c: 0a000035 beq 23438 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 23360: e1a00008 mov r0, r8 23364: e1a01004 mov r1, r4 23368: e59f20dc ldr r2, [pc, #220] ; 2344c 2336c: eb00071f bl 24ff0 if (sc != RTEMS_SUCCESSFUL) { 23370: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 23374: 05845000 streq r5, [r4] #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { 23378: 0a000003 beq 2338c /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 2337c: e1a00005 mov r0, r5 <== NOT EXECUTED 23380: ebff879e bl 5200 <== NOT EXECUTED 23384: e1a08006 mov r8, r6 <== NOT EXECUTED return sc; 23388: ea00002a b 23438 <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 2338c: e59f60b0 ldr r6, [pc, #176] ; 23444 23390: e5964000 ldr r4, [r6] 23394: e59f10ac ldr r1, [pc, #172] ; 23448 23398: e3a02048 mov r2, #72 ; 0x48 2339c: e1a00004 mov r0, r4 233a0: eb006378 bl 3c188 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 233a4: e59f30a4 ldr r3, [pc, #164] ; 23450 233a8: e593e000 ldr lr, [r3] } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 233ac: e59d3018 ldr r3, [sp, #24] 233b0: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 233b4: e28ee01c add lr, lr, #28 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 233b8: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 233bc: e8be000f ldm lr!, {r0, r1, r2, r3} 233c0: e8ac000f stmia ip!, {r0, r1, r2, r3} 233c4: e59e3000 ldr r3, [lr] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 233c8: e28d4004 add r4, sp, #4 233cc: e3a05000 mov r5, #0 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 233d0: e58c3000 str r3, [ip] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 233d4: e3a01001 mov r1, #1 233d8: e1a03004 mov r3, r4 233dc: e1a02005 mov r2, r5 233e0: e59f006c ldr r0, [pc, #108] ; 23454 rtems_filesystem_root = loc; 233e4: e1a07004 mov r7, r4 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 233e8: e58d5000 str r5, [sp] 233ec: ebff8750 bl 5134 rtems_filesystem_root = loc; 233f0: e596c000 ldr ip, [r6] 233f4: e8b7000f ldm r7!, {r0, r1, r2, r3} 233f8: e28cc018 add ip, ip, #24 233fc: e8ac000f stmia ip!, {r0, r1, r2, r3} 23400: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 23404: e1a02005 mov r2, r5 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 23408: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2340c: e3a01001 mov r1, #1 23410: e1a03004 mov r3, r4 23414: e59f0038 ldr r0, [pc, #56] ; 23454 23418: e58d5000 str r5, [sp] 2341c: ebff8744 bl 5134 rtems_filesystem_current = loc; 23420: e596c000 ldr ip, [r6] 23424: e8b4000f ldm r4!, {r0, r1, r2, r3} 23428: e28cc004 add ip, ip, #4 2342c: e8ac000f stmia ip!, {r0, r1, r2, r3} 23430: e5973000 ldr r3, [r7] 23434: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 23438: e1a00008 mov r0, r8 2343c: e28dd01c add sp, sp, #28 23440: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 23444: 000534b8 .word 0x000534b8 23448: 00060d00 .word 0x00060d00 2344c: 00023210 .word 0x00023210 23450: 00060ce8 .word 0x00060ce8 23454: 00057cd7 .word 0x00057cd7 00023274 : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 23274: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 23278: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 2327c: e3a00000 mov r0, #0 <== NOT EXECUTED 23280: e1a01000 mov r1, r0 <== NOT EXECUTED 23284: e1a0200d mov r2, sp <== NOT EXECUTED 23288: eb000661 bl 24c14 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 2328c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23290: 1a00001b bne 23304 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 23294: e59f1070 ldr r1, [pc, #112] ; 2330c <== NOT EXECUTED 23298: e5914000 ldr r4, [r1] <== NOT EXECUTED 2329c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 232a0: e5942000 ldr r2, [r4] <== NOT EXECUTED 232a4: e1520003 cmp r2, r3 <== NOT EXECUTED 232a8: 1a000004 bne 232c0 <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 232ac: eb000778 bl 25094 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 232b0: e2503000 subs r3, r0, #0 <== NOT EXECUTED 232b4: 1a000012 bne 23304 <== NOT EXECUTED free_user_env(tmp); 232b8: e1a00004 mov r0, r4 <== NOT EXECUTED 232bc: ebffffd3 bl 23210 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 232c0: e59f4044 ldr r4, [pc, #68] ; 2330c <== NOT EXECUTED 232c4: e1a00005 mov r0, r5 <== NOT EXECUTED 232c8: e1a01004 mov r1, r4 <== NOT EXECUTED 232cc: e28d2004 add r2, sp, #4 <== NOT EXECUTED 232d0: eb00078c bl 25108 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 232d4: e2503000 subs r3, r0, #0 <== NOT EXECUTED 232d8: 1a000006 bne 232f8 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 232dc: e59f202c ldr r2, [pc, #44] ; 23310 <== NOT EXECUTED 232e0: e1a01004 mov r1, r4 <== NOT EXECUTED 232e4: eb000741 bl 24ff0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 232e8: e2503000 subs r3, r0, #0 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 232ec: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 232f0: 05842000 streq r2, [r4] <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 232f4: 0a000002 beq 23304 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 232f8: e59f1014 ldr r1, [pc, #20] ; 23314 <== NOT EXECUTED 232fc: e59f2008 ldr r2, [pc, #8] ; 2330c <== NOT EXECUTED 23300: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 23304: e1a00003 mov r0, r3 <== NOT EXECUTED 23308: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 2330c: 000534b8 .word 0x000534b8 23310: 00023210 .word 0x00023210 23314: 00060d00 .word 0x00060d00 00005900 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5900: e92d4801 push {r0, fp, lr} <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 5904: e59f3038 ldr r3, [pc, #56] ; 5944 <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5908: e1a01000 mov r1, r0 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 590c: e1a0200d mov r2, sp <== NOT EXECUTED 5910: e5930000 ldr r0, [r3] <== NOT EXECUTED 5914: eb001560 bl ae9c <_Protected_heap_Get_block_size> <== NOT EXECUTED 5918: e3500000 cmp r0, #0 <== NOT EXECUTED 591c: 0a000007 beq 5940 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 5920: e59f3020 ldr r3, [pc, #32] ; 5948 <== NOT EXECUTED 5924: e59d0000 ldr r0, [sp] <== NOT EXECUTED 5928: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 592c: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 5930: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 5934: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 5938: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 593c: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED } } 5940: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED 5944: 000531ec .word 0x000531ec 5948: 00060cbc .word 0x00060cbc 0000594c : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 594c: e2501000 subs r1, r0, #0 <== NOT EXECUTED } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 5950: e92d4811 push {r0, r4, fp, lr} <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 5954: 0a000013 beq 59a8 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 5958: e28d2004 add r2, sp, #4 <== NOT EXECUTED 595c: e3a03000 mov r3, #0 <== NOT EXECUTED 5960: e5223004 str r3, [r2, #-4]! <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 5964: e59f3040 ldr r3, [pc, #64] ; 59ac <== NOT EXECUTED 5968: e1a0200d mov r2, sp <== NOT EXECUTED 596c: e5930000 ldr r0, [r3] <== NOT EXECUTED 5970: eb001549 bl ae9c <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 5974: e59f3034 ldr r3, [pc, #52] ; 59b0 <== NOT EXECUTED 5978: e59d4000 ldr r4, [sp] <== NOT EXECUTED 597c: e283c01c add ip, r3, #28 <== NOT EXECUTED 5980: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 5984: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 5988: e09b0004 adds r0, fp, r4 <== NOT EXECUTED 598c: e2ac1000 adc r1, ip, #0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 5990: e593c018 ldr ip, [r3, #24] <== NOT EXECUTED _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 5994: e0622000 rsb r2, r2, r0 <== NOT EXECUTED if (current_depth > s->max_depth) 5998: e152000c cmp r2, ip <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 599c: e583001c str r0, [r3, #28] <== NOT EXECUTED 59a0: e5831020 str r1, [r3, #32] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) s->max_depth = current_depth; 59a4: 85832018 strhi r2, [r3, #24] <== NOT EXECUTED } 59a8: e8bd8818 pop {r3, r4, fp, pc} <== NOT EXECUTED 59ac: 000531ec .word 0x000531ec 59b0: 00060cbc .word 0x00060cbc 000059b4 : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 59b4: e59f0008 ldr r0, [pc, #8] ; 59c4 <== NOT EXECUTED 59b8: e3a01000 mov r1, #0 <== NOT EXECUTED 59bc: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 59c0: ea00da77 b 3c3a4 <== NOT EXECUTED 59c4: 00060cbc .word 0x00060cbc 00005edc : void rtems_panic( const char *printf_format, ... ) { 5edc: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 5ee0: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 5ee4: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5ee8: e1a02003 mov r2, r3 <== NOT EXECUTED 5eec: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 5ef0: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 5ef4: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5ef8: ebffff8e bl 5d38 <== NOT EXECUTED va_end(arglist); } 5efc: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f00: e28dd010 add sp, sp, #16 <== NOT EXECUTED 5f04: e12fff1e bx lr <== NOT EXECUTED 0000a86c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured) a86c: e59f3048 ldr r3, [pc, #72] ; a8bc a870: e5d33000 ldrb r3, [r3] a874: e3530000 cmp r3, #0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { a878: e92d4001 push {r0, lr} if (!rtems_pipe_configured) a87c: 0a00000d beq a8b8 return; if (rtems_pipe_semaphore) a880: e59fc038 ldr ip, [pc, #56] ; a8c0 <== NOT EXECUTED a884: e59c3000 ldr r3, [ip] <== NOT EXECUTED a888: e3530000 cmp r3, #0 <== NOT EXECUTED a88c: 1a000009 bne a8b8 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( a890: e59f002c ldr r0, [pc, #44] ; a8c4 <== NOT EXECUTED a894: e3a01001 mov r1, #1 <== NOT EXECUTED a898: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED a89c: e58dc000 str ip, [sp] <== NOT EXECUTED a8a0: ebffe5da bl 4010 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) a8a4: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); a8a8: 1bffe7fe blne 48a8 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); a8ac: ebffe4dc bl 3c24 <== NOT EXECUTED rtems_pipe_no = now; a8b0: e59f3010 ldr r3, [pc, #16] ; a8c8 <== NOT EXECUTED a8b4: e1c300b0 strh r0, [r3] <== NOT EXECUTED } a8b8: e8bd8008 pop {r3, pc} a8bc: 000199a4 .word 0x000199a4 a8c0: 00019b00 .word 0x00019b00 a8c4: 50495045 .word 0x50495045 a8c8: 00019b06 .word 0x00019b06 000039e0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39e0: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 39e4: e59f307c ldr r3, [pc, #124] ; 3a68 39e8: e5933000 ldr r3, [r3] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39ec: e59300c8 ldr r0, [r3, #200] ; 0xc8 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39f0: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39f4: e15b0000 cmp fp, r0 39f8: 33a04000 movcc r4, #0 39fc: 3a000004 bcc 3a14 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 3a00: e59340c4 ldr r4, [r3, #196] ; 0xc4 3a04: e0804004 add r4, r0, r4 3a08: e15b0004 cmp fp, r4 3a0c: 83a04000 movhi r4, #0 3a10: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 3a14: e59f3050 ldr r3, [pc, #80] ; 3a6c 3a18: e5933000 ldr r3, [r3] 3a1c: e3530000 cmp r3, #0 3a20: 03a01001 moveq r1, #1 3a24: 0a000005 beq 3a40 pattern_ok = (!memcmp( 3a28: e59f1040 ldr r1, [pc, #64] ; 3a70 3a2c: e2800008 add r0, r0, #8 3a30: e3a02010 mov r2, #16 3a34: eb00e1a9 bl 3c0e0 3a38: e2701001 rsbs r1, r0, #1 3a3c: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 3a40: e3540000 cmp r4, #0 3a44: 0a000002 beq 3a54 3a48: e3510000 cmp r1, #0 3a4c: 13a00000 movne r0, #0 3a50: 18bd8810 popne {r4, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 3a54: e59f300c ldr r3, [pc, #12] ; 3a68 <== NOT EXECUTED 3a58: e5930000 ldr r0, [r3] <== NOT EXECUTED 3a5c: ebffffb4 bl 3934 <== NOT EXECUTED 3a60: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 3a64: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 3a68: 00060ee0 .word 0x00060ee0 3a6c: 0005e1b0 .word 0x0005e1b0 3a70: 00060c8c .word 0x00060c8c 00003924 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 3924: e59f1004 ldr r1, [pc, #4] ; 3930 <== NOT EXECUTED 3928: e3a00000 mov r0, #0 <== NOT EXECUTED 392c: eaffffe3 b 38c0 <== NOT EXECUTED 3930: 00006344 .word 0x00006344 000038c0 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38c0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 38c4: e59f4048 ldr r4, [pc, #72] ; 3914 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38c8: e1a05001 mov r5, r1 <== NOT EXECUTED 38cc: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 38d0: e5841004 str r1, [r4, #4] <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 38d4: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 38d8: e59f1038 ldr r1, [pc, #56] ; 3918 <== NOT EXECUTED 38dc: e1a0e00f mov lr, pc <== NOT EXECUTED 38e0: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 38e4: e59f1030 ldr r1, [pc, #48] ; 391c <== NOT EXECUTED 38e8: e1a00006 mov r0, r6 <== NOT EXECUTED 38ec: e1a0e00f mov lr, pc <== NOT EXECUTED 38f0: e12fff15 bx r5 <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 38f4: e59f0024 ldr r0, [pc, #36] ; 3920 <== NOT EXECUTED 38f8: eb001b4d bl a634 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 38fc: e3e00000 mvn r0, #0 <== NOT EXECUTED 3900: ebffff9f bl 3784 <== NOT EXECUTED print_context = NULL; 3904: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 3908: e5843004 str r3, [r4, #4] <== NOT EXECUTED rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); print_context = NULL; 390c: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 3910: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3914: 0005e1b0 .word 0x0005e1b0 3918: 00057b19 .word 0x00057b19 391c: 00057b30 .word 0x00057b30 3920: 00003784 .word 0x00003784 0000a35c : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a35c: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a360: e2514000 subs r4, r1, #0 <== NOT EXECUTED #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a364: e1a07000 mov r7, r0 <== NOT EXECUTED a368: e1a08002 mov r8, r2 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a36c: 03a00009 moveq r0, #9 <== NOT EXECUTED a370: 0a00001e beq a3f0 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; a374: eb000cdc bl d6ec <__errno> <== NOT EXECUTED a378: e3a03000 mov r3, #0 <== NOT EXECUTED a37c: e5803000 str r3, [r0] <== NOT EXECUTED *n = 0; a380: e3a02000 mov r2, #0 <== NOT EXECUTED a384: e3a03000 mov r3, #0 <== NOT EXECUTED a388: e884000c stm r4, {r2, r3} <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a38c: e1a00007 mov r0, r7 <== NOT EXECUTED a390: e1a0100d mov r1, sp <== NOT EXECUTED a394: eb00184b bl 104c8 <== NOT EXECUTED #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) a398: e3580000 cmp r8, #0 <== NOT EXECUTED *endptr = end; a39c: 159d3000 ldrne r3, [sp] <== NOT EXECUTED a3a0: 15883000 strne r3, [r8] <== NOT EXECUTED /* nothing was converted */ if ( end == s ) a3a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED a3a8: e1530007 cmp r3, r7 <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a3ac: e1a05000 mov r5, r0 <== NOT EXECUTED a3b0: e1a06001 mov r6, r1 <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) a3b4: 03a0000b moveq r0, #11 <== NOT EXECUTED a3b8: 0a00000c beq a3f0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a3bc: e1a00005 mov r0, r5 <== NOT EXECUTED a3c0: e59f202c ldr r2, [pc, #44] ; a3f4 <== NOT EXECUTED a3c4: e3e03000 mvn r3, #0 <== NOT EXECUTED a3c8: ebffe203 bl 2bdc <__gedf2> <== NOT EXECUTED a3cc: e3500000 cmp r0, #0 <== NOT EXECUTED a3d0: da000004 ble a3e8 <== NOT EXECUTED a3d4: eb000cc4 bl d6ec <__errno> <== NOT EXECUTED a3d8: e5903000 ldr r3, [r0] <== NOT EXECUTED a3dc: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a3e0: 03a0000a moveq r0, #10 <== NOT EXECUTED a3e4: 0a000001 beq a3f0 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a3e8: e8840060 stm r4, {r5, r6} <== NOT EXECUTED a3ec: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } a3f0: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED a3f4: 7fefffff .word 0x7fefffff 0000a3f8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a3f8: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a3fc: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a400: e1a05000 mov r5, r0 a404: e1a07002 mov r7, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a408: 03a00009 moveq r0, #9 a40c: 0a00001b beq a480 return RTEMS_INVALID_ADDRESS; errno = 0; a410: eb000cb5 bl d6ec <__errno> a414: e3a03000 mov r3, #0 a418: e5803000 str r3, [r0] *n = 0; a41c: e3a03000 mov r3, #0 a420: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a424: e1a00005 mov r0, r5 a428: e1a0100d mov r1, sp a42c: eb001812 bl 1047c #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) a430: e3570000 cmp r7, #0 *endptr = end; a434: 159d3000 ldrne r3, [sp] a438: 15873000 strne r3, [r7] /* nothing was converted */ if ( end == s ) a43c: e59d3000 ldr r3, [sp] a440: e1530005 cmp r3, r5 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a444: e1a06000 mov r6, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) a448: 03a0000b moveq r0, #11 a44c: 0a00000b beq a480 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a450: e1a00006 mov r0, r6 a454: e59f1028 ldr r1, [pc, #40] ; a484 a458: ebffe22a bl 2d08 <__gesf2> a45c: e3500000 cmp r0, #0 a460: da000004 ble a478 a464: eb000ca0 bl d6ec <__errno> <== NOT EXECUTED a468: e5903000 ldr r3, [r0] <== NOT EXECUTED a46c: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a470: 03a0000a moveq r0, #10 <== NOT EXECUTED a474: 0a000001 beq a480 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a478: e5846000 str r6, [r4] a47c: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } a480: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} a484: 7f7fffff .word 0x7f7fffff 00019db0 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19db0: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19db4: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19db8: e1a05000 mov r5, r0 19dbc: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19dc0: 03a00009 moveq r0, #9 19dc4: 0a000018 beq 19e2c return RTEMS_INVALID_ADDRESS; errno = 0; 19dc8: eb007cbd bl 390c4 <__errno> 19dcc: e3a03000 mov r3, #0 19dd0: e5803000 str r3, [r0] *n = 0; 19dd4: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 19dd8: e1a00005 mov r0, r5 19ddc: e1a0100d mov r1, sp 19de0: e3a02010 mov r2, #16 19de4: eb009c5d bl 40f60 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) 19de8: e3560000 cmp r6, #0 *endptr = end; 19dec: 159d3000 ldrne r3, [sp] 19df0: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 19df4: e59d3000 ldr r3, [sp] 19df8: e1530005 cmp r3, r5 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 19dfc: e1a07000 mov r7, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) 19e00: 03a0000b moveq r0, #11 19e04: 0a000008 beq 19e2c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 19e08: e3770001 cmn r7, #1 19e0c: 1a000004 bne 19e24 19e10: eb007cab bl 390c4 <__errno> <== NOT EXECUTED 19e14: e5903000 ldr r3, [r0] <== NOT EXECUTED 19e18: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 19e1c: 03a0000a moveq r0, #10 <== NOT EXECUTED 19e20: 0a000001 beq 19e2c <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 19e24: e5847000 str r7, [r4] 19e28: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } 19e2c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 00003384 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3384: e3500009 cmp r0, #9 3388: 012fff1e bxeq lr 338c: ca000016 bgt 33ec 3390: e3500004 cmp r0, #4 3394: 012fff1e bxeq lr 3398: ca00000a bgt 33c8 339c: e3500001 cmp r0, #1 33a0: 012fff1e bxeq lr 33a4: ca000002 bgt 33b4 33a8: e3500000 cmp r0, #0 33ac: 012fff1e bxeq lr 33b0: ea000030 b 3478 33b4: e3500002 cmp r0, #2 <== NOT EXECUTED 33b8: 012fff1e bxeq lr <== NOT EXECUTED 33bc: e3500003 cmp r0, #3 <== NOT EXECUTED 33c0: 1a00002c bne 3478 <== NOT EXECUTED 33c4: e12fff1e bx lr <== NOT EXECUTED 33c8: e3500006 cmp r0, #6 <== NOT EXECUTED 33cc: 012fff1e bxeq lr <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 33d0: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 33d4: b12fff1e bxlt lr <== NOT EXECUTED 33d8: e3500007 cmp r0, #7 <== NOT EXECUTED 33dc: 012fff1e bxeq lr <== NOT EXECUTED 33e0: e3500008 cmp r0, #8 <== NOT EXECUTED 33e4: 1a000023 bne 3478 <== NOT EXECUTED 33e8: e12fff1e bx lr <== NOT EXECUTED 33ec: e350000e cmp r0, #14 <== NOT EXECUTED 33f0: 012fff1e bxeq lr <== NOT EXECUTED 33f4: ca000008 bgt 341c <== NOT EXECUTED 33f8: e350000b cmp r0, #11 <== NOT EXECUTED 33fc: 012fff1e bxeq lr <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 3400: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3404: b12fff1e bxlt lr <== NOT EXECUTED 3408: e350000c cmp r0, #12 <== NOT EXECUTED 340c: 012fff1e bxeq lr <== NOT EXECUTED 3410: e350000d cmp r0, #13 <== NOT EXECUTED 3414: 1a000017 bne 3478 <== NOT EXECUTED 3418: e12fff1e bx lr <== NOT EXECUTED 341c: e59f305c ldr r3, [pc, #92] ; 3480 <== NOT EXECUTED 3420: e1500003 cmp r0, r3 <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 3424: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3428: 012fff1e bxeq lr <== NOT EXECUTED 342c: ca000005 bgt 3448 <== NOT EXECUTED 3430: e350000f cmp r0, #15 <== NOT EXECUTED 3434: 012fff1e bxeq lr <== NOT EXECUTED 3438: e2433001 sub r3, r3, #1 <== NOT EXECUTED 343c: e1500003 cmp r0, r3 <== NOT EXECUTED 3440: 1a00000c bne 3478 <== NOT EXECUTED 3444: ea000007 b 3468 <== NOT EXECUTED 3448: e59f3034 ldr r3, [pc, #52] ; 3484 <== NOT EXECUTED 344c: e1500003 cmp r0, r3 <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 3450: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3454: 012fff1e bxeq lr <== NOT EXECUTED 3458: e2833001 add r3, r3, #1 <== NOT EXECUTED 345c: e1500003 cmp r0, r3 <== NOT EXECUTED 3460: 1a000004 bne 3478 <== NOT EXECUTED 3464: ea000001 b 3470 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 3468: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 346c: e12fff1e bx lr <== NOT EXECUTED case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 3470: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 3474: e12fff1e bx lr <== NOT EXECUTED 3478: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 347c: e12fff1e bx lr 3480: 00001002 .word 0x00001002 3484: 00001003 .word 0x00001003 00001eb0 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 1eb0: e59f3008 ldr r3, [pc, #8] ; 1ec0 <== NOT EXECUTED 1eb4: e8830007 stm r3, {r0, r1, r2} <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 1eb8: e3a00000 mov r0, #0 <== NOT EXECUTED 1ebc: e12fff1e bx lr <== NOT EXECUTED 1ec0: 00018524 .word 0x00018524 000032bc : { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32bc: e59f2180 ldr r2, [pc, #384] ; 3444 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 32c0: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32c4: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 32c8: e92d4030 push {r4, r5, lr} 32cc: e1a05000 mov r5, r0 rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32d0: e5920000 ldr r0, [r2] 32d4: e1a02001 mov r2, r1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 32d8: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32dc: eb0003dd bl 4258 if (sc != RTEMS_SUCCESSFUL) 32e0: e3500000 cmp r0, #0 32e4: 1a000022 bne 3374 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 32e8: e5943008 ldr r3, [r4, #8] 32ec: e2433001 sub r3, r3, #1 32f0: e3530000 cmp r3, #0 32f4: e5843008 str r3, [r4, #8] 32f8: 1a00004c bne 3430 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 32fc: e59420cc ldr r2, [r4, #204] ; 0xcc 3300: e59f3140 ldr r3, [pc, #320] ; 3448 3304: e0833282 add r3, r3, r2, lsl #5 3308: e5931004 ldr r1, [r3, #4] 330c: e3510000 cmp r1, #0 3310: 0a000003 beq 3324 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3314: e1a00004 mov r0, r4 <== NOT EXECUTED 3318: e1a0e00f mov lr, pc <== NOT EXECUTED 331c: e12fff11 bx r1 <== NOT EXECUTED 3320: ea000006 b 3340 <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3324: e5940018 ldr r0, [r4, #24] 3328: e1a02001 mov r2, r1 332c: eb0003c9 bl 4258 if (sc != RTEMS_SUCCESSFUL) { 3330: e3500000 cmp r0, #0 3334: 1a00000e bne 3374 rtems_fatal_error_occurred (sc); } drainOutput (tty); 3338: e1a00004 mov r0, r4 333c: ebfffe05 bl 2b58 } if (tty->device.outputUsesInterrupts 3340: e59430b4 ldr r3, [r4, #180] ; 0xb4 3344: e3530002 cmp r3, #2 3348: 1a00000a bne 3378 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 334c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 3350: e3a01001 mov r1, #1 <== NOT EXECUTED 3354: eb0002ab bl 3e08 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3358: e3500000 cmp r0, #0 <== NOT EXECUTED 335c: 1a000004 bne 3374 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 3360: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3364: e3a01001 mov r1, #1 <== NOT EXECUTED 3368: eb0002a6 bl 3e08 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 336c: e3500000 cmp r0, #0 <== NOT EXECUTED 3370: 0a000000 beq 3378 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3374: eb00054b bl 48a8 <== NOT EXECUTED } if (tty->device.lastClose) 3378: e594309c ldr r3, [r4, #156] ; 0x9c 337c: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3380: 11a02005 movne r2, r5 3384: 1284000c addne r0, r4, #12 3388: 18900003 ldmne r0, {r0, r1} 338c: 11a0e00f movne lr, pc 3390: 112fff13 bxne r3 if (tty->forw == NULL) { 3394: e894000c ldm r4, {r2, r3} 3398: e3520000 cmp r2, #0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 339c: 15823004 strne r3, [r2, #4] if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { 33a0: 1a000003 bne 33b4 rtems_termios_ttyTail = tty->back; 33a4: e59f10a0 ldr r1, [pc, #160] ; 344c if ( rtems_termios_ttyTail != NULL ) { 33a8: e3530000 cmp r3, #0 rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 33ac: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 33b0: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33b4: e5942004 ldr r2, [r4, #4] 33b8: e5943000 ldr r3, [r4] 33bc: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 33c0: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33c4: 1a000003 bne 33d8 rtems_termios_ttyHead = tty->forw; 33c8: e59f1080 ldr r1, [pc, #128] ; 3450 if ( rtems_termios_ttyHead != NULL ) { 33cc: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 33d0: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 33d4: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 33d8: e5940014 ldr r0, [r4, #20] 33dc: eb000376 bl 41bc rtems_semaphore_delete (tty->osem); 33e0: e5940018 ldr r0, [r4, #24] 33e4: eb000374 bl 41bc rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 33e8: e594008c ldr r0, [r4, #140] ; 0x8c 33ec: eb000372 bl 41bc if ((tty->device.pollRead == NULL) || 33f0: e59430a0 ldr r3, [r4, #160] ; 0xa0 33f4: e3530000 cmp r3, #0 33f8: 0a000002 beq 3408 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 33fc: e59430b4 ldr r3, [r4, #180] ; 0xb4 3400: e3530002 cmp r3, #2 3404: 1a000001 bne 3410 rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3408: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 340c: eb00036a bl 41bc <== NOT EXECUTED free (tty->rawInBuf.theBuf); 3410: e5940058 ldr r0, [r4, #88] ; 0x58 3414: eb0014cf bl 8758 free (tty->rawOutBuf.theBuf); 3418: e594007c ldr r0, [r4, #124] ; 0x7c 341c: eb0014cd bl 8758 free (tty->cbuf); 3420: e594001c ldr r0, [r4, #28] 3424: eb0014cb bl 8758 free (tty); 3428: e1a00004 mov r0, r4 342c: eb0014c9 bl 8758 } rtems_semaphore_release (rtems_termios_ttyMutex); 3430: e59f300c ldr r3, [pc, #12] ; 3444 3434: e5930000 ldr r0, [r3] 3438: eb0003cc bl 4370 return RTEMS_SUCCESSFUL; } 343c: e3a00000 mov r0, #0 3440: e8bd8030 pop {r4, r5, pc} 3444: 00019bc8 .word 0x00019bc8 3448: 000199f4 .word 0x000199f4 344c: 00019bcc .word 0x00019bcc 3450: 00019bd0 .word 0x00019bd0 000020b4 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20b4: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20b8: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20bc: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20c0: e3520002 cmp r2, #2 <== NOT EXECUTED * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 20c4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20c8: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20cc: 1a000005 bne 20e8 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 20d0: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 20d4: e1a01002 mov r1, r2 <== NOT EXECUTED 20d8: eb00074a bl 3e08 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 20dc: e3500000 cmp r0, #0 <== NOT EXECUTED 20e0: 0a00000c beq 2118 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20e4: eb0009ef bl 48a8 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 20e8: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 20ec: e3530005 cmp r3, #5 <== NOT EXECUTED 20f0: 1a000006 bne 2110 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 20f4: e59f3024 ldr r3, [pc, #36] ; 2120 <== NOT EXECUTED 20f8: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 20fc: e3530000 cmp r3, #0 <== NOT EXECUTED 2100: 0a000004 beq 2118 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2104: e1a0e00f mov lr, pc <== NOT EXECUTED 2108: e12fff13 bx r3 <== NOT EXECUTED 210c: ea000001 b 2118 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 2110: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 2114: eaffff6d b 1ed0 <== NOT EXECUTED } } 2118: e3a00000 mov r0, #0 <== NOT EXECUTED 211c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 2120: 000199f4 .word 0x000199f4 00002124 : * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 2124: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 2128: e59f32b8 ldr r3, [pc, #696] ; 23e8 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 212c: e1a04000 mov r4, r0 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 2130: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED 2134: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 2138: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 213c: e3560000 cmp r6, #0 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 2140: e1a0b001 mov fp, r1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2144: 11a05002 movne r5, r2 <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2148: 11a07003 movne r7, r3 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 214c: 13a06000 movne r6, #0 <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 2150: 1a00000e bne 2190 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2154: e1a08002 mov r8, r2 <== NOT EXECUTED 2158: e2843030 add r3, r4, #48 ; 0x30 <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 215c: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 2160: e58d2008 str r2, [sp, #8] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2164: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2168: e1a09006 mov r9, r6 <== NOT EXECUTED 216c: e1a05006 mov r5, r6 <== NOT EXECUTED 2170: ea000091 b 23bc <== NOT EXECUTED rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2174: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2178: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 217c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 2180: e1a0e00f mov lr, pc <== NOT EXECUTED 2184: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 2188: e2866001 add r6, r6, #1 <== NOT EXECUTED 218c: e2455001 sub r5, r5, #1 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 2190: e3550000 cmp r5, #0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2194: e1a01004 mov r1, r4 <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 2198: 1afffff5 bne 2174 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 219c: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 21a0: e3530000 cmp r3, #0 <== NOT EXECUTED 21a4: 1a00008c bne 23dc <== NOT EXECUTED 21a8: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 21ac: e3530000 cmp r3, #0 <== NOT EXECUTED 21b0: 0a000089 beq 23dc <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 21b4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 21b8: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 21bc: e1a0e00f mov lr, pc <== NOT EXECUTED 21c0: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 21c4: e3a03001 mov r3, #1 <== NOT EXECUTED 21c8: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 21cc: ea000083 b 23e0 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 21d0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 21d4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 21d8: e7dba006 ldrb sl, [fp, r6] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 21dc: 0a00000f beq 2220 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 21e0: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 21e4: e152000a cmp r2, sl <== NOT EXECUTED 21e8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 21ec: 1a000007 bne 2210 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 21f0: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 21f4: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 21f8: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 21fc: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 2200: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 2204: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2208: e3a09001 mov r9, #1 <== NOT EXECUTED 220c: ea000005 b 2228 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 2210: e153000a cmp r3, sl <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2214: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2218: 03c33010 biceq r3, r3, #16 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 221c: 0afffff8 beq 2204 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 2220: e3590000 cmp r9, #0 <== NOT EXECUTED 2224: 0a000015 beq 2280 <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2228: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 222c: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 2230: e3530020 cmp r3, #32 <== NOT EXECUTED 2234: 1a00005e bne 23b4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2238: e10f7000 mrs r7, CPSR <== NOT EXECUTED 223c: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 2240: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2244: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2248: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 224c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2250: e3520000 cmp r2, #0 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2254: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2258: 0a000006 beq 2278 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 225c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 2260: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2264: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2268: e0811003 add r1, r1, r3 <== NOT EXECUTED 226c: e3a02001 mov r2, #1 <== NOT EXECUTED 2270: e1a0e00f mov lr, pc <== NOT EXECUTED 2274: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2278: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 227c: ea00004c b 23b4 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 2280: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2284: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2288: e2800001 add r0, r0, #1 <== NOT EXECUTED 228c: eb004fb8 bl 16174 <__umodsi3> <== NOT EXECUTED 2290: e1a07000 mov r7, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2294: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2298: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 229c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 22a0: e58d2000 str r2, [sp] <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 22a4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 22a8: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22ac: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 22b0: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 22b4: e0800007 add r0, r0, r7 <== NOT EXECUTED 22b8: eb004fad bl 16174 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 22bc: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 22c0: e1500003 cmp r0, r3 <== NOT EXECUTED 22c4: 9a000025 bls 2360 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 22c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 22cc: e3130001 tst r3, #1 <== NOT EXECUTED 22d0: 1a000022 bne 2360 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 22d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22d8: e3833001 orr r3, r3, #1 <== NOT EXECUTED 22dc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 22e0: e59f3104 ldr r3, [pc, #260] ; 23ec <== NOT EXECUTED 22e4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 22e8: e0023003 and r3, r2, r3 <== NOT EXECUTED 22ec: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 22f0: 1a00000e bne 2330 <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 22f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22f8: e3130020 tst r3, #32 <== NOT EXECUTED 22fc: 1a000002 bne 230c <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 2300: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2304: e3530000 cmp r3, #0 <== NOT EXECUTED 2308: 1a000014 bne 2360 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 230c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2310: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2314: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2318: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 231c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2320: e3a02001 mov r2, #1 <== NOT EXECUTED 2324: e1a0e00f mov lr, pc <== NOT EXECUTED 2328: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 232c: ea00000b b 2360 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 2330: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2334: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2338: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 233c: 1a000007 bne 2360 <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2340: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2344: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2348: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 234c: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 2350: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 2354: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2358: 11a0e00f movne lr, pc <== NOT EXECUTED 235c: 112fff13 bxne r3 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2360: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2364: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2368: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 236c: e1570003 cmp r7, r3 <== NOT EXECUTED dropped++; 2370: 02855001 addeq r5, r5, #1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2374: 0a00000e beq 23b4 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2378: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 237c: e7c3a007 strb sl, [r3, r7] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2380: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2384: e3530000 cmp r3, #0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2388: e5847060 str r7, [r4, #96] ; 0x60 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 238c: 1a000008 bne 23b4 <== NOT EXECUTED 2390: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2394: e3530000 cmp r3, #0 <== NOT EXECUTED 2398: 0a000005 beq 23b4 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 239c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 23a0: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 23a4: e1a0e00f mov lr, pc <== NOT EXECUTED 23a8: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 23ac: e3a02001 mov r2, #1 <== NOT EXECUTED 23b0: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 23b4: e2866001 add r6, r6, #1 <== NOT EXECUTED 23b8: e2488001 sub r8, r8, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 23bc: e3580000 cmp r8, #0 <== NOT EXECUTED 23c0: 1affff82 bne 21d0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 23c4: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 23c8: e0833005 add r3, r3, r5 <== NOT EXECUTED 23cc: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 23d0: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 23d4: eb0007e5 bl 4370 <== NOT EXECUTED return dropped; 23d8: ea000000 b 23e0 <== NOT EXECUTED 23dc: e3a05000 mov r5, #0 <== NOT EXECUTED } 23e0: e1a00005 mov r0, r5 <== NOT EXECUTED 23e4: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 23e8: 000199f4 .word 0x000199f4 23ec: 00000402 .word 0x00000402 00002f14 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2f14: e5903000 ldr r3, [r0] struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 2f18: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f1c: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 2f20: e580100c str r1, [r0, #12] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2f24: e5934034 ldr r4, [r3, #52] ; 0x34 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f28: e1a05000 mov r5, r0 struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2f2c: e1a02001 mov r2, r1 2f30: e5940018 ldr r0, [r4, #24] rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 2f34: e5957008 ldr r7, [r5, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2f38: eb0004c6 bl 4258 if (sc != RTEMS_SUCCESSFUL) { 2f3c: e2506000 subs r6, r0, #0 2f40: 1a0000d7 bne 32a4 args->ioctl_return = sc; return sc; } switch (args->command) { 2f44: e5953004 ldr r3, [r5, #4] 2f48: e3530004 cmp r3, #4 2f4c: 0a0000ab beq 3200 2f50: 8a000005 bhi 2f6c 2f54: e3530002 cmp r3, #2 2f58: 0a000029 beq 3004 2f5c: 8a0000a0 bhi 31e4 2f60: e3530001 cmp r3, #1 2f64: 1a000010 bne 2fac 2f68: ea00001b b 2fdc 2f6c: e59f233c ldr r2, [pc, #828] ; 32b0 <== NOT EXECUTED 2f70: e1530002 cmp r3, r2 <== NOT EXECUTED 2f74: 0a0000bd beq 3270 <== NOT EXECUTED 2f78: 8a000002 bhi 2f88 <== NOT EXECUTED 2f7c: e3530005 cmp r3, #5 <== NOT EXECUTED 2f80: 1a000009 bne 2fac <== NOT EXECUTED 2f84: ea000099 b 31f0 <== NOT EXECUTED 2f88: e59f2324 ldr r2, [pc, #804] ; 32b4 <== NOT EXECUTED 2f8c: e1530002 cmp r3, r2 <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_open != NULL) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 2f90: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 2f94: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2f98: 05832000 streq r2, [r3] <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 2f9c: 0a0000be beq 329c <== NOT EXECUTED 2fa0: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 2fa4: e1530002 cmp r3, r2 <== NOT EXECUTED 2fa8: 0a000098 beq 3210 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 2fac: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2fb0: e59f3300 ldr r3, [pc, #768] ; 32b8 <== NOT EXECUTED 2fb4: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2fb8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2fbc: e3530000 cmp r3, #0 <== NOT EXECUTED 2fc0: 03a0600a moveq r6, #10 <== NOT EXECUTED 2fc4: 0a0000b4 beq 329c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 2fc8: e1a00004 mov r0, r4 <== NOT EXECUTED 2fcc: e1a01005 mov r1, r5 <== NOT EXECUTED 2fd0: e1a0e00f mov lr, pc <== NOT EXECUTED 2fd4: e12fff13 bx r3 <== NOT EXECUTED 2fd8: ea0000a2 b 3268 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 2fdc: e5957008 ldr r7, [r5, #8] 2fe0: e284c030 add ip, r4, #48 ; 0x30 2fe4: e8bc000f ldm ip!, {r0, r1, r2, r3} 2fe8: e1a0e007 mov lr, r7 2fec: e8ae000f stmia lr!, {r0, r1, r2, r3} 2ff0: e8bc000f ldm ip!, {r0, r1, r2, r3} 2ff4: e8ae000f stmia lr!, {r0, r1, r2, r3} 2ff8: e59c3000 ldr r3, [ip] 2ffc: e58e3000 str r3, [lr] break; 3000: ea0000a5 b 329c case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3004: e595e008 ldr lr, [r5, #8] 3008: e8be000f ldm lr!, {r0, r1, r2, r3} 300c: e284c030 add ip, r4, #48 ; 0x30 3010: e8ac000f stmia ip!, {r0, r1, r2, r3} 3014: e8be000f ldm lr!, {r0, r1, r2, r3} 3018: e8ac000f stmia ip!, {r0, r1, r2, r3} /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 301c: e59420b8 ldr r2, [r4, #184] ; 0xb8 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3020: e59e3000 ldr r3, [lr] /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 3024: e3120c02 tst r2, #512 ; 0x200 case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3028: e58c3000 str r3, [ip] /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 302c: 0a000019 beq 3098 3030: e5943030 ldr r3, [r4, #48] ; 0x30 3034: e3130b01 tst r3, #1024 ; 0x400 3038: 1a000016 bne 3098 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 303c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3040: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3044: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3048: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 304c: e3130020 tst r3, #32 <== NOT EXECUTED 3050: 0a000010 beq 3098 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3054: e10f7000 mrs r7, CPSR <== NOT EXECUTED 3058: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 305c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3060: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3064: e5942094 ldr r2, [r4, #148] ; 0x94 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3068: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 306c: e3520000 cmp r2, #0 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 3070: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3074: 0a000006 beq 3094 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3078: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 307c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3080: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3084: e0811003 add r1, r1, r3 <== NOT EXECUTED 3088: e3a02001 mov r2, #1 <== NOT EXECUTED 308c: e1a0e00f mov lr, pc <== NOT EXECUTED 3090: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3094: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 3098: e59430b8 ldr r3, [r4, #184] ; 0xb8 309c: e3130b01 tst r3, #1024 ; 0x400 30a0: 0a000008 beq 30c8 30a4: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 30a8: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30ac: 1a000005 bne 30c8 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 30b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30b4: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30b8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 30bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30c0: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 30c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 30c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 30cc: e3130c01 tst r3, #256 ; 0x100 30d0: 0a000010 beq 3118 30d4: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 30d8: e3530000 cmp r3, #0 <== NOT EXECUTED 30dc: ba00000d blt 3118 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30e4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 30e8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 30ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30f0: e3130004 tst r3, #4 <== NOT EXECUTED 30f4: 0a000004 beq 310c <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 30f8: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 30fc: e3530000 cmp r3, #0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 3100: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3104: 11a0e00f movne lr, pc <== NOT EXECUTED 3108: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 310c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3110: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3114: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 3118: e5943038 ldr r3, [r4, #56] ; 0x38 311c: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 3120: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3124: b3833c01 orrlt r3, r3, #256 ; 0x100 3128: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 312c: e5943030 ldr r3, [r4, #48] ; 0x30 3130: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3134: 159430b8 ldrne r3, [r4, #184] ; 0xb8 3138: 13833b01 orrne r3, r3, #1024 ; 0x400 313c: 158430b8 strne r3, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 3140: e5943030 ldr r3, [r4, #48] ; 0x30 3144: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 3148: 159430b8 ldrne r3, [r4, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 314c: e594703c ldr r7, [r4, #60] ; 0x3c if (tty->termios.c_iflag & IXOFF) { tty->flow_ctrl |= FL_MDXOF; } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { tty->flow_ctrl |= FL_MDXON; 3150: 13833c02 orrne r3, r3, #512 ; 0x200 3154: 158430b8 strne r3, [r4, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 3158: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 315c: 13a03000 movne r3, #0 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 3160: 1a000014 bne 31b8 tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 3164: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 3168: eb0002a5 bl 3c04 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 316c: e3a0100a mov r1, #10 <== NOT EXECUTED 3170: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3174: eb004b6a bl 15f24 <__aeabi_uidiv> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3178: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 317c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3180: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 3184: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3188: 0a000006 beq 31a8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 318c: e3520000 cmp r2, #0 <== NOT EXECUTED 3190: 01a02000 moveq r2, r0 <== NOT EXECUTED 3194: 13a02000 movne r2, #0 <== NOT EXECUTED } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3198: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 319c: e5842074 str r2, [r4, #116] ; 0x74 <== NOT EXECUTED else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 31a0: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 31a4: ea000006 b 31c4 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 31a8: e3520000 cmp r2, #0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 31ac: 03a03001 moveq r3, #1 <== NOT EXECUTED 31b0: 0584306c streq r3, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 31b4: 0a000002 beq 31c4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 31b8: e5843074 str r3, [r4, #116] ; 0x74 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 31bc: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 31c0: e5843070 str r3, [r4, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 31c4: e59430a8 ldr r3, [r4, #168] ; 0xa8 31c8: e3530000 cmp r3, #0 31cc: 0a000032 beq 329c (*tty->device.setAttributes)(tty->minor, &tty->termios); 31d0: e5940010 ldr r0, [r4, #16] 31d4: e2841030 add r1, r4, #48 ; 0x30 31d8: e1a0e00f mov lr, pc 31dc: e12fff13 bx r3 31e0: ea00002d b 329c break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 31e4: e1a00004 mov r0, r4 31e8: ebfffe5a bl 2b58 break; 31ec: ea00002a b 329c case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 31f0: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 31f4: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 31f8: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 31fc: ea000026 b 329c <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3200: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3204: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3208: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 320c: ea000022 b 329c <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3210: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3214: e59f309c ldr r3, [pc, #156] ; 32b8 <== NOT EXECUTED 3218: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 321c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3220: e3530000 cmp r3, #0 <== NOT EXECUTED 3224: 0a000003 beq 3238 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3228: e1a00004 mov r0, r4 <== NOT EXECUTED 322c: e1a0e00f mov lr, pc <== NOT EXECUTED 3230: e12fff13 bx r3 <== NOT EXECUTED 3234: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3238: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 323c: e5932000 ldr r2, [r3] <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3240: e59f3070 ldr r3, [pc, #112] ; 32b8 <== NOT EXECUTED 3244: e7933282 ldr r3, [r3, r2, lsl #5] <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3248: e3a01000 mov r1, #0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 324c: e3530000 cmp r3, #0 <== NOT EXECUTED */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); tty->t_sc = NULL; /* ensure that no more valid data */ 3250: e58410d0 str r1, [r4, #208] ; 0xd0 <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 3254: e58420cc str r2, [r4, #204] ; 0xcc <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3258: 0a00000f beq 329c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 325c: e1a00004 mov r0, r4 <== NOT EXECUTED 3260: e1a0e00f mov lr, pc <== NOT EXECUTED 3264: e12fff13 bx r3 <== NOT EXECUTED 3268: e1a06000 mov r6, r0 <== NOT EXECUTED 326c: ea00000a b 329c <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3270: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3274: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3278: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 327c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED 3280: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3284: e2842020 add r2, r4, #32 <== NOT EXECUTED 3288: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED 328c: e0411002 sub r1, r1, r2 <== NOT EXECUTED 3290: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3294: e0813003 add r3, r1, r3 <== NOT EXECUTED 3298: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 329c: e5940018 ldr r0, [r4, #24] 32a0: eb000432 bl 4370 args->ioctl_return = sc; 32a4: e585600c str r6, [r5, #12] return sc; } 32a8: e1a00006 mov r0, r6 32ac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 32b0: 4004667f .word 0x4004667f 32b4: 4004741a .word 0x4004741a 32b8: 000199f4 .word 0x000199f4 00003454 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3454: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3458: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 345c: e59f23e0 ldr r2, [pc, #992] ; 3844 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3460: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3464: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3468: e1a09000 mov r9, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 346c: e5920000 ldr r0, [r2] 3470: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3474: e1a0b003 mov fp, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3478: eb000376 bl 4258 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 347c: e2506000 subs r6, r0, #0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 3480: 059f33c0 ldreq r3, [pc, #960] ; 3848 3484: 05935000 ldreq r5, [r3] /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3488: 0a000007 beq 34ac 348c: ea0000e2 b 381c <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 3490: e595300c ldr r3, [r5, #12] 3494: e1530009 cmp r3, r9 3498: 1a000002 bne 34a8 349c: e5953010 ldr r3, [r5, #16] 34a0: e153000a cmp r3, sl 34a4: 0a0000bb beq 3798 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 34a8: e5955000 ldr r5, [r5] 34ac: e3550000 cmp r5, #0 34b0: 1afffff6 bne 3490 34b4: ea0000da b 3824 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 34b8: e59f738c ldr r7, [pc, #908] ; 384c 34bc: e5973004 ldr r3, [r7, #4] 34c0: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34c4: e5950064 ldr r0, [r5, #100] ; 0x64 34c8: eb0015ec bl 8c80 if (tty->rawInBuf.theBuf == NULL) { 34cc: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34d0: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 34d4: 1a000006 bne 34f4 free(tty); 34d8: e1a00005 mov r0, r5 <== NOT EXECUTED 34dc: eb00149d bl 8758 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 34e0: e59f335c ldr r3, [pc, #860] ; 3844 <== NOT EXECUTED 34e4: e5930000 ldr r0, [r3] <== NOT EXECUTED 34e8: eb0003a0 bl 4370 <== NOT EXECUTED 34ec: e3a0601a mov r6, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 34f0: ea0000c9 b 381c <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 34f4: e5973008 ldr r3, [r7, #8] 34f8: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 34fc: e5950088 ldr r0, [r5, #136] ; 0x88 3500: eb0015de bl 8c80 if (tty->rawOutBuf.theBuf == NULL) { 3504: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3508: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 350c: 0a000006 beq 352c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3510: e5970000 ldr r0, [r7] 3514: eb0015d9 bl 8c80 if (tty->cbuf == NULL) { 3518: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 351c: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 3520: 1a000004 bne 3538 free((void *)(tty->rawOutBuf.theBuf)); 3524: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 3528: eb00148a bl 8758 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 352c: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 3530: eb001488 bl 8758 <== NOT EXECUTED 3534: eaffffe7 b 34d8 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3538: e59f3308 ldr r3, [pc, #776] ; 3848 353c: e5932000 ldr r2, [r3] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3540: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3544: e3520000 cmp r2, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3548: e885000c stm r5, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 354c: 15825004 strne r5, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3550: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 3554: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 3558: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 355c: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 3560: e58530e4 str r3, [r5, #228] ; 0xe4 tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3564: e59f32e4 ldr r3, [pc, #740] ; 3850 3568: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 356c: e59f72d8 ldr r7, [pc, #728] ; 384c tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 3570: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 3574: 05834000 streq r4, [r3] */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3578: e59f22c8 ldr r2, [pc, #712] ; 3848 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 357c: e5d7300c ldrb r3, [r7, #12] 3580: e59f02cc ldr r0, [pc, #716] ; 3854 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3584: e5824000 str r4, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3588: e1830000 orr r0, r3, r0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 358c: e584a010 str sl, [r4, #16] tty->major = major; 3590: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3594: e284c014 add ip, r4, #20 3598: e3a03000 mov r3, #0 359c: e3a01001 mov r1, #1 35a0: e3a02054 mov r2, #84 ; 0x54 35a4: e58dc000 str ip, [sp] 35a8: eb000298 bl 4010 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 35ac: e2503000 subs r3, r0, #0 35b0: 1a000095 bne 380c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35b4: e5d7200c ldrb r2, [r7, #12] 35b8: e59f0298 ldr r0, [pc, #664] ; 3858 35bc: e284c018 add ip, r4, #24 35c0: e1820000 orr r0, r2, r0 35c4: e3a01001 mov r1, #1 35c8: e3a02054 mov r2, #84 ; 0x54 35cc: e58dc000 str ip, [sp] 35d0: eb00028e bl 4010 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 35d4: e2501000 subs r1, r0, #0 35d8: 1a00008b bne 380c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35dc: e5d7300c ldrb r3, [r7, #12] 35e0: e59f0274 ldr r0, [pc, #628] ; 385c 35e4: e284c08c add ip, r4, #140 ; 0x8c 35e8: e1830000 orr r0, r3, r0 35ec: e3a02020 mov r2, #32 35f0: e1a03001 mov r3, r1 35f4: e58dc000 str ip, [sp] 35f8: eb000284 bl 4010 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 35fc: e250e000 subs lr, r0, #0 3600: 1a000081 bne 380c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3604: e8bb000f ldm fp!, {r0, r1, r2, r3} 3608: e284c098 add ip, r4, #152 ; 0x98 360c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3610: e89b000f ldm fp, {r0, r1, r2, r3} 3614: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3618: e59430b4 ldr r3, [r4, #180] ; 0xb4 361c: e3530002 cmp r3, #2 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 3620: e584e094 str lr, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3624: 1a000017 bne 3688 sc = rtems_task_create ( 3628: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 362c: e59f022c ldr r0, [pc, #556] ; 3860 <== NOT EXECUTED 3630: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 3634: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3638: e3a0100a mov r1, #10 <== NOT EXECUTED 363c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3640: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3644: e58de000 str lr, [sp] <== NOT EXECUTED 3648: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 364c: eb00036e bl 440c <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 3650: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3654: 1a00006c bne 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3658: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 365c: e59f0200 ldr r0, [pc, #512] ; 3864 <== NOT EXECUTED 3660: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3664: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3668: e3a01009 mov r1, #9 <== NOT EXECUTED 366c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3670: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3674: e58de000 str lr, [sp] <== NOT EXECUTED 3678: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 367c: eb000362 bl 440c <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 3680: e3500000 cmp r0, #0 <== NOT EXECUTED 3684: 1a000060 bne 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3688: e59430a0 ldr r3, [r4, #160] ; 0xa0 368c: e3530000 cmp r3, #0 3690: 0a000002 beq 36a0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 3694: e59430b4 ldr r3, [r4, #180] ; 0xb4 3698: e3530002 cmp r3, #2 369c: 1a00000b bne 36d0 sc = rtems_semaphore_create ( 36a0: e59f31a4 ldr r3, [pc, #420] ; 384c <== NOT EXECUTED 36a4: e59f01bc ldr r0, [pc, #444] ; 3868 <== NOT EXECUTED 36a8: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 36ac: e3a01000 mov r1, #0 <== NOT EXECUTED 36b0: e1830000 orr r0, r3, r0 <== NOT EXECUTED 36b4: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 36b8: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 36bc: e1a03001 mov r3, r1 <== NOT EXECUTED 36c0: e58dc000 str ip, [sp] <== NOT EXECUTED 36c4: eb000251 bl 4010 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 36c8: e3500000 cmp r0, #0 <== NOT EXECUTED 36cc: 1a00004e bne 380c <== NOT EXECUTED tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 36d0: e3a03000 mov r3, #0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 36d4: e58430b8 str r3, [r4, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 36d8: e5941064 ldr r1, [r4, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; 36dc: e594c064 ldr ip, [r4, #100] ; 0x64 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 36e0: e3a02003 mov r2, #3 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 36e4: e0000c92 mul r0, r2, ip tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; 36e8: e3a0c01c mov ip, #28 36ec: e5c4c042 strb ip, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 36f0: e28cc063 add ip, ip, #99 ; 0x63 36f4: e5c4c043 strb ip, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 36f8: e3a0c015 mov ip, #21 36fc: e5c4c044 strb ip, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 3700: e3a0c004 mov ip, #4 3704: e5c4c045 strb ip, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3708: e28cc00d add ip, ip, #13 370c: e5c4c049 strb ip, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 3710: e28cc002 add ip, ip, #2 3714: e5c4c04a strb ip, [r4, #74] ; 0x4a tty->termios.c_cc[VSUSP] = '\032'; 3718: e28cc007 add ip, ip, #7 371c: e5c4c04b strb ip, [r4, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 3720: e3a0c012 mov ip, #18 3724: e5c4c04d strb ip, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 3728: e3a0c00f mov ip, #15 372c: e5c4c04e strb ip, [r4, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 3730: e28cc008 add ip, ip, #8 3734: e5c4c04f strb ip, [r4, #79] ; 0x4f tty->termios.c_cc[VLNEXT] = '\026'; 3738: e3a0c016 mov ip, #22 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 373c: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 3740: e5c43051 strb r3, [r4, #81] ; 0x51 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 3744: e5c4c050 strb ip, [r4, #80] ; 0x50 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 3748: e5c42041 strb r2, [r4, #65] ; 0x41 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 374c: e59f30f8 ldr r3, [pc, #248] ; 384c tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 3750: e1a00120 lsr r0, r0, #2 /* * Bump name characer */ if (c++ == 'z') 3754: e5d3200c ldrb r2, [r3, #12] tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 3758: e58400c0 str r0, [r4, #192] ; 0xc0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 375c: e59f0108 ldr r0, [pc, #264] ; 386c 3760: e5840030 str r0, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3764: e59f0104 ldr r0, [pc, #260] ; 3870 3768: e5840034 str r0, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 376c: e59f0100 ldr r0, [pc, #256] ; 3874 3770: e5840038 str r0, [r4, #56] ; 0x38 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3774: e59f00fc ldr r0, [pc, #252] ; 3878 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3778: e352007a cmp r2, #122 ; 0x7a /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 377c: e1a010a1 lsr r1, r1, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3780: e2822001 add r2, r2, #1 * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3784: e584003c str r0, [r4, #60] ; 0x3c /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 3788: e58410bc str r1, [r4, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 378c: e5c3200c strb r2, [r3, #12] c = 'a'; 3790: 03a02061 moveq r2, #97 ; 0x61 3794: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; if (!tty->refcount++) { 3798: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 379c: e5982000 ldr r2, [r8] if (!tty->refcount++) { 37a0: e3530000 cmp r3, #0 37a4: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 37a8: e5825034 str r5, [r2, #52] ; 0x34 if (!tty->refcount++) { 37ac: e5853008 str r3, [r5, #8] 37b0: 1a000016 bne 3810 if (tty->device.firstOpen) 37b4: e5953098 ldr r3, [r5, #152] ; 0x98 37b8: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 37bc: 11a00009 movne r0, r9 37c0: 11a0100a movne r1, sl 37c4: 11a02008 movne r2, r8 37c8: 11a0e00f movne lr, pc 37cc: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 37d0: e59530b4 ldr r3, [r5, #180] ; 0xb4 37d4: e3530002 cmp r3, #2 37d8: 1a00000c bne 3810 sc = rtems_task_start(tty->rxTaskId, 37dc: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 37e0: e59f1094 ldr r1, [pc, #148] ; 387c <== NOT EXECUTED 37e4: e1a02005 mov r2, r5 <== NOT EXECUTED 37e8: eb0003ac bl 46a0 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 37ec: e3500000 cmp r0, #0 <== NOT EXECUTED 37f0: 1a000005 bne 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 37f4: e1a02005 mov r2, r5 <== NOT EXECUTED 37f8: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 37fc: e59f107c ldr r1, [pc, #124] ; 3880 <== NOT EXECUTED 3800: eb0003a6 bl 46a0 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3804: e3500000 cmp r0, #0 <== NOT EXECUTED 3808: 0a000000 beq 3810 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 380c: eb000425 bl 48a8 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 3810: e59f302c ldr r3, [pc, #44] ; 3844 3814: e5930000 ldr r0, [r3] 3818: eb0002d4 bl 4370 return RTEMS_SUCCESSFUL; } 381c: e1a00006 mov r0, r6 3820: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3824: e3a00001 mov r0, #1 3828: e3a010e8 mov r1, #232 ; 0xe8 382c: eb00138d bl 8668 if (tty == NULL) { 3830: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3834: e1a05000 mov r5, r0 3838: e1a04000 mov r4, r0 if (tty == NULL) { 383c: 1affff1d bne 34b8 3840: eaffff26 b 34e0 <== NOT EXECUTED 3844: 00019bc8 .word 0x00019bc8 3848: 00019bd0 .word 0x00019bd0 384c: 00018524 .word 0x00018524 3850: 00019bcc .word 0x00019bcc 3854: 54526900 .word 0x54526900 3858: 54526f00 .word 0x54526f00 385c: 54527800 .word 0x54527800 3860: 54785400 .word 0x54785400 3864: 52785400 .word 0x52785400 3868: 54527200 .word 0x54527200 386c: 00002502 .word 0x00002502 3870: 00001805 .word 0x00001805 3874: 000008bd .word 0x000008bd 3878: 0000823b .word 0x0000823b 387c: 000038f0 .word 0x000038f0 3880: 00003884 .word 0x00003884 000023f0 : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 23f0: e59230b4 ldr r3, [r2, #180] ; 0xb4 23f4: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 23f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 23fc: e1a04002 mov r4, r2 2400: e1a0a000 mov sl, r0 2404: e1a06001 mov r6, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 2408: 1a000005 bne 2424 (*tty->device.write)(tty->minor, (void *)buf, len); 240c: e1a01000 mov r1, r0 2410: e1a02006 mov r2, r6 2414: e5940010 ldr r0, [r4, #16] 2418: e1a0e00f mov lr, pc 241c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 2420: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } newHead = tty->rawOutBuf.Head; 2424: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 2428: e3a07000 mov r7, #0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 242c: e3a09002 mov r9, #2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 2430: e3a0b001 mov fp, #1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 2434: ea00002e b 24f4 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2438: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 243c: e2850001 add r0, r5, #1 <== NOT EXECUTED 2440: eb004f4b bl 16174 <__umodsi3> <== NOT EXECUTED 2444: e1a05000 mov r5, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2448: e10f8000 mrs r8, CPSR <== NOT EXECUTED 244c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2450: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2454: ea00000a b 2484 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2458: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 245c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2460: e3a01000 mov r1, #0 <== NOT EXECUTED 2464: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2468: e1a02001 mov r2, r1 <== NOT EXECUTED 246c: eb000779 bl 4258 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2470: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2474: 1b00090b blne 48a8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2478: e10f8000 mrs r8, CPSR <== NOT EXECUTED 247c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2480: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2484: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2488: e1550003 cmp r5, r3 <== NOT EXECUTED 248c: 0afffff1 beq 2458 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 2490: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2494: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 2498: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 249c: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 24a0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 24a4: e3530000 cmp r3, #0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 24a8: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 24ac: 1a00000d bne 24e8 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 24b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24b4: e3130010 tst r3, #16 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; 24b8: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24bc: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 24c0: 158430b8 strne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 24c4: 1a000006 bne 24e4 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 24c8: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, 24cc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 24d0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 24d4: e0811003 add r1, r1, r3 <== NOT EXECUTED 24d8: e3a02001 mov r2, #1 <== NOT EXECUTED 24dc: e1a0e00f mov lr, pc <== NOT EXECUTED 24e0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 24e4: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 24e8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } rtems_interrupt_enable (level); len--; 24ec: e2466001 sub r6, r6, #1 <== NOT EXECUTED 24f0: e2877001 add r7, r7, #1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 24f4: e3560000 cmp r6, #0 <== NOT EXECUTED 24f8: 1affffce bne 2438 <== NOT EXECUTED 24fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00002bc4 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bc4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2bc8: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bcc: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2bd0: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2bd4: e3a01000 mov r1, #0 <== NOT EXECUTED rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; 2bd8: e595300c ldr r3, [r5, #12] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2bdc: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2be0: e1a02001 mov r2, r1 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; 2be4: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED char *buffer = args->buffer; 2be8: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2bec: eb000599 bl 4258 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2bf0: e2506000 subs r6, r0, #0 <== NOT EXECUTED 2bf4: 1a0000c1 bne 2f00 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2bf8: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2bfc: e59f3304 ldr r3, [pc, #772] ; 2f08 <== NOT EXECUTED 2c00: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2c04: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2c08: e3530000 cmp r3, #0 <== NOT EXECUTED 2c0c: 0a000005 beq 2c28 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2c10: e1a01005 mov r1, r5 <== NOT EXECUTED 2c14: e1a00004 mov r0, r4 <== NOT EXECUTED 2c18: e1a0e00f mov lr, pc <== NOT EXECUTED 2c1c: e12fff13 bx r3 <== NOT EXECUTED 2c20: e1a06000 mov r6, r0 <== NOT EXECUTED 2c24: ea0000b1 b 2ef0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 2c28: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 2c2c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2c30: e1520003 cmp r2, r3 <== NOT EXECUTED 2c34: 1a00009a bne 2ea4 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c38: e59420a0 ldr r2, [r4, #160] ; 0xa0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2c3c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 2c40: e3520000 cmp r2, #0 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 2c44: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 2c48: e5846020 str r6, [r4, #32] <== NOT EXECUTED 2c4c: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c50: 0a00003b beq 2d44 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 2c54: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 2c58: e3530000 cmp r3, #0 <== NOT EXECUTED 2c5c: 1a000038 bne 2d44 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 2c60: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2c64: e3130002 tst r3, #2 <== NOT EXECUTED 2c68: 0a00000d beq 2ca4 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2c6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2c70: e1a0e00f mov lr, pc <== NOT EXECUTED 2c74: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2c78: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 2c7c: e1a01004 mov r1, r4 <== NOT EXECUTED 2c80: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { 2c84: aa000002 bge 2c94 <== NOT EXECUTED rtems_task_wake_after (1); 2c88: e3a00001 mov r0, #1 <== NOT EXECUTED 2c8c: eb00069b bl 4700 <== NOT EXECUTED 2c90: eafffff5 b 2c6c <== NOT EXECUTED } else { if (siproc (n, tty)) 2c94: ebffff67 bl 2a38 <== NOT EXECUTED 2c98: e3500000 cmp r0, #0 <== NOT EXECUTED 2c9c: 0afffff2 beq 2c6c <== NOT EXECUTED 2ca0: ea00007f b 2ea4 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 2ca4: eb0003de bl 3c24 <== NOT EXECUTED 2ca8: e1a08000 mov r8, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2cac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2cb0: e1a0e00f mov lr, pc <== NOT EXECUTED 2cb4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2cb8: e3500000 cmp r0, #0 <== NOT EXECUTED 2cbc: aa000013 bge 2d10 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 2cc0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2cc4: e3530000 cmp r3, #0 <== NOT EXECUTED 2cc8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2ccc: 0a000005 beq 2ce8 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 2cd0: e3530000 cmp r3, #0 <== NOT EXECUTED 2cd4: 0a00000a beq 2d04 <== NOT EXECUTED 2cd8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2cdc: e3530000 cmp r3, #0 <== NOT EXECUTED 2ce0: 0a000007 beq 2d04 <== NOT EXECUTED 2ce4: ea000001 b 2cf0 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 2ce8: e3530000 cmp r3, #0 <== NOT EXECUTED 2cec: 0a00006c beq 2ea4 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 2cf0: eb0003cb bl 3c24 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 2cf4: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 2cf8: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 2cfc: e1500003 cmp r0, r3 <== NOT EXECUTED 2d00: 8a000067 bhi 2ea4 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 2d04: e3a00001 mov r0, #1 <== NOT EXECUTED 2d08: eb00067c bl 4700 <== NOT EXECUTED 2d0c: eaffffe6 b 2cac <== NOT EXECUTED } else { siproc (n, tty); 2d10: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 2d14: e1a01004 mov r1, r4 <== NOT EXECUTED 2d18: ebffff46 bl 2a38 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2d1c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2d20: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2d24: e1520003 cmp r2, r3 <== NOT EXECUTED 2d28: aa00005d bge 2ea4 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2d2c: e3530000 cmp r3, #0 <== NOT EXECUTED 2d30: 0affffdd beq 2cac <== NOT EXECUTED 2d34: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2d38: e3530000 cmp r3, #0 <== NOT EXECUTED 2d3c: 0affffda beq 2cac <== NOT EXECUTED 2d40: eaffffd7 b 2ca4 <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 2d44: e5948074 ldr r8, [r4, #116] ; 0x74 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 2d48: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 2d4c: e3a0a001 mov sl, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2d50: e59f91b4 ldr r9, [pc, #436] ; 2f0c <== NOT EXECUTED 2d54: ea000041 b 2e60 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 2d58: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 2d5c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d60: e2800001 add r0, r0, #1 <== NOT EXECUTED 2d64: eb004d02 bl 16174 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2d68: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2d6c: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2d70: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2d74: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2d78: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 2d7c: e0823003 add r3, r2, r3 <== NOT EXECUTED 2d80: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 2d84: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d88: eb004cf9 bl 16174 <__umodsi3> <== NOT EXECUTED 2d8c: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 2d90: e1500003 cmp r0, r3 <== NOT EXECUTED 2d94: 2a00001f bcs 2e18 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2d98: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d9c: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 2da0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2da4: e59f3164 ldr r3, [pc, #356] ; 2f10 <== NOT EXECUTED 2da8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2dac: e59f015c ldr r0, [pc, #348] ; 2f10 <== NOT EXECUTED 2db0: e0023003 and r3, r2, r3 <== NOT EXECUTED 2db4: e1530000 cmp r3, r0 <== NOT EXECUTED 2db8: 1a00000b bne 2dec <== NOT EXECUTED 2dbc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2dc0: e3530000 cmp r3, #0 <== NOT EXECUTED 2dc4: 0a000002 beq 2dd4 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 2dc8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2dcc: e3130020 tst r3, #32 <== NOT EXECUTED 2dd0: 0a000005 beq 2dec <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 2dd4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2dd8: e1a0100b mov r1, fp <== NOT EXECUTED 2ddc: e3a02001 mov r2, #1 <== NOT EXECUTED 2de0: e1a0e00f mov lr, pc <== NOT EXECUTED 2de4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2de8: ea00000a b 2e18 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 2dec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2df0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 2df4: 0a000007 beq 2e18 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 2df8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2dfc: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 2e00: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2e04: e3530000 cmp r3, #0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 2e08: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 2e0c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2e10: 11a0e00f movne lr, pc <== NOT EXECUTED 2e14: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2e18: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2e1c: e3130002 tst r3, #2 <== NOT EXECUTED 2e20: 0a000005 beq 2e3c <== NOT EXECUTED if (siproc (c, tty)) 2e24: e1a00008 mov r0, r8 <== NOT EXECUTED 2e28: e1a01004 mov r1, r4 <== NOT EXECUTED 2e2c: ebffff01 bl 2a38 <== NOT EXECUTED 2e30: e3500000 cmp r0, #0 <== NOT EXECUTED 2e34: 1a000007 bne 2e58 <== NOT EXECUTED 2e38: ea000007 b 2e5c <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 2e3c: e1a00008 mov r0, r8 <== NOT EXECUTED 2e40: e1a01004 mov r1, r4 <== NOT EXECUTED 2e44: ebfffefb bl 2a38 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2e48: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2e4c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e50: e1520003 cmp r2, r3 <== NOT EXECUTED 2e54: ba000000 blt 2e5c <== NOT EXECUTED 2e58: e3a0a000 mov sl, #0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 2e5c: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2e60: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 2e64: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2e68: e1520003 cmp r2, r3 <== NOT EXECUTED 2e6c: 0a000004 beq 2e84 <== NOT EXECUTED 2e70: e5993000 ldr r3, [r9] <== NOT EXECUTED 2e74: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e78: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2e7c: e1520003 cmp r2, r3 <== NOT EXECUTED 2e80: baffffb4 blt 2d58 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2e84: e35a0000 cmp sl, #0 <== NOT EXECUTED 2e88: 0a000005 beq 2ea4 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2e8c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 2e90: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2e94: e1a02008 mov r2, r8 <== NOT EXECUTED 2e98: eb0004ee bl 4258 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2e9c: e3500000 cmp r0, #0 <== NOT EXECUTED 2ea0: 0affffee beq 2e60 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 2ea4: e3a03000 mov r3, #0 <== NOT EXECUTED 2ea8: ea000007 b 2ecc <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 2eac: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 2eb0: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2eb4: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED 2eb8: e2822001 add r2, r2, #1 <== NOT EXECUTED 2ebc: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED 2ec0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED count--; 2ec4: e2477001 sub r7, r7, #1 <== NOT EXECUTED 2ec8: e2833001 add r3, r3, #1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 2ecc: e3570000 cmp r7, #0 <== NOT EXECUTED 2ed0: 0a000003 beq 2ee4 <== NOT EXECUTED 2ed4: e2841020 add r1, r4, #32 <== NOT EXECUTED 2ed8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 2edc: e1520001 cmp r2, r1 <== NOT EXECUTED 2ee0: bafffff1 blt 2eac <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2ee4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 2ee8: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 2eec: e5857018 str r7, [r5, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2ef0: e3a03000 mov r3, #0 <== NOT EXECUTED 2ef4: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 2ef8: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2efc: eb00051b bl 4370 <== NOT EXECUTED return sc; } 2f00: e1a00006 mov r0, r6 <== NOT EXECUTED 2f04: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2f08: 000199f4 .word 0x000199f4 2f0c: 00018524 .word 0x00018524 2f10: 00000202 .word 0x00000202 00001ed0 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 1ed0: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 1ed4: e59f31d0 ldr r3, [pc, #464] ; 20ac <== NOT EXECUTED 1ed8: e0023003 and r3, r2, r3 <== NOT EXECUTED 1edc: e59f21cc ldr r2, [pc, #460] ; 20b0 <== NOT EXECUTED 1ee0: e1530002 cmp r3, r2 <== NOT EXECUTED * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 1ee4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1ee8: e1a04000 mov r4, r0 <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 1eec: 1a00000e bne 1f2c <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 1ef0: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 1ef4: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 1ef8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1efc: e1a0e00f mov lr, pc <== NOT EXECUTED 1f00: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1f04: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f08: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f0c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f10: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f14: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f18: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f1c: e3811002 orr r1, r1, #2 <== NOT EXECUTED 1f20: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f24: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 1f28: ea000011 b 1f74 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 1f2c: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 1f30: e2033003 and r3, r3, #3 <== NOT EXECUTED 1f34: e3530002 cmp r3, #2 <== NOT EXECUTED 1f38: 1a000010 bne 1f80 <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 1f3c: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 1f40: e3a02001 mov r2, #1 <== NOT EXECUTED 1f44: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1f48: e1a0e00f mov lr, pc <== NOT EXECUTED 1f4c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 1f50: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f54: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f58: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f5c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f60: e59410b8 ldr r1, [r4, #184] ; 0xb8 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f64: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f68: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 1f6c: e58410b8 str r1, [r4, #184] ; 0xb8 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f70: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1f74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 1f78: e3a05001 mov r5, #1 <== NOT EXECUTED 1f7c: ea000048 b 20a4 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 1f80: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 1f84: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 1f88: e1520003 cmp r2, r3 <== NOT EXECUTED 1f8c: 1a000005 bne 1fa8 <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 1f90: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 1f94: e3530002 cmp r3, #2 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 1f98: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 1f9c: 0b0008f3 bleq 4370 <== NOT EXECUTED 1fa0: e3a05000 mov r5, #0 <== NOT EXECUTED 1fa4: ea00003e b 20a4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1fa8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1fac: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1fb0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 1fb4: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 1fb8: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 1fbc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1fc0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 1fc4: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 1fc8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 1fcc: e0800003 add r0, r0, r3 <== NOT EXECUTED 1fd0: eb005067 bl 16174 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 1fd4: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 1fd8: e3530002 cmp r3, #2 <== NOT EXECUTED rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 1fdc: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 1fe0: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 1fe4: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 1fe8: 0b0008e0 bleq 4370 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 1fec: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 1ff0: e1560003 cmp r6, r3 <== NOT EXECUTED 1ff4: 1a00000a bne 2024 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 1ff8: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 1ffc: e3a05000 mov r5, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2000: e3530000 cmp r3, #0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2004: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 2008: 01a05003 moveq r5, r3 <== NOT EXECUTED 200c: 0a000023 beq 20a0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 2010: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2014: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2018: e1a0e00f mov lr, pc <== NOT EXECUTED 201c: e12fff13 bx r3 <== NOT EXECUTED 2020: ea00001e b 20a0 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 2024: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2028: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 202c: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 2030: 1a00000a bne 2060 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2034: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2038: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 203c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; 2040: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2044: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2048: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 204c: e3a02001 mov r2, #1 <== NOT EXECUTED 2050: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2054: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2058: e3a05000 mov r5, #0 <== NOT EXECUTED 205c: ea00000f b 20a0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 2060: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2064: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2068: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 206c: 95945080 ldrls r5, [r4, #128] ; 0x80 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 2070: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 2074: e0665005 rsb r5, r6, r5 <== NOT EXECUTED /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 2078: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 207c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { 2080: 13a05001 movne r5, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 2084: e3a03001 mov r3, #1 <== NOT EXECUTED 2088: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 208c: e0811006 add r1, r1, r6 <== NOT EXECUTED 2090: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2094: e1a02005 mov r2, r5 <== NOT EXECUTED 2098: e1a0e00f mov lr, pc <== NOT EXECUTED 209c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 20a0: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 20a4: e1a00005 mov r0, r5 <== NOT EXECUTED 20a8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 20ac: 00000403 .word 0x00000403 20b0: 00000401 .word 0x00000401 000038f0 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 38f0: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 38f4: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 38f8: e3a05000 mov r5, #0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 38fc: e28d6007 add r6, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 3900: e1a0300d mov r3, sp <== NOT EXECUTED 3904: e3a01002 mov r1, #2 <== NOT EXECUTED 3908: e3a02000 mov r2, #0 <== NOT EXECUTED 390c: e3a00003 mov r0, #3 <== NOT EXECUTED 3910: eb0000e0 bl 3c98 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3914: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3918: e3130001 tst r3, #1 <== NOT EXECUTED 391c: 0a000003 beq 3930 <== NOT EXECUTED tty->rxTaskId = 0; 3920: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3924: e1a00005 mov r0, r5 <== NOT EXECUTED 3928: eb000309 bl 4554 <== NOT EXECUTED 392c: eafffff3 b 3900 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3930: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3934: e1a0e00f mov lr, pc <== NOT EXECUTED 3938: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 393c: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 3940: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3944: 0affffed beq 3900 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3948: e1a00004 mov r0, r4 <== NOT EXECUTED 394c: e1a01006 mov r1, r6 <== NOT EXECUTED 3950: e3a02001 mov r2, #1 <== NOT EXECUTED c = tty->device.pollRead(tty->minor); if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; 3954: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3958: ebfff9f1 bl 2124 <== NOT EXECUTED 395c: eaffffe7 b 3900 <== NOT EXECUTED 00001ec4 : void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 1ec4: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 1ec8: e3a01002 mov r1, #2 <== NOT EXECUTED 1ecc: ea0007cd b 3e08 <== NOT EXECUTED 00003884 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3884: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 3888: e59f705c ldr r7, [pc, #92] ; 38ec <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 388c: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 3890: e3a05000 mov r5, #0 <== NOT EXECUTED 3894: e1a0300d mov r3, sp <== NOT EXECUTED 3898: e3a01002 mov r1, #2 <== NOT EXECUTED 389c: e3a02000 mov r2, #0 <== NOT EXECUTED 38a0: e3a00003 mov r0, #3 <== NOT EXECUTED 38a4: eb0000fb bl 3c98 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 38a8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 38ac: e3130001 tst r3, #1 <== NOT EXECUTED else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { rtems_termios_linesw[tty->t_line].l_start(tty); 38b0: e1a00004 mov r0, r4 <== NOT EXECUTED rtems_event_receive((TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 38b4: 0a000003 beq 38c8 <== NOT EXECUTED tty->txTaskId = 0; 38b8: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 38bc: e1a00005 mov r0, r5 <== NOT EXECUTED 38c0: eb000323 bl 4554 <== NOT EXECUTED 38c4: eafffff2 b 3894 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 38c8: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 38cc: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 38d0: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 38d4: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 38d8: 11a0e00f movne lr, pc <== NOT EXECUTED 38dc: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 38e0: e1a00004 mov r0, r4 <== NOT EXECUTED 38e4: ebfff979 bl 1ed0 <== NOT EXECUTED 38e8: eaffffe9 b 3894 <== NOT EXECUTED 38ec: 000199f4 .word 0x000199f4 00002a98 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2a98: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2a9c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2aa0: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2aa4: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2aa8: e1a04000 mov r4, r0 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2aac: e1a02001 mov r2, r1 2ab0: e5950018 ldr r0, [r5, #24] 2ab4: eb0005e7 bl 4258 if (sc != RTEMS_SUCCESSFUL) 2ab8: e2506000 subs r6, r0, #0 2abc: 1a000022 bne 2b4c return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2ac0: e59520cc ldr r2, [r5, #204] ; 0xcc 2ac4: e59f3088 ldr r3, [pc, #136] ; 2b54 2ac8: e0833282 add r3, r3, r2, lsl #5 2acc: e593300c ldr r3, [r3, #12] 2ad0: e3530000 cmp r3, #0 2ad4: 0a000005 beq 2af0 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2ad8: e1a01004 mov r1, r4 <== NOT EXECUTED 2adc: e1a00005 mov r0, r5 <== NOT EXECUTED 2ae0: e1a0e00f mov lr, pc <== NOT EXECUTED 2ae4: e12fff13 bx r3 <== NOT EXECUTED 2ae8: e1a06000 mov r6, r0 <== NOT EXECUTED 2aec: ea000014 b 2b44 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2af0: e5953034 ldr r3, [r5, #52] ; 0x34 2af4: e3130001 tst r3, #1 uint32_t count = args->count; 2af8: 15948010 ldrne r8, [r4, #16] char *buffer = args->buffer; 2afc: 1594a00c ldrne sl, [r4, #12] 2b00: 11a07006 movne r7, r6 if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2b04: 1a000004 bne 2b1c 2b08: ea000007 b 2b2c <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 2b0c: e7da0007 ldrb r0, [sl, r7] 2b10: ebfffe7a bl 2500 2b14: e2877001 add r7, r7, #1 2b18: e2488001 sub r8, r8, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b1c: e3580000 cmp r8, #0 oproc (*buffer++, tty); 2b20: e1a01005 mov r1, r5 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b24: 1afffff8 bne 2b0c 2b28: ea000003 b 2b3c oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2b2c: e284000c add r0, r4, #12 <== NOT EXECUTED 2b30: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2b34: e1a02005 mov r2, r5 <== NOT EXECUTED 2b38: ebfffe2c bl 23f0 <== NOT EXECUTED args->bytes_moved = args->count; 2b3c: e5943010 ldr r3, [r4, #16] 2b40: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 2b44: e5950018 ldr r0, [r5, #24] 2b48: eb000608 bl 4370 return sc; } 2b4c: e1a00006 mov r0, r6 2b50: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2b54: 000199f4 .word 0x000199f4 00005d38 : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 5d38: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 5d3c: e2107202 ands r7, r0, #536870912 ; 0x20000000 <== NOT EXECUTED static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 5d40: e1a06000 mov r6, r0 <== NOT EXECUTED 5d44: e1a09001 mov r9, r1 <== NOT EXECUTED 5d48: e1a04002 mov r4, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 5d4c: 0a00000d beq 5d88 <== NOT EXECUTED { if (rtems_panic_in_progress++) 5d50: e59f3160 ldr r3, [pc, #352] ; 5eb8 <== NOT EXECUTED 5d54: e5932000 ldr r2, [r3] <== NOT EXECUTED 5d58: e3520000 cmp r2, #0 <== NOT EXECUTED 5d5c: e2822001 add r2, r2, #1 <== NOT EXECUTED 5d60: e5832000 str r2, [r3] <== NOT EXECUTED 5d64: 0a000003 beq 5d78 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5d68: e59f314c ldr r3, [pc, #332] ; 5ebc <== NOT EXECUTED 5d6c: e5932000 ldr r2, [r3] <== NOT EXECUTED 5d70: e2822001 add r2, r2, #1 <== NOT EXECUTED 5d74: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 5d78: e59f3138 ldr r3, [pc, #312] ; 5eb8 <== NOT EXECUTED 5d7c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5d80: e3530002 cmp r3, #2 <== NOT EXECUTED 5d84: ca000049 bgt 5eb0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 5d88: e59f3130 ldr r3, [pc, #304] ; 5ec0 <== NOT EXECUTED 5d8c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5d90: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 5d94: eb003544 bl 132ac <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5d98: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 5d9c: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5da0: 0a000001 beq 5dac <== NOT EXECUTED local_errno = errno; 5da4: eb00344d bl 12ee0 <__errno> <== NOT EXECUTED 5da8: e5905000 ldr r5, [r0] <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 5dac: e59fa10c ldr sl, [pc, #268] ; 5ec0 <== NOT EXECUTED 5db0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5db4: e1a02004 mov r2, r4 <== NOT EXECUTED 5db8: e1a01009 mov r1, r9 <== NOT EXECUTED 5dbc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5dc0: eb004d5a bl 19330 <== NOT EXECUTED if (status) 5dc4: e3580000 cmp r8, #0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 5dc8: e1a04000 mov r4, r0 <== NOT EXECUTED if (status) 5dcc: 0a000008 beq 5df4 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 5dd0: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5dd4: e1a00008 mov r0, r8 <== NOT EXECUTED 5dd8: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5ddc: ebffffd1 bl 5d28 <== NOT EXECUTED 5de0: e59f10dc ldr r1, [pc, #220] ; 5ec4 <== NOT EXECUTED 5de4: e1a02000 mov r2, r0 <== NOT EXECUTED 5de8: e1a00008 mov r0, r8 <== NOT EXECUTED 5dec: eb0035ec bl 135a4 <== NOT EXECUTED 5df0: e0844000 add r4, r4, r0 <== NOT EXECUTED if (local_errno) 5df4: e3550000 cmp r5, #0 <== NOT EXECUTED 5df8: 0a000015 beq 5e54 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 5dfc: da00000d ble 5e38 <== NOT EXECUTED 5e00: e1a00005 mov r0, r5 <== NOT EXECUTED 5e04: eb0038f9 bl 141f0 <== NOT EXECUTED 5e08: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 5e0c: e3530000 cmp r3, #0 <== NOT EXECUTED 5e10: 0a000008 beq 5e38 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 5e14: e59f30a4 ldr r3, [pc, #164] ; 5ec0 <== NOT EXECUTED 5e18: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e1c: e1a00005 mov r0, r5 <== NOT EXECUTED 5e20: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5e24: eb0038f1 bl 141f0 <== NOT EXECUTED 5e28: e59f1098 ldr r1, [pc, #152] ; 5ec8 <== NOT EXECUTED 5e2c: e1a02000 mov r2, r0 <== NOT EXECUTED 5e30: e1a00008 mov r0, r8 <== NOT EXECUTED 5e34: ea000004 b 5e4c <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 5e38: e59f3080 ldr r3, [pc, #128] ; 5ec0 <== NOT EXECUTED 5e3c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e40: e59f1084 ldr r1, [pc, #132] ; 5ecc <== NOT EXECUTED 5e44: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e48: e1a02005 mov r2, r5 <== NOT EXECUTED 5e4c: eb0035d4 bl 135a4 <== NOT EXECUTED 5e50: e0844000 add r4, r4, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 5e54: e59f8064 ldr r8, [pc, #100] ; 5ec0 <== NOT EXECUTED 5e58: e5983000 ldr r3, [r8] <== NOT EXECUTED 5e5c: e59f106c ldr r1, [pc, #108] ; 5ed0 <== NOT EXECUTED 5e60: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e64: eb0035ce bl 135a4 <== NOT EXECUTED (void) fflush(stderr); 5e68: e5983000 ldr r3, [r8] <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 5e6c: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 5e70: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e74: eb00350c bl 132ac <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5e78: e3160203 tst r6, #805306368 ; 0x30000000 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 5e7c: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5e80: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 5e84: e3570000 cmp r7, #0 <== NOT EXECUTED 5e88: 0a000004 beq 5ea0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 5e8c: e3a00000 mov r0, #0 <== NOT EXECUTED 5e90: e59f103c ldr r1, [pc, #60] ; 5ed4 <== NOT EXECUTED 5e94: eb00001b bl 5f08 <== NOT EXECUTED _exit(local_errno); 5e98: e1a00005 mov r0, r5 <== NOT EXECUTED 5e9c: eb0002cf bl 69e0 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 5ea0: e59f1030 ldr r1, [pc, #48] ; 5ed8 <== NOT EXECUTED 5ea4: e1a00007 mov r0, r7 <== NOT EXECUTED 5ea8: eb000016 bl 5f08 <== NOT EXECUTED abort(); 5eac: eb003402 bl 12ebc <== NOT EXECUTED 5eb0: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 5eb4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 5eb8: 00024a1c .word 0x00024a1c 5ebc: 00024bac .word 0x00024bac 5ec0: 00021ed8 .word 0x00021ed8 5ec4: 00023827 .word 0x00023827 5ec8: 00023835 .word 0x00023835 5ecc: 00023842 .word 0x00023842 5ed0: 00023814 .word 0x00023814 5ed4: 00023856 .word 0x00023856 5ed8: 0002386b .word 0x0002386b 00022254 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 22254: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 22258: e3a04000 mov r4, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2225c: e59fb0d4 ldr fp, [pc, #212] ; 22338 limit++; continue; } sign = 1; } if (!isdigit(c)) 22260: e59f90d4 ldr r9, [pc, #212] ; 2233c /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 22264: e58d1000 str r1, [sp] 22268: e1a05000 mov r5, r0 2226c: e3e08102 mvn r8, #-2147483648 ; 0x80000000 22270: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 22274: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 22278: e5953004 ldr r3, [r5, #4] 2227c: e2433001 sub r3, r3, #1 22280: e3530000 cmp r3, #0 22284: e5853004 str r3, [r5, #4] 22288: a5953000 ldrge r3, [r5] 2228c: a4d36001 ldrbge r6, [r3], #1 22290: a5853000 strge r3, [r5] 22294: aa000003 bge 222a8 22298: e59b0000 ldr r0, [fp] <== NOT EXECUTED 2229c: e1a01005 mov r1, r5 <== NOT EXECUTED 222a0: eb007086 bl 3e4c0 <__srget_r> <== NOT EXECUTED 222a4: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 222a8: e356003a cmp r6, #58 ; 0x3a 222ac: 0a000019 beq 22318 break; if (sign == 0) { 222b0: e3540000 cmp r4, #0 222b4: 1a000004 bne 222cc if (c == '-') { 222b8: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 222bc: 02888001 addeq r8, r8, #1 222c0: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 222c4: 0affffeb beq 22278 sign = -1; limit++; continue; 222c8: e3a04001 mov r4, #1 } sign = 1; } if (!isdigit(c)) 222cc: e5993000 ldr r3, [r9] 222d0: e0833006 add r3, r3, r6 222d4: e5d33001 ldrb r3, [r3, #1] 222d8: e3130004 tst r3, #4 222dc: 0a000013 beq 22330 return 0; d = c - '0'; if ((i > (limit / 10)) 222e0: e1a00008 mov r0, r8 222e4: e3a0100a mov r1, #10 222e8: eb00bb0a bl 50f18 <__aeabi_uidiv> 222ec: e1570000 cmp r7, r0 222f0: 8a00000e bhi 22330 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 222f4: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) 222f8: 1a000004 bne 22310 222fc: e1a00008 mov r0, r8 <== NOT EXECUTED 22300: e3a0100a mov r1, #10 <== NOT EXECUTED 22304: eb00bb97 bl 51168 <__umodsi3> <== NOT EXECUTED 22308: e1560000 cmp r6, r0 <== NOT EXECUTED 2230c: 8a000007 bhi 22330 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 22310: e027679a mla r7, sl, r7, r6 22314: eaffffd7 b 22278 } if (sign == 0) 22318: e3540000 cmp r4, #0 return 0; *val = i * sign; 2231c: 10030497 mulne r3, r7, r4 22320: 159d2000 ldrne r2, [sp] 22324: 13a00001 movne r0, #1 22328: 15823000 strne r3, [r2] return 1; 2232c: 1a000000 bne 22334 22330: e3a00000 mov r0, #0 <== NOT EXECUTED } 22334: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 22338: 00053cd0 .word 0x00053cd0 2233c: 00053cc4 .word 0x00053cc4 00022340 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 22340: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22344: e1a04002 mov r4, r2 int c; *name = *bufp; 22348: e5922000 ldr r2, [r2] /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2234c: e59d6018 ldr r6, [sp, #24] int c; *name = *bufp; 22350: e5812000 str r2, [r1] for (;;) { c = getc(fp); 22354: e59f70c0 ldr r7, [pc, #192] ; 2241c /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 22358: e1a05000 mov r5, r0 2235c: e1a08003 mov r8, r3 int c; *name = *bufp; for (;;) { c = getc(fp); 22360: e5953004 ldr r3, [r5, #4] 22364: e2433001 sub r3, r3, #1 22368: e3530000 cmp r3, #0 2236c: e5853004 str r3, [r5, #4] 22370: a5953000 ldrge r3, [r5] 22374: a4d30001 ldrbge r0, [r3], #1 22378: a5853000 strge r3, [r5] 2237c: b5970000 ldrlt r0, [r7] 22380: b1a01005 movlt r1, r5 22384: bb00704d bllt 3e4c0 <__srget_r> if (c == ':') { 22388: e350003a cmp r0, #58 ; 0x3a 2238c: 1a000002 bne 2239c if (nlFlag) 22390: e3560000 cmp r6, #0 22394: 0a000013 beq 223e8 22398: ea00001d b 22414 <== NOT EXECUTED return 0; break; } if (c == '\n') { 2239c: e350000a cmp r0, #10 223a0: 1a000002 bne 223b0 if (!nlFlag) 223a4: e3560000 cmp r6, #0 223a8: 1a00000e bne 223e8 223ac: ea000018 b 22414 <== NOT EXECUTED return 0; break; } if (c == EOF) 223b0: e3700001 cmn r0, #1 223b4: 0a000016 beq 22414 return 0; if (*nleft < 2) 223b8: e5983000 ldr r3, [r8] 223bc: e3530001 cmp r3, #1 223c0: 9a000013 bls 22414 return 0; **bufp = c; 223c4: e5943000 ldr r3, [r4] 223c8: e5c30000 strb r0, [r3] ++(*bufp); 223cc: e5942000 ldr r2, [r4] --(*nleft); 223d0: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 223d4: e2822001 add r2, r2, #1 --(*nleft); 223d8: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 223dc: e5842000 str r2, [r4] --(*nleft); 223e0: e5883000 str r3, [r8] } 223e4: eaffffdd b 22360 **bufp = '\0'; 223e8: e5943000 ldr r3, [r4] 223ec: e3a02000 mov r2, #0 223f0: e5c32000 strb r2, [r3] ++(*bufp); 223f4: e5942000 ldr r2, [r4] --(*nleft); 223f8: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 223fc: e2822001 add r2, r2, #1 --(*nleft); 22400: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 22404: e5842000 str r2, [r4] --(*nleft); 22408: e5883000 str r3, [r8] 2240c: e3a00001 mov r0, #1 return 1; 22410: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 22414: e3a00000 mov r0, #0 <== NOT EXECUTED } 22418: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2241c: 00053cd0 .word 0x00053cd0 00022420 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22420: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22424: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22428: e28d6008 add r6, sp, #8 2242c: e28d5004 add r5, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22430: e58d2008 str r2, [sp, #8] 22434: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22438: e3a08000 mov r8, #0 2243c: e1a02006 mov r2, r6 22440: e1a03005 mov r3, r5 22444: e58d8000 str r8, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22448: e1a07000 mov r7, r0 2244c: e1a04001 mov r4, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22450: ebffffba bl 22340 22454: e1500008 cmp r0, r8 22458: 0a00003b beq 2254c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 2245c: e1a00007 mov r0, r7 22460: e2841004 add r1, r4, #4 22464: e1a02006 mov r2, r6 22468: e1a03005 mov r3, r5 2246c: e58d8000 str r8, [sp] 22470: ebffffb2 bl 22340 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22474: e1500008 cmp r0, r8 22478: 0a000033 beq 2254c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 2247c: e1a00007 mov r0, r7 22480: e28d1010 add r1, sp, #16 22484: ebffff72 bl 22254 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22488: e1500008 cmp r0, r8 2248c: 0a00002e beq 2254c || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 22490: e1a03005 mov r3, r5 22494: e28d100c add r1, sp, #12 22498: e1a00007 mov r0, r7 2249c: e1a02006 mov r2, r6 224a0: e3a05001 mov r5, #1 224a4: e58d5000 str r5, [sp] 224a8: ebffffa4 bl 22340 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 224ac: e1500008 cmp r0, r8 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 224b0: 11dd31b0 ldrhne r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 224b4: 159d100c ldrne r1, [sp, #12] if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 224b8: 11c430b8 strhne r3, [r4, #8] { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 224bc: 1a000003 bne 224d0 224c0: ea000021 b 2254c <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') 224c4: e352002c cmp r2, #44 ; 0x2c memcount++; 224c8: 02855001 addeq r5, r5, #1 224cc: e2888001 add r8, r8, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 224d0: e7d12008 ldrb r2, [r1, r8] 224d4: e3520000 cmp r2, #0 224d8: 1afffff9 bne 224c4 } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 224dc: e1a05105 lsl r5, r5, #2 224e0: e59d3004 ldr r3, [sp, #4] 224e4: e2855013 add r5, r5, #19 224e8: e1530005 cmp r3, r5 224ec: 3a000016 bcc 2254c return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 224f0: e59d3008 ldr r3, [sp, #8] 224f4: e283300f add r3, r3, #15 224f8: e3c3300f bic r3, r3, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 224fc: e5831000 str r1, [r3] /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 22500: e584300c str r3, [r4, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22504: e59d300c ldr r3, [sp, #12] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 22508: e1a00002 mov r0, r2 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 2250c: e2833001 add r3, r3, #1 22510: e2822001 add r2, r2, #1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22514: ea000005 b 22530 if(*cp == ',') { 22518: e351002c cmp r1, #44 ; 0x2c *cp = '\0'; 2251c: 05430001 strbeq r0, [r3, #-1] grp->gr_mem[memcount++] = cp + 1; 22520: 0594100c ldreq r1, [r4, #12] 22524: 07813102 streq r3, [r1, r2, lsl #2] 22528: 02822001 addeq r2, r2, #1 2252c: e2833001 add r3, r3, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22530: e5531001 ldrb r1, [r3, #-1] 22534: e3510000 cmp r1, #0 22538: 1afffff6 bne 22518 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 2253c: e594300c ldr r3, [r4, #12] 22540: e3a00001 mov r0, #1 22544: e7831102 str r1, [r3, r2, lsl #2] return 1; 22548: ea000000 b 22550 2254c: e3a00000 mov r0, #0 <== NOT EXECUTED } 22550: e28dd014 add sp, sp, #20 22554: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00022594 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 22594: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22598: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2259c: e28d7008 add r7, sp, #8 225a0: e28d6004 add r6, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 225a4: e58d2008 str r2, [sp, #8] 225a8: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225ac: e3a08000 mov r8, #0 225b0: e1a02007 mov r2, r7 225b4: e1a03006 mov r3, r6 225b8: e58d8000 str r8, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 225bc: e1a05000 mov r5, r0 225c0: e1a04001 mov r4, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225c4: ebffff5d bl 22340 225c8: e1500008 cmp r0, r8 225cc: 0a000038 beq 226b4 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 225d0: e1a00005 mov r0, r5 225d4: e2841004 add r1, r4, #4 225d8: e1a02007 mov r2, r7 225dc: e1a03006 mov r3, r6 225e0: e58d8000 str r8, [sp] 225e4: ebffff55 bl 22340 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225e8: e1500008 cmp r0, r8 225ec: 0a000030 beq 226b4 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 225f0: e1a00005 mov r0, r5 225f4: e28d1010 add r1, sp, #16 225f8: ebffff15 bl 22254 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225fc: e1500008 cmp r0, r8 22600: 0a00002b beq 226b4 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 22604: e1a00005 mov r0, r5 22608: e28d100c add r1, sp, #12 2260c: ebffff10 bl 22254 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22610: e1500008 cmp r0, r8 22614: 0a000026 beq 226b4 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 22618: e1a00005 mov r0, r5 2261c: e284100c add r1, r4, #12 22620: e1a02007 mov r2, r7 22624: e1a03006 mov r3, r6 22628: e58d8000 str r8, [sp] 2262c: ebffff43 bl 22340 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22630: e1500008 cmp r0, r8 22634: 0a00001e beq 226b4 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 22638: e1a00005 mov r0, r5 2263c: e2841010 add r1, r4, #16 22640: e1a02007 mov r2, r7 22644: e1a03006 mov r3, r6 22648: e58d8000 str r8, [sp] 2264c: ebffff3b bl 22340 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22650: e1500008 cmp r0, r8 22654: 0a000016 beq 226b4 || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 22658: e1a00005 mov r0, r5 2265c: e2841014 add r1, r4, #20 22660: e1a02007 mov r2, r7 22664: e1a03006 mov r3, r6 22668: e58d8000 str r8, [sp] 2266c: ebffff33 bl 22340 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22670: e1500008 cmp r0, r8 22674: 0a00000e beq 226b4 || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 22678: e1a00005 mov r0, r5 2267c: e1a02007 mov r2, r7 22680: e1a03006 mov r3, r6 22684: e3a05001 mov r5, #1 22688: e2841018 add r1, r4, #24 2268c: e58d5000 str r5, [sp] 22690: ebffff2a bl 22340 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22694: e1500008 cmp r0, r8 22698: 0a000005 beq 226b4 || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 2269c: e1dd30bc ldrh r3, [sp, #12] 226a0: e1c430ba strh r3, [r4, #10] || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 226a4: e1dd31b0 ldrh r3, [sp, #16] pwd->pw_gid = pwgid; 226a8: e1a00005 mov r0, r5 || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 226ac: e1c430b8 strh r3, [r4, #8] pwd->pw_gid = pwgid; return 1; 226b0: ea000000 b 226b8 226b4: e3a00000 mov r0, #0 <== NOT EXECUTED } 226b8: e28dd014 add sp, sp, #20 226bc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 000221fc : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 221fc: e59f300c ldr r3, [pc, #12] ; 22210 <== NOT EXECUTED 22200: e5933000 ldr r3, [r3] <== NOT EXECUTED 22204: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED return 0; } 22208: e3a00000 mov r0, #0 <== NOT EXECUTED 2220c: e12fff1e bx lr <== NOT EXECUTED 22210: 000534b8 .word 0x000534b8 000227c4 : return NULL; return &grent; } void setgrent(void) { 227c4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 227c8: ebffffcb bl 226fc <== NOT EXECUTED if (group_fp != NULL) 227cc: e59f3020 ldr r3, [pc, #32] ; 227f4 <== NOT EXECUTED 227d0: e5930000 ldr r0, [r3] <== NOT EXECUTED 227d4: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 227d8: 1b005a86 blne 391f8 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 227dc: e59f0014 ldr r0, [pc, #20] ; 227f8 <== NOT EXECUTED 227e0: e59f1014 ldr r1, [pc, #20] ; 227fc <== NOT EXECUTED 227e4: eb005ca6 bl 39a84 <== NOT EXECUTED 227e8: e59f3004 ldr r3, [pc, #4] ; 227f4 <== NOT EXECUTED 227ec: e5830000 str r0, [r3] <== NOT EXECUTED } 227f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 227f4: 000609b8 .word 0x000609b8 227f8: 00057694 .word 0x00057694 227fc: 0005840c .word 0x0005840c 00022994 : return NULL; return &pwent; } void setpwent(void) { 22994: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 22998: ebffff57 bl 226fc <== NOT EXECUTED if (passwd_fp != NULL) 2299c: e59f3020 ldr r3, [pc, #32] ; 229c4 <== NOT EXECUTED 229a0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 229a4: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 229a8: 1b005a12 blne 391f8 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 229ac: e59f0014 ldr r0, [pc, #20] ; 229c8 <== NOT EXECUTED 229b0: e59f1014 ldr r1, [pc, #20] ; 229cc <== NOT EXECUTED 229b4: eb005c32 bl 39a84 <== NOT EXECUTED 229b8: e59f3004 ldr r3, [pc, #4] ; 229c4 <== NOT EXECUTED 229bc: e5830004 str r0, [r3, #4] <== NOT EXECUTED } 229c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 229c4: 000609b8 .word 0x000609b8 229c8: 000575e6 .word 0x000575e6 229cc: 0005840c .word 0x0005840c 00005320 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 5320: e59f300c ldr r3, [pc, #12] ; 5334 <== NOT EXECUTED 5324: e5933000 ldr r3, [r3] <== NOT EXECUTED 5328: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED return 0; } 532c: e3a00000 mov r0, #0 <== NOT EXECUTED 5330: e12fff1e bx lr <== NOT EXECUTED 5334: 000534b8 .word 0x000534b8 00002a38 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2a38: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 2a3c: e59f3050 ldr r3, [pc, #80] ; 2a94 <== NOT EXECUTED 2a40: e0023003 and r3, r2, r3 <== NOT EXECUTED 2a44: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2a48: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2a4c: e1a04001 mov r4, r1 <== NOT EXECUTED 2a50: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2a54: 0a00000b beq 2a88 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2a58: e3a01000 mov r1, #0 <== NOT EXECUTED 2a5c: e1a02001 mov r2, r1 <== NOT EXECUTED 2a60: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a64: eb0005fb bl 4258 <== NOT EXECUTED i = iproc (c, tty); 2a68: e1a01004 mov r1, r4 <== NOT EXECUTED 2a6c: e1a00005 mov r0, r5 <== NOT EXECUTED 2a70: ebffff8b bl 28a4 <== NOT EXECUTED 2a74: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2a78: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a7c: eb00063b bl 4370 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2a80: e1a00005 mov r0, r5 <== NOT EXECUTED 2a84: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 2a88: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 2a8c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); i = iproc (c, tty); rtems_semaphore_release (tty->osem); } else { i = iproc (c, tty); 2a90: eaffff83 b 28a4 <== NOT EXECUTED 2a94: 00000e78 .word 0x00000e78 00006800 : int _STAT_NAME( const char *path, struct stat *buf ) { 6800: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6804: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 6808: e24dd018 sub sp, sp, #24 680c: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6810: 1a000002 bne 6820 rtems_set_errno_and_return_minus_one( EFAULT ); 6814: eb00ca2a bl 390c4 <__errno> 6818: e3a0300e mov r3, #14 681c: ea000018 b 6884 status = rtems_filesystem_evaluate_path( path, strlen( path ), 6820: eb00e4b2 bl 3faf0 6824: e28d4004 add r4, sp, #4 6828: e1a01000 mov r1, r0 682c: e3a0c001 mov ip, #1 6830: e1a00006 mov r0, r6 6834: e3a02000 mov r2, #0 6838: e1a03004 mov r3, r4 683c: e58dc000 str ip, [sp] 6840: ebfffa3b bl 5134 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 6844: e2501000 subs r1, r0, #0 6848: 1a00000e bne 6888 return -1; if ( !loc.handlers->fstat_h ){ 684c: e59d300c ldr r3, [sp, #12] 6850: e5933018 ldr r3, [r3, #24] 6854: e3530000 cmp r3, #0 6858: 1a00000c bne 6890 rtems_filesystem_freenode( &loc ); 685c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6860: e3530000 cmp r3, #0 <== NOT EXECUTED 6864: 0a000004 beq 687c <== NOT EXECUTED 6868: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 686c: e3530000 cmp r3, #0 <== NOT EXECUTED 6870: 11a00004 movne r0, r4 <== NOT EXECUTED 6874: 11a0e00f movne lr, pc <== NOT EXECUTED 6878: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 687c: eb00ca10 bl 390c4 <__errno> <== NOT EXECUTED 6880: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6884: e5803000 str r3, [r0] 6888: e3e05000 mvn r5, #0 688c: ea000010 b 68d4 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 6890: e3a02048 mov r2, #72 ; 0x48 6894: e1a00005 mov r0, r5 6898: eb00d6c1 bl 3c3a4 status = (*loc.handlers->fstat_h)( &loc, buf ); 689c: e1a01005 mov r1, r5 68a0: e59d300c ldr r3, [sp, #12] 68a4: e1a00004 mov r0, r4 68a8: e1a0e00f mov lr, pc 68ac: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 68b0: e59d3010 ldr r3, [sp, #16] 68b4: e3530000 cmp r3, #0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 68b8: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 68bc: 0a000004 beq 68d4 68c0: e593301c ldr r3, [r3, #28] 68c4: e3530000 cmp r3, #0 68c8: 11a00004 movne r0, r4 68cc: 11a0e00f movne lr, pc 68d0: 112fff13 bxne r3 return status; } 68d4: e1a00005 mov r0, r5 68d8: e28dd018 add sp, sp, #24 68dc: e8bd8070 pop {r4, r5, r6, pc} 00023608 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 23608: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 2360c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 23610: e1a05001 mov r5, r1 <== NOT EXECUTED 23614: e1a06000 mov r6, r0 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 23618: eb007134 bl 3faf0 <== NOT EXECUTED 2361c: e28d4004 add r4, sp, #4 <== NOT EXECUTED 23620: e1a01000 mov r1, r0 <== NOT EXECUTED 23624: e3a0c001 mov ip, #1 <== NOT EXECUTED 23628: e1a00006 mov r0, r6 <== NOT EXECUTED 2362c: e3a02000 mov r2, #0 <== NOT EXECUTED 23630: e1a03004 mov r3, r4 <== NOT EXECUTED 23634: e58dc000 str ip, [sp] <== NOT EXECUTED 23638: ebff86bd bl 5134 <== NOT EXECUTED 2363c: e2501000 subs r1, r0, #0 <== NOT EXECUTED 23640: 1a000007 bne 23664 <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 23644: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 23648: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 2364c: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED 23650: e3530000 cmp r3, #0 <== NOT EXECUTED 23654: 1a000004 bne 2366c <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 23658: eb005699 bl 390c4 <__errno> <== NOT EXECUTED 2365c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23660: e5803000 str r3, [r0] <== NOT EXECUTED 23664: e3e05000 mvn r5, #0 <== NOT EXECUTED 23668: ea000010 b 236b0 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 2366c: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 23670: e1a00005 mov r0, r5 <== NOT EXECUTED 23674: eb00634a bl 3c3a4 <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 23678: e1a01005 mov r1, r5 <== NOT EXECUTED 2367c: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 23680: e286001c add r0, r6, #28 <== NOT EXECUTED 23684: e1a0e00f mov lr, pc <== NOT EXECUTED 23688: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2368c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23690: e3530000 cmp r3, #0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 23694: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23698: 0a000004 beq 236b0 <== NOT EXECUTED 2369c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 236a0: e3530000 cmp r3, #0 <== NOT EXECUTED 236a4: 11a00004 movne r0, r4 <== NOT EXECUTED 236a8: 11a0e00f movne lr, pc <== NOT EXECUTED 236ac: 112fff13 bxne r3 <== NOT EXECUTED return result; } 236b0: e1a00005 mov r0, r5 <== NOT EXECUTED 236b4: e28dd018 add sp, sp, #24 <== NOT EXECUTED 236b8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 000236bc : int symlink( const char *actualpath, const char *sympath ) { 236bc: e92d4070 push {r4, r5, r6, lr} rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 236c0: e5d13000 ldrb r3, [r1] 236c4: e353002f cmp r3, #47 ; 0x2f 236c8: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 236cc: e24dd018 sub sp, sp, #24 236d0: e1a05001 mov r5, r1 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 236d4: 13a06000 movne r6, #0 236d8: 03a06001 moveq r6, #1 int symlink( const char *actualpath, const char *sympath ) { 236dc: e1a04000 mov r4, r0 rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 236e0: 0a000001 beq 236ec 236e4: e3530000 cmp r3, #0 236e8: 1a000009 bne 23714 236ec: e59f30f0 ldr r3, [pc, #240] ; 237e4 236f0: e593e000 ldr lr, [r3] 236f4: e28ee018 add lr, lr, #24 236f8: e8be000f ldm lr!, {r0, r1, r2, r3} 236fc: e1a0c00d mov ip, sp 23700: e8ac000f stmia ip!, {r0, r1, r2, r3} 23704: e59e3000 ldr r3, [lr] 23708: e3a00001 mov r0, #1 2370c: e58c3000 str r3, [ip] 23710: ea000008 b 23738 23714: e59f30c8 ldr r3, [pc, #200] ; 237e4 23718: e593e000 ldr lr, [r3] 2371c: e28ee004 add lr, lr, #4 23720: e8be000f ldm lr!, {r0, r1, r2, r3} 23724: e1a0c00d mov ip, sp 23728: e8ac000f stmia ip!, {r0, r1, r2, r3} 2372c: e59e3000 ldr r3, [lr] 23730: e58c3000 str r3, [ip] 23734: e1a00006 mov r0, r6 if ( !loc.ops->evalformake_h ) { 23738: e59d300c ldr r3, [sp, #12] 2373c: e5933004 ldr r3, [r3, #4] 23740: e3530000 cmp r3, #0 23744: 0a000010 beq 2378c rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 23748: e0850000 add r0, r5, r0 2374c: e1a0100d mov r1, sp 23750: e28d2014 add r2, sp, #20 23754: e1a0e00f mov lr, pc 23758: e12fff13 bx r3 if ( result != 0 ) 2375c: e3500000 cmp r0, #0 if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 23760: e1a0600d mov r6, sp if ( result != 0 ) 23764: 1a00000b bne 23798 return -1; if ( !loc.ops->symlink_h ) { 23768: e59d200c ldr r2, [sp, #12] 2376c: e5923038 ldr r3, [r2, #56] ; 0x38 23770: e3530000 cmp r3, #0 23774: 1a000009 bne 237a0 rtems_filesystem_freenode( &loc ); 23778: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 2377c: e3530000 cmp r3, #0 <== NOT EXECUTED 23780: 11a0000d movne r0, sp <== NOT EXECUTED 23784: 11a0e00f movne lr, pc <== NOT EXECUTED 23788: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2378c: eb00564c bl 390c4 <__errno> <== NOT EXECUTED 23790: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23794: e5803000 str r3, [r0] <== NOT EXECUTED 23798: e3e04000 mvn r4, #0 2379c: ea00000d b 237d8 } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 237a0: e1a01004 mov r1, r4 237a4: e1a0000d mov r0, sp 237a8: e59d2014 ldr r2, [sp, #20] 237ac: e1a0e00f mov lr, pc 237b0: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 237b4: e59d300c ldr r3, [sp, #12] 237b8: e3530000 cmp r3, #0 if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 237bc: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 237c0: 0a000004 beq 237d8 237c4: e593301c ldr r3, [r3, #28] 237c8: e3530000 cmp r3, #0 237cc: 11a0000d movne r0, sp 237d0: 11a0e00f movne lr, pc 237d4: 112fff13 bxne r3 return result; } 237d8: e1a00004 mov r0, r4 237dc: e28dd018 add sp, sp, #24 237e0: e8bd8070 pop {r4, r5, r6, pc} 237e4: 000534b8 .word 0x000534b8 0000f5fc : int fd, int opt, struct termios *tp ) { switch (opt) { f5fc: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { f600: e92d4030 push {r4, r5, lr} f604: e1a04002 mov r4, r2 f608: e1a05000 mov r5, r0 switch (opt) { f60c: 0a00000a beq f63c f610: e3510001 cmp r1, #1 <== NOT EXECUTED f614: 0a000003 beq f628 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); f618: eb0013df bl 1459c <__errno> <== NOT EXECUTED f61c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f620: e5803000 str r3, [r0] <== NOT EXECUTED f624: ea000009 b f650 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) f628: e3a01003 mov r1, #3 <== NOT EXECUTED f62c: e3a02000 mov r2, #0 <== NOT EXECUTED f630: eb000e14 bl 12e88 <== NOT EXECUTED f634: e3500000 cmp r0, #0 <== NOT EXECUTED f638: ba000004 blt f650 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f63c: e1a00005 mov r0, r5 f640: e1a02004 mov r2, r4 f644: e3a01002 mov r1, #2 } } f648: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f64c: ea000e0d b 12e88 } } f650: e3e00000 mvn r0, #0 <== NOT EXECUTED f654: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000c104 : #include int unlink( const char *path ) { c104: e92d4070 push {r4, r5, r6, lr} c108: e24dd02c sub sp, sp, #44 ; 0x2c c10c: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); c110: ebffd414 bl 1168 if ( parentpathlen == 0 ) c114: e2505000 subs r5, r0, #0 c118: 1a000019 bne c184 rtems_filesystem_get_start_loc( path, &i, &parentloc ); c11c: e5d63000 ldrb r3, [r6] c120: e353002f cmp r3, #47 ; 0x2f c124: 1353005c cmpne r3, #92 ; 0x5c c128: 0a000001 beq c134 c12c: e3530000 cmp r3, #0 <== NOT EXECUTED c130: 1a000009 bne c15c <== NOT EXECUTED c134: e59f3248 ldr r3, [pc, #584] ; c384 c138: e593e000 ldr lr, [r3] c13c: e28ee018 add lr, lr, #24 c140: e8be000f ldm lr!, {r0, r1, r2, r3} c144: e28dc018 add ip, sp, #24 c148: e8ac000f stmia ip!, {r0, r1, r2, r3} c14c: e59e3000 ldr r3, [lr] c150: e3a04000 mov r4, #0 c154: e58c3000 str r3, [ip] c158: ea000013 b c1ac c15c: e59f3220 ldr r3, [pc, #544] ; c384 <== NOT EXECUTED c160: e593e000 ldr lr, [r3] <== NOT EXECUTED c164: e28ee004 add lr, lr, #4 <== NOT EXECUTED c168: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED c16c: e28dc018 add ip, sp, #24 <== NOT EXECUTED c170: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED c174: e59e3000 ldr r3, [lr] <== NOT EXECUTED c178: e1a04005 mov r4, r5 <== NOT EXECUTED c17c: e58c3000 str r3, [ip] <== NOT EXECUTED c180: ea000009 b c1ac <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( path, parentpathlen, c184: e3a0c000 mov ip, #0 c188: e1a00006 mov r0, r6 c18c: e1a01005 mov r1, r5 c190: e3a02002 mov r2, #2 c194: e28d3018 add r3, sp, #24 c198: e58dc000 str ip, [sp] c19c: ebffd439 bl 1288 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) c1a0: e3500000 cmp r0, #0 c1a4: 1a000072 bne c374 c1a8: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c1ac: e28de018 add lr, sp, #24 c1b0: e8be000f ldm lr!, {r0, r1, r2, r3} c1b4: e28dc004 add ip, sp, #4 c1b8: e8ac000f stmia ip!, {r0, r1, r2, r3} c1bc: e59e3000 ldr r3, [lr] name = path + parentpathlen; c1c0: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c1c4: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); c1c8: e1a00005 mov r0, r5 c1cc: eb0005d2 bl d91c c1d0: e1a01000 mov r1, r0 c1d4: e1a00005 mov r0, r5 c1d8: ebffd3d6 bl 1138 c1dc: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), c1e0: e1a00006 mov r0, r6 c1e4: eb0005cc bl d91c c1e8: e28d5004 add r5, sp, #4 c1ec: e3a0c000 mov ip, #0 c1f0: e1a01000 mov r1, r0 c1f4: e1a0200c mov r2, ip c1f8: e1a00006 mov r0, r6 c1fc: e1a03005 mov r3, r5 c200: e58dc000 str ip, [sp] c204: ebffd3e7 bl 11a8 0, &loc, false ); if ( result != 0 ) { c208: e3500000 cmp r0, #0 c20c: 0a00000b beq c240 if ( free_parentloc ) c210: e3540000 cmp r4, #0 c214: 0a000056 beq c374 rtems_filesystem_freenode( &parentloc ); c218: e59d3024 ldr r3, [sp, #36] ; 0x24 c21c: e3530000 cmp r3, #0 c220: 0a000053 beq c374 c224: e593301c ldr r3, [r3, #28] c228: e3530000 cmp r3, #0 c22c: 0a000050 beq c374 c230: e28d0018 add r0, sp, #24 c234: e1a0e00f mov lr, pc c238: e12fff13 bx r3 c23c: ea00004c b c374 return -1; } if ( !loc.ops->node_type_h ) { c240: e59d2010 ldr r2, [sp, #16] c244: e5923010 ldr r3, [r2, #16] c248: e3530000 cmp r3, #0 c24c: 0a00001c beq c2c4 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { c250: e1a00005 mov r0, r5 c254: e1a0e00f mov lr, pc c258: e12fff13 bx r3 c25c: e3500001 cmp r0, #1 c260: e59d2010 ldr r2, [sp, #16] c264: 1a000013 bne c2b8 rtems_filesystem_freenode( &loc ); c268: e3520000 cmp r2, #0 c26c: 0a000004 beq c284 c270: e592301c ldr r3, [r2, #28] c274: e3530000 cmp r3, #0 c278: 11a00005 movne r0, r5 c27c: 11a0e00f movne lr, pc c280: 112fff13 bxne r3 if ( free_parentloc ) c284: e3540000 cmp r4, #0 c288: 0a000007 beq c2ac rtems_filesystem_freenode( &parentloc ); c28c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c290: e3530000 cmp r3, #0 <== NOT EXECUTED c294: 0a000004 beq c2ac <== NOT EXECUTED c298: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c29c: e3530000 cmp r3, #0 <== NOT EXECUTED c2a0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c2a4: 11a0e00f movne lr, pc <== NOT EXECUTED c2a8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); c2ac: eb0001a9 bl c958 <__errno> c2b0: e3a03015 mov r3, #21 c2b4: ea000013 b c308 } if ( !loc.ops->unlink_h ) { c2b8: e592300c ldr r3, [r2, #12] c2bc: e3530000 cmp r3, #0 c2c0: 1a000012 bne c310 rtems_filesystem_freenode( &loc ); c2c4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED c2c8: e3530000 cmp r3, #0 <== NOT EXECUTED c2cc: 11a00005 movne r0, r5 <== NOT EXECUTED c2d0: 11a0e00f movne lr, pc <== NOT EXECUTED c2d4: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) c2d8: e3540000 cmp r4, #0 <== NOT EXECUTED c2dc: 0a000007 beq c300 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); c2e0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c2e4: e3530000 cmp r3, #0 <== NOT EXECUTED c2e8: 0a000004 beq c300 <== NOT EXECUTED c2ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c2f0: e3530000 cmp r3, #0 <== NOT EXECUTED c2f4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c2f8: 11a0e00f movne lr, pc <== NOT EXECUTED c2fc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); c300: eb000194 bl c958 <__errno> <== NOT EXECUTED c304: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED c308: e5803000 str r3, [r0] c30c: ea000018 b c374 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c310: e28d0018 add r0, sp, #24 c314: e1a01005 mov r1, r5 c318: e1a0e00f mov lr, pc c31c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); c320: e59d3010 ldr r3, [sp, #16] c324: e3530000 cmp r3, #0 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c328: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); c32c: 0a000004 beq c344 c330: e593301c ldr r3, [r3, #28] c334: e3530000 cmp r3, #0 c338: 11a00005 movne r0, r5 c33c: 11a0e00f movne lr, pc c340: 112fff13 bxne r3 if ( free_parentloc ) c344: e3540000 cmp r4, #0 c348: 0a00000a beq c378 rtems_filesystem_freenode( &parentloc ); c34c: e59d3024 ldr r3, [sp, #36] ; 0x24 c350: e3530000 cmp r3, #0 c354: 0a000007 beq c378 c358: e593301c ldr r3, [r3, #28] c35c: e3530000 cmp r3, #0 c360: 0a000004 beq c378 c364: e28d0018 add r0, sp, #24 c368: e1a0e00f mov lr, pc c36c: e12fff13 bx r3 c370: ea000000 b c378 c374: e3e06000 mvn r6, #0 return result; } c378: e1a00006 mov r0, r6 c37c: e28dd02c add sp, sp, #44 ; 0x2c c380: e8bd8070 pop {r4, r5, r6, pc} c384: 00018538 .word 0x00018538 000086b8 : */ int unmount( const char *path ) { 86b8: e92d4030 push {r4, r5, lr} 86bc: e24dd018 sub sp, sp, #24 86c0: e1a05000 mov r5, r0 * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 86c4: eb00dd09 bl 3faf0 86c8: e28d4004 add r4, sp, #4 86cc: e1a01000 mov r1, r0 86d0: e3a0c001 mov ip, #1 86d4: e1a00005 mov r0, r5 86d8: e3a02000 mov r2, #0 86dc: e1a03004 mov r3, r4 86e0: e58dc000 str ip, [sp] 86e4: ebfff292 bl 5134 86e8: e3500000 cmp r0, #0 86ec: 1a000057 bne 8850 return -1; mt_entry = loc.mt_entry; 86f0: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 86f4: e59d3004 ldr r3, [sp, #4] 86f8: e595201c ldr r2, [r5, #28] 86fc: e1520003 cmp r2, r3 8700: e59d3010 ldr r3, [sp, #16] 8704: 0a000009 beq 8730 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 8708: e3530000 cmp r3, #0 870c: 0a000004 beq 8724 8710: e593301c ldr r3, [r3, #28] 8714: e3530000 cmp r3, #0 8718: 11a00004 movne r0, r4 871c: 11a0e00f movne lr, pc 8720: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 8724: eb00c266 bl 390c4 <__errno> 8728: e3a0300d mov r3, #13 872c: ea000023 b 87c0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 8730: e3530000 cmp r3, #0 8734: 0a000004 beq 874c 8738: e593301c ldr r3, [r3, #28] 873c: e3530000 cmp r3, #0 8740: 11a00004 movne r0, r4 8744: 11a0e00f movne lr, pc 8748: 112fff13 bxne r3 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 874c: e5953014 ldr r3, [r5, #20] 8750: e5933028 ldr r3, [r3, #40] ; 0x28 8754: e3530000 cmp r3, #0 8758: 0a000003 beq 876c fs_root_loc = &mt_entry->mt_fs_root; 875c: e5953028 ldr r3, [r5, #40] ; 0x28 8760: e593302c ldr r3, [r3, #44] ; 0x2c 8764: e3530000 cmp r3, #0 8768: 1a000002 bne 8778 if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 876c: eb00c254 bl 390c4 <__errno> <== NOT EXECUTED 8770: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8774: ea000011 b 87c0 <== NOT EXECUTED * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 8778: e59f30f0 ldr r3, [pc, #240] ; 8870 877c: e5933000 ldr r3, [r3] 8780: e5933014 ldr r3, [r3, #20] 8784: e1530005 cmp r3, r5 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8788: 159f20e4 ldrne r2, [pc, #228] ; 8874 878c: 14923004 ldrne r3, [r2], #4 * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 8790: 1a000005 bne 87ac 8794: ea000007 b 87b8 if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 8798: e5930018 ldr r0, [r3, #24] 879c: e595102c ldr r1, [r5, #44] ; 0x2c 87a0: e1500001 cmp r0, r1 87a4: 0a000003 beq 87b8 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 87a8: e5933000 ldr r3, [r3] 87ac: e1530002 cmp r3, r2 87b0: 1afffff8 bne 8798 87b4: ea000028 b 885c * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 87b8: eb00c241 bl 390c4 <__errno> 87bc: e3a03010 mov r3, #16 87c0: e5803000 str r3, [r0] 87c4: ea000021 b 8850 * Allow the file system being unmounted on to do its cleanup. * If it fails it will set the errno to the approprate value * and the fileystem will not be modified. */ if (( fs_mount_loc->ops->unmount_h )( mt_entry ) != 0 ) 87c8: e5953014 ldr r3, [r5, #20] 87cc: e1a00005 mov r0, r5 87d0: e1a0e00f mov lr, pc 87d4: e593f028 ldr pc, [r3, #40] ; 0x28 87d8: e2504000 subs r4, r0, #0 87dc: 1a00001b bne 8850 * NOTE: Fatal error is called in a case which should never happen * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ 87e0: e5953028 ldr r3, [r5, #40] ; 0x28 87e4: e1a00005 mov r0, r5 87e8: e1a0e00f mov lr, pc 87ec: e593f02c ldr pc, [r3, #44] ; 0x2c 87f0: e3500000 cmp r0, #0 87f4: 0a000007 beq 8818 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 87f8: e1a00005 mov r0, r5 <== NOT EXECUTED 87fc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8800: e1a0e00f mov lr, pc <== NOT EXECUTED 8804: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 8808: e3500000 cmp r0, #0 <== NOT EXECUTED 880c: 0a00000f beq 8850 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8810: e1a00004 mov r0, r4 <== NOT EXECUTED 8814: eb00047b bl 9a08 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8818: e1a00005 mov r0, r5 881c: eb00053e bl 9d1c <_Chain_Extract> /* * Free the memory node that was allocated in mount * Free the memory associated with the extracted mount table entry. */ rtems_filesystem_freenode( fs_mount_loc ); 8820: e5953014 ldr r3, [r5, #20] 8824: e3530000 cmp r3, #0 8828: 0a000004 beq 8840 882c: e593301c ldr r3, [r3, #28] 8830: e3530000 cmp r3, #0 8834: 12850008 addne r0, r5, #8 8838: 11a0e00f movne lr, pc 883c: 112fff13 bxne r3 free( mt_entry ); 8840: e1a00005 mov r0, r5 8844: ebfff26d bl 5200 8848: e3a00000 mov r0, #0 return 0; 884c: ea000000 b 8854 8850: e3e00000 mvn r0, #0 } 8854: e28dd018 add sp, sp, #24 8858: e8bd8030 pop {r4, r5, pc} * Run the file descriptor table to determine if there are any file * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) 885c: e1a00005 mov r0, r5 8860: ebfff314 bl 54b8 8864: e3500001 cmp r0, #1 8868: 1affffd6 bne 87c8 886c: eaffffd1 b 87b8 8870: 000534b8 .word 0x000534b8 8874: 00060ce8 .word 0x00060ce8 00023878 : int utime( const char *path, const struct utimbuf *times ) { 23878: e92d4070 push {r4, r5, r6, lr} 2387c: e24dd018 sub sp, sp, #24 23880: e1a05001 mov r5, r1 23884: e1a06000 mov r6, r0 rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 23888: eb007098 bl 3faf0 2388c: e28d4004 add r4, sp, #4 23890: e1a01000 mov r1, r0 23894: e3a0c001 mov ip, #1 23898: e1a00006 mov r0, r6 2389c: e3a02000 mov r2, #0 238a0: e1a03004 mov r3, r4 238a4: e58dc000 str ip, [sp] 238a8: ebff8621 bl 5134 238ac: e3500000 cmp r0, #0 238b0: 1a00000b bne 238e4 return -1; if ( !temp_loc.ops->utime_h ){ 238b4: e59d2010 ldr r2, [sp, #16] 238b8: e5923030 ldr r3, [r2, #48] ; 0x30 238bc: e3530000 cmp r3, #0 238c0: 1a000009 bne 238ec rtems_filesystem_freenode( &temp_loc ); 238c4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 238c8: e3530000 cmp r3, #0 <== NOT EXECUTED 238cc: 11a00004 movne r0, r4 <== NOT EXECUTED 238d0: 11a0e00f movne lr, pc <== NOT EXECUTED 238d4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 238d8: eb0055f9 bl 390c4 <__errno> <== NOT EXECUTED 238dc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 238e0: e5803000 str r3, [r0] <== NOT EXECUTED 238e4: e3e05000 mvn r5, #0 238e8: ea00000c b 23920 } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 238ec: e8950006 ldm r5, {r1, r2} 238f0: e1a00004 mov r0, r4 238f4: e1a0e00f mov lr, pc 238f8: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 238fc: e59d3010 ldr r3, [sp, #16] 23900: e3530000 cmp r3, #0 if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 23904: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 23908: 0a000004 beq 23920 2390c: e593301c ldr r3, [r3, #28] 23910: e3530000 cmp r3, #0 23914: 11a00004 movne r0, r4 23918: 11a0e00f movne lr, pc 2391c: 112fff13 bxne r3 return result; } 23920: e1a00005 mov r0, r5 23924: e28dd018 add sp, sp, #24 23928: e8bd8070 pop {r4, r5, r6, pc} 00017d20 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17d20: e59f30b0 ldr r3, [pc, #176] ; 17dd8 17d24: e5933000 ldr r3, [r3] 17d28: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 17d2c: e92d4070 push {r4, r5, r6, lr} 17d30: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17d34: 2a000005 bcs 17d50 iop = rtems_libio_iop( fd ); 17d38: e59f309c ldr r3, [pc, #156] ; 17ddc 17d3c: e5934000 ldr r4, [r3] 17d40: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 17d44: e5943014 ldr r3, [r4, #20] 17d48: e3130c01 tst r3, #256 ; 0x100 17d4c: 1a000002 bne 17d5c 17d50: ebffd300 bl c958 <__errno> <== NOT EXECUTED 17d54: e3a03009 mov r3, #9 <== NOT EXECUTED 17d58: ea00000f b 17d9c <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 17d5c: e3510000 cmp r1, #0 17d60: 0a000004 beq 17d78 rtems_libio_check_count( count ); 17d64: e3520000 cmp r2, #0 17d68: 01a00002 moveq r0, r2 17d6c: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 17d70: e3130004 tst r3, #4 17d74: 1a000002 bne 17d84 17d78: ebffd2f6 bl c958 <__errno> <== NOT EXECUTED 17d7c: e3a03016 mov r3, #22 <== NOT EXECUTED 17d80: ea000005 b 17d9c <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 17d84: e594303c ldr r3, [r4, #60] ; 0x3c 17d88: e593300c ldr r3, [r3, #12] 17d8c: e3530000 cmp r3, #0 17d90: 1a000004 bne 17da8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17d94: ebffd2ef bl c958 <__errno> <== NOT EXECUTED 17d98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17d9c: e5803000 str r3, [r0] <== NOT EXECUTED 17da0: e3e00000 mvn r0, #0 <== NOT EXECUTED 17da4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 17da8: e1a00004 mov r0, r4 17dac: e1a0e00f mov lr, pc 17db0: e12fff13 bx r3 if ( rc > 0 ) 17db4: e3500000 cmp r0, #0 17db8: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 17dbc: e284600c add r6, r4, #12 17dc0: e8960060 ldm r6, {r5, r6} 17dc4: e0952000 adds r2, r5, r0 17dc8: e0a63fc0 adc r3, r6, r0, asr #31 17dcc: e584200c str r2, [r4, #12] 17dd0: e5843010 str r3, [r4, #16] return rc; } 17dd4: e8bd8070 pop {r4, r5, r6, pc} 17dd8: 000183a0 .word 0x000183a0 17ddc: 00019b84 .word 0x00019b84 00005484 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5484: e59f3164 ldr r3, [pc, #356] ; 55f0 5488: e5933000 ldr r3, [r3] 548c: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 5490: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5494: e1a08002 mov r8, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5498: 2a000005 bcs 54b4 iop = rtems_libio_iop( fd ); 549c: e59f3150 ldr r3, [pc, #336] ; 55f4 54a0: e5936000 ldr r6, [r3] 54a4: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 54a8: e5963014 ldr r3, [r6, #20] 54ac: e3130c01 tst r3, #256 ; 0x100 54b0: 1a000002 bne 54c0 54b4: eb002651 bl ee00 <__errno> 54b8: e3a03009 mov r3, #9 54bc: ea000025 b 5558 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 54c0: e3130004 tst r3, #4 54c4: 0a000021 beq 5550 /* * Argument validation on IO vector */ if ( !iov ) 54c8: e3510000 cmp r1, #0 54cc: 0a00001f beq 5550 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 54d0: e3520000 cmp r2, #0 54d4: da00001d ble 5550 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 54d8: e3520b01 cmp r2, #1024 ; 0x400 54dc: ca00001b bgt 5550 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 54e0: e596303c ldr r3, [r6, #60] ; 0x3c 54e4: e593300c ldr r3, [r3, #12] 54e8: e3530000 cmp r3, #0 54ec: 1a000002 bne 54fc rtems_set_errno_and_return_minus_one( ENOTSUP ); 54f0: eb002642 bl ee00 <__errno> <== NOT EXECUTED 54f4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 54f8: ea000016 b 5558 <== NOT EXECUTED 54fc: e3a03000 mov r3, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5500: e59fc0f0 ldr ip, [pc, #240] ; 55f8 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 5504: e1a05001 mov r5, r1 5508: e1a02001 mov r2, r1 550c: e3a07001 mov r7, #1 5510: e1a04003 mov r4, r3 * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base ) 5514: e5921000 ldr r1, [r2] 5518: e3510000 cmp r1, #0 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 551c: e2833001 add r3, r3, #1 if ( !iov[v].iov_base ) 5520: 0a00000a beq 5550 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 5524: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 5528: e0841000 add r1, r4, r0 if ( total < old || total > SSIZE_MAX ) 552c: e1510004 cmp r1, r4 5530: a3a04000 movge r4, #0 5534: b3a04001 movlt r4, #1 5538: e151000c cmp r1, ip 553c: c3844001 orrgt r4, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 5540: e3500000 cmp r0, #0 5544: 13a07000 movne r7, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5548: e3540000 cmp r4, #0 554c: 0a000003 beq 5560 rtems_set_errno_and_return_minus_one( EINVAL ); 5550: eb00262a bl ee00 <__errno> 5554: e3a03016 mov r3, #22 5558: e5803000 str r3, [r0] 555c: ea000011 b 55a8 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 5560: e1530008 cmp r3, r8 5564: e2822008 add r2, r2, #8 5568: b1a04001 movlt r4, r1 556c: baffffe8 blt 5514 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 5570: e3570000 cmp r7, #0 <== NOT EXECUTED 5574: 1a00001b bne 55e8 <== NOT EXECUTED 5578: e1a04007 mov r4, r7 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 557c: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 5580: e3520000 cmp r2, #0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5584: e2877001 add r7, r7, #1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5588: 0a000013 beq 55dc <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 558c: e5951000 ldr r1, [r5] <== NOT EXECUTED 5590: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED 5594: e1a00006 mov r0, r6 <== NOT EXECUTED 5598: e1a0e00f mov lr, pc <== NOT EXECUTED 559c: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( bytes < 0 ) 55a0: e3500000 cmp r0, #0 <== NOT EXECUTED 55a4: aa000001 bge 55b0 <== NOT EXECUTED 55a8: e3e04000 mvn r4, #0 55ac: ea00000d b 55e8 return -1; if ( bytes > 0 ) { 55b0: 0a000006 beq 55d0 <== NOT EXECUTED iop->offset += bytes; 55b4: e286c00c add ip, r6, #12 <== NOT EXECUTED 55b8: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 55bc: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 55c0: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 55c4: e586200c str r2, [r6, #12] <== NOT EXECUTED 55c8: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 55cc: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 55d0: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 55d4: e1500003 cmp r0, r3 <== NOT EXECUTED 55d8: 1a000002 bne 55e8 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 55dc: e1570008 cmp r7, r8 <== NOT EXECUTED 55e0: e2855008 add r5, r5, #8 <== NOT EXECUTED 55e4: baffffe4 blt 557c <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 55e8: e1a00004 mov r0, r4 55ec: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 55f0: 0001c0b0 .word 0x0001c0b0 55f4: 0001ecd8 .word 0x0001ecd8 55f8: 00007fff .word 0x00007fff