RTEMS-6
Annotated Report
libimfs
Sun Feb 28 12:29:47 2021

40005224 <IMFS_add_node>:                                                                 
#endif                                                                                    
                                                                                          
#include <rtems/imfs.h>                                                                   
                                                                                          
int IMFS_add_node( const char *path, IMFS_jnode_t *node, void *arg )                      
{                                                                                         
40005224:   f9010113            addi    sp,sp,-112                                        
40005228:   06812423            sw  s0,104(sp)                                            
4000522c:   06912223            sw  s1,100(sp)                                            
40005230:   07212023            sw  s2,96(sp)                                             
40005234:   05312e23            sw  s3,92(sp)                                             
40005238:   05412c23            sw  s4,88(sp)                                             
4000523c:   06112623            sw  ra,108(sp)                                            
  rtems_filesystem_eval_path_context_t    ctx;                                            
  const rtems_filesystem_location_info_t *currentloc;                                     
  int                                     eval_flags;                                     
  int                                     rv;                                             
                                                                                          
  mode = node->st_mode;                                                                   
40005240:   0145aa03            lw  s4,20(a1)                                             
{                                                                                         
40005244:   00058493            mv  s1,a1                                                 
40005248:   00050993            mv  s3,a0                                                 
4000524c:   00060913            mv  s2,a2                                                 
  mode &= ~rtems_filesystem_umask;                                                        
40005250:   b85ff0ef            jal ra,40004dd4 <rtems_current_user_env_get>              
40005254:   00852403            lw  s0,8(a0)                                              
                                                                                          
  switch (mode & S_IFMT) {                                                                
40005258:   0000f6b7            lui a3,0xf                                                
4000525c:   000067b7            lui a5,0x6                                                
  mode &= ~rtems_filesystem_umask;                                                        
40005260:   fff44413            not s0,s0                                                 
40005264:   01447433            and s0,s0,s4                                              
  switch (mode & S_IFMT) {                                                                
40005268:   00d476b3            and a3,s0,a3                                              
4000526c:   06f68063            beq a3,a5,400052cc <IMFS_add_node+0xa8>                   
40005270:   04d7f463            bgeu    a5,a3,400052b8 <IMFS_add_node+0x94>               
40005274:   0000b737            lui a4,0xb                                                <== NOT EXECUTED
40005278:   00e47733            and a4,s0,a4                                              <== NOT EXECUTED
4000527c:   000087b7            lui a5,0x8                                                <== NOT EXECUTED
40005280:   04f70663            beq a4,a5,400052cc <IMFS_add_node+0xa8>                   <== NOT EXECUTED
    case S_IFIFO:                                                                         
    case S_IFREG:                                                                         
    case S_IFSOCK:                                                                        
      break;                                                                              
    default:                                                                              
      errno = EINVAL;                                                                     
40005284:   4440f0ef            jal ra,400146c8 <__errno>                                 
40005288:   01600793            li  a5,22                                                 
4000528c:   00f52023            sw  a5,0(a0)                                              
      return -1;                                                                          
40005290:   fff00413            li  s0,-1                                                 
    rv = -1;                                                                              
  }                                                                                       
                                                                                          
  rtems_filesystem_eval_path_cleanup( &ctx );                                             
  return rv;                                                                              
}                                                                                         
40005294:   06c12083            lw  ra,108(sp)                                            
40005298:   00040513            mv  a0,s0                                                 
4000529c:   06812403            lw  s0,104(sp)                                            
400052a0:   06412483            lw  s1,100(sp)                                            
400052a4:   06012903            lw  s2,96(sp)                                             
400052a8:   05c12983            lw  s3,92(sp)                                             
400052ac:   05812a03            lw  s4,88(sp)                                             
400052b0:   07010113            addi    sp,sp,112                                         
400052b4:   00008067            ret                                                       
  switch (mode & S_IFMT) {                                                                
400052b8:   fffff737            lui a4,0xfffff                                            
400052bc:   00e686b3            add a3,a3,a4                                              
400052c0:   fff70713            addi    a4,a4,-1 # ffffefff <RamEnd+0xbeffefff>           
400052c4:   00e6f6b3            and a3,a3,a4                                              
400052c8:   fa069ee3            bnez    a3,40005284 <IMFS_add_node+0x60>                  
  currentloc = rtems_filesystem_eval_path_start( &ctx, path, eval_flags );                
400052cc:   01800613            li  a2,24                                                 
400052d0:   00098593            mv  a1,s3                                                 
400052d4:   01810513            addi    a0,sp,24                                          
400052d8:   fc1fe0ef            jal ra,40004298 <rtems_filesystem_eval_path_start>        
  return loc->mt_entry->ops->clonenod_h == IMFS_node_clone;                               
400052dc:   01452703            lw  a4,20(a0)                                             
  if ( IMFS_is_imfs_instance( currentloc ) ) {                                            
400052e0:   400077b7            lui a5,0x40007                                            
400052e4:   91078793            addi    a5,a5,-1776 # 40006910 <IMFS_node_clone>          
400052e8:   00c72703            lw  a4,12(a4)                                             
400052ec:   02472703            lw  a4,36(a4)                                             
400052f0:   02f70063            beq a4,a5,40005310 <IMFS_add_node+0xec>                   
    rtems_filesystem_eval_path_error( &ctx, ENOTSUP );                                    
400052f4:   08600593            li  a1,134                                                
400052f8:   01810513            addi    a0,sp,24                                          
400052fc:   944ff0ef            jal ra,40004440 <rtems_filesystem_eval_path_error>        
    rv = -1;                                                                              
40005300:   fff00413            li  s0,-1                                                 
  rtems_filesystem_eval_path_cleanup( &ctx );                                             
40005304:   01810513            addi    a0,sp,24                                          
40005308:   9b0ff0ef            jal ra,400044b8 <rtems_filesystem_eval_path_cleanup>      
  return rv;                                                                              
4000530c:   f89ff06f            j   40005294 <IMFS_add_node+0x70>                         
    rtems_filesystem_eval_path_set_path( &ctx, node->name, node->namelen );               
40005310:   0104d783            lhu a5,16(s1)                                             
  ctx->path = path;                                                                       
40005314:   00c4a703            lw  a4,12(s1)                                             
  ctx->flags = flags;                                                                     
40005318:   06000693            li  a3,96                                                 
    rtems_filesystem_eval_path_continue( &ctx );                                          
4000531c:   01810513            addi    a0,sp,24                                          
  ctx->pathlen = pathlen;                                                                 
40005320:   00f12e23            sw  a5,28(sp)                                             
  ctx->flags = flags;                                                                     
40005324:   02d12423            sw  a3,40(sp)                                             
  ctx->path = path;                                                                       
40005328:   00e12c23            sw  a4,24(sp)                                             
4000532c:   d41fe0ef            jal ra,4000406c <rtems_filesystem_eval_path_continue>     
  return ctx->token;                                                                      
40005330:   02012783            lw  a5,32(sp)                                             
    if ( rtems_filesystem_eval_path_get_token( &ctx ) == node->name ) {                   
40005334:   00c4a603            lw  a2,12(s1)                                             
40005338:   00f60e63            beq a2,a5,40005354 <IMFS_add_node+0x130>                  
      if ( rtems_filesystem_eval_path_get_token( &ctx ) != NULL ) {                       
4000533c:   fc0782e3            beqz    a5,40005300 <IMFS_add_node+0xdc>                  <== NEVER TAKEN
        rtems_filesystem_eval_path_error( &ctx, EINVAL );                                 
40005340:   01600593            li  a1,22                                                 
40005344:   01810513            addi    a0,sp,24                                          
40005348:   8f8ff0ef            jal ra,40004440 <rtems_filesystem_eval_path_error>        
      rv = -1;                                                                            
4000534c:   fff00413            li  s0,-1                                                 
40005350:   fb5ff06f            j   40005304 <IMFS_add_node+0xe0>                         
      node = IMFS_initialize_node(                                                        
40005354:   0104d683            lhu a3,16(s1)                                             
40005358:   0384a583            lw  a1,56(s1)                                             
4000535c:   00090793            mv  a5,s2                                                 
40005360:   00040713            mv  a4,s0                                                 
40005364:   00048513            mv  a0,s1                                                 
40005368:   4e0010ef            jal ra,40006848 <IMFS_initialize_node>                    
4000536c:   00050793            mv  a5,a0                                                 
      if ( node != NULL ) {                                                               
40005370:   f80508e3            beqz    a0,40005300 <IMFS_add_node+0xdc>                  
        parent = currentloc->node_access;                                                 
40005374:   03812483            lw  s1,56(sp)                                             
  _Timecounter_Getbintime( &now );                                                        
40005378:   00810513            addi    a0,sp,8                                           
        rv = 0;                                                                           
4000537c:   00000413            li  s0,0                                                  
  old_last = tail->previous;                                                              
40005380:   0484a703            lw  a4,72(s1)                                             
  return &the_chain->Tail.Node;                                                           
40005384:   04448693            addi    a3,s1,68                                          
  entry_node->Parent = dir_node;                                                          
40005388:   0097a423            sw  s1,8(a5)                                              
  the_node->next = tail;                                                                  
4000538c:   00d7a023            sw  a3,0(a5)                                              
  tail->previous = the_node;                                                              
40005390:   04f4a423            sw  a5,72(s1)                                             
  old_last->next = the_node;                                                              
40005394:   00f72023            sw  a5,0(a4)                                              
  the_node->previous = old_last;                                                          
40005398:   00e7a223            sw  a4,4(a5)                                              
  _Timecounter_Getbintime( &now );                                                        
4000539c:   5e0030ef            jal ra,4000897c <_Timecounter_Getbintime>                 
  return now.sec;                                                                         
400053a0:   00812703            lw  a4,8(sp)                                              
400053a4:   00c12783            lw  a5,12(sp)                                             
  jnode->stat_mtime = now;                                                                
400053a8:   02e4a423            sw  a4,40(s1)                                             
400053ac:   02f4a623            sw  a5,44(s1)                                             
  jnode->stat_ctime = now;                                                                
400053b0:   02e4a823            sw  a4,48(s1)                                             
400053b4:   02f4aa23            sw  a5,52(s1)                                             
}                                                                                         
400053b8:   f4dff06f            j   40005304 <IMFS_add_node+0xe0>                         
                                                                                          

40006964 <IMFS_do_nothing_destroy>: void IMFS_do_nothing_destroy( IMFS_jnode_t *node ) { (void) node; }
40006964:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

400057e4 <IMFS_eval_path>: .eval_token = IMFS_eval_token }; void IMFS_eval_path( rtems_filesystem_eval_path_context_t *ctx ) { rtems_filesystem_eval_path_generic( ctx, NULL, &IMFS_eval_config );
400057e4:   8a818613            addi    a2,gp,-1880 # 40020ce8 <IMFS_eval_config>         
400057e8:   00000593            li  a1,0                                                  
400057ec:   6600906f            j   4000ee4c <rtems_filesystem_eval_path_generic>         
                                                                                          

400019bc <IMFS_eval_path_devfs>: return NULL; } void IMFS_eval_path_devfs( rtems_filesystem_eval_path_context_t *ctx ) {
400019bc:   fe010113            addi    sp,sp,-32                                         
400019c0:   01212823            sw  s2,16(sp)                                             
  return ctx->pathlen;                                                                    
400019c4:   00452903            lw  s2,4(a0)                                              
400019c8:   00912a23            sw  s1,20(sp)                                             
400019cc:   4000c4b7            lui s1,0x4000c                                            
400019d0:   94048493            addi    s1,s1,-1728 # 4000b940 <IMFS_devfs_dirs>          
400019d4:   00812c23            sw  s0,24(sp)                                             
400019d8:   01312623            sw  s3,12(sp)                                             
400019dc:   01412423            sw  s4,8(sp)                                              
400019e0:   01512223            sw  s5,4(sp)                                              
400019e4:   00112e23            sw  ra,28(sp)                                             
400019e8:   00100793            li  a5,1                                                  
400019ec:   00148413            addi    s0,s1,1                                           
  rtems_filesystem_location_info_t *currentloc;                                           
  IMFS_directory_t                 *dir;                                                  
  IMFS_jnode_t                     *entry;                                                
                                                                                          
  currentloc = rtems_filesystem_eval_path_get_currentloc( ctx );                          
  dir = currentloc->node_access;                                                          
400019f0:   02052a83            lw  s5,32(a0)                                             
  return ctx->path;                                                                       
400019f4:   00052a03            lw  s4,0(a0)                                              
{                                                                                         
400019f8:   00050993            mv  s3,a0                                                 
    match = IMFS_devfs_dirs[ i ].len == pathlen                                           
400019fc:   01148493            addi    s1,s1,17                                          
      && memcmp( IMFS_devfs_dirs[ i ].name, path, pathlen ) == 0;                         
40001a00:   00f90a63            beq s2,a5,40001a14 <IMFS_eval_path_devfs+0x58>            
  for ( i = 0; i < RTEMS_ARRAY_SIZE( IMFS_devfs_dirs ); ++i ) {                           
40001a04:   00440413            addi    s0,s0,4                                           
40001a08:   04848e63            beq s1,s0,40001a64 <IMFS_eval_path_devfs+0xa8>            
    match = IMFS_devfs_dirs[ i ].len == pathlen                                           
40001a0c:   fff44783            lbu a5,-1(s0)                                             
      && memcmp( IMFS_devfs_dirs[ i ].name, path, pathlen ) == 0;                         
40001a10:   fef91ae3            bne s2,a5,40001a04 <IMFS_eval_path_devfs+0x48>            
40001a14:   00090613            mv  a2,s2                                                 
40001a18:   000a0593            mv  a1,s4                                                 
40001a1c:   00040513            mv  a0,s0                                                 
40001a20:   040090ef            jal ra,4000aa60 <memcmp>                                  
40001a24:   fe0510e3            bnez    a0,40001a04 <IMFS_eval_path_devfs+0x48>           <== NEVER TAKEN
      eval_flags &= ~RTEMS_FS_EXCLUSIVE;                                                  
40001a28:   0109a783            lw  a5,16(s3)                                             
  ctx->pathlen = 0;                                                                       
40001a2c:   0009a223            sw  zero,4(s3)                                            
40001a30:   00000913            li  s2,0                                                  
40001a34:   fbf7f793            andi    a5,a5,-65                                         
  ctx->flags = flags;                                                                     
40001a38:   00f9a823            sw  a5,16(s3)                                             
                                                                                          
  entry = IMFS_devfs_is_dir( ctx, dir );                                                  
                                                                                          
  if ( entry != NULL ) {                                                                  
40001a3c:   020a8463            beqz    s5,40001a64 <IMFS_eval_path_devfs+0xa8>           <== NEVER TAKEN
      rtems_filesystem_eval_path_get_path( ctx ),                                         
      rtems_filesystem_eval_path_get_pathlen( ctx )                                       
    );                                                                                    
    rtems_filesystem_eval_path_clear_path( ctx );                                         
  }                                                                                       
}                                                                                         
40001a40:   01c12083            lw  ra,28(sp)                                             
40001a44:   01812403            lw  s0,24(sp)                                             
40001a48:   01412483            lw  s1,20(sp)                                             
40001a4c:   01012903            lw  s2,16(sp)                                             
40001a50:   00c12983            lw  s3,12(sp)                                             
40001a54:   00812a03            lw  s4,8(sp)                                              
40001a58:   00412a83            lw  s5,4(sp)                                              
40001a5c:   02010113            addi    sp,sp,32                                          
40001a60:   00008067            ret                                                       
  return _Chain_Immutable_head( the_chain )->next;                                        
40001a64:   040aa403            lw  s0,64(s5)                                             
  return &the_chain->Tail.Node;                                                           
40001a68:   044a8493            addi    s1,s5,68                                          
  while ( current != tail ) {                                                             
40001a6c:   00941863            bne s0,s1,40001a7c <IMFS_eval_path_devfs+0xc0>            
40001a70:   0980006f            j   40001b08 <IMFS_eval_path_devfs+0x14c>                 <== NOT EXECUTED
  return the_node->next;                                                                  
40001a74:   00042403            lw  s0,0(s0)                                              
40001a78:   08848863            beq s1,s0,40001b08 <IMFS_eval_path_devfs+0x14c>           
    match = entry->namelen == pathlen                                                     
40001a7c:   01045783            lhu a5,16(s0)                                             
      && memcmp( entry->name, path, pathlen ) == 0;                                       
40001a80:   ff279ae3            bne a5,s2,40001a74 <IMFS_eval_path_devfs+0xb8>            
40001a84:   00c42503            lw  a0,12(s0)                                             
40001a88:   00090613            mv  a2,s2                                                 
40001a8c:   000a0593            mv  a1,s4                                                 
40001a90:   7d1080ef            jal ra,4000aa60 <memcmp>                                  
40001a94:   fe0510e3            bnez    a0,40001a74 <IMFS_eval_path_devfs+0xb8>           
    if ( ( eval_flags & RTEMS_FS_EXCLUSIVE ) == 0 ) {                                     
40001a98:   0109a783            lw  a5,16(s3)                                             
40001a9c:   0407f793            andi    a5,a5,64                                          
40001aa0:   02079e63            bnez    a5,40001adc <IMFS_eval_path_devfs+0x120>          <== NEVER TAKEN
      --dir->Node.reference_count;                                                        
40001aa4:   018ad783            lhu a5,24(s5)                                             
  loc->handlers = node->control->handlers;                                                
40001aa8:   03842703            lw  a4,56(s0)                                             
      currentloc->node_access_2 = IMFS_generic_get_context_by_node( entry );              
40001aac:   04042683            lw  a3,64(s0)                                             
      --dir->Node.reference_count;                                                        
40001ab0:   fff78793            addi    a5,a5,-1                                          
40001ab4:   00fa9c23            sh  a5,24(s5)                                             
      ++entry->reference_count;                                                           
40001ab8:   01845783            lhu a5,24(s0)                                             
40001abc:   00072703            lw  a4,0(a4)                                              
40001ac0:   00178793            addi    a5,a5,1                                           
40001ac4:   00f41c23            sh  a5,24(s0)                                             
      currentloc->node_access = entry;                                                    
40001ac8:   0289a023            sw  s0,32(s3)                                             
      currentloc->node_access_2 = IMFS_generic_get_context_by_node( entry );              
40001acc:   02d9a223            sw  a3,36(s3)                                             
40001ad0:   02e9a423            sw  a4,40(s3)                                             
  ctx->pathlen = 0;                                                                       
40001ad4:   0009a223            sw  zero,4(s3)                                            
}                                                                                         
40001ad8:   f69ff06f            j   40001a40 <IMFS_eval_path_devfs+0x84>                  
}                                                                                         
40001adc:   01812403            lw  s0,24(sp)                                             <== NOT EXECUTED
40001ae0:   01c12083            lw  ra,28(sp)                                             <== NOT EXECUTED
40001ae4:   01412483            lw  s1,20(sp)                                             <== NOT EXECUTED
40001ae8:   01012903            lw  s2,16(sp)                                             <== NOT EXECUTED
40001aec:   00812a03            lw  s4,8(sp)                                              <== NOT EXECUTED
40001af0:   00412a83            lw  s5,4(sp)                                              <== NOT EXECUTED
      rtems_filesystem_eval_path_error( ctx, EEXIST );                                    
40001af4:   00098513            mv  a0,s3                                                 <== NOT EXECUTED
}                                                                                         
40001af8:   00c12983            lw  s3,12(sp)                                             <== NOT EXECUTED
      rtems_filesystem_eval_path_error( ctx, EEXIST );                                    
40001afc:   01100593            li  a1,17                                                 <== NOT EXECUTED
}                                                                                         
40001b00:   02010113            addi    sp,sp,32                                          <== NOT EXECUTED
      rtems_filesystem_eval_path_error( ctx, EEXIST );                                    
40001b04:   a10ff06f            j   40000d14 <rtems_filesystem_eval_path_error>           <== NOT EXECUTED
  ctx->token = token;                                                                     
40001b08:   0149a423            sw  s4,8(s3)                                              
  ctx->tokenlen = tokenlen;                                                               
40001b0c:   0129a623            sw  s2,12(s3)                                             
  ctx->pathlen = 0;                                                                       
40001b10:   0009a223            sw  zero,4(s3)                                            
}                                                                                         
40001b14:   f2dff06f            j   40001a40 <IMFS_eval_path_devfs+0x84>                  
                                                                                          

40006d28 <IMFS_fsunmount>: /* * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ loc = temp_mt_entry->mt_fs_root->location;
40006d28:   02452783            lw  a5,36(a0)                                             
{                                                                                         
40006d2c:   fc010113            addi    sp,sp,-64                                         
40006d30:   02812c23            sw  s0,56(sp)                                             
   loc = temp_mt_entry->mt_fs_root->location;                                             
40006d34:   0087a703            lw  a4,8(a5)                                              
40006d38:   0007a803            lw  a6,0(a5)                                              
40006d3c:   0047a503            lw  a0,4(a5)                                              
   jnode = (IMFS_jnode_t *)loc.node_access;                                               
40006d40:   00070413            mv  s0,a4                                                 
   loc = temp_mt_entry->mt_fs_root->location;                                             
40006d44:   00c7a583            lw  a1,12(a5)                                             
40006d48:   0107a603            lw  a2,16(a5)                                             
40006d4c:   0147a683            lw  a3,20(a5)                                             
  return S_ISDIR( node->st_mode );                                                        
40006d50:   01472783            lw  a5,20(a4)                                             
40006d54:   00e12823            sw  a4,16(sp)                                             
  loc->handlers = node->control->handlers;                                                
40006d58:   03842703            lw  a4,56(s0)                                             
{                                                                                         
40006d5c:   03312623            sw  s3,44(sp)                                             
   loc = temp_mt_entry->mt_fs_root->location;                                             
40006d60:   00c12c23            sw  a2,24(sp)                                             
40006d64:   00072703            lw  a4,0(a4)                                              
  return S_ISDIR( node->st_mode );                                                        
40006d68:   0000f9b7            lui s3,0xf                                                
{                                                                                         
40006d6c:   02912a23            sw  s1,52(sp)                                             
40006d70:   03212823            sw  s2,48(sp)                                             
                                                                                          
   do {                                                                                   
     next = jnode->Parent;                                                                
40006d74:   00842483            lw  s1,8(s0)                                              
{                                                                                         
40006d78:   02112e23            sw  ra,60(sp)                                             
     loc.node_access = (void *)jnode;                                                     
     IMFS_Set_handlers( &loc );                                                           
                                                                                          
     if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {               
40006d7c:   00004937            lui s2,0x4                                                
   loc = temp_mt_entry->mt_fs_root->location;                                             
40006d80:   01012423            sw  a6,8(sp)                                              
40006d84:   00a12623            sw  a0,12(sp)                                             
40006d88:   00b12a23            sw  a1,20(sp)                                             
40006d8c:   00d12e23            sw  a3,28(sp)                                             
40006d90:   0137f7b3            and a5,a5,s3                                              
     loc.node_access = (void *)jnode;                                                     
40006d94:   00812823            sw  s0,16(sp)                                             
  loc->handlers = node->control->handlers;                                                
40006d98:   00e12c23            sw  a4,24(sp)                                             
     if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {               
40006d9c:   03279e63            bne a5,s2,40006dd8 <IMFS_fsunmount+0xb0>                  
  return _Chain_Immutable_head( the_chain )->next;                                        
40006da0:   04042703            lw  a4,64(s0)                                             
  return &the_chain->Tail.Node;                                                           
40006da4:   04440793            addi    a5,s0,68                                          
40006da8:   02f70863            beq a4,a5,40006dd8 <IMFS_fsunmount+0xb0>                  
       if ( IMFS_is_directory( jnode ) ) {                                                
         if ( jnode_has_children( jnode ) )                                               
           jnode = jnode_get_first_child( jnode );                                        
       }                                                                                  
     }                                                                                    
   } while (jnode != NULL);                                                               
40006dac:   06070463            beqz    a4,40006e14 <IMFS_fsunmount+0xec>                 <== NEVER TAKEN
  return S_ISDIR( node->st_mode );                                                        
40006db0:   01472783            lw  a5,20(a4)                                             
40006db4:   00070493            mv  s1,a4                                                 
40006db8:   00048413            mv  s0,s1                                                 
  loc->handlers = node->control->handlers;                                                
40006dbc:   03842703            lw  a4,56(s0)                                             
     next = jnode->Parent;                                                                
40006dc0:   00842483            lw  s1,8(s0)                                              
  return S_ISDIR( node->st_mode );                                                        
40006dc4:   0137f7b3            and a5,a5,s3                                              
  loc->handlers = node->control->handlers;                                                
40006dc8:   00072703            lw  a4,0(a4)                                              
     loc.node_access = (void *)jnode;                                                     
40006dcc:   00812823            sw  s0,16(sp)                                             
40006dd0:   00e12c23            sw  a4,24(sp)                                             
     if ( !IMFS_is_directory( jnode ) || jnode_has_no_children( jnode ) ) {               
40006dd4:   fd2786e3            beq a5,s2,40006da0 <IMFS_fsunmount+0x78>                  
        result = IMFS_rmnod( NULL, &loc );                                                
40006dd8:   00810593            addi    a1,sp,8                                           
40006ddc:   00000513            li  a0,0                                                  
40006de0:   ce9fc0ef            jal ra,40003ac8 <IMFS_rmnod>                              
        if ( result != 0 )                                                                
40006de4:   04051663            bnez    a0,40006e30 <IMFS_fsunmount+0x108>                <== NEVER TAKEN
        IMFS_node_destroy( jnode );                                                       
40006de8:   00040513            mv  a0,s0                                                 
40006dec:   b01fc0ef            jal ra,400038ec <IMFS_node_destroy>                       
     if ( jnode != NULL ) {                                                               
40006df0:   02048263            beqz    s1,40006e14 <IMFS_fsunmount+0xec>                 
  return S_ISDIR( node->st_mode );                                                        
40006df4:   0144a783            lw  a5,20(s1)                                             
40006df8:   0137f733            and a4,a5,s3                                              
       if ( IMFS_is_directory( jnode ) ) {                                                
40006dfc:   fb271ee3            bne a4,s2,40006db8 <IMFS_fsunmount+0x90>                  
  return _Chain_Immutable_head( the_chain )->next;                                        
40006e00:   0404a703            lw  a4,64(s1)                                             
  return &the_chain->Tail.Node;                                                           
40006e04:   04448693            addi    a3,s1,68                                          
         if ( jnode_has_children( jnode ) )                                               
40006e08:   fad712e3            bne a4,a3,40006dac <IMFS_fsunmount+0x84>                  
40006e0c:   00048413            mv  s0,s1                                                 
40006e10:   fadff06f            j   40006dbc <IMFS_fsunmount+0x94>                        
}                                                                                         
40006e14:   03c12083            lw  ra,60(sp)                                             
40006e18:   03812403            lw  s0,56(sp)                                             
40006e1c:   03412483            lw  s1,52(sp)                                             
40006e20:   03012903            lw  s2,48(sp)                                             
40006e24:   02c12983            lw  s3,44(sp)                                             
40006e28:   04010113            addi    sp,sp,64                                          
40006e2c:   00008067            ret                                                       
      rtems_fatal_error_occurred( 0xdeadbeef );                                           
40006e30:   deadc537            lui a0,0xdeadc                                            <== NOT EXECUTED
40006e34:   eef50513            addi    a0,a0,-273 # deadbeef <RamEnd+0x9dadbeef>         <== NOT EXECUTED
40006e38:   8b4fd0ef            jal ra,40003eec <rtems_fatal_error_occurred>              <== NOT EXECUTED
                                                                                          

400064b0 <IMFS_memfile_write>: {
400064b0:   fd010113            addi    sp,sp,-48                                         <== NOT EXECUTED
400064b4:   01412c23            sw  s4,24(sp)                                             <== NOT EXECUTED
400064b8:   00050a13            mv  s4,a0                                                 <== NOT EXECUTED
  if ( last_byte > memfile->File.size ) {                                                 
400064bc:   04052503            lw  a0,64(a0)                                             <== NOT EXECUTED
{                                                                                         
400064c0:   02912223            sw  s1,36(sp)                                             <== NOT EXECUTED
400064c4:   03212023            sw  s2,32(sp)                                             <== NOT EXECUTED
400064c8:   01312e23            sw  s3,28(sp)                                             <== NOT EXECUTED
400064cc:   01512a23            sw  s5,20(sp)                                             <== NOT EXECUTED
400064d0:   02112623            sw  ra,44(sp)                                             <== NOT EXECUTED
400064d4:   02812423            sw  s0,40(sp)                                             <== NOT EXECUTED
400064d8:   01612823            sw  s6,16(sp)                                             <== NOT EXECUTED
  last_byte = start + my_length;                                                          
400064dc:   00b707b3            add a5,a4,a1                                              <== NOT EXECUTED
{                                                                                         
400064e0:   00058993            mv  s3,a1                                                 <== NOT EXECUTED
400064e4:   00070493            mv  s1,a4                                                 <== NOT EXECUTED
400064e8:   00060a93            mv  s5,a2                                                 <== NOT EXECUTED
400064ec:   00068913            mv  s2,a3                                                 <== NOT EXECUTED
  if ( last_byte > memfile->File.size ) {                                                 
400064f0:   14f56263            bltu    a0,a5,40006634 <IMFS_memfile_write+0x184>         <== NOT EXECUTED
  start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;                                    
400064f4:   88c1a403            lw  s0,-1908(gp) # 40020ccc <imfs_memfile_bytes_per_block><== NOT EXECUTED
400064f8:   00098513            mv  a0,s3                                                 <== NOT EXECUTED
400064fc:   000a8593            mv  a1,s5                                                 <== NOT EXECUTED
40006500:   41f45b13            srai    s6,s0,0x1f                                        <== NOT EXECUTED
40006504:   000b0693            mv  a3,s6                                                 <== NOT EXECUTED
40006508:   00040613            mv  a2,s0                                                 <== NOT EXECUTED
4000650c:   0080d0ef            jal ra,40013514 <__moddi3>                                <== NOT EXECUTED
40006510:   00050793            mv  a5,a0                                                 <== NOT EXECUTED
  block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;                                           
40006514:   000b0693            mv  a3,s6                                                 <== NOT EXECUTED
40006518:   00098513            mv  a0,s3                                                 <== NOT EXECUTED
4000651c:   000a8593            mv  a1,s5                                                 <== NOT EXECUTED
40006520:   00040613            mv  a2,s0                                                 <== NOT EXECUTED
  start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;                                    
40006524:   00078a93            mv  s5,a5                                                 <== NOT EXECUTED
  block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;                                           
40006528:   3010c0ef            jal ra,40013028 <__divdi3>                                <== NOT EXECUTED
4000652c:   00050993            mv  s3,a0                                                 <== NOT EXECUTED
  copied = 0;                                                                             
40006530:   00000b13            li  s6,0                                                  <== NOT EXECUTED
  if ( start_offset )  {                                                                  
40006534:   0a0a9c63            bnez    s5,400065ec <IMFS_memfile_write+0x13c>            <== NOT EXECUTED
  while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {                                   
40006538:   0284ee63            bltu    s1,s0,40006574 <IMFS_memfile_write+0xc4>          <== NOT EXECUTED
    block_ptr = IMFS_memfile_get_block_pointer( memfile, block, 0 );                      
4000653c:   00098593            mv  a1,s3                                                 <== NOT EXECUTED
40006540:   00000613            li  a2,0                                                  <== NOT EXECUTED
40006544:   000a0513            mv  a0,s4                                                 <== NOT EXECUTED
40006548:   895ff0ef            jal ra,40005ddc <IMFS_memfile_get_block_pointer>          <== NOT EXECUTED
    memcpy( &(*block_ptr)[ 0 ], src, to_copy );                                           
4000654c:   00090593            mv  a1,s2                                                 <== NOT EXECUTED
40006550:   00040613            mv  a2,s0                                                 <== NOT EXECUTED
    my_length -= to_copy;                                                                 
40006554:   408484b3            sub s1,s1,s0                                              <== NOT EXECUTED
    if ( !block_ptr )                                                                     
40006558:   06050463            beqz    a0,400065c0 <IMFS_memfile_write+0x110>            <== NOT EXECUTED
    memcpy( &(*block_ptr)[ 0 ], src, to_copy );                                           
4000655c:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
    src += to_copy;                                                                       
40006560:   00890933            add s2,s2,s0                                              <== NOT EXECUTED
    block++;                                                                              
40006564:   00198993            addi    s3,s3,1                                           <== NOT EXECUTED
    memcpy( &(*block_ptr)[ 0 ], src, to_copy );                                           
40006568:   6f00e0ef            jal ra,40014c58 <memcpy>                                  <== NOT EXECUTED
    copied += to_copy;                                                                    
4000656c:   008b0b33            add s6,s6,s0                                              <== NOT EXECUTED
  while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {                                   
40006570:   fc84f6e3            bgeu    s1,s0,4000653c <IMFS_memfile_write+0x8c>          <== NOT EXECUTED
  if ( my_length ) {                                                                      
40006574:   02048663            beqz    s1,400065a0 <IMFS_memfile_write+0xf0>             <== NOT EXECUTED
    block_ptr = IMFS_memfile_get_block_pointer( memfile, block, 0 );                      
40006578:   00000613            li  a2,0                                                  <== NOT EXECUTED
4000657c:   00098593            mv  a1,s3                                                 <== NOT EXECUTED
40006580:   000a0513            mv  a0,s4                                                 <== NOT EXECUTED
40006584:   859ff0ef            jal ra,40005ddc <IMFS_memfile_get_block_pointer>          <== NOT EXECUTED
    if ( !block_ptr )                                                                     
40006588:   02050c63            beqz    a0,400065c0 <IMFS_memfile_write+0x110>            <== NOT EXECUTED
    memcpy( &(*block_ptr)[ 0 ], src, my_length );                                         
4000658c:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
40006590:   00048613            mv  a2,s1                                                 <== NOT EXECUTED
40006594:   00090593            mv  a1,s2                                                 <== NOT EXECUTED
40006598:   6c00e0ef            jal ra,40014c58 <memcpy>                                  <== NOT EXECUTED
    copied += to_copy;                                                                    
4000659c:   009b0b33            add s6,s6,s1                                              <== NOT EXECUTED
  _Timecounter_Getbintime( &now );                                                        
400065a0:   00010513            mv  a0,sp                                                 <== NOT EXECUTED
400065a4:   3d8020ef            jal ra,4000897c <_Timecounter_Getbintime>                 <== NOT EXECUTED
  return now.sec;                                                                         
400065a8:   00012703            lw  a4,0(sp)                                              <== NOT EXECUTED
400065ac:   00412783            lw  a5,4(sp)                                              <== NOT EXECUTED
  jnode->stat_mtime = now;                                                                
400065b0:   02ea2423            sw  a4,40(s4)                                             <== NOT EXECUTED
400065b4:   02fa2623            sw  a5,44(s4)                                             <== NOT EXECUTED
  jnode->stat_ctime = now;                                                                
400065b8:   02ea2823            sw  a4,48(s4)                                             <== NOT EXECUTED
400065bc:   02fa2a23            sw  a5,52(s4)                                             <== NOT EXECUTED
}                                                                                         
400065c0:   02c12083            lw  ra,44(sp)                                             <== NOT EXECUTED
400065c4:   02812403            lw  s0,40(sp)                                             <== NOT EXECUTED
400065c8:   02412483            lw  s1,36(sp)                                             <== NOT EXECUTED
400065cc:   02012903            lw  s2,32(sp)                                             <== NOT EXECUTED
400065d0:   01c12983            lw  s3,28(sp)                                             <== NOT EXECUTED
400065d4:   01812a03            lw  s4,24(sp)                                             <== NOT EXECUTED
400065d8:   01412a83            lw  s5,20(sp)                                             <== NOT EXECUTED
400065dc:   000b0513            mv  a0,s6                                                 <== NOT EXECUTED
400065e0:   01012b03            lw  s6,16(sp)                                             <== NOT EXECUTED
400065e4:   03010113            addi    sp,sp,48                                          <== NOT EXECUTED
400065e8:   00008067            ret                                                       <== NOT EXECUTED
    block_ptr = IMFS_memfile_get_block_pointer( memfile, block, 0 );                      
400065ec:   00050593            mv  a1,a0                                                 <== NOT EXECUTED
400065f0:   00000613            li  a2,0                                                  <== NOT EXECUTED
400065f4:   000a0513            mv  a0,s4                                                 <== NOT EXECUTED
400065f8:   fe4ff0ef            jal ra,40005ddc <IMFS_memfile_get_block_pointer>          <== NOT EXECUTED
      return copied;                                                                      
400065fc:   00000b13            li  s6,0                                                  <== NOT EXECUTED
    if ( !block_ptr )                                                                     
40006600:   fc0500e3            beqz    a0,400065c0 <IMFS_memfile_write+0x110>            <== NOT EXECUTED
    to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;                                
40006604:   415407b3            sub a5,s0,s5                                              <== NOT EXECUTED
40006608:   00048b13            mv  s6,s1                                                 <== NOT EXECUTED
4000660c:   0697ec63            bltu    a5,s1,40006684 <IMFS_memfile_write+0x1d4>         <== NOT EXECUTED
    memcpy( &(*block_ptr)[ start_offset ], src, to_copy );                                
40006610:   00052503            lw  a0,0(a0)                                              <== NOT EXECUTED
40006614:   00090593            mv  a1,s2                                                 <== NOT EXECUTED
40006618:   000b0613            mv  a2,s6                                                 <== NOT EXECUTED
4000661c:   01550533            add a0,a0,s5                                              <== NOT EXECUTED
40006620:   6380e0ef            jal ra,40014c58 <memcpy>                                  <== NOT EXECUTED
    src += to_copy;                                                                       
40006624:   01690933            add s2,s2,s6                                              <== NOT EXECUTED
    block++;                                                                              
40006628:   00198993            addi    s3,s3,1                                           <== NOT EXECUTED
    my_length -= to_copy;                                                                 
4000662c:   416484b3            sub s1,s1,s6                                              <== NOT EXECUTED
  while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {                                   
40006630:   f09ff06f            j   40006538 <IMFS_memfile_write+0x88>                    <== NOT EXECUTED
    bool zero_fill = start > memfile->File.size;                                          
40006634:   00100593            li  a1,1                                                  <== NOT EXECUTED
40006638:   02c05263            blez    a2,4000665c <IMFS_memfile_write+0x1ac>            <== NOT EXECUTED
    status = IMFS_memfile_extend( memfile, zero_fill, last_byte );                        
4000663c:   00078613            mv  a2,a5                                                 <== NOT EXECUTED
40006640:   00000693            li  a3,0                                                  <== NOT EXECUTED
40006644:   0015f593            andi    a1,a1,1                                           <== NOT EXECUTED
40006648:   000a0513            mv  a0,s4                                                 <== NOT EXECUTED
4000664c:   a31ff0ef            jal ra,4000607c <IMFS_memfile_extend>                     <== NOT EXECUTED
40006650:   00050b13            mv  s6,a0                                                 <== NOT EXECUTED
    if ( status )                                                                         
40006654:   ea0500e3            beqz    a0,400064f4 <IMFS_memfile_write+0x44>             <== NOT EXECUTED
40006658:   f69ff06f            j   400065c0 <IMFS_memfile_write+0x110>                   <== NOT EXECUTED
    bool zero_fill = start > memfile->File.size;                                          
4000665c:   02060863            beqz    a2,4000668c <IMFS_memfile_write+0x1dc>            <== NOT EXECUTED
40006660:   00000593            li  a1,0                                                  <== NOT EXECUTED
    status = IMFS_memfile_extend( memfile, zero_fill, last_byte );                        
40006664:   00078613            mv  a2,a5                                                 <== NOT EXECUTED
40006668:   00000693            li  a3,0                                                  <== NOT EXECUTED
4000666c:   0015f593            andi    a1,a1,1                                           <== NOT EXECUTED
40006670:   000a0513            mv  a0,s4                                                 <== NOT EXECUTED
40006674:   a09ff0ef            jal ra,4000607c <IMFS_memfile_extend>                     <== NOT EXECUTED
40006678:   00050b13            mv  s6,a0                                                 <== NOT EXECUTED
    if ( status )                                                                         
4000667c:   e6050ce3            beqz    a0,400064f4 <IMFS_memfile_write+0x44>             <== NOT EXECUTED
40006680:   f41ff06f            j   400065c0 <IMFS_memfile_write+0x110>                   <== NOT EXECUTED
40006684:   00078b13            mv  s6,a5                                                 <== NOT EXECUTED
40006688:   f89ff06f            j   40006610 <IMFS_memfile_write+0x160>                   <== NOT EXECUTED
    bool zero_fill = start > memfile->File.size;                                          
4000668c:   fb3568e3            bltu    a0,s3,4000663c <IMFS_memfile_write+0x18c>         <== NOT EXECUTED
40006690:   fd1ff06f            j   40006660 <IMFS_memfile_write+0x1b0>                   <== NOT EXECUTED
                                                                                          

400067e0 <IMFS_mount>: #include <rtems/imfs.h> int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
400067e0:   02052783            lw  a5,32(a0)                                             
{                                                                                         
400067e4:   ff010113            addi    sp,sp,-16                                         
400067e8:   00112623            sw  ra,12(sp)                                             
  IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;                     
400067ec:   0087a703            lw  a4,8(a5) # f008 <bsp_section_bss_size+0xc350>         
  return S_ISDIR( node->st_mode );                                                        
400067f0:   0000f7b7            lui a5,0xf                                                
                                                                                          
  if ( IMFS_is_directory( node ) ) {                                                      
400067f4:   000046b7            lui a3,0x4                                                
400067f8:   01472603            lw  a2,20(a4)                                             
400067fc:   00c7f7b3            and a5,a5,a2                                              
40006800:   02d79a63            bne a5,a3,40006834 <IMFS_mount+0x54>                      
    IMFS_directory_t *dir = (IMFS_directory_t *) node;                                    
                                                                                          
    if ( dir->mt_fs == NULL ) {                                                           
40006804:   04c72783            lw  a5,76(a4)                                             
40006808:   00079c63            bnez    a5,40006820 <IMFS_mount+0x40>                     <== NEVER TAKEN
      dir->mt_fs = mt_entry;                                                              
4000680c:   04a72623            sw  a0,76(a4)                                             
  int rv = 0;                                                                             
40006810:   00000513            li  a0,0                                                  
    errno = ENOTDIR;                                                                      
    rv = -1;                                                                              
  }                                                                                       
                                                                                          
  return rv;                                                                              
}                                                                                         
40006814:   00c12083            lw  ra,12(sp)                                             
40006818:   01010113            addi    sp,sp,16                                          
4000681c:   00008067            ret                                                       
      errno = EBUSY;                                                                      
40006820:   6a90d0ef            jal ra,400146c8 <__errno>                                 <== NOT EXECUTED
40006824:   01000793            li  a5,16                                                 <== NOT EXECUTED
40006828:   00f52023            sw  a5,0(a0)                                              <== NOT EXECUTED
      rv = -1;                                                                            
4000682c:   fff00513            li  a0,-1                                                 <== NOT EXECUTED
40006830:   fe5ff06f            j   40006814 <IMFS_mount+0x34>                            <== NOT EXECUTED
    errno = ENOTDIR;                                                                      
40006834:   6950d0ef            jal ra,400146c8 <__errno>                                 
40006838:   01400793            li  a5,20                                                 
4000683c:   00f52023            sw  a5,0(a0)                                              
    rv = -1;                                                                              
40006840:   fff00513            li  a0,-1                                                 
  return rv;                                                                              
40006844:   fd1ff06f            j   40006814 <IMFS_mount+0x34>                            
                                                                                          

40006928 <IMFS_node_destroy>: void IMFS_node_destroy( IMFS_jnode_t *node ) { IMFS_assert( node->reference_count == 0 ); (*node->control->node_destroy)( node );
40006928:   03852783            lw  a5,56(a0)                                             <== NOT EXECUTED
4000692c:   00c7a783            lw  a5,12(a5)                                             <== NOT EXECUTED
40006930:   00078067            jr  a5                                                    <== NOT EXECUTED
                                                                                          

4000f3a4 <IMFS_node_remove_directory>: IMFS_jnode_t *IMFS_node_remove_directory( IMFS_jnode_t *node ) { IMFS_directory_t *dir = (IMFS_directory_t *) node; if ( !rtems_chain_is_empty( &dir->Entries ) ) {
4000f3a4:   04052703            lw  a4,64(a0)                                             
{                                                                                         
4000f3a8:   ff010113            addi    sp,sp,-16                                         
4000f3ac:   00112623            sw  ra,12(sp)                                             
  return &the_chain->Tail.Node;                                                           
4000f3b0:   04450793            addi    a5,a0,68                                          
  if ( !rtems_chain_is_empty( &dir->Entries ) ) {                                         
4000f3b4:   02f70063            beq a4,a5,4000f3d4 <IMFS_node_remove_directory+0x30>      
    errno = ENOTEMPTY;                                                                    
4000f3b8:   310050ef            jal ra,400146c8 <__errno>                                 
4000f3bc:   05a00793            li  a5,90                                                 
4000f3c0:   00f52023            sw  a5,0(a0)                                              
    dir = NULL;                                                                           
4000f3c4:   00000513            li  a0,0                                                  
    errno = EBUSY;                                                                        
    dir = NULL;                                                                           
  }                                                                                       
                                                                                          
  return &dir->Node;                                                                      
}                                                                                         
4000f3c8:   00c12083            lw  ra,12(sp)                                             
4000f3cc:   01010113            addi    sp,sp,16                                          
4000f3d0:   00008067            ret                                                       
  } else if ( IMFS_is_mount_point( dir ) ) {                                              
4000f3d4:   04c52783            lw  a5,76(a0)                                             
4000f3d8:   fe0788e3            beqz    a5,4000f3c8 <IMFS_node_remove_directory+0x24>     <== ALWAYS TAKEN
    errno = EBUSY;                                                                        
4000f3dc:   2ec050ef            jal ra,400146c8 <__errno>                                 <== NOT EXECUTED
}                                                                                         
4000f3e0:   00c12083            lw  ra,12(sp)                                             <== NOT EXECUTED
    errno = EBUSY;                                                                        
4000f3e4:   01000793            li  a5,16                                                 <== NOT EXECUTED
4000f3e8:   00f52023            sw  a5,0(a0)                                              <== NOT EXECUTED
    dir = NULL;                                                                           
4000f3ec:   00000513            li  a0,0                                                  <== NOT EXECUTED
}                                                                                         
4000f3f0:   01010113            addi    sp,sp,16                                          <== NOT EXECUTED
4000f3f4:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40006d14 <IMFS_readlink>: sym_link = loc->node_access;
40006d14:   00852683            lw  a3,8(a0)                                              
  for( i=0; ((i<bufsize) && (sym_link->name[i] != '\0')); i++ )                           
40006d18:   00000513            li  a0,0                                                  
40006d1c:   00061a63            bnez    a2,40006d30 <IMFS_readlink+0x1c>                  <== ALWAYS TAKEN
40006d20:   0280006f            j   40006d48 <IMFS_readlink+0x34>                         <== NOT EXECUTED
    buf[i] = sym_link->name[i];                                                           
40006d24:   00f70023            sb  a5,0(a4)                                              
  for( i=0; ((i<bufsize) && (sym_link->name[i] != '\0')); i++ )                           
40006d28:   00150513            addi    a0,a0,1                                           
40006d2c:   00c50e63            beq a0,a2,40006d48 <IMFS_readlink+0x34>                   
40006d30:   0406a783            lw  a5,64(a3)                                             
    buf[i] = sym_link->name[i];                                                           
40006d34:   00a58733            add a4,a1,a0                                              
  for( i=0; ((i<bufsize) && (sym_link->name[i] != '\0')); i++ )                           
40006d38:   00a787b3            add a5,a5,a0                                              
40006d3c:   0007c783            lbu a5,0(a5)                                              
40006d40:   fe0792e3            bnez    a5,40006d24 <IMFS_readlink+0x10>                  
40006d44:   00008067            ret                                                       
}                                                                                         
40006d48:   00008067            ret                                                       
                                                                                          

400069a8 <IMFS_rename>: const rtems_filesystem_location_info_t *oldloc, const rtems_filesystem_location_info_t *newparentloc, const char *name, size_t namelen ) {
400069a8:   fd010113            addi    sp,sp,-48                                         
400069ac:   02812423            sw  s0,40(sp)                                             
  /*                                                                                      
   * FIXME: Due to insufficient checks we can create inaccessible nodes with              
   * this operation.                                                                      
   */                                                                                     
                                                                                          
  node = oldloc->node_access;                                                             
400069b0:   0085a403            lw  s0,8(a1)                                              
{                                                                                         
400069b4:   01312e23            sw  s3,28(sp)                                             
400069b8:   02112623            sw  ra,44(sp)                                             
  new_parent = newparentloc->node_access;                                                 
                                                                                          
  if ( node->Parent == NULL ) {                                                           
400069bc:   00842783            lw  a5,8(s0)                                              
{                                                                                         
400069c0:   02912223            sw  s1,36(sp)                                             
400069c4:   03212023            sw  s2,32(sp)                                             
400069c8:   01412c23            sw  s4,24(sp)                                             
400069cc:   01512a23            sw  s5,20(sp)                                             
  new_parent = newparentloc->node_access;                                                 
400069d0:   00862983            lw  s3,8(a2) # 1008 <_ISR_Stack_size+0x8>                 
  if ( node->Parent == NULL ) {                                                           
400069d4:   10078663            beqz    a5,40006ae0 <IMFS_rename+0x138>                   <== NEVER TAKEN
    rtems_set_errno_and_return_minus_one( EINVAL );                                       
  }                                                                                       
                                                                                          
  if ( namelen >= IMFS_NAME_MAX ) {                                                       
400069d8:   0fe00793            li  a5,254                                                
400069dc:   00070913            mv  s2,a4                                                 
400069e0:   0ee7e663            bltu    a5,a4,40006acc <IMFS_rename+0x124>                
    rtems_set_errno_and_return_minus_one( ENAMETOOLONG );                                 
  }                                                                                       
                                                                                          
  control = malloc( sizeof( *control ) + namelen );                                       
400069e4:   01470513            addi    a0,a4,20                                          
400069e8:   00068a13            mv  s4,a3                                                 
400069ec:   e18fc0ef            jal ra,40003004 <malloc>                                  
400069f0:   00050493            mv  s1,a0                                                 
  if ( control == NULL ) {                                                                
400069f4:   10050063            beqz    a0,40006af4 <IMFS_rename+0x14c>                   <== NEVER TAKEN
    rtems_set_errno_and_return_minus_one( ENOMEM );                                       
  }                                                                                       
                                                                                          
  memcpy( control->name, name, namelen );                                                 
400069f8:   01450a93            addi    s5,a0,20                                          
400069fc:   000a0593            mv  a1,s4                                                 
40006a00:   00090613            mv  a2,s2                                                 
40006a04:   000a8513            mv  a0,s5                                                 
40006a08:   2500e0ef            jal ra,40014c58 <memcpy>                                  
                                                                                          
  if ( node->control->node_destroy == IMFS_renamed_destroy ) {                            
40006a0c:   03842503            lw  a0,56(s0)                                             
40006a10:   40007a37            lui s4,0x40007                                            
40006a14:   96ca0a13            addi    s4,s4,-1684 # 4000696c <IMFS_renamed_destroy>     
40006a18:   00c52783            lw  a5,12(a0)                                             
40006a1c:   09478e63            beq a5,s4,40006ab8 <IMFS_rename+0x110>                    
    IMFS_restore_replaced_control( node );                                                
  }                                                                                       
                                                                                          
  control->Base = *node->control;                                                         
40006a20:   00052583            lw  a1,0(a0)                                              
40006a24:   00452603            lw  a2,4(a0)                                              
40006a28:   00852683            lw  a3,8(a0)                                              
  next           = the_node->next;                                                        
40006a2c:   00042703            lw  a4,0(s0)                                              
  previous       = the_node->previous;                                                    
40006a30:   00442783            lw  a5,4(s0)                                              
  control->Base.node_destroy = IMFS_renamed_destroy;                                      
  control->replaced = node->control;                                                      
40006a34:   00a4a823            sw  a0,16(s1)                                             
  control->Base = *node->control;                                                         
40006a38:   00b4a023            sw  a1,0(s1)                                              
40006a3c:   00c4a223            sw  a2,4(s1)                                              
40006a40:   00d4a423            sw  a3,8(s1)                                              
  control->Base.node_destroy = IMFS_renamed_destroy;                                      
40006a44:   0144a623            sw  s4,12(s1)                                             
  node->control = &control->Base;                                                         
40006a48:   02942c23            sw  s1,56(s0)                                             
  node->name = control->name;                                                             
40006a4c:   01542623            sw  s5,12(s0)                                             
  node->namelen = namelen;                                                                
40006a50:   01241823            sh  s2,16(s0)                                             
  next->previous = previous;                                                              
40006a54:   00f72223            sw  a5,4(a4)                                              
  previous->next = next;                                                                  
40006a58:   00e7a023            sw  a4,0(a5)                                              
  old_last = tail->previous;                                                              
40006a5c:   0489a783            lw  a5,72(s3)                                             
  return &the_chain->Tail.Node;                                                           
40006a60:   04498713            addi    a4,s3,68                                          
  the_node->next = tail;                                                                  
40006a64:   00e42023            sw  a4,0(s0)                                              
  entry_node->Parent = dir_node;                                                          
40006a68:   01342423            sw  s3,8(s0)                                              
  tail->previous = the_node;                                                              
40006a6c:   0489a423            sw  s0,72(s3)                                             
  old_last->next = the_node;                                                              
40006a70:   0087a023            sw  s0,0(a5)                                              
  the_node->previous = old_last;                                                          
40006a74:   00f42223            sw  a5,4(s0)                                              
  _Timecounter_Getbintime( &now );                                                        
40006a78:   00010513            mv  a0,sp                                                 
40006a7c:   701010ef            jal ra,4000897c <_Timecounter_Getbintime>                 
  jnode->stat_ctime = _IMFS_get_time();                                                   
40006a80:   00012703            lw  a4,0(sp)                                              
40006a84:   00412783            lw  a5,4(sp)                                              
                                                                                          
  IMFS_remove_from_directory( node );                                                     
  IMFS_add_to_directory( new_parent, node );                                              
  IMFS_update_ctime( node );                                                              
                                                                                          
  return 0;                                                                               
40006a88:   00000513            li  a0,0                                                  
40006a8c:   02e42823            sw  a4,48(s0)                                             
40006a90:   02f42a23            sw  a5,52(s0)                                             
}                                                                                         
40006a94:   02c12083            lw  ra,44(sp)                                             
40006a98:   02812403            lw  s0,40(sp)                                             
40006a9c:   02412483            lw  s1,36(sp)                                             
40006aa0:   02012903            lw  s2,32(sp)                                             
40006aa4:   01c12983            lw  s3,28(sp)                                             
40006aa8:   01812a03            lw  s4,24(sp)                                             
40006aac:   01412a83            lw  s5,20(sp)                                             
40006ab0:   03010113            addi    sp,sp,48                                          
40006ab4:   00008067            ret                                                       
  node->control = control->replaced;                                                      
40006ab8:   01052783            lw  a5,16(a0)                                             
40006abc:   02f42c23            sw  a5,56(s0)                                             
  free( control );                                                                        
40006ac0:   ff1fb0ef            jal ra,40002ab0 <free>                                    
  control->Base = *node->control;                                                         
40006ac4:   03842503            lw  a0,56(s0)                                             
}                                                                                         
40006ac8:   f59ff06f            j   40006a20 <IMFS_rename+0x78>                           
    rtems_set_errno_and_return_minus_one( ENAMETOOLONG );                                 
40006acc:   3fd0d0ef            jal ra,400146c8 <__errno>                                 
40006ad0:   05b00793            li  a5,91                                                 
40006ad4:   00f52023            sw  a5,0(a0)                                              
40006ad8:   fff00513            li  a0,-1                                                 
40006adc:   fb9ff06f            j   40006a94 <IMFS_rename+0xec>                           
    rtems_set_errno_and_return_minus_one( EINVAL );                                       
40006ae0:   3e90d0ef            jal ra,400146c8 <__errno>                                 <== NOT EXECUTED
40006ae4:   01600793            li  a5,22                                                 <== NOT EXECUTED
40006ae8:   00f52023            sw  a5,0(a0)                                              <== NOT EXECUTED
40006aec:   fff00513            li  a0,-1                                                 <== NOT EXECUTED
40006af0:   fa5ff06f            j   40006a94 <IMFS_rename+0xec>                           <== NOT EXECUTED
    rtems_set_errno_and_return_minus_one( ENOMEM );                                       
40006af4:   3d50d0ef            jal ra,400146c8 <__errno>                                 <== NOT EXECUTED
40006af8:   00c00793            li  a5,12                                                 <== NOT EXECUTED
40006afc:   00f52023            sw  a5,0(a0)                                              <== NOT EXECUTED
40006b00:   fff00513            li  a0,-1                                                 <== NOT EXECUTED
40006b04:   f91ff06f            j   40006a94 <IMFS_rename+0xec>                           <== NOT EXECUTED
                                                                                          

40006bf0 <IMFS_stat_file>: struct stat *buf ) { const IMFS_file_t *file = loc->node_access; buf->st_size = file->File.size;
40006bf0:   00852783            lw  a5,8(a0)                                              <== NOT EXECUTED
  buf->st_blksize = imfs_memfile_bytes_per_block;                                         
40006bf4:   88c1a703            lw  a4,-1908(gp) # 40020ccc <imfs_memfile_bytes_per_block><== NOT EXECUTED
  buf->st_size = file->File.size;                                                         
40006bf8:   0407a683            lw  a3,64(a5)                                             <== NOT EXECUTED
40006bfc:   0205a623            sw  zero,44(a1)                                           <== NOT EXECUTED
  buf->st_blksize = imfs_memfile_bytes_per_block;                                         
40006c00:   06e5a023            sw  a4,96(a1)                                             <== NOT EXECUTED
  buf->st_size = file->File.size;                                                         
40006c04:   02d5a423            sw  a3,40(a1)                                             <== NOT EXECUTED
                                                                                          
  return IMFS_stat( loc, buf );                                                           
40006c08:   f6dff06f            j   40006b74 <IMFS_stat>                                  <== NOT EXECUTED
                                                                                          

40006d4c <IMFS_unmount>: #include <rtems/imfs.h> int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { int rv = 0; IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;
40006d4c:   02052783            lw  a5,32(a0)                                             
{                                                                                         
40006d50:   ff010113            addi    sp,sp,-16                                         
40006d54:   00112623            sw  ra,12(sp)                                             
  IMFS_jnode_t *node = mt_entry->mt_point_node->location.node_access;                     
40006d58:   0087a703            lw  a4,8(a5)                                              
  return S_ISDIR( node->st_mode );                                                        
40006d5c:   0000f7b7            lui a5,0xf                                                
                                                                                          
  if ( IMFS_is_directory( node ) ) {                                                      
40006d60:   000046b7            lui a3,0x4                                                
40006d64:   01472603            lw  a2,20(a4)                                             
40006d68:   00c7f7b3            and a5,a5,a2                                              
40006d6c:   02d79a63            bne a5,a3,40006da0 <IMFS_unmount+0x54>                    
    IMFS_directory_t *dir = (IMFS_directory_t *) node;                                    
                                                                                          
    if ( dir->mt_fs == mt_entry ) {                                                       
40006d70:   04c72783            lw  a5,76(a4)                                             
40006d74:   00a79c63            bne a5,a0,40006d8c <IMFS_unmount+0x40>                    
      dir->mt_fs = NULL;                                                                  
40006d78:   04072623            sw  zero,76(a4)                                           
  int rv = 0;                                                                             
40006d7c:   00000513            li  a0,0                                                  
    errno = ENOTDIR;                                                                      
    rv = -1;                                                                              
  }                                                                                       
                                                                                          
  return rv;                                                                              
}                                                                                         
40006d80:   00c12083            lw  ra,12(sp)                                             
40006d84:   01010113            addi    sp,sp,16                                          
40006d88:   00008067            ret                                                       
      errno = EINVAL;                                                                     
40006d8c:   13d0d0ef            jal ra,400146c8 <__errno>                                 <== NOT EXECUTED
40006d90:   01600793            li  a5,22                                                 <== NOT EXECUTED
40006d94:   00f52023            sw  a5,0(a0)                                              <== NOT EXECUTED
      rv = -1;                                                                            
40006d98:   fff00513            li  a0,-1                                                 <== NOT EXECUTED
40006d9c:   fe5ff06f            j   40006d80 <IMFS_unmount+0x34>                          <== NOT EXECUTED
    errno = ENOTDIR;                                                                      
40006da0:   1290d0ef            jal ra,400146c8 <__errno>                                 <== NOT EXECUTED
40006da4:   01400793            li  a5,20                                                 <== NOT EXECUTED
40006da8:   00f52023            sw  a5,0(a0)                                              <== NOT EXECUTED
    rv = -1;                                                                              
40006dac:   fff00513            li  a0,-1                                                 <== NOT EXECUTED
  return rv;                                                                              
40006db0:   fd1ff06f            j   40006d80 <IMFS_unmount+0x34>                          <== NOT EXECUTED
                                                                                          

4000f288 <device_ftruncate>: rtems_libio_t *iop, off_t length ) { return 0; }
4000f288:   00000513            li  a0,0                                                  <== NOT EXECUTED
4000f28c:   00008067            ret                                                       <== NOT EXECUTED
                                                                                          

40003040 <rtems_tarfs_load>: int rtems_tarfs_load( const char *mountpoint, uint8_t *tar_image, size_t tar_size ) {
40003040:   e2010113            addi    sp,sp,-480                                        
40003044:   1c912a23            sw  s1,468(sp)                                            
40003048:   1d212823            sw  s2,464(sp)                                            
4000304c:   1d312623            sw  s3,460(sp)                                            
40003050:   1c112e23            sw  ra,476(sp)                                            
40003054:   1c812c23            sw  s0,472(sp)                                            
40003058:   1d412423            sw  s4,456(sp)                                            
4000305c:   00050993            mv  s3,a0                                                 
40003060:   00058493            mv  s1,a1                                                 
40003064:   00060913            mv  s2,a2                                                 
  char                                  buf[ 156 + UNTAR_FILE_NAME_SIZE ];                
  size_t                                len;                                              
  Untar_HeaderContext                   ctx;                                              
  unsigned long                         ptr;                                              
                                                                                          
  len = strlen( mountpoint );                                                             
40003068:   22c0c0ef            jal ra,4000f294 <strlen>                                  
  if ( len >= sizeof( buf ) - UNTAR_FILE_NAME_SIZE - 2 ) {                                
4000306c:   09900793            li  a5,153                                                
40003070:   0aa7e463            bltu    a5,a0,40003118 <rtems_tarfs_load+0xd8>            
    return -1;                                                                            
  }                                                                                       
                                                                                          
  eval_flags = RTEMS_FS_FOLLOW_LINK;                                                      
  loc = rtems_filesystem_eval_path_start( &eval_ctx, mountpoint, eval_flags );            
40003074:   01800613            li  a2,24                                                 
40003078:   00098593            mv  a1,s3                                                 
4000307c:   00050413            mv  s0,a0                                                 
40003080:   00810513            addi    a0,sp,8                                           
40003084:   891fe0ef            jal ra,40001914 <rtems_filesystem_eval_path_start>        
  return loc->mt_entry->ops->clonenod_h == IMFS_node_clone;                               
40003088:   01452783            lw  a5,20(a0)                                             
  is_imfs = IMFS_is_imfs_instance( loc );                                                 
  rtems_filesystem_eval_path_cleanup( &eval_ctx );                                        
4000308c:   00810513            addi    a0,sp,8                                           
40003090:   00c7a783            lw  a5,12(a5)                                             
40003094:   0247aa03            lw  s4,36(a5)                                             
40003098:   a9dfe0ef            jal ra,40001b34 <rtems_filesystem_eval_path_cleanup>      
  if ( !is_imfs ) {                                                                       
4000309c:   400047b7            lui a5,0x40004                                            
400030a0:   ec078793            addi    a5,a5,-320 # 40003ec0 <IMFS_node_clone>           
400030a4:   06fa1a63            bne s4,a5,40003118 <rtems_tarfs_load+0xd8>                
    return -1;                                                                            
  }                                                                                       
                                                                                          
  ctx.printer = NULL;                                                                     
  ctx.file_path = memcpy( buf, mountpoint, len );                                         
400030a8:   00040613            mv  a2,s0                                                 
400030ac:   00098593            mv  a1,s3                                                 
400030b0:   0c010513            addi    a0,sp,192                                         
  ctx.printer = NULL;                                                                     
400030b4:   0a012e23            sw  zero,188(sp)                                          
  ctx.file_path = memcpy( buf, mountpoint, len );                                         
400030b8:   5a80b0ef            jal ra,4000e660 <memcpy>                                  
400030bc:   04a12023            sw  a0,64(sp)                                             
                                                                                          
  if ( len > 0 && ctx.file_path[ len - 1 ] != '/') {                                      
400030c0:   06041e63            bnez    s0,4000313c <rtems_tarfs_load+0xfc>               <== ALWAYS TAKEN
    ctx.file_path[ len ] = '/';                                                           
    ctx.file_name = ctx.file_path + len + 1;                                              
  } else {                                                                                
    ctx.file_name = ctx.file_path + len;                                                  
400030c4:   04a12223            sw  a0,68(sp)                                             
400030c8:   00000413            li  s0,0                                                  
      return -1;                                                                          
    }                                                                                     
                                                                                          
    ptr += 512;                                                                           
                                                                                          
    if ( ctx.linkflag == REGTYPE ) {                                                      
400030cc:   03000993            li  s3,48                                                 
400030d0:   0140006f            j   400030e4 <rtems_tarfs_load+0xa4>                      
    retval = Untar_ProcessHeader( &ctx, (const char *) &tar_image[ ptr ] );               
400030d4:   6dc010ef            jal ra,400047b0 <Untar_ProcessHeader>                     
    if ( retval != UNTAR_SUCCESSFUL ) {                                                   
400030d8:   04051063            bnez    a0,40003118 <rtems_tarfs_load+0xd8>               <== NEVER TAKEN
    if ( ctx.linkflag == REGTYPE ) {                                                      
400030dc:   0b814783            lbu a5,184(sp)                                            
400030e0:   09378063            beq a5,s3,40003160 <rtems_tarfs_load+0x120>               
    retval = Untar_ProcessHeader( &ctx, (const char *) &tar_image[ ptr ] );               
400030e4:   008485b3            add a1,s1,s0                                              
  while ( ptr + 512 <= tar_size ) {                                                       
400030e8:   20040413            addi    s0,s0,512                                         
    retval = Untar_ProcessHeader( &ctx, (const char *) &tar_image[ ptr ] );               
400030ec:   04010513            addi    a0,sp,64                                          
  while ( ptr + 512 <= tar_size ) {                                                       
400030f0:   fe8972e3            bgeu    s2,s0,400030d4 <rtems_tarfs_load+0x94>            
      ptr += 512 * ctx.nblocks;                                                           
    }                                                                                     
  }                                                                                       
                                                                                          
  return 0;                                                                               
}                                                                                         
400030f4:   1dc12083            lw  ra,476(sp)                                            
400030f8:   1d812403            lw  s0,472(sp)                                            
400030fc:   1d412483            lw  s1,468(sp)                                            
40003100:   1d012903            lw  s2,464(sp)                                            
40003104:   1cc12983            lw  s3,460(sp)                                            
40003108:   1c812a03            lw  s4,456(sp)                                            
  return 0;                                                                               
4000310c:   00000513            li  a0,0                                                  
}                                                                                         
40003110:   1e010113            addi    sp,sp,480                                         
40003114:   00008067            ret                                                       
40003118:   1dc12083            lw  ra,476(sp)                                            
4000311c:   1d812403            lw  s0,472(sp)                                            
40003120:   1d412483            lw  s1,468(sp)                                            
40003124:   1d012903            lw  s2,464(sp)                                            
40003128:   1cc12983            lw  s3,460(sp)                                            
4000312c:   1c812a03            lw  s4,456(sp)                                            
    return -1;                                                                            
40003130:   fff00513            li  a0,-1                                                 
}                                                                                         
40003134:   1e010113            addi    sp,sp,480                                         
40003138:   00008067            ret                                                       
    ctx.file_path[ len ] = '/';                                                           
4000313c:   008507b3            add a5,a0,s0                                              
  if ( len > 0 && ctx.file_path[ len - 1 ] != '/') {                                      
40003140:   fff7c683            lbu a3,-1(a5)                                             
40003144:   02f00713            li  a4,47                                                 
40003148:   04e68063            beq a3,a4,40003188 <rtems_tarfs_load+0x148>               
    ctx.file_name = ctx.file_path + len + 1;                                              
4000314c:   00140413            addi    s0,s0,1                                           <== NOT EXECUTED
40003150:   00850433            add s0,a0,s0                                              <== NOT EXECUTED
    ctx.file_path[ len ] = '/';                                                           
40003154:   00e78023            sb  a4,0(a5)                                              <== NOT EXECUTED
    ctx.file_name = ctx.file_path + len + 1;                                              
40003158:   04812223            sw  s0,68(sp)                                             <== NOT EXECUTED
4000315c:   f6dff06f            j   400030c8 <rtems_tarfs_load+0x88>                      <== NOT EXECUTED
      retval = IMFS_make_linearfile(                                                      
40003160:   0b012683            lw  a3,176(sp)                                            
40003164:   0ac12583            lw  a1,172(sp)                                            
40003168:   04012503            lw  a0,64(sp)                                             
4000316c:   00848633            add a2,s1,s0                                              
40003170:   020000ef            jal ra,40003190 <IMFS_make_linearfile>                    
      if ( retval != 0 ) {                                                                
40003174:   fa0512e3            bnez    a0,40003118 <rtems_tarfs_load+0xd8>               <== NEVER TAKEN
      ptr += 512 * ctx.nblocks;                                                           
40003178:   0b412783            lw  a5,180(sp)                                            
4000317c:   00979793            slli    a5,a5,0x9                                         
40003180:   00f40433            add s0,s0,a5                                              
40003184:   f61ff06f            j   400030e4 <rtems_tarfs_load+0xa4>                      
40003188:   00078513            mv  a0,a5                                                 
4000318c:   f39ff06f            j   400030c4 <rtems_tarfs_load+0x84>