=============================================================================== a000e594 : const char *name, size_t namelen, mode_t mode, const IMFS_types_union *info ) { a000e594: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { a000e598: e3530020 cmp r3, #32 const char *name, size_t namelen, mode_t mode, const IMFS_types_union *info ) { a000e59c: e24dd008 sub sp, sp, #8 a000e5a0: e1a05003 mov r5, r3 a000e5a4: e1a06000 mov r6, r0 a000e5a8: e1a07001 mov r7, r1 a000e5ac: e1a08002 mov r8, r2 IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { a000e5b0: 8a000024 bhi a000e648 errno = ENAMETOOLONG; return NULL; } gettimeofday( &tv, 0 ); a000e5b4: e3a01000 mov r1, #0 a000e5b8: e1a0000d mov r0, sp a000e5bc: ebffe053 bl a0006710 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); a000e5c0: e3a00001 mov r0, #1 a000e5c4: e3a01064 mov r1, #100 ; 0x64 a000e5c8: ebffdf7d bl a00063c4 if ( !node ) { a000e5cc: e2504000 subs r4, r0, #0 a000e5d0: 0a000021 beq a000e65c } /* * Fill in the basic information */ node->reference_count = 1; a000e5d4: e3a03001 mov r3, #1 node->st_nlink = 1; memcpy( node->name, name, namelen ); a000e5d8: e1a02005 mov r2, r5 a000e5dc: e1a01008 mov r1, r8 } /* * Fill in the basic information */ node->reference_count = 1; a000e5e0: e1c433b4 strh r3, [r4, #52] ; 0x34 node->st_nlink = 1; a000e5e4: e1c433b6 strh r3, [r4, #54] ; 0x36 memcpy( node->name, name, namelen ); a000e5e8: e284000c add r0, r4, #12 a000e5ec: eb000f49 bl a0012318 node->name [namelen] = '\0'; a000e5f0: e0845005 add r5, r4, r5 a000e5f4: e3a01000 mov r1, #0 a000e5f8: e5c5100c strb r1, [r5, #12] */ 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; a000e5fc: e5962004 ldr r2, [r6, #4] /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; a000e600: e59d3000 ldr r3, [sp] node->control = node_control; /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; a000e604: e59d0020 ldr r0, [sp, #32] */ 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; a000e608: e2822001 add r2, r2, #1 node->st_mode = mode; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; a000e60c: e1c413bc strh r1, [r4, #60] ; 0x3c node->control = node_control; /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; a000e610: e5840030 str r0, [r4, #48] ; 0x30 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); #else node->st_uid = 0; node->st_gid = 0; a000e614: e1c413be strh r1, [r4, #62] ; 0x3e /* * Now set all the times. */ node->stat_atime = (time_t) tv.tv_sec; a000e618: e5843040 str r3, [r4, #64] ; 0x40 node->stat_mtime = (time_t) tv.tv_sec; a000e61c: e5843044 str r3, [r4, #68] ; 0x44 node->stat_ctime = (time_t) tv.tv_sec; a000e620: e5843048 str r3, [r4, #72] ; 0x48 */ node->reference_count = 1; node->st_nlink = 1; memcpy( node->name, name, namelen ); node->name [namelen] = '\0'; node->control = node_control; a000e624: e584704c str r7, [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; return (*node->control->node_initialize)( node, info ); a000e628: e5973008 ldr r3, [r7, #8] a000e62c: e1a00004 mov r0, r4 */ 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; a000e630: e5862004 str r2, [r6, #4] return (*node->control->node_initialize)( node, info ); a000e634: 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; a000e638: e5842038 str r2, [r4, #56] ; 0x38 return (*node->control->node_initialize)( node, info ); a000e63c: e12fff33 blx r3 } a000e640: e28dd008 add sp, sp, #8 a000e644: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} { IMFS_jnode_t *node; struct timeval tv; if ( namelen > IMFS_NAME_MAX ) { errno = ENAMETOOLONG; a000e648: eb000cf8 bl a0011a30 <__errno> <== NOT EXECUTED a000e64c: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000e650: e5803000 str r3, [r0] <== NOT EXECUTED return NULL; a000e654: e3a00000 mov r0, #0 <== NOT EXECUTED a000e658: eafffff8 b a000e640 <== NOT EXECUTED /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); if ( !node ) { errno = ENOMEM; a000e65c: eb000cf3 bl a0011a30 <__errno> a000e660: e3a0300c mov r3, #12 a000e664: e5803000 str r3, [r0] return NULL; a000e668: e1a00004 mov r0, r4 a000e66c: eafffff3 b a000e640 =============================================================================== 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: eb00386d bl a00168f0 !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: eb003556 bl a0015cac 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: eb003855 bl a00168f0 <== 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: eb003847 bl a00168f0 <== 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: eb0034d3 bl a0015b58 default: fprintf(stdout, " bad type %d\n", IMFS_type( the_jnode ) ); return; } puts(""); a0008808: e59f0074 ldr r0, [pc, #116] ; a0008884 a000880c: eb003c24 bl a00178a4 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: eb0034ec bl a0015bd8 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: eb0034c7 bl a0015b58 <== 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: eb0034c0 bl a0015b58 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: eb0034ba bl a0015b58 <== NOT EXECUTED a000886c: eaffffe5 b a0008808 <== NOT EXECUTED =============================================================================== a000e8c4 : int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { a000e8c4: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; a000e8c8: e5904008 ldr r4, [r0, #8] <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a000e8cc: e1a02a01 lsl r2, r1, #20 <== NOT EXECUTED int IMFS_fchmod( const rtems_filesystem_location_info_t *loc, mode_t mode ) { a000e8d0: e24dd008 sub sp, sp, #8 <== 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); a000e8d4: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); a000e8d8: e1a0000d mov r0, sp <== NOT EXECUTED a000e8dc: e3a01000 mov r1, #0 <== 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); a000e8e0: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED a000e8e4: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a000e8e8: e1833a22 orr r3, r3, r2, lsr #20 <== NOT EXECUTED a000e8ec: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); a000e8f0: ebffdf86 bl a0006710 <== NOT EXECUTED a000e8f4: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } a000e8f8: e3a00000 mov r0, #0 <== 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 ); a000e8fc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a000e900: e28dd008 add sp, sp, #8 <== NOT EXECUTED a000e904: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0006a04 : static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { a0006a04: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { a0006a08: e59f0068 ldr r0, [pc, #104] ; a0006a78 static int IMFS_fifo_ioctl( rtems_libio_t *iop, ioctl_command_t command, void *buffer ) { a0006a0c: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { a0006a10: e1510000 cmp r1, r0 a0006a14: 0a000007 beq a0006a38 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); a0006a18: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED a0006a1c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED a0006a20: eb002a86 bl a0011440 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a0006a24: e2502000 subs r2, r0, #0 <== NOT EXECUTED a0006a28: b2624000 rsblt r4, r2, #0 <== NOT EXECUTED a0006a2c: ba00000d blt a0006a68 <== NOT EXECUTED } a0006a30: e1a00002 mov r0, r2 a0006a34: e8bd8010 pop {r4, pc} ) { int err; if (command == FIONBIO) { if (buffer == NULL) a0006a38: e3520000 cmp r2, #0 a0006a3c: 0a000008 beq a0006a64 err = -EFAULT; else { if (*(int *)buffer) a0006a40: e5922000 ldr r2, [r2] iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006a44: e593100c ldr r1, [r3, #12] if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) a0006a48: e3520000 cmp r2, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; a0006a4c: 13a02000 movne r2, #0 a0006a50: 13811001 orrne r1, r1, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0006a54: 03c11001 biceq r1, r1, #1 a0006a58: e583100c str r1, [r3, #12] } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } a0006a5c: e1a00002 mov r0, r2 a0006a60: e8bd8010 pop {r4, pc} ) { int err; if (command == FIONBIO) { if (buffer == NULL) a0006a64: e3a0400e mov r4, #14 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); a0006a68: eb0032bc bl a0013560 <__errno> a0006a6c: e3e02000 mvn r2, #0 a0006a70: e5804000 str r4, [r0] a0006a74: eaffffed b a0006a30 =============================================================================== a000e908 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) void IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000e908: 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; a000e90c: 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 ) { a000e910: 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; a000e914: e1a0c00d mov ip, sp a000e918: e1a04005 mov r4, r5 a000e91c: e8b4000f ldm r4!, {r0, r1, r2, r3} a000e920: e8ac000f stmia ip!, {r0, r1, r2, r3} a000e924: 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; a000e928: 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; a000e92c: e5940000 ldr r0, [r4] jnode = (IMFS_jnode_t *)loc.node_access; a000e930: 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; a000e934: 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; a000e938: 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; a000e93c: 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; a000e940: 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; a000e944: e5851008 str r1, [r5, #8] a000e948: 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 ) ) { a000e94c: e3520000 cmp r2, #0 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; a000e950: e5964008 ldr r4, [r6, #8] loc.node_access = (void *)jnode; a000e954: e58d6008 str r6, [sp, #8] a000e958: e58d3010 str r3, [sp, #16] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { a000e95c: 1a000018 bne a000e9c4 a000e960: 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 ); a000e964: e2863054 add r3, r6, #84 ; 0x54 a000e968: e1520003 cmp r2, r3 a000e96c: 0a000014 beq a000e9c4 if ( result != 0 ) rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); jnode = next; } if ( jnode != NULL ) { a000e970: e3560000 cmp r6, #0 a000e974: 0a00001c beq a000e9ec return node->control->imfs_type; } static inline bool IMFS_is_directory( const IMFS_jnode_t *node ) { return node->control->imfs_type == IMFS_DIRECTORY; a000e978: e596304c ldr r3, [r6, #76] ; 0x4c a000e97c: e5932000 ldr r2, [r3] if ( IMFS_is_directory( jnode ) ) { a000e980: e3520000 cmp r2, #0 a000e984: 1affffef bne a000e948 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000e988: 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 ); a000e98c: e2860054 add r0, r6, #84 ; 0x54 if ( jnode_has_children( jnode ) ) a000e990: e1510000 cmp r1, r0 a000e994: 0affffeb beq a000e948 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a000e998: e3510000 cmp r1, #0 a000e99c: 0a000012 beq a000e9ec a000e9a0: e591304c ldr r3, [r1, #76] ; 0x4c a000e9a4: e1a06001 mov r6, r1 */ temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; a000e9a8: e5964008 ldr r4, [r6, #8] if ( IMFS_is_directory( jnode ) ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a000e9ac: 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; a000e9b0: e5933004 ldr r3, [r3, #4] temp_mt_entry->mt_fs_root->location.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; a000e9b4: e58d6008 str r6, [sp, #8] IMFS_Set_handlers( &loc ); if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) { a000e9b8: e3520000 cmp r2, #0 a000e9bc: e58d3010 str r3, [sp, #16] a000e9c0: 0affffe6 beq a000e960 result = IMFS_rmnod( NULL, &loc ); a000e9c4: e3a00000 mov r0, #0 a000e9c8: e1a0100d mov r1, sp a000e9cc: ebffdde5 bl a0006168 if ( result != 0 ) a000e9d0: e3500000 cmp r0, #0 a000e9d4: 1a000006 bne a000e9f4 rtems_fatal_error_occurred( 0xdeadbeef ); IMFS_node_destroy( jnode ); a000e9d8: e1a00006 mov r0, r6 jnode = next; a000e9dc: 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 ); a000e9e0: ebffdd0e bl a0005e20 jnode = next; } if ( jnode != NULL ) { a000e9e4: e3560000 cmp r6, #0 a000e9e8: 1affffe2 bne a000e978 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); } a000e9ec: e28dd018 add sp, sp, #24 a000e9f0: 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 ); a000e9f4: e59f0000 ldr r0, [pc] ; a000e9fc <== NOT EXECUTED a000e9f8: ebfff136 bl a000aed8 <== 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: eb003174 bl a0012318 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: eb002209 bl a000e594 "", 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: eb002f11 bl a0011a30 <__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: eb0021f6 bl a000e670 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: eb002ed5 bl a0011a30 <__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: eb002ed0 bl a0011a30 <__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: eb003adb bl a00163c8 <__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: eb002d4c bl a0012e04 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 =============================================================================== a00109f8 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { a00109f8: 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 ); a00109fc: e3a02001 mov r2, #1 a0010a00: ebfffeeb bl a00105b4 if ( *block_entry_ptr ) a0010a04: 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 ); a0010a08: e1a05000 mov r5, r0 if ( *block_entry_ptr ) a0010a0c: e3540000 cmp r4, #0 a0010a10: 0a000001 beq a0010a1c return 0; a0010a14: e3a00000 mov r0, #0 a0010a18: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); a0010a1c: ebfffed7 bl a0010580 if ( !memory ) a0010a20: e3500000 cmp r0, #0 a0010a24: 0a000002 beq a0010a34 return 1; *block_entry_ptr = memory; a0010a28: e5850000 str r0, [r5] return 0; a0010a2c: e1a00004 mov r0, r4 a0010a30: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; a0010a34: e3a00001 mov r0, #1 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } a0010a38: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a0010c1c : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { a0010c1c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0010c20: e24dd018 sub sp, sp, #24 a0010c24: 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 ) a0010c28: e59f2190 ldr r2, [pc, #400] ; a0010dc0 a0010c2c: e3a05000 mov r5, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { a0010c30: 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 ) a0010c34: e5928000 ldr r8, [r2] MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, bool zero_fill, off_t new_length ) { a0010c38: 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 ) a0010c3c: e1a03128 lsr r3, r8, #2 a0010c40: e0223393 mla r2, r3, r3, r3 a0010c44: e0233392 mla r3, r2, r3, r3 a0010c48: e89d0006 ldm sp, {r1, r2} a0010c4c: e2433001 sub r3, r3, #1 a0010c50: e0030398 mul r3, r8, r3 a0010c54: e1a04003 mov r4, r3 a0010c58: e1510004 cmp r1, r4 a0010c5c: e0d22005 sbcs r2, r2, r5 a0010c60: aa000051 bge a0010dac 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 ) a0010c64: e2804050 add r4, r0, #80 ; 0x50 a0010c68: e8940018 ldm r4, {r3, r4} a0010c6c: e89d0006 ldm sp, {r1, r2} a0010c70: e1530001 cmp r3, r1 a0010c74: e0d42002 sbcs r2, r4, r2 a0010c78: e58d3008 str r3, [sp, #8] a0010c7c: e58d400c str r4, [sp, #12] return 0; a0010c80: 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 ) a0010c84: aa00003b bge a0010d78 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010c88: e1a05fc8 asr r5, r8, #31 a0010c8c: e1a02008 mov r2, r8 a0010c90: e1a03005 mov r3, r5 a0010c94: e89d0003 ldm sp, {r0, r1} a0010c98: eb002a48 bl a001b5c0 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010c9c: e1a02008 mov r2, r8 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010ca0: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010ca4: e1a03005 mov r3, r5 a0010ca8: e28d1008 add r1, sp, #8 a0010cac: e8910003 ldm r1, {r0, r1} a0010cb0: eb002a42 bl a001b5c0 <__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++ ) { a0010cb4: e15a0000 cmp sl, r0 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010cb8: e1a04008 mov r4, r8 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010cbc: 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++ ) { a0010cc0: 3a00001e bcc a0010d40 /* * 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; a0010cc4: e0080890 mul r8, r0, r8 a0010cc8: e59d3008 ldr r3, [sp, #8] a0010ccc: e1a04000 mov r4, r0 a0010cd0: e0688003 rsb r8, r8, r3 a0010cd4: ea000002 b a0010ce4 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a0010cd8: e2844001 add r4, r4, #1 a0010cdc: e15a0004 cmp sl, r4 a0010ce0: 3a000016 bcc a0010d40 if ( !IMFS_memfile_addblock( the_jnode, block ) ) { a0010ce4: e1a01004 mov r1, r4 a0010ce8: e1a00006 mov r0, r6 a0010cec: ebffff41 bl a00109f8 a0010cf0: e2505000 subs r5, r0, #0 a0010cf4: 1a000025 bne a0010d90 if ( zero_fill ) { a0010cf8: e3590000 cmp r9, #0 a0010cfc: 0afffff5 beq a0010cd8 size_t count = IMFS_MEMFILE_BYTES_PER_BLOCK - offset; a0010d00: e59f10b8 ldr r1, [pc, #184] ; a0010dc0 <== NOT EXECUTED block_p *block_ptr = a0010d04: e1a02005 mov r2, r5 <== NOT EXECUTED a0010d08: 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; a0010d0c: e5917000 ldr r7, [r1] <== NOT EXECUTED block_p *block_ptr = a0010d10: e1a01004 mov r1, r4 <== NOT EXECUTED a0010d14: ebfffe26 bl a00105b4 <== NOT EXECUTED IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); memset( &(*block_ptr) [offset], 0, count); a0010d18: 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; a0010d1c: 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); a0010d20: e1a01005 mov r1, r5 <== NOT EXECUTED a0010d24: e0800008 add r0, r0, r8 <== NOT EXECUTED a0010d28: 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++ ) { a0010d2c: 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); a0010d30: eb0005ae bl a00123f0 <== 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++ ) { a0010d34: 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; a0010d38: 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++ ) { a0010d3c: 2affffe8 bcs a0010ce4 <== NOT EXECUTED } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a0010d40: e89d000c ldm sp, {r2, r3} IMFS_update_ctime(the_jnode); a0010d44: e3a01000 mov r1, #0 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a0010d48: e5862050 str r2, [r6, #80] ; 0x50 a0010d4c: e5863054 str r3, [r6, #84] ; 0x54 IMFS_update_ctime(the_jnode); a0010d50: e28d0010 add r0, sp, #16 a0010d54: ebffd66d bl a0006710 a0010d58: e59d3010 ldr r3, [sp, #16] IMFS_update_mtime(the_jnode); a0010d5c: e28d0010 add r0, sp, #16 a0010d60: e3a01000 mov r1, #0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; IMFS_update_ctime(the_jnode); a0010d64: e5863048 str r3, [r6, #72] ; 0x48 IMFS_update_mtime(the_jnode); a0010d68: ebffd668 bl a0006710 a0010d6c: e59d3010 ldr r3, [sp, #16] return 0; a0010d70: 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); a0010d74: e5863044 str r3, [r6, #68] ; 0x44 return 0; } a0010d78: e28dd018 add sp, sp, #24 a0010d7c: 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 ); a0010d80: e1a01004 mov r1, r4 <== NOT EXECUTED a0010d84: e1a00006 mov r0, r6 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { a0010d88: e2444001 sub r4, r4, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); a0010d8c: ebffff98 bl a0010bf4 <== NOT EXECUTED memset( &(*block_ptr) [offset], 0, count); offset = 0; } } else { for ( ; block>=old_blocks ; block-- ) { a0010d90: e15b0004 cmp fp, r4 <== NOT EXECUTED a0010d94: 9afffff9 bls a0010d80 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); a0010d98: eb000324 bl a0011a30 <__errno> <== NOT EXECUTED a0010d9c: e3a0301c mov r3, #28 <== NOT EXECUTED a0010da0: e5803000 str r3, [r0] <== NOT EXECUTED a0010da4: e3e00000 mvn r0, #0 <== NOT EXECUTED a0010da8: eafffff2 b a0010d78 <== NOT EXECUTED /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EFBIG ); a0010dac: eb00031f bl a0011a30 <__errno> a0010db0: e3a0301b mov r3, #27 a0010db4: e5803000 str r3, [r0] a0010db8: e3e00000 mvn r0, #0 a0010dbc: eaffffed b a0010d78 =============================================================================== a00105b4 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a00105b4: e59f31fc ldr r3, [pc, #508] ; a00107b8 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a00105b8: 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 ) { a00105bc: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a00105c0: e24dd004 sub sp, sp, #4 a00105c4: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a00105c8: e1a05125 lsr r5, r5, #2 a00105cc: e2453001 sub r3, r5, #1 a00105d0: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a00105d4: e1a06002 mov r6, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a00105d8: 8a000007 bhi a00105fc p = info->indirect; if ( malloc_it ) { a00105dc: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a00105e0: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a00105e4: 0a000040 beq a00106ec if ( !p ) { a00105e8: e3500000 cmp r0, #0 a00105ec: 0a000050 beq a0010734 } if ( !p ) return 0; return &info->indirect[ my_block ]; a00105f0: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } a00105f4: e28dd004 add sp, sp, #4 a00105f8: 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 ) { a00105fc: e0275595 mla r7, r5, r5, r5 a0010600: e2473001 sub r3, r7, #1 a0010604: e1510003 cmp r1, r3 a0010608: 9a000023 bls a001069c } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a001060c: e0235597 mla r3, r7, r5, r5 a0010610: e2433001 sub r3, r3, #1 a0010614: e1510003 cmp r1, r3 } /* * This means the requested block number is out of range. */ return 0; a0010618: 83a00000 movhi r0, #0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a001061c: 8afffff4 bhi a00105f4 my_block -= FIRST_TRIPLY_INDIRECT; a0010620: e0677001 rsb r7, r7, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0010624: e1a00007 mov r0, r7 a0010628: e1a01005 mov r1, r5 a001062c: eb002936 bl a001ab0c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0010630: 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; a0010634: e1a09000 mov r9, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0010638: e1a00007 mov r0, r7 a001063c: eb0028ec bl a001a9f4 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a0010640: 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; a0010644: e1a0a000 mov sl, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a0010648: eb0028e9 bl a001a9f4 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a001064c: 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; a0010650: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a0010654: e1a0000a mov r0, sl a0010658: eb00292b bl a001ab0c <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a001065c: 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; a0010660: e1a05000 mov r5, r0 p = info->triply_indirect; a0010664: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a0010668: 0a000028 beq a0010710 if ( !p ) { a001066c: e3500000 cmp r0, #0 a0010670: 0a000045 beq a001078c if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; a0010674: e7903107 ldr r3, [r0, r7, lsl #2] a0010678: e0807107 add r7, r0, r7, lsl #2 if ( !p1 ) { a001067c: e3530000 cmp r3, #0 a0010680: 0a000046 beq a00107a0 if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; a0010684: e7930105 ldr r0, [r3, r5, lsl #2] a0010688: e0835105 add r5, r3, r5, lsl #2 if ( !p2 ) { a001068c: e3500000 cmp r0, #0 a0010690: 0a000033 beq a0010764 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a0010694: e0800109 add r0, r0, r9, lsl #2 a0010698: eaffffd5 b a00105f4 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; a001069c: e0657001 rsb r7, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a00106a0: e1a00007 mov r0, r7 a00106a4: e1a01005 mov r1, r5 a00106a8: eb002917 bl a001ab0c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a00106ac: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a00106b0: e1a08000 mov r8, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a00106b4: e1a00007 mov r0, r7 a00106b8: eb0028cd bl a001a9f4 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a00106bc: 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; a00106c0: e1a05000 mov r5, r0 p = info->doubly_indirect; a00106c4: e594305c ldr r3, [r4, #92] ; 0x5c if ( malloc_it ) { a00106c8: 0a00000a beq a00106f8 if ( !p ) { a00106cc: e3530000 cmp r3, #0 a00106d0: 0a000028 beq a0010778 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; a00106d4: e7930105 ldr r0, [r3, r5, lsl #2] a00106d8: e0835105 add r5, r3, r5, lsl #2 if ( !p1 ) { a00106dc: e3500000 cmp r0, #0 a00106e0: 0a00001a beq a0010750 p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a00106e4: e0800108 add r0, r0, r8, lsl #2 a00106e8: eaffffc1 b a00105f4 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) a00106ec: e3500000 cmp r0, #0 a00106f0: 1affffbe bne a00105f0 a00106f4: eaffffbe b a00105f4 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a00106f8: e3530000 cmp r3, #0 a00106fc: 0a00002b beq a00107b0 return 0; p = (block_p *)p[ doubly ]; a0010700: e7930100 ldr r0, [r3, r0, lsl #2] if ( !p ) a0010704: e3500000 cmp r0, #0 return 0; return (block_p *)&p[ singly ]; a0010708: 10800108 addne r0, r0, r8, lsl #2 a001070c: eaffffb8 b a00105f4 p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a0010710: e3500000 cmp r0, #0 a0010714: 0affffb6 beq a00105f4 return 0; p1 = (block_p *) p[ triply ]; a0010718: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a001071c: e3500000 cmp r0, #0 a0010720: 0affffb3 beq a00105f4 return 0; p2 = (block_p *)p1[ doubly ]; a0010724: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a0010728: e3500000 cmp r0, #0 return 0; return (block_p *)&p2[ singly ]; a001072c: 10800109 addne r0, r0, r9, lsl #2 a0010730: eaffffaf b a00105f4 p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a0010734: e58d1000 str r1, [sp] a0010738: ebffff90 bl a0010580 if ( !p ) a001073c: e3500000 cmp r0, #0 a0010740: e59d1000 ldr r1, [sp] return 0; info->indirect = p; a0010744: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) a0010748: 1affffa8 bne a00105f0 a001074c: eaffffa8 b a00105f4 <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); a0010750: ebffff8a bl a0010580 if ( !p1 ) a0010754: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a0010758: 15850000 strne r0, [r5] p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a001075c: 10800108 addne r0, r0, r8, lsl #2 a0010760: eaffffa3 b a00105f4 p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); a0010764: ebffff85 bl a0010580 if ( !p2 ) a0010768: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a001076c: 15850000 strne r0, [r5] p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a0010770: 10800109 addne r0, r0, r9, lsl #2 a0010774: eaffff9e b a00105f4 p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a0010778: ebffff80 bl a0010580 if ( !p ) a001077c: e2503000 subs r3, r0, #0 a0010780: 0a00000a beq a00107b0 return 0; info->doubly_indirect = p; a0010784: e584305c str r3, [r4, #92] ; 0x5c a0010788: eaffffd1 b a00106d4 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a001078c: ebffff7b bl a0010580 if ( !p ) a0010790: e3500000 cmp r0, #0 a0010794: 0affff96 beq a00105f4 return 0; info->triply_indirect = p; a0010798: e5840060 str r0, [r4, #96] ; 0x60 a001079c: eaffffb4 b a0010674 } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); a00107a0: ebffff76 bl a0010580 if ( !p1 ) a00107a4: e2503000 subs r3, r0, #0 return 0; p[ triply ] = (block_p) p1; a00107a8: 15873000 strne r3, [r7] a00107ac: 1affffb4 bne a0010684 p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; a00107b0: e1a00003 mov r0, r3 <== NOT EXECUTED a00107b4: eaffff8e b a00105f4 <== NOT EXECUTED =============================================================================== a00107bc : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a00107bc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a00107c0: 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; a00107c4: e590004c ldr r0, [r0, #76] ; 0x4c a00107c8: e24dd014 sub sp, sp, #20 a00107cc: 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 ) { a00107d0: e5903000 ldr r3, [r0] IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a00107d4: 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 ) { a00107d8: e3530005 cmp r3, #5 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a00107dc: 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 ) { a00107e0: 0a000059 beq a001094c */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00107e4: e59f81c0 ldr r8, [pc, #448] ; a00109ac /* * 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; a00107e8: e59dc000 ldr ip, [sp] if ( last_byte > the_jnode->info.file.size ) a00107ec: e3a03000 mov r3, #0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00107f0: 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; a00107f4: e087100c add r1, r7, ip if ( last_byte > the_jnode->info.file.size ) a00107f8: e1a02001 mov r2, r1 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a00107fc: 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 ) a0010800: e2891050 add r1, r9, #80 ; 0x50 a0010804: e8910003 ldm r1, {r0, r1} a0010808: e1500002 cmp r0, r2 a001080c: e0d1e003 sbcs lr, r1, r3 my_length = the_jnode->info.file.size - start; a0010810: b06c7000 rsblt r7, ip, r0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010814: e1a03005 mov r3, r5 a0010818: e1a02006 mov r2, r6 a001081c: e89d0003 ldm sp, {r0, r1} a0010820: eb002ca1 bl a001baac <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010824: e1a03005 mov r3, r5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010828: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a001082c: e1a02006 mov r2, r6 a0010830: e89d0003 ldm sp, {r0, r1} a0010834: eb002b61 bl a001b5c0 <__divdi3> if ( start_offset ) { a0010838: 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; a001083c: e1a04000 mov r4, r0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; a0010840: 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 ) { a0010844: 1a000016 bne a00108a4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010848: e1570006 cmp r7, r6 a001084c: 2a000008 bcs a0010874 a0010850: ea000029 b a00108fc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a0010854: e5931000 ldr r1, [r3] a0010858: eb0006ae bl a0012318 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a001085c: 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; a0010860: e0855006 add r5, r5, r6 block++; a0010864: 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 ) { a0010868: e1530007 cmp r3, r7 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; copied += to_copy; a001086c: 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 ) { a0010870: 8a000021 bhi a00108fc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010874: e3a02000 mov r2, #0 a0010878: e1a01004 mov r1, r4 a001087c: e1a00009 mov r0, r9 a0010880: ebffff4b bl a00105b4 if ( !block_ptr ) a0010884: e2503000 subs r3, r0, #0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a0010888: e1a02006 mov r2, r6 dest += to_copy; block++; my_length -= to_copy; a001088c: 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 ); a0010890: 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 ) a0010894: 1affffee bne a0010854 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; a0010898: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } a001089c: e28dd014 add sp, sp, #20 a00108a0: 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 ); a00108a4: e1a00009 mov r0, r9 a00108a8: e1a01004 mov r1, r4 a00108ac: e3a02000 mov r2, #0 a00108b0: ebffff3f bl a00105b4 if ( !block_ptr ) a00108b4: e3500000 cmp r0, #0 a00108b8: 0afffff7 beq a001089c return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); a00108bc: 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; a00108c0: e06a6006 rsb r6, sl, r6 a00108c4: e1570006 cmp r7, r6 a00108c8: 31a0b007 movcc fp, r7 a00108cc: 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 ); a00108d0: e081100a add r1, r1, sl a00108d4: e59d0008 ldr r0, [sp, #8] a00108d8: e1a0200b mov r2, fp a00108dc: eb00068d bl a0012318 dest += to_copy; a00108e0: e59dc008 ldr ip, [sp, #8] block++; a00108e4: e2844001 add r4, r4, #1 my_length -= to_copy; a00108e8: 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; a00108ec: e08c500b add r5, ip, fp block++; my_length -= to_copy; a00108f0: e5986000 ldr r6, [r8] copied += to_copy; a00108f4: e1a0a00b mov sl, fp a00108f8: eaffffd2 b a0010848 /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { a00108fc: e3570000 cmp r7, #0 a0010900: 0a00000a beq a0010930 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010904: e1a00009 mov r0, r9 a0010908: e1a01004 mov r1, r4 a001090c: e3a02000 mov r2, #0 a0010910: ebffff27 bl a00105b4 if ( !block_ptr ) a0010914: e2503000 subs r3, r0, #0 a0010918: 0affffde beq a0010898 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); a001091c: e1a00005 mov r0, r5 a0010920: e5931000 ldr r1, [r3] a0010924: e1a02007 mov r2, r7 a0010928: eb00067a bl a0012318 copied += my_length; a001092c: e08aa007 add sl, sl, r7 } IMFS_update_atime( the_jnode ); a0010930: e28d000c add r0, sp, #12 a0010934: e3a01000 mov r1, #0 a0010938: ebffd774 bl a0006710 a001093c: e59d300c ldr r3, [sp, #12] return copied; a0010940: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a0010944: e5893040 str r3, [r9, #64] ; 0x40 return copied; a0010948: eaffffd3 b a001089c 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)) a001094c: e1a02007 mov r2, r7 a0010950: e2895050 add r5, r9, #80 ; 0x50 a0010954: e8950030 ldm r5, {r4, r5} a0010958: e3a03000 mov r3, #0 a001095c: e89d0003 ldm sp, {r0, r1} a0010960: e0540000 subs r0, r4, r0 a0010964: e0c51001 sbc r1, r5, r1 a0010968: e1500002 cmp r0, r2 a001096c: e0d1c003 sbcs ip, r1, r3 my_length = the_jnode->info.linearfile.size - start; a0010970: b59de000 ldrlt lr, [sp] memcpy(dest, &file_ptr[start], my_length); a0010974: 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; a0010978: e5991058 ldr r1, [r9, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; a001097c: b06e7004 rsblt r7, lr, r4 memcpy(dest, &file_ptr[start], my_length); a0010980: e1a02007 mov r2, r7 a0010984: e0811003 add r1, r1, r3 a0010988: e59d0008 ldr r0, [sp, #8] a001098c: eb000661 bl a0012318 IMFS_update_atime( the_jnode ); a0010990: e28d000c add r0, sp, #12 a0010994: e3a01000 mov r1, #0 a0010998: ebffd75c bl a0006710 a001099c: e59d300c ldr r3, [sp, #12] return my_length; a00109a0: 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 ); a00109a4: e5893040 str r3, [r9, #64] ; 0x40 return my_length; a00109a8: eaffffbb b a001089c =============================================================================== a0010ab0 : * is better to stick to simple, easy to understand algorithms. */ IMFS_jnode_t *IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a0010ab0: 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; a0010ab4: e59f6134 ldr r6, [pc, #308] ; a0010bf0 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0010ab8: 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 ) { a0010abc: 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; a0010ac0: e5967000 ldr r7, [r6] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0010ac4: 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; a0010ac8: e1a07127 lsr r7, r7, #2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0010acc: 0a000002 beq a0010adc memfile_free_blocks_in_table( &info->indirect, to_free ); a0010ad0: e2800058 add r0, r0, #88 ; 0x58 <== NOT EXECUTED a0010ad4: e1a01007 mov r1, r7 <== NOT EXECUTED a0010ad8: ebffffdf bl a0010a5c <== NOT EXECUTED } if ( info->doubly_indirect ) { a0010adc: e59a305c ldr r3, [sl, #92] ; 0x5c a0010ae0: e3530000 cmp r3, #0 a0010ae4: 0a000014 beq a0010b3c for ( i=0 ; i <== NOT EXECUTED a0010af4: e3a00000 mov r0, #0 <== NOT EXECUTED a0010af8: e1a04000 mov r4, r0 <== NOT EXECUTED a0010afc: ea000000 b a0010b04 <== NOT EXECUTED a0010b00: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { a0010b04: 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( a0010b0c: 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] ) { a0010b10: e3520000 cmp r2, #0 <== NOT EXECUTED a0010b14: e0830100 add r0, r3, r0, lsl #2 <== NOT EXECUTED a0010b18: 0a000000 beq a0010b20 <== NOT EXECUTED memfile_free_blocks_in_table( a0010b1c: ebffffce bl a0010a5c <== 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 ); a0010b30: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED a0010b34: e1a01007 mov r1, r7 <== NOT EXECUTED a0010b38: ebffffc7 bl a0010a5c <== NOT EXECUTED } if ( info->triply_indirect ) { a0010b3c: e59a0060 ldr r0, [sl, #96] ; 0x60 a0010b40: e3500000 cmp r0, #0 a0010b44: 0a000027 beq a0010be8 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; a0010b54: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0010b58: e3550000 cmp r5, #0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; a0010b5c: 13a09000 movne r9, #0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0010b60: 11a08009 movne r8, r9 <== NOT EXECUTED a0010b64: 0a00001c beq a0010bdc <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED a0010b70: e3a00000 mov r0, #0 <== NOT EXECUTED a0010b74: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { a0010b78: 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); a0010b90: ebffffb1 bl a0010a5c <== 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 a0010ba4: 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( a0010ba8: e0800009 add r0, r0, r9 <== NOT EXECUTED a0010bac: e1a01007 mov r1, r7 <== NOT EXECUTED a0010bb0: ebffffa9 bl a0010a5c <== 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]; a0010bc8: 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( a0010bcc: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; a0010bd0: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0010bd4: e3550000 cmp r5, #0 <== NOT EXECUTED a0010bd8: 1affffe2 bne a0010b68 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( a0010bdc: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED a0010be0: e1a01007 mov r1, r7 <== NOT EXECUTED a0010be4: ebffff9c bl a0010a5c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return the_jnode; } a0010be8: e1a0000a mov r0, sl a0010bec: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a0010bf4 : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { a0010bf4: 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 ); a0010bf8: e3a02000 mov r2, #0 <== NOT EXECUTED a0010bfc: ebfffe6c bl a00105b4 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; a0010c00: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010c04: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; a0010c08: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; a0010c0c: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); a0010c10: ebffff89 bl a0010a3c <== NOT EXECUTED return 1; } a0010c14: e3a00001 mov r0, #1 <== NOT EXECUTED a0010c18: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0010dc4 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a0010dc4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0010dc8: e24dd010 sub sp, sp, #16 a0010dcc: e59db034 ldr fp, [sp, #52] ; 0x34 a0010dd0: 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 ) { a0010dd4: e2805050 add r5, r0, #80 ; 0x50 a0010dd8: 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; a0010ddc: e08b2001 add r2, fp, r1 if ( last_byte > the_jnode->info.file.size ) { a0010de0: e1a06002 mov r6, r2 a0010de4: e3a07000 mov r7, #0 a0010de8: e1540006 cmp r4, r6 a0010dec: e0d51007 sbcs r1, r5, r7 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a0010df0: e1a09000 mov r9, r0 a0010df4: 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 ) { a0010df8: ba000050 blt a0010f40 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010dfc: e59f7168 ldr r7, [pc, #360] ; a0010f6c a0010e00: e89d0003 ldm sp, {r0, r1} a0010e04: e5976000 ldr r6, [r7] a0010e08: e1a05fc6 asr r5, r6, #31 a0010e0c: e1a03005 mov r3, r5 a0010e10: e1a02006 mov r2, r6 a0010e14: eb002b24 bl a001baac <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010e18: e1a03005 mov r3, r5 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010e1c: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010e20: e1a02006 mov r2, r6 a0010e24: e89d0003 ldm sp, {r0, r1} a0010e28: eb0029e4 bl a001b5c0 <__divdi3> if ( start_offset ) { a0010e2c: e35a0000 cmp sl, #0 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010e30: e1a04006 mov r4, r6 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010e34: e1a05000 mov r5, r0 if ( start_offset ) { a0010e38: 01a0400b moveq r4, fp a0010e3c: 1a000016 bne a0010e9c /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010e40: e1540006 cmp r4, r6 a0010e44: 2a000008 bcs a0010e6c a0010e48: ea000027 b a0010eec 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 ); a0010e4c: e5900000 ldr r0, [r0] a0010e50: eb000530 bl a0012318 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010e54: 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; a0010e58: e0888006 add r8, r8, r6 block++; a0010e5c: 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 ) { a0010e60: 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( a0010e64: 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 ) { a0010e68: 8a00001f bhi a0010eec block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010e6c: e1a01005 mov r1, r5 a0010e70: e3a02000 mov r2, #0 a0010e74: e1a00009 mov r0, r9 a0010e78: ebfffdcd bl a00105b4 if ( !block_ptr ) a0010e7c: 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 ); a0010e80: e1a01008 mov r1, r8 a0010e84: e1a02006 mov r2, r6 src += to_copy; block++; my_length -= to_copy; a0010e88: 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 ) a0010e8c: 1affffee bne a0010e4c 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 ) a0010e90: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } a0010e94: e28dd010 add sp, sp, #16 a0010e98: 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 ); a0010e9c: e1a00009 mov r0, r9 a0010ea0: e1a01005 mov r1, r5 a0010ea4: e3a02000 mov r2, #0 a0010ea8: ebfffdc1 bl a00105b4 if ( !block_ptr ) a0010eac: e3500000 cmp r0, #0 a0010eb0: 0afffff7 beq a0010e94 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a0010eb4: 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; a0010eb8: e06a6006 rsb r6, sl, r6 a0010ebc: e156000b cmp r6, fp a0010ec0: 21a0600b movcs r6, fp block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a0010ec4: e080000a add r0, r0, sl a0010ec8: e1a01008 mov r1, r8 a0010ecc: e1a02006 mov r2, r6 a0010ed0: eb000510 bl a0012318 src += to_copy; a0010ed4: e0888006 add r8, r8, r6 block++; my_length -= to_copy; a0010ed8: e066400b rsb r4, r6, fp copied += to_copy; a0010edc: e1a0a006 mov sl, r6 src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; a0010ee0: e2855001 add r5, r5, #1 my_length -= to_copy; copied += to_copy; a0010ee4: e5976000 ldr r6, [r7] a0010ee8: eaffffd4 b a0010e40 * 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 ) { a0010eec: e3540000 cmp r4, #0 a0010ef0: 0a00000a beq a0010f20 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010ef4: e1a00009 mov r0, r9 a0010ef8: e1a01005 mov r1, r5 a0010efc: e3a02000 mov r2, #0 a0010f00: ebfffdab bl a00105b4 if ( !block_ptr ) a0010f04: e3500000 cmp r0, #0 a0010f08: 0affffe0 beq a0010e90 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 ); a0010f0c: e5900000 ldr r0, [r0] a0010f10: e1a01008 mov r1, r8 a0010f14: e1a02004 mov r2, r4 a0010f18: eb0004fe bl a0012318 my_length = 0; copied += to_copy; a0010f1c: e08aa004 add sl, sl, r4 } IMFS_mtime_ctime_update( the_jnode ); a0010f20: e28d0008 add r0, sp, #8 a0010f24: e3a01000 mov r1, #0 a0010f28: ebffd5f8 bl a0006710 a0010f2c: e59d3008 ldr r3, [sp, #8] return copied; a0010f30: e1a0000a mov r0, sl memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); a0010f34: e5893044 str r3, [r9, #68] ; 0x44 a0010f38: e5893048 str r3, [r9, #72] ; 0x48 return copied; a0010f3c: eaffffd4 b a0010e94 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 ); a0010f40: e89d000c ldm sp, {r2, r3} a0010f44: e1540002 cmp r4, r2 a0010f48: e0d53003 sbcs r3, r5, r3 a0010f4c: a3a01000 movge r1, #0 a0010f50: b3a01001 movlt r1, #1 a0010f54: e1a02006 mov r2, r6 a0010f58: e1a03007 mov r3, r7 a0010f5c: ebffff2e bl a0010c1c if ( status ) a0010f60: e3500000 cmp r0, #0 a0010f64: 0affffa4 beq a0010dfc a0010f68: eaffffc9 b a0010e94 =============================================================================== 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: eb002e8c bl a0011a30 <__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: eb002e87 bl a0011a30 <__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) =============================================================================== a000ea8c : static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { a000ea8c: 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 ); a000ea90: e2803054 add r3, r0, #84 ; 0x54 } static IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { a000ea94: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( !rtems_chain_is_empty( &node->info.directory.Entries ) ) { a000ea98: e1520003 cmp r2, r3 a000ea9c: 1a000007 bne a000eac0 errno = ENOTEMPTY; node = NULL; } else if ( IMFS_is_mount_point( node ) ) { a000eaa0: e590305c ldr r3, [r0, #92] ; 0x5c a000eaa4: e3530000 cmp r3, #0 a000eaa8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) errno = EBUSY; a000eaac: eb000bdf bl a0011a30 <__errno> <== NOT EXECUTED a000eab0: e3a03010 mov r3, #16 <== NOT EXECUTED a000eab4: e5803000 str r3, [r0] <== NOT EXECUTED a000eab8: e3a00000 mov r0, #0 <== NOT EXECUTED node = NULL; } return node; } a000eabc: 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; a000eac0: eb000bda bl a0011a30 <__errno> <== NOT EXECUTED a000eac4: e3a0305a mov r3, #90 ; 0x5a <== NOT EXECUTED a000eac8: e5803000 str r3, [r0] <== NOT EXECUTED node = NULL; a000eacc: e3a00000 mov r0, #0 <== NOT EXECUTED a000ead0: 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: eb003089 bl a0012318 <== 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: eb002e3a bl a0011a30 <__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: eb002e35 bl a0011a30 <__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: eb003235 bl a0012ac0 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: eb002112 bl a000e670 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: eb002dfa bl a0011a30 <__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: eb002de9 bl a0011a30 <__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: eb002de4 bl a0011a30 <__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: eb0033fe bl a00132c0