=============================================================================== a000e690 : const char *name, size_t namelen, mode_t mode, const IMFS_types_union *info ) { a000e690: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { a000e694: e3530020 cmp r3, #32 const char *name, size_t namelen, mode_t mode, const IMFS_types_union *info ) { a000e698: e24dd008 sub sp, sp, #8 a000e69c: e1a05003 mov r5, r3 a000e6a0: e1a06000 mov r6, r0 a000e6a4: e1a07001 mov r7, r1 a000e6a8: e1a08002 mov r8, r2 IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { a000e6ac: 8a000027 bhi a000e750 errno = ENAMETOOLONG; return NULL; } gettimeofday( &tv, 0 ); a000e6b0: e3a01000 mov r1, #0 a000e6b4: e1a0000d mov r0, sp a000e6b8: ebffe014 bl a0006710 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); a000e6bc: e3a00001 mov r0, #1 a000e6c0: e3a01064 mov r1, #100 ; 0x64 a000e6c4: ebffdf3e bl a00063c4 if ( !node ) { a000e6c8: e2504000 subs r4, r0, #0 a000e6cc: 0a000024 beq a000e764 } /* * Fill in the basic information */ node->reference_count = 1; a000e6d0: e3a03001 mov r3, #1 node->st_nlink = 1; memcpy( node->name, name, namelen ); a000e6d4: e1a02005 mov r2, r5 a000e6d8: e1a01008 mov r1, r8 } /* * Fill in the basic information */ node->reference_count = 1; a000e6dc: e1c433b4 strh r3, [r4, #52] ; 0x34 node->st_nlink = 1; a000e6e0: e1c433b6 strh r3, [r4, #54] ; 0x36 memcpy( node->name, name, namelen ); a000e6e4: e284000c add r0, r4, #12 a000e6e8: eb0012a3 bl a001317c node->name [namelen] = '\0'; a000e6ec: e0845005 add r5, r4, r5 a000e6f0: e3a03000 mov r3, #0 a000e6f4: e5c5300c strb r3, [r5, #12] node->control = node_control; /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; a000e6f8: e59d3020 ldr r3, [sp, #32] */ node->reference_count = 1; node->st_nlink = 1; memcpy( node->name, name, namelen ); node->name [namelen] = '\0'; node->control = node_control; a000e6fc: e584704c str r7, [r4, #76] ; 0x4c /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; a000e700: e5843030 str r3, [r4, #48] ; 0x30 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); a000e704: eb00022f bl a000efc8 a000e708: e1c403bc strh r0, [r4, #60] ; 0x3c node->st_gid = getegid(); a000e70c: eb000228 bl a000efb4 */ node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; a000e710: e5962004 ldr r2, [r6, #4] /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; a000e714: e59d3000 ldr r3, [sp] node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; return (*node->control->node_initialize)( node, info ); a000e718: e594104c ldr r1, [r4, #76] ; 0x4c */ node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; a000e71c: e2822001 add r2, r2, #1 * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); a000e720: e1c403be strh r0, [r4, #62] ; 0x3e /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; a000e724: e5843040 str r3, [r4, #64] ; 0x40 node->stat_mtime = (time_t) tv.tv_sec; a000e728: e5843044 str r3, [r4, #68] ; 0x44 node->stat_ctime = (time_t) tv.tv_sec; a000e72c: e5843048 str r3, [r4, #72] ; 0x48 node->st_ino = ++fs_info->ino_count; return (*node->control->node_initialize)( node, info ); a000e730: e1a00004 mov r0, r4 a000e734: e5913008 ldr r3, [r1, #8] */ node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; a000e738: e5862004 str r2, [r6, #4] return (*node->control->node_initialize)( node, info ); a000e73c: e59d1024 ldr r1, [sp, #36] ; 0x24 */ node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; node->st_ino = ++fs_info->ino_count; a000e740: e5842038 str r2, [r4, #56] ; 0x38 return (*node->control->node_initialize)( node, info ); a000e744: e12fff33 blx r3 } a000e748: e28dd008 add sp, sp, #8 a000e74c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} { IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { errno = ENAMETOOLONG; a000e750: eb00104f bl a0012894 <__errno> <== NOT EXECUTED a000e754: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000e758: e5803000 str r3, [r0] <== NOT EXECUTED return NULL; a000e75c: e3a00000 mov r0, #0 <== NOT EXECUTED a000e760: eafffff8 b a000e748 <== NOT EXECUTED /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); if ( !node ) { errno = ENOMEM; a000e764: eb00104a bl a0012894 <__errno> a000e768: e3a0300c mov r3, #12 a000e76c: e5803000 str r3, [r0] return NULL; a000e770: e1a00004 mov r0, r4 a000e774: eafffff3 b a000e748 =============================================================================== a000e61c : int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { a000e61c: e92d40f0 push {r4, r5, r6, r7, lr} a000e620: e1a01801 lsl r1, r1, #16 a000e624: e1a02802 lsl r2, r2, #16 a000e628: e24dd008 sub sp, sp, #8 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) loc->node_access; a000e62c: e5904008 ldr r4, [r0, #8] int IMFS_chown( const rtems_filesystem_location_info_t *loc, uid_t owner, gid_t group ) { a000e630: e1a07821 lsr r7, r1, #16 a000e634: 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(); a000e638: eb000262 bl a000efc8 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) a000e63c: e1d453bc ldrh r5, [r4, #60] ; 0x3c a000e640: e3500000 cmp r0, #0 a000e644: 11550000 cmpne r5, r0 a000e648: 03a05000 moveq r5, #0 a000e64c: 13a05001 movne r5, #1 a000e650: 1a000009 bne a000e67c rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; a000e654: e1c473bc strh r7, [r4, #60] ; 0x3c jnode->st_gid = group; a000e658: e1c463be strh r6, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); a000e65c: e1a0000d mov r0, sp a000e660: e1a01005 mov r1, r5 a000e664: ebffe029 bl a0006710 a000e668: e59d3000 ldr r3, [sp] return 0; a000e66c: e1a00005 mov r0, r5 #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); a000e670: e5843048 str r3, [r4, #72] ; 0x48 return 0; } a000e674: e28dd008 add sp, sp, #8 a000e678: e8bd80f0 pop {r4, r5, r6, r7, pc} #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); a000e67c: eb001084 bl a0012894 <__errno> <== NOT EXECUTED a000e680: e3a03001 mov r3, #1 <== NOT EXECUTED a000e684: e5803000 str r3, [r0] <== NOT EXECUTED a000e688: e3e00000 mvn r0, #0 <== NOT EXECUTED a000e68c: eafffff8 b a000e674 <== NOT EXECUTED =============================================================================== a00086f4 : */ static void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { a00086f4: e92d41f0 push {r4, r5, r6, r7, r8, lr} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; a00086f8: e5907050 ldr r7, [r0, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( const Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Immutable_tail( the_chain )); a00086fc: e2808054 add r8, r0, #84 ; 0x54 a0008700: e1a06001 mov r6, r1 IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); a0008704: e1570008 cmp r7, r8 a0008708: 159f5160 ldrne r5, [pc, #352] ; a0008870 a000870c: 0a000028 beq a00087b4 !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++ ) a0008710: e3560000 cmp r6, #0 a0008714: a3a04000 movge r4, #0 a0008718: ba000008 blt a0008740 fprintf(stdout, "...." ); a000871c: e5953000 ldr r3, [r5] a0008720: e3a01001 mov r1, #1 !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++ ) a0008724: e0844001 add r4, r4, r1 fprintf(stdout, "...." ); a0008728: e59f0144 ldr r0, [pc, #324] ; a0008874 a000872c: e3a02004 mov r2, #4 a0008730: e5933008 ldr r3, [r3, #8] a0008734: eb003c06 bl a0017754 !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++ ) a0008738: e1560004 cmp r6, r4 a000873c: aafffff6 bge a000871c IMFS_jnode_t *the_jnode ) { IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a0008740: e5953000 ldr r3, [r5] a0008744: e287000c add r0, r7, #12 a0008748: e5931008 ldr r1, [r3, #8] a000874c: eb0038ef bl a0016b10 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; a0008750: e597304c ldr r3, [r7, #76] ; 0x4c a0008754: e5932000 ldr r2, [r3] switch( IMFS_type( the_jnode ) ) { a0008758: e3520006 cmp r2, #6 a000875c: 979ff102 ldrls pc, [pc, r2, lsl #2] a0008760: ea000030 b a0008828 <== NOT EXECUTED a0008764: a0008814 .word 0xa0008814 <== NOT EXECUTED a0008768: a00087f0 .word 0xa00087f0 <== NOT EXECUTED a000876c: a0008780 .word 0xa0008780 <== NOT EXECUTED a0008770: a0008780 .word 0xa0008780 <== NOT EXECUTED a0008774: a0008858 .word 0xa0008858 <== NOT EXECUTED a0008778: a000883c .word 0xa000883c <== NOT EXECUTED a000877c: a00087b8 .word 0xa00087b8 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a0008780: e5953000 ldr r3, [r5] <== NOT EXECUTED a0008784: e3a01001 mov r1, #1 <== NOT EXECUTED a0008788: e3a02013 mov r2, #19 <== NOT EXECUTED a000878c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a0008790: e59f00e0 ldr r0, [pc, #224] ; a0008878 <== NOT EXECUTED a0008794: eb003bee bl a0017754 <== NOT EXECUTED } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; a0008798: e597304c ldr r3, [r7, #76] ; 0x4c the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) a000879c: e5933000 ldr r3, [r3] a00087a0: e3530000 cmp r3, #0 a00087a4: 0a00000d beq a00087e0 the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { a00087a8: e5977000 ldr r7, [r7] IMFS_assert( level >= 0 ); IMFS_assert( IMFS_is_directory( the_directory ) ); the_chain = &the_directory->info.directory.Entries; for ( the_node = rtems_chain_first( the_chain ); a00087ac: e1570008 cmp r7, r8 a00087b0: 1affffd6 bne a0008710 a00087b4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a00087b8: e5953000 ldr r3, [r5] <== NOT EXECUTED a00087bc: e3a01001 mov r1, #1 <== NOT EXECUTED a00087c0: e3a02012 mov r2, #18 <== NOT EXECUTED a00087c4: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a00087c8: e59f00ac ldr r0, [pc, #172] ; a000887c <== NOT EXECUTED a00087cc: eb003be0 bl a0017754 <== NOT EXECUTED a00087d0: e597304c ldr r3, [r7, #76] ; 0x4c <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( IMFS_is_directory( the_jnode ) ) a00087d4: e5933000 ldr r3, [r3] <== NOT EXECUTED a00087d8: e3530000 cmp r3, #0 <== NOT EXECUTED a00087dc: 1afffff1 bne a00087a8 <== NOT EXECUTED IMFS_dump_directory( the_jnode, level + 1 ); a00087e0: e1a00007 mov r0, r7 a00087e4: e2861001 add r1, r6, #1 a00087e8: ebffffc1 bl a00086f4 a00087ec: eaffffed b a00087a8 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", a00087f0: e5953000 ldr r3, [r5] a00087f4: e59f1084 ldr r1, [pc, #132] ; a0008880 a00087f8: e5972050 ldr r2, [r7, #80] ; 0x50 a00087fc: e5930008 ldr r0, [r3, #8] a0008800: e5973054 ldr r3, [r7, #84] ; 0x54 a0008804: eb00386c bl a00169bc default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); a0008808: e59f0074 ldr r0, [pc, #116] ; a0008884 a000880c: eb003fbd bl a0018708 a0008810: eaffffe0 b a0008798 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( IMFS_type( the_jnode ) ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); a0008814: e5953000 ldr r3, [r5] a0008818: e3a0002f mov r0, #47 ; 0x2f a000881c: e5931008 ldr r1, [r3, #8] a0008820: eb003885 bl a0016a3c a0008824: eafffff7 b a0008808 case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); a0008828: e5953000 ldr r3, [r5] <== NOT EXECUTED a000882c: e59f1054 ldr r1, [pc, #84] ; a0008888 <== NOT EXECUTED a0008830: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED a0008834: eb003860 bl a00169bc <== NOT EXECUTED a0008838: eaffffd6 b a0008798 <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", a000883c: e5953000 ldr r3, [r5] a0008840: e59f1044 ldr r1, [pc, #68] ; a000888c a0008844: e5972050 ldr r2, [r7, #80] ; 0x50 a0008848: e5930008 ldr r0, [r3, #8] a000884c: e5973058 ldr r3, [r7, #88] ; 0x58 a0008850: eb003859 bl a00169bc a0008854: eaffffeb b a0008808 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", a0008858: e5953000 ldr r3, [r5] <== NOT EXECUTED a000885c: e59f102c ldr r1, [pc, #44] ; a0008890 <== NOT EXECUTED a0008860: e5972050 ldr r2, [r7, #80] ; 0x50 <== NOT EXECUTED a0008864: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED a0008868: eb003853 bl a00169bc <== NOT EXECUTED a000886c: eaffffe5 b a0008808 <== NOT EXECUTED =============================================================================== a000e9cc : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { a000e9cc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED a000e9d0: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; a000e9d4: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { a000e9d8: e1a06001 mov r6, r1 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a000e9dc: eb000179 bl a000efc8 <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) a000e9e0: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED a000e9e4: e3500000 cmp r0, #0 <== NOT EXECUTED a000e9e8: 11550000 cmpne r5, r0 <== NOT EXECUTED a000e9ec: 03a05000 moveq r5, #0 <== NOT EXECUTED a000e9f0: 13a05001 movne r5, #1 <== NOT EXECUTED a000e9f4: 1a00000d bne a000ea30 <== 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); a000e9f8: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a000e9fc: e1a06a06 lsl r6, r6, #20 <== NOT EXECUTED IMFS_update_ctime( jnode ); a000ea00: e1a0000d mov r0, sp <== 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); a000ea04: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED a000ea08: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a000ea0c: e1836a26 orr r6, r3, r6, lsr #20 <== NOT EXECUTED a000ea10: e5846030 str r6, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); a000ea14: e1a01005 mov r1, r5 <== NOT EXECUTED a000ea18: ebffdf3c bl a0006710 <== NOT EXECUTED a000ea1c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; a000ea20: e1a00005 mov r0, r5 <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); a000ea24: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a000ea28: e28dd008 add sp, sp, #8 <== NOT EXECUTED a000ea2c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); a000ea30: eb000f97 bl a0012894 <__errno> <== NOT EXECUTED a000ea34: e3a03001 mov r3, #1 <== NOT EXECUTED a000ea38: e5803000 str r3, [r0] <== NOT EXECUTED a000ea3c: e3e00000 mvn r0, #0 <== NOT EXECUTED a000ea40: eafffff8 b a000ea28 <== NOT EXECUTED =============================================================================== a0006b60 : static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { a0006b60: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { a0006b64: e59f0068 ldr r0, [pc, #104] ; a0006bd4 static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { a0006b68: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { a0006b6c: e1510000 cmp r1, r0 a0006b70: 0a000007 beq a0006b94 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); a0006b74: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED a0006b78: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED a0006b7c: eb002ad1 bl a00116c8 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a0006b80: e2502000 subs r2, r0, #0 <== NOT EXECUTED a0006b84: b2624000 rsblt r4, r2, #0 <== NOT EXECUTED a0006b88: ba00000d blt a0006bc4 <== NOT EXECUTED } a0006b8c: e1a00002 mov r0, r2 a0006b90: e8bd8010 pop {r4, pc} ) { int err; if (command == FIONBIO) { if (buffer == NULL) a0006b94: e3520000 cmp r2, #0 a0006b98: 0a000008 beq a0006bc0 err = -EFAULT; else { if (*(int *)buffer) a0006b9c: e5922000 ldr r2, [r2] iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006ba0: e593100c ldr r1, [r3, #12] if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) a0006ba4: e3520000 cmp r2, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006ba8: 13a02000 movne r2, #0 a0006bac: 13811001 orrne r1, r1, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0006bb0: 03c11001 biceq r1, r1, #1 a0006bb4: e583100c str r1, [r3, #12] } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } a0006bb8: e1a00002 mov r0, r2 a0006bbc: e8bd8010 pop {r4, pc} ) { int err; if (command == FIONBIO) { if (buffer == NULL) a0006bc0: e3a0400e mov r4, #14 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); a0006bc4: eb0037a4 bl a0014a5c <__errno> a0006bc8: e3e02000 mvn r2, #0 a0006bcc: e5804000 str r4, [r0] a0006bd0: eaffffed b a0006b8c =============================================================================== a000ea44 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000ea44: e92d4070 push {r4, r5, r6, lr} /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; a000ea48: e5905024 ldr r5, [r0, #36] ; 0x24 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000ea4c: e24dd018 sub sp, sp, #24 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; a000ea50: e1a0c00d mov ip, sp a000ea54: e1a04005 mov r4, r5 a000ea58: e8b4000f ldm r4!, {r0, r1, r2, r3} a000ea5c: e8ac000f stmia ip!, {r0, r1, r2, r3} a000ea60: e5941004 ldr r1, [r4, #4] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; a000ea64: e592304c ldr r3, [r2, #76] ; 0x4c /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; a000ea68: e5940000 ldr r0, [r4] jnode = (IMFS_jnode_t *)loc.node_access; a000ea6c: e1a06002 mov r6, r2 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; a000ea70: e5932000 ldr r2, [r3] /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; a000ea74: e58c1004 str r1, [ip, #4] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; a000ea78: e3a01000 mov r1, #0 /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location; a000ea7c: e58c0000 str r0, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root->location.node_access = NULL; a000ea80: e5851008 str r1, [r5, #8] a000ea84: e5933004 ldr r3, [r3, #4] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { a000ea88: e3520000 cmp r2, #0 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; a000ea8c: e5964008 ldr r4, [r6, #8] loc.node_access = (void *)jnode; a000ea90: e58d6008 str r6, [sp, #8] a000ea94: e58d3010 str r3, [sp, #16] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { a000ea98: 1a000018 bne a000eb00 a000ea9c: e5962050 ldr r2, [r6, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000eaa0: e2863054 add r3, r6, #84 ; 0x54 a000eaa4: e1520003 cmp r2, r3 a000eaa8: 0a000014 beq a000eb00 if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); jnode = next; } if ( jnode != NULL ) { a000eaac: e3560000 cmp r6, #0 a000eab0: 0a00001c beq a000eb28 return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; a000eab4: e596304c ldr r3, [r6, #76] ; 0x4c a000eab8: e5932000 ldr r2, [r3] if ( IMFS_is_directory( jnode ) ) { a000eabc: e3520000 cmp r2, #0 a000eac0: 1affffef bne a000ea84 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000eac4: e5961050 ldr r1, [r6, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000eac8: e2860054 add r0, r6, #84 ; 0x54 if ( jnode_has_children( jnode ) ) a000eacc: e1510000 cmp r1, r0 a000ead0: 0affffeb beq a000ea84 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a000ead4: e3510000 cmp r1, #0 a000ead8: 0a000012 beq a000eb28 a000eadc: e591304c ldr r3, [r1, #76] ; 0x4c a000eae0: e1a06001 mov r6, r1 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; a000eae4: e5964008 ldr r4, [r6, #8] if ( IMFS_is_directory( jnode ) ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a000eae8: e5932000 ldr r2, [r3] static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; a000eaec: e5933004 ldr r3, [r3, #4] temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; a000eaf0: e58d6008 str r6, [sp, #8] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { a000eaf4: e3520000 cmp r2, #0 a000eaf8: e58d3010 str r3, [sp, #16] a000eafc: 0affffe6 beq a000ea9c result = IMFS_rmnod( NULL, &loc ); a000eb00: e3a00000 mov r0, #0 a000eb04: e1a0100d mov r1, sp a000eb08: ebffdd96 bl a0006168 if ( result != 0 ) a000eb0c: e3500000 cmp r0, #0 a000eb10: 1a000006 bne a000eb30 rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); a000eb14: e1a00006 mov r0, r6 jnode = next; a000eb18: e1a06004 mov r6, r4 if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); a000eb1c: ebffdcbf bl a0005e20 jnode = next; } if ( jnode != NULL ) { a000eb20: e3560000 cmp r6, #0 a000eb24: 1affffe2 bne a000eab4 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); } a000eb28: e28dd018 add sp, sp, #24 a000eb2c: e8bd8070 pop {r4, r5, r6, pc} IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { result = IMFS_rmnod( NULL, &loc ); if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); a000eb30: e59f0000 ldr r0, [pc] ; a000eb38 <== NOT EXECUTED a000eb34: ebfff0e8 bl a000aedc <== NOT EXECUTED =============================================================================== a0005cf8 : int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { a0005cf8: e92d41f0 push {r4, r5, r6, r7, r8, lr} a0005cfc: e1a05000 mov r5, r0 a0005d00: e24dd008 sub sp, sp, #8 a0005d04: e1a07001 mov r7, r1 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); a0005d08: e3a00001 mov r0, #1 a0005d0c: e3a01024 mov r1, #36 ; 0x24 int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const rtems_filesystem_operations_table *op_table, const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { a0005d10: e1a08002 mov r8, r2 static int imfs_instance; int rv = 0; IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); a0005d14: eb0001aa bl a00063c4 if ( fs_info != NULL ) { a0005d18: e2504000 subs r4, r0, #0 a0005d1c: 0a000030 beq a0005de4 IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; a0005d20: e59f60d0 ldr r6, [pc, #208] ; a0005df8 a0005d24: e1a00004 mov r0, r4 memcpy( a0005d28: e1a01008 mov r1, r8 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; a0005d2c: e5963000 ldr r3, [r6] memcpy( a0005d30: e3a0201c mov r2, #28 IMFS_fs_info_t *fs_info = calloc( 1, sizeof( *fs_info ) ); if ( fs_info != NULL ) { IMFS_jnode_t *root_node; fs_info->instance = imfs_instance++; a0005d34: e4803008 str r3, [r0], #8 a0005d38: e2833001 add r3, r3, #1 a0005d3c: e5863000 str r3, [r6] memcpy( a0005d40: eb00350d bl a001317c fs_info->node_controls, node_controls, sizeof( fs_info->node_controls ) ); root_node = IMFS_allocate_node( a0005d44: e3a0e000 mov lr, #0 a0005d48: e3a0cc41 mov ip, #16640 ; 0x4100 a0005d4c: e5941008 ldr r1, [r4, #8] a0005d50: e28cc0ed add ip, ip, #237 ; 0xed a0005d54: e1a00004 mov r0, r4 a0005d58: e59f209c ldr r2, [pc, #156] ; a0005dfc a0005d5c: e1a0300e mov r3, lr a0005d60: e58dc000 str ip, [sp] a0005d64: e58de004 str lr, [sp, #4] a0005d68: eb002248 bl a000e690 "", 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { a0005d6c: e3500000 cmp r0, #0 a0005d70: 0a00001b beq a0005de4 errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( a0005d74: e59f2084 ldr r2, [pc, #132] ; a0005e00 static inline void IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { IMFS_jnode_t *node = (IMFS_jnode_t *) loc->node_access; loc->handlers = node->control->handlers; a0005d78: e590104c ldr r1, [r0, #76] ; 0x4c ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; mt_entry->mt_fs_root->location.node_access = root_node; a0005d7c: e5953024 ldr r3, [r5, #36] ; 0x24 errno = ENOMEM; rv = -1; } if ( rv == 0 ) { IMFS_determine_bytes_per_block( a0005d80: e5922000 ldr r2, [r2] a0005d84: e5911004 ldr r1, [r1, #4] NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; mt_entry->ops = op_table; mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; a0005d88: e59fc074 ldr ip, [pc, #116] ; a0005e04 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { a0005d8c: e3520010 cmp r2, #16 0, (S_IFDIR | 0755), NULL ); if ( root_node != NULL ) { mt_entry->fs_info = fs_info; a0005d90: e5854008 str r4, [r5, #8] mt_entry->ops = op_table; a0005d94: e585700c str r7, [r5, #12] mt_entry->pathconf_limits_and_options = &IMFS_LIMITS_AND_OPTIONS; a0005d98: e585c02c str ip, [r5, #44] ; 0x2c mt_entry->mt_fs_root->location.node_access = root_node; a0005d9c: e5830008 str r0, [r3, #8] a0005da0: e5831010 str r1, [r3, #16] /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { a0005da4: 0a00000a beq a0005dd4 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) a0005da8: e352000f cmp r2, #15 a0005dac: c3a01005 movgt r1, #5 a0005db0: c3a03020 movgt r3, #32 a0005db4: da000005 ble a0005dd0 /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { a0005db8: e1520003 cmp r2, r3 a0005dbc: 0a000004 beq a0005dd4 is_valid = true; break; } if(bit_mask > requested_bytes_per_block) a0005dc0: ba000002 blt a0005dd0 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { a0005dc4: e2511001 subs r1, r1, #1 a0005dc8: e1a03083 lsl r3, r3, #1 a0005dcc: 1afffff9 bne a0005db8 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); a0005dd0: e3a02080 mov r2, #128 ; 0x80 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) a0005dd4: e5862004 str r2, [r6, #4] const IMFS_node_control *const node_controls [IMFS_TYPE_COUNT] ) { static int imfs_instance; int rv = 0; a0005dd8: e3a00000 mov r0, #0 IMFS_MEMFILE_DEFAULT_BYTES_PER_BLOCK ); } return rv; } a0005ddc: e28dd008 add sp, sp, #8 a0005de0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} } else { errno = ENOMEM; rv = -1; } } else { errno = ENOMEM; a0005de4: eb0032aa bl a0012894 <__errno> <== NOT EXECUTED a0005de8: e3a0300c mov r3, #12 <== NOT EXECUTED a0005dec: e5803000 str r3, [r0] <== NOT EXECUTED a0005df0: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005df4: eafffff8 b a0005ddc <== NOT EXECUTED =============================================================================== a0005e54 : const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen ) { a0005e54: e92d4010 push {r4, lr} IMFS_types_union info; IMFS_jnode_t *new_node; IMFS_jnode_t *target; target = targetloc->node_access; a0005e58: e5914008 ldr r4, [r1, #8] const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *targetloc, const char *name, size_t namelen ) { a0005e5c: e24dd024 sub sp, sp, #36 ; 0x24 info.hard_link.link_node = target; /* * Verify this node can be linked to. */ if ( target->st_nlink >= LINK_MAX ) a0005e60: e1d413b6 ldrh r1, [r4, #54] ; 0x36 IMFS_types_union info; IMFS_jnode_t *new_node; IMFS_jnode_t *target; target = targetloc->node_access; info.hard_link.link_node = target; a0005e64: e58d4008 str r4, [sp, #8] /* * Verify this node can be linked to. */ if ( target->st_nlink >= LINK_MAX ) a0005e68: e3510007 cmp r1, #7 a0005e6c: 8a000018 bhi a0005ed4 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = a0005e70: e5901014 ldr r1, [r0, #20] (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( a0005e74: e3a0cca2 mov ip, #41472 ; 0xa200 a0005e78: e24cc001 sub ip, ip, #1 a0005e7c: e5911008 ldr r1, [r1, #8] a0005e80: e5911010 ldr r1, [r1, #16] a0005e84: e58dc000 str ip, [sp] a0005e88: e28dc008 add ip, sp, #8 a0005e8c: e58dc004 str ip, [sp, #4] a0005e90: eb002238 bl a000e778 namelen, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) a0005e94: e3500000 cmp r0, #0 a0005e98: 0a000012 beq a0005ee8 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ target->reference_count++; a0005e9c: e1d423b4 ldrh r2, [r4, #52] ; 0x34 target->st_nlink++; a0005ea0: e1d433b6 ldrh r3, [r4, #54] ; 0x36 IMFS_update_ctime( target ); a0005ea4: e28d001c add r0, sp, #28 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ target->reference_count++; a0005ea8: e2822001 add r2, r2, #1 target->st_nlink++; a0005eac: e2833001 add r3, r3, #1 a0005eb0: e1c433b6 strh r3, [r4, #54] ; 0x36 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ target->reference_count++; a0005eb4: e1c423b4 strh r2, [r4, #52] ; 0x34 target->st_nlink++; IMFS_update_ctime( target ); a0005eb8: e3a01000 mov r1, #0 a0005ebc: eb000213 bl a0006710 a0005ec0: e59d301c ldr r3, [sp, #28] return 0; a0005ec4: e3a00000 mov r0, #0 /* * Increment the link count of the node being pointed to. */ target->reference_count++; target->st_nlink++; IMFS_update_ctime( target ); a0005ec8: e5843048 str r3, [r4, #72] ; 0x48 return 0; } a0005ecc: e28dd024 add sp, sp, #36 ; 0x24 a0005ed0: e8bd8010 pop {r4, pc} /* * Verify this node can be linked to. */ if ( target->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); a0005ed4: eb00326e bl a0012894 <__errno> <== NOT EXECUTED a0005ed8: e3a0301f mov r3, #31 <== NOT EXECUTED a0005edc: e5803000 str r3, [r0] <== NOT EXECUTED a0005ee0: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005ee4: eafffff8 b a0005ecc <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); a0005ee8: eb003269 bl a0012894 <__errno> <== NOT EXECUTED a0005eec: e3a0300c mov r3, #12 <== NOT EXECUTED a0005ef0: e5803000 str r3, [r0] <== NOT EXECUTED a0005ef4: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005ef8: eafffff3 b a0005ecc <== NOT EXECUTED =============================================================================== a000781c : const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { a000781c: e92d40f0 push {r4, r5, r6, r7, lr} a0007820: e1a05002 mov r5, r2 int rv = 0; mode &= ~rtems_filesystem_umask; a0007824: e59f2100 ldr r2, [pc, #256] ; a000792c const char *path, mode_t mode, const IMFS_node_control *node_control, void *context ) { a0007828: e1a06003 mov r6, r3 a000782c: e24dd05c sub sp, sp, #92 ; 0x5c int rv = 0; mode &= ~rtems_filesystem_umask; a0007830: e5922000 ldr r2, [r2] a0007834: e5924008 ldr r4, [r2, #8] a0007838: e1c14004 bic r4, r1, r4 switch (mode & S_IFMT) { a000783c: e2043a0f and r3, r4, #61440 ; 0xf000 a0007840: e3530a02 cmp r3, #8192 ; 0x2000 a0007844: 0a00000d beq a0007880 a0007848: 8a000008 bhi a0007870 a000784c: e3530a01 cmp r3, #4096 ; 0x1000 <== NOT EXECUTED a0007850: 0a00000a beq a0007880 <== NOT EXECUTED rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); } else { errno = EINVAL; a0007854: eb003e74 bl a001722c <__errno> a0007858: e3a03016 mov r3, #22 a000785c: e5803000 str r3, [r0] rv = -1; a0007860: e3e05000 mvn r5, #0 } } return rv; } a0007864: e1a00005 mov r0, r5 a0007868: e28dd05c add sp, sp, #92 ; 0x5c a000786c: e8bd80f0 pop {r4, r5, r6, r7, pc} { int rv = 0; mode &= ~rtems_filesystem_umask; switch (mode & S_IFMT) { a0007870: e3530a06 cmp r3, #24576 ; 0x6000 a0007874: 0a000001 beq a0007880 a0007878: e3530902 cmp r3, #32768 ; 0x8000 a000787c: 1afffff4 bne a0007854 rv = -1; break; } if ( rv == 0 ) { if ( node_control->imfs_type == IMFS_GENERIC ) { a0007880: e5953000 ldr r3, [r5] a0007884: e3530007 cmp r3, #7 a0007888: 1afffff1 bne a0007854 rtems_filesystem_eval_path_context_t ctx; int eval_flags = RTEMS_FS_FOLLOW_LINK | RTEMS_FS_MAKE | RTEMS_FS_EXCLUSIVE; const rtems_filesystem_location_info_t *currentloc = a000788c: e1a01000 mov r1, r0 a0007890: e3a02078 mov r2, #120 ; 0x78 a0007894: e28d0008 add r0, sp, #8 a0007898: eb000813 bl a00098ec a000789c: e1a07000 mov r7, r0 rtems_filesystem_eval_path_start( &ctx, path, eval_flags ); if ( IMFS_is_imfs_instance( currentloc ) ) { a00078a0: ebffffcb bl a00077d4 a00078a4: e3500000 cmp r0, #0 a00078a8: 0a00001a beq a0007918 IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; new_node = IMFS_create_node_with_control( a00078ac: e1a01005 mov r1, r5 a00078b0: e28dc040 add ip, sp, #64 ; 0x40 a00078b4: e1a00007 mov r0, r7 a00078b8: e59d2010 ldr r2, [sp, #16] a00078bc: e59d3014 ldr r3, [sp, #20] if ( IMFS_is_imfs_instance( currentloc ) ) { IMFS_types_union info; IMFS_jnode_t *new_node; info.generic.context = context; a00078c0: e58d6040 str r6, [sp, #64] ; 0x40 new_node = IMFS_create_node_with_control( a00078c4: e58d4000 str r4, [sp] a00078c8: e58dc004 str ip, [sp, #4] a00078cc: eb002d8e bl a0012f0c rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { a00078d0: e3500000 cmp r0, #0 IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); IMFS_update_mtime( parent ); } else { rv = -1; a00078d4: 03e05000 mvneq r5, #0 rtems_filesystem_eval_path_get_tokenlen( &ctx ), mode, &info ); if ( new_node != NULL ) { a00078d8: 0a00000b beq a000790c IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); a00078dc: e3a01000 mov r1, #0 a00078e0: e28d0054 add r0, sp, #84 ; 0x54 mode, &info ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; a00078e4: e5974008 ldr r4, [r7, #8] IMFS_update_ctime( parent ); a00078e8: eb000276 bl a00082c8 a00078ec: e59d3054 ldr r3, [sp, #84] ; 0x54 IMFS_update_mtime( parent ); a00078f0: e28d0054 add r0, sp, #84 ; 0x54 a00078f4: e3a01000 mov r1, #0 ); if ( new_node != NULL ) { IMFS_jnode_t *parent = currentloc->node_access; IMFS_update_ctime( parent ); a00078f8: e5843048 str r3, [r4, #72] ; 0x48 IMFS_update_mtime( parent ); a00078fc: eb000271 bl a00082c8 a0007900: e59d3054 ldr r3, [sp, #84] ; 0x54 a0007904: e3a05000 mov r5, #0 a0007908: e5843044 str r3, [r4, #68] ; 0x44 } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); rv = -1; } rtems_filesystem_eval_path_cleanup( &ctx ); a000790c: e28d0008 add r0, sp, #8 a0007910: eb0007ff bl a0009914 a0007914: eaffffd2 b a0007864 IMFS_update_mtime( parent ); } else { rv = -1; } } else { rtems_filesystem_eval_path_error( &ctx, ENOTSUP ); a0007918: e28d0008 add r0, sp, #8 a000791c: e3a01086 mov r1, #134 ; 0x86 a0007920: eb000730 bl a00095e8 rv = -1; a0007924: e3e05000 mvn r5, #0 a0007928: eafffff7 b a000790c =============================================================================== a00113a8 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { a00113a8: e92d4030 push {r4, r5, lr} IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a00113ac: e3a02001 mov r2, #1 a00113b0: ebfffeeb bl a0010f64 if ( *block_entry_ptr ) a00113b4: e5904000 ldr r4, [r0] IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a00113b8: e1a05000 mov r5, r0 if ( *block_entry_ptr ) a00113bc: e3540000 cmp r4, #0 a00113c0: 0a000001 beq a00113cc return 0; a00113c4: e3a00000 mov r0, #0 a00113c8: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); a00113cc: ebfffed7 bl a0010f30 if ( !memory ) a00113d0: e3500000 cmp r0, #0 a00113d4: 0a000002 beq a00113e4 return 1; *block_entry_ptr = memory; a00113d8: e5850000 str r0, [r5] return 0; a00113dc: e1a00004 mov r0, r4 a00113e0: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; a00113e4: e3a00001 mov r0, #1 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } a00113e8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a00115cc : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { a00115cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a00115d0: e24dd018 sub sp, sp, #24 a00115d4: e88d000c stm sp, {r2, r3} IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a00115d8: e59f2190 ldr r2, [pc, #400] ; a0011770 a00115dc: e3a05000 mov r5, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { a00115e0: e20190ff and r9, r1, #255 ; 0xff IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a00115e4: e5928000 ldr r8, [r2] MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { a00115e8: e1a06000 mov r6, r0 IMFS_assert( IMFS_type( the_jnode ) == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a00115ec: e1a03128 lsr r3, r8, #2 a00115f0: e0223393 mla r2, r3, r3, r3 a00115f4: e0233392 mla r3, r2, r3, r3 a00115f8: e89d0006 ldm sp, {r1, r2} a00115fc: e2433001 sub r3, r3, #1 a0011600: e0030398 mul r3, r8, r3 a0011604: e1a04003 mov r4, r3 a0011608: e1510004 cmp r1, r4 a001160c: e0d22005 sbcs r2, r2, r5 a0011610: aa000051 bge a001175c rtems_set_errno_and_return_minus_one( EFBIG ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) a0011614: e2804050 add r4, r0, #80 ; 0x50 a0011618: e8940018 ldm r4, {r3, r4} a001161c: e89d0006 ldm sp, {r1, r2} a0011620: e1530001 cmp r3, r1 a0011624: e0d42002 sbcs r2, r4, r2 a0011628: e58d3008 str r3, [sp, #8] a001162c: e58d400c str r4, [sp, #12] return 0; a0011630: a3a00000 movge r0, #0 rtems_set_errno_and_return_minus_one( EFBIG ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) a0011634: aa00003b bge a0011728 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0011638: e1a05fc8 asr r5, r8, #31 a001163c: e1a02008 mov r2, r8 a0011640: e1a03005 mov r3, r5 a0011644: e89d0003 ldm sp, {r0, r1} a0011648: eb002b75 bl a001c424 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a001164c: e1a02008 mov r2, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0011650: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a0011654: e1a03005 mov r3, r5 a0011658: e28d1008 add r1, sp, #8 a001165c: e8910003 ldm r1, {r0, r1} a0011660: eb002b6f bl a001c424 <__divdi3> offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a0011664: e15a0000 cmp sl, r0 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0011668: e1a04008 mov r4, r8 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a001166c: e1a0b000 mov fp, r0 offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a0011670: 3a00001e bcc a00116f0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; a0011674: e0080890 mul r8, r0, r8 a0011678: e59d3008 ldr r3, [sp, #8] a001167c: e1a04000 mov r4, r0 a0011680: e0688003 rsb r8, r8, r3 a0011684: ea000002 b a0011694 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a0011688: e2844001 add r4, r4, #1 a001168c: e15a0004 cmp sl, r4 a0011690: 3a000016 bcc a00116f0 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { a0011694: e1a01004 mov r1, r4 a0011698: e1a00006 mov r0, r6 a001169c: ebffff41 bl a00113a8 a00116a0: e2505000 subs r5, r0, #0 a00116a4: 1a000025 bne a0011740 if ( zero_fill ) { a00116a8: e3590000 cmp r9, #0 a00116ac: 0afffff5 beq a0011688 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; a00116b0: e59f10b8 ldr r1, [pc, #184] ; a0011770 <== NOT EXECUTED block_p *block_ptr = a00116b4: e1a02005 mov r2, r5 <== NOT EXECUTED a00116b8: e1a00006 mov r0, r6 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; a00116bc: e5917000 ldr r7, [r1] <== NOT EXECUTED block_p *block_ptr = a00116c0: e1a01004 mov r1, r4 <== NOT EXECUTED a00116c4: ebfffe26 bl a0010f64 <== NOT EXECUTED IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); a00116c8: e5900000 ldr r0, [r0] <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( !IMFS_memfile_addblock( the_jnode, block ) ) { if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; a00116cc: e0687007 rsb r7, r8, r7 <== NOT EXECUTED block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); a00116d0: e1a01005 mov r1, r5 <== NOT EXECUTED a00116d4: e0800008 add r0, r0, r8 <== NOT EXECUTED a00116d8: e1a02007 mov r2, r7 <== NOT EXECUTED offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a00116dc: e2844001 add r4, r4, #1 <== NOT EXECUTED if ( zero_fill ) { size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); a00116e0: eb0006db bl a0013254 <== NOT EXECUTED offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a00116e4: e15a0004 cmp sl, r4 <== NOT EXECUTED size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; block_p *block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); offset = 0; a00116e8: e1a08005 mov r8, r5 <== NOT EXECUTED offset = the_jnode->info.file.size - old_blocks * IMFS_MEMFILE_BYTES_PER_BLOCK; /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a00116ec: 2affffe8 bcs a0011694 <== NOT EXECUTED } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a00116f0: e89d000c ldm sp, {r2, r3} IMFS_update_ctime(the_jnode); a00116f4: e3a01000 mov r1, #0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a00116f8: e5862050 str r2, [r6, #80] ; 0x50 a00116fc: e5863054 str r3, [r6, #84] ; 0x54 IMFS_update_ctime(the_jnode); a0011700: e28d0010 add r0, sp, #16 a0011704: ebffd401 bl a0006710 a0011708: e59d3010 ldr r3, [sp, #16] IMFS_update_mtime(the_jnode); a001170c: e28d0010 add r0, sp, #16 a0011710: e3a01000 mov r1, #0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); a0011714: e5863048 str r3, [r6, #72] ; 0x48 IMFS_update_mtime(the_jnode); a0011718: ebffd3fc bl a0006710 a001171c: e59d3010 ldr r3, [sp, #16] return 0; a0011720: e3a00000 mov r0, #0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); IMFS_update_mtime(the_jnode); a0011724: e5863044 str r3, [r6, #68] ; 0x44 return 0; } a0011728: e28dd018 add sp, sp, #24 a001172c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); a0011730: e1a01004 mov r1, r4 <== NOT EXECUTED a0011734: e1a00006 mov r0, r6 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { a0011738: e2444001 sub r4, r4, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); a001173c: ebffff98 bl a00115a4 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { a0011740: e15b0004 cmp fp, r4 <== NOT EXECUTED a0011744: 9afffff9 bls a0011730 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); a0011748: eb000451 bl a0012894 <__errno> <== NOT EXECUTED a001174c: e3a0301c mov r3, #28 <== NOT EXECUTED a0011750: e5803000 str r3, [r0] <== NOT EXECUTED a0011754: e3e00000 mvn r0, #0 <== NOT EXECUTED a0011758: eafffff2 b a0011728 <== NOT EXECUTED /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EFBIG ); a001175c: eb00044c bl a0012894 <__errno> a0011760: e3a0301b mov r3, #27 a0011764: e5803000 str r3, [r0] a0011768: e3e00000 mvn r0, #0 a001176c: eaffffed b a0011728 =============================================================================== a0010f64 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a0010f64: e59f31fc ldr r3, [pc, #508] ; a0011168 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a0010f68: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a0010f6c: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a0010f70: e24dd004 sub sp, sp, #4 a0010f74: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a0010f78: e1a05125 lsr r5, r5, #2 a0010f7c: e2453001 sub r3, r5, #1 a0010f80: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a0010f84: e1a06002 mov r6, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a0010f88: 8a000007 bhi a0010fac p = info->indirect; if ( malloc_it ) { a0010f8c: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a0010f90: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a0010f94: 0a000040 beq a001109c if ( !p ) { a0010f98: e3500000 cmp r0, #0 a0010f9c: 0a000050 beq a00110e4 } if ( !p ) return 0; return &info->indirect[ my_block ]; a0010fa0: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } a0010fa4: e28dd004 add sp, sp, #4 a0010fa8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a0010fac: e0275595 mla r7, r5, r5, r5 a0010fb0: e2473001 sub r3, r7, #1 a0010fb4: e1510003 cmp r1, r3 a0010fb8: 9a000023 bls a001104c } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a0010fbc: e0235597 mla r3, r7, r5, r5 a0010fc0: e2433001 sub r3, r3, #1 a0010fc4: e1510003 cmp r1, r3 } /* * This means the requested block number is out of range. */ return 0; a0010fc8: 83a00000 movhi r0, #0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a0010fcc: 8afffff4 bhi a0010fa4 my_block -= FIRST_TRIPLY_INDIRECT; a0010fd0: e0677001 rsb r7, r7, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0010fd4: e1a00007 mov r0, r7 a0010fd8: e1a01005 mov r1, r5 a0010fdc: eb002a63 bl a001b970 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0010fe0: e1a01005 mov r1, r5 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0010fe4: e1a09000 mov r9, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0010fe8: e1a00007 mov r0, r7 a0010fec: eb002a19 bl a001b858 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a0010ff0: e1a01005 mov r1, r5 */ 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; a0010ff4: e1a0a000 mov sl, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a0010ff8: eb002a16 bl a001b858 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a0010ffc: e1a01005 mov r1, r5 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; a0011000: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a0011004: e1a0000a mov r0, sl a0011008: eb002a58 bl a001b970 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a001100c: e3560000 cmp r6, #0 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; a0011010: e1a05000 mov r5, r0 p = info->triply_indirect; a0011014: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a0011018: 0a000028 beq a00110c0 if ( !p ) { a001101c: e3500000 cmp r0, #0 a0011020: 0a000045 beq a001113c if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; a0011024: e7903107 ldr r3, [r0, r7, lsl #2] a0011028: e0807107 add r7, r0, r7, lsl #2 if ( !p1 ) { a001102c: e3530000 cmp r3, #0 a0011030: 0a000046 beq a0011150 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; a0011034: e7930105 ldr r0, [r3, r5, lsl #2] a0011038: e0835105 add r5, r3, r5, lsl #2 if ( !p2 ) { a001103c: e3500000 cmp r0, #0 a0011040: 0a000033 beq a0011114 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a0011044: e0800109 add r0, r0, r9, lsl #2 a0011048: eaffffd5 b a0010fa4 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; a001104c: e0657001 rsb r7, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0011050: e1a00007 mov r0, r7 a0011054: e1a01005 mov r1, r5 a0011058: eb002a44 bl a001b970 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a001105c: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0011060: e1a08000 mov r8, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0011064: e1a00007 mov r0, r7 a0011068: eb0029fa bl a001b858 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a001106c: e3560000 cmp r6, #0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0011070: e1a05000 mov r5, r0 p = info->doubly_indirect; a0011074: e594305c ldr r3, [r4, #92] ; 0x5c if ( malloc_it ) { a0011078: 0a00000a beq a00110a8 if ( !p ) { a001107c: e3530000 cmp r3, #0 a0011080: 0a000028 beq a0011128 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; a0011084: e7930105 ldr r0, [r3, r5, lsl #2] a0011088: e0835105 add r5, r3, r5, lsl #2 if ( !p1 ) { a001108c: e3500000 cmp r0, #0 a0011090: 0a00001a beq a0011100 p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a0011094: e0800108 add r0, r0, r8, lsl #2 a0011098: eaffffc1 b a0010fa4 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) a001109c: e3500000 cmp r0, #0 a00110a0: 1affffbe bne a0010fa0 a00110a4: eaffffbe b a0010fa4 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a00110a8: e3530000 cmp r3, #0 a00110ac: 0a00002b beq a0011160 return 0; p = (block_p *)p[ doubly ]; a00110b0: e7930100 ldr r0, [r3, r0, lsl #2] if ( !p ) a00110b4: e3500000 cmp r0, #0 return 0; return (block_p *)&p[ singly ]; a00110b8: 10800108 addne r0, r0, r8, lsl #2 a00110bc: eaffffb8 b a0010fa4 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a00110c0: e3500000 cmp r0, #0 a00110c4: 0affffb6 beq a0010fa4 return 0; p1 = (block_p *) p[ triply ]; a00110c8: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a00110cc: e3500000 cmp r0, #0 a00110d0: 0affffb3 beq a0010fa4 return 0; p2 = (block_p *)p1[ doubly ]; a00110d4: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a00110d8: e3500000 cmp r0, #0 return 0; return (block_p *)&p2[ singly ]; a00110dc: 10800109 addne r0, r0, r9, lsl #2 a00110e0: eaffffaf b a0010fa4 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a00110e4: e58d1000 str r1, [sp] a00110e8: ebffff90 bl a0010f30 if ( !p ) a00110ec: e3500000 cmp r0, #0 a00110f0: e59d1000 ldr r1, [sp] return 0; info->indirect = p; a00110f4: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) a00110f8: 1affffa8 bne a0010fa0 a00110fc: eaffffa8 b a0010fa4 <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); a0011100: ebffff8a bl a0010f30 if ( !p1 ) a0011104: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a0011108: 15850000 strne r0, [r5] p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a001110c: 10800108 addne r0, r0, r8, lsl #2 a0011110: eaffffa3 b a0010fa4 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); a0011114: ebffff85 bl a0010f30 if ( !p2 ) a0011118: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a001111c: 15850000 strne r0, [r5] p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a0011120: 10800109 addne r0, r0, r9, lsl #2 a0011124: eaffff9e b a0010fa4 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a0011128: ebffff80 bl a0010f30 if ( !p ) a001112c: e2503000 subs r3, r0, #0 a0011130: 0a00000a beq a0011160 return 0; info->doubly_indirect = p; a0011134: e584305c str r3, [r4, #92] ; 0x5c a0011138: eaffffd1 b a0011084 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a001113c: ebffff7b bl a0010f30 if ( !p ) a0011140: e3500000 cmp r0, #0 a0011144: 0affff96 beq a0010fa4 return 0; info->triply_indirect = p; a0011148: e5840060 str r0, [r4, #96] ; 0x60 a001114c: eaffffb4 b a0011024 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); a0011150: ebffff76 bl a0010f30 if ( !p1 ) a0011154: e2503000 subs r3, r0, #0 return 0; p[ triply ] = (block_p) p1; a0011158: 15873000 strne r3, [r7] a001115c: 1affffb4 bne a0011034 p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; a0011160: e1a00003 mov r0, r3 <== NOT EXECUTED a0011164: eaffff8e b a0010fa4 <== NOT EXECUTED =============================================================================== a001116c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a001116c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0011170: e1a09000 mov r9, r0 rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; a0011174: e590004c ldr r0, [r0, #76] ; 0x4c a0011178: e24dd014 sub sp, sp, #20 a001117c: e58d3008 str r3, [sp, #8] * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { a0011180: e5903000 ldr r3, [r0] IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a0011184: e88d0006 stm sp, {r1, r2} * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { a0011188: e3530005 cmp r3, #5 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a001118c: e59d7038 ldr r7, [sp, #56] ; 0x38 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { a0011190: 0a000059 beq a00112fc */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0011194: e59f81c0 ldr r8, [pc, #448] ; a001135c /* * 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; a0011198: e59dc000 ldr ip, [sp] if ( last_byte > the_jnode->info.file.size ) a001119c: e3a03000 mov r3, #0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00111a0: e5986000 ldr r6, [r8] /* * 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; a00111a4: e087100c add r1, r7, ip if ( last_byte > the_jnode->info.file.size ) a00111a8: e1a02001 mov r2, r1 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00111ac: e1a05fc6 asr r5, r6, #31 /* * 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 ) a00111b0: e2891050 add r1, r9, #80 ; 0x50 a00111b4: e8910003 ldm r1, {r0, r1} a00111b8: e1500002 cmp r0, r2 a00111bc: e0d1e003 sbcs lr, r1, r3 my_length = the_jnode->info.file.size - start; a00111c0: b06c7000 rsblt r7, ip, r0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00111c4: e1a03005 mov r3, r5 a00111c8: e1a02006 mov r2, r6 a00111cc: e89d0003 ldm sp, {r0, r1} a00111d0: eb002dce bl a001c910 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a00111d4: e1a03005 mov r3, r5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00111d8: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a00111dc: e1a02006 mov r2, r6 a00111e0: e89d0003 ldm sp, {r0, r1} a00111e4: eb002c8e bl a001c424 <__divdi3> if ( start_offset ) { a00111e8: e35a0000 cmp sl, #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; a00111ec: e1a04000 mov r4, r0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; a00111f0: 059d5008 ldreq r5, [sp, #8] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { a00111f4: 1a000016 bne a0011254 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a00111f8: e1570006 cmp r7, r6 a00111fc: 2a000008 bcs a0011224 a0011200: ea000029 b a00112ac block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a0011204: e5931000 ldr r1, [r3] a0011208: eb0007db bl a001317c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a001120c: e5983000 ldr r3, [r8] block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; a0011210: e0855006 add r5, r5, r6 block++; a0011214: e2844001 add r4, r4, #1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0011218: e1530007 cmp r3, r7 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; copied += to_copy; a001121c: e08aa006 add sl, sl, r6 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0011220: 8a000021 bhi a00112ac block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0011224: e3a02000 mov r2, #0 a0011228: e1a01004 mov r1, r4 a001122c: e1a00009 mov r0, r9 a0011230: ebffff4b bl a0010f64 if ( !block_ptr ) a0011234: e2503000 subs r3, r0, #0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a0011238: e1a02006 mov r2, r6 dest += to_copy; block++; my_length -= to_copy; a001123c: e0667007 rsb r7, r6, r7 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a0011240: e1a00005 mov r0, r5 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) a0011244: 1affffee bne a0011204 IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; a0011248: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } a001124c: e28dd014 add sp, sp, #20 a0011250: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0011254: e1a00009 mov r0, r9 a0011258: e1a01004 mov r1, r4 a001125c: e3a02000 mov r2, #0 a0011260: ebffff3f bl a0010f64 if ( !block_ptr ) a0011264: e3500000 cmp r0, #0 a0011268: 0afffff7 beq a001124c return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); a001126c: e5901000 ldr r1, [r0] * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; a0011270: e06a6006 rsb r6, sl, r6 a0011274: e1570006 cmp r7, r6 a0011278: 31a0b007 movcc fp, r7 a001127c: 21a0b006 movcs fp, r6 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); a0011280: e081100a add r1, r1, sl a0011284: e59d0008 ldr r0, [sp, #8] a0011288: e1a0200b mov r2, fp a001128c: eb0007ba bl a001317c dest += to_copy; a0011290: e59dc008 ldr ip, [sp, #8] block++; a0011294: e2844001 add r4, r4, #1 my_length -= to_copy; a0011298: e06b7007 rsb r7, fp, r7 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); dest += to_copy; a001129c: e08c500b add r5, ip, fp block++; my_length -= to_copy; a00112a0: e5986000 ldr r6, [r8] copied += to_copy; a00112a4: e1a0a00b mov sl, fp a00112a8: eaffffd2 b a00111f8 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { a00112ac: e3570000 cmp r7, #0 a00112b0: 0a00000a beq a00112e0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a00112b4: e1a00009 mov r0, r9 a00112b8: e1a01004 mov r1, r4 a00112bc: e3a02000 mov r2, #0 a00112c0: ebffff27 bl a0010f64 if ( !block_ptr ) a00112c4: e2503000 subs r3, r0, #0 a00112c8: 0affffde beq a0011248 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); a00112cc: e1a00005 mov r0, r5 a00112d0: e5931000 ldr r1, [r3] a00112d4: e1a02007 mov r2, r7 a00112d8: eb0007a7 bl a001317c copied += my_length; a00112dc: e08aa007 add sl, sl, r7 } IMFS_update_atime( the_jnode ); a00112e0: e28d000c add r0, sp, #12 a00112e4: e3a01000 mov r1, #0 a00112e8: ebffd508 bl a0006710 a00112ec: e59d300c ldr r3, [sp, #12] return copied; a00112f0: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a00112f4: e5893040 str r3, [r9, #64] ; 0x40 return copied; a00112f8: eaffffd3 b a001124c if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) a00112fc: e1a02007 mov r2, r7 a0011300: e2895050 add r5, r9, #80 ; 0x50 a0011304: e8950030 ldm r5, {r4, r5} a0011308: e3a03000 mov r3, #0 a001130c: e89d0003 ldm sp, {r0, r1} a0011310: e0540000 subs r0, r4, r0 a0011314: e0c51001 sbc r1, r5, r1 a0011318: e1500002 cmp r0, r2 a001131c: e0d1c003 sbcs ip, r1, r3 my_length = the_jnode->info.linearfile.size - start; a0011320: b59de000 ldrlt lr, [sp] memcpy(dest, &file_ptr[start], my_length); a0011324: e59d3000 ldr r3, [sp] my_length = length; if ( IMFS_type( the_jnode ) == IMFS_LINEAR_FILE ) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; a0011328: e5991058 ldr r1, [r9, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; a001132c: b06e7004 rsblt r7, lr, r4 memcpy(dest, &file_ptr[start], my_length); a0011330: e1a02007 mov r2, r7 a0011334: e0811003 add r1, r1, r3 a0011338: e59d0008 ldr r0, [sp, #8] a001133c: eb00078e bl a001317c IMFS_update_atime( the_jnode ); a0011340: e28d000c add r0, sp, #12 a0011344: e3a01000 mov r1, #0 a0011348: ebffd4f0 bl a0006710 a001134c: e59d300c ldr r3, [sp, #12] return my_length; a0011350: e1a00007 mov r0, r7 if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); IMFS_update_atime( the_jnode ); a0011354: e5893040 str r3, [r9, #64] ; 0x40 return my_length; a0011358: eaffffbb b a001124c =============================================================================== a0011460 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a0011460: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; a0011464: e59f6134 ldr r6, [pc, #308] ; a00115a0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0011468: e5903058 ldr r3, [r0, #88] ; 0x58 * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a001146c: e1a0a000 mov sl, r0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; a0011470: e5967000 ldr r7, [r6] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0011474: 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; a0011478: e1a07127 lsr r7, r7, #2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a001147c: 0a000002 beq a001148c memfile_free_blocks_in_table( &info->indirect, to_free ); a0011480: e2800058 add r0, r0, #88 ; 0x58 <== NOT EXECUTED a0011484: e1a01007 mov r1, r7 <== NOT EXECUTED a0011488: ebffffdf bl a001140c <== NOT EXECUTED } if ( info->doubly_indirect ) { a001148c: e59a305c ldr r3, [sl, #92] ; 0x5c a0011490: e3530000 cmp r3, #0 a0011494: 0a000014 beq a00114ec for ( i=0 ; i <== NOT EXECUTED a00114a4: e3a00000 mov r0, #0 <== NOT EXECUTED a00114a8: e1a04000 mov r4, r0 <== NOT EXECUTED a00114ac: ea000000 b a00114b4 <== NOT EXECUTED a00114b0: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { a00114b4: e7932100 ldr r2, [r3, r0, lsl #2] <== NOT EXECUTED if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { memfile_free_blocks_in_table( a00114bc: e1a01007 mov r1, r7 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { a00114c0: e3520000 cmp r2, #0 <== NOT EXECUTED a00114c4: e0830100 add r0, r3, r0, lsl #2 <== NOT EXECUTED a00114c8: 0a000000 beq a00114d0 <== NOT EXECUTED memfile_free_blocks_in_table( a00114cc: ebffffce bl a001140c <== NOT EXECUTED if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); a00114e0: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED a00114e4: e1a01007 mov r1, r7 <== NOT EXECUTED a00114e8: ebffffc7 bl a001140c <== NOT EXECUTED } if ( info->triply_indirect ) { a00114ec: e59a0060 ldr r0, [sl, #96] ; 0x60 a00114f0: e3500000 cmp r0, #0 a00114f4: 0a000027 beq a0011598 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; a0011504: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0011508: e3550000 cmp r5, #0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; a001150c: 13a09000 movne r9, #0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0011510: 11a08009 movne r8, r9 <== NOT EXECUTED a0011514: 0a00001c beq a001158c <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED a0011520: e3a00000 mov r0, #0 <== NOT EXECUTED a0011524: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { a0011528: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; jtriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); a0011540: ebffffb1 bl a001140c <== 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 a0011554: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( a0011558: e0800009 add r0, r0, r9 <== NOT EXECUTED a001155c: e1a01007 mov r1, r7 <== NOT EXECUTED a0011560: ebffffa9 bl a001140c <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; a0011578: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED * a significant difference in the performance of this routine. * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( a001157c: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; a0011580: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0011584: e3550000 cmp r5, #0 <== NOT EXECUTED a0011588: 1affffe2 bne a0011518 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( a001158c: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED a0011590: e1a01007 mov r1, r7 <== NOT EXECUTED a0011594: ebffff9c bl a001140c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } a0011598: e1a0000a mov r0, sl a001159c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a00115a4 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { a00115a4: 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 ); a00115a8: e3a02000 mov r2, #0 <== NOT EXECUTED a00115ac: ebfffe6c bl a0010f64 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; a00115b0: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a00115b4: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; a00115b8: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; a00115bc: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); a00115c0: ebffff89 bl a00113ec <== NOT EXECUTED return 1; } a00115c4: e3a00001 mov r0, #1 <== NOT EXECUTED a00115c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0011774 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a0011774: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0011778: e24dd010 sub sp, sp, #16 a001177c: e59db034 ldr fp, [sp, #52] ; 0x34 a0011780: e88d0006 stm sp, {r1, r2} * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { a0011784: e2805050 add r5, r0, #80 ; 0x50 a0011788: e8950030 ldm r5, {r4, r5} /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; a001178c: e08b2001 add r2, fp, r1 if ( last_byte > the_jnode->info.file.size ) { a0011790: e1a06002 mov r6, r2 a0011794: e3a07000 mov r7, #0 a0011798: e1540006 cmp r4, r6 a001179c: e0d51007 sbcs r1, r5, r7 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a00117a0: e1a09000 mov r9, r0 a00117a4: e1a08003 mov r8, r3 * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { a00117a8: ba000050 blt a00118f0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00117ac: e59f7168 ldr r7, [pc, #360] ; a001191c a00117b0: e89d0003 ldm sp, {r0, r1} a00117b4: e5976000 ldr r6, [r7] a00117b8: e1a05fc6 asr r5, r6, #31 a00117bc: e1a03005 mov r3, r5 a00117c0: e1a02006 mov r2, r6 a00117c4: eb002c51 bl a001c910 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a00117c8: e1a03005 mov r3, r5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00117cc: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a00117d0: e1a02006 mov r2, r6 a00117d4: e89d0003 ldm sp, {r0, r1} a00117d8: eb002b11 bl a001c424 <__divdi3> if ( start_offset ) { a00117dc: e35a0000 cmp sl, #0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00117e0: e1a04006 mov r4, r6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a00117e4: e1a05000 mov r5, r0 if ( start_offset ) { a00117e8: 01a0400b moveq r4, fp a00117ec: 1a000016 bne a001184c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a00117f0: e1540006 cmp r4, r6 a00117f4: 2a000008 bcs a001181c a00117f8: ea000027 b a001189c 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 ); a00117fc: e5900000 ldr r0, [r0] a0011800: eb00065d bl a001317c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0011804: e5973000 ldr r3, [r7] 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 ); src += to_copy; a0011808: e0888006 add r8, r8, r6 block++; a001180c: e2855001 add r5, r5, #1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0011810: e1530004 cmp r3, r4 * IMFS_memfile_write * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( a0011814: e08aa006 add sl, sl, r6 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0011818: 8a00001f bhi a001189c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a001181c: e1a01005 mov r1, r5 a0011820: e3a02000 mov r2, #0 a0011824: e1a00009 mov r0, r9 a0011828: ebfffdcd bl a0010f64 if ( !block_ptr ) a001182c: e3500000 cmp r0, #0 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 ); a0011830: e1a01008 mov r1, r8 a0011834: e1a02006 mov r2, r6 src += to_copy; block++; my_length -= to_copy; a0011838: e0664004 rsb r4, r6, r4 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) a001183c: 1affffee bne a00117fc IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) a0011840: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } a0011844: e28dd010 add sp, sp, #16 a0011848: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a001184c: e1a00009 mov r0, r9 a0011850: e1a01005 mov r1, r5 a0011854: e3a02000 mov r2, #0 a0011858: ebfffdc1 bl a0010f64 if ( !block_ptr ) a001185c: e3500000 cmp r0, #0 a0011860: 0afffff7 beq a0011844 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a0011864: e5900000 ldr r0, [r0] * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; a0011868: e06a6006 rsb r6, sl, r6 a001186c: e156000b cmp r6, fp a0011870: 21a0600b movcs r6, fp block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a0011874: e080000a add r0, r0, sl a0011878: e1a01008 mov r1, r8 a001187c: e1a02006 mov r2, r6 a0011880: eb00063d bl a001317c src += to_copy; a0011884: e0888006 add r8, r8, r6 block++; my_length -= to_copy; a0011888: e066400b rsb r4, r6, fp copied += to_copy; a001188c: e1a0a006 mov sl, r6 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; a0011890: e2855001 add r5, r5, #1 my_length -= to_copy; copied += to_copy; a0011894: e5976000 ldr r6, [r7] a0011898: eaffffd4 b a00117f0 * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { a001189c: e3540000 cmp r4, #0 a00118a0: 0a00000a beq a00118d0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a00118a4: e1a00009 mov r0, r9 a00118a8: e1a01005 mov r1, r5 a00118ac: e3a02000 mov r2, #0 a00118b0: ebfffdab bl a0010f64 if ( !block_ptr ) a00118b4: e3500000 cmp r0, #0 a00118b8: 0affffe0 beq a0011840 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 ); a00118bc: e5900000 ldr r0, [r0] a00118c0: e1a01008 mov r1, r8 a00118c4: e1a02004 mov r2, r4 a00118c8: eb00062b bl a001317c my_length = 0; copied += to_copy; a00118cc: e08aa004 add sl, sl, r4 } IMFS_mtime_ctime_update( the_jnode ); a00118d0: e28d0008 add r0, sp, #8 a00118d4: e3a01000 mov r1, #0 a00118d8: ebffd38c bl a0006710 a00118dc: e59d3008 ldr r3, [sp, #8] return copied; a00118e0: e1a0000a mov r0, sl memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); a00118e4: e5893044 str r3, [r9, #68] ; 0x44 a00118e8: e5893048 str r3, [r9, #72] ; 0x48 return copied; a00118ec: eaffffd4 b a0011844 last_byte = start + my_length; if ( last_byte > the_jnode->info.file.size ) { bool zero_fill = start > the_jnode->info.file.size; status = IMFS_memfile_extend( the_jnode, zero_fill, last_byte ); a00118f0: e89d000c ldm sp, {r2, r3} a00118f4: e1540002 cmp r4, r2 a00118f8: e0d53003 sbcs r3, r5, r3 a00118fc: a3a01000 movge r1, #0 a0011900: b3a01001 movlt r1, #1 a0011904: e1a02006 mov r2, r6 a0011908: e1a03007 mov r3, r7 a001190c: ebffff2e bl a00115cc if ( status ) a0011910: e3500000 cmp r0, #0 a0011914: 0affffa4 beq a00117ac a0011918: eaffffc9 b a0011844 =============================================================================== a0005fc8 : #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; a0005fc8: e5903020 ldr r3, [r0, #32] #endif #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0005fcc: e52de004 push {lr} ; (str lr, [sp, #-4]!) int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; a0005fd0: e5933008 ldr r3, [r3, #8] return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; a0005fd4: e593204c ldr r2, [r3, #76] ; 0x4c if ( IMFS_is_directory( node ) ) { a0005fd8: e5922000 ldr r2, [r2] a0005fdc: e3520000 cmp r2, #0 a0005fe0: 1a000009 bne a000600c if ( node->info.directory.mt_fs == NULL ) { a0005fe4: e593205c ldr r2, [r3, #92] ; 0x5c a0005fe8: e3520000 cmp r2, #0 node->info.directory.mt_fs = mt_entry; a0005fec: 0583005c streq r0, [r3, #92] ; 0x5c #include "imfs.h" int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; a0005ff0: 01a00002 moveq r0, r2 IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == NULL ) { a0005ff4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) node->info.directory.mt_fs = mt_entry; } else { errno = EBUSY; a0005ff8: eb003225 bl a0012894 <__errno> <== NOT EXECUTED a0005ffc: e3a03010 mov r3, #16 <== NOT EXECUTED a0006000: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; a0006004: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006008: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED } } else { errno = ENOTDIR; a000600c: eb003220 bl a0012894 <__errno> a0006010: e3a03014 mov r3, #20 a0006014: e5803000 str r3, [r0] rv = -1; a0006018: e3e00000 mvn r0, #0 } return rv; } a000601c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a000ebc8 : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { a000ebc8: e5902050 ldr r2, [r0, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000ebcc: e2803054 add r3, r0, #84 ; 0x54 } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { a000ebd0: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { a000ebd4: e1520003 cmp r2, r3 a000ebd8: 1a000007 bne a000ebfc errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { a000ebdc: e590305c ldr r3, [r0, #92] ; 0x5c a000ebe0: e3530000 cmp r3, #0 a000ebe4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) errno = EBUSY; a000ebe8: eb000f29 bl a0012894 <__errno> <== NOT EXECUTED a000ebec: e3a03010 mov r3, #16 <== NOT EXECUTED a000ebf0: e5803000 str r3, [r0] <== NOT EXECUTED a000ebf4: e3a00000 mov r0, #0 <== NOT EXECUTED node = NULL; } return node; } a000ebf8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { errno = ENOTEMPTY; a000ebfc: eb000f24 bl a0012894 <__errno> <== NOT EXECUTED a000ec00: e3a0305a mov r3, #90 ; 0x5a <== NOT EXECUTED a000ec04: e5803000 str r3, [r0] <== NOT EXECUTED node = NULL; a000ec08: e3a00000 mov r0, #0 <== NOT EXECUTED a000ec0c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0006020 : rtems_filesystem_node_types_t IMFS_node_type( const rtems_filesystem_location_info_t *loc ) { const IMFS_jnode_t *node = loc->node_access; a0006020: e5903008 ldr r3, [r0, #8] rtems_chain_extract_unprotected( &node->Node ); } static inline IMFS_jnode_types_t IMFS_type( const IMFS_jnode_t *node ) { return node->control->imfs_type; a0006024: e593204c ldr r2, [r3, #76] ; 0x4c a0006028: e5920000 ldr r0, [r2] IMFS_jnode_types_t imfs_type = IMFS_type( node ); rtems_filesystem_node_types_t type; switch ( imfs_type ) { a000602c: e3500002 cmp r0, #2 a0006030: 0a000002 beq a0006040 a0006034: e3500005 cmp r0, #5 a0006038: 03a00004 moveq r0, #4 a000603c: e12fff1e bx lr a0006040: e5933050 ldr r3, [r3, #80] ; 0x50 <== NOT EXECUTED a0006044: e593304c ldr r3, [r3, #76] ; 0x4c <== NOT EXECUTED a0006048: e5930000 ldr r0, [r3] <== NOT EXECUTED type = imfs_type; break; } return type; } a000604c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a00060b0 : const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { a00060b0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED int rv = 0; IMFS_jnode_t *node = oldloc->node_access; a00060b4: e5914008 ldr r4, [r1, #8] <== NOT EXECUTED const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { a00060b8: e24dd008 sub sp, sp, #8 <== NOT EXECUTED a00060bc: e59d601c ldr r6, [sp, #28] <== NOT EXECUTED /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { a00060c0: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED size_t namelen ) { int rv = 0; IMFS_jnode_t *node = oldloc->node_access; IMFS_jnode_t *new_parent = newparentloc->node_access; a00060c4: e5925008 ldr r5, [r2, #8] <== NOT EXECUTED /* * FIXME: Due to insufficient checks we can create inaccessible nodes with * this operation. */ if ( node->Parent != NULL ) { a00060c8: e3500000 cmp r0, #0 <== NOT EXECUTED a00060cc: 0a000020 beq a0006154 <== NOT EXECUTED if ( namelen < IMFS_NAME_MAX ) { a00060d0: e356001f cmp r6, #31 <== NOT EXECUTED a00060d4: 8a000019 bhi a0006140 <== NOT EXECUTED memcpy( node->name, name, namelen ); a00060d8: e1a01003 mov r1, r3 <== NOT EXECUTED a00060dc: e1a02006 mov r2, r6 <== NOT EXECUTED node->name [namelen] = '\0'; a00060e0: e3a07000 mov r7, #0 <== NOT EXECUTED * this operation. */ if ( node->Parent != NULL ) { if ( namelen < IMFS_NAME_MAX ) { memcpy( node->name, name, namelen ); a00060e4: e284000c add r0, r4, #12 <== NOT EXECUTED node->name [namelen] = '\0'; a00060e8: e0846006 add r6, r4, r6 <== NOT EXECUTED * this operation. */ if ( node->Parent != NULL ) { if ( namelen < IMFS_NAME_MAX ) { memcpy( node->name, name, namelen ); a00060ec: eb003422 bl a001317c <== NOT EXECUTED node->name [namelen] = '\0'; a00060f0: e5c6700c strb r7, [r6, #12] <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; a00060f4: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; a00060f8: e594c000 ldr ip, [r4] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); a00060fc: e2852054 add r2, r5, #84 ; 0x54 <== NOT EXECUTED IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); a0006100: e1a0000d mov r0, sp <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; a0006104: e58c1004 str r1, [ip, #4] <== NOT EXECUTED Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; a0006108: e5953058 ldr r3, [r5, #88] ; 0x58 <== NOT EXECUTED Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; a000610c: e581c000 str ip, [r1] <== NOT EXECUTED static inline void IMFS_add_to_directory( IMFS_jnode_t *dir, IMFS_jnode_t *node ) { node->Parent = dir; a0006110: e5845008 str r5, [r4, #8] <== NOT EXECUTED ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; a0006114: e5842000 str r2, [r4] <== NOT EXECUTED tail->previous = the_node; a0006118: e5854058 str r4, [r5, #88] ; 0x58 <== NOT EXECUTED old_last->next = the_node; a000611c: e5834000 str r4, [r3] <== NOT EXECUTED the_node->previous = old_last; a0006120: e5843004 str r3, [r4, #4] <== NOT EXECUTED a0006124: e1a01007 mov r1, r7 <== NOT EXECUTED a0006128: eb000178 bl a0006710 <== NOT EXECUTED a000612c: e59d3000 ldr r3, [sp] <== NOT EXECUTED const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) { int rv = 0; a0006130: e1a00007 mov r0, r7 <== NOT EXECUTED memcpy( node->name, name, namelen ); node->name [namelen] = '\0'; IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); a0006134: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED errno = EINVAL; rv = -1; } return rv; } a0006138: e28dd008 add sp, sp, #8 <== NOT EXECUTED a000613c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED IMFS_remove_from_directory( node ); IMFS_add_to_directory( new_parent, node ); IMFS_update_ctime( node ); } else { errno = ENAMETOOLONG; a0006140: eb0031d3 bl a0012894 <__errno> <== NOT EXECUTED a0006144: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a0006148: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; a000614c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006150: eafffff8 b a0006138 <== NOT EXECUTED } } else { errno = EINVAL; a0006154: eb0031ce bl a0012894 <__errno> <== NOT EXECUTED a0006158: e3a03016 mov r3, #22 <== NOT EXECUTED a000615c: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; a0006160: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006164: eafffff3 b a0006138 <== NOT EXECUTED =============================================================================== a0006168 : const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc ) { int rv = 0; IMFS_jnode_t *node = loc->node_access; a0006168: e5910008 ldr r0, [r1, #8] int IMFS_rmnod( const rtems_filesystem_location_info_t *parentloc, const rtems_filesystem_location_info_t *loc ) { a000616c: e52de004 push {lr} ; (str lr, [sp, #-4]!) int rv = 0; IMFS_jnode_t *node = loc->node_access; node = (*node->control->node_remove)( node ); a0006170: e590304c ldr r3, [r0, #76] ; 0x4c a0006174: e593300c ldr r3, [r3, #12] a0006178: e12fff33 blx r3 if ( node != NULL ) { a000617c: e2503000 subs r3, r0, #0 a0006180: 0a00000f beq a00061c4 --node->reference_count; a0006184: e1d313b4 ldrh r1, [r3, #52] ; 0x34 --node->st_nlink; a0006188: e1d323b6 ldrh r2, [r3, #54] ; 0x36 if ( node->Parent != NULL ) { a000618c: e5930008 ldr r0, [r3, #8] int rv = 0; IMFS_jnode_t *node = loc->node_access; node = (*node->control->node_remove)( node ); if ( node != NULL ) { --node->reference_count; a0006190: e2411001 sub r1, r1, #1 --node->st_nlink; a0006194: e2422001 sub r2, r2, #1 if ( node->Parent != NULL ) { a0006198: e3500000 cmp r0, #0 int rv = 0; IMFS_jnode_t *node = loc->node_access; node = (*node->control->node_remove)( node ); if ( node != NULL ) { --node->reference_count; a000619c: e1c313b4 strh r1, [r3, #52] ; 0x34 --node->st_nlink; a00061a0: e1c323b6 strh r2, [r3, #54] ; 0x36 if ( node->Parent != NULL ) { a00061a4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; a00061a8: e5931000 ldr r1, [r3] previous = the_node->previous; a00061ac: e5932004 ldr r2, [r3, #4] } static inline void IMFS_remove_from_directory( IMFS_jnode_t *node ) { IMFS_assert( node->Parent != NULL ); node->Parent = NULL; a00061b0: e3a00000 mov r0, #0 a00061b4: e5830008 str r0, [r3, #8] next->previous = previous; a00061b8: e5812004 str r2, [r1, #4] previous->next = next; a00061bc: e5821000 str r1, [r2] a00061c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) IMFS_remove_from_directory( node ); } } else { rv = -1; a00061c4: e3e00000 mvn r0, #0 <== NOT EXECUTED } return rv; } a00061c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a00061cc : const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target ) { a00061cc: e92d4070 push {r4, r5, r6, lr} a00061d0: e1a04000 mov r4, r0 a00061d4: e24dd01c sub sp, sp, #28 IMFS_jnode_t *new_node; /* * Duplicate link name */ info.sym_link.name = strdup(target); a00061d8: e1a00003 mov r0, r3 const rtems_filesystem_location_info_t *parentloc, const char *name, size_t namelen, const char *target ) { a00061dc: e1a06001 mov r6, r1 a00061e0: e1a05002 mov r5, r2 IMFS_jnode_t *new_node; /* * Duplicate link name */ info.sym_link.name = strdup(target); a00061e4: eb0035ce bl a0013924 if (info.sym_link.name == NULL) { a00061e8: e3500000 cmp r0, #0 IMFS_jnode_t *new_node; /* * Duplicate link name */ info.sym_link.name = strdup(target); a00061ec: e58d0008 str r0, [sp, #8] if (info.sym_link.name == NULL) { a00061f0: 0a000012 beq a0006240 size_t namelen, mode_t mode, const IMFS_types_union *info ) { const IMFS_fs_info_t *fs_info = a00061f4: e5943014 ldr r3, [r4, #20] (const IMFS_fs_info_t *) parentloc->mt_entry->fs_info; return IMFS_create_node_with_control( a00061f8: e3a0cca2 mov ip, #41472 ; 0xa200 a00061fc: e24cc001 sub ip, ip, #1 a0006200: e5933008 ldr r3, [r3, #8] a0006204: e1a00004 mov r0, r4 a0006208: e1a02006 mov r2, r6 a000620c: e5931014 ldr r1, [r3, #20] a0006210: e58dc000 str ip, [sp] a0006214: e1a03005 mov r3, r5 a0006218: e28dc008 add ip, sp, #8 a000621c: e58dc004 str ip, [sp, #4] a0006220: eb002154 bl a000e778 namelen, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a0006224: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; a0006228: 13a00000 movne r0, #0 namelen, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a000622c: 0a000001 beq a0006238 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } a0006230: e28dd01c add sp, sp, #28 a0006234: e8bd8070 pop {r4, r5, r6, pc} ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); a0006238: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED a000623c: eb0000fe bl a000663c <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); a0006240: eb003193 bl a0012894 <__errno> <== NOT EXECUTED a0006244: e3a0300c mov r3, #12 <== NOT EXECUTED a0006248: e5803000 str r3, [r0] <== NOT EXECUTED a000624c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006250: eafffff6 b a0006230 <== NOT EXECUTED =============================================================================== a0006254 : #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; a0006254: e5903020 ldr r3, [r0, #32] #endif #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0006258: e52de004 push {lr} ; (str lr, [sp, #-4]!) int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; a000625c: e5933008 ldr r3, [r3, #8] return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; a0006260: e593204c ldr r2, [r3, #76] ; 0x4c if ( IMFS_is_directory( node ) ) { a0006264: e5922000 ldr r2, [r2] a0006268: e3520000 cmp r2, #0 a000626c: 1a000009 bne a0006298 if ( node->info.directory.mt_fs == mt_entry ) { a0006270: e593105c ldr r1, [r3, #92] ; 0x5c a0006274: e1510000 cmp r1, r0 node->info.directory.mt_fs = NULL; a0006278: 0583205c streq r2, [r3, #92] ; 0x5c #include "imfs.h" int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; a000627c: 01a00002 moveq r0, r2 IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access; if ( IMFS_is_directory( node ) ) { if ( node->info.directory.mt_fs == mt_entry ) { a0006280: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) node->info.directory.mt_fs = NULL; } else { errno = EINVAL; a0006284: eb003182 bl a0012894 <__errno> <== NOT EXECUTED a0006288: e3a03016 mov r3, #22 <== NOT EXECUTED a000628c: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; a0006290: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006294: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED } } else { errno = ENOTDIR; a0006298: eb00317d bl a0012894 <__errno> <== NOT EXECUTED a000629c: e3a03014 mov r3, #20 <== NOT EXECUTED a00062a0: e5803000 str r3, [r0] <== NOT EXECUTED rv = -1; a00062a4: e3e00000 mvn r0, #0 <== NOT EXECUTED } return rv; } a00062a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a00062ac : int IMFS_utime( const rtems_filesystem_location_info_t *loc, time_t actime, time_t modtime ) { a00062ac: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; a00062b0: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; the_jnode->stat_ctime = time( NULL ); a00062b4: e3a00000 mov r0, #0 <== NOT EXECUTED { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) loc->node_access; the_jnode->stat_atime = actime; a00062b8: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_jnode->stat_mtime = modtime; a00062bc: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED the_jnode->stat_ctime = time( NULL ); a00062c0: eb003797 bl a0014124