=============================================================================== a000d900 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { a000d900: e5903000 ldr r3, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a000d904: e5902010 ldr r2, [r0, #16] switch( node->type ) { a000d908: e593304c ldr r3, [r3, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a000d90c: e5922034 ldr r2, [r2, #52] ; 0x34 switch( node->type ) { a000d910: e2433001 sub r3, r3, #1 a000d914: e3530006 cmp r3, #6 a000d918: 979ff103 ldrls pc, [pc, r3, lsl #2] a000d91c: ea000008 b a000d944 <== NOT EXECUTED a000d920: a000d96c .word 0xa000d96c <== NOT EXECUTED a000d924: a000d97c .word 0xa000d97c <== NOT EXECUTED a000d928: a000d95c .word 0xa000d95c <== NOT EXECUTED a000d92c: a000d95c .word 0xa000d95c <== NOT EXECUTED a000d930: a000d94c .word 0xa000d94c <== NOT EXECUTED a000d934: a000d94c .word 0xa000d94c <== NOT EXECUTED a000d938: a000d93c .word 0xa000d93c <== NOT EXECUTED break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; a000d93c: e5923010 ldr r3, [r2, #16] a000d940: e5803008 str r3, [r0, #8] break; } return 0; } a000d944: e3a00000 mov r0, #0 a000d948: e12fff1e bx lr break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; a000d94c: e5923008 ldr r3, [r2, #8] a000d950: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a000d954: e3a00000 mov r0, #0 a000d958: e12fff1e bx lr case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; a000d95c: e59f3028 ldr r3, [pc, #40] ; a000d98c a000d960: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a000d964: e3a00000 mov r0, #0 a000d968: e12fff1e bx lr IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; a000d96c: e592300c ldr r3, [r2, #12] a000d970: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a000d974: e3a00000 mov r0, #0 a000d978: e12fff1e bx lr switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; a000d97c: e59f300c ldr r3, [pc, #12] ; a000d990 a000d980: e5803008 str r3, [r0, #8] loc->handlers = fs_info->fifo_handlers; break; } return 0; } a000d984: e3a00000 mov r0, #0 a000d988: e12fff1e bx lr =============================================================================== a000d67c : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { a000d67c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED a000d680: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED a000d684: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED a000d688: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; a000d68c: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { a000d690: e1a07821 lsr r7, r1, #16 <== NOT EXECUTED a000d694: e1a06822 lsr r6, r2, #16 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a000d698: eb0003db bl a000e60c <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) a000d69c: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED a000d6a0: e3500000 cmp r0, #0 <== NOT EXECUTED a000d6a4: 11550000 cmpne r5, r0 <== NOT EXECUTED a000d6a8: 03a05000 moveq r5, #0 <== NOT EXECUTED a000d6ac: 13a05001 movne r5, #1 <== NOT EXECUTED a000d6b0: 1a000009 bne a000d6dc <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; a000d6b4: e1c473bc strh r7, [r4, #60] ; 0x3c <== NOT EXECUTED jnode->st_gid = group; a000d6b8: e1c463be strh r6, [r4, #62] ; 0x3e <== NOT EXECUTED IMFS_update_ctime( jnode ); a000d6bc: e1a0000d mov r0, sp <== NOT EXECUTED a000d6c0: e1a01005 mov r1, r5 <== NOT EXECUTED a000d6c4: ebffe37d bl a00064c0 <== NOT EXECUTED a000d6c8: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; a000d6cc: e1a00005 mov r0, r5 <== NOT EXECUTED #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); a000d6d0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a000d6d4: e28dd008 add sp, sp, #8 <== NOT EXECUTED a000d6d8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); a000d6dc: eb00127a bl a00120cc <__errno> <== NOT EXECUTED a000d6e0: e3a03001 mov r3, #1 <== NOT EXECUTED a000d6e4: e5803000 str r3, [r0] <== NOT EXECUTED a000d6e8: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d6ec: eafffff8 b a000d6d4 <== NOT EXECUTED =============================================================================== a000da48 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a000da48: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { a000da4c: e3d25007 bics r5, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a000da50: e24dd040 sub sp, sp, #64 ; 0x40 a000da54: e58d2000 str r2, [sp] a000da58: e1a0a000 mov sl, r0 a000da5c: e1a04001 mov r4, r1 a000da60: e1a07003 mov r7, r3 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { a000da64: 1a000081 bne a000dc70 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000da68: e5936000 ldr r6, [r3] a000da6c: e28d8004 add r8, sp, #4 a000da70: e28d903c add r9, sp, #60 ; 0x3c * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a000da74: e1a02008 mov r2, r8 a000da78: e1a03009 mov r3, r9 a000da7c: e08a0005 add r0, sl, r5 a000da80: e1a01004 mov r1, r4 a000da84: eb0001df bl a000e208 pathnamelen -= len; i += len; if ( !pathloc->node_access ) a000da88: e5973000 ldr r3, [r7] * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a000da8c: e1a0b000 mov fp, r0 pathnamelen -= len; a000da90: e59d203c ldr r2, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) a000da94: e3530000 cmp r3, #0 a000da98: 0a00004e beq a000dbd8 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a000da9c: e3500000 cmp r0, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; a000daa0: e0624004 rsb r4, r2, r4 i += len; a000daa4: e0855002 add r5, r5, r2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a000daa8: 1a00000f bne a000daec * new fs root node and let let the mounted filesystem set the handlers. * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { a000daac: e593204c ldr r2, [r3, #76] ; 0x4c a000dab0: e3520001 cmp r2, #1 a000dab4: 0a000068 beq a000dc5c flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a000dab8: e1a00007 mov r0, r7 a000dabc: ebffff8f bl a000d900 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a000dac0: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a000dac4: e1a06000 mov r6, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a000dac8: e1a00007 mov r0, r7 a000dacc: ebffffb0 bl a000d994 a000dad0: e3500000 cmp r0, #0 a000dad4: 1a000036 bne a000dbb4 rtems_set_errno_and_return_minus_one( EACCES ); a000dad8: eb00117b bl a00120cc <__errno> <== NOT EXECUTED a000dadc: e3a0300d mov r3, #13 <== NOT EXECUTED a000dae0: e5803000 str r3, [r0] <== NOT EXECUTED a000dae4: e3e06000 mvn r6, #0 <== NOT EXECUTED a000dae8: ea000031 b a000dbb4 <== NOT EXECUTED /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) a000daec: e596104c ldr r1, [r6, #76] ; 0x4c a000daf0: e3510001 cmp r1, #1 a000daf4: 0a000031 beq a000dbc0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { a000daf8: e35b0003 cmp fp, #3 if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a000dafc: e1a06003 mov r6, r3 switch( type ) { a000db00: 0a000006 beq a000db20 a000db04: e35b0004 cmp fp, #4 a000db08: 0a000025 beq a000dba4 a000db0c: e35b0002 cmp fp, #2 a000db10: 0a000013 beq a000db64 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { a000db14: e35b0004 cmp fp, #4 a000db18: 1affffd5 bne a000da74 a000db1c: eaffffe2 b a000daac <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a000db20: e593304c ldr r3, [r3, #76] ; 0x4c a000db24: e3530003 cmp r3, #3 a000db28: 0a00002f beq a000dbec * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { a000db2c: e3530004 cmp r3, #4 a000db30: 0a000058 beq a000dc98 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a000db34: e3530001 cmp r3, #1 a000db38: 1a000051 bne a000dc84 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { a000db3c: e596e05c ldr lr, [r6, #92] ; 0x5c a000db40: e35e0000 cmp lr, #0 a000db44: 1a000047 bne a000dc68 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a000db48: e1a00006 mov r0, r6 a000db4c: e1a01008 mov r1, r8 a000db50: eb00018b bl a000e184 if ( !node ) a000db54: e2506000 subs r6, r0, #0 a000db58: 0a00001e beq a000dbd8 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a000db5c: e5876000 str r6, [r7] a000db60: eaffffc3 b a000da74 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a000db64: e59f1154 ldr r1, [pc, #340] ; a000dcc0 a000db68: e5912000 ldr r2, [r1] a000db6c: e5922018 ldr r2, [r2, #24] a000db70: e1520003 cmp r2, r3 a000db74: 0affffbe beq a000da74 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { a000db78: e597e010 ldr lr, [r7, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == a000db7c: e59e201c ldr r2, [lr, #28] a000db80: e1520003 cmp r2, r3 a000db84: 0a00001e beq a000dc04 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) a000db88: e5936008 ldr r6, [r3, #8] a000db8c: e3560000 cmp r6, #0 a000db90: 1afffff1 bne a000db5c rtems_set_errno_and_return_minus_one( ENOENT ); a000db94: eb00114c bl a00120cc <__errno> <== NOT EXECUTED a000db98: e3e06000 mvn r6, #0 <== NOT EXECUTED a000db9c: e580b000 str fp, [r0] <== NOT EXECUTED a000dba0: ea000003 b a000dbb4 <== NOT EXECUTED case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a000dba4: eb001148 bl a00120cc <__errno> <== NOT EXECUTED a000dba8: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000dbac: e5803000 str r3, [r0] <== NOT EXECUTED a000dbb0: e3e06000 mvn r6, #0 <== NOT EXECUTED if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } a000dbb4: e1a00006 mov r0, r6 a000dbb8: e28dd040 add sp, sp, #64 ; 0x40 a000dbbc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a000dbc0: e1a00007 mov r0, r7 a000dbc4: ebffff72 bl a000d994 a000dbc8: e3500000 cmp r0, #0 a000dbcc: 0affffc1 beq a000dad8 a000dbd0: e5973000 ldr r3, [r7] a000dbd4: eaffffc7 b a000daf8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); if ( !node ) rtems_set_errno_and_return_minus_one( ENOENT ); a000dbd8: eb00113b bl a00120cc <__errno> a000dbdc: e3a03002 mov r3, #2 a000dbe0: e5803000 str r3, [r0] a000dbe4: e3e06000 mvn r6, #0 a000dbe8: eafffff1 b a000dbb4 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); a000dbec: e1a00007 mov r0, r7 <== NOT EXECUTED a000dbf0: e3a01000 mov r1, #0 <== NOT EXECUTED a000dbf4: ebffff80 bl a000d9fc <== NOT EXECUTED node = pathloc->node_access; a000dbf8: e5976000 ldr r6, [r7] <== NOT EXECUTED a000dbfc: e596304c ldr r3, [r6, #76] ; 0x4c <== NOT EXECUTED a000dc00: eaffffcb b a000db34 <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; a000dc04: e28ee008 add lr, lr, #8 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; a000dc08: e28d6028 add r6, sp, #40 ; 0x28 a000dc0c: e8be000f ldm lr!, {r0, r1, r2, r3} a000dc10: e8a6000f stmia r6!, {r0, r1, r2, r3} *pathloc = newloc; a000dc14: e28dc028 add ip, sp, #40 ; 0x28 a000dc18: e8bc000f ldm ip!, {r0, r1, r2, r3} * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; a000dc1c: e59ec000 ldr ip, [lr] *pathloc = newloc; a000dc20: e1a0e007 mov lr, r7 a000dc24: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000dc28: e59d103c ldr r1, [sp, #60] ; 0x3c */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; a000dc2c: e58ec000 str ip, [lr] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000dc30: e597300c ldr r3, [r7, #12] a000dc34: e0610005 rsb r0, r1, r5 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; a000dc38: e586c000 str ip, [r6] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], a000dc3c: e08a0000 add r0, sl, r0 a000dc40: e593c000 ldr ip, [r3] a000dc44: e0841001 add r1, r4, r1 a000dc48: e59d2000 ldr r2, [sp] a000dc4c: e1a03007 mov r3, r7 a000dc50: e12fff3c blx ip a000dc54: e1a06000 mov r6, r0 a000dc58: eaffffd5 b a000dbb4 * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { a000dc5c: e593e05c ldr lr, [r3, #92] ; 0x5c a000dc60: e35e0000 cmp lr, #0 a000dc64: 0affff93 beq a000dab8 newloc = node->info.directory.mt_fs->mt_fs_root; a000dc68: e28ee01c add lr, lr, #28 a000dc6c: eaffffe5 b a000dc08 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { rtems_set_errno_and_return_minus_one( EIO ); a000dc70: eb001115 bl a00120cc <__errno> <== NOT EXECUTED a000dc74: e3a03005 mov r3, #5 <== NOT EXECUTED a000dc78: e5803000 str r3, [r0] <== NOT EXECUTED a000dc7c: e3e06000 mvn r6, #0 <== NOT EXECUTED a000dc80: eaffffcb b a000dbb4 <== NOT EXECUTED /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a000dc84: eb001110 bl a00120cc <__errno> <== NOT EXECUTED a000dc88: e3a03014 mov r3, #20 <== NOT EXECUTED a000dc8c: e5803000 str r3, [r0] <== NOT EXECUTED a000dc90: e3e06000 mvn r6, #0 <== NOT EXECUTED a000dc94: eaffffc6 b a000dbb4 <== NOT EXECUTED * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a000dc98: e1a00007 mov r0, r7 <== NOT EXECUTED a000dc9c: e3a01000 mov r1, #0 <== NOT EXECUTED a000dca0: eb000007 bl a000dcc4 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) a000dca4: e3700001 cmn r0, #1 <== NOT EXECUTED * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); a000dca8: e1a06000 mov r6, r0 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; a000dcac: e5973000 ldr r3, [r7] <== NOT EXECUTED if ( result == -1 ) a000dcb0: 0affffbf beq a000dbb4 <== NOT EXECUTED /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; a000dcb4: e1a06003 mov r6, r3 <== NOT EXECUTED a000dcb8: e593304c ldr r3, [r3, #76] ; 0x4c <== NOT EXECUTED a000dcbc: eaffff9c b a000db34 <== NOT EXECUTED =============================================================================== a000de2c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a000de2c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000de30: e24dd040 sub sp, sp, #64 ; 0x40 a000de34: e1a06001 mov r6, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a000de38: e5915000 ldr r5, [r1] int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a000de3c: e1a0a000 mov sl, r0 a000de40: e58d2000 str r2, [sp] node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a000de44: eb00148a bl a0013074 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; a000de48: e3a07000 mov r7, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a000de4c: e1a04000 mov r4, r0 a000de50: e28d8004 add r8, sp, #4 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a000de54: e1a01004 mov r1, r4 a000de58: e28d303c add r3, sp, #60 ; 0x3c a000de5c: e08a0007 add r0, sl, r7 a000de60: e1a02008 mov r2, r8 a000de64: eb0000e7 bl a000e208 pathlen -= len; i += len; if ( !pathloc->node_access ) a000de68: e5963000 ldr r3, [r6] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a000de6c: e59db03c ldr fp, [sp, #60] ; 0x3c * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a000de70: e1a09000 mov r9, r0 pathlen -= len; i += len; if ( !pathloc->node_access ) a000de74: e3530000 cmp r3, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a000de78: e06b4004 rsb r4, fp, r4 i += len; if ( !pathloc->node_access ) a000de7c: 0a000035 beq a000df58 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a000de80: e3500000 cmp r0, #0 a000de84: 1a000006 bne a000dea4 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a000de88: eb00108f bl a00120cc <__errno> a000de8c: e3a03011 mov r3, #17 a000de90: e5803000 str r3, [r0] a000de94: e3e05000 mvn r5, #0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } a000de98: e1a00005 mov r0, r5 a000de9c: e28dd040 add sp, sp, #64 ; 0x40 a000dea0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) a000dea4: e595104c ldr r1, [r5, #76] ; 0x4c a000dea8: e3510001 cmp r1, #1 a000deac: 0a000044 beq a000dfc4 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a000deb0: e087700b add r7, r7, fp if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; a000deb4: e1a05003 mov r5, r3 switch( type ) { a000deb8: e3590004 cmp r9, #4 a000debc: 979ff109 ldrls pc, [pc, r9, lsl #2] a000dec0: eaffffe3 b a000de54 <== NOT EXECUTED a000dec4: a000de88 .word 0xa000de88 <== NOT EXECUTED a000dec8: a000de54 .word 0xa000de54 <== NOT EXECUTED a000decc: a000df28 .word 0xa000df28 <== NOT EXECUTED a000ded0: a000ded8 .word 0xa000ded8 <== NOT EXECUTED a000ded4: a000df6c .word 0xa000df6c <== NOT EXECUTED pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { a000ded8: e593304c ldr r3, [r3, #76] ; 0x4c a000dedc: e3530003 cmp r3, #3 a000dee0: 0a00006a beq a000e090 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a000dee4: e3530004 cmp r3, #4 a000dee8: 0a000068 beq a000e090 if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) a000deec: e3550000 cmp r5, #0 a000def0: 0a00005f beq a000e074 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a000def4: e595304c ldr r3, [r5, #76] ; 0x4c a000def8: e3530001 cmp r3, #1 a000defc: 1a00005c bne a000e074 /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { a000df00: e595c05c ldr ip, [r5, #92] ; 0x5c a000df04: e35c0000 cmp ip, #0 a000df08: 1a00005e bne a000e088 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a000df0c: e1a00005 mov r0, r5 a000df10: e1a01008 mov r1, r8 a000df14: eb00009a bl a000e184 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a000df18: e2505000 subs r5, r0, #0 a000df1c: 0a000017 beq a000df80 done = true; else pathloc->node_access = node; a000df20: e5865000 str r5, [r6] a000df24: eaffffca b a000de54 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a000df28: e59f1180 ldr r1, [pc, #384] ; a000e0b0 a000df2c: e5912000 ldr r2, [r1] a000df30: e5922018 ldr r2, [r2, #24] a000df34: e1530002 cmp r3, r2 a000df38: 0affffc5 beq a000de54 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a000df3c: e596c010 ldr ip, [r6, #16] a000df40: e59c201c ldr r2, [ip, #28] a000df44: e1530002 cmp r3, r2 a000df48: 0a000023 beq a000dfdc *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) a000df4c: e5935008 ldr r5, [r3, #8] a000df50: e3550000 cmp r5, #0 a000df54: 1afffff1 bne a000df20 * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) rtems_set_errno_and_return_minus_one( ENOENT ); a000df58: eb00105b bl a00120cc <__errno> <== NOT EXECUTED a000df5c: e3a03002 mov r3, #2 <== NOT EXECUTED a000df60: e5803000 str r3, [r0] <== NOT EXECUTED a000df64: e3e05000 mvn r5, #0 <== NOT EXECUTED a000df68: eaffffca b a000de98 <== NOT EXECUTED case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a000df6c: eb001056 bl a00120cc <__errno> <== NOT EXECUTED a000df70: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED a000df74: e5803000 str r3, [r0] <== NOT EXECUTED a000df78: e3e05000 mvn r5, #0 <== NOT EXECUTED a000df7c: eaffffc5 b a000de98 <== NOT EXECUTED case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a000df80: e59d303c ldr r3, [sp, #60] ; 0x3c a000df84: e59d1000 ldr r1, [sp] /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { a000df88: e08a4007 add r4, sl, r7 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a000df8c: e0633007 rsb r3, r3, r7 a000df90: e08a3003 add r3, sl, r3 a000df94: e5813000 str r3, [r1] /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { a000df98: e7da0007 ldrb r0, [sl, r7] a000df9c: e3500000 cmp r0, #0 a000dfa0: 1a000003 bne a000dfb4 a000dfa4: ea000021 b a000e030 a000dfa8: e5f40001 ldrb r0, [r4, #1]! <== NOT EXECUTED a000dfac: e3500000 cmp r0, #0 <== NOT EXECUTED a000dfb0: 0a00001e beq a000e030 <== NOT EXECUTED if ( !IMFS_is_separator( path[ i ] ) ) a000dfb4: ebffe4cf bl a00072f8 <== NOT EXECUTED a000dfb8: e3500000 cmp r0, #0 <== NOT EXECUTED a000dfbc: 1afffff9 bne a000dfa8 <== NOT EXECUTED a000dfc0: eaffffe4 b a000df58 <== NOT EXECUTED * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a000dfc4: e1a00006 mov r0, r6 a000dfc8: ebfffe71 bl a000d994 a000dfcc: e3500000 cmp r0, #0 a000dfd0: 0a000022 beq a000e060 a000dfd4: e5963000 ldr r3, [r6] a000dfd8: eaffffb4 b a000deb0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; a000dfdc: e28cc008 add ip, ip, #8 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; a000dfe0: e28d4028 add r4, sp, #40 ; 0x28 a000dfe4: e8bc000f ldm ip!, {r0, r1, r2, r3} a000dfe8: e8a4000f stmia r4!, {r0, r1, r2, r3} *pathloc = newloc; a000dfec: e28de028 add lr, sp, #40 ; 0x28 a000dff0: e8be000f ldm lr!, {r0, r1, r2, r3} a000dff4: e1a0e006 mov lr, r6 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; a000dff8: e59cc000 ldr ip, [ip] *pathloc = newloc; a000dffc: e8ae000f stmia lr!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a000e000: e59d003c ldr r0, [sp, #60] ; 0x3c * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; a000e004: e58ec000 str ip, [lr] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a000e008: e596300c ldr r3, [r6, #12] a000e00c: e0600007 rsb r0, r0, r7 * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; a000e010: e584c000 str ip, [r4] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a000e014: e5933004 ldr r3, [r3, #4] a000e018: e08a0000 add r0, sl, r0 a000e01c: e1a01006 mov r1, r6 a000e020: e59d2000 ldr r2, [sp] a000e024: e12fff33 blx r3 a000e028: e1a05000 mov r5, r0 a000e02c: eaffff99 b a000de98 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a000e030: e1a00006 mov r0, r6 a000e034: ebfffe31 bl a000d900 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a000e038: e5963000 ldr r3, [r6] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a000e03c: e1a05000 mov r5, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a000e040: e593304c ldr r3, [r3, #76] ; 0x4c a000e044: e3530001 cmp r3, #1 a000e048: 1a000009 bne a000e074 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a000e04c: e1a00006 mov r0, r6 a000e050: e3a01003 mov r1, #3 a000e054: ebfffe4e bl a000d994 a000e058: e3500000 cmp r0, #0 a000e05c: 1affff8d bne a000de98 rtems_set_errno_and_return_minus_one( EACCES ); a000e060: eb001019 bl a00120cc <__errno> a000e064: e3a0300d mov r3, #13 a000e068: e5803000 str r3, [r0] a000e06c: e3e05000 mvn r5, #0 a000e070: eaffff88 b a000de98 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a000e074: eb001014 bl a00120cc <__errno> <== NOT EXECUTED a000e078: e3a03014 mov r3, #20 <== NOT EXECUTED a000e07c: e5803000 str r3, [r0] <== NOT EXECUTED a000e080: e3e05000 mvn r5, #0 <== NOT EXECUTED a000e084: eaffff83 b a000de98 <== NOT EXECUTED * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; a000e088: e28cc01c add ip, ip, #28 a000e08c: eaffffd3 b a000dfe0 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a000e090: e1a00006 mov r0, r6 <== NOT EXECUTED a000e094: e3a01000 mov r1, #0 <== NOT EXECUTED a000e098: ebffff2e bl a000dd58 <== NOT EXECUTED if ( result == -1 ) a000e09c: e3700001 cmn r0, #1 <== NOT EXECUTED if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a000e0a0: e1a05000 mov r5, r0 <== NOT EXECUTED if ( result == -1 ) a000e0a4: 0affff7b beq a000de98 <== NOT EXECUTED a000e0a8: e5965000 ldr r5, [r6] <== NOT EXECUTED a000e0ac: eaffff8e b a000deec <== NOT EXECUTED =============================================================================== a000d9fc : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000d9fc: e92d4030 push {r4, r5, lr} IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; a000da00: e5903000 ldr r3, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000da04: e1a04000 mov r4, r0 a000da08: e1a05001 mov r5, r1 IMFS_assert( jnode->type == IMFS_HARD_LINK ); /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; a000da0c: e5933050 ldr r3, [r3, #80] ; 0x50 a000da10: e5803000 str r3, [r0] IMFS_Set_handlers( node ); a000da14: ebffffb9 bl a000d900 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a000da18: e1a00004 mov r0, r4 a000da1c: e1a01005 mov r1, r5 a000da20: ebffffdb bl a000d994 a000da24: e3500000 cmp r0, #0 a000da28: 0a000001 beq a000da34 rtems_set_errno_and_return_minus_one( EACCES ); return result; a000da2c: e3a00000 mov r0, #0 } a000da30: e8bd8030 pop {r4, r5, pc} /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); a000da34: eb0011a4 bl a00120cc <__errno> <== NOT EXECUTED a000da38: e3a0300d mov r3, #13 <== NOT EXECUTED a000da3c: e5803000 str r3, [r0] <== NOT EXECUTED a000da40: e3e00000 mvn r0, #0 <== NOT EXECUTED a000da44: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000dd58 : */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000dd58: e92d40f0 push {r4, r5, r6, r7, lr} */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); a000dd5c: e59f60c4 ldr r6, [pc, #196] ; a000de28 */ int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000dd60: e1a05000 mov r5, r0 a000dd64: e1a07001 mov r7, r1 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); a000dd68: e5962000 ldr r2, [r6] a000dd6c: ea000004 b a000dd84 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) a000dd70: e3530004 cmp r3, #4 a000dd74: 0a00001b beq a000dde8 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || a000dd78: e2433003 sub r3, r3, #3 a000dd7c: e3530001 cmp r3, #1 a000dd80: 8a000014 bhi a000ddd8 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000dd84: e1d233b0 ldrh r3, [r2, #48] ; 0x30 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; a000dd88: e5954000 ldr r4, [r5] /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000dd8c: e2833001 add r3, r3, #1 a000dd90: e1a03803 lsl r3, r3, #16 a000dd94: e1a03823 lsr r3, r3, #16 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { a000dd98: e3530005 cmp r3, #5 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; a000dd9c: e1c233b0 strh r3, [r2, #48] ; 0x30 if ( rtems_filesystem_link_counts > MAXSYMLINK ) { a000dda0: 8a000019 bhi a000de0c /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) a000dda4: e594304c ldr r3, [r4, #76] ; 0x4c a000dda8: e3530003 cmp r3, #3 a000ddac: 1affffef bne a000dd70 result = IMFS_evaluate_hard_link( node, flags ); a000ddb0: e1a00005 mov r0, r5 a000ddb4: e1a01007 mov r1, r7 a000ddb8: ebffff0f bl a000d9fc else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); a000ddbc: e3500000 cmp r0, #0 a000ddc0: 1a00000d bne a000ddfc a000ddc4: e594304c ldr r3, [r4, #76] ; 0x4c a000ddc8: e5962000 ldr r2, [r6] result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || a000ddcc: e2433003 sub r3, r3, #3 a000ddd0: e3530001 cmp r3, #1 a000ddd4: 9affffea bls a000dd84 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; a000ddd8: e3a03000 mov r3, #0 result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || a000dddc: e3a00000 mov r0, #0 /* * Clear link counter. */ rtems_filesystem_link_counts = 0; a000dde0: e1c233b0 strh r3, [r2, #48] ; 0x30 return result; } a000dde4: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); a000dde8: e1a00005 mov r0, r5 a000ddec: e1a01007 mov r1, r7 a000ddf0: ebffffb3 bl a000dcc4 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); a000ddf4: e3500000 cmp r0, #0 a000ddf8: 0afffff1 beq a000ddc4 a000ddfc: e5962000 ldr r2, [r6] <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; a000de00: e3a03000 mov r3, #0 <== NOT EXECUTED a000de04: e1c233b0 strh r3, [r2, #48] ; 0x30 <== NOT EXECUTED return result; } a000de08: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED * Increment and check the link counter. */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; a000de0c: e3a03000 mov r3, #0 <== NOT EXECUTED a000de10: e1c233b0 strh r3, [r2, #48] ; 0x30 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ELOOP ); a000de14: eb0010ac bl a00120cc <__errno> <== NOT EXECUTED a000de18: e3a0305c mov r3, #92 ; 0x5c <== NOT EXECUTED a000de1c: e5803000 str r3, [r0] <== NOT EXECUTED a000de20: e3e00000 mvn r0, #0 <== NOT EXECUTED a000de24: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a000d994 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a000d994: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { a000d998: e92d4070 push {r4, r5, r6, lr} a000d99c: e1a05001 mov r5, r1 uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) a000d9a0: 1a000010 bne a000d9e8 rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; a000d9a4: e5904000 ldr r4, [r0] #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a000d9a8: eb000317 bl a000e60c a000d9ac: e1a06000 mov r6, r0 st_gid = getegid(); a000d9b0: eb000310 bl a000e5f8 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) a000d9b4: e1d433bc ldrh r3, [r4, #60] ; 0x3c a000d9b8: e1530006 cmp r3, r6 flags_to_test <<= 6; a000d9bc: 01a05305 lsleq r5, r5, #6 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) a000d9c0: 0a000002 beq a000d9d0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) a000d9c4: e1d433be ldrh r3, [r4, #62] ; 0x3e <== NOT EXECUTED a000d9c8: e1530000 cmp r3, r0 <== NOT EXECUTED flags_to_test <<= 3; a000d9cc: 01a05185 lsleq r5, r5, #3 <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) a000d9d0: e5940030 ldr r0, [r4, #48] ; 0x30 a000d9d4: e0050000 and r0, r5, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); a000d9d8: e1550000 cmp r5, r0 a000d9dc: 13a00000 movne r0, #0 a000d9e0: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } a000d9e4: e8bd8070 pop {r4, r5, r6, pc} gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); a000d9e8: eb0011b7 bl a00120cc <__errno> <== NOT EXECUTED a000d9ec: e3a03001 mov r3, #1 <== NOT EXECUTED a000d9f0: e5803000 str r3, [r0] <== NOT EXECUTED a000d9f4: e3e00000 mvn r0, #0 <== NOT EXECUTED a000d9f8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a000dcc4 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000dcc4: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; a000dcc8: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000dccc: e24dd004 sub sp, sp, #4 a000dcd0: e1a04000 mov r4, r0 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; a000dcd4: e5963008 ldr r3, [r6, #8] rtems_filesystem_get_sym_start_loc( a000dcd8: e1a02000 mov r2, r0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a000dcdc: e1a05001 mov r5, r1 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; a000dce0: e5803000 str r3, [r0] rtems_filesystem_get_sym_start_loc( a000dce4: e1a0100d mov r1, sp a000dce8: e5960050 ldr r0, [r6, #80] ; 0x50 a000dcec: eb0003b6 bl a000ebcc ); /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( a000dcf0: e59d3000 ldr r3, [sp] a000dcf4: e5966050 ldr r6, [r6, #80] ; 0x50 a000dcf8: e0866003 add r6, r6, r3 a000dcfc: e1a00006 mov r0, r6 a000dd00: eb0014db bl a0013074 a000dd04: e1a02005 mov r2, r5 a000dd08: e1a01000 mov r1, r0 a000dd0c: e1a03004 mov r3, r4 a000dd10: e1a00006 mov r0, r6 a000dd14: ebffff4b bl a000da48 a000dd18: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); a000dd1c: e1a00004 mov r0, r4 a000dd20: ebfffef6 bl a000d900 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a000dd24: e1a00004 mov r0, r4 a000dd28: e1a01005 mov r1, r5 a000dd2c: ebffff18 bl a000d994 a000dd30: e3500000 cmp r0, #0 a000dd34: 0a000002 beq a000dd44 rtems_set_errno_and_return_minus_one( EACCES ); return result; } a000dd38: e1a00006 mov r0, r6 a000dd3c: e28dd004 add sp, sp, #4 a000dd40: e8bd8070 pop {r4, r5, r6, pc} /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); a000dd44: eb0010e0 bl a00120cc <__errno> <== NOT EXECUTED a000dd48: e3a0300d mov r3, #13 <== NOT EXECUTED a000dd4c: e5803000 str r3, [r0] <== NOT EXECUTED a000dd50: e3e06000 mvn r6, #0 <== NOT EXECUTED a000dd54: eafffff7 b a000dd38 <== NOT EXECUTED =============================================================================== a0011678 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { a0011678: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED a001167c: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; a0011680: e5904000 ldr r4, [r0] <== NOT EXECUTED int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { a0011684: e1a06001 mov r6, r1 <== NOT EXECUTED /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); a0011688: ebfff3df bl a000e60c <== NOT EXECUTED if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) a001168c: e1d453bc ldrh r5, [r4, #60] ; 0x3c <== NOT EXECUTED a0011690: e3500000 cmp r0, #0 <== NOT EXECUTED a0011694: 11550000 cmpne r5, r0 <== NOT EXECUTED a0011698: 03a05000 moveq r5, #0 <== NOT EXECUTED a001169c: 13a05001 movne r5, #1 <== NOT EXECUTED a00116a0: 1a00000d bne a00116dc <== 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); a00116a4: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a00116a8: e1a06a06 lsl r6, r6, #20 <== NOT EXECUTED IMFS_update_ctime( jnode ); a00116ac: e1a0000d mov r0, sp <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a00116b0: e3c33eff bic r3, r3, #4080 ; 0xff0 <== NOT EXECUTED a00116b4: e3c3300f bic r3, r3, #15 <== NOT EXECUTED jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); a00116b8: e1836a26 orr r6, r3, r6, lsr #20 <== NOT EXECUTED a00116bc: e5846030 str r6, [r4, #48] ; 0x30 <== NOT EXECUTED IMFS_update_ctime( jnode ); a00116c0: e1a01005 mov r1, r5 <== NOT EXECUTED a00116c4: ebffd37d bl a00064c0 <== NOT EXECUTED a00116c8: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; a00116cc: e1a00005 mov r0, r5 <== NOT EXECUTED */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); a00116d0: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a00116d4: e28dd008 add sp, sp, #8 <== NOT EXECUTED a00116d8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); a00116dc: eb00027a bl a00120cc <__errno> <== NOT EXECUTED a00116e0: e3a03001 mov r3, #1 <== NOT EXECUTED a00116e4: e5803000 str r3, [r0] <== NOT EXECUTED a00116e8: e3e00000 mvn r0, #0 <== NOT EXECUTED a00116ec: eafffff8 b a00116d4 <== NOT EXECUTED =============================================================================== a00116f0 : int IMFS_fdatasync( rtems_libio_t *iop ) { return 0; } a00116f0: e3a00000 mov r0, #0 <== NOT EXECUTED a00116f4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a00070cc : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a00070cc: e1a03000 mov r3, r0 int err; if (command == FIONBIO) { a00070d0: e59f0070 ldr r0, [pc, #112] ; a0007148 int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a00070d4: e92d4010 push {r4, lr} int err; if (command == FIONBIO) { a00070d8: e1510000 cmp r1, r0 a00070dc: 0a000007 beq a0007100 iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); a00070e0: e5930018 ldr r0, [r3, #24] <== NOT EXECUTED a00070e4: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED a00070e8: eb0027d0 bl a0011030 <== NOT EXECUTED IMFS_FIFO_RETURN(err); a00070ec: e2502000 subs r2, r0, #0 <== NOT EXECUTED a00070f0: b2624000 rsblt r4, r2, #0 <== NOT EXECUTED a00070f4: ba00000f blt a0007138 <== NOT EXECUTED } a00070f8: e1a00002 mov r0, r2 a00070fc: e8bd8010 pop {r4, pc} ) { int err; if (command == FIONBIO) { if (buffer == NULL) a0007100: e3520000 cmp r2, #0 a0007104: 0a00000a beq a0007134 err = -EFAULT; else { if (*(int *)buffer) a0007108: e5922000 ldr r2, [r2] a000710c: e3520000 cmp r2, #0 iop->flags |= LIBIO_FLAGS_NO_DELAY; a0007110: 15931014 ldrne r1, [r3, #20] else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0007114: 05931014 ldreq r1, [r3, #20] return 0; a0007118: 13a02000 movne r2, #0 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; a000711c: 13811001 orrne r1, r1, #1 else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0007120: 03c11001 biceq r1, r1, #1 if (command == FIONBIO) { if (buffer == NULL) err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; a0007124: 15831014 strne r1, [r3, #20] else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; a0007128: 05831014 streq r1, [r3, #20] } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } a000712c: e1a00002 mov r0, r2 a0007130: e8bd8010 pop {r4, pc} ) { int err; if (command == FIONBIO) { if (buffer == NULL) a0007134: e3a0400e mov r4, #14 } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); a0007138: eb00353a bl a0014628 <__errno> a000713c: e3e02000 mvn r2, #0 a0007140: e5804000 str r4, [r0] a0007144: eaffffeb b a00070f8 =============================================================================== a000723c : uint32_t mode ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); a000723c: e5903018 ldr r3, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a0007240: e92d4010 push {r4, lr} a0007244: e1a01000 mov r1, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); a0007248: e2830050 add r0, r3, #80 ; 0x50 a000724c: eb002561 bl a00107d8 IMFS_FIFO_RETURN(err); a0007250: e2504000 subs r4, r0, #0 a0007254: ba000001 blt a0007260 } a0007258: e1a00004 mov r0, r4 a000725c: e8bd8010 pop {r4, pc} ) { IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); a0007260: eb0034f0 bl a0014628 <__errno> <== NOT EXECUTED a0007264: e2644000 rsb r4, r4, #0 <== NOT EXECUTED a0007268: e5804000 str r4, [r0] <== NOT EXECUTED a000726c: e3e04000 mvn r4, #0 <== NOT EXECUTED a0007270: eafffff8 b a0007258 <== NOT EXECUTED =============================================================================== a00071ac : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a00071ac: e92d4030 push {r4, r5, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; a00071b0: e5904018 ldr r4, [r0, #24] ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { a00071b4: e1a03000 mov r3, r0 a00071b8: e24dd008 sub sp, sp, #8 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); a00071bc: e5940050 ldr r0, [r4, #80] ; 0x50 a00071c0: eb0026a7 bl a0010c64 if (err > 0) a00071c4: e2505000 subs r5, r0, #0 a00071c8: da000007 ble a00071ec IMFS_update_atime(jnode); a00071cc: e1a0000d mov r0, sp a00071d0: e3a01000 mov r1, #0 a00071d4: eb000414 bl a000822c a00071d8: e59d3000 ldr r3, [sp] a00071dc: e1a00005 mov r0, r5 a00071e0: e5843040 str r3, [r4, #64] ; 0x40 IMFS_FIFO_RETURN(err); } a00071e4: e28dd008 add sp, sp, #8 a00071e8: e8bd8030 pop {r4, r5, pc} int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); a00071ec: 01a00005 moveq r0, r5 a00071f0: 0afffffb beq a00071e4 a00071f4: eb00350b bl a0014628 <__errno> a00071f8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a00071fc: e5805000 str r5, [r0] <== NOT EXECUTED a0007200: e3e00000 mvn r0, #0 <== NOT EXECUTED a0007204: eafffff6 b a00071e4 <== NOT EXECUTED =============================================================================== a000714c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a000714c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; a0007150: e5904018 ldr r4, [r0, #24] <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a0007154: e1a03000 mov r3, r0 <== NOT EXECUTED a0007158: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); a000715c: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED a0007160: eb00272b bl a0010e14 <== NOT EXECUTED if (err > 0) { a0007164: e2505000 subs r5, r0, #0 <== NOT EXECUTED a0007168: da000008 ble a0007190 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); a000716c: e1a0000d mov r0, sp <== NOT EXECUTED a0007170: e3a01000 mov r1, #0 <== NOT EXECUTED a0007174: eb00042c bl a000822c <== NOT EXECUTED a0007178: e59d3000 ldr r3, [sp] <== NOT EXECUTED a000717c: e1a00005 mov r0, r5 <== NOT EXECUTED a0007180: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED a0007184: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } a0007188: e28dd008 add sp, sp, #8 <== NOT EXECUTED a000718c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); a0007190: 01a00005 moveq r0, r5 <== NOT EXECUTED a0007194: 0afffffb beq a0007188 <== NOT EXECUTED a0007198: eb003522 bl a0014628 <__errno> <== NOT EXECUTED a000719c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED a00071a0: e5805000 str r5, [r0] <== NOT EXECUTED a00071a4: e3e00000 mvn r0, #0 <== NOT EXECUTED a00071a8: eafffff6 b a0007188 <== NOT EXECUTED =============================================================================== a000e0b4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000e0b4: e92d4070 push {r4, r5, r6, lr} /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; a000e0b8: e1a0c000 mov ip, r0 a000e0bc: e5bc401c ldr r4, [ip, #28]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000e0c0: e24dd014 sub sp, sp, #20 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a000e0c4: e1a0600d mov r6, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a000e0c8: e1a0e000 mov lr, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a000e0cc: e8bc000f ldm ip!, {r0, r1, r2, r3} a000e0d0: e8a6000f stmia r6!, {r0, r1, r2, r3} a000e0d4: e59c2000 ldr r2, [ip] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a000e0d8: e3a01000 mov r1, #0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a000e0dc: e1a0500d mov r5, sp /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a000e0e0: e58e101c str r1, [lr, #28] * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a000e0e4: e5862000 str r2, [r6] temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a000e0e8: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a000e0ec: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; a000e0f0: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); a000e0f4: ebfffe01 bl a000d900 if ( jnode->type != IMFS_DIRECTORY ) { a000e0f8: e594304c ldr r3, [r4, #76] ; 0x4c RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000e0fc: e2842054 add r2, r4, #84 ; 0x54 a000e100: e3530001 cmp r3, #1 a000e104: 1a000010 bne a000e14c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { a000e108: e5943050 ldr r3, [r4, #80] ; 0x50 a000e10c: e1530002 cmp r3, r2 a000e110: 0a000014 beq a000e168 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { a000e114: e3540000 cmp r4, #0 a000e118: 0a000008 beq a000e140 if ( jnode->type == IMFS_DIRECTORY ) { a000e11c: e594304c ldr r3, [r4, #76] ; 0x4c a000e120: e3530001 cmp r3, #1 a000e124: 1affffef bne a000e0e8 } } } while (jnode != NULL); return 0; } a000e128: e5943050 ldr r3, [r4, #80] ; 0x50 a000e12c: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) a000e130: e1530002 cmp r3, r2 a000e134: 0affffeb beq a000e0e8 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a000e138: e2534000 subs r4, r3, #0 a000e13c: 1affffe9 bne a000e0e8 return 0; a000e140: e1a00004 mov r0, r4 } a000e144: e28dd014 add sp, sp, #20 a000e148: e8bd8070 pop {r4, r5, r6, pc} next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); if ( jnode->type != IMFS_DIRECTORY ) { result = IMFS_unlink( NULL, &loc ); a000e14c: e1a0100d mov r1, sp a000e150: e3a00000 mov r0, #0 a000e154: ebffdf67 bl a0005ef8 if (result != 0) a000e158: e3500000 cmp r0, #0 a000e15c: 1a000006 bne a000e17c jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; a000e160: e1a04006 mov r4, r6 a000e164: eaffffea b a000e114 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); a000e168: e3a00000 mov r0, #0 a000e16c: e1a0100d mov r1, sp a000e170: ebffdf60 bl a0005ef8 if (result != 0) a000e174: e3500000 cmp r0, #0 a000e178: 0afffff8 beq a000e160 return -1; a000e17c: e3e00000 mvn r0, #0 <== NOT EXECUTED a000e180: eaffffef b a000e144 <== NOT EXECUTED =============================================================================== a000e208 : const char *path, int pathlen, char *token, int *token_len ) { a000e208: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a000e20c: e1a05001 mov r5, r1 a000e210: e1a04002 mov r4, r2 a000e214: e1a0a003 mov sl, r3 register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; a000e218: e5d07000 ldrb r7, [r0] a000e21c: e1a08000 mov r8, r0 int pathlen, char *token, int *token_len ) { register int i = 0; a000e220: e3a06000 mov r6, #0 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { a000e224: ea000006 b a000e244 a000e228: e1560005 cmp r6, r5 a000e22c: aa000008 bge a000e254 token[i] = c; if ( i == IMFS_NAME_MAX ) a000e230: e3560020 cmp r6, #32 * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; a000e234: e7c47006 strb r7, [r4, r6] if ( i == IMFS_NAME_MAX ) a000e238: 0a00001b beq a000e2ac return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; a000e23c: e5f87001 ldrb r7, [r8, #1]! a000e240: e2866001 add r6, r6, #1 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { a000e244: e1a00007 mov r0, r7 a000e248: ebffe42a bl a00072f8 a000e24c: e3500000 cmp r0, #0 a000e250: 0afffff4 beq a000e228 /* * Copy a seperator into token. */ if ( i == 0 ) { a000e254: e3560000 cmp r6, #0 a000e258: 1a000006 bne a000e278 token[i] = c; if ( (token[i] != '\0') && pathlen ) { a000e25c: e3570000 cmp r7, #0 a000e260: 13550000 cmpne r5, #0 i++; type = IMFS_CURRENT_DIR; a000e264: 13a06001 movne r6, #1 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; a000e268: e5c47000 strb r7, [r4] if ( (token[i] != '\0') && pathlen ) { i++; a000e26c: e1a00006 mov r0, r6 /* * Set token_len to the number of characters copied. */ *token_len = i; a000e270: e58a6000 str r6, [sl] a000e274: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { a000e278: e0843006 add r3, r4, r6 a000e27c: e5533001 ldrb r3, [r3, #-1] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) a000e280: e1a00004 mov r0, r4 a000e284: e59f1044 ldr r1, [pc, #68] ; a000e2d0 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { a000e288: e3530000 cmp r3, #0 token[i] = '\0'; a000e28c: 13a03000 movne r3, #0 a000e290: 17c43006 strbne r3, [r4, r6] /* * Set token_len to the number of characters copied. */ *token_len = i; a000e294: e58a6000 str r6, [sl] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) a000e298: eb001299 bl a0012d04 a000e29c: e3500000 cmp r0, #0 a000e2a0: 1a000003 bne a000e2b4 type = IMFS_UP_DIR; a000e2a4: e3a00002 mov r0, #2 else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } a000e2a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { token[i] = c; if ( i == IMFS_NAME_MAX ) return IMFS_INVALID_TOKEN; a000e2ac: e3a00004 mov r0, #4 <== NOT EXECUTED a000e2b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) a000e2b4: e1a00004 mov r0, r4 a000e2b8: e59f1014 ldr r1, [pc, #20] ; a000e2d4 a000e2bc: eb001290 bl a0012d04 a000e2c0: e3500000 cmp r0, #0 a000e2c4: 03a00001 moveq r0, #1 a000e2c8: 13a00003 movne r0, #3 a000e2cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a0005adc : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { a0005adc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a0005ae0: e1a08001 mov r8, r1 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, a0005ae4: e59f10e0 ldr r1, [pc, #224] ; a0005bcc const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { a0005ae8: e1a04000 mov r4, r0 a0005aec: e1a0a002 mov sl, r2 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, a0005af0: e5911000 ldr r1, [r1] const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { a0005af4: e1a07003 mov r7, r3 /* * 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) { a0005af8: e3510010 cmp r1, #16 a0005afc: 0a00000a beq a0005b2c is_valid = true; break; } if(bit_mask > requested_bytes_per_block) a0005b00: e351000f cmp r1, #15 a0005b04: c3a02005 movgt r2, #5 a0005b08: c3a03020 movgt r3, #32 a0005b0c: da000005 ble a0005b28 /* * 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) { a0005b10: e1510003 cmp r1, r3 a0005b14: 0a000004 beq a0005b2c is_valid = true; break; } if(bit_mask > requested_bytes_per_block) a0005b18: ba000002 blt a0005b28 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { a0005b1c: e2522001 subs r2, r2, #1 a0005b20: e1a03083 lsl r3, r3, #1 a0005b24: 1afffff9 bne a0005b10 if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); a0005b28: e3a01080 mov r1, #128 ; 0x80 break; } if(bit_mask > requested_bytes_per_block) break; } *dest_bytes_per_block = ((is_valid) a0005b2c: e59f509c ldr r5, [pc, #156] ; a0005bd0 a0005b30: e5851000 str r1, [r5] /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); a0005b34: eb001f61 bl a000d8c0 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; a0005b38: e59fe094 ldr lr, [pc, #148] ; a0005bd4 a0005b3c: e284c038 add ip, r4, #56 ; 0x38 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); a0005b40: e584001c str r0, [r4, #28] a0005b44: e1a06000 mov r6, r0 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; a0005b48: e8be000f ldm lr!, {r0, r1, r2, r3} a0005b4c: e8ac000f stmia ip!, {r0, r1, r2, r3} a0005b50: e8be000f ldm lr!, {r0, r1, r2, r3} a0005b54: e8ac000f stmia ip!, {r0, r1, r2, r3} a0005b58: e89e000f ldm lr, {r0, r1, r2, r3} * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; a0005b5c: e5847024 str r7, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; a0005b60: e88c000f stm ip, {r0, r1, r2, r3} * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; a0005b64: e5848028 str r8, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); a0005b68: e3a00001 mov r0, #1 a0005b6c: e3a01014 mov r1, #20 a0005b70: eb0001af bl a0006234 if ( !fs_info ) { a0005b74: e3500000 cmp r0, #0 a0005b78: 0a00000c beq a0005bb0 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; a0005b7c: e5952004 ldr r2, [r5, #4] fs_info->ino_count = 1; a0005b80: e3a03001 mov r3, #1 fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; a0005b84: e5840034 str r0, [r4, #52] ; 0x34 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; a0005b88: e0821003 add r1, r2, r3 a0005b8c: e5802000 str r2, [r0] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; a0005b90: e59d201c ldr r2, [sp, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1; a0005b94: e9800408 stmib r0, {r3, sl} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; a0005b98: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; a0005b9c: e5802010 str r2, [r0, #16] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; a0005ba0: e5851004 str r1, [r5, #4] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; a0005ba4: e5863038 str r3, [r6, #56] ; 0x38 return 0; a0005ba8: e3a00000 mov r0, #0 } a0005bac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); a0005bb0: e1a00006 mov r0, r6 <== NOT EXECUTED a0005bb4: eb00020c bl a00063ec <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); a0005bb8: eb003143 bl a00120cc <__errno> <== NOT EXECUTED a0005bbc: e3a0300c mov r3, #12 <== NOT EXECUTED a0005bc0: e5803000 str r3, [r0] <== NOT EXECUTED a0005bc4: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005bc8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a0005bd8 : int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; a0005bd8: e5903000 ldr r3, [r0] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { a0005bdc: e92d4070 push {r4, r5, r6, lr} a0005be0: e1a06002 mov r6, r2 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) a0005be4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { a0005be8: e24dd048 sub sp, sp, #72 ; 0x48 a0005bec: e1a05001 mov r5, r1 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) a0005bf0: e3520007 cmp r2, #7 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; a0005bf4: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) a0005bf8: 8a00001e bhi a0005c78 rtems_set_errno_and_return_minus_one( EMLINK ); /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); a0005bfc: e1a00006 mov r0, r6 a0005c00: eb00351b bl a0013074 a0005c04: e28d4004 add r4, sp, #4 a0005c08: e1a01000 mov r1, r0 a0005c0c: e1a02004 mov r2, r4 a0005c10: e28d3044 add r3, sp, #68 ; 0x44 a0005c14: e1a00006 mov r0, r6 a0005c18: eb00217a bl a000e208 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( a0005c1c: e28d2028 add r2, sp, #40 ; 0x28 a0005c20: e3a03ca2 mov r3, #41472 ; 0xa200 a0005c24: e58d2000 str r2, [sp] a0005c28: e3a01003 mov r1, #3 a0005c2c: e1a00005 mov r0, r5 a0005c30: e1a02004 mov r2, r4 a0005c34: e2433001 sub r3, r3, #1 a0005c38: eb001ecc bl a000d770 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) a0005c3c: e3500000 cmp r0, #0 a0005c40: 0a000011 beq a0005c8c rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; a0005c44: e59d3028 ldr r3, [sp, #40] ; 0x28 IMFS_update_ctime( info.hard_link.link_node ); a0005c48: e28d003c add r0, sp, #60 ; 0x3c a0005c4c: e3a01000 mov r1, #0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; a0005c50: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a0005c54: e2822001 add r2, r2, #1 a0005c58: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); a0005c5c: eb000217 bl a00064c0 a0005c60: e59d203c ldr r2, [sp, #60] ; 0x3c a0005c64: e59d3028 ldr r3, [sp, #40] ; 0x28 return 0; a0005c68: e3a00000 mov r0, #0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); a0005c6c: e5832048 str r2, [r3, #72] ; 0x48 return 0; } a0005c70: e28dd048 add sp, sp, #72 ; 0x48 a0005c74: e8bd8070 pop {r4, r5, r6, pc} /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); a0005c78: eb003113 bl a00120cc <__errno> <== NOT EXECUTED a0005c7c: e3a0301f mov r3, #31 <== NOT EXECUTED a0005c80: e5803000 str r3, [r0] <== NOT EXECUTED a0005c84: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005c88: eafffff8 b a0005c70 <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); a0005c8c: eb00310e bl a00120cc <__errno> <== NOT EXECUTED a0005c90: e3a0300c mov r3, #12 <== NOT EXECUTED a0005c94: e5803000 str r3, [r0] <== NOT EXECUTED a0005c98: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005c9c: eafffff3 b a0005c70 <== NOT EXECUTED =============================================================================== a0010a08 : */ MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { a0010a08: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a0010a0c: e3a02001 mov r2, #1 a0010a10: ebfffee9 bl a00105bc if ( *block_entry_ptr ) a0010a14: e5904000 ldr r4, [r0] IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Obtain the pointer for the specified block number */ block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a0010a18: e1a05000 mov r5, r0 if ( *block_entry_ptr ) a0010a1c: e3540000 cmp r4, #0 a0010a20: 0a000001 beq a0010a2c return 0; a0010a24: e3a00000 mov r0, #0 a0010a28: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); a0010a2c: ebfffed5 bl a0010588 if ( !memory ) a0010a30: e3500000 cmp r0, #0 a0010a34: 0a000002 beq a0010a44 return 1; *block_entry_ptr = memory; a0010a38: e5850000 str r0, [r5] return 0; a0010a3c: e1a00004 mov r0, r4 a0010a40: e8bd8030 pop {r4, r5, pc} /* * There is no memory for this block number so allocate it. */ memory = memfile_alloc_block(); if ( !memory ) return 1; a0010a44: e3a00001 mov r0, #1 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } a0010a48: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a0010c34 : IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a0010c34: e59f3128 ldr r3, [pc, #296] ; a0010d64 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a0010c38: e92d4df0 push {r4, r5, r6, r7, r8, sl, fp, lr} IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a0010c3c: e593b000 ldr fp, [r3] a0010c40: e3a03000 mov r3, #0 a0010c44: e1530002 cmp r3, r2 a0010c48: e1a0312b lsr r3, fp, #2 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a0010c4c: e1a06002 mov r6, r2 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a0010c50: e0223393 mla r2, r3, r3, r3 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a0010c54: e24dd004 sub sp, sp, #4 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a0010c58: e0233392 mla r3, r2, r3, r3 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a0010c5c: e1a04000 mov r4, r0 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a0010c60: e2433001 sub r3, r3, #1 */ MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a0010c64: e1a08001 mov r8, r1 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a0010c68: e003039b mul r3, fp, r3 a0010c6c: da000034 ble a0010d44 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) a0010c70: e5947054 ldr r7, [r4, #84] ; 0x54 a0010c74: e594a050 ldr sl, [r4, #80] ; 0x50 a0010c78: e1560007 cmp r6, r7 a0010c7c: da000027 ble a0010d20 return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010c80: e1a0cfcb asr ip, fp, #31 a0010c84: e1a0300c mov r3, ip a0010c88: e1a0200b mov r2, fp a0010c8c: e1a00008 mov r0, r8 a0010c90: e1a01006 mov r1, r6 a0010c94: e58dc000 str ip, [sp] a0010c98: eb001323 bl a001592c <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010c9c: e59dc000 ldr ip, [sp] return 0; /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010ca0: e1a05000 mov r5, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010ca4: e1a01007 mov r1, r7 a0010ca8: e1a0000a mov r0, sl a0010cac: e1a0200b mov r2, fp a0010cb0: e1a0300c mov r3, ip a0010cb4: eb00131c bl a001592c <__divdi3> /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a0010cb8: e1550000 cmp r5, r0 /* * 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; a0010cbc: e1a0a000 mov sl, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a0010cc0: 3a00001b bcc a0010d34 a0010cc4: e1a07000 mov r7, r0 a0010cc8: ea000002 b a0010cd8 a0010ccc: e2877001 add r7, r7, #1 a0010cd0: e1550007 cmp r5, r7 a0010cd4: 3a000016 bcc a0010d34 if ( IMFS_memfile_addblock( the_jnode, block ) ) { a0010cd8: e1a01007 mov r1, r7 a0010cdc: e1a00004 mov r0, r4 a0010ce0: ebffff48 bl a0010a08 a0010ce4: e3500000 cmp r0, #0 a0010ce8: 0afffff7 beq a0010ccc a0010cec: ea000003 b a0010d00 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); a0010cf0: e1a01007 mov r1, r7 <== NOT EXECUTED a0010cf4: e1a00004 mov r0, r4 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { a0010cf8: e2477001 sub r7, r7, #1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); a0010cfc: ebffffc2 bl a0010c0c <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { a0010d00: e15a0007 cmp sl, r7 <== NOT EXECUTED a0010d04: 9afffff9 bls a0010cf0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); a0010d08: eb0004ef bl a00120cc <__errno> <== NOT EXECUTED a0010d0c: e3a0301c mov r3, #28 <== NOT EXECUTED a0010d10: e5803000 str r3, [r0] <== NOT EXECUTED a0010d14: e3e00000 mvn r0, #0 <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } a0010d18: e28dd004 add sp, sp, #4 a0010d1c: e8bd8df0 pop {r4, r5, r6, r7, r8, sl, fp, pc} rtems_set_errno_and_return_minus_one( EINVAL ); /* * Verify new file size is actually larger than current size */ if ( new_length <= the_jnode->info.file.size ) a0010d20: 1a000001 bne a0010d2c a0010d24: e158000a cmp r8, sl a0010d28: 8affffd4 bhi a0010c80 return 0; a0010d2c: e3a00000 mov r0, #0 a0010d30: eafffff8 b a0010d18 } /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a0010d34: e5848050 str r8, [r4, #80] ; 0x50 a0010d38: e5846054 str r6, [r4, #84] ; 0x54 return 0; a0010d3c: e3a00000 mov r0, #0 a0010d40: eafffff4 b a0010d18 IMFS_assert( the_jnode->type == IMFS_MEMORY_FILE ); /* * Verify new file size is supported */ if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a0010d44: 1a000001 bne a0010d50 a0010d48: e1530001 cmp r3, r1 a0010d4c: 8affffc7 bhi a0010c70 rtems_set_errno_and_return_minus_one( EINVAL ); a0010d50: eb0004dd bl a00120cc <__errno> a0010d54: e3a03016 mov r3, #22 a0010d58: e5803000 str r3, [r0] a0010d5c: e3e00000 mvn r0, #0 a0010d60: eaffffec b a0010d18 =============================================================================== a00105bc : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a00105bc: e59f3200 ldr r3, [pc, #512] ; a00107c4 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a00105c0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a00105c4: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a00105c8: e24dd004 sub sp, sp, #4 a00105cc: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a00105d0: e1a05125 lsr r5, r5, #2 a00105d4: e2453001 sub r3, r5, #1 a00105d8: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a00105dc: e1a06002 mov r6, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a00105e0: 8a000007 bhi a0010604 p = info->indirect; if ( malloc_it ) { a00105e4: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a00105e8: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a00105ec: 0a00001c beq a0010664 if ( !p ) { a00105f0: e3500000 cmp r0, #0 a00105f4: 0a000041 beq a0010700 } if ( !p ) return 0; return &info->indirect[ my_block ]; a00105f8: e0800101 add r0, r0, r1, lsl #2 /* * This means the requested block number is out of range. */ return 0; } a00105fc: e28dd004 add sp, sp, #4 a0010600: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a0010604: e0275595 mla r7, r5, r5, r5 a0010608: e2473001 sub r3, r7, #1 a001060c: e1510003 cmp r1, r3 a0010610: 8a000016 bhi a0010670 my_block -= FIRST_DOUBLY_INDIRECT; a0010614: e0657001 rsb r7, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0010618: e1a00007 mov r0, r7 a001061c: e1a01005 mov r1, r5 a0010620: eb00148d bl a001585c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0010624: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0010628: e1a08000 mov r8, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a001062c: e1a00007 mov r0, r7 a0010630: eb001443 bl a0015744 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a0010634: 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; a0010638: e1a05000 mov r5, r0 p = info->doubly_indirect; a001063c: e594305c ldr r3, [r4, #92] ; 0x5c if ( malloc_it ) { a0010640: 0a00003f beq a0010744 if ( !p ) { a0010644: e3530000 cmp r3, #0 a0010648: 0a000045 beq a0010764 if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; a001064c: e7930105 ldr r0, [r3, r5, lsl #2] a0010650: e0835105 add r5, r3, r5, lsl #2 if ( !p1 ) { a0010654: e3500000 cmp r0, #0 a0010658: 0a00002f beq a001071c p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a001065c: e0800108 add r0, r0, r8, lsl #2 a0010660: eaffffe5 b a00105fc info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) a0010664: e3500000 cmp r0, #0 a0010668: 1affffe2 bne a00105f8 a001066c: eaffffe2 b a00105fc <== NOT EXECUTED } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a0010670: e0235597 mla r3, r7, r5, r5 a0010674: e2433001 sub r3, r3, #1 a0010678: e1510003 cmp r1, r3 } /* * This means the requested block number is out of range. */ return 0; a001067c: 83a00000 movhi r0, #0 } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a0010680: 8affffdd bhi a00105fc my_block -= FIRST_TRIPLY_INDIRECT; a0010684: e0677001 rsb r7, r7, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a0010688: e1a00007 mov r0, r7 a001068c: e1a01005 mov r1, r5 a0010690: eb001471 bl a001585c <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a0010694: 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; a0010698: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a001069c: e1a00007 mov r0, r7 a00106a0: eb001427 bl a0015744 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a00106a4: 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; a00106a8: e1a08000 mov r8, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a00106ac: eb001424 bl a0015744 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a00106b0: 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; a00106b4: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a00106b8: e1a00008 mov r0, r8 a00106bc: eb001466 bl a001585c <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a00106c0: 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; a00106c4: e1a05000 mov r5, r0 p = info->triply_indirect; a00106c8: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a00106cc: 0a000029 beq a0010778 if ( !p ) { a00106d0: e3500000 cmp r0, #0 a00106d4: 0a000035 beq a00107b0 if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; a00106d8: e7903107 ldr r3, [r0, r7, lsl #2] a00106dc: e0807107 add r7, r0, r7, lsl #2 if ( !p1 ) { a00106e0: e3530000 cmp r3, #0 a00106e4: 0a00002c beq a001079c if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; a00106e8: e7930105 ldr r0, [r3, r5, lsl #2] a00106ec: e0835105 add r5, r3, r5, lsl #2 if ( !p2 ) { a00106f0: e3500000 cmp r0, #0 a00106f4: 0a00000d beq a0010730 p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a00106f8: e080010a add r0, r0, sl, lsl #2 a00106fc: eaffffbe b a00105fc p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a0010700: e58d1000 str r1, [sp] a0010704: ebffff9f bl a0010588 if ( !p ) a0010708: e3500000 cmp r0, #0 a001070c: e59d1000 ldr r1, [sp] return 0; info->indirect = p; a0010710: 15840058 strne r0, [r4, #88] ; 0x58 if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); if ( !p ) a0010714: 1affffb7 bne a00105f8 a0010718: eaffffb7 b a00105fc <== NOT EXECUTED info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); a001071c: ebffff99 bl a0010588 if ( !p1 ) a0010720: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a0010724: 15850000 strne r0, [r5] p = (block_p *)p[ doubly ]; if ( !p ) return 0; return (block_p *)&p[ singly ]; a0010728: 10800108 addne r0, r0, r8, lsl #2 a001072c: eaffffb2 b a00105fc p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); a0010730: ebffff94 bl a0010588 if ( !p2 ) a0010734: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a0010738: 15850000 strne r0, [r5] p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; a001073c: 1080010a addne r0, r0, sl, lsl #2 a0010740: eaffffad b a00105fc } return (block_p *)&p1[ singly ]; } if ( !p ) a0010744: e3530000 cmp r3, #0 a0010748: 1a000001 bne a0010754 p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) return 0; a001074c: e1a00003 mov r0, r3 <== NOT EXECUTED a0010750: eaffffa9 b a00105fc <== NOT EXECUTED } if ( !p ) return 0; p = (block_p *)p[ doubly ]; a0010754: e7930100 ldr r0, [r3, r0, lsl #2] if ( !p ) a0010758: e3500000 cmp r0, #0 return 0; return (block_p *)&p[ singly ]; a001075c: 10800108 addne r0, r0, r8, lsl #2 a0010760: eaffffa5 b a00105fc p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a0010764: ebffff87 bl a0010588 if ( !p ) a0010768: e2503000 subs r3, r0, #0 a001076c: 0afffff6 beq a001074c return 0; info->doubly_indirect = p; a0010770: e584305c str r3, [r4, #92] ; 0x5c a0010774: eaffffb4 b a001064c p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a0010778: e3500000 cmp r0, #0 a001077c: 0affff9e beq a00105fc return 0; p1 = (block_p *) p[ triply ]; a0010780: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a0010784: e3500000 cmp r0, #0 a0010788: 0affff9b beq a00105fc return 0; p2 = (block_p *)p1[ doubly ]; a001078c: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a0010790: e3500000 cmp r0, #0 return 0; return (block_p *)&p2[ singly ]; a0010794: 1080010a addne r0, r0, sl, lsl #2 a0010798: eaffff97 b a00105fc info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); a001079c: ebffff79 bl a0010588 if ( !p1 ) a00107a0: e2503000 subs r3, r0, #0 a00107a4: 0affffe8 beq a001074c return 0; p[ triply ] = (block_p) p1; a00107a8: e5873000 str r3, [r7] a00107ac: eaffffcd b a00106e8 p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); a00107b0: ebffff74 bl a0010588 if ( !p ) a00107b4: e3500000 cmp r0, #0 a00107b8: 0affff8f beq a00105fc return 0; info->triply_indirect = p; a00107bc: e5840060 str r0, [r4, #96] ; 0x60 a00107c0: eaffffc4 b a00106d8 =============================================================================== a00107c8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a00107c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a00107cc: e1a09000 mov r9, r0 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { a00107d0: e590004c ldr r0, [r0, #76] ; 0x4c IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a00107d4: e24dd014 sub sp, sp, #20 a00107d8: e1a07001 mov r7, r1 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { a00107dc: e3500006 cmp r0, #6 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a00107e0: e1a08002 mov r8, r2 a00107e4: e1a0b003 mov fp, r3 a00107e8: e59d5038 ldr r5, [sp, #56] ; 0x38 * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { a00107ec: 0a00005c beq a0010964 /* * 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 ) a00107f0: e5992054 ldr r2, [r9, #84] ; 0x54 /* * 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: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) a00107f8: e3a01000 mov r1, #0 a00107fc: e1510002 cmp r1, r2 a0010800: e5992050 ldr r2, [r9, #80] ; 0x50 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; a0010804: e0851007 add r1, r5, r7 if ( last_byte > the_jnode->info.file.size ) a0010808: da00003d ble a0010904 my_length = the_jnode->info.file.size - start; a001080c: e0635002 rsb r5, r3, r2 */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010810: e59f61b8 ldr r6, [pc, #440] ; a00109d0 a0010814: e1a00007 mov r0, r7 a0010818: e1a01008 mov r1, r8 a001081c: e5964000 ldr r4, [r6] a0010820: e1a02004 mov r2, r4 a0010824: e1a03fc2 asr r3, r2, #31 a0010828: e98d000c stmib sp, {r2, r3} a001082c: eb00156b bl a0015de0 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010830: e99d000c ldmib sp, {r2, r3} */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010834: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010838: e1a01008 mov r1, r8 a001083c: e1a00007 mov r0, r7 a0010840: eb001439 bl a001592c <__divdi3> if ( start_offset ) { a0010844: 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; a0010848: e1a07000 mov r7, r0 unsigned int last_byte; unsigned int copied; unsigned int start_offset; unsigned char *dest; dest = destination; a001084c: 01a0800b moveq r8, fp /* * 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 ) { a0010850: 0a000014 beq a00108a8 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 ); a0010854: e1a00009 mov r0, r9 a0010858: e1a01007 mov r1, r7 a001085c: e3a02000 mov r2, #0 a0010860: ebffff55 bl a00105bc if ( !block_ptr ) a0010864: e3500000 cmp r0, #0 a0010868: 0a000023 beq a00108fc return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); a001086c: 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; a0010870: e06a3004 rsb r3, sl, r4 a0010874: e1550003 cmp r5, r3 a0010878: 31a03005 movcc r3, r5 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 ); a001087c: e081100a add r1, r1, sl a0010880: e1a02003 mov r2, r3 a0010884: e1a0000b mov r0, fp a0010888: e58d3000 str r3, [sp] a001088c: eb00083c bl a0012984 dest += to_copy; a0010890: e59d3000 ldr r3, [sp] block++; my_length -= to_copy; a0010894: e5964000 ldr r4, [r6] 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; block++; a0010898: e2877001 add r7, r7, #1 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; a001089c: e08b8003 add r8, fp, r3 block++; my_length -= to_copy; a00108a0: e0635005 rsb r5, r3, r5 copied += to_copy; a00108a4: e1a0a003 mov sl, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a00108a8: e1550004 cmp r5, r4 a00108ac: 2a000008 bcs a00108d4 a00108b0: ea000017 b a0010914 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a00108b4: e5931000 ldr r1, [r3] a00108b8: eb000831 bl a0012984 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a00108bc: e5963000 ldr r3, [r6] 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; a00108c0: e0888004 add r8, r8, r4 block++; a00108c4: e2877001 add r7, r7, #1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a00108c8: e1530005 cmp r3, r5 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; copied += to_copy; a00108cc: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a00108d0: 8a00000f bhi a0010914 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a00108d4: e3a02000 mov r2, #0 a00108d8: e1a01007 mov r1, r7 a00108dc: e1a00009 mov r0, r9 a00108e0: ebffff35 bl a00105bc if ( !block_ptr ) a00108e4: e2503000 subs r3, r0, #0 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a00108e8: e1a02004 mov r2, r4 dest += to_copy; block++; my_length -= to_copy; a00108ec: e0645005 rsb r5, r4, r5 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 ); a00108f0: e1a00008 mov r0, r8 * 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 ) a00108f4: 1affffee bne a00108b4 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; a00108f8: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } a00108fc: e28dd014 add sp, sp, #20 a0010900: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * 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 ) a0010904: 1affffc1 bne a0010810 a0010908: e1510002 cmp r1, r2 a001090c: 9affffbf bls a0010810 a0010910: eaffffbd b a001080c /* * Phase 3: possibly the first part of one block */ IMFS_assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { a0010914: e3550000 cmp r5, #0 a0010918: 0a00000a beq a0010948 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a001091c: e1a00009 mov r0, r9 a0010920: e1a01007 mov r1, r7 a0010924: e3a02000 mov r2, #0 a0010928: ebffff23 bl a00105bc if ( !block_ptr ) a001092c: e2503000 subs r3, r0, #0 a0010930: 0afffff0 beq a00108f8 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); a0010934: e1a00008 mov r0, r8 a0010938: e5931000 ldr r1, [r3] a001093c: e1a02005 mov r2, r5 a0010940: eb00080f bl a0012984 copied += my_length; a0010944: e08aa005 add sl, sl, r5 } IMFS_update_atime( the_jnode ); a0010948: e28d000c add r0, sp, #12 a001094c: e3a01000 mov r1, #0 a0010950: ebffd6da bl a00064c0 a0010954: e59d300c ldr r3, [sp, #12] return copied; a0010958: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a001095c: e5893040 str r3, [r9, #64] ; 0x40 return copied; a0010960: eaffffe5 b a00108fc if (the_jnode->type == 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)) a0010964: e2894050 add r4, r9, #80 ; 0x50 a0010968: e8940018 ldm r4, {r3, r4} a001096c: e1a00003 mov r0, r3 a0010970: e1a01004 mov r1, r4 a0010974: e3a02000 mov r2, #0 a0010978: e0500007 subs r0, r0, r7 a001097c: e0c11008 sbc r1, r1, r8 a0010980: e1520001 cmp r2, r1 my_length = length; if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; a0010984: e5992058 ldr r2, [r9, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) a0010988: da00000b ble a00109bc my_length = the_jnode->info.linearfile.size - start; a001098c: e067a003 rsb sl, r7, r3 memcpy(dest, &file_ptr[start], my_length); a0010990: e0821007 add r1, r2, r7 a0010994: e1a0000b mov r0, fp a0010998: e1a0200a mov r2, sl a001099c: eb0007f8 bl a0012984 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a00109a0: e28d000c add r0, sp, #12 a00109a4: e3a01000 mov r1, #0 a00109a8: ebffd6c4 bl a00064c0 a00109ac: e59d300c ldr r3, [sp, #12] return copied; a00109b0: e1a0000a mov r0, sl return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); a00109b4: e5893040 str r3, [r9, #64] ; 0x40 a00109b8: eaffffcf b a00108fc if (the_jnode->type == 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)) a00109bc: 1a000001 bne a00109c8 a00109c0: e1550000 cmp r5, r0 a00109c4: 8afffff0 bhi a001098c /* * Linear files (as created from a tar file are easier to handle * than block files). */ my_length = length; a00109c8: e1a0a005 mov sl, r5 <== NOT EXECUTED a00109cc: eaffffef b a0010990 <== NOT EXECUTED =============================================================================== a0010ac0 : * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a0010ac0: 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; a0010ac4: e59f613c ldr r6, [pc, #316] ; a0010c08 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0010ac8: e5903058 ldr r3, [r0, #88] ; 0x58 * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a0010acc: 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; a0010ad0: e5967000 ldr r7, [r6] * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0010ad4: 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; a0010ad8: e1a07127 lsr r7, r7, #2 * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a0010adc: 0a000002 beq a0010aec memfile_free_blocks_in_table( &info->indirect, to_free ); a0010ae0: e2800058 add r0, r0, #88 ; 0x58 <== NOT EXECUTED a0010ae4: e1a01007 mov r1, r7 <== NOT EXECUTED a0010ae8: ebffffdf bl a0010a6c <== NOT EXECUTED } if ( info->doubly_indirect ) { a0010aec: e59a305c ldr r3, [sl, #92] ; 0x5c a0010af0: e3530000 cmp r3, #0 a0010af4: 0a000015 beq a0010b50 for ( i=0 ; i <== NOT EXECUTED a0010b04: e3a02000 mov r2, #0 <== NOT EXECUTED a0010b08: e1a04002 mov r4, r2 <== NOT EXECUTED a0010b0c: ea000000 b a0010b14 <== NOT EXECUTED a0010b10: e59a305c ldr r3, [sl, #92] ; 0x5c <== NOT EXECUTED if ( info->doubly_indirect[i] ) { a0010b14: e7930102 ldr r0, [r3, r2, lsl #2] <== NOT EXECUTED a0010b18: e1a02102 lsl r2, r2, #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] ) { a0010b20: e3500000 cmp r0, #0 <== NOT EXECUTED memfile_free_blocks_in_table( a0010b24: e1a01007 mov r1, r7 <== NOT EXECUTED a0010b28: e0830002 add r0, r3, r2 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { a0010b2c: 0a000000 beq a0010b34 <== NOT EXECUTED memfile_free_blocks_in_table( a0010b30: ebffffcd bl a0010a6c <== 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 ); a0010b44: e28a005c add r0, sl, #92 ; 0x5c <== NOT EXECUTED a0010b48: e1a01007 mov r1, r7 <== NOT EXECUTED a0010b4c: ebffffc6 bl a0010a6c <== NOT EXECUTED } if ( info->triply_indirect ) { a0010b50: e59a0060 ldr r0, [sl, #96] ; 0x60 a0010b54: e3500000 cmp r0, #0 a0010b58: 0a000028 beq a0010c00 for ( i=0 ; i <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; a0010b68: e5905000 ldr r5, [r0] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0010b6c: e3550000 cmp r5, #0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; a0010b70: 13a09000 movne r9, #0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0010b74: 11a08009 movne r8, r9 <== NOT EXECUTED a0010b78: 0a00001d beq a0010bf4 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED a0010b84: e3a00000 mov r0, #0 <== NOT EXECUTED a0010b88: e1a04000 mov r4, r0 <== NOT EXECUTED if ( p[j] ) { a0010b8c: e7953100 ldr r3, [r5, r0, lsl #2] <== NOT EXECUTED a0010b90: e1a00100 lsl r0, r0, #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); a0010ba8: ebffffaf bl a0010a6c <== 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 a0010bbc: 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( a0010bc0: e0800009 add r0, r0, r9 <== NOT EXECUTED a0010bc4: e1a01007 mov r1, r7 <== NOT EXECUTED a0010bc8: ebffffa7 bl a0010a6c <== 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]; a0010be0: e59a0060 ldr r0, [sl, #96] ; 0x60 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0010be4: e1a09108 lsl r9, r8, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; a0010be8: e7905108 ldr r5, [r0, r8, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a0010bec: e3550000 cmp r5, #0 <== NOT EXECUTED a0010bf0: 1affffe1 bne a0010b7c <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( a0010bf4: e28a0060 add r0, sl, #96 ; 0x60 <== NOT EXECUTED a0010bf8: e1a01007 mov r1, r7 <== NOT EXECUTED a0010bfc: ebffff9a bl a0010a6c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } a0010c00: e3a00000 mov r0, #0 a0010c04: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a0010c0c : */ MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { a0010c0c: 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 ); a0010c10: e3a02000 mov r2, #0 <== NOT EXECUTED a0010c14: ebfffe68 bl a00105bc <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; *block_ptr = 0; a0010c18: e3a02000 mov r2, #0 <== NOT EXECUTED ) { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010c1c: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_assert( block_ptr ); ptr = *block_ptr; a0010c20: e5900000 ldr r0, [r0] <== NOT EXECUTED *block_ptr = 0; a0010c24: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); a0010c28: ebffff87 bl a0010a4c <== NOT EXECUTED return 1; } a0010c2c: e3a00001 mov r0, #1 <== NOT EXECUTED a0010c30: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0010d68 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a0010d68: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0010d6c: e1a09000 mov r9, r0 a0010d70: e24dd010 sub sp, sp, #16 * 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 ) { a0010d74: e5900054 ldr r0, [r0, #84] ; 0x54 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a0010d78: e59db034 ldr fp, [sp, #52] ; 0x34 a0010d7c: e1a06001 mov r6, r1 * 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 ) { a0010d80: e3500000 cmp r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a0010d84: e1a07002 mov r7, r2 a0010d88: 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; a0010d8c: e08b1001 add r1, fp, r1 if ( last_byte > the_jnode->info.file.size ) { a0010d90: ba000054 blt a0010ee8 a0010d94: 0a000050 beq a0010edc */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010d98: e59f5170 ldr r5, [pc, #368] ; a0010f10 a0010d9c: e1a00006 mov r0, r6 a0010da0: e1a01007 mov r1, r7 a0010da4: e5954000 ldr r4, [r5] a0010da8: e1a02004 mov r2, r4 a0010dac: e1a03fc2 asr r3, r2, #31 a0010db0: e88d000c stm sp, {r2, r3} a0010db4: eb001409 bl a0015de0 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010db8: e89d000c ldm sp, {r2, r3} */ /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a0010dbc: e1a0a000 mov sl, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a0010dc0: e1a01007 mov r1, r7 a0010dc4: e1a00006 mov r0, r6 a0010dc8: eb0012d7 bl a001592c <__divdi3> if ( start_offset ) { a0010dcc: 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; a0010dd0: e1a07000 mov r7, r0 if ( start_offset ) { a0010dd4: 01a0600b moveq r6, fp a0010dd8: 1a000016 bne a0010e38 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010ddc: e1560004 cmp r6, r4 a0010de0: 2a000008 bcs a0010e08 a0010de4: ea000027 b a0010e88 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 ); a0010de8: e5900000 ldr r0, [r0] a0010dec: eb0006e4 bl a0012984 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010df0: e5953000 ldr r3, [r5] 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; a0010df4: e0888004 add r8, r8, r4 block++; a0010df8: e2877001 add r7, r7, #1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010dfc: e1530006 cmp r3, r6 * 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( a0010e00: e08aa004 add sl, sl, r4 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a0010e04: 8a00001f bhi a0010e88 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010e08: e1a01007 mov r1, r7 a0010e0c: e3a02000 mov r2, #0 a0010e10: e1a00009 mov r0, r9 a0010e14: ebfffde8 bl a00105bc if ( !block_ptr ) a0010e18: 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 ); a0010e1c: e1a01008 mov r1, r8 a0010e20: e1a02004 mov r2, r4 src += to_copy; block++; my_length -= to_copy; a0010e24: e0646006 rsb r6, r4, r6 */ 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 ) a0010e28: 1affffee bne a0010de8 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 ) a0010e2c: e1a0000a mov r0, sl <== NOT EXECUTED } IMFS_mtime_ctime_update( the_jnode ); return copied; } a0010e30: e28dd010 add sp, sp, #16 a0010e34: 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 ); a0010e38: e1a00009 mov r0, r9 <== NOT EXECUTED a0010e3c: e1a01007 mov r1, r7 <== NOT EXECUTED a0010e40: e3a02000 mov r2, #0 <== NOT EXECUTED a0010e44: ebfffddc bl a00105bc <== NOT EXECUTED if ( !block_ptr ) a0010e48: e3500000 cmp r0, #0 <== NOT EXECUTED a0010e4c: 0afffff7 beq a0010e30 <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a0010e50: e5900000 ldr r0, [r0] <== NOT EXECUTED * 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; a0010e54: e06a4004 rsb r4, sl, r4 <== NOT EXECUTED a0010e58: e154000b cmp r4, fp <== NOT EXECUTED a0010e5c: 21a0400b movcs r4, fp <== NOT EXECUTED block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a0010e60: e080000a add r0, r0, sl <== NOT EXECUTED a0010e64: e1a01008 mov r1, r8 <== NOT EXECUTED a0010e68: e1a02004 mov r2, r4 <== NOT EXECUTED a0010e6c: eb0006c4 bl a0012984 <== NOT EXECUTED src += to_copy; a0010e70: e0888004 add r8, r8, r4 <== NOT EXECUTED block++; my_length -= to_copy; a0010e74: e064600b rsb r6, r4, fp <== NOT EXECUTED copied += to_copy; a0010e78: e1a0a004 mov sl, r4 <== NOT EXECUTED src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); src += to_copy; block++; a0010e7c: e2877001 add r7, r7, #1 <== NOT EXECUTED my_length -= to_copy; copied += to_copy; a0010e80: e5954000 ldr r4, [r5] <== NOT EXECUTED a0010e84: eaffffd4 b a0010ddc <== NOT EXECUTED * 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 ) { a0010e88: e3560000 cmp r6, #0 a0010e8c: 0a00000a beq a0010ebc block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a0010e90: e1a00009 mov r0, r9 a0010e94: e1a01007 mov r1, r7 a0010e98: e3a02000 mov r2, #0 a0010e9c: ebfffdc6 bl a00105bc if ( !block_ptr ) a0010ea0: e3500000 cmp r0, #0 a0010ea4: 0affffe0 beq a0010e2c 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 ); a0010ea8: e5900000 ldr r0, [r0] a0010eac: e1a01008 mov r1, r8 a0010eb0: e1a02006 mov r2, r6 a0010eb4: eb0006b2 bl a0012984 my_length = 0; copied += to_copy; a0010eb8: e08aa006 add sl, sl, r6 } IMFS_mtime_ctime_update( the_jnode ); a0010ebc: e28d0008 add r0, sp, #8 a0010ec0: e3a01000 mov r1, #0 a0010ec4: ebffd57d bl a00064c0 a0010ec8: e59d3008 ldr r3, [sp, #8] return copied; a0010ecc: e1a0000a mov r0, sl memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; } IMFS_mtime_ctime_update( the_jnode ); a0010ed0: e5893044 str r3, [r9, #68] ; 0x44 a0010ed4: e5893048 str r3, [r9, #72] ; 0x48 return copied; a0010ed8: eaffffd4 b a0010e30 * 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 ) { a0010edc: e5993050 ldr r3, [r9, #80] ; 0x50 a0010ee0: e1530001 cmp r3, r1 a0010ee4: 2affffab bcs a0010d98 status = IMFS_memfile_extend( the_jnode, last_byte ); a0010ee8: e1a00009 mov r0, r9 a0010eec: e3a02000 mov r2, #0 a0010ef0: ebffff4f bl a0010c34 if ( status ) a0010ef4: e3500000 cmp r0, #0 a0010ef8: 0affffa6 beq a0010d98 rtems_set_errno_and_return_minus_one( ENOSPC ); a0010efc: eb000472 bl a00120cc <__errno> a0010f00: e3a0301c mov r3, #28 a0010f04: e5803000 str r3, [r0] a0010f08: e3e00000 mvn r0, #0 a0010f0c: eaffffc7 b a0010e30 =============================================================================== a0005d58 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0005d58: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0005d5c: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0005d60: e593204c ldr r2, [r3, #76] ; 0x4c a0005d64: e3520001 cmp r2, #1 a0005d68: 1a000002 bne a0005d78 /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; a0005d6c: e583005c str r0, [r3, #92] ; 0x5c return 0; a0005d70: e3a00000 mov r0, #0 } a0005d74: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a0005d78: eb0030d3 bl a00120cc <__errno> <== NOT EXECUTED a0005d7c: e3a03014 mov r3, #20 <== NOT EXECUTED a0005d80: e5803000 str r3, [r0] <== NOT EXECUTED a0005d84: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005d88: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0008754 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a0008754: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a0008758: e59f50f8 ldr r5, [pc, #248] ; a0008858 * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a000875c: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); a0008760: e280000c add r0, r0, #12 a0008764: e5953000 ldr r3, [r5] a0008768: e5931008 ldr r1, [r3, #8] a000876c: eb0038b6 bl a0016a4c switch( the_jnode->type ) { a0008770: e594204c ldr r2, [r4, #76] ; 0x4c a0008774: e2423001 sub r3, r2, #1 a0008778: e3530006 cmp r3, #6 a000877c: 979ff103 ldrls pc, [pc, r3, lsl #2] a0008780: ea000023 b a0008814 <== NOT EXECUTED a0008784: a0008828 .word 0xa0008828 <== NOT EXECUTED a0008788: a000883c .word 0xa000883c <== NOT EXECUTED a000878c: a00087a0 .word 0xa00087a0 <== NOT EXECUTED a0008790: a00087a0 .word 0xa00087a0 <== NOT EXECUTED a0008794: a00087d8 .word 0xa00087d8 <== NOT EXECUTED a0008798: a00087f8 .word 0xa00087f8 <== NOT EXECUTED a000879c: a00087bc .word 0xa00087bc <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a00087a0: e5953000 ldr r3, [r5] <== NOT EXECUTED a00087a4: e59f00b0 ldr r0, [pc, #176] ; a000885c <== NOT EXECUTED a00087a8: e3a01001 mov r1, #1 <== NOT EXECUTED a00087ac: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a00087b0: e3a02013 mov r2, #19 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } a00087b4: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a00087b8: ea003bd3 b a001770c <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a00087bc: e5953000 ldr r3, [r5] <== NOT EXECUTED a00087c0: e59f0098 ldr r0, [pc, #152] ; a0008860 <== NOT EXECUTED a00087c4: e3a01001 mov r1, #1 <== NOT EXECUTED a00087c8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a00087cc: e3a02012 mov r2, #18 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } a00087d0: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a00087d4: ea003bcc b a001770c <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", a00087d8: e5953000 ldr r3, [r5] <== NOT EXECUTED a00087dc: e59f1080 ldr r1, [pc, #128] ; a0008864 <== NOT EXECUTED a00087e0: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED a00087e4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED a00087e8: eb003842 bl a00168f8 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); a00087ec: e59f0074 ldr r0, [pc, #116] ; a0008868 } a00087f0: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); a00087f4: ea003fa6 b a0018694 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)", a00087f8: e5953000 ldr r3, [r5] a00087fc: e59f1068 ldr r1, [pc, #104] ; a000886c a0008800: e5942050 ldr r2, [r4, #80] ; 0x50 a0008804: e5930008 ldr r0, [r3, #8] a0008808: e5943058 ldr r3, [r4, #88] ; 0x58 a000880c: eb003839 bl a00168f8 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; a0008810: eafffff5 b a00087ec case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); a0008814: e5953000 ldr r3, [r5] <== NOT EXECUTED a0008818: e59f1050 ldr r1, [pc, #80] ; a0008870 <== NOT EXECUTED a000881c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } a0008820: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); a0008824: ea003833 b a00168f8 <== NOT EXECUTED IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); a0008828: e5953000 ldr r3, [r5] a000882c: e3a0002f mov r0, #47 ; 0x2f a0008830: e5931008 ldr r1, [r3, #8] a0008834: eb00384f bl a0016978 break; a0008838: eaffffeb b a00087ec case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", a000883c: e5953000 ldr r3, [r5] a0008840: e59f102c ldr r1, [pc, #44] ; a0008874 a0008844: e5942050 ldr r2, [r4, #80] ; 0x50 a0008848: e5930008 ldr r0, [r3, #8] a000884c: e5943054 ldr r3, [r4, #84] ; 0x54 a0008850: eb003828 bl a00168f8 the_jnode->info.device.major, the_jnode->info.device.minor ); break; a0008854: eaffffe4 b a00087ec =============================================================================== a0005d98 : node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) a0005d98: e3520000 cmp r2, #0 <== NOT EXECUTED ssize_t IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { a0005d9c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED IMFS_jnode_t *node; ssize_t i; node = loc->node_access; a0005da0: e5904000 ldr r4, [r0] <== NOT EXECUTED IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) a0005da4: 01a00002 moveq r0, r2 <== NOT EXECUTED a0005da8: 0a000010 beq a0005df0 <== NOT EXECUTED a0005dac: e5943050 ldr r3, [r4, #80] ; 0x50 <== NOT EXECUTED a0005db0: e5d33000 ldrb r3, [r3] <== NOT EXECUTED a0005db4: e3530000 cmp r3, #0 <== NOT EXECUTED a0005db8: 01a00003 moveq r0, r3 <== NOT EXECUTED a0005dbc: 0a00000b beq a0005df0 <== NOT EXECUTED a0005dc0: e3a0c000 mov ip, #0 <== NOT EXECUTED a0005dc4: e1a0000c mov r0, ip <== NOT EXECUTED a0005dc8: ea000003 b a0005ddc <== NOT EXECUTED a0005dcc: e5943050 ldr r3, [r4, #80] ; 0x50 <== NOT EXECUTED a0005dd0: e7d33000 ldrb r3, [r3, r0] <== NOT EXECUTED a0005dd4: e3530000 cmp r3, #0 <== NOT EXECUTED a0005dd8: 0a000004 beq a0005df0 <== NOT EXECUTED a0005ddc: e2800001 add r0, r0, #1 <== NOT EXECUTED a0005de0: e1500002 cmp r0, r2 <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; a0005de4: e7c1300c strb r3, [r1, ip] <== NOT EXECUTED node = loc->node_access; IMFS_assert( node->type == IMFS_SYM_LINK ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) a0005de8: e1a0c000 mov ip, r0 <== NOT EXECUTED a0005dec: 3afffff6 bcc a0005dcc <== NOT EXECUTED buf[i] = node->info.sym_link.name[i]; return i; } a0005df0: e8bd0010 pop {r4} <== NOT EXECUTED a0005df4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0005df8 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { a0005df8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; a0005dfc: e5914000 ldr r4, [r1] <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { a0005e00: e24dd008 sub sp, sp, #8 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); a0005e04: e1a01003 mov r1, r3 <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { a0005e08: e1a05002 mov r5, r2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); a0005e0c: e284000c add r0, r4, #12 <== NOT EXECUTED a0005e10: e3a02020 mov r2, #32 <== NOT EXECUTED a0005e14: eb0034ae bl a00130d4 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) a0005e18: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a0005e1c: e3530000 cmp r3, #0 <== NOT EXECUTED a0005e20: 0a000001 beq a0005e2c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a0005e24: e1a00004 mov r0, r4 <== NOT EXECUTED a0005e28: eb00119f bl a000a4ac <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; a0005e2c: e5953000 ldr r3, [r5] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); a0005e30: e1a01004 mov r1, r4 <== NOT EXECUTED a0005e34: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; a0005e38: e5843008 str r3, [r4, #8] <== NOT EXECUTED a0005e3c: eb00118f bl a000a480 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); a0005e40: e1a0000d mov r0, sp <== NOT EXECUTED a0005e44: e3a01000 mov r1, #0 <== NOT EXECUTED a0005e48: eb00019c bl a00064c0 <== NOT EXECUTED a0005e4c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } a0005e50: e3a00000 mov r0, #0 <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); a0005e54: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a0005e58: e28dd008 add sp, sp, #8 <== NOT EXECUTED a0005e5c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000e3b8 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a000e3b8: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a000e3bc: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a000e3c0: e593204c ldr r2, [r3, #76] ; 0x4c a000e3c4: e2422002 sub r2, r2, #2 a000e3c8: e3520005 cmp r2, #5 a000e3cc: 979ff102 ldrls pc, [pc, r2, lsl #2] a000e3d0: ea000027 b a000e474 <== NOT EXECUTED a000e3d4: a000e460 .word 0xa000e460 <== NOT EXECUTED a000e3d8: a000e474 .word 0xa000e474 <== NOT EXECUTED a000e3dc: a000e3ec .word 0xa000e3ec <== NOT EXECUTED a000e3e0: a000e488 .word 0xa000e488 <== NOT EXECUTED a000e3e4: a000e488 .word 0xa000e488 <== NOT EXECUTED a000e3e8: a000e3ec .word 0xa000e3ec <== NOT EXECUTED case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a000e3ec: e3a04000 mov r4, #0 <== NOT EXECUTED a000e3f0: e3a05000 mov r5, #0 <== NOT EXECUTED a000e3f4: e5814020 str r4, [r1, #32] <== NOT EXECUTED a000e3f8: e5815024 str r5, [r1, #36] ; 0x24 <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; a000e3fc: e5902010 ldr r2, [r0, #16] buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a000e400: e5936030 ldr r6, [r3, #48] ; 0x30 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; a000e404: e5930048 ldr r0, [r3, #72] ; 0x48 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a000e408: e5922034 ldr r2, [r2, #52] ; 0x34 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; a000e40c: e5935038 ldr r5, [r3, #56] ; 0x38 buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; a000e410: e5934040 ldr r4, [r3, #64] ; 0x40 * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a000e414: e5927000 ldr r7, [r2] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a000e418: e3a02cff mov r2, #65280 ; 0xff00 a000e41c: e28220fe add r2, r2, #254 ; 0xfe buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; a000e420: e593c044 ldr ip, [r3, #68] ; 0x44 fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; a000e424: e1d383b4 ldrh r8, [r3, #52] ; 0x34 /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = a000e428: e5812000 str r2, [r1] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; a000e42c: e1d323bc ldrh r2, [r3, #60] ; 0x3c buf->st_gid = the_jnode->st_gid; a000e430: e1d333be ldrh r3, [r3, #62] ; 0x3e fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; a000e434: e1c181b0 strh r8, [r1, #16] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; a000e438: e5810038 str r0, [r1, #56] ; 0x38 rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; a000e43c: e1c121b2 strh r2, [r1, #18] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = a000e440: e5817004 str r7, [r1, #4] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; a000e444: e1c131b4 strh r3, [r1, #20] */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a000e448: e581600c str r6, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; a000e44c: e5815008 str r5, [r1, #8] buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; a000e450: e5814028 str r4, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; a000e454: e581c030 str ip, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; return 0; a000e458: e3a00000 mov r0, #0 } a000e45c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); a000e460: e593c054 ldr ip, [r3, #84] ; 0x54 a000e464: e5932050 ldr r2, [r3, #80] ; 0x50 a000e468: e581c01c str ip, [r1, #28] a000e46c: e5812018 str r2, [r1, #24] break; a000e470: eaffffe1 b a000e3fc case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a000e474: eb000f14 bl a00120cc <__errno> <== NOT EXECUTED a000e478: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a000e47c: e5803000 str r3, [r0] <== NOT EXECUTED a000e480: e3e00000 mvn r0, #0 <== NOT EXECUTED a000e484: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; a000e488: e2835050 add r5, r3, #80 ; 0x50 a000e48c: e8950030 ldm r5, {r4, r5} a000e490: e5814020 str r4, [r1, #32] a000e494: e5815024 str r5, [r1, #36] ; 0x24 break; a000e498: eaffffd7 b a000e3fc =============================================================================== a0005e60 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { a0005e60: e92d40f0 push {r4, r5, r6, r7, lr} a0005e64: e1a06000 mov r6, r0 a0005e68: e24dd040 sub sp, sp, #64 ; 0x40 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); a0005e6c: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { a0005e70: e1a07002 mov r7, r2 a0005e74: e1a05001 mov r5, r1 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); a0005e78: eb00347d bl a0013074 a0005e7c: e28d4004 add r4, sp, #4 a0005e80: e1a01000 mov r1, r0 a0005e84: e1a02004 mov r2, r4 a0005e88: e28d303c add r3, sp, #60 ; 0x3c a0005e8c: e1a00007 mov r0, r7 a0005e90: eb0020dc bl a000e208 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); a0005e94: e1a00005 mov r0, r5 a0005e98: eb003461 bl a0013024 if (info.sym_link.name == NULL) { a0005e9c: e3500000 cmp r0, #0 IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); a0005ea0: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { a0005ea4: 0a00000e beq a0005ee4 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( a0005ea8: e28d2028 add r2, sp, #40 ; 0x28 a0005eac: e3a03ca2 mov r3, #41472 ; 0xa200 a0005eb0: e58d2000 str r2, [sp] a0005eb4: e3a01004 mov r1, #4 a0005eb8: e1a00006 mov r0, r6 a0005ebc: e1a02004 mov r2, r4 a0005ec0: e2433001 sub r3, r3, #1 a0005ec4: eb001e29 bl a000d770 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a0005ec8: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; a0005ecc: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a0005ed0: 0a000001 beq a0005edc free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } a0005ed4: e28dd040 add sp, sp, #64 ; 0x40 a0005ed8: e8bd80f0 pop {r4, r5, r6, r7, pc} ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); a0005edc: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED a0005ee0: eb000141 bl a00063ec <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); a0005ee4: eb003078 bl a00120cc <__errno> <== NOT EXECUTED a0005ee8: e3a0300c mov r3, #12 <== NOT EXECUTED a0005eec: e5803000 str r3, [r0] <== NOT EXECUTED a0005ef0: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005ef4: eafffff6 b a0005ed4 <== NOT EXECUTED =============================================================================== a0005ef8 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0005ef8: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; a0005efc: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0005f00: e24dd01c sub sp, sp, #28 a0005f04: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0005f08: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a0005f0c: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a0005f10: e3530003 cmp r3, #3 a0005f14: 0a000006 beq a0005f34 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); a0005f18: e5943008 ldr r3, [r4, #8] a0005f1c: e1a00006 mov r0, r6 a0005f20: e1a01004 mov r1, r4 a0005f24: e5933034 ldr r3, [r3, #52] ; 0x34 a0005f28: e12fff33 blx r3 return result; } a0005f2c: e28dd01c add sp, sp, #28 a0005f30: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) a0005f34: e595e050 ldr lr, [r5, #80] ; 0x50 <== NOT EXECUTED a0005f38: e35e0000 cmp lr, #0 <== NOT EXECUTED a0005f3c: 0a00001f beq a0005fc0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; a0005f40: e1a0c00d mov ip, sp <== NOT EXECUTED a0005f44: e1a07001 mov r7, r1 <== NOT EXECUTED a0005f48: e8b7000f ldm r7!, {r0, r1, r2, r3} <== NOT EXECUTED a0005f4c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED a0005f50: e5973000 ldr r3, [r7] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; a0005f54: e28d801c add r8, sp, #28 <== NOT EXECUTED IMFS_Set_handlers( &the_link ); a0005f58: e1a0000d mov r0, sp <== NOT EXECUTED if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; a0005f5c: e58c3000 str r3, [ip] <== NOT EXECUTED the_link.node_access = node->info.hard_link.link_node; a0005f60: e528e01c str lr, [r8, #-28]! <== NOT EXECUTED IMFS_Set_handlers( &the_link ); a0005f64: eb001e65 bl a000d900 <== NOT EXECUTED /* * If removing the last hard link to a node, then we need * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) a0005f68: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED a0005f6c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 <== NOT EXECUTED a0005f70: e3520001 cmp r2, #1 <== NOT EXECUTED a0005f74: 0a000008 beq a0005f9c <== NOT EXECUTED if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; a0005f78: e2422001 sub r2, r2, #1 <== NOT EXECUTED a0005f7c: e1c323b4 strh r2, [r3, #52] ; 0x34 <== NOT EXECUTED IMFS_update_ctime( node->info.hard_link.link_node ); a0005f80: e28d0014 add r0, sp, #20 <== NOT EXECUTED a0005f84: e3a01000 mov r1, #0 <== NOT EXECUTED a0005f88: eb00014c bl a00064c0 <== NOT EXECUTED a0005f8c: e5953050 ldr r3, [r5, #80] ; 0x50 <== NOT EXECUTED a0005f90: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED a0005f94: e5832048 str r2, [r3, #72] ; 0x48 <== NOT EXECUTED a0005f98: eaffffde b a0005f18 <== NOT EXECUTED * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); a0005f9c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED a0005fa0: e1a00006 mov r0, r6 <== NOT EXECUTED a0005fa4: e1a0100d mov r1, sp <== NOT EXECUTED a0005fa8: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED a0005fac: e12fff33 blx r3 <== NOT EXECUTED if ( result != 0 ) a0005fb0: e3500000 cmp r0, #0 <== NOT EXECUTED a0005fb4: 0affffd7 beq a0005f18 <== NOT EXECUTED return -1; a0005fb8: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005fbc: eaffffda b a0005f2c <== NOT EXECUTED */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); a0005fc0: eb003041 bl a00120cc <__errno> <== NOT EXECUTED a0005fc4: e3a03016 mov r3, #22 <== NOT EXECUTED a0005fc8: e5803000 str r3, [r0] <== NOT EXECUTED a0005fcc: e3e00000 mvn r0, #0 <== NOT EXECUTED a0005fd0: eaffffd5 b a0005f2c <== NOT EXECUTED =============================================================================== a0005fd4 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0005fd4: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0005fd8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0005fdc: e593204c ldr r2, [r3, #76] ; 0x4c a0005fe0: e3520001 cmp r2, #1 a0005fe4: 1a000005 bne a0006000 /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) a0005fe8: e593205c ldr r2, [r3, #92] ; 0x5c a0005fec: e3520000 cmp r2, #0 a0005ff0: 0a000007 beq a0006014 /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; a0005ff4: e3a00000 mov r0, #0 a0005ff8: e583005c str r0, [r3, #92] ; 0x5c return 0; } a0005ffc: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); a0006000: eb003031 bl a00120cc <__errno> <== NOT EXECUTED a0006004: e3a03014 mov r3, #20 <== NOT EXECUTED a0006008: e5803000 str r3, [r0] <== NOT EXECUTED a000600c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006010: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ a0006014: eb00302c bl a00120cc <__errno> <== NOT EXECUTED a0006018: e3a03016 mov r3, #22 <== NOT EXECUTED a000601c: e5803000 str r3, [r0] <== NOT EXECUTED a0006020: e3e00000 mvn r0, #0 <== NOT EXECUTED a0006024: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0006028 : int IMFS_utime( rtems_filesystem_location_info_t *pathloc, /* IN */ time_t actime, /* IN */ time_t modtime /* IN */ ) { a0006028: e92d4010 push {r4, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; a000602c: e5904000 ldr r4, [r0] <== NOT EXECUTED the_jnode->stat_atime = actime; the_jnode->stat_mtime = modtime; the_jnode->stat_ctime = time( NULL ); a0006030: e3a00000 mov r0, #0 <== NOT EXECUTED { IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; the_jnode->stat_atime = actime; a0006034: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_jnode->stat_mtime = modtime; a0006038: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED the_jnode->stat_ctime = time( NULL ); a000603c: eb00345f bl a00131c0