=============================================================================== 40005fcc : if (!control->buffer) 40005fcc: 00052583 lw a1,0(a0) 40005fd0: 10058463 beqz a1,400060d8 int rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control) { 40005fd4: ff010113 addi sp,sp,-16 40005fd8: 00812423 sw s0,8(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005fdc: 00852603 lw a2,8(a0) 40005fe0: 00050413 mv s0,a0 40005fe4: 00452503 lw a0,4(a0) 40005fe8: 00100693 li a3,1 { 40005fec: 00112623 sw ra,12(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005ff0: 58c000ef jal ra,4000657c if (rc) 40005ff4: 0c051c63 bnez a0,400060cc <== NEVER TAKEN *map = rtems_rfs_buffer_data (control->buffer); 40005ff8: 00042783 lw a5,0(s0) 40005ffc: 0087a783 lw a5,8(a5) 40006000: 01c7a583 lw a1,28(a5) rc = rtems_rfs_bitmap_load_map (control, &map); if (rc > 0) return rc; control->free = 0; search_map = control->search_bits; 40006004: 01442e83 lw t4,20(s0) size = control->size; 40006008: 00c42603 lw a2,12(s0) control->free = 0; 4000600c: 00042823 sw zero,16(s0) bit = 0; rtems_rfs_bitmap_check(control, search_map); *search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR; 40006010: fff00793 li a5,-1 40006014: 00fea023 sw a5,0(t4) while (size) 40006018: 02060c63 beqz a2,40006050 <== NEVER TAKEN { rtems_rfs_bitmap_element bits; int available; if (size < rtems_rfs_bitmap_element_bits ()) 4000601c: 01f00313 li t1,31 40006020: 00458593 addi a1,a1,4 bit = 0; 40006024: 00000893 li a7,0 return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 40006028: 00100813 li a6,1 available = size; } else { bits = *map; available = rtems_rfs_bitmap_element_bits (); 4000602c: 02000f13 li t5,32 mask >>= (rtems_rfs_bitmap_element_bits () - size); 40006030: fff00e13 li t3,-1 bits = rtems_rfs_bitmap_merge (*map, 40006034: ffc5a683 lw a3,-4(a1) if (size < rtems_rfs_bitmap_element_bits ()) 40006038: 06c36663 bltu t1,a2,400060a4 mask >>= (rtems_rfs_bitmap_element_bits () - size); 4000603c: 40cf07b3 sub a5,t5,a2 40006040: 00fe57b3 srl a5,t3,a5 40006044: 00f6f6b3 and a3,a3,a5 available = size; 40006048: 00060513 mv a0,a2 } if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 4000604c: 00069c63 bnez a3,40006064 else bit++; map++; } return 0; 40006050: 00000513 li a0,0 } 40006054: 00c12083 lw ra,12(sp) 40006058: 00812403 lw s0,8(sp) 4000605c: 01010113 addi sp,sp,16 40006060: 00008067 ret if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 40006064: 00000613 li a2,0 for (b = 0; b < available; b++) 40006068: 00000793 li a5,0 return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 4000606c: 00f81733 sll a4,a6,a5 40006070: 00d77733 and a4,a4,a3 for (b = 0; b < available; b++) 40006074: 00178793 addi a5,a5,1 if (!rtems_rfs_bitmap_test (bits, b)) 40006078: 00070863 beqz a4,40006088 control->free++; 4000607c: 01042703 lw a4,16(s0) 40006080: 00170713 addi a4,a4,1 40006084: 00e42823 sw a4,16(s0) for (b = 0; b < available; b++) 40006088: fef512e3 bne a0,a5,4000606c if (bit == (rtems_rfs_bitmap_element_bits () - 1)) 4000608c: 02688463 beq a7,t1,400060b4 bit++; 40006090: 00188893 addi a7,a7,1 while (size) 40006094: fa060ee3 beqz a2,40006050 40006098: 00458593 addi a1,a1,4 bits = rtems_rfs_bitmap_merge (*map, 4000609c: ffc5a683 lw a3,-4(a1) if (size < rtems_rfs_bitmap_element_bits ()) 400060a0: f8c37ee3 bgeu t1,a2,4000603c available = rtems_rfs_bitmap_element_bits (); 400060a4: fe060613 addi a2,a2,-32 if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET)) 400060a8: fe0682e3 beqz a3,4000608c available = rtems_rfs_bitmap_element_bits (); 400060ac: 02000513 li a0,32 400060b0: fb9ff06f j 40006068 if (size > 0) 400060b4: f8060ee3 beqz a2,40006050 *search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR; 400060b8: 01cea223 sw t3,4(t4) bit = 0; 400060bc: 00000893 li a7,0 search_map++; 400060c0: 004e8e93 addi t4,t4,4 400060c4: 00458593 addi a1,a1,4 400060c8: fd5ff06f j 4000609c if (rc > 0) 400060cc: f8a044e3 bgtz a0,40006054 <== NOT EXECUTED *map = NULL; 400060d0: 00000593 li a1,0 <== NOT EXECUTED 400060d4: f31ff06f j 40006004 <== NOT EXECUTED return ENXIO; 400060d8: 00600513 li a0,6 } 400060dc: 00008067 ret =============================================================================== 40005ed8 : int rtems_rfs_bitmap_map_alloc (rtems_rfs_bitmap_control* control, rtems_rfs_bitmap_bit seed, bool* allocated, rtems_rfs_bitmap_bit* bit) { 40005ed8: fe010113 addi sp,sp,-32 40005edc: 00812c23 sw s0,24(sp) 40005ee0: 00912a23 sw s1,20(sp) 40005ee4: 01212823 sw s2,16(sp) 40005ee8: 01312623 sw s3,12(sp) 40005eec: 01412423 sw s4,8(sp) 40005ef0: 01512223 sw s5,4(sp) 40005ef4: 00112e23 sw ra,28(sp) /* * Do not bound the limits at the edges of the map. Do not update if an * edge has been passed. */ if (upper_seed < control->size) upper_seed += window; 40005ef8: 00001ab7 lui s5,0x1 { 40005efc: 00058413 mv s0,a1 40005f00: 00060993 mv s3,a2 40005f04: 00050913 mv s2,a0 40005f08: 00068a13 mv s4,a3 *allocated = false; 40005f0c: 00060023 sb zero,0(a2) lower_seed = seed; 40005f10: 00058493 mv s1,a1 upper_seed += window; 40005f14: 800a8a93 addi s5,s5,-2048 # 800 while (((upper_seed >= 0) && (upper_seed < control->size)) 40005f18: 04044263 bltz s0,40005f5c 40005f1c: 00c92783 lw a5,12(s2) 40005f20: 02f47e63 bgeu s0,a5,40005f5c *bit = upper_seed; 40005f24: 008a2023 sw s0,0(s4) rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated, 40005f28: 00100693 li a3,1 40005f2c: 00098613 mv a2,s3 40005f30: 000a0593 mv a1,s4 40005f34: 00090513 mv a0,s2 40005f38: 915ff0ef jal ra,4000584c if ((rc > 0) || *allocated) 40005f3c: 06a04463 bgtz a0,40005fa4 <== NEVER TAKEN 40005f40: 0009c783 lbu a5,0(s3) 40005f44: 06079063 bnez a5,40005fa4 if (lower_seed >= 0) 40005f48: 0204d263 bgez s1,40005f6c if (upper_seed < control->size) 40005f4c: 00c92783 lw a5,12(s2) 40005f50: fcf474e3 bgeu s0,a5,40005f18 upper_seed += window; 40005f54: 01540433 add s0,s0,s5 while (((upper_seed >= 0) && (upper_seed < control->size)) 40005f58: fc0452e3 bgez s0,40005f1c <== ALWAYS TAKEN || ((lower_seed >= 0) && (lower_seed < control->size))) 40005f5c: 0404c463 bltz s1,40005fa4 40005f60: 00c92783 lw a5,12(s2) 40005f64: 04f4f063 bgeu s1,a5,40005fa4 if (upper_seed < control->size) 40005f68: faf46ee3 bltu s0,a5,40005f24 *bit = lower_seed; 40005f6c: 009a2023 sw s1,0(s4) rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated, 40005f70: fff00693 li a3,-1 40005f74: 00098613 mv a2,s3 40005f78: 000a0593 mv a1,s4 40005f7c: 00090513 mv a0,s2 40005f80: 8cdff0ef jal ra,4000584c if ((rc > 0) || *allocated) 40005f84: 02a04063 bgtz a0,40005fa4 <== NEVER TAKEN 40005f88: 0009c783 lbu a5,0(s3) 40005f8c: 00079c63 bnez a5,40005fa4 if (upper_seed < control->size) 40005f90: 00c92783 lw a5,12(s2) 40005f94: 00f47463 bgeu s0,a5,40005f9c upper_seed += window; 40005f98: 01540433 add s0,s0,s5 if (lower_seed >= 0) lower_seed -= window; 40005f9c: 80048493 addi s1,s1,-2048 40005fa0: f79ff06f j 40005f18 } return 0; } 40005fa4: 01c12083 lw ra,28(sp) 40005fa8: 01812403 lw s0,24(sp) 40005fac: 01412483 lw s1,20(sp) 40005fb0: 01012903 lw s2,16(sp) 40005fb4: 00c12983 lw s3,12(sp) 40005fb8: 00812a03 lw s4,8(sp) 40005fbc: 00412a83 lw s5,4(sp) 40005fc0: 00000513 li a0,0 40005fc4: 02010113 addi sp,sp,32 40005fc8: 00008067 ret =============================================================================== 40005bb0 : if (!control->buffer) 40005bb0: 00052783 lw a5,0(a0) 40005bb4: 0c078463 beqz a5,40005c7c { 40005bb8: ff010113 addi sp,sp,-16 40005bbc: 00812423 sw s0,8(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005bc0: 00852603 lw a2,8(a0) 40005bc4: 00050413 mv s0,a0 40005bc8: 00452503 lw a0,4(a0) { 40005bcc: 00912223 sw s1,4(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005bd0: 00100693 li a3,1 40005bd4: 00058493 mv s1,a1 40005bd8: 00078593 mv a1,a5 { 40005bdc: 00112623 sw ra,12(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005be0: 19d000ef jal ra,4000657c if (rc) 40005be4: 08051663 bnez a0,40005c70 <== NEVER TAKEN *map = rtems_rfs_buffer_data (control->buffer); 40005be8: 00042783 lw a5,0(s0) 40005bec: 0087a783 lw a5,8(a5) 40005bf0: 01c7a783 lw a5,28(a5) if (bit >= control->size) 40005bf4: 00c42703 lw a4,12(s0) return EINVAL; 40005bf8: 01600513 li a0,22 if (bit >= control->size) 40005bfc: 06e4f063 bgeu s1,a4,40005c5c index = rtems_rfs_bitmap_map_index (bit); 40005c00: 4054d693 srai a3,s1,0x5 element = map[index]; 40005c04: 00269713 slli a4,a3,0x2 40005c08: 00e787b3 add a5,a5,a4 40005c0c: 0007a803 lw a6,0(a5) map[index] = rtems_rfs_bitmap_clear (element, 1 << offset); 40005c10: 00100593 li a1,1 40005c14: 00959733 sll a4,a1,s1 return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits); 40005c18: 01076733 or a4,a4,a6 search_map = control->search_bits; 40005c1c: 01442603 lw a2,20(s0) map[index] = rtems_rfs_bitmap_clear (element, 1 << offset); 40005c20: 00e7a023 sw a4,0(a5) return 0; 40005c24: 00000513 li a0,0 if (rtems_rfs_bitmap_match(element, map[index])) 40005c28: 02e80a63 beq a6,a4,40005c5c index = rtems_rfs_bitmap_map_index (bit); 40005c2c: 40a4d493 srai s1,s1,0xa search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); 40005c30: 00249493 slli s1,s1,0x2 40005c34: 009604b3 add s1,a2,s1 return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits); 40005c38: 0004a783 lw a5,0(s1) search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); 40005c3c: 00d596b3 sll a3,a1,a3 rtems_rfs_buffer_mark_dirty (control->buffer); 40005c40: 00042703 lw a4,0(s0) return RTEMS_RFS_BITMAP_CLEAR_BITS (target, bits); 40005c44: 00d7e6b3 or a3,a5,a3 search_map[index] = rtems_rfs_bitmap_clear (search_map[index], 1 << offset); 40005c48: 00d4a023 sw a3,0(s1) control->free++; 40005c4c: 01042783 lw a5,16(s0) rtems_rfs_buffer_mark_dirty (control->buffer); 40005c50: 00b70023 sb a1,0(a4) control->free++; 40005c54: 00178793 addi a5,a5,1 40005c58: 00f42823 sw a5,16(s0) } 40005c5c: 00c12083 lw ra,12(sp) 40005c60: 00812403 lw s0,8(sp) 40005c64: 00412483 lw s1,4(sp) 40005c68: 01010113 addi sp,sp,16 40005c6c: 00008067 ret if (rc > 0) 40005c70: fea046e3 bgtz a0,40005c5c <== NOT EXECUTED *map = NULL; 40005c74: 00000793 li a5,0 <== NOT EXECUTED 40005c78: f7dff06f j 40005bf4 <== NOT EXECUTED return ENXIO; 40005c7c: 00600513 li a0,6 } 40005c80: 00008067 ret =============================================================================== 40005de4 : if (!control->buffer) 40005de4: 00052583 lw a1,0(a0) 40005de8: 0e058463 beqz a1,40005ed0 { 40005dec: fe010113 addi sp,sp,-32 40005df0: 00812c23 sw s0,24(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005df4: 00852603 lw a2,8(a0) 40005df8: 00050413 mv s0,a0 40005dfc: 00452503 lw a0,4(a0) 40005e00: 00100693 li a3,1 { 40005e04: 00112e23 sw ra,28(sp) 40005e08: 00912a23 sw s1,20(sp) 40005e0c: 01212823 sw s2,16(sp) 40005e10: 01312623 sw s3,12(sp) 40005e14: 01412423 sw s4,8(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005e18: 764000ef jal ra,4000657c if (rc) 40005e1c: 0a051263 bnez a0,40005ec0 <== NEVER TAKEN *map = rtems_rfs_buffer_data (control->buffer); 40005e20: 00042983 lw s3,0(s0) 40005e24: 0089a783 lw a5,8(s3) 40005e28: 01c7a503 lw a0,28(a5) elements = rtems_rfs_bitmap_elements (control->size); 40005e2c: 00c42783 lw a5,12(s0) map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR; 40005e30: 0ff00593 li a1,255 40005e34: fff00a13 li s4,-1 elements = rtems_rfs_bitmap_elements (control->size); 40005e38: fff78493 addi s1,a5,-1 40005e3c: 0054d913 srli s2,s1,0x5 40005e40: 00190913 addi s2,s2,1 map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR; 40005e44: 00291613 slli a2,s2,0x2 control->free = control->size; 40005e48: 00f42823 sw a5,16(s0) last_search_bit = rtems_rfs_bitmap_map_offset (elements); 40005e4c: 01f97913 andi s2,s2,31 map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR; 40005e50: 4e8180ef jal ra,4001e338 if (last_search_bit == 0) 40005e54: 04091e63 bnez s2,40005eb0 elements = rtems_rfs_bitmap_elements (elements); 40005e58: 00a4d493 srli s1,s1,0xa control->search_bits[elements - 1] = 40005e5c: 01442783 lw a5,20(s0) for (e = 0; e < (elements - 1); e++) 40005e60: 00048c63 beqz s1,40005e78 control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR; 40005e64: 00078513 mv a0,a5 40005e68: 00249613 slli a2,s1,0x2 40005e6c: 0ff00593 li a1,255 40005e70: 4c8180ef jal ra,4001e338 40005e74: 00050793 mv a5,a0 control->search_bits[elements - 1] = 40005e78: 00249493 slli s1,s1,0x2 40005e7c: 009784b3 add s1,a5,s1 40005e80: 0144a023 sw s4,0(s1) rtems_rfs_buffer_mark_dirty (control->buffer); 40005e84: 00100793 li a5,1 40005e88: 00f98023 sb a5,0(s3) return 0; 40005e8c: 00000513 li a0,0 } 40005e90: 01c12083 lw ra,28(sp) 40005e94: 01812403 lw s0,24(sp) 40005e98: 01412483 lw s1,20(sp) 40005e9c: 01012903 lw s2,16(sp) 40005ea0: 00c12983 lw s3,12(sp) 40005ea4: 00812a03 lw s4,8(sp) 40005ea8: 02010113 addi sp,sp,32 40005eac: 00008067 ret mask >>= (rtems_rfs_bitmap_element_bits () - size); 40005eb0: 02000793 li a5,32 40005eb4: 41278933 sub s2,a5,s2 40005eb8: 012a5a33 srl s4,s4,s2 40005ebc: f9dff06f j 40005e58 if (rc > 0) 40005ec0: fca048e3 bgtz a0,40005e90 <== NOT EXECUTED *map = rtems_rfs_buffer_data (control->buffer); 40005ec4: 00042983 lw s3,0(s0) <== NOT EXECUTED *map = NULL; 40005ec8: 00000513 li a0,0 <== NOT EXECUTED 40005ecc: f61ff06f j 40005e2c <== NOT EXECUTED return ENXIO; 40005ed0: 00600513 li a0,6 } 40005ed4: 00008067 ret =============================================================================== 40005acc : if (!control->buffer) 40005acc: 00052783 lw a5,0(a0) 40005ad0: 0c078c63 beqz a5,40005ba8 { 40005ad4: ff010113 addi sp,sp,-16 40005ad8: 00812423 sw s0,8(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005adc: 00852603 lw a2,8(a0) 40005ae0: 00050413 mv s0,a0 40005ae4: 00452503 lw a0,4(a0) { 40005ae8: 00912223 sw s1,4(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005aec: 00100693 li a3,1 40005af0: 00058493 mv s1,a1 40005af4: 00078593 mv a1,a5 { 40005af8: 00112623 sw ra,12(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005afc: 281000ef jal ra,4000657c if (rc) 40005b00: 08051e63 bnez a0,40005b9c <== NEVER TAKEN *map = rtems_rfs_buffer_data (control->buffer); 40005b04: 00042783 lw a5,0(s0) 40005b08: 0087a783 lw a5,8(a5) 40005b0c: 01c7a703 lw a4,28(a5) if (bit >= control->size) 40005b10: 00c42783 lw a5,12(s0) return EINVAL; 40005b14: 01600513 li a0,22 if (bit >= control->size) 40005b18: 06f4f863 bgeu s1,a5,40005b88 index = rtems_rfs_bitmap_map_index (bit); 40005b1c: 4054d513 srai a0,s1,0x5 element = map[index]; 40005b20: 00251793 slli a5,a0,0x2 40005b24: 00f70733 add a4,a4,a5 40005b28: 00072603 lw a2,0(a4) map[index] = rtems_rfs_bitmap_set (element, 1 << offset); 40005b2c: 00100693 li a3,1 40005b30: 009697b3 sll a5,a3,s1 return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 40005b34: fff7c793 not a5,a5 40005b38: 00c7f7b3 and a5,a5,a2 search_map = control->search_bits; 40005b3c: 01442583 lw a1,20(s0) map[index] = rtems_rfs_bitmap_set (element, 1 << offset); 40005b40: 00f72023 sw a5,0(a4) if (rtems_rfs_bitmap_match(element, map[index])) 40005b44: 04f60063 beq a2,a5,40005b84 control->free--; 40005b48: 01042783 lw a5,16(s0) rtems_rfs_buffer_mark_dirty (control->buffer); 40005b4c: 00042603 lw a2,0(s0) control->free--; 40005b50: fff78793 addi a5,a5,-1 40005b54: 00f42823 sw a5,16(s0) if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET)) 40005b58: 00072783 lw a5,0(a4) rtems_rfs_buffer_mark_dirty (control->buffer); 40005b5c: 00d60023 sb a3,0(a2) if (rtems_rfs_bitmap_match(map[index], RTEMS_RFS_BITMAP_ELEMENT_SET)) 40005b60: 02079263 bnez a5,40005b84 index = rtems_rfs_bitmap_map_index (bit); 40005b64: 40a4d493 srai s1,s1,0xa search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset); 40005b68: 00249493 slli s1,s1,0x2 40005b6c: 009584b3 add s1,a1,s1 return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 40005b70: 0004a783 lw a5,0(s1) search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset); 40005b74: 00a696b3 sll a3,a3,a0 return RTEMS_RFS_BITMAP_SET_BITS (target, bits); 40005b78: fff6c693 not a3,a3 40005b7c: 00d7f6b3 and a3,a5,a3 search_map[index] = rtems_rfs_bitmap_set (search_map[index], 1 << offset); 40005b80: 00d4a023 sw a3,0(s1) return 0; 40005b84: 00000513 li a0,0 } 40005b88: 00c12083 lw ra,12(sp) 40005b8c: 00812403 lw s0,8(sp) 40005b90: 00412483 lw s1,4(sp) 40005b94: 01010113 addi sp,sp,16 40005b98: 00008067 ret if (rc > 0) 40005b9c: fea046e3 bgtz a0,40005b88 <== NOT EXECUTED *map = NULL; 40005ba0: 00000713 li a4,0 <== NOT EXECUTED 40005ba4: f6dff06f j 40005b10 <== NOT EXECUTED return ENXIO; 40005ba8: 00600513 li a0,6 } 40005bac: 00008067 ret =============================================================================== 40005d30 : if (!control->buffer) 40005d30: 00052583 lw a1,0(a0) 40005d34: 0a058463 beqz a1,40005ddc { 40005d38: ff010113 addi sp,sp,-16 40005d3c: 00812423 sw s0,8(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005d40: 00852603 lw a2,8(a0) 40005d44: 00050413 mv s0,a0 40005d48: 00452503 lw a0,4(a0) 40005d4c: 00100693 li a3,1 { 40005d50: 00112623 sw ra,12(sp) 40005d54: 00912223 sw s1,4(sp) 40005d58: 01212023 sw s2,0(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005d5c: 021000ef jal ra,4000657c if (rc) 40005d60: 06051663 bnez a0,40005dcc <== NEVER TAKEN *map = rtems_rfs_buffer_data (control->buffer); 40005d64: 00042903 lw s2,0(s0) 40005d68: 00892783 lw a5,8(s2) 40005d6c: 01c7a503 lw a0,28(a5) elements = rtems_rfs_bitmap_elements (control->size); 40005d70: 00c42483 lw s1,12(s0) map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET; 40005d74: 00000593 li a1,0 control->free = 0; 40005d78: 00042823 sw zero,16(s0) elements = rtems_rfs_bitmap_elements (control->size); 40005d7c: fff48493 addi s1,s1,-1 40005d80: 0054d613 srli a2,s1,0x5 40005d84: 00160613 addi a2,a2,1 map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET; 40005d88: 00261613 slli a2,a2,0x2 40005d8c: 5ac180ef jal ra,4001e338 control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET; 40005d90: 01442503 lw a0,20(s0) elements = rtems_rfs_bitmap_elements (elements); 40005d94: 00a4d613 srli a2,s1,0xa 40005d98: 00160613 addi a2,a2,1 control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET; 40005d9c: 00261613 slli a2,a2,0x2 40005da0: 00000593 li a1,0 40005da4: 594180ef jal ra,4001e338 rtems_rfs_buffer_mark_dirty (control->buffer); 40005da8: 00100793 li a5,1 40005dac: 00f90023 sb a5,0(s2) return 0; 40005db0: 00000513 li a0,0 } 40005db4: 00c12083 lw ra,12(sp) 40005db8: 00812403 lw s0,8(sp) 40005dbc: 00412483 lw s1,4(sp) 40005dc0: 00012903 lw s2,0(sp) 40005dc4: 01010113 addi sp,sp,16 40005dc8: 00008067 ret if (rc > 0) 40005dcc: fea044e3 bgtz a0,40005db4 <== NOT EXECUTED *map = rtems_rfs_buffer_data (control->buffer); 40005dd0: 00042903 lw s2,0(s0) <== NOT EXECUTED *map = NULL; 40005dd4: 00000513 li a0,0 <== NOT EXECUTED 40005dd8: f99ff06f j 40005d70 <== NOT EXECUTED return ENXIO; 40005ddc: 00600513 li a0,6 } 40005de0: 00008067 ret =============================================================================== 40005c84 : if (!control->buffer) 40005c84: 00052783 lw a5,0(a0) 40005c88: 0a078063 beqz a5,40005d28 { 40005c8c: ff010113 addi sp,sp,-16 40005c90: 00812423 sw s0,8(sp) 40005c94: 01212023 sw s2,0(sp) 40005c98: 00050413 mv s0,a0 40005c9c: 00060913 mv s2,a2 rc = rtems_rfs_buffer_handle_request (control->fs, 40005ca0: 00852603 lw a2,8(a0) 40005ca4: 00452503 lw a0,4(a0) { 40005ca8: 00912223 sw s1,4(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005cac: 00100693 li a3,1 40005cb0: 00058493 mv s1,a1 40005cb4: 00078593 mv a1,a5 { 40005cb8: 00112623 sw ra,12(sp) rc = rtems_rfs_buffer_handle_request (control->fs, 40005cbc: 0c1000ef jal ra,4000657c if (rc) 40005cc0: 04051e63 bnez a0,40005d1c <== NEVER TAKEN *map = rtems_rfs_buffer_data (control->buffer); 40005cc4: 00042783 lw a5,0(s0) 40005cc8: 0087a783 lw a5,8(a5) 40005ccc: 01c7a783 lw a5,28(a5) if (bit >= control->size) 40005cd0: 00c42703 lw a4,12(s0) return EINVAL; 40005cd4: 01600513 li a0,22 if (bit >= control->size) 40005cd8: 02e4f663 bgeu s1,a4,40005d04 index = rtems_rfs_bitmap_map_index (bit); 40005cdc: 4054d713 srai a4,s1,0x5 *state = rtems_rfs_bitmap_test (map[index], bit); 40005ce0: 00271713 slli a4,a4,0x2 40005ce4: 00e787b3 add a5,a5,a4 return RTEMS_RFS_BITMAP_TEST_BIT (target, bit); 40005ce8: 0007a783 lw a5,0(a5) 40005cec: 00100593 li a1,1 40005cf0: 009594b3 sll s1,a1,s1 40005cf4: 00f4f4b3 and s1,s1,a5 40005cf8: 0014b493 seqz s1,s1 40005cfc: 00990023 sb s1,0(s2) return 0; 40005d00: 00000513 li a0,0 } 40005d04: 00c12083 lw ra,12(sp) 40005d08: 00812403 lw s0,8(sp) 40005d0c: 00412483 lw s1,4(sp) 40005d10: 00012903 lw s2,0(sp) 40005d14: 01010113 addi sp,sp,16 40005d18: 00008067 ret if (rc > 0) 40005d1c: fea044e3 bgtz a0,40005d04 <== NOT EXECUTED *map = NULL; 40005d20: 00000793 li a5,0 <== NOT EXECUTED 40005d24: fadff06f j 40005cd0 <== NOT EXECUTED return ENXIO; 40005d28: 00600513 li a0,6 } 40005d2c: 00008067 ret =============================================================================== 4001374c : if (map->dirty && map->inode) 4001374c: 0005c783 lbu a5,0(a1) { 40013750: fe010113 addi sp,sp,-32 40013754: 00812c23 sw s0,24(sp) 40013758: 00912a23 sw s1,20(sp) 4001375c: 00112e23 sw ra,28(sp) 40013760: 01212823 sw s2,16(sp) 40013764: 01312623 sw s3,12(sp) 40013768: 00058413 mv s0,a1 4001376c: 00050493 mv s1,a0 if (map->dirty && map->inode) 40013770: 16078a63 beqz a5,400138e4 40013774: 0045a583 lw a1,4(a1) 40013778: 16058663 beqz a1,400138e4 <== NEVER TAKEN brc = rtems_rfs_inode_load (fs, map->inode); 4001377c: a45f40ef jal ra,400081c0 40013780: 00050913 mv s2,a0 if (brc > 0) 40013784: 03840993 addi s3,s0,56 40013788: 16a04263 bgtz a0,400138ec <== NEVER TAKEN 4001378c: ff800313 li t1,-8 40013790: 02440713 addi a4,s0,36 40013794: 40830333 sub t1,t1,s0 rtems_rfs_buffer_mark_dirty (&handle->buffer); 40013798: 00100893 li a7,1 rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]); 4001379c: 00442783 lw a5,4(s0) 400137a0: 00072683 lw a3,0(a4) rtems_rfs_write_u32 (&handle->node->data.blocks[block], bno); 400137a4: 00e30633 add a2,t1,a4 400137a8: 00c7a583 lw a1,12(a5) 400137ac: 0186d513 srli a0,a3,0x18 400137b0: 0106d813 srli a6,a3,0x10 400137b4: 00c585b3 add a1,a1,a2 400137b8: 00a58023 sb a0,0(a1) 400137bc: 00c7a583 lw a1,12(a5) 400137c0: 0086d513 srli a0,a3,0x8 for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++) 400137c4: 00470713 addi a4,a4,4 400137c8: 00c585b3 add a1,a1,a2 400137cc: 010580a3 sb a6,1(a1) 400137d0: 00c7a583 lw a1,12(a5) 400137d4: 00c585b3 add a1,a1,a2 400137d8: 00a58123 sb a0,2(a1) 400137dc: 00c7a583 lw a1,12(a5) 400137e0: 00c58633 add a2,a1,a2 400137e4: 00d601a3 sb a3,3(a2) rtems_rfs_buffer_mark_dirty (&handle->buffer); 400137e8: 01178823 sb a7,16(a5) 400137ec: fae998e3 bne s3,a4,4001379c rtems_rfs_inode_set_block_count (map->inode, map->size.count); 400137f0: 00442783 lw a5,4(s0) 400137f4: 00842703 lw a4,8(s0) brc = rtems_rfs_inode_unload (fs, map->inode, true); 400137f8: 00100613 li a2,1 rtems_rfs_write_u32 (&handle->node->block_count, block_count); 400137fc: 00c7a683 lw a3,12(a5) 40013800: 01875593 srli a1,a4,0x18 40013804: 01075813 srli a6,a4,0x10 40013808: 00b68623 sb a1,12(a3) 4001380c: 00c7a683 lw a3,12(a5) 40013810: 00875593 srli a1,a4,0x8 40013814: 00048513 mv a0,s1 40013818: 010686a3 sb a6,13(a3) 4001381c: 00c7a683 lw a3,12(a5) 40013820: 00b68723 sb a1,14(a3) 40013824: 00c7a683 lw a3,12(a5) 40013828: 00e687a3 sb a4,15(a3) rtems_rfs_inode_set_block_offset (map->inode, map->size.offset); 4001382c: 00442683 lw a3,4(s0) 40013830: 00c42703 lw a4,12(s0) rtems_rfs_buffer_mark_dirty (&handle->buffer); 40013834: 01178823 sb a7,16(a5) rtems_rfs_write_u16 (&handle->node->block_offset, block_offset); 40013838: 00c6a583 lw a1,12(a3) 4001383c: 01071793 slli a5,a4,0x10 40013840: 0107d793 srli a5,a5,0x10 40013844: 0087d793 srli a5,a5,0x8 40013848: 00f58523 sb a5,10(a1) 4001384c: 00c6a783 lw a5,12(a3) 40013850: 00e785a3 sb a4,11(a5) rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block); 40013854: 00442703 lw a4,4(s0) 40013858: 01c42783 lw a5,28(s0) rtems_rfs_buffer_mark_dirty (&handle->buffer); 4001385c: 01168823 sb a7,16(a3) rtems_rfs_write_u32 (&handle->node->last_map_block, last_map_block); 40013860: 00c72683 lw a3,12(a4) 40013864: 0187d593 srli a1,a5,0x18 40013868: 0107d813 srli a6,a5,0x10 4001386c: 02b68823 sb a1,48(a3) 40013870: 00c72683 lw a3,12(a4) 40013874: 0087d593 srli a1,a5,0x8 40013878: 030688a3 sb a6,49(a3) 4001387c: 00c72683 lw a3,12(a4) 40013880: 02b68923 sb a1,50(a3) 40013884: 00c72683 lw a3,12(a4) 40013888: 02f689a3 sb a5,51(a3) rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block); 4001388c: 00442783 lw a5,4(s0) 40013890: 02042683 lw a3,32(s0) rtems_rfs_buffer_mark_dirty (&handle->buffer); 40013894: 01170823 sb a7,16(a4) rtems_rfs_write_u32 (&handle->node->last_data_block, last_data_block); 40013898: 00c7a703 lw a4,12(a5) 4001389c: 0186d593 srli a1,a3,0x18 400138a0: 0106d813 srli a6,a3,0x10 400138a4: 02b70a23 sb a1,52(a4) 400138a8: 00c7a703 lw a4,12(a5) 400138ac: 0086d593 srli a1,a3,0x8 400138b0: 03070aa3 sb a6,53(a4) 400138b4: 00c7a703 lw a4,12(a5) 400138b8: 02b70b23 sb a1,54(a4) 400138bc: 00c7a703 lw a4,12(a5) 400138c0: 02d70ba3 sb a3,55(a4) brc = rtems_rfs_inode_unload (fs, map->inode, true); 400138c4: 00442583 lw a1,4(s0) rtems_rfs_buffer_mark_dirty (&handle->buffer); 400138c8: 01178823 sb a7,16(a5) 400138cc: ad1f40ef jal ra,4000839c if (brc > 0) 400138d0: fff54793 not a5,a0 400138d4: 41f7d793 srai a5,a5,0x1f 400138d8: 00f57933 and s2,a0,a5 map->dirty = false; 400138dc: 00040023 sb zero,0(s0) 400138e0: 00c0006f j 400138ec int rc = 0; 400138e4: 00000913 li s2,0 400138e8: 03840993 addi s3,s0,56 rtems_rfs_buffer_handle_release (fs, handle); 400138ec: 00098593 mv a1,s3 map->inode = NULL; 400138f0: 00042223 sw zero,4(s0) 400138f4: 00048513 mv a0,s1 400138f8: f1df20ef jal ra,40006814 400138fc: 04440593 addi a1,s0,68 handle->dirty = false; 40013900: 02040c23 sb zero,56(s0) handle->bnum = 0; 40013904: 02042e23 sw zero,60(s0) handle->buffer = NULL; 40013908: 04042023 sw zero,64(s0) rtems_rfs_buffer_handle_release (fs, handle); 4001390c: 00048513 mv a0,s1 40013910: f05f20ef jal ra,40006814 } 40013914: 01c12083 lw ra,28(sp) handle->dirty = false; 40013918: 04040223 sb zero,68(s0) handle->bnum = 0; 4001391c: 04042423 sw zero,72(s0) handle->buffer = NULL; 40013920: 04042623 sw zero,76(s0) 40013924: 01812403 lw s0,24(sp) 40013928: 01412483 lw s1,20(sp) 4001392c: 00c12983 lw s3,12(sp) 40013930: 00090513 mv a0,s2 40013934: 01012903 lw s2,16(sp) 40013938: 02010113 addi sp,sp,32 4001393c: 00008067 ret =============================================================================== 40013940 : { 40013940: fd010113 addi sp,sp,-48 40013944: 02812423 sw s0,40(sp) 40013948: 03212023 sw s2,32(sp) 4001394c: 01312e23 sw s3,28(sp) 40013950: 01412c23 sw s4,24(sp) 40013954: 02112623 sw ra,44(sp) 40013958: 02912223 sw s1,36(sp) *block = 0; 4001395c: 0006a023 sw zero,0(a3) if (rtems_rfs_block_pos_block_past_end (bpos, &map->size)) 40013960: 00062783 lw a5,0(a2) { 40013964: 00058413 mv s0,a1 40013968: 00068993 mv s3,a3 if (rtems_rfs_block_pos_block_past_end (bpos, &map->size)) 4001396c: 0085a583 lw a1,8(a1) { 40013970: 00060913 mv s2,a2 40013974: 00050a13 mv s4,a0 if (rtems_rfs_block_pos_block_past_end (bpos, &map->size)) 40013978: 00078663 beqz a5,40013984 return ENXIO; 4001397c: 00600513 li a0,6 if (rtems_rfs_block_pos_block_past_end (bpos, &map->size)) 40013980: 04058a63 beqz a1,400139d4 <== NEVER TAKEN return ENXIO; 40013984: 00600513 li a0,6 if (rtems_rfs_block_pos_block_past_end (bpos, &map->size)) 40013988: 04b7f663 bgeu a5,a1,400139d4 if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0)) 4001398c: 01042703 lw a4,16(s0) 40013990: 0ce78063 beq a5,a4,40013a50 if (map->size.count <= RTEMS_RFS_INODE_BLOCKS) 40013994: 00500713 li a4,5 40013998: 04b76e63 bltu a4,a1,400139f4 *block = map->blocks[bpos->bno]; 4001399c: 00878793 addi a5,a5,8 400139a0: 00279793 slli a5,a5,0x2 400139a4: 00f407b3 add a5,s0,a5 400139a8: 0047a783 lw a5,4(a5) 400139ac: 00f9a023 sw a5,0(s3) rtems_rfs_block_copy_bpos (&map->bpos, bpos); 400139b0: 00892783 lw a5,8(s2) 400139b4: 00092683 lw a3,0(s2) 400139b8: 00492703 lw a4,4(s2) 400139bc: 00f42c23 sw a5,24(s0) 400139c0: 00d42823 sw a3,16(s0) 400139c4: 00e42a23 sw a4,20(s0) map->bpos.block = *block; 400139c8: 0009a783 lw a5,0(s3) 400139cc: 00000513 li a0,0 400139d0: 00f42c23 sw a5,24(s0) } 400139d4: 02c12083 lw ra,44(sp) 400139d8: 02812403 lw s0,40(sp) 400139dc: 02412483 lw s1,36(sp) 400139e0: 02012903 lw s2,32(sp) 400139e4: 01c12983 lw s3,28(sp) 400139e8: 01812a03 lw s4,24(sp) 400139ec: 03010113 addi sp,sp,48 400139f0: 00008067 ret direct = bpos->bno % fs->blocks_per_block; 400139f4: 034a2703 lw a4,52(s4) if (map->size.count <= fs->block_map_singly_blocks) 400139f8: 038a2683 lw a3,56(s4) singly = bpos->bno / fs->blocks_per_block; 400139fc: 02e7d833 divu a6,a5,a4 40013a00: 01012623 sw a6,12(sp) direct = bpos->bno % fs->blocks_per_block; 40013a04: 02e7f4b3 remu s1,a5,a4 if (map->size.count <= fs->block_map_singly_blocks) 40013a08: 04b6fc63 bgeu a3,a1,40013a60 if (map->size.count < fs->block_map_doubly_blocks) 40013a0c: 03ca2783 lw a5,60(s4) rc = ENXIO; 40013a10: 00600513 li a0,6 singly %= fs->blocks_per_block; 40013a14: 02e876b3 remu a3,a6,a4 40013a18: 00d12623 sw a3,12(sp) if (map->size.count < fs->block_map_doubly_blocks) 40013a1c: faf5fce3 bgeu a1,a5,400139d4 doubly = singly / fs->blocks_per_block; 40013a20: 02e85833 divu a6,a6,a4 rc = rtems_rfs_block_find_indirect (fs, 40013a24: 04440593 addi a1,s0,68 40013a28: 00c10713 addi a4,sp,12 40013a2c: 000a0513 mv a0,s4 40013a30: 00880813 addi a6,a6,8 40013a34: 00281813 slli a6,a6,0x2 40013a38: 01040833 add a6,s0,a6 40013a3c: 00482603 lw a2,4(a6) 40013a40: 961ff0ef jal ra,400133a0 if (rc == 0) 40013a44: f80518e3 bnez a0,400139d4 <== NEVER TAKEN rc = rtems_rfs_block_find_indirect (fs, 40013a48: 00c12603 lw a2,12(sp) 40013a4c: 0240006f j 40013a70 if ((bpos->bno == map->bpos.bno) && (map->bpos.block != 0)) 40013a50: 01842703 lw a4,24(s0) 40013a54: f40700e3 beqz a4,40013994 *block = map->bpos.block; 40013a58: 00e9a023 sw a4,0(s3) if (rc == 0) 40013a5c: f55ff06f j 400139b0 rc = rtems_rfs_block_find_indirect (fs, 40013a60: 00880813 addi a6,a6,8 40013a64: 00281813 slli a6,a6,0x2 40013a68: 01040833 add a6,s0,a6 40013a6c: 00482603 lw a2,4(a6) rc = rtems_rfs_block_find_indirect (fs, 40013a70: 00098713 mv a4,s3 40013a74: 00048693 mv a3,s1 40013a78: 03840593 addi a1,s0,56 40013a7c: 000a0513 mv a0,s4 40013a80: 921ff0ef jal ra,400133a0 if (rc == 0) 40013a84: f20506e3 beqz a0,400139b0 <== ALWAYS TAKEN 40013a88: f4dff06f j 400139d4 <== NOT EXECUTED =============================================================================== 40013b88 : { 40013b88: fa010113 addi sp,sp,-96 40013b8c: 04812c23 sw s0,88(sp) 40013b90: 03b12623 sw s11,44(sp) 40013b94: 00058413 mv s0,a1 40013b98: 00050d93 mv s11,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW)) 40013b9c: 00000593 li a1,0 40013ba0: 00002537 lui a0,0x2 { 40013ba4: 05312623 sw s3,76(sp) 40013ba8: 05512223 sw s5,68(sp) 40013bac: 04112e23 sw ra,92(sp) 40013bb0: 04912a23 sw s1,84(sp) 40013bb4: 05212823 sw s2,80(sp) 40013bb8: 05412423 sw s4,72(sp) 40013bbc: 05612023 sw s6,64(sp) 40013bc0: 03712e23 sw s7,60(sp) 40013bc4: 03812c23 sw s8,56(sp) 40013bc8: 03912a23 sw s9,52(sp) 40013bcc: 03a12823 sw s10,48(sp) 40013bd0: 00060993 mv s3,a2 40013bd4: 00068a93 mv s5,a3 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_GROW)) 40013bd8: d34f60ef jal ra,4000a10c 40013bdc: 36051863 bnez a0,40013f4c <== NEVER TAKEN if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs)) 40013be0: 00842783 lw a5,8(s0) 40013be4: 03cda703 lw a4,60(s11) return EFBIG; 40013be8: 01b00493 li s1,27 if ((map->size.count + blocks) >= rtems_rfs_fs_max_block_map_blocks (fs)) 40013bec: 00f987b3 add a5,s3,a5 40013bf0: 28e7fc63 bgeu a5,a4,40013e88 for (b = 0; b < blocks; b++) 40013bf4: 36098863 beqz s3,40013f64 <== NEVER TAKEN rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block, 40013bf8: 02042583 lw a1,32(s0) for (b = 0; b < blocks; b++) 40013bfc: 00000d13 li s10,0 if (map->size.count < RTEMS_RFS_INODE_BLOCKS) 40013c00: 00400a13 li s4,4 rtems_rfs_block_set_number (&map->singly_buffer, direct, block); 40013c04: 00100913 li s2,1 rc = rtems_rfs_buffer_handle_request (fs, 40013c08: 04440b93 addi s7,s0,68 rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40013c0c: 03840b13 addi s6,s0,56 40013c10: 03c0006f j 40013c4c map->blocks[map->size.count] = block; 40013c14: 01812583 lw a1,24(sp) 40013c18: 00870793 addi a5,a4,8 40013c1c: 00279793 slli a5,a5,0x2 40013c20: 00f407b3 add a5,s0,a5 40013c24: 00b7a223 sw a1,4(a5) map->size.count++; 40013c28: 00170713 addi a4,a4,1 40013c2c: 00e42423 sw a4,8(s0) map->size.offset = 0; 40013c30: 00042623 sw zero,12(s0) if (b == 0) 40013c34: 000d1463 bnez s10,40013c3c <== NEVER TAKEN *new_block = block; 40013c38: 00baa023 sw a1,0(s5) map->last_data_block = block; 40013c3c: 02b42023 sw a1,32(s0) map->dirty = true; 40013c40: 01240023 sb s2,0(s0) for (b = 0; b < blocks; b++) 40013c44: 001d0d13 addi s10,s10,1 40013c48: 313d0e63 beq s10,s3,40013f64 rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block, 40013c4c: 01810693 addi a3,sp,24 40013c50: 00000613 li a2,0 40013c54: 000d8513 mv a0,s11 40013c58: 94cf40ef jal ra,40007da4 40013c5c: 00050493 mv s1,a0 if (rc > 0) 40013c60: 22a04463 bgtz a0,40013e88 if (map->size.count < RTEMS_RFS_INODE_BLOCKS) 40013c64: 00842703 lw a4,8(s0) 40013c68: faea76e3 bgeu s4,a4,40013c14 direct = map->size.count % fs->blocks_per_block; 40013c6c: 034da883 lw a7,52(s11) if (map->size.count < fs->block_map_singly_blocks) 40013c70: 038da683 lw a3,56(s11) direct = map->size.count % fs->blocks_per_block; 40013c74: 03177c33 remu s8,a4,a7 singly = map->size.count / fs->blocks_per_block; 40013c78: 03175833 divu a6,a4,a7 if (map->size.count < fs->block_map_singly_blocks) 40013c7c: 0ad77263 bgeu a4,a3,40013d20 if ((direct == 0) || 40013c80: 240c0463 beqz s8,40013ec8 40013c84: 01177663 bgeu a4,a7,40013c90 ((singly == 0) && (direct == RTEMS_RFS_INODE_BLOCKS))) 40013c88: 00500793 li a5,5 40013c8c: 22fc0e63 beq s8,a5,40013ec8 rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40013c90: 00880813 addi a6,a6,8 40013c94: 00281813 slli a6,a6,0x2 40013c98: 01040833 add a6,s0,a6 40013c9c: 00482603 lw a2,4(a6) 40013ca0: 00100693 li a3,1 40013ca4: 000b0593 mv a1,s6 40013ca8: 000d8513 mv a0,s11 40013cac: 8d1f20ef jal ra,4000657c 40013cb0: 00050493 mv s1,a0 if (rc > 0) 40013cb4: 1c904263 bgtz s1,40013e78 <== NEVER TAKEN rtems_rfs_block_set_number (&map->singly_buffer, direct, block); 40013cb8: 04042703 lw a4,64(s0) 40013cbc: 01b14683 lbu a3,27(sp) 40013cc0: 002c1793 slli a5,s8,0x2 40013cc4: 01c72703 lw a4,28(a4) 40013cc8: 00f70733 add a4,a4,a5 40013ccc: 00d70023 sb a3,0(a4) 40013cd0: 04042703 lw a4,64(s0) 40013cd4: 01a15683 lhu a3,26(sp) 40013cd8: 01c72703 lw a4,28(a4) 40013cdc: 00f70733 add a4,a4,a5 40013ce0: 00d700a3 sb a3,1(a4) 40013ce4: 04042703 lw a4,64(s0) 40013ce8: 01812683 lw a3,24(sp) 40013cec: 01c72703 lw a4,28(a4) 40013cf0: 0086d693 srli a3,a3,0x8 40013cf4: 00f70733 add a4,a4,a5 40013cf8: 00d70123 sb a3,2(a4) 40013cfc: 04042703 lw a4,64(s0) 40013d00: 01c72703 lw a4,28(a4) 40013d04: 00f707b3 add a5,a4,a5 40013d08: 01812703 lw a4,24(sp) 40013d0c: 00e781a3 sb a4,3(a5) map->size.count++; 40013d10: 00842703 lw a4,8(s0) *new_block = block; 40013d14: 01812583 lw a1,24(sp) rtems_rfs_block_set_number (&map->singly_buffer, direct, block); 40013d18: 03240c23 sb s2,56(s0) 40013d1c: f0dff06f j 40013c28 singly %= fs->blocks_per_block; 40013d20: 01112423 sw a7,8(sp) 40013d24: 01012223 sw a6,4(sp) doubly = singly / fs->blocks_per_block; 40013d28: 03185333 divu t1,a6,a7 singly %= fs->blocks_per_block; 40013d2c: 03187cb3 remu s9,a6,a7 if (direct == 0) 40013d30: 0c0c1663 bnez s8,40013dfc rc = rtems_rfs_block_map_indirect_alloc (fs, map, 40013d34: 00000713 li a4,0 40013d38: 01c10693 addi a3,sp,28 40013d3c: 000b0613 mv a2,s6 40013d40: 00040593 mv a1,s0 40013d44: 000d8513 mv a0,s11 40013d48: 00612623 sw t1,12(sp) 40013d4c: c2cff0ef jal ra,40013178 if (rc > 0) 40013d50: 00c12303 lw t1,12(sp) 40013d54: 00412803 lw a6,4(sp) 40013d58: 00812883 lw a7,8(sp) rc = rtems_rfs_block_map_indirect_alloc (fs, map, 40013d5c: 00050493 mv s1,a0 if (rc > 0) 40013d60: 10a04c63 bgtz a0,40013e78 <== NEVER TAKEN if ((singly == 0) || 40013d64: 180c8863 beqz s9,40013ef4 <== NEVER TAKEN 40013d68: 01187663 bgeu a6,a7,40013d74 ((doubly == 0) && (singly == RTEMS_RFS_INODE_BLOCKS))) 40013d6c: 00500793 li a5,5 40013d70: 18fc8263 beq s9,a5,40013ef4 rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer, 40013d74: 00830713 addi a4,t1,8 40013d78: 00271713 slli a4,a4,0x2 40013d7c: 00e40733 add a4,s0,a4 40013d80: 00472603 lw a2,4(a4) 40013d84: 00100693 li a3,1 40013d88: 000b8593 mv a1,s7 40013d8c: 000d8513 mv a0,s11 40013d90: fecf20ef jal ra,4000657c 40013d94: 00050493 mv s1,a0 if (rc > 0) 40013d98: 18a04863 bgtz a0,40013f28 <== NEVER TAKEN rtems_rfs_block_set_number (&map->doubly_buffer, 40013d9c: 04c42703 lw a4,76(s0) 40013da0: 01f14683 lbu a3,31(sp) 40013da4: 002c9c93 slli s9,s9,0x2 40013da8: 01c72703 lw a4,28(a4) 40013dac: 01970733 add a4,a4,s9 40013db0: 00d70023 sb a3,0(a4) 40013db4: 04c42703 lw a4,76(s0) 40013db8: 01e15683 lhu a3,30(sp) 40013dbc: 01c72703 lw a4,28(a4) 40013dc0: 01970733 add a4,a4,s9 40013dc4: 00d700a3 sb a3,1(a4) 40013dc8: 04c42703 lw a4,76(s0) 40013dcc: 01c12683 lw a3,28(sp) 40013dd0: 01c72703 lw a4,28(a4) 40013dd4: 0086d693 srli a3,a3,0x8 40013dd8: 01970733 add a4,a4,s9 40013ddc: 00d70123 sb a3,2(a4) 40013de0: 04c42703 lw a4,76(s0) 40013de4: 01c72703 lw a4,28(a4) 40013de8: 01970cb3 add s9,a4,s9 40013dec: 01c12703 lw a4,28(sp) 40013df0: 00ec81a3 sb a4,3(s9) 40013df4: 05240223 sb s2,68(s0) 40013df8: ec1ff06f j 40013cb8 rc = rtems_rfs_buffer_handle_request (fs, 40013dfc: 00830313 addi t1,t1,8 40013e00: 00231313 slli t1,t1,0x2 40013e04: 00640333 add t1,s0,t1 40013e08: 00432603 lw a2,4(t1) 40013e0c: 00100693 li a3,1 40013e10: 000b8593 mv a1,s7 40013e14: 000d8513 mv a0,s11 40013e18: f64f20ef jal ra,4000657c 40013e1c: 00050493 mv s1,a0 if (rc > 0) 40013e20: 04a04c63 bgtz a0,40013e78 <== NEVER TAKEN singly_block = rtems_rfs_block_get_number (&map->doubly_buffer, 40013e24: 04c42703 lw a4,76(s0) 40013e28: 002c9c93 slli s9,s9,0x2 rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40013e2c: 00100693 li a3,1 singly_block = rtems_rfs_block_get_number (&map->doubly_buffer, 40013e30: 01c72703 lw a4,28(a4) rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40013e34: 000b0593 mv a1,s6 40013e38: 000d8513 mv a0,s11 singly_block = rtems_rfs_block_get_number (&map->doubly_buffer, 40013e3c: 01970cb3 add s9,a4,s9 40013e40: 000cc603 lbu a2,0(s9) 40013e44: 003cc883 lbu a7,3(s9) 40013e48: 001cc803 lbu a6,1(s9) 40013e4c: 002cc703 lbu a4,2(s9) 40013e50: 01861613 slli a2,a2,0x18 40013e54: 01166633 or a2,a2,a7 40013e58: 01081813 slli a6,a6,0x10 40013e5c: 01066633 or a2,a2,a6 40013e60: 00871713 slli a4,a4,0x8 40013e64: 00e66633 or a2,a2,a4 40013e68: 00c12e23 sw a2,28(sp) rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40013e6c: f10f20ef jal ra,4000657c 40013e70: 00050493 mv s1,a0 if (rc > 0) 40013e74: e49052e3 blez s1,40013cb8 <== ALWAYS TAKEN rtems_rfs_group_bitmap_free (fs, false, block); 40013e78: 01812603 lw a2,24(sp) <== NOT EXECUTED 40013e7c: 00000593 li a1,0 <== NOT EXECUTED 40013e80: 000d8513 mv a0,s11 <== NOT EXECUTED 40013e84: 9a4f40ef jal ra,40008028 <== NOT EXECUTED } 40013e88: 05c12083 lw ra,92(sp) 40013e8c: 05812403 lw s0,88(sp) 40013e90: 05012903 lw s2,80(sp) 40013e94: 04c12983 lw s3,76(sp) 40013e98: 04812a03 lw s4,72(sp) 40013e9c: 04412a83 lw s5,68(sp) 40013ea0: 04012b03 lw s6,64(sp) 40013ea4: 03c12b83 lw s7,60(sp) 40013ea8: 03812c03 lw s8,56(sp) 40013eac: 03412c83 lw s9,52(sp) 40013eb0: 03012d03 lw s10,48(sp) 40013eb4: 02c12d83 lw s11,44(sp) 40013eb8: 00048513 mv a0,s1 40013ebc: 05412483 lw s1,84(sp) 40013ec0: 06010113 addi sp,sp,96 40013ec4: 00008067 ret &map->blocks[singly], 40013ec8: 00980693 addi a3,a6,9 upping = map->size.count == RTEMS_RFS_INODE_BLOCKS; 40013ecc: ffb70713 addi a4,a4,-5 &map->blocks[singly], 40013ed0: 00269693 slli a3,a3,0x2 rc = rtems_rfs_block_map_indirect_alloc (fs, map, 40013ed4: 00173713 seqz a4,a4 40013ed8: 00d406b3 add a3,s0,a3 40013edc: 000b0613 mv a2,s6 40013ee0: 00040593 mv a1,s0 40013ee4: 000d8513 mv a0,s11 40013ee8: a90ff0ef jal ra,40013178 40013eec: 00050493 mv s1,a0 { 40013ef0: dc5ff06f j 40013cb4 upping = map->size.count == fs->block_map_singly_blocks; 40013ef4: 038da603 lw a2,56(s11) 40013ef8: 00842703 lw a4,8(s0) &map->blocks[doubly], 40013efc: 00930693 addi a3,t1,9 40013f00: 00269693 slli a3,a3,0x2 upping = map->size.count == fs->block_map_singly_blocks; 40013f04: 40c70733 sub a4,a4,a2 rc = rtems_rfs_block_map_indirect_alloc (fs, map, 40013f08: 00173713 seqz a4,a4 40013f0c: 00d406b3 add a3,s0,a3 40013f10: 000b8613 mv a2,s7 40013f14: 00040593 mv a1,s0 40013f18: 000d8513 mv a0,s11 40013f1c: a5cff0ef jal ra,40013178 40013f20: 00050493 mv s1,a0 if (rc > 0) 40013f24: e6a05ce3 blez a0,40013d9c <== ALWAYS TAKEN rtems_rfs_group_bitmap_free (fs, false, singly_block); 40013f28: 01c12603 lw a2,28(sp) <== NOT EXECUTED 40013f2c: 00000593 li a1,0 <== NOT EXECUTED 40013f30: 000d8513 mv a0,s11 <== NOT EXECUTED 40013f34: 8f4f40ef jal ra,40008028 <== NOT EXECUTED rtems_rfs_group_bitmap_free (fs, false, block); 40013f38: 01812603 lw a2,24(sp) <== NOT EXECUTED 40013f3c: 00000593 li a1,0 <== NOT EXECUTED 40013f40: 000d8513 mv a0,s11 <== NOT EXECUTED 40013f44: 8e4f40ef jal ra,40008028 <== NOT EXECUTED return rc; 40013f48: f41ff06f j 40013e88 <== NOT EXECUTED printf ("rtems-rfs: block-map-grow: entry: blocks=%zd count=%" PRIu32 "\n", 40013f4c: 00842603 lw a2,8(s0) <== NOT EXECUTED 40013f50: 40023537 lui a0,0x40023 <== NOT EXECUTED 40013f54: 00098593 mv a1,s3 <== NOT EXECUTED 40013f58: e9050513 addi a0,a0,-368 # 40022e90 <== NOT EXECUTED 40013f5c: a9ded0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40013f60: c81ff06f j 40013be0 <== NOT EXECUTED return 0; 40013f64: 00000493 li s1,0 40013f68: f21ff06f j 40013e88 =============================================================================== 40013578 : { 40013578: fe010113 addi sp,sp,-32 4001357c: 00812c23 sw s0,24(sp) 40013580: 00912a23 sw s1,20(sp) 40013584: 01212823 sw s2,16(sp) 40013588: 00112e23 sw ra,28(sp) 4001358c: 01312623 sw s3,12(sp) map->dirty = false; 40013590: 00060023 sb zero,0(a2) map->inode = NULL; 40013594: 00062223 sw zero,4(a2) * @param[in] size is a pointer to the block size. */ static inline void rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size) { size->count = 0; 40013598: 00062423 sw zero,8(a2) size->offset = 0; 4001359c: 00062623 sw zero,12(a2) bpos->bno = 0; 400135a0: 00062823 sw zero,16(a2) bpos->boff = 0; 400135a4: 00062a23 sw zero,20(a2) bpos->block = 0; 400135a8: 00062c23 sw zero,24(a2) handle->dirty = false; 400135ac: 02060c23 sb zero,56(a2) handle->bnum = 0; 400135b0: 02062e23 sw zero,60(a2) handle->buffer = NULL; 400135b4: 04062023 sw zero,64(a2) handle->dirty = false; 400135b8: 04060223 sb zero,68(a2) handle->bnum = 0; 400135bc: 04062423 sw zero,72(a2) handle->buffer = NULL; 400135c0: 04062623 sw zero,76(a2) { 400135c4: 00060413 mv s0,a2 400135c8: 00050913 mv s2,a0 400135cc: 00058493 mv s1,a1 rc = rtems_rfs_inode_load (fs, inode); 400135d0: bf1f40ef jal ra,400081c0 if (rc > 0) 400135d4: 12a04263 bgtz a0,400136f8 <== NEVER TAKEN map->inode = inode; 400135d8: 00c4a803 lw a6,12(s1) 400135dc: 02440893 addi a7,s0,36 400135e0: 00942223 sw s1,4(s0) for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++) 400135e4: 01c80713 addi a4,a6,28 400135e8: 03080593 addi a1,a6,48 return rtems_rfs_read_u32 (&handle->node->data.blocks[block]); 400135ec: 00074783 lbu a5,0(a4) 400135f0: 00174603 lbu a2,1(a4) 400135f4: 00374303 lbu t1,3(a4) 400135f8: 00274683 lbu a3,2(a4) 400135fc: 01879793 slli a5,a5,0x18 40013600: 01061613 slli a2,a2,0x10 40013604: 00c7e7b3 or a5,a5,a2 40013608: 0067e7b3 or a5,a5,t1 4001360c: 00869693 slli a3,a3,0x8 40013610: 00d7e7b3 or a5,a5,a3 map->blocks[b] = rtems_rfs_inode_get_block (inode, b); 40013614: 00f8a023 sw a5,0(a7) # f000 for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++) 40013618: 00470713 addi a4,a4,4 4001361c: 00488893 addi a7,a7,4 40013620: fcb716e3 bne a4,a1,400135ec return rtems_rfs_read_u32 (&handle->node->block_count); 40013624: 00c84783 lbu a5,12(a6) 40013628: 00d84683 lbu a3,13(a6) 4001362c: 00f84603 lbu a2,15(a6) 40013630: 00e84703 lbu a4,14(a6) 40013634: 01069693 slli a3,a3,0x10 40013638: 01879793 slli a5,a5,0x18 4001363c: 00d7e7b3 or a5,a5,a3 40013640: 00c7e7b3 or a5,a5,a2 40013644: 00871713 slli a4,a4,0x8 40013648: 00e7e7b3 or a5,a5,a4 map->size.count = rtems_rfs_inode_get_block_count (inode); 4001364c: 00f42423 sw a5,8(s0) map->size.offset = rtems_rfs_inode_get_block_offset (inode); 40013650: 00b84783 lbu a5,11(a6) 40013654: 00a84703 lbu a4,10(a6) } 40013658: 01c12083 lw ra,28(sp) map->size.offset = rtems_rfs_inode_get_block_offset (inode); 4001365c: 00879793 slli a5,a5,0x8 40013660: 00e7e7b3 or a5,a5,a4 40013664: 00879713 slli a4,a5,0x8 40013668: 0087d793 srli a5,a5,0x8 4001366c: 00f767b3 or a5,a4,a5 40013670: 01079793 slli a5,a5,0x10 40013674: 0107d793 srli a5,a5,0x10 40013678: 00f42623 sw a5,12(s0) return rtems_rfs_read_u32 (&handle->node->last_map_block); 4001367c: 03084783 lbu a5,48(a6) 40013680: 03184683 lbu a3,49(a6) 40013684: 03384583 lbu a1,51(a6) 40013688: 03284703 lbu a4,50(a6) 4001368c: 01069693 slli a3,a3,0x10 40013690: 01879793 slli a5,a5,0x18 40013694: 00d7e7b3 or a5,a5,a3 40013698: 00b7e7b3 or a5,a5,a1 4001369c: 00871713 slli a4,a4,0x8 400136a0: 00e7e7b3 or a5,a5,a4 map->last_map_block = rtems_rfs_inode_get_last_map_block (inode); 400136a4: 00f42e23 sw a5,28(s0) return rtems_rfs_read_u32 (&handle->node->last_data_block); 400136a8: 03484783 lbu a5,52(a6) 400136ac: 03584683 lbu a3,53(a6) 400136b0: 03784583 lbu a1,55(a6) 400136b4: 03684703 lbu a4,54(a6) 400136b8: 01879793 slli a5,a5,0x18 400136bc: 01069693 slli a3,a3,0x10 400136c0: 00d7e7b3 or a5,a5,a3 400136c4: 00b7e7b3 or a5,a5,a1 400136c8: 00871713 slli a4,a4,0x8 400136cc: 00e7e7b3 or a5,a5,a4 map->last_data_block = rtems_rfs_inode_get_last_data_block (inode); 400136d0: 02f42023 sw a5,32(s0) } 400136d4: 01812403 lw s0,24(sp) 400136d8: 00c12983 lw s3,12(sp) rc = rtems_rfs_inode_unload (fs, inode, false); 400136dc: 00048593 mv a1,s1 400136e0: 00090513 mv a0,s2 } 400136e4: 01412483 lw s1,20(sp) 400136e8: 01012903 lw s2,16(sp) rc = rtems_rfs_inode_unload (fs, inode, false); 400136ec: 00000613 li a2,0 } 400136f0: 02010113 addi sp,sp,32 rc = rtems_rfs_inode_unload (fs, inode, false); 400136f4: ca9f406f j 4000839c rtems_rfs_buffer_handle_release (fs, handle); 400136f8: 00050993 mv s3,a0 <== NOT EXECUTED 400136fc: 03840593 addi a1,s0,56 <== NOT EXECUTED 40013700: 00090513 mv a0,s2 <== NOT EXECUTED 40013704: 910f30ef jal ra,40006814 <== NOT EXECUTED 40013708: 04440593 addi a1,s0,68 <== NOT EXECUTED handle->dirty = false; 4001370c: 02040c23 sb zero,56(s0) <== NOT EXECUTED handle->bnum = 0; 40013710: 02042e23 sw zero,60(s0) <== NOT EXECUTED handle->buffer = NULL; 40013714: 04042023 sw zero,64(s0) <== NOT EXECUTED rtems_rfs_buffer_handle_release (fs, handle); 40013718: 00090513 mv a0,s2 <== NOT EXECUTED 4001371c: 8f8f30ef jal ra,40006814 <== NOT EXECUTED } 40013720: 01c12083 lw ra,28(sp) <== NOT EXECUTED handle->dirty = false; 40013724: 04040223 sb zero,68(s0) <== NOT EXECUTED handle->bnum = 0; 40013728: 04042423 sw zero,72(s0) <== NOT EXECUTED handle->buffer = NULL; 4001372c: 04042623 sw zero,76(s0) <== NOT EXECUTED 40013730: 01812403 lw s0,24(sp) <== NOT EXECUTED 40013734: 01412483 lw s1,20(sp) <== NOT EXECUTED 40013738: 01012903 lw s2,16(sp) <== NOT EXECUTED 4001373c: 00098513 mv a0,s3 <== NOT EXECUTED 40013740: 00c12983 lw s3,12(sp) <== NOT EXECUTED 40013744: 02010113 addi sp,sp,32 <== NOT EXECUTED 40013748: 00008067 ret <== NOT EXECUTED =============================================================================== 40013f6c : int rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs, rtems_rfs_block_map* map, size_t blocks) { 40013f6c: fb010113 addi sp,sp,-80 40013f70: 03812423 sw s8,40(sp) 40013f74: 03912223 sw s9,36(sp) 40013f78: 00058c13 mv s8,a1 40013f7c: 00050c93 mv s9,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK)) 40013f80: 00000593 li a1,0 40013f84: 00004537 lui a0,0x4 { 40013f88: 04912223 sw s1,68(sp) 40013f8c: 04112623 sw ra,76(sp) 40013f90: 04812423 sw s0,72(sp) 40013f94: 05212023 sw s2,64(sp) 40013f98: 03312e23 sw s3,60(sp) 40013f9c: 03412c23 sw s4,56(sp) 40013fa0: 03512a23 sw s5,52(sp) 40013fa4: 03612823 sw s6,48(sp) 40013fa8: 03712623 sw s7,44(sp) 40013fac: 03a12023 sw s10,32(sp) 40013fb0: 01b12e23 sw s11,28(sp) 40013fb4: 00060493 mv s1,a2 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BLOCK_MAP_SHRINK)) 40013fb8: 954f60ef jal ra,4000a10c 40013fbc: 28051a63 bnez a0,40014250 <== NEVER TAKEN printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n", blocks, map->size.count); if (map->size.count == 0) 40013fc0: 008c2783 lw a5,8(s8) 40013fc4: 26078e63 beqz a5,40014240 return 0; if (blocks > map->size.count) 40013fc8: 00078413 mv s0,a5 40013fcc: 26f4ee63 bltu s1,a5,40014248 blocks = map->size.count; while (blocks) 40013fd0: 28040c63 beqz s0,40014268 <== NEVER TAKEN rtems_rfs_block_no doubly_singly; doubly = singly / fs->blocks_per_block; doubly_singly = singly % fs->blocks_per_block; rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer, 40013fd4: 044c0713 addi a4,s8,68 if (block < RTEMS_RFS_INODE_BLOCKS) 40013fd8: 00400493 li s1,4 rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer, 40013fdc: 00e12623 sw a4,12(sp) doubly_singly); /* * Read the singly indirect table and get the block number. */ rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40013fe0: 038c0913 addi s2,s8,56 40013fe4: 04c0006f j 40014030 block_to_free = map->blocks[block]; 40013fe8: 00279793 slli a5,a5,0x2 40013fec: 00fc07b3 add a5,s8,a5 40013ff0: 0207ad03 lw s10,32(a5) map->blocks[block] = 0; 40013ff4: 0207a023 sw zero,32(a5) { rc = EIO; break; } } rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free); 40013ff8: 000d0613 mv a2,s10 40013ffc: 00000593 li a1,0 40014000: 000c8513 mv a0,s9 40014004: 824f40ef jal ra,40008028 if (rc > 0) 40014008: 14a04463 bgtz a0,40014150 <== NEVER TAKEN return rc; map->size.count--; 4001400c: 008c2783 lw a5,8(s8) map->size.offset = 0; map->last_data_block = block_to_free; map->dirty = true; 40014010: 00100713 li a4,1 map->size.offset = 0; 40014014: 000c2623 sw zero,12(s8) map->size.count--; 40014018: fff78793 addi a5,a5,-1 4001401c: 00fc2423 sw a5,8(s8) map->last_data_block = block_to_free; 40014020: 03ac2023 sw s10,32(s8) map->dirty = true; 40014024: 00ec0023 sb a4,0(s8) blocks--; 40014028: fff40413 addi s0,s0,-1 while (blocks) 4001402c: 1e040663 beqz s0,40014218 block = map->size.count - 1; 40014030: fff78b13 addi s6,a5,-1 if (block < RTEMS_RFS_INODE_BLOCKS) 40014034: fb64fae3 bgeu s1,s6,40013fe8 direct = block % fs->blocks_per_block; 40014038: 034caa03 lw s4,52(s9) if (block < fs->block_map_singly_blocks) 4001403c: 038ca683 lw a3,56(s9) direct = block % fs->blocks_per_block; 40014040: 034b79b3 remu s3,s6,s4 singly = block / fs->blocks_per_block; 40014044: 034b5ab3 divu s5,s6,s4 if (block < fs->block_map_singly_blocks) 40014048: 14db6263 bltu s6,a3,4001418c else if (block < fs->block_map_doubly_blocks) 4001404c: 03cca683 lw a3,60(s9) <== NOT EXECUTED 40014050: 1cdb7463 bgeu s6,a3,40014218 <== NOT EXECUTED rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer, 40014054: 00c12583 lw a1,12(sp) <== NOT EXECUTED 40014058: 00100693 li a3,1 <== NOT EXECUTED 4001405c: 000c8513 mv a0,s9 <== NOT EXECUTED doubly = singly / fs->blocks_per_block; 40014060: 034adbb3 divu s7,s5,s4 <== NOT EXECUTED rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer, 40014064: 008b8793 addi a5,s7,8 <== NOT EXECUTED 40014068: 00279793 slli a5,a5,0x2 <== NOT EXECUTED 4001406c: 00fc07b3 add a5,s8,a5 <== NOT EXECUTED 40014070: 0047a603 lw a2,4(a5) <== NOT EXECUTED doubly_singly = singly % fs->blocks_per_block; 40014074: 034afb33 remu s6,s5,s4 <== NOT EXECUTED rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer, 40014078: d04f20ef jal ra,4000657c <== NOT EXECUTED if (rc > 0) 4001407c: 0ca04a63 bgtz a0,40014150 <== NOT EXECUTED singly = rtems_rfs_block_get_number (&map->doubly_buffer, 40014080: 04cc2603 lw a2,76(s8) <== NOT EXECUTED 40014084: 002b1793 slli a5,s6,0x2 <== NOT EXECUTED rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40014088: 00100693 li a3,1 <== NOT EXECUTED singly = rtems_rfs_block_get_number (&map->doubly_buffer, 4001408c: 01c62603 lw a2,28(a2) <== NOT EXECUTED rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 40014090: 00090593 mv a1,s2 <== NOT EXECUTED 40014094: 000c8513 mv a0,s9 <== NOT EXECUTED singly = rtems_rfs_block_get_number (&map->doubly_buffer, 40014098: 00f607b3 add a5,a2,a5 <== NOT EXECUTED 4001409c: 0007cd83 lbu s11,0(a5) <== NOT EXECUTED 400140a0: 0037c303 lbu t1,3(a5) <== NOT EXECUTED 400140a4: 0017c883 lbu a7,1(a5) <== NOT EXECUTED 400140a8: 0027c603 lbu a2,2(a5) <== NOT EXECUTED 400140ac: 018d9d93 slli s11,s11,0x18 <== NOT EXECUTED 400140b0: 006dedb3 or s11,s11,t1 <== NOT EXECUTED 400140b4: 01089793 slli a5,a7,0x10 <== NOT EXECUTED 400140b8: 00861613 slli a2,a2,0x8 <== NOT EXECUTED 400140bc: 00fdedb3 or s11,s11,a5 <== NOT EXECUTED 400140c0: 00cdedb3 or s11,s11,a2 <== NOT EXECUTED rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 400140c4: 000d8613 mv a2,s11 <== NOT EXECUTED 400140c8: cb4f20ef jal ra,4000657c <== NOT EXECUTED if (rc > 0) 400140cc: 08a04263 bgtz a0,40014150 <== NOT EXECUTED block_to_free = rtems_rfs_block_get_number (&map->singly_buffer, 400140d0: 040c2783 lw a5,64(s8) <== NOT EXECUTED 400140d4: 00299693 slli a3,s3,0x2 <== NOT EXECUTED 400140d8: 01c7a783 lw a5,28(a5) <== NOT EXECUTED 400140dc: 00d787b3 add a5,a5,a3 <== NOT EXECUTED 400140e0: 0007cd03 lbu s10,0(a5) <== NOT EXECUTED 400140e4: 0037c603 lbu a2,3(a5) <== NOT EXECUTED 400140e8: 0017c683 lbu a3,1(a5) <== NOT EXECUTED 400140ec: 0027c783 lbu a5,2(a5) <== NOT EXECUTED 400140f0: 018d1d13 slli s10,s10,0x18 <== NOT EXECUTED 400140f4: 00cd6d33 or s10,s10,a2 <== NOT EXECUTED 400140f8: 01069693 slli a3,a3,0x10 <== NOT EXECUTED 400140fc: 00dd6d33 or s10,s10,a3 <== NOT EXECUTED 40014100: 00879793 slli a5,a5,0x8 <== NOT EXECUTED 40014104: 00fd6d33 or s10,s10,a5 <== NOT EXECUTED if (direct == 0) 40014108: ee0998e3 bnez s3,40013ff8 <== NOT EXECUTED rc = rtems_rfs_group_bitmap_free (fs, false, singly); 4001410c: 000d8613 mv a2,s11 <== NOT EXECUTED 40014110: 00000593 li a1,0 <== NOT EXECUTED 40014114: 000c8513 mv a0,s9 <== NOT EXECUTED 40014118: f11f30ef jal ra,40008028 <== NOT EXECUTED if (rc > 0) 4001411c: 02a04a63 bgtz a0,40014150 <== NOT EXECUTED map->last_map_block = singly; 40014120: 01bc2e23 sw s11,28(s8) <== NOT EXECUTED if ((index == 0) || 40014124: 000b0863 beqz s6,40014134 <== NOT EXECUTED 40014128: ed4af8e3 bgeu s5,s4,40013ff8 <== NOT EXECUTED ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))) 4001412c: 00500793 li a5,5 <== NOT EXECUTED 40014130: ecfb14e3 bne s6,a5,40013ff8 <== NOT EXECUTED 40014134: 00c12603 lw a2,12(sp) <== NOT EXECUTED 40014138: 000b0713 mv a4,s6 <== NOT EXECUTED 4001413c: 000b8693 mv a3,s7 <== NOT EXECUTED 40014140: 000c0593 mv a1,s8 <== NOT EXECUTED 40014144: 000c8513 mv a0,s9 <== NOT EXECUTED 40014148: 9b4ff0ef jal ra,400132fc <== NOT EXECUTED if (rc) 4001414c: ea0506e3 beqz a0,40013ff8 <== NOT EXECUTED */ if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size)) rtems_rfs_block_size_get_bpos (&map->size, &map->bpos); return 0; } 40014150: 04c12083 lw ra,76(sp) 40014154: 04812403 lw s0,72(sp) 40014158: 04412483 lw s1,68(sp) 4001415c: 04012903 lw s2,64(sp) 40014160: 03c12983 lw s3,60(sp) 40014164: 03812a03 lw s4,56(sp) 40014168: 03412a83 lw s5,52(sp) 4001416c: 03012b03 lw s6,48(sp) 40014170: 02c12b83 lw s7,44(sp) 40014174: 02812c03 lw s8,40(sp) 40014178: 02412c83 lw s9,36(sp) 4001417c: 02012d03 lw s10,32(sp) 40014180: 01c12d83 lw s11,28(sp) 40014184: 05010113 addi sp,sp,80 40014188: 00008067 ret rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer, 4001418c: 008a8793 addi a5,s5,8 40014190: 00279793 slli a5,a5,0x2 40014194: 00fc07b3 add a5,s8,a5 40014198: 0047a603 lw a2,4(a5) 4001419c: 00100693 li a3,1 400141a0: 00090593 mv a1,s2 400141a4: 000c8513 mv a0,s9 400141a8: bd4f20ef jal ra,4000657c if (rc > 0) 400141ac: faa042e3 bgtz a0,40014150 <== NEVER TAKEN block_to_free = rtems_rfs_block_get_number (&map->singly_buffer, 400141b0: 040c2683 lw a3,64(s8) 400141b4: 00299793 slli a5,s3,0x2 400141b8: 01c6a683 lw a3,28(a3) 400141bc: 00f687b3 add a5,a3,a5 400141c0: 0007cd03 lbu s10,0(a5) 400141c4: 0037c603 lbu a2,3(a5) 400141c8: 0017c683 lbu a3,1(a5) 400141cc: 0027c783 lbu a5,2(a5) 400141d0: 018d1d13 slli s10,s10,0x18 400141d4: 00cd6d33 or s10,s10,a2 400141d8: 01069693 slli a3,a3,0x10 400141dc: 00dd6d33 or s10,s10,a3 400141e0: 00879793 slli a5,a5,0x8 400141e4: 00fd6d33 or s10,s10,a5 if ((index == 0) || 400141e8: 00098863 beqz s3,400141f8 <== NEVER TAKEN 400141ec: e14b76e3 bgeu s6,s4,40013ff8 ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))) 400141f0: 00500793 li a5,5 400141f4: e0f992e3 bne s3,a5,40013ff8 400141f8: 00098713 mv a4,s3 400141fc: 000a8693 mv a3,s5 40014200: 00090613 mv a2,s2 40014204: 000c0593 mv a1,s8 40014208: 000c8513 mv a0,s9 4001420c: 8f0ff0ef jal ra,400132fc if (rc) 40014210: de0504e3 beqz a0,40013ff8 <== ALWAYS TAKEN 40014214: f3dff06f j 40014150 <== NOT EXECUTED if (map->size.count == 0) 40014218: 04079863 bnez a5,40014268 rtems_rfs_block_size_get_bpos (&map->size, &map->bpos); 4001421c: 00cc2703 lw a4,12(s8) map->last_map_block = 0; 40014220: 000c2e23 sw zero,28(s8) map->last_data_block = 0; 40014224: 020c2023 sw zero,32(s8) rtems_rfs_block_size_get_bpos (&map->size, &map->bpos); 40014228: 00fc2823 sw a5,16(s8) 4001422c: 00ec2a23 sw a4,20(s8) 40014230: 000c2c23 sw zero,24(s8) 40014234: 00070663 beqz a4,40014240 <== ALWAYS TAKEN 40014238: fff78793 addi a5,a5,-1 <== NOT EXECUTED 4001423c: 00fc2823 sw a5,16(s8) <== NOT EXECUTED return 0; 40014240: 00000513 li a0,0 40014244: f0dff06f j 40014150 40014248: 00048413 mv s0,s1 4001424c: d85ff06f j 40013fd0 printf ("rtems-rfs: block-map-shrink: entry: blocks=%zd count=%" PRIu32 "\n", 40014250: 008c2603 lw a2,8(s8) <== NOT EXECUTED 40014254: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014258: 00048593 mv a1,s1 <== NOT EXECUTED 4001425c: ec850513 addi a0,a0,-312 # 40022ec8 <== NOT EXECUTED 40014260: f98ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014264: d5dff06f j 40013fc0 <== NOT EXECUTED if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size)) 40014268: 010c2703 lw a4,16(s8) 4001426c: 02f77063 bgeu a4,a5,4001428c 40014270: fff78693 addi a3,a5,-1 40014274: fce696e3 bne a3,a4,40014240 40014278: 00cc2703 lw a4,12(s8) 4001427c: 014c2683 lw a3,20(s8) 40014280: fad764e3 bltu a4,a3,40014228 return 0; 40014284: 00000513 li a0,0 <== NOT EXECUTED 40014288: ec9ff06f j 40014150 <== NOT EXECUTED rtems_rfs_block_size_get_bpos (&map->size, &map->bpos); 4001428c: 00cc2703 lw a4,12(s8) <== NOT EXECUTED 40014290: f99ff06f j 40014228 <== NOT EXECUTED =============================================================================== 400142f4 : int rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer, bool modified) { 400142f4: ff010113 addi sp,sp,-16 400142f8: 00812423 sw s0,8(sp) 400142fc: 00912223 sw s1,4(sp) 40014300: 00050413 mv s0,a0 40014304: 00058493 mv s1,a1 rtems_status_code sc; int rc = 0; if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE)) 40014308: 04000513 li a0,64 4001430c: 00000593 li a1,0 { 40014310: 00112623 sw ra,12(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE)) 40014314: df9f50ef jal ra,4000a10c 40014318: 02050263 beqz a0,4001433c <== ALWAYS TAKEN printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n", 4001431c: 03442583 lw a1,52(s0) <== NOT EXECUTED 40014320: 01842603 lw a2,24(s0) <== NOT EXECUTED 40014324: 04049863 bnez s1,40014374 <== NOT EXECUTED 40014328: 400226b7 lui a3,0x40022 <== NOT EXECUTED 4001432c: b1c68693 addi a3,a3,-1252 # 40021b1c <== NOT EXECUTED 40014330: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014334: f1050513 addi a0,a0,-240 # 40022f10 <== NOT EXECUTED 40014338: ec0ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED ((intptr_t) buffer->user), buffer->block, modified ? "(modified)" : ""); if (modified) sc = rtems_bdbuf_release_modified (buffer); 4001433c: 00040513 mv a0,s0 if (modified) 40014340: 02048663 beqz s1,4001436c sc = rtems_bdbuf_release_modified (buffer); 40014344: e49fc0ef jal ra,4001118c #endif rc = EIO; } return rc; } 40014348: 00c12083 lw ra,12(sp) 4001434c: 00812403 lw s0,8(sp) rc = EIO; 40014350: 00153513 seqz a0,a0 40014354: 40a00533 neg a0,a0 40014358: ffb57513 andi a0,a0,-5 } 4001435c: 00412483 lw s1,4(sp) 40014360: 00550513 addi a0,a0,5 40014364: 01010113 addi sp,sp,16 40014368: 00008067 ret sc = rtems_bdbuf_release (buffer); 4001436c: d25fc0ef jal ra,40011090 40014370: fd9ff06f j 40014348 printf ("rtems-rfs: bdbuf-release: block=%" PRIuPTR " bdbuf=%" PRIu32 " %s\n", 40014374: 400236b7 lui a3,0x40023 <== NOT EXECUTED 40014378: f0468693 addi a3,a3,-252 # 40022f04 <== NOT EXECUTED 4001437c: fb5ff06f j 40014330 <== NOT EXECUTED =============================================================================== 40006c64 : { 40006c64: ff010113 addi sp,sp,-16 40006c68: 00812423 sw s0,8(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE)) 40006c6c: 00000593 li a1,0 { 40006c70: 00050413 mv s0,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE)) 40006c74: 01000513 li a0,16 { 40006c78: 00112623 sw ra,12(sp) 40006c7c: 00912223 sw s1,4(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE)) 40006c80: 48c030ef jal ra,4000a10c 40006c84: 0a051a63 bnez a0,40006d38 <== NEVER TAKEN rc = rtems_rfs_buffer_setblksize (fs, rtems_rfs_fs_media_block_size (fs)); 40006c88: 01042783 lw a5,16(s0) 40006c8c: 00040513 mv a0,s0 40006c90: 0207a583 lw a1,32(a5) 40006c94: ea5ff0ef jal ra,40006b38 40006c98: 00050493 mv s1,a0 if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE)) 40006c9c: 02a04463 bgtz a0,40006cc4 <== NEVER TAKEN if (close (fs->device) < 0) 40006ca0: 00c42503 lw a0,12(s0) 40006ca4: 1800b0ef jal ra,40011e24 40006ca8: 04054a63 bltz a0,40006cfc <== NEVER TAKEN } 40006cac: 00c12083 lw ra,12(sp) 40006cb0: 00812403 lw s0,8(sp) 40006cb4: 00048513 mv a0,s1 40006cb8: 00412483 lw s1,4(sp) 40006cbc: 01010113 addi sp,sp,16 40006cc0: 00008067 ret if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE)) 40006cc4: 01000513 li a0,16 <== NOT EXECUTED 40006cc8: 00000593 li a1,0 <== NOT EXECUTED 40006ccc: 440030ef jal ra,4000a10c <== NOT EXECUTED 40006cd0: fc0508e3 beqz a0,40006ca0 <== NOT EXECUTED printf ("rtems-rfs: buffer-close: set media block size failed: %d: %s\n", 40006cd4: 00048513 mv a0,s1 <== NOT EXECUTED 40006cd8: 28c180ef jal ra,4001ef64 <== NOT EXECUTED 40006cdc: 00050613 mv a2,a0 <== NOT EXECUTED 40006ce0: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006ce4: 00048593 mv a1,s1 <== NOT EXECUTED 40006ce8: 9fc50513 addi a0,a0,-1540 # 400219fc <== NOT EXECUTED 40006cec: d0dfa0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if (close (fs->device) < 0) 40006cf0: 00c42503 lw a0,12(s0) <== NOT EXECUTED 40006cf4: 1300b0ef jal ra,40011e24 <== NOT EXECUTED 40006cf8: fa055ae3 bgez a0,40006cac <== NOT EXECUTED rc = errno; 40006cfc: 78d160ef jal ra,4001dc88 <__errno> <== NOT EXECUTED 40006d00: 00050793 mv a5,a0 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE)) 40006d04: 00000593 li a1,0 <== NOT EXECUTED 40006d08: 01000513 li a0,16 <== NOT EXECUTED rc = errno; 40006d0c: 0007a483 lw s1,0(a5) <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CLOSE)) 40006d10: 3fc030ef jal ra,4000a10c <== NOT EXECUTED 40006d14: f8050ce3 beqz a0,40006cac <== NOT EXECUTED printf ("rtems-rfs: buffer-close: file close failed: %d: %s\n", 40006d18: 00048513 mv a0,s1 <== NOT EXECUTED 40006d1c: 248180ef jal ra,4001ef64 <== NOT EXECUTED 40006d20: 00050613 mv a2,a0 <== NOT EXECUTED 40006d24: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006d28: 00048593 mv a1,s1 <== NOT EXECUTED 40006d2c: a3c50513 addi a0,a0,-1476 # 40021a3c <== NOT EXECUTED 40006d30: cc9fa0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED return rc; 40006d34: f79ff06f j 40006cac <== NOT EXECUTED printf ("rtems-rfs: buffer-close: closing\n"); 40006d38: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006d3c: 9d850513 addi a0,a0,-1576 # 400219d8 <== NOT EXECUTED 40006d40: d01fa0ef jal ra,40001a40 <__wrap_puts> <== NOT EXECUTED 40006d44: f45ff06f j 40006c88 <== NOT EXECUTED =============================================================================== 4000633c : rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs, 4000633c: ff010113 addi sp,sp,-16 <== NOT EXECUTED 40006340: 00812423 sw s0,8(sp) <== NOT EXECUTED 40006344: 00912223 sw s1,4(sp) <== NOT EXECUTED 40006348: 00050413 mv s0,a0 <== NOT EXECUTED 4000634c: 00058493 mv s1,a1 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE)) 40006350: 20000513 li a0,512 <== NOT EXECUTED 40006354: 00000593 li a1,0 <== NOT EXECUTED rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs, 40006358: 00112623 sw ra,12(sp) <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE)) 4000635c: 5b1030ef jal ra,4000a10c <== NOT EXECUTED 40006360: 02050c63 beqz a0,40006398 <== NOT EXECUTED printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n", 40006364: 0004c783 lbu a5,0(s1) <== NOT EXECUTED 40006368: 0044a583 lw a1,4(s1) <== NOT EXECUTED 4000636c: 0e079063 bnez a5,4000644c <== NOT EXECUTED 40006370: 0084a783 lw a5,8(s1) <== NOT EXECUTED 40006374: 40022637 lui a2,0x40022 <== NOT EXECUTED 40006378: b1c60613 addi a2,a2,-1252 # 40021b1c <== NOT EXECUTED 4000637c: 0307a683 lw a3,48(a5) <== NOT EXECUTED 40006380: 0e068063 beqz a3,40006460 <== NOT EXECUTED 40006384: 40022737 lui a4,0x40022 <== NOT EXECUTED 40006388: b1c70713 addi a4,a4,-1252 # 40021b1c <== NOT EXECUTED 4000638c: 40021537 lui a0,0x40021 <== NOT EXECUTED 40006390: 60050513 addi a0,a0,1536 # 40021600 <== NOT EXECUTED 40006394: e64fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if (rtems_rfs_buffer_refs (handle) > 0) 40006398: 0084a783 lw a5,8(s1) <== NOT EXECUTED 4000639c: 0307a503 lw a0,48(a5) <== NOT EXECUTED 400063a0: 00a05663 blez a0,400063ac <== NOT EXECUTED rtems_rfs_buffer_refs_down (handle); 400063a4: fff50513 addi a0,a0,-1 <== NOT EXECUTED 400063a8: 02a7a823 sw a0,48(a5) <== NOT EXECUTED if (rtems_rfs_buffer_refs (handle) == 0) 400063ac: 08051263 bnez a0,40006430 <== NOT EXECUTED next = the_node->next; 400063b0: 0007a583 lw a1,0(a5) <== NOT EXECUTED previous = the_node->previous; 400063b4: 0047a603 lw a2,4(a5) <== NOT EXECUTED fs->buffers_count--; 400063b8: 05042683 lw a3,80(s0) <== NOT EXECUTED if (rtems_rfs_fs_no_local_cache (fs)) 400063bc: 00042703 lw a4,0(s0) <== NOT EXECUTED next->previous = previous; 400063c0: 00c5a223 sw a2,4(a1) <== NOT EXECUTED previous->next = next; 400063c4: 00b62023 sw a1,0(a2) <== NOT EXECUTED fs->buffers_count--; 400063c8: fff68693 addi a3,a3,-1 <== NOT EXECUTED 400063cc: 04d42823 sw a3,80(s0) <== NOT EXECUTED if (rtems_rfs_fs_no_local_cache (fs)) 400063d0: 00277713 andi a4,a4,2 <== NOT EXECUTED 400063d4: 0c071a63 bnez a4,400064a8 <== NOT EXECUTED if ((fs->release_count + 400063d8: 06042703 lw a4,96(s0) <== NOT EXECUTED 400063dc: 07042603 lw a2,112(s0) <== NOT EXECUTED 400063e0: 04042683 lw a3,64(s0) <== NOT EXECUTED 400063e4: 00c70733 add a4,a4,a2 <== NOT EXECUTED 400063e8: 0ed77463 bgeu a4,a3,400064d0 <== NOT EXECUTED if (rtems_rfs_buffer_dirty (handle)) 400063ec: 0004c703 lbu a4,0(s1) <== NOT EXECUTED 400063f0: 06070e63 beqz a4,4000646c <== NOT EXECUTED old_last = tail->previous; 400063f4: 06c42683 lw a3,108(s0) <== NOT EXECUTED return &the_chain->Tail.Node; 400063f8: 06840713 addi a4,s0,104 <== NOT EXECUTED the_node->next = tail; 400063fc: 00e7a023 sw a4,0(a5) <== NOT EXECUTED fs->release_modified_count++; 40006400: 07042703 lw a4,112(s0) <== NOT EXECUTED tail->previous = the_node; 40006404: 06f42623 sw a5,108(s0) <== NOT EXECUTED old_last->next = the_node; 40006408: 00f6a023 sw a5,0(a3) <== NOT EXECUTED the_node->previous = old_last; 4000640c: 00d7a223 sw a3,4(a5) <== NOT EXECUTED 40006410: 00170713 addi a4,a4,1 <== NOT EXECUTED 40006414: 06e42823 sw a4,112(s0) <== NOT EXECUTED } 40006418: 00c12083 lw ra,12(sp) <== NOT EXECUTED 4000641c: 00812403 lw s0,8(sp) <== NOT EXECUTED handle->buffer = NULL; 40006420: 0004a423 sw zero,8(s1) <== NOT EXECUTED } 40006424: 00412483 lw s1,4(sp) <== NOT EXECUTED 40006428: 01010113 addi sp,sp,16 <== NOT EXECUTED 4000642c: 00008067 ret <== NOT EXECUTED 40006430: 00c12083 lw ra,12(sp) <== NOT EXECUTED 40006434: 00812403 lw s0,8(sp) <== NOT EXECUTED handle->buffer = NULL; 40006438: 0004a423 sw zero,8(s1) <== NOT EXECUTED int rc = 0; 4000643c: 00000513 li a0,0 <== NOT EXECUTED } 40006440: 00412483 lw s1,4(sp) <== NOT EXECUTED 40006444: 01010113 addi sp,sp,16 <== NOT EXECUTED 40006448: 00008067 ret <== NOT EXECUTED printf ("rtems-rfs: buffer-release: block=%" PRIu32 " %s refs=%d %s\n", 4000644c: 0084a783 lw a5,8(s1) <== NOT EXECUTED 40006450: 40021637 lui a2,0x40021 <== NOT EXECUTED 40006454: 5e860613 addi a2,a2,1512 # 400215e8 <== NOT EXECUTED 40006458: 0307a683 lw a3,48(a5) <== NOT EXECUTED 4000645c: f20694e3 bnez a3,40006384 <== NOT EXECUTED 40006460: 40021737 lui a4,0x40021 <== NOT EXECUTED 40006464: 5f070713 addi a4,a4,1520 # 400215f0 <== NOT EXECUTED 40006468: f25ff06f j 4000638c <== NOT EXECUTED old_last = tail->previous; 4000646c: 05c42683 lw a3,92(s0) <== NOT EXECUTED return &the_chain->Tail.Node; 40006470: 05840713 addi a4,s0,88 <== NOT EXECUTED the_node->next = tail; 40006474: 00e7a023 sw a4,0(a5) <== NOT EXECUTED fs->release_count++; 40006478: 06042703 lw a4,96(s0) <== NOT EXECUTED tail->previous = the_node; 4000647c: 04f42e23 sw a5,92(s0) <== NOT EXECUTED old_last->next = the_node; 40006480: 00f6a023 sw a5,0(a3) <== NOT EXECUTED the_node->previous = old_last; 40006484: 00d7a223 sw a3,4(a5) <== NOT EXECUTED 40006488: 00170713 addi a4,a4,1 <== NOT EXECUTED 4000648c: 06e42023 sw a4,96(s0) <== NOT EXECUTED } 40006490: 00c12083 lw ra,12(sp) <== NOT EXECUTED 40006494: 00812403 lw s0,8(sp) <== NOT EXECUTED handle->buffer = NULL; 40006498: 0004a423 sw zero,8(s1) <== NOT EXECUTED } 4000649c: 00412483 lw s1,4(sp) <== NOT EXECUTED 400064a0: 01010113 addi sp,sp,16 <== NOT EXECUTED 400064a4: 00008067 ret <== NOT EXECUTED rc = rtems_rfs_buffer_io_release (handle->buffer, 400064a8: 0004c583 lbu a1,0(s1) <== NOT EXECUTED 400064ac: 00078513 mv a0,a5 <== NOT EXECUTED handle->buffer->user = (void*) 0; 400064b0: 0207aa23 sw zero,52(a5) <== NOT EXECUTED rc = rtems_rfs_buffer_io_release (handle->buffer, 400064b4: 6410d0ef jal ra,400142f4 <== NOT EXECUTED } 400064b8: 00c12083 lw ra,12(sp) <== NOT EXECUTED 400064bc: 00812403 lw s0,8(sp) <== NOT EXECUTED handle->buffer = NULL; 400064c0: 0004a423 sw zero,8(s1) <== NOT EXECUTED } 400064c4: 00412483 lw s1,4(sp) <== NOT EXECUTED 400064c8: 01010113 addi sp,sp,16 <== NOT EXECUTED 400064cc: 00008067 ret <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_RELEASE)) 400064d0: 20000513 li a0,512 <== NOT EXECUTED 400064d4: 00000593 li a1,0 <== NOT EXECUTED 400064d8: 435030ef jal ra,4000a10c <== NOT EXECUTED 400064dc: 08051263 bnez a0,40006560 <== NOT EXECUTED if (fs->release_count > fs->release_modified_count) 400064e0: 06042703 lw a4,96(s0) <== NOT EXECUTED 400064e4: 07042783 lw a5,112(s0) <== NOT EXECUTED 400064e8: 02e7f863 bgeu a5,a4,40006518 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 400064ec: 05442503 lw a0,84(s0) <== NOT EXECUTED return &the_chain->Tail.Node; 400064f0: 05840793 addi a5,s0,88 <== NOT EXECUTED 400064f4: 05440693 addi a3,s0,84 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 400064f8: 04f50c63 beq a0,a5,40006550 <== NOT EXECUTED new_first = old_first->next; 400064fc: 00052783 lw a5,0(a0) <== NOT EXECUTED head->next = new_first; 40006500: 04f42a23 sw a5,84(s0) <== NOT EXECUTED new_first->previous = head; 40006504: 00d7a223 sw a3,4(a5) <== NOT EXECUTED fs->release_count--; 40006508: fff70713 addi a4,a4,-1 <== NOT EXECUTED 4000650c: 06e42023 sw a4,96(s0) <== NOT EXECUTED modified = false; 40006510: 00000593 li a1,0 <== NOT EXECUTED 40006514: 02c0006f j 40006540 <== NOT EXECUTED return _Chain_Immutable_head( the_chain )->next; 40006518: 06442503 lw a0,100(s0) <== NOT EXECUTED return &the_chain->Tail.Node; 4000651c: 06840713 addi a4,s0,104 <== NOT EXECUTED 40006520: 06440693 addi a3,s0,100 <== NOT EXECUTED if ( !_Chain_Is_empty(the_chain)) 40006524: 02e50a63 beq a0,a4,40006558 <== NOT EXECUTED new_first = old_first->next; 40006528: 00052703 lw a4,0(a0) <== NOT EXECUTED head->next = new_first; 4000652c: 06e42223 sw a4,100(s0) <== NOT EXECUTED new_first->previous = head; 40006530: 00d72223 sw a3,4(a4) <== NOT EXECUTED fs->release_modified_count--; 40006534: fff78793 addi a5,a5,-1 <== NOT EXECUTED 40006538: 06f42823 sw a5,112(s0) <== NOT EXECUTED modified = true; 4000653c: 00100593 li a1,1 <== NOT EXECUTED buffer->user = (void*) 0; 40006540: 02052a23 sw zero,52(a0) <== NOT EXECUTED rc = rtems_rfs_buffer_io_release (buffer, modified); 40006544: 5b10d0ef jal ra,400142f4 <== NOT EXECUTED rtems_rfs_buffer_link (handle)); 40006548: 0084a783 lw a5,8(s1) <== NOT EXECUTED 4000654c: ea1ff06f j 400063ec <== NOT EXECUTED return NULL; 40006550: 00000513 li a0,0 <== NOT EXECUTED 40006554: fb5ff06f j 40006508 <== NOT EXECUTED 40006558: 00000513 li a0,0 <== NOT EXECUTED 4000655c: fd9ff06f j 40006534 <== NOT EXECUTED printf ("rtems-rfs: buffer-release: local cache overflow:" 40006560: 06042583 lw a1,96(s0) <== NOT EXECUTED 40006564: 07042783 lw a5,112(s0) <== NOT EXECUTED 40006568: 40021537 lui a0,0x40021 <== NOT EXECUTED 4000656c: 63450513 addi a0,a0,1588 # 40021634 <== NOT EXECUTED 40006570: 00f585b3 add a1,a1,a5 <== NOT EXECUTED 40006574: c84fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40006578: f69ff06f j 400064e0 <== NOT EXECUTED =============================================================================== 4000657c : if (rtems_rfs_buffer_handle_has_block (handle)) 4000657c: 0085a783 lw a5,8(a1) { 40006580: fe010113 addi sp,sp,-32 40006584: 00812c23 sw s0,24(sp) 40006588: 00912a23 sw s1,20(sp) 4000658c: 01212823 sw s2,16(sp) 40006590: 01412423 sw s4,8(sp) 40006594: 00112e23 sw ra,28(sp) 40006598: 01312623 sw s3,12(sp) 4000659c: 00058413 mv s0,a1 400065a0: 00050493 mv s1,a0 400065a4: 00060913 mv s2,a2 400065a8: 00068a13 mv s4,a3 if (rtems_rfs_buffer_handle_has_block (handle)) 400065ac: 04078263 beqz a5,400065f0 if (block && (rtems_rfs_buffer_bnum (handle) == block)) 400065b0: 00060663 beqz a2,400065bc <== NEVER TAKEN 400065b4: 0045a783 lw a5,4(a1) 400065b8: 0cc78a63 beq a5,a2,4000668c if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST)) 400065bc: 10000513 li a0,256 400065c0: 00000593 li a1,0 400065c4: 349030ef jal ra,4000a10c 400065c8: 16051c63 bnez a0,40006740 <== NEVER TAKEN if (rtems_rfs_buffer_handle_has_block (handle)) 400065cc: 00842783 lw a5,8(s0) 400065d0: 00078c63 beqz a5,400065e8 <== NEVER TAKEN 400065d4: 00040593 mv a1,s0 400065d8: 00048513 mv a0,s1 400065dc: d61ff0ef jal ra,4000633c 400065e0: 00050993 mv s3,a0 if (rc > 0) 400065e4: 0aa04663 bgtz a0,40006690 <== NEVER TAKEN handle->dirty = false; 400065e8: 00040023 sb zero,0(s0) handle->bnum = 0; 400065ec: 00042223 sw zero,4(s0) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST)) 400065f0: 10000513 li a0,256 400065f4: 00000593 li a1,0 400065f8: 315030ef jal ra,4000a10c 400065fc: 12051463 bnez a0,40006724 <== NEVER TAKEN if (fs->buffers_count) 40006600: 0504a783 lw a5,80(s1) 40006604: 0c079e63 bnez a5,400066e0 if (!rtems_rfs_fs_no_local_cache (fs) && 40006608: 0004a783 lw a5,0(s1) !rtems_rfs_buffer_handle_has_block (handle)) 4000660c: 00842503 lw a0,8(s0) if (!rtems_rfs_fs_no_local_cache (fs) && 40006610: 0027f793 andi a5,a5,2 40006614: 0a079063 bnez a5,400066b4 40006618: 14050e63 beqz a0,40006774 rtems_rfs_buffer_refs_up (handle); 4000661c: 03052703 lw a4,48(a0) old_last = tail->previous; 40006620: 04c4a683 lw a3,76(s1) return &the_chain->Tail.Node; 40006624: 04848613 addi a2,s1,72 40006628: 00170713 addi a4,a4,1 fs->buffers_count++; 4000662c: 0504a783 lw a5,80(s1) rtems_rfs_buffer_refs_up (handle); 40006630: 02e52823 sw a4,48(a0) the_node->next = tail; 40006634: 00c52023 sw a2,0(a0) tail->previous = the_node; 40006638: 04a4a623 sw a0,76(s1) old_last->next = the_node; 4000663c: 00a6a023 sw a0,0(a3) the_node->previous = old_last; 40006640: 00d52223 sw a3,4(a0) fs->buffers_count++; 40006644: 00178793 addi a5,a5,1 40006648: 04f4a823 sw a5,80(s1) handle->buffer->user = (void*) ((intptr_t) block); 4000664c: 03252a23 sw s2,52(a0) handle->bnum = block; 40006650: 01242223 sw s2,4(s0) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST)) 40006654: 10000513 li a0,256 40006658: 00000593 li a1,0 4000665c: 2b1030ef jal ra,4000a10c 40006660: 02050663 beqz a0,4000668c <== ALWAYS TAKEN printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n", 40006664: 0e0a1c63 bnez s4,4000675c <== NOT EXECUTED 40006668: 40021637 lui a2,0x40021 <== NOT EXECUTED 4000666c: 67460613 addi a2,a2,1652 # 40021674 <== NOT EXECUTED block, read ? "read" : "get", handle->buffer->block, 40006670: 00842783 lw a5,8(s0) <== NOT EXECUTED printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n", 40006674: 40021537 lui a0,0x40021 <== NOT EXECUTED 40006678: 00090593 mv a1,s2 <== NOT EXECUTED 4000667c: 0307a703 lw a4,48(a5) <== NOT EXECUTED 40006680: 0187a683 lw a3,24(a5) <== NOT EXECUTED 40006684: 74050513 addi a0,a0,1856 # 40021740 <== NOT EXECUTED 40006688: b70fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED return 0; 4000668c: 00000993 li s3,0 } 40006690: 01c12083 lw ra,28(sp) 40006694: 01812403 lw s0,24(sp) 40006698: 01412483 lw s1,20(sp) 4000669c: 01012903 lw s2,16(sp) 400066a0: 00812a03 lw s4,8(sp) 400066a4: 00098513 mv a0,s3 400066a8: 00c12983 lw s3,12(sp) 400066ac: 02010113 addi sp,sp,32 400066b0: 00008067 ret if (!rtems_rfs_buffer_handle_has_block (handle)) 400066b4: f60514e3 bnez a0,4000661c <== NEVER TAKEN rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer); 400066b8: 00840693 addi a3,s0,8 400066bc: 000a0613 mv a2,s4 400066c0: 00090593 mv a1,s2 400066c4: 00048513 mv a0,s1 400066c8: 3d50d0ef jal ra,4001429c 400066cc: 00050993 mv s3,a0 if (rc > 0) 400066d0: 0ca04c63 bgtz a0,400067a8 <== NEVER TAKEN rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle)); 400066d4: 00842503 lw a0,8(s0) node->next = NULL; 400066d8: 00052023 sw zero,0(a0) RTEMS_INLINE_ROUTINE void rtems_chain_set_off_chain( rtems_chain_node *node ) { _Chain_Set_off_chain( node ); } 400066dc: f41ff06f j 4000661c handle->buffer = rtems_rfs_scan_chain (&fs->buffers, 400066e0: 00090613 mv a2,s2 400066e4: 05048593 addi a1,s1,80 400066e8: 04448513 addi a0,s1,68 400066ec: a79ff0ef jal ra,40006164 400066f0: 00a42423 sw a0,8(s0) if (rtems_rfs_buffer_handle_has_block (handle) && 400066f4: 06050a63 beqz a0,40006768 rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST)) 400066f8: 10000513 li a0,256 400066fc: 00000593 li a1,0 40006700: 20d030ef jal ra,4000a10c if (rtems_rfs_buffer_handle_has_block (handle) && 40006704: f00502e3 beqz a0,40006608 <== ALWAYS TAKEN rtems_rfs_buffer_refs (handle) + 1); 40006708: 00842783 lw a5,8(s0) <== NOT EXECUTED printf ("rtems-rfs: buffer-request: buffer shared: refs: %d\n", 4000670c: 40021537 lui a0,0x40021 <== NOT EXECUTED 40006710: 6d450513 addi a0,a0,1748 # 400216d4 <== NOT EXECUTED 40006714: 0307a583 lw a1,48(a5) <== NOT EXECUTED 40006718: 00158593 addi a1,a1,1 <== NOT EXECUTED 4000671c: adcfb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40006720: ee9ff06f j 40006608 <== NOT EXECUTED printf ("rtems-rfs: buffer-request: block=%" PRIu32 "\n", block); 40006724: 40021537 lui a0,0x40021 <== NOT EXECUTED 40006728: 00090593 mv a1,s2 <== NOT EXECUTED 4000672c: 6ac50513 addi a0,a0,1708 # 400216ac <== NOT EXECUTED 40006730: ac8fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if (fs->buffers_count) 40006734: 0504a783 lw a5,80(s1) <== NOT EXECUTED 40006738: ec0788e3 beqz a5,40006608 <== NOT EXECUTED 4000673c: fa5ff06f j 400066e0 <== NOT EXECUTED printf ("rtems-rfs: buffer-request: handle has buffer: %" PRIu32 "\n", 40006740: 00442583 lw a1,4(s0) <== NOT EXECUTED 40006744: 40021537 lui a0,0x40021 <== NOT EXECUTED 40006748: 67850513 addi a0,a0,1656 # 40021678 <== NOT EXECUTED 4000674c: aacfb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if (rtems_rfs_buffer_handle_has_block (handle)) 40006750: 00842783 lw a5,8(s0) <== NOT EXECUTED 40006754: e80790e3 bnez a5,400065d4 <== NOT EXECUTED 40006758: e91ff06f j 400065e8 <== NOT EXECUTED printf ("rtems-rfs: buffer-request: block=%" PRIu32 " bdbuf-%s=%" PRIu32 " refs=%d\n", 4000675c: 40021637 lui a2,0x40021 <== NOT EXECUTED 40006760: 66c60613 addi a2,a2,1644 # 4002166c <== NOT EXECUTED 40006764: f0dff06f j 40006670 <== NOT EXECUTED if (!rtems_rfs_fs_no_local_cache (fs) && 40006768: 0004a783 lw a5,0(s1) 4000676c: 0027f793 andi a5,a5,2 40006770: f40794e3 bnez a5,400066b8 if (fs->release_count) 40006774: 0604a783 lw a5,96(s1) 40006778: 06079a63 bnez a5,400067ec if (!rtems_rfs_buffer_handle_has_block (handle) && 4000677c: 0704a783 lw a5,112(s1) 40006780: f2078ce3 beqz a5,400066b8 handle->buffer = rtems_rfs_scan_chain (&fs->release_modified, 40006784: 00090613 mv a2,s2 40006788: 07048593 addi a1,s1,112 4000678c: 06448513 addi a0,s1,100 40006790: 9d5ff0ef jal ra,40006164 40006794: 00a42423 sw a0,8(s0) if (rtems_rfs_buffer_handle_has_block (handle)) 40006798: f20500e3 beqz a0,400066b8 rtems_rfs_buffer_mark_dirty (handle); 4000679c: 00100793 li a5,1 400067a0: 00f40023 sb a5,0(s0) 400067a4: e79ff06f j 4000661c if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_HANDLE_REQUEST)) 400067a8: 10000513 li a0,256 <== NOT EXECUTED 400067ac: 00000593 li a1,0 <== NOT EXECUTED 400067b0: 15d030ef jal ra,4000a10c <== NOT EXECUTED 400067b4: ec050ee3 beqz a0,40006690 <== NOT EXECUTED printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n", 400067b8: 040a1863 bnez s4,40006808 <== NOT EXECUTED 400067bc: 40021437 lui s0,0x40021 <== NOT EXECUTED 400067c0: 67440413 addi s0,s0,1652 # 40021674 <== NOT EXECUTED 400067c4: 00098513 mv a0,s3 <== NOT EXECUTED 400067c8: 79c180ef jal ra,4001ef64 <== NOT EXECUTED 400067cc: 00050713 mv a4,a0 <== NOT EXECUTED 400067d0: 40021537 lui a0,0x40021 <== NOT EXECUTED 400067d4: 00098693 mv a3,s3 <== NOT EXECUTED 400067d8: 00040613 mv a2,s0 <== NOT EXECUTED 400067dc: 00090593 mv a1,s2 <== NOT EXECUTED 400067e0: 70850513 addi a0,a0,1800 # 40021708 <== NOT EXECUTED 400067e4: a14fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 400067e8: ea9ff06f j 40006690 <== NOT EXECUTED handle->buffer = rtems_rfs_scan_chain (&fs->release, 400067ec: 00090613 mv a2,s2 400067f0: 06048593 addi a1,s1,96 400067f4: 05448513 addi a0,s1,84 400067f8: 96dff0ef jal ra,40006164 400067fc: 00a42423 sw a0,8(s0) if (!rtems_rfs_buffer_handle_has_block (handle) && 40006800: e0051ee3 bnez a0,4000661c 40006804: f79ff06f j 4000677c printf ("rtems-rfs: buffer-request: block=%" PRIu32 ": bdbuf-%s: %d: %s\n", 40006808: 40021437 lui s0,0x40021 <== NOT EXECUTED 4000680c: 66c40413 addi s0,s0,1644 # 4002166c <== NOT EXECUTED 40006810: fb5ff06f j 400067c4 <== NOT EXECUTED =============================================================================== 40006828 : { 40006828: f8010113 addi sp,sp,-128 4000682c: 06812c23 sw s0,120(sp) 40006830: 06912a23 sw s1,116(sp) 40006834: 00058413 mv s0,a1 40006838: 00050493 mv s1,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 4000683c: 00000593 li a1,0 40006840: 02000513 li a0,32 { 40006844: 06112e23 sw ra,124(sp) 40006848: 07212823 sw s2,112(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 4000684c: 0c1030ef jal ra,4000a10c 40006850: 0a051863 bnez a0,40006900 <== NEVER TAKEN fs->device = open (name, O_RDWR); 40006854: 00200593 li a1,2 40006858: 00048513 mv a0,s1 4000685c: 3d50b0ef jal ra,40012430 40006860: 00a42623 sw a0,12(s0) if (fs->device < 0) 40006864: 0c054063 bltz a0,40006924 <== NEVER TAKEN if (fstat (fs->device, &st) < 0) 40006868: 00810593 addi a1,sp,8 4000686c: 71c0b0ef jal ra,40011f88 40006870: 14054463 bltz a0,400069b8 <== NEVER TAKEN if (!S_ISBLK (st.st_mode)) 40006874: 01812683 lw a3,24(sp) 40006878: 0000f7b7 lui a5,0xf 4000687c: 00006737 lui a4,0x6 40006880: 00d7f7b3 and a5,a5,a3 40006884: 04e79663 bne a5,a4,400068d0 static inline int rtems_disk_fd_get_disk_device( int fd, rtems_disk_device **dd_ptr ) { return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr); 40006888: 00c42503 lw a0,12(s0) 4000688c: 400445b7 lui a1,0x40044 40006890: 01040613 addi a2,s0,16 40006894: 20958593 addi a1,a1,521 # 40044209 40006898: 0390b0ef jal ra,400120d0 4000689c: 00050913 mv s2,a0 if (rv != 0) 400068a0: 0e051a63 bnez a0,40006994 <== NEVER TAKEN if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 400068a4: 02000513 li a0,32 400068a8: 00000593 li a1,0 400068ac: 061030ef jal ra,4000a10c 400068b0: 0a051863 bnez a0,40006960 <== NEVER TAKEN } 400068b4: 07c12083 lw ra,124(sp) 400068b8: 07812403 lw s0,120(sp) 400068bc: 07412483 lw s1,116(sp) 400068c0: 00090513 mv a0,s2 400068c4: 07012903 lw s2,112(sp) 400068c8: 08010113 addi sp,sp,128 400068cc: 00008067 ret if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN)) 400068d0: 00800513 li a0,8 <== NOT EXECUTED 400068d4: 00000593 li a1,0 <== NOT EXECUTED 400068d8: 035030ef jal ra,4000a10c <== NOT EXECUTED 400068dc: 06051663 bnez a0,40006948 <== NOT EXECUTED return ENXIO; 400068e0: 00600913 li s2,6 <== NOT EXECUTED } 400068e4: 07c12083 lw ra,124(sp) <== NOT EXECUTED 400068e8: 07812403 lw s0,120(sp) <== NOT EXECUTED 400068ec: 07412483 lw s1,116(sp) <== NOT EXECUTED 400068f0: 00090513 mv a0,s2 <== NOT EXECUTED 400068f4: 07012903 lw s2,112(sp) <== NOT EXECUTED 400068f8: 08010113 addi sp,sp,128 <== NOT EXECUTED 400068fc: 00008067 ret <== NOT EXECUTED printf ("rtems-rfs: buffer-open: opening: %s\n", name); 40006900: 40021537 lui a0,0x40021 <== NOT EXECUTED 40006904: 00048593 mv a1,s1 <== NOT EXECUTED 40006908: 77c50513 addi a0,a0,1916 # 4002177c <== NOT EXECUTED 4000690c: 8ecfb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED fs->device = open (name, O_RDWR); 40006910: 00200593 li a1,2 <== NOT EXECUTED 40006914: 00048513 mv a0,s1 <== NOT EXECUTED 40006918: 3190b0ef jal ra,40012430 <== NOT EXECUTED 4000691c: 00a42623 sw a0,12(s0) <== NOT EXECUTED if (fs->device < 0) 40006920: f40554e3 bgez a0,40006868 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN)) 40006924: 00800513 li a0,8 <== NOT EXECUTED 40006928: 00000593 li a1,0 <== NOT EXECUTED 4000692c: 7e0030ef jal ra,4000a10c <== NOT EXECUTED 40006930: fa0508e3 beqz a0,400068e0 <== NOT EXECUTED printf ("rtems-rfs: buffer-open: cannot open file\n"); 40006934: 40021537 lui a0,0x40021 <== NOT EXECUTED 40006938: 7a450513 addi a0,a0,1956 # 400217a4 <== NOT EXECUTED 4000693c: 904fb0ef jal ra,40001a40 <__wrap_puts> <== NOT EXECUTED return ENXIO; 40006940: 00600913 li s2,6 <== NOT EXECUTED 40006944: fa1ff06f j 400068e4 <== NOT EXECUTED printf ("rtems-rfs: buffer-open: '%s' is not a block device\n", name); 40006948: 40022537 lui a0,0x40022 <== NOT EXECUTED 4000694c: 00048593 mv a1,s1 <== NOT EXECUTED 40006950: 80050513 addi a0,a0,-2048 # 40021800 <== NOT EXECUTED 40006954: 8a4fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED return ENXIO; 40006958: 00600913 li s2,6 <== NOT EXECUTED 4000695c: f59ff06f j 400068b4 <== NOT EXECUTED rtems_rfs_fs_media_blocks (fs), 40006960: 01042783 lw a5,16(s0) <== NOT EXECUTED printf ("rtems-rfs: buffer-open: blks=%" PRId32 ", blk-size=%" PRId32 "\n", 40006964: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006968: 86450513 addi a0,a0,-1948 # 40021864 <== NOT EXECUTED 4000696c: 0207a603 lw a2,32(a5) # f020 <== NOT EXECUTED 40006970: 01c7a583 lw a1,28(a5) <== NOT EXECUTED 40006974: 884fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED } 40006978: 07c12083 lw ra,124(sp) <== NOT EXECUTED 4000697c: 07812403 lw s0,120(sp) <== NOT EXECUTED 40006980: 07412483 lw s1,116(sp) <== NOT EXECUTED 40006984: 00090513 mv a0,s2 <== NOT EXECUTED 40006988: 07012903 lw s2,112(sp) <== NOT EXECUTED 4000698c: 08010113 addi sp,sp,128 <== NOT EXECUTED 40006990: 00008067 ret <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN)) 40006994: 00800513 li a0,8 <== NOT EXECUTED 40006998: 00000593 li a1,0 <== NOT EXECUTED 4000699c: 770030ef jal ra,4000a10c <== NOT EXECUTED 400069a0: f40500e3 beqz a0,400068e0 <== NOT EXECUTED printf ("rtems-rfs: buffer-open: cannot obtain the disk\n"); 400069a4: 40022537 lui a0,0x40022 <== NOT EXECUTED 400069a8: 83450513 addi a0,a0,-1996 # 40021834 <== NOT EXECUTED 400069ac: 894fb0ef jal ra,40001a40 <__wrap_puts> <== NOT EXECUTED return ENXIO; 400069b0: 00600913 li s2,6 <== NOT EXECUTED 400069b4: f01ff06f j 400068b4 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_OPEN)) 400069b8: 00800513 li a0,8 <== NOT EXECUTED 400069bc: 00000593 li a1,0 <== NOT EXECUTED 400069c0: 74c030ef jal ra,4000a10c <== NOT EXECUTED 400069c4: f0050ee3 beqz a0,400068e0 <== NOT EXECUTED name, strerror (errno)); 400069c8: 2c0170ef jal ra,4001dc88 <__errno> <== NOT EXECUTED printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n", 400069cc: 00052503 lw a0,0(a0) <== NOT EXECUTED return ENXIO; 400069d0: 00600913 li s2,6 <== NOT EXECUTED printf ("rtems-rfs: buffer-open: stat '%s' failed: %s\n", 400069d4: 590180ef jal ra,4001ef64 <== NOT EXECUTED 400069d8: 00050613 mv a2,a0 <== NOT EXECUTED 400069dc: 40021537 lui a0,0x40021 <== NOT EXECUTED 400069e0: 00048593 mv a1,s1 <== NOT EXECUTED 400069e4: 7d050513 addi a0,a0,2000 # 400217d0 <== NOT EXECUTED 400069e8: 810fb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 400069ec: ec9ff06f j 400068b4 <== NOT EXECUTED =============================================================================== 40006b38 : { 40006b38: fe010113 addi sp,sp,-32 40006b3c: 00812c23 sw s0,24(sp) 40006b40: 00b12623 sw a1,12(sp) 40006b44: 00050413 mv s0,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE)) 40006b48: 00000593 li a1,0 40006b4c: 40000513 li a0,1024 { 40006b50: 00112e23 sw ra,28(sp) 40006b54: 00912a23 sw s1,20(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE)) 40006b58: 5b4030ef jal ra,4000a10c 40006b5c: 0e051a63 bnez a0,40006c50 <== NEVER TAKEN rc = rtems_rfs_buffers_release (fs); 40006b60: 00040513 mv a0,s0 40006b64: f41ff0ef jal ra,40006aa4 40006b68: 00050493 mv s1,a0 if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE)) 40006b6c: 04a04263 bgtz a0,40006bb0 <== NEVER TAKEN rc = rtems_rfs_buffer_sync (fs); 40006b70: 00040513 mv a0,s0 40006b74: e7dff0ef jal ra,400069f0 40006b78: 00050493 mv s1,a0 if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE)) 40006b7c: 06a04863 bgtz a0,40006bec <== NEVER TAKEN rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size); 40006b80: 01042503 lw a0,16(s0) 40006b84: 800445b7 lui a1,0x80044 40006b88: 00c10613 addi a2,sp,12 40006b8c: 03852783 lw a5,56(a0) 40006b90: 20458593 addi a1,a1,516 # 80044204 40006b94: 000780e7 jalr a5 if (rc < 0) 40006b98: 08054e63 bltz a0,40006c34 <== NEVER TAKEN } 40006b9c: 01c12083 lw ra,28(sp) 40006ba0: 01812403 lw s0,24(sp) 40006ba4: 01412483 lw s1,20(sp) 40006ba8: 02010113 addi sp,sp,32 40006bac: 00008067 ret if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE)) 40006bb0: 40000513 li a0,1024 <== NOT EXECUTED 40006bb4: 00000593 li a1,0 <== NOT EXECUTED 40006bb8: 554030ef jal ra,4000a10c <== NOT EXECUTED 40006bbc: fa050ae3 beqz a0,40006b70 <== NOT EXECUTED printf ("rtems-rfs: buffer-setblksize: buffer release failed: %d: %s\n", 40006bc0: 00048513 mv a0,s1 <== NOT EXECUTED 40006bc4: 3a0180ef jal ra,4001ef64 <== NOT EXECUTED 40006bc8: 00050613 mv a2,a0 <== NOT EXECUTED 40006bcc: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006bd0: 00048593 mv a1,s1 <== NOT EXECUTED 40006bd4: 95c50513 addi a0,a0,-1700 # 4002195c <== NOT EXECUTED 40006bd8: e21fa0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED rc = rtems_rfs_buffer_sync (fs); 40006bdc: 00040513 mv a0,s0 <== NOT EXECUTED 40006be0: e11ff0ef jal ra,400069f0 <== NOT EXECUTED 40006be4: 00050493 mv s1,a0 <== NOT EXECUTED if ((rc > 0) && rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SETBLKSIZE)) 40006be8: f8a05ce3 blez a0,40006b80 <== NOT EXECUTED 40006bec: 40000513 li a0,1024 <== NOT EXECUTED 40006bf0: 00000593 li a1,0 <== NOT EXECUTED 40006bf4: 518030ef jal ra,4000a10c <== NOT EXECUTED 40006bf8: f80504e3 beqz a0,40006b80 <== NOT EXECUTED printf ("rtems-rfs: buffer-setblksize: device sync failed: %d: %s\n", 40006bfc: 00048513 mv a0,s1 <== NOT EXECUTED 40006c00: 364180ef jal ra,4001ef64 <== NOT EXECUTED 40006c04: 00050613 mv a2,a0 <== NOT EXECUTED 40006c08: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006c0c: 00048593 mv a1,s1 <== NOT EXECUTED 40006c10: 99c50513 addi a0,a0,-1636 # 4002199c <== NOT EXECUTED 40006c14: de5fa0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED rc = fs->disk->ioctl (fs->disk, RTEMS_BLKIO_SETBLKSIZE, &size); 40006c18: 01042503 lw a0,16(s0) <== NOT EXECUTED 40006c1c: 800445b7 lui a1,0x80044 <== NOT EXECUTED 40006c20: 00c10613 addi a2,sp,12 <== NOT EXECUTED 40006c24: 03852783 lw a5,56(a0) <== NOT EXECUTED 40006c28: 20458593 addi a1,a1,516 # 80044204 <== NOT EXECUTED 40006c2c: 000780e7 jalr a5 <== NOT EXECUTED if (rc < 0) 40006c30: f60556e3 bgez a0,40006b9c <== NOT EXECUTED rc = errno; 40006c34: 054170ef jal ra,4001dc88 <__errno> <== NOT EXECUTED } 40006c38: 01c12083 lw ra,28(sp) <== NOT EXECUTED 40006c3c: 01812403 lw s0,24(sp) <== NOT EXECUTED rc = errno; 40006c40: 00052503 lw a0,0(a0) <== NOT EXECUTED } 40006c44: 01412483 lw s1,20(sp) <== NOT EXECUTED 40006c48: 02010113 addi sp,sp,32 <== NOT EXECUTED 40006c4c: 00008067 ret <== NOT EXECUTED printf ("rtems-rfs: buffer-setblksize: block size: %" PRIu32 "\n", size); 40006c50: 00c12583 lw a1,12(sp) <== NOT EXECUTED 40006c54: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006c58: 92c50513 addi a0,a0,-1748 # 4002192c <== NOT EXECUTED 40006c5c: d9dfa0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40006c60: f01ff06f j 40006b60 <== NOT EXECUTED =============================================================================== 400069f0 : { 400069f0: ff010113 addi sp,sp,-16 400069f4: 00812423 sw s0,8(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 400069f8: 00000593 li a1,0 { 400069fc: 00050413 mv s0,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 40006a00: 02000513 li a0,32 { 40006a04: 00112623 sw ra,12(sp) 40006a08: 00912223 sw s1,4(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 40006a0c: 700030ef jal ra,4000a10c 40006a10: 02051863 bnez a0,40006a40 <== NEVER TAKEN sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs)); 40006a14: 01042503 lw a0,16(s0) int result = 0; 40006a18: 00000493 li s1,0 sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs)); 40006a1c: 7f80a0ef jal ra,40011214 40006a20: 00050413 mv s0,a0 if (sc != RTEMS_SUCCESSFUL) 40006a24: 02051e63 bnez a0,40006a60 <== NEVER TAKEN } 40006a28: 00c12083 lw ra,12(sp) 40006a2c: 00812403 lw s0,8(sp) 40006a30: 00048513 mv a0,s1 40006a34: 00412483 lw s1,4(sp) 40006a38: 01010113 addi sp,sp,16 40006a3c: 00008067 ret printf ("rtems-rfs: buffer-sync: syncing\n"); 40006a40: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006a44: 89450513 addi a0,a0,-1900 # 40021894 <== NOT EXECUTED 40006a48: ff9fa0ef jal ra,40001a40 <__wrap_puts> <== NOT EXECUTED sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs)); 40006a4c: 01042503 lw a0,16(s0) <== NOT EXECUTED int result = 0; 40006a50: 00000493 li s1,0 <== NOT EXECUTED sc = rtems_bdbuf_syncdev (rtems_rfs_fs_device (fs)); 40006a54: 7c00a0ef jal ra,40011214 <== NOT EXECUTED 40006a58: 00050413 mv s0,a0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40006a5c: fc0506e3 beqz a0,40006a28 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 40006a60: 02000513 li a0,32 <== NOT EXECUTED 40006a64: 00000593 li a1,0 <== NOT EXECUTED 40006a68: 6a4030ef jal ra,4000a10c <== NOT EXECUTED result = EIO; 40006a6c: 00500493 li s1,5 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_SYNC)) 40006a70: fa050ce3 beqz a0,40006a28 <== NOT EXECUTED printf ("rtems-rfs: buffer-sync: device sync failed: %s\n", 40006a74: 00040513 mv a0,s0 <== NOT EXECUTED 40006a78: 6b4030ef jal ra,4000a12c <== NOT EXECUTED 40006a7c: 00050593 mv a1,a0 <== NOT EXECUTED 40006a80: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006a84: 8b450513 addi a0,a0,-1868 # 400218b4 <== NOT EXECUTED 40006a88: f71fa0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED } 40006a8c: 00c12083 lw ra,12(sp) <== NOT EXECUTED 40006a90: 00812403 lw s0,8(sp) <== NOT EXECUTED 40006a94: 00048513 mv a0,s1 <== NOT EXECUTED 40006a98: 00412483 lw s1,4(sp) <== NOT EXECUTED 40006a9c: 01010113 addi sp,sp,16 <== NOT EXECUTED 40006aa0: 00008067 ret <== NOT EXECUTED =============================================================================== 40006aa4 : int rtems_rfs_buffers_release (rtems_rfs_file_system* fs) { 40006aa4: ff010113 addi sp,sp,-16 40006aa8: 00812423 sw s0,8(sp) int rrc = 0; int rc; if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE)) 40006aac: 00000593 li a1,0 { 40006ab0: 00050413 mv s0,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE)) 40006ab4: 04000513 li a0,64 { 40006ab8: 00112623 sw ra,12(sp) 40006abc: 00912223 sw s1,4(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_RELEASE)) 40006ac0: 64c030ef jal ra,4000a10c 40006ac4: 04051c63 bnez a0,40006b1c <== NEVER TAKEN printf ("rtems-rfs: buffers-release: active:%" PRIu32 " " "release:%" PRIu32 " release-modified:%" PRIu32 "\n", fs->buffers_count, fs->release_count, fs->release_modified_count); rc = rtems_rfs_release_chain (&fs->release, 40006ac8: 06040593 addi a1,s0,96 40006acc: 00000613 li a2,0 40006ad0: 05440513 addi a0,s0,84 40006ad4: fb0ff0ef jal ra,40006284 40006ad8: fff54793 not a5,a0 40006adc: 00050493 mv s1,a0 &fs->release_count, false); if ((rc > 0) && (rrc == 0)) 40006ae0: 41f7d793 srai a5,a5,0x1f rrc = rc; rc = rtems_rfs_release_chain (&fs->release_modified, 40006ae4: 07040593 addi a1,s0,112 40006ae8: 06440513 addi a0,s0,100 40006aec: 00100613 li a2,1 40006af0: 00f4f433 and s0,s1,a5 40006af4: f90ff0ef jal ra,40006284 &fs->release_modified_count, true); if ((rc > 0) && (rrc == 0)) 40006af8: 00a05663 blez a0,40006b04 <== ALWAYS TAKEN 40006afc: 00904463 bgtz s1,40006b04 <== NOT EXECUTED 40006b00: 00050413 mv s0,a0 <== NOT EXECUTED rrc = rc; return rrc; } 40006b04: 00c12083 lw ra,12(sp) 40006b08: 00040513 mv a0,s0 40006b0c: 00812403 lw s0,8(sp) 40006b10: 00412483 lw s1,4(sp) 40006b14: 01010113 addi sp,sp,16 40006b18: 00008067 ret printf ("rtems-rfs: buffers-release: active:%" PRIu32 " " 40006b1c: 07042683 lw a3,112(s0) <== NOT EXECUTED 40006b20: 06042603 lw a2,96(s0) <== NOT EXECUTED 40006b24: 05042583 lw a1,80(s0) <== NOT EXECUTED 40006b28: 40022537 lui a0,0x40022 <== NOT EXECUTED 40006b2c: 8e450513 addi a0,a0,-1820 # 400218e4 <== NOT EXECUTED 40006b30: ec9fa0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40006b34: f95ff06f j 40006ac8 <== NOT EXECUTED =============================================================================== 40014874 : rtems_rfs_dir_add_entry (rtems_rfs_file_system* fs, rtems_rfs_inode_handle* dir, const char* name, size_t length, rtems_rfs_ino ino) { 40014874: f4010113 addi sp,sp,-192 40014878: 0b312623 sw s3,172(sp) 4001487c: 09912a23 sw s9,148(sp) 40014880: 00058993 mv s3,a1 40014884: 00050c93 mv s9,a0 rtems_rfs_block_map map; rtems_rfs_block_pos bpos; rtems_rfs_buffer_handle buffer; int rc; if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY)) 40014888: 00000593 li a1,0 4001488c: 20000537 lui a0,0x20000 { 40014890: 0b212823 sw s2,176(sp) 40014894: 0b412423 sw s4,168(sp) 40014898: 0b512223 sw s5,164(sp) 4001489c: 0a112e23 sw ra,188(sp) 400148a0: 0a812c23 sw s0,184(sp) 400148a4: 0a912a23 sw s1,180(sp) 400148a8: 0b612023 sw s6,160(sp) 400148ac: 09712e23 sw s7,156(sp) 400148b0: 09812c23 sw s8,152(sp) 400148b4: 09a12823 sw s10,144(sp) 400148b8: 09b12623 sw s11,140(sp) 400148bc: 00060a13 mv s4,a2 400148c0: 00068913 mv s2,a3 400148c4: 00070a93 mv s5,a4 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY)) 400148c8: 845f50ef jal ra,4000a10c 400148cc: 2a051c63 bnez a0,40014b84 <== NEVER TAKEN for (c = 0; c < length; c++) printf ("%c", name[c]); printf (", len=%zd\n", length); } rc = rtems_rfs_block_map_open (fs, dir, &map); 400148d0: 03010613 addi a2,sp,48 400148d4: 00098593 mv a1,s3 400148d8: 000c8513 mv a0,s9 400148dc: c9dfe0ef jal ra,40013578 400148e0: 00050413 mv s0,a0 if (rc > 0) 400148e4: 0ca04663 bgtz a0,400149b0 <== NEVER TAKEN int elength; elength = rtems_rfs_dir_entry_length (entry); eino = rtems_rfs_dir_entry_ino (entry); if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 400148e8: 00010d37 lui s10,0x10 { if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) < 400148ec: 00a90793 addi a5,s2,10 handle->dirty = false; 400148f0: 02010223 sb zero,36(sp) handle->bnum = 0; 400148f4: 02012423 sw zero,40(sp) handle->buffer = NULL; 400148f8: 02012623 sw zero,44(sp) bpos->bno = 0; 400148fc: 00012c23 sw zero,24(sp) bpos->boff = 0; 40014900: 00012e23 sw zero,28(sp) bpos->block = 0; 40014904: 02012023 sw zero,32(sp) if (rc != ENXIO) 40014908: 00600b13 li s6,6 if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 4001490c: fffd0d13 addi s10,s10,-1 # ffff } break; } if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40014910: 00a00d93 li s11,10 if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) < 40014914: 00f12623 sw a5,12(sp) rc = rtems_rfs_block_map_find (fs, &map, &bpos, &block); 40014918: 01410693 addi a3,sp,20 4001491c: 01810613 addi a2,sp,24 40014920: 03010593 addi a1,sp,48 40014924: 000c8513 mv a0,s9 40014928: 818ff0ef jal ra,40013940 4001492c: 00050413 mv s0,a0 if (rc > 0) 40014930: 28a05a63 blez a0,40014bc4 if (rc != ENXIO) 40014934: 31651e63 bne a0,s6,40014c50 rc = rtems_rfs_block_map_grow (fs, &map, 1, &block); 40014938: 01410693 addi a3,sp,20 4001493c: 00100613 li a2,1 40014940: 03010593 addi a1,sp,48 40014944: 000c8513 mv a0,s9 40014948: a40ff0ef jal ra,40013b88 4001494c: 00050413 mv s0,a0 if (rc > 0) 40014950: 2ca04463 bgtz a0,40014c18 <== NEVER TAKEN bpos.bno++; 40014954: 01812783 lw a5,24(sp) rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read); 40014958: 01412603 lw a2,20(sp) 4001495c: 00000693 li a3,0 bpos.bno++; 40014960: 00178793 addi a5,a5,1 rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read); 40014964: 02410593 addi a1,sp,36 40014968: 000c8513 mv a0,s9 bpos.bno++; 4001496c: 00f12c23 sw a5,24(sp) rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read); 40014970: c0df10ef jal ra,4000657c 40014974: 00050413 mv s0,a0 if (rc > 0) 40014978: 06a05c63 blez a0,400149f0 <== ALWAYS TAKEN if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY)) 4001497c: 20000537 lui a0,0x20000 <== NOT EXECUTED 40014980: 00000593 li a1,0 <== NOT EXECUTED 40014984: f88f50ef jal ra,4000a10c <== NOT EXECUTED 40014988: 30051063 bnez a0,40014c88 <== NOT EXECUTED rtems_rfs_buffer_handle_release (fs, handle); 4001498c: 02410593 addi a1,sp,36 <== NOT EXECUTED 40014990: 000c8513 mv a0,s9 <== NOT EXECUTED 40014994: e81f10ef jal ra,40006814 <== NOT EXECUTED offset += elength; } } rtems_rfs_buffer_handle_close (fs, &buffer); rtems_rfs_block_map_close (fs, &map); 40014998: 03010593 addi a1,sp,48 <== NOT EXECUTED 4001499c: 000c8513 mv a0,s9 <== NOT EXECUTED handle->dirty = false; 400149a0: 02010223 sb zero,36(sp) <== NOT EXECUTED handle->bnum = 0; 400149a4: 02012423 sw zero,40(sp) <== NOT EXECUTED handle->buffer = NULL; 400149a8: 02012623 sw zero,44(sp) <== NOT EXECUTED 400149ac: da1fe0ef jal ra,4001374c <== NOT EXECUTED return rc; } 400149b0: 0bc12083 lw ra,188(sp) 400149b4: 00040513 mv a0,s0 400149b8: 0b812403 lw s0,184(sp) 400149bc: 0b412483 lw s1,180(sp) 400149c0: 0b012903 lw s2,176(sp) 400149c4: 0ac12983 lw s3,172(sp) 400149c8: 0a812a03 lw s4,168(sp) 400149cc: 0a412a83 lw s5,164(sp) 400149d0: 0a012b03 lw s6,160(sp) 400149d4: 09c12b83 lw s7,156(sp) 400149d8: 09812c03 lw s8,152(sp) 400149dc: 09412c83 lw s9,148(sp) 400149e0: 09012d03 lw s10,144(sp) 400149e4: 08c12d83 lw s11,140(sp) 400149e8: 0c010113 addi sp,sp,192 400149ec: 00008067 ret entry = rtems_rfs_buffer_data (&buffer); 400149f0: 02c12783 lw a5,44(sp) memset (entry, 0xff, rtems_rfs_fs_block_size (fs)); 400149f4: 008ca603 lw a2,8(s9) 400149f8: 0ff00593 li a1,255 entry = rtems_rfs_buffer_data (&buffer); 400149fc: 01c7ac03 lw s8,28(a5) memset (entry, 0xff, rtems_rfs_fs_block_size (fs)); 40014a00: 000c0513 mv a0,s8 40014a04: 135090ef jal ra,4001e338 while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014a08: 008ca503 lw a0,8(s9) 40014a0c: ff650793 addi a5,a0,-10 # 1ffffff6 40014a10: f00784e3 beqz a5,40014918 <== NEVER TAKEN offset = 0; 40014a14: 00000b93 li s7,0 while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014a18: 00000593 li a1,0 40014a1c: 02c0006f j 40014a48 if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40014a20: 129dd463 bge s11,s1,40014b48 40014a24: 01cca683 lw a3,28(s9) entry += elength; 40014a28: 009c0c33 add s8,s8,s1 if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40014a2c: 10d4fe63 bgeu s1,a3,40014b48 40014a30: 10040c63 beqz s0,40014b48 <== NEVER TAKEN 40014a34: 014ca683 lw a3,20(s9) 40014a38: 1086e863 bltu a3,s0,40014b48 offset += elength; 40014a3c: 009b8bb3 add s7,s7,s1 while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014a40: 000b8593 mv a1,s7 40014a44: ecfbfae3 bgeu s7,a5,40014918 entry += elength; 40014a48: 009c4603 lbu a2,9(s8) 40014a4c: 008c4483 lbu s1,8(s8) eino = rtems_rfs_dir_entry_ino (entry); 40014a50: 000c4403 lbu s0,0(s8) 40014a54: 001c4803 lbu a6,1(s8) 40014a58: 00861613 slli a2,a2,0x8 40014a5c: 00966633 or a2,a2,s1 40014a60: 00861493 slli s1,a2,0x8 40014a64: 003c4883 lbu a7,3(s8) 40014a68: 002c4683 lbu a3,2(s8) 40014a6c: 00865613 srli a2,a2,0x8 40014a70: 01841413 slli s0,s0,0x18 40014a74: 01081813 slli a6,a6,0x10 40014a78: 00c4e633 or a2,s1,a2 40014a7c: 01046433 or s0,s0,a6 40014a80: 01061493 slli s1,a2,0x10 40014a84: 01146433 or s0,s0,a7 40014a88: 00869693 slli a3,a3,0x8 40014a8c: 0104d493 srli s1,s1,0x10 40014a90: 00d46433 or s0,s0,a3 if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 40014a94: f9a496e3 bne s1,s10,40014a20 if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) < 40014a98: 00c12783 lw a5,12(sp) (rtems_rfs_fs_block_size (fs) - offset)) 40014a9c: 40b505b3 sub a1,a0,a1 if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) < 40014aa0: e6b7fce3 bgeu a5,a1,40014918 hash = rtems_rfs_dir_hash (name, length); 40014aa4: 00090593 mv a1,s2 40014aa8: 000a0513 mv a0,s4 40014aac: 469000ef jal ra,40015714 rtems_rfs_dir_set_entry_length (entry, 40014ab0: 00c12e83 lw t4,12(sp) rtems_rfs_dir_set_entry_hash (entry, hash); 40014ab4: 01855e13 srli t3,a0,0x18 40014ab8: 01055313 srli t1,a0,0x10 rtems_rfs_dir_set_entry_length (entry, 40014abc: 010e9713 slli a4,t4,0x10 40014ac0: 01075713 srli a4,a4,0x10 rtems_rfs_dir_set_entry_hash (entry, hash); 40014ac4: 00855893 srli a7,a0,0x8 hash = rtems_rfs_dir_hash (name, length); 40014ac8: 00050793 mv a5,a0 rtems_rfs_dir_set_entry_length (entry, 40014acc: 00875713 srli a4,a4,0x8 rtems_rfs_dir_set_entry_ino (entry, ino); 40014ad0: 018ad813 srli a6,s5,0x18 40014ad4: 008ad693 srli a3,s5,0x8 40014ad8: 010ad513 srli a0,s5,0x10 memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length); 40014adc: 00090613 mv a2,s2 40014ae0: 000a0593 mv a1,s4 rtems_rfs_dir_set_entry_hash (entry, hash); 40014ae4: 01cc0223 sb t3,4(s8) 40014ae8: 006c02a3 sb t1,5(s8) 40014aec: 011c0323 sb a7,6(s8) 40014af0: 00fc03a3 sb a5,7(s8) rtems_rfs_dir_set_entry_ino (entry, ino); 40014af4: 010c0023 sb a6,0(s8) 40014af8: 00ac00a3 sb a0,1(s8) 40014afc: 00dc0123 sb a3,2(s8) rtems_rfs_dir_set_entry_length (entry, 40014b00: 00ec0423 sb a4,8(s8) 40014b04: 01dc04a3 sb t4,9(s8) rtems_rfs_dir_set_entry_ino (entry, ino); 40014b08: 015c01a3 sb s5,3(s8) memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length); 40014b0c: 00ac0513 addi a0,s8,10 40014b10: 5e0090ef jal ra,4001e0f0 rtems_rfs_buffer_handle_release (fs, handle); 40014b14: 02410593 addi a1,sp,36 rtems_rfs_buffer_mark_dirty (&buffer); 40014b18: 00100793 li a5,1 40014b1c: 000c8513 mv a0,s9 40014b20: 02f10223 sb a5,36(sp) 40014b24: cf1f10ef jal ra,40006814 rtems_rfs_block_map_close (fs, &map); 40014b28: 03010593 addi a1,sp,48 40014b2c: 000c8513 mv a0,s9 handle->dirty = false; 40014b30: 02010223 sb zero,36(sp) handle->bnum = 0; 40014b34: 02012423 sw zero,40(sp) handle->buffer = NULL; 40014b38: 02012623 sw zero,44(sp) return 0; 40014b3c: 00000413 li s0,0 rtems_rfs_block_map_close (fs, &map); 40014b40: c0dfe0ef jal ra,4001374c return 0; 40014b44: e6dff06f j 400149b0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY)) 40014b48: 20000537 lui a0,0x20000 <== NOT EXECUTED 40014b4c: 00000593 li a1,0 <== NOT EXECUTED 40014b50: dbcf50ef jal ra,4000a10c <== NOT EXECUTED 40014b54: 0a051263 bnez a0,40014bf8 <== NOT EXECUTED rtems_rfs_buffer_handle_release (fs, handle); 40014b58: 02410593 addi a1,sp,36 <== NOT EXECUTED 40014b5c: 000c8513 mv a0,s9 <== NOT EXECUTED 40014b60: cb5f10ef jal ra,40006814 <== NOT EXECUTED rtems_rfs_block_map_close (fs, &map); 40014b64: 03010593 addi a1,sp,48 <== NOT EXECUTED 40014b68: 000c8513 mv a0,s9 <== NOT EXECUTED handle->dirty = false; 40014b6c: 02010223 sb zero,36(sp) <== NOT EXECUTED handle->bnum = 0; 40014b70: 02012423 sw zero,40(sp) <== NOT EXECUTED handle->buffer = NULL; 40014b74: 02012623 sw zero,44(sp) <== NOT EXECUTED return EIO; 40014b78: 00500413 li s0,5 <== NOT EXECUTED rtems_rfs_block_map_close (fs, &map); 40014b7c: bd1fe0ef jal ra,4001374c <== NOT EXECUTED return EIO; 40014b80: e31ff06f j 400149b0 <== NOT EXECUTED printf ("rtems-rfs: dir-add-entry: dir=%" PRId32 ", name=", 40014b84: 0089a583 lw a1,8(s3) <== NOT EXECUTED 40014b88: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014b8c: 1e850513 addi a0,a0,488 # 400231e8 <== NOT EXECUTED 40014b90: e69ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED for (c = 0; c < length; c++) 40014b94: 00090e63 beqz s2,40014bb0 <== NOT EXECUTED 40014b98: 000a0413 mv s0,s4 <== NOT EXECUTED 40014b9c: 014904b3 add s1,s2,s4 <== NOT EXECUTED printf ("%c", name[c]); 40014ba0: 00044503 lbu a0,0(s0) <== NOT EXECUTED for (c = 0; c < length; c++) 40014ba4: 00140413 addi s0,s0,1 <== NOT EXECUTED printf ("%c", name[c]); 40014ba8: 06d090ef jal ra,4001e414 <== NOT EXECUTED for (c = 0; c < length; c++) 40014bac: fe849ae3 bne s1,s0,40014ba0 <== NOT EXECUTED printf (", len=%zd\n", length); 40014bb0: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014bb4: 00090593 mv a1,s2 <== NOT EXECUTED 40014bb8: 21050513 addi a0,a0,528 # 40023210 <== NOT EXECUTED 40014bbc: e3dec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014bc0: d11ff06f j 400148d0 <== NOT EXECUTED bpos.bno++; 40014bc4: 01812783 lw a5,24(sp) rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read); 40014bc8: 01412603 lw a2,20(sp) 40014bcc: 00100693 li a3,1 bpos.bno++; 40014bd0: 00178793 addi a5,a5,1 rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read); 40014bd4: 02410593 addi a1,sp,36 40014bd8: 000c8513 mv a0,s9 bpos.bno++; 40014bdc: 00f12c23 sw a5,24(sp) rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read); 40014be0: 99df10ef jal ra,4000657c 40014be4: 00050413 mv s0,a0 if (rc > 0) 40014be8: d8a04ae3 bgtz a0,4001497c <== NEVER TAKEN entry = rtems_rfs_buffer_data (&buffer); 40014bec: 02c12783 lw a5,44(sp) 40014bf0: 01c7ac03 lw s8,28(a5) if (!read) 40014bf4: e15ff06f j 40014a08 printf ("rtems-rfs: dir-add-entry: " 40014bf8: 0089a583 lw a1,8(s3) <== NOT EXECUTED 40014bfc: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014c00: 000b8713 mv a4,s7 <== NOT EXECUTED 40014c04: 00040693 mv a3,s0 <== NOT EXECUTED 40014c08: 00048613 mv a2,s1 <== NOT EXECUTED 40014c0c: 2ec50513 addi a0,a0,748 # 400232ec <== NOT EXECUTED 40014c10: de9ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014c14: f45ff06f j 40014b58 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY)) 40014c18: 20000537 lui a0,0x20000 <== NOT EXECUTED 40014c1c: 00000593 li a1,0 <== NOT EXECUTED 40014c20: cecf50ef jal ra,4000a10c <== NOT EXECUTED 40014c24: d60504e3 beqz a0,4001498c <== NOT EXECUTED printf ("rtems-rfs: dir-add-entry: " 40014c28: 0089a483 lw s1,8(s3) <== NOT EXECUTED 40014c2c: 00040513 mv a0,s0 <== NOT EXECUTED 40014c30: 3340a0ef jal ra,4001ef64 <== NOT EXECUTED 40014c34: 00050693 mv a3,a0 <== NOT EXECUTED 40014c38: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014c3c: 00040613 mv a2,s0 <== NOT EXECUTED 40014c40: 00048593 mv a1,s1 <== NOT EXECUTED 40014c44: 26050513 addi a0,a0,608 # 40023260 <== NOT EXECUTED 40014c48: db1ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014c4c: d41ff06f j 4001498c <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_ADD_ENTRY)) 40014c50: 20000537 lui a0,0x20000 <== NOT EXECUTED 40014c54: 00000593 li a1,0 <== NOT EXECUTED 40014c58: cb4f50ef jal ra,4000a10c <== NOT EXECUTED 40014c5c: d20508e3 beqz a0,4001498c <== NOT EXECUTED printf ("rtems-rfs: dir-add-entry: " 40014c60: 0089a483 lw s1,8(s3) <== NOT EXECUTED 40014c64: 00040513 mv a0,s0 <== NOT EXECUTED 40014c68: 2fc0a0ef jal ra,4001ef64 <== NOT EXECUTED 40014c6c: 00050693 mv a3,a0 <== NOT EXECUTED 40014c70: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014c74: 00040613 mv a2,s0 <== NOT EXECUTED 40014c78: 00048593 mv a1,s1 <== NOT EXECUTED 40014c7c: 21c50513 addi a0,a0,540 # 4002321c <== NOT EXECUTED 40014c80: d79ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014c84: d09ff06f j 4001498c <== NOT EXECUTED printf ("rtems-rfs: dir-add-entry: " 40014c88: 0089a483 lw s1,8(s3) <== NOT EXECUTED 40014c8c: 00040513 mv a0,s0 <== NOT EXECUTED 40014c90: 2d40a0ef jal ra,4001ef64 <== NOT EXECUTED 40014c94: 00050693 mv a3,a0 <== NOT EXECUTED 40014c98: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014c9c: 00040613 mv a2,s0 <== NOT EXECUTED 40014ca0: 00048593 mv a1,s1 <== NOT EXECUTED 40014ca4: 2a450513 addi a0,a0,676 # 400232a4 <== NOT EXECUTED 40014ca8: d51ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014cac: ce1ff06f j 4001498c <== NOT EXECUTED =============================================================================== 40014cb0 : int rtems_rfs_dir_del_entry (rtems_rfs_file_system* fs, rtems_rfs_inode_handle* dir, rtems_rfs_ino ino, uint32_t offset) { 40014cb0: f6010113 addi sp,sp,-160 40014cb4: 09212823 sw s2,144(sp) 40014cb8: 09512223 sw s5,132(sp) 40014cbc: 00058913 mv s2,a1 40014cc0: 00050a93 mv s5,a0 rtems_rfs_block_no block; rtems_rfs_buffer_handle buffer; bool search; int rc; if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY)) 40014cc4: 00000593 li a1,0 40014cc8: 40000537 lui a0,0x40000 { 40014ccc: 07712e23 sw s7,124(sp) 40014cd0: 07812c23 sw s8,120(sp) 40014cd4: 08112e23 sw ra,156(sp) 40014cd8: 08812c23 sw s0,152(sp) 40014cdc: 08912a23 sw s1,148(sp) 40014ce0: 09312623 sw s3,140(sp) 40014ce4: 09412423 sw s4,136(sp) 40014ce8: 09612023 sw s6,128(sp) 40014cec: 07912a23 sw s9,116(sp) 40014cf0: 07a12823 sw s10,112(sp) 40014cf4: 07b12623 sw s11,108(sp) 40014cf8: 00060c13 mv s8,a2 40014cfc: 00068b93 mv s7,a3 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY)) 40014d00: c0cf50ef jal ra,4000a10c 40014d04: 1c051263 bnez a0,40014ec8 <== NEVER TAKEN printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n", rtems_rfs_inode_ino (dir), ino, offset); rc = rtems_rfs_block_map_open (fs, dir, &map); 40014d08: 01010613 addi a2,sp,16 40014d0c: 00090593 mv a1,s2 40014d10: 000a8513 mv a0,s5 40014d14: 865fe0ef jal ra,40013578 40014d18: 00050b13 mv s6,a0 if (rc > 0) 40014d1c: 04a05263 blez a0,40014d60 <== ALWAYS TAKEN } rtems_rfs_buffer_handle_close (fs, &buffer); rtems_rfs_block_map_close (fs, &map); return rc; } 40014d20: 09c12083 lw ra,156(sp) 40014d24: 09812403 lw s0,152(sp) 40014d28: 09412483 lw s1,148(sp) 40014d2c: 09012903 lw s2,144(sp) 40014d30: 08c12983 lw s3,140(sp) 40014d34: 08812a03 lw s4,136(sp) 40014d38: 08412a83 lw s5,132(sp) 40014d3c: 07c12b83 lw s7,124(sp) 40014d40: 07812c03 lw s8,120(sp) 40014d44: 07412c83 lw s9,116(sp) 40014d48: 07012d03 lw s10,112(sp) 40014d4c: 06c12d83 lw s11,108(sp) 40014d50: 000b0513 mv a0,s6 40014d54: 08012b03 lw s6,128(sp) 40014d58: 0a010113 addi sp,sp,160 40014d5c: 00008067 ret rc = rtems_rfs_block_map_seek (fs, &map, offset, &block); 40014d60: 00010713 mv a4,sp 40014d64: 000b8613 mv a2,s7 40014d68: 00000693 li a3,0 40014d6c: 01010593 addi a1,sp,16 40014d70: 000a8513 mv a0,s5 40014d74: d19fe0ef jal ra,40013a8c 40014d78: 00050b13 mv s6,a0 if (rc > 0) 40014d7c: 18a04663 bgtz a0,40014f08 <== NEVER TAKEN if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 40014d80: 00010cb7 lui s9,0x10 handle->dirty = false; 40014d84: 00010223 sb zero,4(sp) handle->bnum = 0; 40014d88: 00012423 sw zero,8(sp) handle->buffer = NULL; 40014d8c: 00012623 sw zero,12(sp) 40014d90: fffc8c93 addi s9,s9,-1 # ffff if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40014d94: 00a00d13 li s10,10 if (rc == ENXIO) 40014d98: 00600993 li s3,6 rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true); 40014d9c: 00012603 lw a2,0(sp) 40014da0: 00100693 li a3,1 40014da4: 00410593 addi a1,sp,4 40014da8: 000a8513 mv a0,s5 40014dac: fd0f10ef jal ra,4000657c 40014db0: 00050b13 mv s6,a0 if (rc > 0) 40014db4: 2ca04063 bgtz a0,40015074 <== NEVER TAKEN eoffset = offset % rtems_rfs_fs_block_size (fs); 40014db8: 008aa583 lw a1,8(s5) if (search) 40014dbc: 0c0b8263 beqz s7,40014e80 <== NEVER TAKEN eoffset = offset % rtems_rfs_fs_block_size (fs); 40014dc0: 02bbf7b3 remu a5,s7,a1 40014dc4: 00078a13 mv s4,a5 entry = rtems_rfs_buffer_data (&buffer) + eoffset; 40014dc8: 00c12703 lw a4,12(sp) while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014dcc: ff658613 addi a2,a1,-10 entry = rtems_rfs_buffer_data (&buffer) + eoffset; 40014dd0: 01c72d83 lw s11,28(a4) 40014dd4: 00fd8db3 add s11,s11,a5 while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014dd8: 02c7ea63 bltu a5,a2,40014e0c 40014ddc: 0800006f j 40014e5c <== NOT EXECUTED if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40014de0: 0a9d5663 bge s10,s1,40014e8c 40014de4: 01caa783 lw a5,28(s5) 40014de8: 0af4f263 bgeu s1,a5,40014e8c 40014dec: 0a040063 beqz s0,40014e8c <== NEVER TAKEN 40014df0: 014aa783 lw a5,20(s5) 40014df4: 0887ec63 bltu a5,s0,40014e8c if (ino == rtems_rfs_dir_entry_ino (entry)) 40014df8: 128c0663 beq s8,s0,40014f24 eoffset += elength; 40014dfc: 009a0a33 add s4,s4,s1 <== NOT EXECUTED if (!search) 40014e00: 200b9463 bnez s7,40015008 <== NOT EXECUTED entry += elength; 40014e04: 009d8db3 add s11,s11,s1 <== NOT EXECUTED while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014e08: 04ca7a63 bgeu s4,a2,40014e5c <== NOT EXECUTED entry += elength; 40014e0c: 009dc783 lbu a5,9(s11) 40014e10: 008dc803 lbu a6,8(s11) eino = rtems_rfs_dir_entry_ino (entry); 40014e14: 000dc403 lbu s0,0(s11) 40014e18: 001dc683 lbu a3,1(s11) 40014e1c: 00879793 slli a5,a5,0x8 40014e20: 0107e7b3 or a5,a5,a6 40014e24: 00879493 slli s1,a5,0x8 40014e28: 003dc503 lbu a0,3(s11) 40014e2c: 002dc703 lbu a4,2(s11) 40014e30: 0087d793 srli a5,a5,0x8 40014e34: 00f4e7b3 or a5,s1,a5 40014e38: 01841413 slli s0,s0,0x18 40014e3c: 01069693 slli a3,a3,0x10 40014e40: 01079493 slli s1,a5,0x10 40014e44: 00d46433 or s0,s0,a3 40014e48: 00a46433 or s0,s0,a0 40014e4c: 00871793 slli a5,a4,0x8 40014e50: 0104d493 srli s1,s1,0x10 40014e54: 00f46433 or s0,s0,a5 if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 40014e58: f99494e3 bne s1,s9,40014de0 if (rc == 0) 40014e5c: 040b1263 bnez s6,40014ea0 <== NOT EXECUTED rc = rtems_rfs_block_map_next_block (fs, &map, &block); 40014e60: 00010613 mv a2,sp <== NOT EXECUTED 40014e64: 01010593 addi a1,sp,16 <== NOT EXECUTED 40014e68: 000a8513 mv a0,s5 <== NOT EXECUTED 40014e6c: ce9fe0ef jal ra,40013b54 <== NOT EXECUTED 40014e70: 00050b13 mv s6,a0 <== NOT EXECUTED if (rc == ENXIO) 40014e74: 25350263 beq a0,s3,400150b8 <== NOT EXECUTED while (rc == 0) 40014e78: f20502e3 beqz a0,40014d9c <== NOT EXECUTED 40014e7c: 0240006f j 40014ea0 <== NOT EXECUTED 40014e80: 00000793 li a5,0 <== NOT EXECUTED eoffset = 0; 40014e84: 00000a13 li s4,0 <== NOT EXECUTED 40014e88: f41ff06f j 40014dc8 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY)) 40014e8c: 40000537 lui a0,0x40000 <== NOT EXECUTED 40014e90: 00000593 li a1,0 <== NOT EXECUTED 40014e94: a78f50ef jal ra,4000a10c <== NOT EXECUTED rc = EIO; 40014e98: 00500b13 li s6,5 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY)) 40014e9c: 04051463 bnez a0,40014ee4 <== NOT EXECUTED rtems_rfs_buffer_handle_release (fs, handle); 40014ea0: 00410593 addi a1,sp,4 <== NOT EXECUTED 40014ea4: 000a8513 mv a0,s5 <== NOT EXECUTED 40014ea8: 96df10ef jal ra,40006814 <== NOT EXECUTED rtems_rfs_block_map_close (fs, &map); 40014eac: 01010593 addi a1,sp,16 <== NOT EXECUTED 40014eb0: 000a8513 mv a0,s5 <== NOT EXECUTED handle->dirty = false; 40014eb4: 00010223 sb zero,4(sp) <== NOT EXECUTED handle->bnum = 0; 40014eb8: 00012423 sw zero,8(sp) <== NOT EXECUTED handle->buffer = NULL; 40014ebc: 00012623 sw zero,12(sp) <== NOT EXECUTED 40014ec0: 88dfe0ef jal ra,4001374c <== NOT EXECUTED return rc; 40014ec4: e5dff06f j 40014d20 <== NOT EXECUTED printf ("rtems-rfs: dir-del-entry: dir=%" PRId32 ", entry=%" PRId32 " offset=%" PRIu32 "\n", 40014ec8: 00892583 lw a1,8(s2) <== NOT EXECUTED 40014ecc: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014ed0: 000b8693 mv a3,s7 <== NOT EXECUTED 40014ed4: 000c0613 mv a2,s8 <== NOT EXECUTED 40014ed8: 33450513 addi a0,a0,820 # 40023334 <== NOT EXECUTED 40014edc: b1dec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014ee0: e29ff06f j 40014d08 <== NOT EXECUTED printf ("rtems-rfs: dir-del-entry: " 40014ee4: 00012703 lw a4,0(sp) <== NOT EXECUTED 40014ee8: 00892583 lw a1,8(s2) <== NOT EXECUTED 40014eec: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014ef0: 000a0793 mv a5,s4 <== NOT EXECUTED 40014ef4: 00040693 mv a3,s0 <== NOT EXECUTED 40014ef8: 00048613 mv a2,s1 <== NOT EXECUTED 40014efc: 3b450513 addi a0,a0,948 # 400233b4 <== NOT EXECUTED 40014f00: af9ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED while (rc == 0) 40014f04: f9dff06f j 40014ea0 <== NOT EXECUTED if (rc == ENXIO) 40014f08: 00600793 li a5,6 <== NOT EXECUTED 40014f0c: 00f51463 bne a0,a5,40014f14 <== NOT EXECUTED rc = ENOENT; 40014f10: 00200b13 li s6,2 <== NOT EXECUTED rtems_rfs_block_map_close (fs, &map); 40014f14: 01010593 addi a1,sp,16 <== NOT EXECUTED 40014f18: 000a8513 mv a0,s5 <== NOT EXECUTED 40014f1c: 831fe0ef jal ra,4001374c <== NOT EXECUTED return rc; 40014f20: e01ff06f j 40014d20 <== NOT EXECUTED remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength); 40014f24: 009a09b3 add s3,s4,s1 40014f28: 413589b3 sub s3,a1,s3 memmove (entry, entry + elength, remaining); 40014f2c: 00098613 mv a2,s3 40014f30: 009d85b3 add a1,s11,s1 40014f34: 000d8513 mv a0,s11 40014f38: 2e0090ef jal ra,4001e218 memset (entry + remaining, 0xff, elength); 40014f3c: 00048613 mv a2,s1 40014f40: 0ff00593 li a1,255 40014f44: 013d8533 add a0,s11,s3 40014f48: 3f0090ef jal ra,4001e338 elength = rtems_rfs_dir_entry_length (entry); 40014f4c: 009dc783 lbu a5,9(s11) 40014f50: 008dc703 lbu a4,8(s11) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY)) 40014f54: 40000537 lui a0,0x40000 40014f58: 00879793 slli a5,a5,0x8 40014f5c: 00e7e7b3 or a5,a5,a4 40014f60: 00879493 slli s1,a5,0x8 40014f64: 0087d793 srli a5,a5,0x8 40014f68: 00f4e7b3 or a5,s1,a5 40014f6c: 01079493 slli s1,a5,0x10 40014f70: 00000593 li a1,0 40014f74: 0104d493 srli s1,s1,0x10 40014f78: 994f50ef jal ra,4000a10c 40014f7c: 02050c63 beqz a0,40014fb4 <== ALWAYS TAKEN rtems_rfs_block_map_last (&map) ? "yes" : "no"); 40014f80: 02012703 lw a4,32(sp) <== NOT EXECUTED 40014f84: 01812783 lw a5,24(sp) <== NOT EXECUTED printf ("rtems-rfs: dir-del-entry: " 40014f88: 00012683 lw a3,0(sp) <== NOT EXECUTED rtems_rfs_block_map_last (&map) ? "yes" : "no"); 40014f8c: 00f76633 or a2,a4,a5 <== NOT EXECUTED 40014f90: 06061263 bnez a2,40014ff4 <== NOT EXECUTED printf ("rtems-rfs: dir-del-entry: " 40014f94: 400227b7 lui a5,0x40022 <== NOT EXECUTED 40014f98: 44478793 addi a5,a5,1092 # 40022444 <== NOT EXECUTED 40014f9c: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014fa0: 000a0713 mv a4,s4 <== NOT EXECUTED 40014fa4: 00048613 mv a2,s1 <== NOT EXECUTED 40014fa8: 00040593 mv a1,s0 <== NOT EXECUTED 40014fac: 40050513 addi a0,a0,1024 # 40023400 <== NOT EXECUTED 40014fb0: a49ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) && 40014fb4: 000107b7 lui a5,0x10 40014fb8: fff78793 addi a5,a5,-1 # ffff 40014fbc: 04f48a63 beq s1,a5,40015010 rtems_rfs_buffer_handle_release (fs, handle); 40014fc0: 00410593 addi a1,sp,4 rtems_rfs_buffer_mark_dirty (&buffer); 40014fc4: 00100793 li a5,1 40014fc8: 000a8513 mv a0,s5 40014fcc: 00f10223 sb a5,4(sp) 40014fd0: 845f10ef jal ra,40006814 rtems_rfs_block_map_close (fs, &map); 40014fd4: 01010593 addi a1,sp,16 40014fd8: 000a8513 mv a0,s5 handle->dirty = false; 40014fdc: 00010223 sb zero,4(sp) handle->bnum = 0; 40014fe0: 00012423 sw zero,8(sp) handle->buffer = NULL; 40014fe4: 00012623 sw zero,12(sp) return 0; 40014fe8: 00000b13 li s6,0 rtems_rfs_block_map_close (fs, &map); 40014fec: f60fe0ef jal ra,4001374c return 0; 40014ff0: d31ff06f j 40014d20 rtems_rfs_block_map_last (&map) ? "yes" : "no"); 40014ff4: fff78793 addi a5,a5,-1 <== NOT EXECUTED 40014ff8: f8f70ee3 beq a4,a5,40014f94 <== NOT EXECUTED printf ("rtems-rfs: dir-del-entry: " 40014ffc: 400227b7 lui a5,0x40022 <== NOT EXECUTED 40015000: 44878793 addi a5,a5,1096 # 40022448 <== NOT EXECUTED 40015004: f99ff06f j 40014f9c <== NOT EXECUTED rc = EIO; 40015008: 00500b13 li s6,5 <== NOT EXECUTED while (rc == 0) 4001500c: e95ff06f j 40014ea0 <== NOT EXECUTED if ((elength == RTEMS_RFS_DIR_ENTRY_EMPTY) && 40015010: fa0a18e3 bnez s4,40014fc0 <== ALWAYS TAKEN (eoffset == 0) && rtems_rfs_block_map_last (&map)) 40015014: 02012703 lw a4,32(sp) <== NOT EXECUTED 40015018: 01812783 lw a5,24(sp) <== NOT EXECUTED 4001501c: 00f766b3 or a3,a4,a5 <== NOT EXECUTED 40015020: 08069663 bnez a3,400150ac <== NOT EXECUTED rc = rtems_rfs_block_map_shrink (fs, &map, 1); 40015024: 00100613 li a2,1 <== NOT EXECUTED 40015028: 01010593 addi a1,sp,16 <== NOT EXECUTED 4001502c: 000a8513 mv a0,s5 <== NOT EXECUTED 40015030: f3dfe0ef jal ra,40013f6c <== NOT EXECUTED 40015034: 00050413 mv s0,a0 <== NOT EXECUTED if (rc > 0) 40015038: f8a054e3 blez a0,40014fc0 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY)) 4001503c: 40000537 lui a0,0x40000 <== NOT EXECUTED 40015040: 00000593 li a1,0 <== NOT EXECUTED 40015044: 8c8f50ef jal ra,4000a10c <== NOT EXECUTED 40015048: f6050ce3 beqz a0,40014fc0 <== NOT EXECUTED printf ("rtems-rfs: dir-del-entry: " 4001504c: 00892483 lw s1,8(s2) <== NOT EXECUTED 40015050: 00040513 mv a0,s0 <== NOT EXECUTED 40015054: 711090ef jal ra,4001ef64 <== NOT EXECUTED 40015058: 00050693 mv a3,a0 <== NOT EXECUTED 4001505c: 40023537 lui a0,0x40023 <== NOT EXECUTED 40015060: 00040613 mv a2,s0 <== NOT EXECUTED 40015064: 00048593 mv a1,s1 <== NOT EXECUTED 40015068: 46050513 addi a0,a0,1120 # 40023460 <== NOT EXECUTED 4001506c: 98dec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40015070: f51ff06f j 40014fc0 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_DEL_ENTRY)) 40015074: 40000537 lui a0,0x40000 <== NOT EXECUTED 40015078: 00000593 li a1,0 <== NOT EXECUTED 4001507c: 890f50ef jal ra,4000a10c <== NOT EXECUTED 40015080: e20500e3 beqz a0,40014ea0 <== NOT EXECUTED printf ("rtems-rfs: dir-del-entry: " 40015084: 00892403 lw s0,8(s2) <== NOT EXECUTED 40015088: 000b0513 mv a0,s6 <== NOT EXECUTED 4001508c: 6d9090ef jal ra,4001ef64 <== NOT EXECUTED 40015090: 00050693 mv a3,a0 <== NOT EXECUTED 40015094: 40023537 lui a0,0x40023 <== NOT EXECUTED 40015098: 000b0613 mv a2,s6 <== NOT EXECUTED 4001509c: 00040593 mv a1,s0 <== NOT EXECUTED 400150a0: 36c50513 addi a0,a0,876 # 4002336c <== NOT EXECUTED 400150a4: 955ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 400150a8: df9ff06f j 40014ea0 <== NOT EXECUTED (eoffset == 0) && rtems_rfs_block_map_last (&map)) 400150ac: fff78793 addi a5,a5,-1 <== NOT EXECUTED 400150b0: f0f718e3 bne a4,a5,40014fc0 <== NOT EXECUTED 400150b4: f71ff06f j 40015024 <== NOT EXECUTED rc = ENOENT; 400150b8: 00200b13 li s6,2 <== NOT EXECUTED 400150bc: de5ff06f j 40014ea0 <== NOT EXECUTED =============================================================================== 400154bc : int rtems_rfs_dir_empty (rtems_rfs_file_system* fs, rtems_rfs_inode_handle* dir) { 400154bc: f7010113 addi sp,sp,-144 400154c0: 09212023 sw s2,128(sp) 400154c4: 07412c23 sw s4,120(sp) 400154c8: 00058913 mv s2,a1 400154cc: 00050a13 mv s4,a0 rtems_rfs_buffer_handle buffer; rtems_rfs_block_no block; bool empty; int rc; if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 400154d0: 00000593 li a1,0 400154d4: 80000537 lui a0,0x80000 { 400154d8: 08112623 sw ra,140(sp) 400154dc: 08812423 sw s0,136(sp) 400154e0: 08912223 sw s1,132(sp) 400154e4: 07312e23 sw s3,124(sp) 400154e8: 07512a23 sw s5,116(sp) 400154ec: 07612823 sw s6,112(sp) 400154f0: 07712623 sw s7,108(sp) 400154f4: 07812423 sw s8,104(sp) 400154f8: 07912223 sw s9,100(sp) 400154fc: 07a12023 sw s10,96(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 40015500: c0df40ef jal ra,4000a10c 40015504: 1e051663 bnez a0,400156f0 <== NEVER TAKEN printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir)); empty = true; rc = rtems_rfs_block_map_open (fs, dir, &map); 40015508: 01010613 addi a2,sp,16 4001550c: 00090593 mv a1,s2 40015510: 000a0513 mv a0,s4 40015514: 864fe0ef jal ra,40013578 40015518: 00050d13 mv s10,a0 if (rc > 0) 4001551c: 04a05063 blez a0,4001555c <== ALWAYS TAKEN rc = ENOTEMPTY; rtems_rfs_buffer_handle_close (fs, &buffer); rtems_rfs_block_map_close (fs, &map); return rc; } 40015520: 08c12083 lw ra,140(sp) 40015524: 08812403 lw s0,136(sp) 40015528: 08412483 lw s1,132(sp) 4001552c: 08012903 lw s2,128(sp) 40015530: 07c12983 lw s3,124(sp) 40015534: 07812a03 lw s4,120(sp) 40015538: 07412a83 lw s5,116(sp) 4001553c: 07012b03 lw s6,112(sp) 40015540: 06c12b83 lw s7,108(sp) 40015544: 06812c03 lw s8,104(sp) 40015548: 06412c83 lw s9,100(sp) 4001554c: 000d0513 mv a0,s10 40015550: 06012d03 lw s10,96(sp) 40015554: 09010113 addi sp,sp,144 40015558: 00008067 ret rc = rtems_rfs_block_map_seek (fs, &map, 0, &block); 4001555c: 00010713 mv a4,sp 40015560: 00000613 li a2,0 40015564: 00000693 li a3,0 40015568: 01010593 addi a1,sp,16 4001556c: 000a0513 mv a0,s4 40015570: d1cfe0ef jal ra,40013a8c 40015574: 00050d13 mv s10,a0 if (rc > 0) 40015578: 18a04663 bgtz a0,40015704 <== NEVER TAKEN if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 4001557c: 00010ab7 lui s5,0x10 handle->dirty = false; 40015580: 00010223 sb zero,4(sp) handle->bnum = 0; 40015584: 00012423 sw zero,8(sp) handle->buffer = NULL; 40015588: 00012623 sw zero,12(sp) 4001558c: fffa8a93 addi s5,s5,-1 # ffff if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40015590: 00a00b13 li s6,10 if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) || 40015594: 00b00b93 li s7,11 (entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) && 40015598: 00c00c13 li s8,12 printf ("rtems-rfs: dir-empty: " 4001559c: 400239b7 lui s3,0x40023 rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true); 400155a0: 00012603 lw a2,0(sp) 400155a4: 00100693 li a3,1 400155a8: 00410593 addi a1,sp,4 400155ac: 000a0513 mv a0,s4 400155b0: fcdf00ef jal ra,4000657c 400155b4: 00050d13 mv s10,a0 if (rc > 0) 400155b8: 0ca04063 bgtz a0,40015678 <== NEVER TAKEN while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 400155bc: 008a2503 lw a0,8(s4) entry = rtems_rfs_buffer_data (&buffer); 400155c0: 00c12783 lw a5,12(sp) while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 400155c4: ff650513 addi a0,a0,-10 # 7ffffff6 entry = rtems_rfs_buffer_data (&buffer); 400155c8: 01c7a783 lw a5,28(a5) while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 400155cc: 0e050e63 beqz a0,400156c8 <== NEVER TAKEN offset = 0; 400155d0: 00000c93 li s9,0 ((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) || 400155d4: 02e00713 li a4,46 400155d8: 0240006f j 400155fc (entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) && 400155dc: 09841a63 bne s0,s8,40015670 ((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) || 400155e0: 00a7c683 lbu a3,10(a5) 400155e4: 08e69663 bne a3,a4,40015670 (entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') || 400155e8: 00b7c683 lbu a3,11(a5) 400155ec: 08e69263 bne a3,a4,40015670 offset += elength; 400155f0: 008c8cb3 add s9,s9,s0 entry += elength; 400155f4: 008787b3 add a5,a5,s0 while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 400155f8: 0cacf863 bgeu s9,a0,400156c8 elength = rtems_rfs_dir_entry_length (entry); 400155fc: 0097c603 lbu a2,9(a5) 40015600: 0087c403 lbu s0,8(a5) eino = rtems_rfs_dir_entry_ino (entry); 40015604: 0007c483 lbu s1,0(a5) 40015608: 0017c583 lbu a1,1(a5) 4001560c: 00861613 slli a2,a2,0x8 40015610: 00866633 or a2,a2,s0 40015614: 00861413 slli s0,a2,0x8 40015618: 0037c803 lbu a6,3(a5) 4001561c: 0027c683 lbu a3,2(a5) 40015620: 00865613 srli a2,a2,0x8 40015624: 01849493 slli s1,s1,0x18 40015628: 01059593 slli a1,a1,0x10 4001562c: 00c46433 or s0,s0,a2 40015630: 00b4e4b3 or s1,s1,a1 40015634: 01041413 slli s0,s0,0x10 40015638: 0104e4b3 or s1,s1,a6 4001563c: 00869693 slli a3,a3,0x8 40015640: 01045413 srli s0,s0,0x10 40015644: 00d4e4b3 or s1,s1,a3 if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 40015648: 09540063 beq s0,s5,400156c8 if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 4001564c: 048b5a63 bge s6,s0,400156a0 40015650: 01ca2683 lw a3,28(s4) 40015654: 04d47663 bgeu s0,a3,400156a0 40015658: 04048463 beqz s1,400156a0 <== NEVER TAKEN 4001565c: 014a2683 lw a3,20(s4) 40015660: 0496e063 bltu a3,s1,400156a0 if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) || 40015664: f7741ce3 bne s0,s7,400155dc 40015668: 00a7c683 lbu a3,10(a5) 4001566c: f8e682e3 beq a3,a4,400155f0 if ((rc == 0) && !empty) 40015670: 000d1463 bnez s10,40015678 <== NEVER TAKEN rc = ENOTEMPTY; 40015674: 05a00d13 li s10,90 rtems_rfs_buffer_handle_release (fs, handle); 40015678: 00410593 addi a1,sp,4 4001567c: 000a0513 mv a0,s4 40015680: 994f10ef jal ra,40006814 rtems_rfs_block_map_close (fs, &map); 40015684: 01010593 addi a1,sp,16 40015688: 000a0513 mv a0,s4 handle->dirty = false; 4001568c: 00010223 sb zero,4(sp) handle->bnum = 0; 40015690: 00012423 sw zero,8(sp) handle->buffer = NULL; 40015694: 00012623 sw zero,12(sp) 40015698: 8b4fe0ef jal ra,4001374c return rc; 4001569c: e85ff06f j 40015520 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_EMPTY)) 400156a0: 00000513 li a0,0 <== NOT EXECUTED 400156a4: 00100593 li a1,1 <== NOT EXECUTED 400156a8: a65f40ef jal ra,4000a10c <== NOT EXECUTED 400156ac: 00050e63 beqz a0,400156c8 <== NOT EXECUTED printf ("rtems-rfs: dir-empty: " 400156b0: 00892583 lw a1,8(s2) <== NOT EXECUTED 400156b4: 000c8713 mv a4,s9 <== NOT EXECUTED 400156b8: 00048693 mv a3,s1 <== NOT EXECUTED 400156bc: 00040613 mv a2,s0 <== NOT EXECUTED 400156c0: 5a898513 addi a0,s3,1448 # 400235a8 <== NOT EXECUTED 400156c4: b34ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED rc = rtems_rfs_block_map_next_block (fs, &map, &block); 400156c8: 00010613 mv a2,sp 400156cc: 01010593 addi a1,sp,16 400156d0: 000a0513 mv a0,s4 400156d4: c80fe0ef jal ra,40013b54 if (rc > 0) 400156d8: eca054e3 blez a0,400155a0 <== NEVER TAKEN rc = 0; 400156dc: ffa50793 addi a5,a0,-6 400156e0: 00f037b3 snez a5,a5 400156e4: 40f007b3 neg a5,a5 400156e8: 00f57d33 and s10,a0,a5 400156ec: f8dff06f j 40015678 printf ("rtems-rfs: dir-empty: dir=%" PRId32 "\n", rtems_rfs_inode_ino (dir)); 400156f0: 00892583 lw a1,8(s2) <== NOT EXECUTED 400156f4: 40023537 lui a0,0x40023 <== NOT EXECUTED 400156f8: 58850513 addi a0,a0,1416 # 40023588 <== NOT EXECUTED 400156fc: afcec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40015700: e09ff06f j 40015508 <== NOT EXECUTED rtems_rfs_block_map_close (fs, &map); 40015704: 01010593 addi a1,sp,16 <== NOT EXECUTED 40015708: 000a0513 mv a0,s4 <== NOT EXECUTED 4001570c: 840fe0ef jal ra,4001374c <== NOT EXECUTED return rc; 40015710: e11ff06f j 40015520 <== NOT EXECUTED =============================================================================== 40014380 : rtems_rfs_inode_handle* inode, const char* name, int length, rtems_rfs_ino* ino, uint32_t* offset) { 40014380: f5010113 addi sp,sp,-176 40014384: 09712623 sw s7,140(sp) 40014388: 07b12e23 sw s11,124(sp) 4001438c: 00058b93 mv s7,a1 40014390: 00050d93 mv s11,a0 rtems_rfs_block_map map; rtems_rfs_buffer_handle entries; int rc; if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 40014394: 00000593 li a1,0 40014398: 04000537 lui a0,0x4000 { 4001439c: 0a812423 sw s0,168(sp) 400143a0: 09512a23 sw s5,148(sp) 400143a4: 09612823 sw s6,144(sp) 400143a8: 0a112623 sw ra,172(sp) 400143ac: 0a912223 sw s1,164(sp) 400143b0: 0b212023 sw s2,160(sp) 400143b4: 09312e23 sw s3,156(sp) 400143b8: 09412c23 sw s4,152(sp) 400143bc: 09812423 sw s8,136(sp) 400143c0: 09912223 sw s9,132(sp) 400143c4: 09a12023 sw s10,128(sp) 400143c8: 00060b13 mv s6,a2 400143cc: 00068a93 mv s5,a3 400143d0: 00070413 mv s0,a4 400143d4: 00f12623 sw a5,12(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 400143d8: d35f50ef jal ra,4000a10c 400143dc: 34051263 bnez a0,40014720 <== NEVER TAKEN printf ("%c", name[c]); printf (", len=%d\n", length); } *ino = RTEMS_RFS_EMPTY_INO; *offset = 0; 400143e0: 00c12783 lw a5,12(sp) *ino = RTEMS_RFS_EMPTY_INO; 400143e4: 00042023 sw zero,0(s0) rc = rtems_rfs_block_map_open (fs, inode, &map); 400143e8: 02010613 addi a2,sp,32 *offset = 0; 400143ec: 0007a023 sw zero,0(a5) rc = rtems_rfs_block_map_open (fs, inode, &map); 400143f0: 000b8593 mv a1,s7 400143f4: 000d8513 mv a0,s11 400143f8: 980ff0ef jal ra,40013578 400143fc: 00050a13 mv s4,a0 if (rc > 0) 40014400: 2ea04463 bgtz a0,400146e8 <== NEVER TAKEN uint32_t hash; /* * Calculate the hash of the look up string. */ hash = rtems_rfs_dir_hash (name, length); 40014404: 000a8593 mv a1,s5 40014408: 000b0513 mv a0,s6 handle->dirty = false; 4001440c: 00010a23 sb zero,20(sp) handle->bnum = 0; 40014410: 00012c23 sw zero,24(sp) handle->buffer = NULL; 40014414: 00012e23 sw zero,28(sp) 40014418: 2fc010ef jal ra,40015714 4001441c: 00050993 mv s3,a0 /* * Locate the first block. The map points to the start after open so just * seek 0. If an error the block will be 0. */ rc = rtems_rfs_block_map_seek (fs, &map, 0, &block); 40014420: 01010713 addi a4,sp,16 40014424: 00000613 li a2,0 40014428: 00000693 li a3,0 4001442c: 02010593 addi a1,sp,32 40014430: 000d8513 mv a0,s11 40014434: e58ff0ef jal ra,40013a8c 40014438: 00050a13 mv s4,a0 if (rc > 0) 4001443c: 32a04263 bgtz a0,40014760 <== NEVER TAKEN ehash = rtems_rfs_dir_entry_hash (entry); elength = rtems_rfs_dir_entry_length (entry); *ino = rtems_rfs_dir_entry_ino (entry); if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 40014440: 00010937 lui s2,0x10 while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014444: 00a00493 li s1,10 if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 40014448: fff90913 addi s2,s2,-1 # ffff } if (ehash == hash) { if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK)) printf ("rtems-rfs: dir-lookup-ino: " 4001444c: 40023cb7 lui s9,0x40023 while ((rc == 0) && block) 40014450: 180a1663 bnez s4,400145dc <== NEVER TAKEN 40014454: 01012783 lw a5,16(sp) 40014458: 36078063 beqz a5,400147b8 <== NEVER TAKEN if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 4001445c: 04000537 lui a0,0x4000 40014460: 00000593 li a1,0 40014464: ca9f50ef jal ra,4000a10c 40014468: 22051e63 bnez a0,400146a4 <== NEVER TAKEN rc = rtems_rfs_buffer_handle_request (fs, &entries, block, true); 4001446c: 01012603 lw a2,16(sp) 40014470: 00100693 li a3,1 40014474: 01410593 addi a1,sp,20 40014478: 000d8513 mv a0,s11 4001447c: 900f20ef jal ra,4000657c 40014480: 00050a13 mv s4,a0 if (rc > 0) 40014484: 36a04863 bgtz a0,400147f4 <== NEVER TAKEN entry = rtems_rfs_buffer_data (&entries); 40014488: 01c12703 lw a4,28(sp) while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 4001448c: 008da783 lw a5,8(s11) map.bpos.boff = 0; 40014490: 02012a23 sw zero,52(sp) entry = rtems_rfs_buffer_data (&entries); 40014494: 01c72c03 lw s8,28(a4) while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 40014498: 02979263 bne a5,s1,400144bc 4001449c: 2200006f j 400146bc <== NOT EXECUTED rtems_rfs_block_map_close (fs, &map); return 0; } } map.bpos.boff += elength; 400144a0: 03412683 lw a3,52(sp) while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 400144a4: 008da783 lw a5,8(s11) entry += elength; 400144a8: 01ac0c33 add s8,s8,s10 map.bpos.boff += elength; 400144ac: 00dd0333 add t1,s10,a3 400144b0: 02612a23 sw t1,52(sp) while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE)) 400144b4: ff678793 addi a5,a5,-10 400144b8: 20f37263 bgeu t1,a5,400146bc if (ehash == hash) 400144bc: 009c4683 lbu a3,9(s8) *ino = rtems_rfs_dir_entry_ino (entry); 400144c0: 000c4783 lbu a5,0(s8) 400144c4: 001c4303 lbu t1,1(s8) 400144c8: 008c4f03 lbu t5,8(s8) ehash = rtems_rfs_dir_entry_hash (entry); 400144cc: 004c4703 lbu a4,4(s8) 400144d0: 005c4e83 lbu t4,5(s8) *ino = rtems_rfs_dir_entry_ino (entry); 400144d4: 003c4e03 lbu t3,3(s8) 400144d8: 002c4503 lbu a0,2(s8) 400144dc: 00869693 slli a3,a3,0x8 400144e0: 01031313 slli t1,t1,0x10 400144e4: 01e6e6b3 or a3,a3,t5 400144e8: 01879793 slli a5,a5,0x18 ehash = rtems_rfs_dir_entry_hash (entry); 400144ec: 007c4583 lbu a1,7(s8) 400144f0: 006c4603 lbu a2,6(s8) *ino = rtems_rfs_dir_entry_ino (entry); 400144f4: 0067e7b3 or a5,a5,t1 400144f8: 00869313 slli t1,a3,0x8 400144fc: 0086d693 srli a3,a3,0x8 40014500: 00d366b3 or a3,t1,a3 ehash = rtems_rfs_dir_entry_hash (entry); 40014504: 01871713 slli a4,a4,0x18 40014508: 010e9e93 slli t4,t4,0x10 *ino = rtems_rfs_dir_entry_ino (entry); 4001450c: 01c7e7b3 or a5,a5,t3 40014510: 00851513 slli a0,a0,0x8 40014514: 01069d13 slli s10,a3,0x10 40014518: 00a7e7b3 or a5,a5,a0 ehash = rtems_rfs_dir_entry_hash (entry); 4001451c: 01d76733 or a4,a4,t4 40014520: 00b76733 or a4,a4,a1 40014524: 00861693 slli a3,a2,0x8 *ino = rtems_rfs_dir_entry_ino (entry); 40014528: 00f42023 sw a5,0(s0) 4001452c: 010d5d13 srli s10,s10,0x10 ehash = rtems_rfs_dir_entry_hash (entry); 40014530: 00d76733 or a4,a4,a3 if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY) 40014534: 192d0463 beq s10,s2,400146bc if (rtems_rfs_dir_entry_valid (fs, elength, *ino)) 40014538: 09a4d863 bge s1,s10,400145c8 4001453c: 01cda683 lw a3,28(s11) 40014540: 08dd7463 bgeu s10,a3,400145c8 40014544: 08078263 beqz a5,400145c8 <== NEVER TAKEN 40014548: 014da683 lw a3,20(s11) 4001454c: 06f6ee63 bltu a3,a5,400145c8 if (ehash == hash) 40014550: f4e998e3 bne s3,a4,400144a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_CHECK)) 40014554: 08000537 lui a0,0x8000 40014558: 00000593 li a1,0 4001455c: bb1f50ef jal ra,4000a10c 40014560: 10051063 bnez a0,40014660 <== NEVER TAKEN if (memcmp (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length) == 0) 40014564: 00ac0513 addi a0,s8,10 40014568: 000a8613 mv a2,s5 4001456c: 000b0593 mv a1,s6 40014570: 309090ef jal ra,4001e078 40014574: f20516e3 bnez a0,400144a0 <== NEVER TAKEN *offset = rtems_rfs_block_map_pos (fs, &map); 40014578: 03010593 addi a1,sp,48 4001457c: 000d8513 mv a0,s11 40014580: f9dfe0ef jal ra,4001351c 40014584: 00c12783 lw a5,12(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND)) 40014588: 00000593 li a1,0 *offset = rtems_rfs_block_map_pos (fs, &map); 4001458c: 00a7a023 sw a0,0(a5) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND)) 40014590: 10000537 lui a0,0x10000 40014594: b79f50ef jal ra,4000a10c 40014598: 2a051e63 bnez a0,40014854 <== NEVER TAKEN rtems_rfs_buffer_handle_release (fs, handle); 4001459c: 01410593 addi a1,sp,20 400145a0: 000d8513 mv a0,s11 400145a4: a70f20ef jal ra,40006814 rtems_rfs_block_map_close (fs, &map); 400145a8: 02010593 addi a1,sp,32 400145ac: 000d8513 mv a0,s11 handle->dirty = false; 400145b0: 00010a23 sb zero,20(sp) handle->bnum = 0; 400145b4: 00012c23 sw zero,24(sp) handle->buffer = NULL; 400145b8: 00012e23 sw zero,28(sp) return 0; 400145bc: 00000a13 li s4,0 rtems_rfs_block_map_close (fs, &map); 400145c0: 98cff0ef jal ra,4001374c return 0; 400145c4: 03c0006f j 40014600 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 400145c8: 04000537 lui a0,0x4000 <== NOT EXECUTED 400145cc: 00000593 li a1,0 <== NOT EXECUTED 400145d0: b3df50ef jal ra,4000a10c <== NOT EXECUTED 400145d4: 06051663 bnez a0,40014640 <== NOT EXECUTED rc = EIO; 400145d8: 00500a13 li s4,5 <== NOT EXECUTED rtems_rfs_buffer_handle_release (fs, handle); 400145dc: 01410593 addi a1,sp,20 400145e0: 000d8513 mv a0,s11 400145e4: a30f20ef jal ra,40006814 rtems_rfs_inode_ino (inode), rc, strerror (rc)); } } rtems_rfs_buffer_handle_close (fs, &entries); rtems_rfs_block_map_close (fs, &map); 400145e8: 02010593 addi a1,sp,32 400145ec: 000d8513 mv a0,s11 handle->dirty = false; 400145f0: 00010a23 sb zero,20(sp) handle->bnum = 0; 400145f4: 00012c23 sw zero,24(sp) handle->buffer = NULL; 400145f8: 00012e23 sw zero,28(sp) 400145fc: 950ff0ef jal ra,4001374c return rc; } 40014600: 0ac12083 lw ra,172(sp) 40014604: 0a812403 lw s0,168(sp) 40014608: 0a412483 lw s1,164(sp) 4001460c: 0a012903 lw s2,160(sp) 40014610: 09c12983 lw s3,156(sp) 40014614: 09412a83 lw s5,148(sp) 40014618: 09012b03 lw s6,144(sp) 4001461c: 08c12b83 lw s7,140(sp) 40014620: 08812c03 lw s8,136(sp) 40014624: 08412c83 lw s9,132(sp) 40014628: 08012d03 lw s10,128(sp) 4001462c: 07c12d83 lw s11,124(sp) 40014630: 000a0513 mv a0,s4 40014634: 09812a03 lw s4,152(sp) 40014638: 0b010113 addi sp,sp,176 4001463c: 00008067 ret printf ("rtems-rfs: dir-lookup-ino: " 40014640: 03412703 lw a4,52(sp) <== NOT EXECUTED 40014644: 00042683 lw a3,0(s0) <== NOT EXECUTED 40014648: 008ba583 lw a1,8(s7) <== NOT EXECUTED 4001464c: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014650: 000d0613 mv a2,s10 <== NOT EXECUTED 40014654: 07850513 addi a0,a0,120 # 40023078 <== NOT EXECUTED 40014658: ba0ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 4001465c: f7dff06f j 400145d8 <== NOT EXECUTED elength, rtems_rfs_dir_entry_ino (entry)); 40014660: 000c4783 lbu a5,0(s8) <== NOT EXECUTED 40014664: 001c4503 lbu a0,1(s8) <== NOT EXECUTED 40014668: 003c4e03 lbu t3,3(s8) <== NOT EXECUTED 4001466c: 002c4703 lbu a4,2(s8) <== NOT EXECUTED 40014670: 01051513 slli a0,a0,0x10 <== NOT EXECUTED 40014674: 01879793 slli a5,a5,0x18 <== NOT EXECUTED 40014678: 00a7e7b3 or a5,a5,a0 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: " 4001467c: 03412683 lw a3,52(sp) <== NOT EXECUTED 40014680: 03012603 lw a2,48(sp) <== NOT EXECUTED 40014684: 008ba583 lw a1,8(s7) <== NOT EXECUTED 40014688: 01c7e7b3 or a5,a5,t3 <== NOT EXECUTED elength, rtems_rfs_dir_entry_ino (entry)); 4001468c: 00871713 slli a4,a4,0x8 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: " 40014690: 00e7e7b3 or a5,a5,a4 <== NOT EXECUTED 40014694: 0c0c8513 addi a0,s9,192 # 400230c0 <== NOT EXECUTED 40014698: 000d0713 mv a4,s10 <== NOT EXECUTED 4001469c: b5ced0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 400146a0: ec5ff06f j 40014564 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " bno=%" PRId32 "\n", 400146a4: 03012603 lw a2,48(sp) <== NOT EXECUTED 400146a8: 008ba583 lw a1,8(s7) <== NOT EXECUTED 400146ac: 400237b7 lui a5,0x40023 <== NOT EXECUTED 400146b0: 00078513 mv a0,a5 <== NOT EXECUTED 400146b4: b44ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 400146b8: db5ff06f j 4001446c <== NOT EXECUTED if (rc == 0) 400146bc: f20a10e3 bnez s4,400145dc <== NEVER TAKEN rc = rtems_rfs_block_map_next_block (fs, &map, &block); 400146c0: 01010613 addi a2,sp,16 400146c4: 02010593 addi a1,sp,32 400146c8: 000d8513 mv a0,s11 400146cc: c88ff0ef jal ra,40013b54 400146d0: 00050a13 mv s4,a0 if ((rc > 0) && (rc != ENXIO)) 400146d4: d6a05ee3 blez a0,40014450 <== NEVER TAKEN 400146d8: 00600793 li a5,6 400146dc: 0af51263 bne a0,a5,40014780 rc = ENOENT; 400146e0: 00200a13 li s4,2 400146e4: ef9ff06f j 400145dc if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 400146e8: 04000537 lui a0,0x4000 <== NOT EXECUTED 400146ec: 00000593 li a1,0 <== NOT EXECUTED 400146f0: a1df50ef jal ra,4000a10c <== NOT EXECUTED 400146f4: f00506e3 beqz a0,40014600 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: map open failed for ino %" PRIu32 ": %d: %s", 400146f8: 008ba403 lw s0,8(s7) <== NOT EXECUTED 400146fc: 000a0513 mv a0,s4 <== NOT EXECUTED 40014700: 0650a0ef jal ra,4001ef64 <== NOT EXECUTED 40014704: 00050693 mv a3,a0 <== NOT EXECUTED 40014708: 40023537 lui a0,0x40023 <== NOT EXECUTED 4001470c: 000a0613 mv a2,s4 <== NOT EXECUTED 40014710: 00040593 mv a1,s0 <== NOT EXECUTED 40014714: f8450513 addi a0,a0,-124 # 40022f84 <== NOT EXECUTED 40014718: ae0ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 4001471c: ee5ff06f j 40014600 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: lookup ino: root=%" PRId32 ", path=", 40014720: 008ba583 lw a1,8(s7) <== NOT EXECUTED 40014724: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014728: f4050513 addi a0,a0,-192 # 40022f40 <== NOT EXECUTED 4001472c: acced0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED for (c = 0; c < length; c++) 40014730: 01505e63 blez s5,4001474c <== NOT EXECUTED 40014734: 000b0493 mv s1,s6 <== NOT EXECUTED 40014738: 016a8933 add s2,s5,s6 <== NOT EXECUTED printf ("%c", name[c]); 4001473c: 0004c503 lbu a0,0(s1) <== NOT EXECUTED for (c = 0; c < length; c++) 40014740: 00148493 addi s1,s1,1 <== NOT EXECUTED printf ("%c", name[c]); 40014744: 4d1090ef jal ra,4001e414 <== NOT EXECUTED for (c = 0; c < length; c++) 40014748: fe991ae3 bne s2,s1,4001473c <== NOT EXECUTED printf (", len=%d\n", length); 4001474c: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014750: 000a8593 mv a1,s5 <== NOT EXECUTED 40014754: f7850513 addi a0,a0,-136 # 40022f78 <== NOT EXECUTED 40014758: aa0ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 4001475c: c85ff06f j 400143e0 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 40014760: 04000537 lui a0,0x4000 <== NOT EXECUTED 40014764: 00000593 li a1,0 <== NOT EXECUTED 40014768: 9a5f50ef jal ra,4000a10c <== NOT EXECUTED 4001476c: 0c051463 bnez a0,40014834 <== NOT EXECUTED if (rc == ENXIO) 40014770: 00600793 li a5,6 <== NOT EXECUTED 40014774: e6fa14e3 bne s4,a5,400145dc <== NOT EXECUTED rc = ENOENT; 40014778: 00200a13 li s4,2 <== NOT EXECUTED 4001477c: e61ff06f j 400145dc <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 40014780: 04000537 lui a0,0x4000 <== NOT EXECUTED 40014784: 00000593 li a1,0 <== NOT EXECUTED 40014788: 985f50ef jal ra,4000a10c <== NOT EXECUTED 4001478c: cc0502e3 beqz a0,40014450 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: " 40014790: 008bad03 lw s10,8(s7) <== NOT EXECUTED 40014794: 000a0513 mv a0,s4 <== NOT EXECUTED 40014798: 7cc0a0ef jal ra,4001ef64 <== NOT EXECUTED 4001479c: 400237b7 lui a5,0x40023 <== NOT EXECUTED 400147a0: 00050693 mv a3,a0 <== NOT EXECUTED 400147a4: 000a0613 mv a2,s4 <== NOT EXECUTED 400147a8: 000d0593 mv a1,s10 <== NOT EXECUTED 400147ac: 16078513 addi a0,a5,352 # 40023160 <== NOT EXECUTED 400147b0: a48ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if (rc == ENXIO) 400147b4: c9dff06f j 40014450 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 400147b8: 04000537 lui a0,0x4000 <== NOT EXECUTED 400147bc: 00000593 li a1,0 <== NOT EXECUTED 400147c0: 94df50ef jal ra,4000a10c <== NOT EXECUTED 400147c4: e0050ae3 beqz a0,400145d8 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: block is 0 in ino %" PRIu32 ": %d: %s\n", 400147c8: 008ba403 lw s0,8(s7) <== NOT EXECUTED 400147cc: 00500513 li a0,5 <== NOT EXECUTED 400147d0: 7940a0ef jal ra,4001ef64 <== NOT EXECUTED 400147d4: 00050693 mv a3,a0 <== NOT EXECUTED 400147d8: 40023537 lui a0,0x40023 <== NOT EXECUTED 400147dc: 00500613 li a2,5 <== NOT EXECUTED 400147e0: 00040593 mv a1,s0 <== NOT EXECUTED 400147e4: 1ac50513 addi a0,a0,428 # 400231ac <== NOT EXECUTED 400147e8: a10ed0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED rc = EIO; 400147ec: 00500a13 li s4,5 <== NOT EXECUTED 400147f0: dedff06f j 400145dc <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO)) 400147f4: 04000537 lui a0,0x4000 <== NOT EXECUTED 400147f8: 00000593 li a1,0 <== NOT EXECUTED 400147fc: 911f50ef jal ra,4000a10c <== NOT EXECUTED 40014800: dc050ee3 beqz a0,400145dc <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: block read, ino=%" PRIu32 " block=%" PRId32 ": %d: %s\n", 40014804: 008ba403 lw s0,8(s7) <== NOT EXECUTED 40014808: 01012483 lw s1,16(sp) <== NOT EXECUTED 4001480c: 000a0513 mv a0,s4 <== NOT EXECUTED 40014810: 7540a0ef jal ra,4001ef64 <== NOT EXECUTED 40014814: 00050713 mv a4,a0 <== NOT EXECUTED 40014818: 40023537 lui a0,0x40023 <== NOT EXECUTED 4001481c: 000a0693 mv a3,s4 <== NOT EXECUTED 40014820: 00048613 mv a2,s1 <== NOT EXECUTED 40014824: 00040593 mv a1,s0 <== NOT EXECUTED 40014828: 03850513 addi a0,a0,56 # 40023038 <== NOT EXECUTED 4001482c: 9cced0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014830: dadff06f j 400145dc <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: block map find failed: %d: %s\n", 40014834: 000a0513 mv a0,s4 <== NOT EXECUTED 40014838: 72c0a0ef jal ra,4001ef64 <== NOT EXECUTED 4001483c: 00050613 mv a2,a0 <== NOT EXECUTED 40014840: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014844: 000a0593 mv a1,s4 <== NOT EXECUTED 40014848: fc450513 addi a0,a0,-60 # 40022fc4 <== NOT EXECUTED 4001484c: 9aced0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014850: f21ff06f j 40014770 <== NOT EXECUTED printf ("rtems-rfs: dir-lookup-ino: " 40014854: 00c12783 lw a5,12(sp) <== NOT EXECUTED 40014858: 00042603 lw a2,0(s0) <== NOT EXECUTED 4001485c: 008ba583 lw a1,8(s7) <== NOT EXECUTED 40014860: 0007a683 lw a3,0(a5) <== NOT EXECUTED 40014864: 40023537 lui a0,0x40023 <== NOT EXECUTED 40014868: 11c50513 addi a0,a0,284 # 4002311c <== NOT EXECUTED 4001486c: 98ced0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40014870: d2dff06f j 4001459c <== NOT EXECUTED =============================================================================== 400150c0 : rtems_rfs_dir_read (rtems_rfs_file_system* fs, rtems_rfs_inode_handle* dir, rtems_rfs_pos_rel offset, struct dirent* dirent, size_t* length) { 400150c0: f5010113 addi sp,sp,-176 400150c4: 0a912223 sw s1,164(sp) 400150c8: 09512a23 sw s5,148(sp) 400150cc: 00050493 mv s1,a0 400150d0: 00058a93 mv s5,a1 rtems_rfs_block_map map; rtems_rfs_buffer_handle buffer; rtems_rfs_block_no block; int rc; if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 400150d4: 80000537 lui a0,0x80000 400150d8: 00000593 li a1,0 { 400150dc: 0b212023 sw s2,160(sp) 400150e0: 09312e23 sw s3,156(sp) 400150e4: 09412c23 sw s4,152(sp) 400150e8: 09a12023 sw s10,128(sp) 400150ec: 0a112623 sw ra,172(sp) 400150f0: 0a812423 sw s0,168(sp) 400150f4: 09612823 sw s6,144(sp) 400150f8: 09712623 sw s7,140(sp) 400150fc: 09812423 sw s8,136(sp) 40015100: 09912223 sw s9,132(sp) 40015104: 07b12e23 sw s11,124(sp) 40015108: 00060993 mv s3,a2 4001510c: 00068a13 mv s4,a3 40015110: 00070d13 mv s10,a4 40015114: 00078913 mv s2,a5 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 40015118: ff5f40ef jal ra,4000a10c 4001511c: 1e051c63 bnez a0,40015314 <== NEVER TAKEN printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n", rtems_rfs_inode_ino (dir), offset); *length = 0; 40015120: 00092023 sw zero,0(s2) rc = rtems_rfs_block_map_open (fs, dir, &map); 40015124: 02010613 addi a2,sp,32 40015128: 000a8593 mv a1,s5 4001512c: 00048513 mv a0,s1 40015130: c48fe0ef jal ra,40013578 40015134: 00050413 mv s0,a0 if (rc > 0) 40015138: 14a04663 bgtz a0,40015284 <== NEVER TAKEN return rc; if (((rtems_rfs_fs_block_size (fs) - 4001513c: 0084a403 lw s0,8(s1) (offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE)) 40015140: 00000693 li a3,0 40015144: 00098513 mv a0,s3 40015148: 00040613 mv a2,s0 4001514c: 000a0593 mv a1,s4 40015150: 185070ef jal ra,4001cad4 <__moddi3> if (((rtems_rfs_fs_block_size (fs) - 40015154: 40a40533 sub a0,s0,a0 40015158: 00a437b3 sltu a5,s0,a0 4001515c: 40b005b3 neg a1,a1 40015160: 40f585b3 sub a1,a1,a5 40015164: 16b05063 blez a1,400152c4 <== ALWAYS TAKEN offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) * rtems_rfs_fs_block_size (fs)); rc = rtems_rfs_block_map_seek (fs, &map, offset, &block); 40015168: 01010713 addi a4,sp,16 4001516c: 00098613 mv a2,s3 40015170: 000a0693 mv a3,s4 40015174: 02010593 addi a1,sp,32 40015178: 00048513 mv a0,s1 4001517c: 911fe0ef jal ra,40013a8c 40015180: 00050413 mv s0,a0 if (rc > 0) 40015184: 16a04c63 bgtz a0,400152fc <== NEVER TAKEN entry += map.bpos.boff; elength = rtems_rfs_dir_entry_length (entry); eino = rtems_rfs_dir_entry_ino (entry); if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY) 40015188: 00010c37 lui s8,0x10 handle->dirty = false; 4001518c: 00010a23 sb zero,20(sp) handle->bnum = 0; 40015190: 00012c23 sw zero,24(sp) handle->buffer = NULL; 40015194: 00012e23 sw zero,28(sp) 40015198: fffc0c13 addi s8,s8,-1 # ffff break; } *length += rtems_rfs_fs_block_size (fs) - map.bpos.boff; if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 4001519c: 80000b37 lui s6,0x80000 400151a0: 00000b93 li s7,0 printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n", 400151a4: 40023db7 lui s11,0x40023 offset, *length); rc = rtems_rfs_block_map_next_block (fs, &map, &block); if (rc == ENXIO) 400151a8: 00600c93 li s9,6 400151ac: 0200006f j 400151cc rc = rtems_rfs_block_map_next_block (fs, &map, &block); 400151b0: 01010613 addi a2,sp,16 400151b4: 02010593 addi a1,sp,32 400151b8: 00048513 mv a0,s1 400151bc: 999fe0ef jal ra,40013b54 400151c0: 00050413 mv s0,a0 if (rc == ENXIO) 400151c4: 09950c63 beq a0,s9,4001525c while (rc == 0) 400151c8: 08051c63 bnez a0,40015260 <== NOT EXECUTED rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true); 400151cc: 01012603 lw a2,16(sp) 400151d0: 01410593 addi a1,sp,20 400151d4: 00100693 li a3,1 400151d8: 00048513 mv a0,s1 400151dc: ba0f10ef jal ra,4000657c 400151e0: 00050413 mv s0,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 400151e4: 000b8593 mv a1,s7 400151e8: 000b0513 mv a0,s6 if (rc > 0) 400151ec: 06804a63 bgtz s0,40015260 <== NEVER TAKEN entry = rtems_rfs_buffer_data (&buffer); 400151f0: 01c12783 lw a5,28(sp) entry += map.bpos.boff; 400151f4: 03412683 lw a3,52(sp) entry = rtems_rfs_buffer_data (&buffer); 400151f8: 01c7a883 lw a7,28(a5) entry += map.bpos.boff; 400151fc: 00d888b3 add a7,a7,a3 elength = rtems_rfs_dir_entry_length (entry); 40015200: 0098c783 lbu a5,9(a7) 40015204: 0088c703 lbu a4,8(a7) 40015208: 00879793 slli a5,a5,0x8 4001520c: 00e7e7b3 or a5,a5,a4 40015210: 00879713 slli a4,a5,0x8 40015214: 0087d793 srli a5,a5,0x8 40015218: 00f767b3 or a5,a4,a5 4001521c: 01079793 slli a5,a5,0x10 40015220: 0107d793 srli a5,a5,0x10 if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY) 40015224: 13879063 bne a5,s8,40015344 *length += rtems_rfs_fs_block_size (fs) - map.bpos.boff; 40015228: 0084a703 lw a4,8(s1) 4001522c: 00092783 lw a5,0(s2) 40015230: 40d70733 sub a4,a4,a3 40015234: 00e787b3 add a5,a5,a4 40015238: 00f92023 sw a5,0(s2) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 4001523c: ed1f40ef jal ra,4000a10c 40015240: f60508e3 beqz a0,400151b0 <== ALWAYS TAKEN printf ("rtems-rfs: dir-read: next block: off:%" PRId64 " length:%zd\n", 40015244: 00092703 lw a4,0(s2) <== NOT EXECUTED 40015248: 00098613 mv a2,s3 <== NOT EXECUTED 4001524c: 000a0693 mv a3,s4 <== NOT EXECUTED 40015250: 550d8513 addi a0,s11,1360 # 40023550 <== NOT EXECUTED 40015254: fa4ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40015258: f59ff06f j 400151b0 <== NOT EXECUTED rc = ENOENT; 4001525c: 00200413 li s0,2 rtems_rfs_buffer_handle_release (fs, handle); 40015260: 01410593 addi a1,sp,20 40015264: 00048513 mv a0,s1 40015268: dacf10ef jal ra,40006814 } rtems_rfs_buffer_handle_close (fs, &buffer); rtems_rfs_block_map_close (fs, &map); 4001526c: 02010593 addi a1,sp,32 40015270: 00048513 mv a0,s1 handle->dirty = false; 40015274: 00010a23 sb zero,20(sp) handle->bnum = 0; 40015278: 00012c23 sw zero,24(sp) handle->buffer = NULL; 4001527c: 00012e23 sw zero,28(sp) 40015280: cccfe0ef jal ra,4001374c return rc; } 40015284: 0ac12083 lw ra,172(sp) 40015288: 00040513 mv a0,s0 4001528c: 0a812403 lw s0,168(sp) 40015290: 0a412483 lw s1,164(sp) 40015294: 0a012903 lw s2,160(sp) 40015298: 09c12983 lw s3,156(sp) 4001529c: 09812a03 lw s4,152(sp) 400152a0: 09412a83 lw s5,148(sp) 400152a4: 09012b03 lw s6,144(sp) 400152a8: 08c12b83 lw s7,140(sp) 400152ac: 08812c03 lw s8,136(sp) 400152b0: 08412c83 lw s9,132(sp) 400152b4: 08012d03 lw s10,128(sp) 400152b8: 07c12d83 lw s11,124(sp) 400152bc: 0b010113 addi sp,sp,176 400152c0: 00008067 ret if (((rtems_rfs_fs_block_size (fs) - 400152c4: 06058663 beqz a1,40015330 <== ALWAYS TAKEN offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) * 400152c8: 00098513 mv a0,s3 <== NOT EXECUTED 400152cc: 000a0593 mv a1,s4 <== NOT EXECUTED 400152d0: 00040613 mv a2,s0 <== NOT EXECUTED 400152d4: 00000693 li a3,0 <== NOT EXECUTED 400152d8: 310070ef jal ra,4001c5e8 <__divdi3> <== NOT EXECUTED 400152dc: 00150993 addi s3,a0,1 # 80000001 <== NOT EXECUTED 400152e0: 00a9b533 sltu a0,s3,a0 <== NOT EXECUTED 400152e4: 00b50533 add a0,a0,a1 <== NOT EXECUTED 400152e8: 03343a33 mulhu s4,s0,s3 <== NOT EXECUTED 400152ec: 02850533 mul a0,a0,s0 <== NOT EXECUTED 400152f0: 033409b3 mul s3,s0,s3 <== NOT EXECUTED 400152f4: 01450a33 add s4,a0,s4 <== NOT EXECUTED 400152f8: e71ff06f j 40015168 <== NOT EXECUTED if (rc == ENXIO) 400152fc: 00600793 li a5,6 <== NOT EXECUTED 40015300: 02f50e63 beq a0,a5,4001533c <== NOT EXECUTED rtems_rfs_block_map_close (fs, &map); 40015304: 02010593 addi a1,sp,32 <== NOT EXECUTED 40015308: 00048513 mv a0,s1 <== NOT EXECUTED 4001530c: c40fe0ef jal ra,4001374c <== NOT EXECUTED return rc; 40015310: f75ff06f j 40015284 <== NOT EXECUTED printf ("rtems-rfs: dir-read: dir=%" PRId32 " offset=%" PRId64 "\n", 40015314: 008aa583 lw a1,8(s5) <== NOT EXECUTED 40015318: 40023537 lui a0,0x40023 <== NOT EXECUTED 4001531c: 00098613 mv a2,s3 <== NOT EXECUTED 40015320: 000a0693 mv a3,s4 <== NOT EXECUTED 40015324: 4a850513 addi a0,a0,1192 # 400234a8 <== NOT EXECUTED 40015328: ed0ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 4001532c: df5ff06f j 40015120 <== NOT EXECUTED if (((rtems_rfs_fs_block_size (fs) - 40015330: 00a00793 li a5,10 40015334: e2a7eae3 bltu a5,a0,40015168 40015338: f91ff06f j 400152c8 <== NOT EXECUTED rc = ENOENT; 4001533c: 00200413 li s0,2 <== NOT EXECUTED 40015340: fc5ff06f j 40015304 <== NOT EXECUTED eino = rtems_rfs_dir_entry_ino (entry); 40015344: 0008c683 lbu a3,0(a7) 40015348: 0018c703 lbu a4,1(a7) 4001534c: 0038c603 lbu a2,3(a7) 40015350: 0028c983 lbu s3,2(a7) 40015354: 01869693 slli a3,a3,0x18 40015358: 01071713 slli a4,a4,0x10 4001535c: 00e6e6b3 or a3,a3,a4 40015360: 00c6e6b3 or a3,a3,a2 40015364: 00899993 slli s3,s3,0x8 if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40015368: 00a00a13 li s4,10 eino = rtems_rfs_dir_entry_ino (entry); 4001536c: 0136e9b3 or s3,a3,s3 if (rtems_rfs_dir_entry_valid (fs, elength, eino)) 40015370: 10fa5863 bge s4,a5,40015480 40015374: 01c4a703 lw a4,28(s1) 40015378: 10e7f463 bgeu a5,a4,40015480 4001537c: 10098263 beqz s3,40015480 <== NEVER TAKEN 40015380: 0144a703 lw a4,20(s1) 40015384: 0f376e63 bltu a4,s3,40015480 memset (dirent, 0, sizeof (struct dirent)); 40015388: 11800613 li a2,280 4001538c: 00000593 li a1,0 40015390: 000d0513 mv a0,s10 40015394: 00f12623 sw a5,12(sp) 40015398: 01112423 sw a7,8(sp) 4001539c: 79d080ef jal ra,4001e338 dirent->d_off = rtems_rfs_block_get_pos (fs, &map.bpos); 400153a0: 03010593 addi a1,sp,48 400153a4: 00048513 mv a0,s1 400153a8: 974fe0ef jal ra,4001351c *length += elength; 400153ac: 00092683 lw a3,0(s2) 400153b0: 00c12783 lw a5,12(sp) dirent->d_reclen = sizeof (struct dirent); 400153b4: 11800713 li a4,280 400153b8: 00ed1823 sh a4,16(s10) dirent->d_off = rtems_rfs_block_get_pos (fs, &map.bpos); 400153bc: 00ad2423 sw a0,8(s10) *length += elength; 400153c0: 00d78733 add a4,a5,a3 dirent->d_off = rtems_rfs_block_get_pos (fs, &map.bpos); 400153c4: 00bd2623 sw a1,12(s10) *length += elength; 400153c8: 00e92023 sw a4,0(s2) remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength); 400153cc: 03412603 lw a2,52(sp) 400153d0: 0084a703 lw a4,8(s1) if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE) 400153d4: 00812883 lw a7,8(sp) 400153d8: 40c70733 sub a4,a4,a2 remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength); 400153dc: 40f70633 sub a2,a4,a5 if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE) 400153e0: 00ca4663 blt s4,a2,400153ec *length += remaining; 400153e4: 00d70733 add a4,a4,a3 <== NOT EXECUTED 400153e8: 00e92023 sw a4,0(s2) <== NOT EXECUTED elength -= RTEMS_RFS_DIR_ENTRY_SIZE; 400153ec: ff678913 addi s2,a5,-10 if (elength > NAME_MAX) 400153f0: 0ff00793 li a5,255 400153f4: 0127d463 bge a5,s2,400153fc 400153f8: 0ff00913 li s2,255 <== NOT EXECUTED memcpy (dirent->d_name, entry + RTEMS_RFS_DIR_ENTRY_SIZE, elength); 400153fc: 016d0993 addi s3,s10,22 40015400: 00a88593 addi a1,a7,10 40015404: 00090613 mv a2,s2 40015408: 00098513 mv a0,s3 4001540c: 01112423 sw a7,8(sp) 40015410: 4e1080ef jal ra,4001e0f0 dirent->d_ino = rtems_rfs_dir_entry_ino (entry); 40015414: 00812883 lw a7,8(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 40015418: 80000537 lui a0,0x80000 4001541c: 00000593 li a1,0 dirent->d_ino = rtems_rfs_dir_entry_ino (entry); 40015420: 0008c783 lbu a5,0(a7) 40015424: 0018c683 lbu a3,1(a7) 40015428: 0038c603 lbu a2,3(a7) 4001542c: 0028c703 lbu a4,2(a7) 40015430: 01879793 slli a5,a5,0x18 40015434: 01069693 slli a3,a3,0x10 40015438: 00d7e7b3 or a5,a5,a3 4001543c: 00c7e7b3 or a5,a5,a2 40015440: 00871713 slli a4,a4,0x8 40015444: 00e7e7b3 or a5,a5,a4 40015448: 00fd2023 sw a5,0(s10) 4001544c: 000d2223 sw zero,4(s10) dirent->d_namlen = elength; 40015450: 012d1a23 sh s2,20(s10) if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 40015454: cb9f40ef jal ra,4000a10c 40015458: e00504e3 beqz a0,40015260 <== ALWAYS TAKEN printf ("rtems-rfs: dir-read: found off:%" PRIooff_t 4001545c: 000d2703 lw a4,0(s10) <== NOT EXECUTED 40015460: 004d2783 lw a5,4(s10) <== NOT EXECUTED 40015464: 008d2603 lw a2,8(s10) <== NOT EXECUTED 40015468: 00cd2683 lw a3,12(s10) <== NOT EXECUTED 4001546c: 40023537 lui a0,0x40023 <== NOT EXECUTED 40015470: 00098813 mv a6,s3 <== NOT EXECUTED 40015474: 51850513 addi a0,a0,1304 # 40023518 <== NOT EXECUTED 40015478: d80ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 4001547c: de5ff06f j 40015260 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 40015480: 80000537 lui a0,0x80000 <== NOT EXECUTED 40015484: 00000593 li a1,0 <== NOT EXECUTED 40015488: 00f12423 sw a5,8(sp) <== NOT EXECUTED 4001548c: c81f40ef jal ra,4000a10c <== NOT EXECUTED 40015490: 00812783 lw a5,8(sp) <== NOT EXECUTED rc = EIO; 40015494: 00500413 li s0,5 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_READ)) 40015498: dc0504e3 beqz a0,40015260 <== NOT EXECUTED printf ("rtems-rfs: dir-read: " 4001549c: 03412703 lw a4,52(sp) <== NOT EXECUTED 400154a0: 008aa583 lw a1,8(s5) <== NOT EXECUTED 400154a4: 40023537 lui a0,0x40023 <== NOT EXECUTED 400154a8: 00098693 mv a3,s3 <== NOT EXECUTED 400154ac: 00078613 mv a2,a5 <== NOT EXECUTED 400154b0: 4d450513 addi a0,a0,1236 # 400234d4 <== NOT EXECUTED 400154b4: d44ec0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 400154b8: da9ff06f j 40015260 <== NOT EXECUTED =============================================================================== 40015ce4 : { 40015ce4: fe010113 addi sp,sp,-32 40015ce8: 00812c23 sw s0,24(sp) 40015cec: 01212823 sw s2,16(sp) 40015cf0: 00058413 mv s0,a1 40015cf4: 00050913 mv s2,a0 if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE)) 40015cf8: 01000593 li a1,16 40015cfc: 00000513 li a0,0 { 40015d00: 00112e23 sw ra,28(sp) 40015d04: 00912a23 sw s1,20(sp) 40015d08: 01312623 sw s3,12(sp) 40015d0c: 01412423 sw s4,8(sp) 40015d10: 01512223 sw s5,4(sp) if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE)) 40015d14: bf8f40ef jal ra,4000a10c 40015d18: 1c051063 bnez a0,40015ed8 <== NEVER TAKEN if (handle->shared->references > 0) 40015d1c: 01c42583 lw a1,28(s0) 40015d20: 0085a483 lw s1,8(a1) 40015d24: 00905663 blez s1,40015d30 <== NEVER TAKEN handle->shared->references--; 40015d28: fff48493 addi s1,s1,-1 40015d2c: 0095a423 sw s1,8(a1) rc = rtems_rfs_buffer_handle_close (fs, &handle->buffer); 40015d30: 00440a13 addi s4,s0,4 if (handle->shared->references == 0) 40015d34: 04048263 beqz s1,40015d78 <== ALWAYS TAKEN 40015d38: 000a0593 mv a1,s4 <== NOT EXECUTED 40015d3c: 00090513 mv a0,s2 <== NOT EXECUTED 40015d40: ad5f00ef jal ra,40006814 <== NOT EXECUTED rrc = 0; 40015d44: 00000493 li s1,0 <== NOT EXECUTED free (handle); 40015d48: 00040513 mv a0,s0 40015d4c: 83cec0ef jal ra,40001d88 } 40015d50: 01c12083 lw ra,28(sp) 40015d54: 01812403 lw s0,24(sp) 40015d58: 01012903 lw s2,16(sp) 40015d5c: 00c12983 lw s3,12(sp) 40015d60: 00812a03 lw s4,8(sp) 40015d64: 00412a83 lw s5,4(sp) 40015d68: 00048513 mv a0,s1 40015d6c: 01412483 lw s1,20(sp) 40015d70: 02010113 addi sp,sp,32 40015d74: 00008067 ret if (!rtems_rfs_inode_is_loaded (&handle->shared->inode)) 40015d78: 0185a703 lw a4,24(a1) 40015d7c: 1c070e63 beqz a4,40015f58 <== ALWAYS TAKEN rtems_rfs_inode_set_atime (&handle->shared->inode, 40015d80: 08c5a783 lw a5,140(a1) rtems_rfs_buffer_mark_dirty (&handle->buffer); 40015d84: 00100693 li a3,1 rtems_rfs_write_u32 (&handle->node->atime, atime); 40015d88: 0187d613 srli a2,a5,0x18 40015d8c: 00c70823 sb a2,16(a4) 40015d90: 0185a703 lw a4,24(a1) 40015d94: 0107d513 srli a0,a5,0x10 40015d98: 0087d613 srli a2,a5,0x8 40015d9c: 00a708a3 sb a0,17(a4) 40015da0: 0185a703 lw a4,24(a1) 40015da4: 00c70923 sb a2,18(a4) 40015da8: 0185a703 lw a4,24(a1) 40015dac: 00f709a3 sb a5,19(a4) rtems_rfs_inode_set_mtime (&handle->shared->inode, 40015db0: 01c42703 lw a4,28(s0) rtems_rfs_buffer_mark_dirty (&handle->buffer); 40015db4: 00d58e23 sb a3,28(a1) 40015db8: 09072783 lw a5,144(a4) rtems_rfs_write_u32 (&handle->node->mtime, mtime); 40015dbc: 01872603 lw a2,24(a4) 40015dc0: 0187d593 srli a1,a5,0x18 40015dc4: 00b60a23 sb a1,20(a2) 40015dc8: 01872603 lw a2,24(a4) 40015dcc: 0107d513 srli a0,a5,0x10 40015dd0: 0087d593 srli a1,a5,0x8 40015dd4: 00a60aa3 sb a0,21(a2) 40015dd8: 01872603 lw a2,24(a4) 40015ddc: 00b60b23 sb a1,22(a2) 40015de0: 01872603 lw a2,24(a4) 40015de4: 00f60ba3 sb a5,23(a2) rtems_rfs_inode_set_ctime (&handle->shared->inode, 40015de8: 01c42783 lw a5,28(s0) rtems_rfs_buffer_mark_dirty (&handle->buffer); 40015dec: 00d70e23 sb a3,28(a4) 40015df0: 0947a703 lw a4,148(a5) rtems_rfs_write_u32 (&handle->node->ctime, ctime); 40015df4: 0187a603 lw a2,24(a5) 40015df8: 01875593 srli a1,a4,0x18 40015dfc: 00b60c23 sb a1,24(a2) 40015e00: 0187a603 lw a2,24(a5) 40015e04: 01075513 srli a0,a4,0x10 40015e08: 00875593 srli a1,a4,0x8 40015e0c: 00a60ca3 sb a0,25(a2) 40015e10: 0187a603 lw a2,24(a5) 40015e14: 00b60d23 sb a1,26(a2) 40015e18: 0187a603 lw a2,24(a5) 40015e1c: 00e60da3 sb a4,27(a2) if (!rtems_rfs_block_size_equal (&handle->shared->size, 40015e20: 01c42583 lw a1,28(s0) rtems_rfs_buffer_mark_dirty (&handle->buffer); 40015e24: 00d78e23 sb a3,28(a5) 40015e28: 0845a783 lw a5,132(a1) 40015e2c: 03c5a703 lw a4,60(a1) 40015e30: 1ae78063 beq a5,a4,40015fd0 40015e34: 0885a703 lw a4,136(a1) <== NOT EXECUTED */ static inline void rtems_rfs_block_map_set_size (rtems_rfs_block_map* map, rtems_rfs_block_size* size) { rtems_rfs_block_copy_size (&map->size, size); 40015e38: 02f5ae23 sw a5,60(a1) <== NOT EXECUTED map->dirty = true; 40015e3c: 00100793 li a5,1 <== NOT EXECUTED rtems_rfs_block_copy_size (&map->size, size); 40015e40: 04e5a023 sw a4,64(a1) <== NOT EXECUTED map->dirty = true; 40015e44: 02f58a23 sb a5,52(a1) <== NOT EXECUTED rc = rtems_rfs_block_map_close (fs, &handle->shared->map); 40015e48: 03458593 addi a1,a1,52 40015e4c: 00090513 mv a0,s2 40015e50: 8fdfd0ef jal ra,4001374c 40015e54: 00050993 mv s3,a0 if (rc > 0) 40015e58: 0ea04263 bgtz a0,40015f3c <== NEVER TAKEN rc = rtems_rfs_inode_close (fs, &handle->shared->inode); 40015e5c: 01c42583 lw a1,28(s0) 40015e60: 00090513 mv a0,s2 40015e64: 00c58593 addi a1,a1,12 40015e68: e44f20ef jal ra,400084ac 40015e6c: 00050993 mv s3,a0 if (rc > 0) 40015e70: 08a04063 bgtz a0,40015ef0 <== NEVER TAKEN rtems_chain_extract_unprotected (&handle->shared->link); 40015e74: 01c42503 lw a0,28(s0) next = the_node->next; 40015e78: 00052703 lw a4,0(a0) previous = the_node->previous; 40015e7c: 00452783 lw a5,4(a0) next->previous = previous; 40015e80: 00f72223 sw a5,4(a4) previous->next = next; 40015e84: 00e7a023 sw a4,0(a5) free (handle->shared); 40015e88: f01eb0ef jal ra,40001d88 40015e8c: 000a0593 mv a1,s4 40015e90: 00090513 mv a0,s2 40015e94: 981f00ef jal ra,40006814 handle->dirty = false; 40015e98: 00040223 sb zero,4(s0) handle->bnum = 0; 40015e9c: 00042423 sw zero,8(s0) handle->buffer = NULL; 40015ea0: 00042623 sw zero,12(s0) if (rrc > 0) 40015ea4: ea9052e3 blez s1,40015d48 <== ALWAYS TAKEN if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE)) 40015ea8: 00000513 li a0,0 <== NOT EXECUTED 40015eac: 01000593 li a1,16 <== NOT EXECUTED 40015eb0: a5cf40ef jal ra,4000a10c <== NOT EXECUTED 40015eb4: e8050ae3 beqz a0,40015d48 <== NOT EXECUTED printf ("rtems-rfs: file-close: result: %d: %s\n", rrc, strerror (rrc)); 40015eb8: 00048513 mv a0,s1 <== NOT EXECUTED 40015ebc: 0a8090ef jal ra,4001ef64 <== NOT EXECUTED 40015ec0: 00050613 mv a2,a0 <== NOT EXECUTED 40015ec4: 40023537 lui a0,0x40023 <== NOT EXECUTED 40015ec8: 00048593 mv a1,s1 <== NOT EXECUTED 40015ecc: 79c50513 addi a0,a0,1948 # 4002379c <== NOT EXECUTED 40015ed0: b29eb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40015ed4: e75ff06f j 40015d48 <== NOT EXECUTED printf ("rtems-rfs: file-close: entry: ino=%" PRId32 "\n", 40015ed8: 01c42783 lw a5,28(s0) <== NOT EXECUTED 40015edc: 40023537 lui a0,0x40023 <== NOT EXECUTED 40015ee0: 70050513 addi a0,a0,1792 # 40023700 <== NOT EXECUTED 40015ee4: 0147a583 lw a1,20(a5) <== NOT EXECUTED 40015ee8: b11eb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40015eec: e31ff06f j 40015d1c <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE)) 40015ef0: 00000513 li a0,0 <== NOT EXECUTED 40015ef4: 01000593 li a1,16 <== NOT EXECUTED 40015ef8: a14f40ef jal ra,4000a10c <== NOT EXECUTED 40015efc: 0a051463 bnez a0,40015fa4 <== NOT EXECUTED rtems_chain_extract_unprotected (&handle->shared->link); 40015f00: 01c42503 lw a0,28(s0) <== NOT EXECUTED next = the_node->next; 40015f04: 00052703 lw a4,0(a0) <== NOT EXECUTED previous = the_node->previous; 40015f08: 00452783 lw a5,4(a0) <== NOT EXECUTED if (rrc == 0) 40015f0c: f6049ae3 bnez s1,40015e80 <== NOT EXECUTED next->previous = previous; 40015f10: 00f72223 sw a5,4(a4) <== NOT EXECUTED previous->next = next; 40015f14: 00e7a023 sw a4,0(a5) <== NOT EXECUTED free (handle->shared); 40015f18: e71eb0ef jal ra,40001d88 <== NOT EXECUTED rtems_rfs_buffer_handle_release (fs, handle); 40015f1c: 000a0593 mv a1,s4 <== NOT EXECUTED 40015f20: 00090513 mv a0,s2 <== NOT EXECUTED 40015f24: 8f1f00ef jal ra,40006814 <== NOT EXECUTED handle->buffer = NULL; 40015f28: 00098493 mv s1,s3 <== NOT EXECUTED handle->dirty = false; 40015f2c: 00040223 sb zero,4(s0) <== NOT EXECUTED handle->bnum = 0; 40015f30: 00042423 sw zero,8(s0) <== NOT EXECUTED handle->buffer = NULL; 40015f34: 00042623 sw zero,12(s0) <== NOT EXECUTED if (rrc > 0) 40015f38: f71ff06f j 40015ea8 <== NOT EXECUTED if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_CLOSE)) 40015f3c: 00000513 li a0,0 <== NOT EXECUTED 40015f40: 01000593 li a1,16 <== NOT EXECUTED 40015f44: 9c8f40ef jal ra,4000a10c <== NOT EXECUTED 40015f48: 02051663 bnez a0,40015f74 <== NOT EXECUTED if (rrc == 0) 40015f4c: f00498e3 bnez s1,40015e5c <== NOT EXECUTED 40015f50: 00098493 mv s1,s3 <== NOT EXECUTED 40015f54: f09ff06f j 40015e5c <== NOT EXECUTED rrc = rtems_rfs_inode_load (fs, &handle->shared->inode); 40015f58: 00c58593 addi a1,a1,12 40015f5c: 00090513 mv a0,s2 40015f60: a60f20ef jal ra,400081c0 rtems_rfs_inode_set_atime (&handle->shared->inode, 40015f64: 01c42583 lw a1,28(s0) if (rrc == 0) 40015f68: 06050c63 beqz a0,40015fe0 <== ALWAYS TAKEN rc = rtems_rfs_block_map_close (fs, &handle->shared->map); 40015f6c: 00050493 mv s1,a0 <== NOT EXECUTED 40015f70: ed9ff06f j 40015e48 <== NOT EXECUTED printf ("rtems-rfs: file-close: map close error: ino=%" PRId32 ": %d: %s\n", 40015f74: 01c42783 lw a5,28(s0) <== NOT EXECUTED 40015f78: 00098513 mv a0,s3 <== NOT EXECUTED 40015f7c: 0147aa83 lw s5,20(a5) <== NOT EXECUTED 40015f80: 7e5080ef jal ra,4001ef64 <== NOT EXECUTED 40015f84: 00050693 mv a3,a0 <== NOT EXECUTED 40015f88: 40023537 lui a0,0x40023 <== NOT EXECUTED 40015f8c: 00098613 mv a2,s3 <== NOT EXECUTED 40015f90: 000a8593 mv a1,s5 <== NOT EXECUTED 40015f94: 72850513 addi a0,a0,1832 # 40023728 <== NOT EXECUTED 40015f98: a61eb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if (rrc == 0) 40015f9c: ec0490e3 bnez s1,40015e5c <== NOT EXECUTED 40015fa0: fb1ff06f j 40015f50 <== NOT EXECUTED printf ("rtems-rfs: file-close: inode close error: ino=%" PRId32 ": %d: %s\n", 40015fa4: 01c42783 lw a5,28(s0) <== NOT EXECUTED 40015fa8: 00098513 mv a0,s3 <== NOT EXECUTED 40015fac: 0147aa83 lw s5,20(a5) <== NOT EXECUTED 40015fb0: 7b5080ef jal ra,4001ef64 <== NOT EXECUTED 40015fb4: 00050693 mv a3,a0 <== NOT EXECUTED 40015fb8: 40023537 lui a0,0x40023 <== NOT EXECUTED 40015fbc: 00098613 mv a2,s3 <== NOT EXECUTED 40015fc0: 000a8593 mv a1,s5 <== NOT EXECUTED 40015fc4: 76050513 addi a0,a0,1888 # 40023760 <== NOT EXECUTED 40015fc8: a31eb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED 40015fcc: f35ff06f j 40015f00 <== NOT EXECUTED if (!rtems_rfs_block_size_equal (&handle->shared->size, 40015fd0: 0885a703 lw a4,136(a1) 40015fd4: 0405a683 lw a3,64(a1) 40015fd8: e6d710e3 bne a4,a3,40015e38 40015fdc: e6dff06f j 40015e48 rtems_rfs_write_u32 (&handle->node->atime, atime); 40015fe0: 0185a703 lw a4,24(a1) 40015fe4: d9dff06f j 40015d80 =============================================================================== 40016920 : { 40016920: 00050713 mv a4,a0 return _Chain_Immutable_head( the_chain )->next; 40016924: 07452503 lw a0,116(a0) return &the_chain->Tail.Node; 40016928: 07870713 addi a4,a4,120 while (!rtems_chain_is_tail (&fs->file_shares, node)) 4001692c: 00e51863 bne a0,a4,4001693c 40016930: 0180006f j 40016948 return the_node->next; 40016934: 00052503 lw a0,0(a0) <== NOT EXECUTED 40016938: 00e50863 beq a0,a4,40016948 <== NOT EXECUTED if (shared->inode.ino == ino) 4001693c: 01452783 lw a5,20(a0) 40016940: feb79ae3 bne a5,a1,40016934 return shared; node = rtems_chain_next (node); } return NULL; } 40016944: 00008067 ret return NULL; 40016948: 00000513 li a0,0 } 4001694c: 00008067 ret =============================================================================== 40016228 : { 40016228: fe010113 addi sp,sp,-32 4001622c: 00812c23 sw s0,24(sp) 40016230: 00912a23 sw s1,20(sp) 40016234: 00050413 mv s0,a0 40016238: 00058493 mv s1,a1 if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO)) 4001623c: 00000513 li a0,0 40016240: 02000593 li a1,32 { 40016244: 01212823 sw s2,16(sp) 40016248: 00112e23 sw ra,28(sp) 4001624c: 01312623 sw s3,12(sp) 40016250: 01412423 sw s4,8(sp) 40016254: 01512223 sw s5,4(sp) 40016258: 01612023 sw s6,0(sp) 4001625c: 00060913 mv s2,a2 if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO)) 40016260: eadf30ef jal ra,4000a10c 40016264: 02050063 beqz a0,40016284 <== ALWAYS TAKEN printf ("rtems-rfs: file-io: end: %s size=%zu\n", 40016268: 18091663 bnez s2,400163f4 <== NOT EXECUTED 4001626c: 400235b7 lui a1,0x40023 <== NOT EXECUTED 40016270: 7c458593 addi a1,a1,1988 # 400237c4 <== NOT EXECUTED 40016274: 40024537 lui a0,0x40024 <== NOT EXECUTED 40016278: 00048613 mv a2,s1 <== NOT EXECUTED 4001627c: 88050513 addi a0,a0,-1920 # 40023880 <== NOT EXECUTED 40016280: f78eb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle), 40016284: 01c42783 lw a5,28(s0) if (rtems_rfs_buffer_handle_has_block (&handle->buffer)) 40016288: 00c42703 lw a4,12(s0) rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle), 4001628c: 0987a503 lw a0,152(a5) if (rtems_rfs_buffer_handle_has_block (&handle->buffer)) 40016290: 1a070c63 beqz a4,40016448 <== NEVER TAKEN rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle), 40016294: 00440593 addi a1,s0,4 if (!read) 40016298: 10091e63 bnez s2,400163b4 rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle)); 4001629c: 00100793 li a5,1 400162a0: 00f40223 sb a5,4(s0) rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle), 400162a4: d70f00ef jal ra,40006814 400162a8: 00050993 mv s3,a0 if (rc > 0) 400162ac: 1ca04e63 bgtz a0,40016488 <== NEVER TAKEN rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) 400162b0: 01c42783 lw a5,28(s0) handle->bpos.boff += size; 400162b4: 01442683 lw a3,20(s0) rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) 400162b8: 0987a703 lw a4,152(a5) handle->bpos.boff += size; 400162bc: 00d484b3 add s1,s1,a3 400162c0: 00942a23 sw s1,20(s0) rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) 400162c4: 00872703 lw a4,8(a4) if (handle->bpos.boff >= 400162c8: 00e4ee63 bltu s1,a4,400162e4 handle->bpos.bno++; 400162cc: 01042683 lw a3,16(s0) handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)); 400162d0: 40e484b3 sub s1,s1,a4 400162d4: 00942a23 sw s1,20(s0) handle->bpos.bno++; 400162d8: 00168713 addi a4,a3,1 400162dc: 00e42823 sw a4,16(s0) if (!read && 400162e0: 0e091e63 bnez s2,400163dc rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle), 400162e4: 01042683 lw a3,16(s0) 400162e8: 03c7a703 lw a4,60(a5) if (!read && 400162ec: 10068a63 beqz a3,40016400 rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle), 400162f0: 10071863 bnez a4,40016400 <== ALWAYS TAKEN 400162f4: 01442683 lw a3,20(s0) atime = rtems_rfs_file_update_atime (handle); 400162f8: 00042703 lw a4,0(s0) map->size.offset = offset; 400162fc: 04d7a023 sw a3,64(a5) map->dirty = true; 40016300: 00100693 li a3,1 40016304: 00177493 andi s1,a4,1 mtime = rtems_rfs_file_update_mtime (handle) && mtime; 40016308: 00277a13 andi s4,a4,2 4001630c: 001a3a13 seqz s4,s4 40016310: 0014ca93 xori s5,s1,1 40016314: 02d78a23 sb a3,52(a5) length = rtems_rfs_file_update_length (handle) && length; 40016318: 00477713 andi a4,a4,4 4001631c: 014aeab3 or s5,s5,s4 40016320: 00100b13 li s6,1 40016324: 0c071463 bnez a4,400163ec <== NEVER TAKEN if (rtems_rfs_trace (RTEMS_RFS_TRACE_FILE_IO)) 40016328: 00000513 li a0,0 4001632c: 02000593 li a1,32 40016330: dddf30ef jal ra,4000a10c 40016334: 02050c63 beqz a0,4001636c <== ALWAYS TAKEN printf ("rtems-rfs: file-io: end: pos=%" PRIu32 ":%" PRIu32 " %c %c %c\n", 40016338: fff48693 addi a3,s1,-1 <== NOT EXECUTED 4001633c: 416007b3 neg a5,s6 <== NOT EXECUTED 40016340: 01442603 lw a2,20(s0) <== NOT EXECUTED 40016344: 01042583 lw a1,16(s0) <== NOT EXECUTED 40016348: 0146f693 andi a3,a3,20 <== NOT EXECUTED 4001634c: 005a1713 slli a4,s4,0x5 <== NOT EXECUTED 40016350: 01f7f793 andi a5,a5,31 <== NOT EXECUTED 40016354: 40024537 lui a0,0x40024 <== NOT EXECUTED 40016358: 02d78793 addi a5,a5,45 <== NOT EXECUTED 4001635c: 02d70713 addi a4,a4,45 <== NOT EXECUTED 40016360: 02d68693 addi a3,a3,45 <== NOT EXECUTED 40016364: 8ec50513 addi a0,a0,-1812 # 400238ec <== NOT EXECUTED 40016368: e90eb0ef jal ra,400019f8 <__wrap_printf> <== NOT EXECUTED if (atime || mtime) 4001636c: 0c0a9063 bnez s5,4001642c <== ALWAYS TAKEN if (length) 40016370: 000b0c63 beqz s6,40016388 rtems_rfs_block_map_count (rtems_rfs_file_map (handle)); 40016374: 01c42783 lw a5,28(s0) handle->shared->size.count = 40016378: 03c7a683 lw a3,60(a5) handle->shared->size.offset = 4001637c: 0407a703 lw a4,64(a5) handle->shared->size.count = 40016380: 08d7a223 sw a3,132(a5) handle->shared->size.offset = 40016384: 08e7a423 sw a4,136(a5) } 40016388: 01c12083 lw ra,28(sp) 4001638c: 01812403 lw s0,24(sp) 40016390: 01412483 lw s1,20(sp) 40016394: 01012903 lw s2,16(sp) 40016398: 00812a03 lw s4,8(sp) 4001639c: 00412a83 lw s5,4(sp) 400163a0: 00012b03 lw s6,0(sp) 400163a4: 00098513 mv a0,s3 400163a8: 00c12983 lw s3,12(sp) 400163ac: 02010113 addi sp,sp,32 400163b0: 00008067 ret rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle), 400163b4: c60f00ef jal ra,40006814 400163b8: 00050993 mv s3,a0 if (rc > 0) 400163bc: 0ea04e63 bgtz a0,400164b8 <== NEVER TAKEN rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) 400163c0: 01c42783 lw a5,28(s0) handle->bpos.boff += size; 400163c4: 01442683 lw a3,20(s0) rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) 400163c8: 0987a703 lw a4,152(a5) handle->bpos.boff += size; 400163cc: 00d484b3 add s1,s1,a3 400163d0: 00942a23 sw s1,20(s0) rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) 400163d4: 00872703 lw a4,8(a4) if (handle->bpos.boff >= 400163d8: eee4fae3 bgeu s1,a4,400162cc atime = rtems_rfs_file_update_atime (handle); 400163dc: 00042483 lw s1,0(s0) mtime = rtems_rfs_file_update_mtime (handle) && mtime; 400163e0: 00000a13 li s4,0 atime = rtems_rfs_file_update_atime (handle); 400163e4: 0014f493 andi s1,s1,1 400163e8: 0014ca93 xori s5,s1,1 length = rtems_rfs_file_update_length (handle) && length; 400163ec: 00000b13 li s6,0 400163f0: f39ff06f j 40016328 printf ("rtems-rfs: file-io: end: %s size=%zu\n", 400163f4: 400215b7 lui a1,0x40021 <== NOT EXECUTED 400163f8: 66c58593 addi a1,a1,1644 # 4002166c <== NOT EXECUTED 400163fc: e79ff06f j 40016274 <== NOT EXECUTED rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle), 40016400: eee6fae3 bgeu a3,a4,400162f4 40016404: fff70713 addi a4,a4,-1 40016408: 0ae68e63 beq a3,a4,400164c4 atime = rtems_rfs_file_update_atime (handle); 4001640c: 00042a03 lw s4,0(s0) length = rtems_rfs_file_update_length (handle) && length; 40016410: 00000b13 li s6,0 atime = rtems_rfs_file_update_atime (handle); 40016414: 001a7493 andi s1,s4,1 mtime = rtems_rfs_file_update_mtime (handle) && mtime; 40016418: 002a7a13 andi s4,s4,2 4001641c: 001a3a13 seqz s4,s4 length = rtems_rfs_file_update_length (handle) && length; 40016420: 0014ca93 xori s5,s1,1 40016424: 014aeab3 or s5,s5,s4 40016428: f01ff06f j 40016328 time_t now = time (NULL); 4001642c: 00000513 li a0,0 40016430: 755080ef jal ra,4001f384