RTEMS-5
Annotated Report
libdosfs
Sat Apr 11 20:09:54 2020
4000fa3c <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
4000fa3c: 9d e3 bf 98 save %sp, -104, %sp
4000fa40: a0 10 00 18 mov %i0, %l0
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while (count > 0)
4000fa44: 80 a6 e0 00 cmp %i3, 0
4000fa48: 12 80 00 11 bne 4000fa8c <_fat_block_read+0x50>
<== ALWAYS TAKEN
4000fa4c: b0 10 20 00 clr %i0
4000fa50: 30 80 00 19 b,a 4000fab4 <_fat_block_read+0x78>
<== NOT EXECUTED
{
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
if (rc != RC_OK)
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
4000fa54: fa 14 00 00 lduh [ %l0 ], %i5
4000fa58: ba 27 40 1a sub %i5, %i2, %i5
4000fa5c: 80 a7 40 1b cmp %i5, %i3
4000fa60: 38 80 00 02 bgu,a 4000fa68 <_fat_block_read+0x2c>
4000fa64: ba 10 00 1b mov %i3, %i5
memcpy((buff + cmpltd), (sec_buf + ofs), c);
4000fa68: d2 07 bf fc ld [ %fp + -4 ], %o1
4000fa6c: 92 02 40 1a add %o1, %i2, %o1
4000fa70: 40 00 30 9c call 4001bce0 <memcpy>
4000fa74: 94 10 00 1d mov %i5, %o2
count -= c;
cmpltd += c;
4000fa78: b0 06 00 1d add %i0, %i5, %i0
sec_num++;
4000fa7c: b2 06 60 01 inc %i1
while (count > 0)
4000fa80: b6 a6 c0 1d subcc %i3, %i5, %i3
4000fa84: 02 80 00 0c be 4000fab4 <_fat_block_read+0x78>
4000fa88: b4 10 20 00 clr %i2
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4000fa8c: 92 10 00 19 mov %i1, %o1
4000fa90: 96 07 bf fc add %fp, -4, %o3
4000fa94: 94 10 20 01 mov 1, %o2
4000fa98: 7f ff ff b0 call 4000f958 <fat_buf_access>
4000fa9c: 90 10 00 10 mov %l0, %o0
if (rc != RC_OK)
4000faa0: 80 a2 20 00 cmp %o0, 0
4000faa4: 02 bf ff ec be 4000fa54 <_fat_block_read+0x18>
<== ALWAYS TAKEN
4000faa8: 90 07 00 18 add %i4, %i0, %o0
ofs = 0;
}
return cmpltd;
}
4000faac: 81 c7 e0 08 ret
<== NOT EXECUTED
4000fab0: 91 e8 3f ff restore %g0, -1, %o0
<== NOT EXECUTED
4000fab4: 81 c7 e0 08 ret
4000fab8: 81 e8 00 00 restore
4000f958 <fat_buf_access>:
{
4000f958: 9d e3 bf 98 save %sp, -104, %sp
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4000f95c: fa 0e 20 02 ldub [ %i0 + 2 ], %i5
4000f960: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1
if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num)
4000f964: c4 0e 20 9d ldub [ %i0 + 0x9d ], %g2
4000f968: 82 20 40 1d sub %g1, %i5, %g1
{
4000f96c: b8 10 00 18 mov %i0, %i4
4000f970: 93 36 40 01 srl %i1, %g1, %o1
if (fs_info->c.state == FAT_CACHE_EMPTY || fs_info->c.blk_num != sec_num)
4000f974: 80 a0 a0 00 cmp %g2, 0
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4000f978: 83 2a 40 01 sll %o1, %g1, %g1
((sector -
4000f97c: 82 26 40 01 sub %i1, %g1, %g1
4000f980: 02 80 00 0a be 4000f9a8 <fat_buf_access+0x50>
4000f984: bb 28 40 1d sll %g1, %i5, %i5
4000f988: d2 27 bf fc st %o1, [ %fp + -4 ]
4000f98c: c2 06 20 98 ld [ %i0 + 0x98 ], %g1
4000f990: 80 a0 40 19 cmp %g1, %i1
4000f994: 22 80 00 12 be,a 4000f9dc <fat_buf_access+0x84>
4000f998: c2 07 20 a0 ld [ %i4 + 0xa0 ], %g1
4000f99c: 7f ff ff 79 call 4000f780 <fat_buf_release.part.5>
4000f9a0: 90 10 00 18 mov %i0, %o0
4000f9a4: d2 07 bf fc ld [ %fp + -4 ], %o1
4000f9a8: d0 07 20 6c ld [ %i4 + 0x6c ], %o0
if (op_type == FAT_OP_TYPE_READ)
4000f9ac: 80 a6 a0 01 cmp %i2, 1
4000f9b0: 02 80 00 10 be 4000f9f0 <fat_buf_access+0x98>
4000f9b4: 94 07 20 a0 add %i4, 0xa0, %o2
sc = rtems_bdbuf_get(fs_info->vol.dd, blk, &fs_info->c.buf);
4000f9b8: 40 00 22 3f call 400182b4 <rtems_bdbuf_get>
4000f9bc: 01 00 00 00 nop
if (sc != RTEMS_SUCCESSFUL)
4000f9c0: 80 a2 20 00 cmp %o0, 0
4000f9c4: 12 80 00 0f bne 4000fa00 <fat_buf_access+0xa8>
<== NEVER TAKEN
4000f9c8: 82 10 20 01 mov 1, %g1
fs_info->c.blk_num = sec_num;
4000f9cc: f2 27 20 98 st %i1, [ %i4 + 0x98 ]
fs_info->c.modified = 0;
4000f9d0: c0 2f 20 9c clrb [ %i4 + 0x9c ]
fs_info->c.state = FAT_CACHE_ACTUAL;
4000f9d4: c2 2f 20 9d stb %g1, [ %i4 + 0x9d ]
*sec_buf = &fs_info->c.buf->buffer[blk_ofs];
4000f9d8: c2 07 20 a0 ld [ %i4 + 0xa0 ], %g1
4000f9dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
4000f9e0: 82 00 40 1d add %g1, %i5, %g1
4000f9e4: c2 26 c0 00 st %g1, [ %i3 ]
}
4000f9e8: 81 c7 e0 08 ret
4000f9ec: 91 e8 20 00 restore %g0, 0, %o0
sc = rtems_bdbuf_read(fs_info->vol.dd, blk, &fs_info->c.buf);
4000f9f0: 40 00 22 71 call 400183b4 <rtems_bdbuf_read>
4000f9f4: 01 00 00 00 nop
4000f9f8: 10 bf ff f3 b 4000f9c4 <fat_buf_access+0x6c>
4000f9fc: 80 a2 20 00 cmp %o0, 0
rtems_set_errno_and_return_minus_one(EIO);
4000fa00: 40 00 2e dc call 4001b570 <__errno>
<== NOT EXECUTED
4000fa04: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
4000fa08: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
4000fa0c: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
4000fa10: 81 c7 e0 08 ret
<== NOT EXECUTED
4000fa14: 81 e8 00 00 restore
<== NOT EXECUTED
4000fa18 <fat_buf_release>:
if (fs_info->c.state == FAT_CACHE_EMPTY)
4000fa18: c2 0a 20 9d ldub [ %o0 + 0x9d ], %g1
<== NOT EXECUTED
4000fa1c: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
4000fa20: 02 80 00 05 be 4000fa34 <fat_buf_release+0x1c>
<== NOT EXECUTED
4000fa24: 01 00 00 00 nop
<== NOT EXECUTED
4000fa28: 82 13 c0 00 mov %o7, %g1
<== NOT EXECUTED
4000fa2c: 7f ff ff 55 call 4000f780 <fat_buf_release.part.5>
<== NOT EXECUTED
4000fa30: 9e 10 40 00 mov %g1, %o7
<== NOT EXECUTED
}
4000fa34: 81 c3 e0 08 retl
<== NOT EXECUTED
4000fa38: 90 10 20 00 clr %o0
<== NOT EXECUTED
4000fb68 <fat_cluster_set>:
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const uint8_t pattern)
{
4000fb68: 9d e3 bf 98 save %sp, -104, %sp
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4000fb6c: e0 06 20 08 ld [ %i0 + 8 ], %l0
4000fb70: a0 24 00 1a sub %l0, %i2, %l0
4000fb74: 80 a4 00 1b cmp %l0, %i3
4000fb78: 38 80 00 02 bgu,a 4000fb80 <fat_cluster_set+0x18>
<== NEVER TAKEN
4000fb7c: a0 10 00 1b mov %i3, %l0
<== NOT EXECUTED
4000fb80: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1
4000fb84: c4 0e 20 02 ldub [ %i0 + 2 ], %g2
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4000fb88: 80 a6 60 00 cmp %i1, 0
4000fb8c: 12 80 00 06 bne 4000fba4 <fat_cluster_set+0x3c>
<== ALWAYS TAKEN
4000fb90: 86 20 40 02 sub %g1, %g2, %g3
4000fb94: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
<== NOT EXECUTED
4000fb98: 80 88 a0 03 btst 3, %g2
<== NOT EXECUTED
4000fb9c: 32 80 00 4c bne,a 4000fccc <fat_cluster_set+0x164>
<== NOT EXECUTED
4000fba0: e4 06 20 28 ld [ %i0 + 0x28 ], %l2
<== NOT EXECUTED
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
4000fba4: e4 0e 20 0c ldub [ %i0 + 0xc ], %l2
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4000fba8: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
cln -= FAT_RSRVD_CLN;
4000fbac: b2 06 7f fe add %i1, -2, %i1
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
4000fbb0: a4 24 80 01 sub %l2, %g1, %l2
4000fbb4: 85 30 80 03 srl %g2, %g3, %g2
4000fbb8: b3 2e 40 12 sll %i1, %l2, %i1
blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec);
4000fbbc: 84 00 80 19 add %g2, %i1, %g2
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
uint32_t blocks_in_offset = offset >> fs_info->vol.bytes_per_block_log2;
4000fbc0: a5 36 80 01 srl %i2, %g1, %l2
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4000fbc4: 83 2c 80 01 sll %l2, %g1, %g1
ssize_t bytes_written = 0;
4000fbc8: b2 10 20 00 clr %i1
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4000fbcc: b4 26 80 01 sub %i2, %g1, %i2
ssize_t ret;
cur_blk += blocks_in_offset;
4000fbd0: a4 04 80 02 add %l2, %g2, %l2
ssize_t rc = RC_OK;
4000fbd4: 82 10 20 00 clr %g1
while ( (RC_OK == rc)
4000fbd8: 80 a0 60 00 cmp %g1, 0
4000fbdc: 12 80 00 26 bne 4000fc74 <fat_cluster_set+0x10c>
<== NEVER TAKEN
4000fbe0: a2 10 20 01 mov 1, %l1
4000fbe4: 80 a4 20 00 cmp %l0, 0
4000fbe8: 02 80 00 23 be 4000fc74 <fat_cluster_set+0x10c>
4000fbec: 80 a0 60 00 cmp %g1, 0
&& (0 < bytes_to_write))
{
uint32_t c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk));
4000fbf0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
4000fbf4: ba 20 40 1a sub %g1, %i2, %i5
4000fbf8: 80 a7 40 10 cmp %i5, %l0
4000fbfc: 08 80 00 03 bleu 4000fc08 <fat_cluster_set+0xa0>
<== ALWAYS TAKEN
4000fc00: b6 10 00 1d mov %i5, %i3
4000fc04: b6 10 00 10 mov %l0, %i3
<== NOT EXECUTED
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
4000fc08: 80 a7 40 1b cmp %i5, %i3
4000fc0c: 38 80 00 02 bgu,a 4000fc14 <fat_cluster_set+0xac>
<== NEVER TAKEN
4000fc10: ba 10 00 1b mov %i3, %i5
<== NOT EXECUTED
if (0 < bytes_to_write)
4000fc14: 80 a7 60 00 cmp %i5, 0
4000fc18: 02 80 00 0f be 4000fc54 <fat_cluster_set+0xec>
<== NEVER TAKEN
4000fc1c: 90 10 00 1d mov %i5, %o0
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4000fc20: d2 0e 20 14 ldub [ %i0 + 0x14 ], %o1
4000fc24: c4 0e 20 02 ldub [ %i0 + 2 ], %g2
4000fc28: 92 22 40 02 sub %o1, %g2, %o1
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4000fc2c: 96 07 bf fc add %fp, -4, %o3
if (bytes_to_write == fs_info->vol.bytes_per_block)
4000fc30: 80 a0 40 1d cmp %g1, %i5
4000fc34: 02 80 00 21 be 4000fcb8 <fat_cluster_set+0x150>
4000fc38: 93 2c 80 09 sll %l2, %o1, %o1
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
4000fc3c: 94 10 20 01 mov 1, %o2
4000fc40: 7f ff ff 46 call 4000f958 <fat_buf_access>
4000fc44: 90 10 00 18 mov %i0, %o0
if (RC_OK == rc)
4000fc48: 80 a2 20 00 cmp %o0, 0
4000fc4c: 22 80 00 14 be,a 4000fc9c <fat_cluster_set+0x134>
<== ALWAYS TAKEN
4000fc50: d0 07 bf fc ld [ %fp + -4 ], %o0
fs_info,
cur_blk,
ofs_blk,
c,
pattern);
if (c != ret)
4000fc54: 80 a2 00 1b cmp %o0, %i3
4000fc58: 02 80 00 0b be 4000fc84 <fat_cluster_set+0x11c>
<== ALWAYS TAKEN
4000fc5c: 82 10 3f ff mov -1, %g1
4000fc60: b4 10 20 00 clr %i2
<== NOT EXECUTED
while ( (RC_OK == rc)
4000fc64: 80 a0 60 00 cmp %g1, 0
4000fc68: 02 bf ff e0 be 4000fbe8 <fat_cluster_set+0x80>
<== ALWAYS TAKEN
4000fc6c: 80 a4 20 00 cmp %l0, 0
bytes_written += ret;
++cur_blk;
}
ofs_blk = 0;
}
if (RC_OK != rc)
4000fc70: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
4000fc74: 32 80 00 02 bne,a 4000fc7c <fat_cluster_set+0x114>
<== NEVER TAKEN
4000fc78: b2 10 3f ff mov -1, %i1
<== NOT EXECUTED
return rc;
else
return bytes_written;
}
4000fc7c: 81 c7 e0 08 ret
4000fc80: 91 e8 00 19 restore %g0, %i1, %o0
bytes_to_write -= ret;
4000fc84: a0 24 00 08 sub %l0, %o0, %l0
bytes_written += ret;
4000fc88: b2 06 40 08 add %i1, %o0, %i1
++cur_blk;
4000fc8c: a4 04 a0 01 inc %l2
4000fc90: 82 10 20 00 clr %g1
4000fc94: 10 bf ff f4 b 4000fc64 <fat_cluster_set+0xfc>
4000fc98: b4 10 20 00 clr %i2
memset(blk_buf + offset, pattern, bytes_to_write);
4000fc9c: 94 10 00 1d mov %i5, %o2
4000fca0: 92 10 00 1c mov %i4, %o1
4000fca4: 40 00 30 4b call 4001bdd0 <memset>
4000fca8: 90 02 00 1a add %o0, %i2, %o0
fs_info->c.modified = true;
4000fcac: e2 2e 20 9c stb %l1, [ %i0 + 0x9c ]
return bytes_to_write;
4000fcb0: 10 bf ff e9 b 4000fc54 <fat_cluster_set+0xec>
4000fcb4: 90 10 00 1d mov %i5, %o0
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4000fcb8: 94 10 20 02 mov 2, %o2
4000fcbc: 7f ff ff 27 call 4000f958 <fat_buf_access>
4000fcc0: 90 10 00 18 mov %i0, %o0
if (RC_OK == rc)
4000fcc4: 10 bf ff e2 b 4000fc4c <fat_cluster_set+0xe4>
4000fcc8: 80 a2 20 00 cmp %o0, 0
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4000fccc: 10 bf ff bd b 4000fbc0 <fat_cluster_set+0x58>
<== NOT EXECUTED
4000fcd0: 85 34 80 03 srl %l2, %g3, %g2
<== NOT EXECUTED
4000fcd4 <fat_cluster_write>:
fat_fs_info_t *fs_info,
const uint32_t start_cln,
const uint32_t offset,
const uint32_t count,
const void *buff)
{
4000fcd4: 9d e3 bf 98 save %sp, -104, %sp
ssize_t rc = RC_OK;
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bpc - offset));
4000fcd8: e0 06 20 08 ld [ %i0 + 8 ], %l0
4000fcdc: a0 24 00 1a sub %l0, %i2, %l0
4000fce0: 80 a4 00 1b cmp %l0, %i3
4000fce4: 38 80 00 02 bgu,a 4000fcec <fat_cluster_write+0x18>
4000fce8: a0 10 00 1b mov %i3, %l0
4000fcec: c2 0e 20 14 ldub [ %i0 + 0x14 ], %g1
4000fcf0: c4 0e 20 02 ldub [ %i0 + 2 ], %g2
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4000fcf4: 80 a6 60 00 cmp %i1, 0
4000fcf8: 12 80 00 06 bne 4000fd10 <fat_cluster_write+0x3c>
4000fcfc: 86 20 40 02 sub %g1, %g2, %g3
4000fd00: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
4000fd04: 80 88 a0 03 btst 3, %g2
4000fd08: 32 80 00 4c bne,a 4000fe38 <fat_cluster_write+0x164>
<== ALWAYS TAKEN
4000fd0c: e4 06 20 28 ld [ %i0 + 0x28 ], %l2
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
4000fd10: e4 0e 20 0c ldub [ %i0 + 0xc ], %l2
4000fd14: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
cln -= FAT_RSRVD_CLN;
4000fd18: b2 06 7f fe add %i1, -2, %i1
blk = cln << (fs_info->vol.bpc_log2 - fs_info->vol.bytes_per_block_log2);
4000fd1c: a4 24 80 01 sub %l2, %g1, %l2
4000fd20: 85 30 80 03 srl %g2, %g3, %g2
4000fd24: b3 2e 40 12 sll %i1, %l2, %i1
blk += fat_sector_num_to_block_num(fs_info, fs_info->vol.data_fsec);
4000fd28: 84 00 80 19 add %g2, %i1, %g2
uint32_t cur_blk = fat_cluster_num_to_block_num(fs_info, start_cln);
uint32_t blocks_in_offset = (offset >> fs_info->vol.bytes_per_block_log2);
4000fd2c: a5 36 80 01 srl %i2, %g1, %l2
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4000fd30: 83 2c 80 01 sll %l2, %g1, %g1
ssize_t bytes_written = 0;
4000fd34: b2 10 20 00 clr %i1
uint32_t ofs_blk = offset - (blocks_in_offset << fs_info->vol.bytes_per_block_log2);
4000fd38: b4 26 80 01 sub %i2, %g1, %i2
uint8_t *buffer = (uint8_t*)buff;
ssize_t ret;
uint32_t c;
cur_blk += blocks_in_offset;
4000fd3c: a4 04 80 02 add %l2, %g2, %l2
ssize_t rc = RC_OK;
4000fd40: 82 10 20 00 clr %g1
while ( (RC_OK == rc)
4000fd44: 80 a0 60 00 cmp %g1, 0
4000fd48: 12 80 00 26 bne 4000fde0 <fat_cluster_write+0x10c>
<== NEVER TAKEN
4000fd4c: a2 10 20 01 mov 1, %l1
4000fd50: 80 a4 20 00 cmp %l0, 0
4000fd54: 02 80 00 23 be 4000fde0 <fat_cluster_write+0x10c>
4000fd58: 80 a0 60 00 cmp %g1, 0
&& (0 < bytes_to_write))
{
c = MIN(bytes_to_write, (fs_info->vol.bytes_per_block - ofs_blk));
4000fd5c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
4000fd60: ba 20 40 1a sub %g1, %i2, %i5
4000fd64: 80 a7 40 10 cmp %i5, %l0
4000fd68: 08 80 00 03 bleu 4000fd74 <fat_cluster_write+0xa0>
4000fd6c: b6 10 00 1d mov %i5, %i3
4000fd70: b6 10 00 10 mov %l0, %i3
uint32_t bytes_to_write = MIN(count, (fs_info->vol.bytes_per_block - offset));
4000fd74: 80 a7 40 1b cmp %i5, %i3
4000fd78: 38 80 00 02 bgu,a 4000fd80 <fat_cluster_write+0xac>
4000fd7c: ba 10 00 1b mov %i3, %i5
if (0 < bytes_to_write)
4000fd80: 80 a7 60 00 cmp %i5, 0
4000fd84: 02 80 00 0f be 4000fdc0 <fat_cluster_write+0xec>
<== NEVER TAKEN
4000fd88: 90 10 00 1d mov %i5, %o0
return block_number << (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4000fd8c: d2 0e 20 14 ldub [ %i0 + 0x14 ], %o1
4000fd90: c4 0e 20 02 ldub [ %i0 + 2 ], %g2
4000fd94: 92 22 40 02 sub %o1, %g2, %o1
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4000fd98: 96 07 bf fc add %fp, -4, %o3
if (bytes_to_write == fs_info->vol.bytes_per_block)
4000fd9c: 80 a0 40 1d cmp %g1, %i5
4000fda0: 02 80 00 21 be 4000fe24 <fat_cluster_write+0x150>
4000fda4: 93 2c 80 09 sll %l2, %o1, %o1
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &blk_buf);
4000fda8: 94 10 20 01 mov 1, %o2
4000fdac: 7f ff fe eb call 4000f958 <fat_buf_access>
4000fdb0: 90 10 00 18 mov %i0, %o0
if (RC_OK == rc)
4000fdb4: 80 a2 20 00 cmp %o0, 0
4000fdb8: 22 80 00 14 be,a 4000fe08 <fat_cluster_write+0x134>
<== ALWAYS TAKEN
4000fdbc: d0 07 bf fc ld [ %fp + -4 ], %o0
fs_info,
cur_blk,
ofs_blk,
c,
&buffer[bytes_written]);
if (c != ret)
4000fdc0: 80 a2 00 1b cmp %o0, %i3
4000fdc4: 02 80 00 0b be 4000fdf0 <fat_cluster_write+0x11c>
<== ALWAYS TAKEN
4000fdc8: 82 10 3f ff mov -1, %g1
4000fdcc: b4 10 20 00 clr %i2
<== NOT EXECUTED
while ( (RC_OK == rc)
4000fdd0: 80 a0 60 00 cmp %g1, 0
4000fdd4: 02 bf ff e0 be 4000fd54 <fat_cluster_write+0x80>
<== ALWAYS TAKEN
4000fdd8: 80 a4 20 00 cmp %l0, 0
bytes_written += ret;
++cur_blk;
}
ofs_blk = 0;
}
if (RC_OK != rc)
4000fddc: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
4000fde0: 32 80 00 02 bne,a 4000fde8 <fat_cluster_write+0x114>
<== NEVER TAKEN
4000fde4: b2 10 3f ff mov -1, %i1
<== NOT EXECUTED
return rc;
else
return bytes_written;
}
4000fde8: 81 c7 e0 08 ret
4000fdec: 91 e8 00 19 restore %g0, %i1, %o0
bytes_to_write -= ret;
4000fdf0: a0 24 00 08 sub %l0, %o0, %l0
bytes_written += ret;
4000fdf4: b2 06 40 08 add %i1, %o0, %i1
++cur_blk;
4000fdf8: a4 04 a0 01 inc %l2
4000fdfc: 82 10 20 00 clr %g1
4000fe00: 10 bf ff f4 b 4000fdd0 <fat_cluster_write+0xfc>
4000fe04: b4 10 20 00 clr %i2
memcpy(blk_buf + offset, buf, bytes_to_write);
4000fe08: 94 10 00 1d mov %i5, %o2
4000fe0c: 92 07 00 19 add %i4, %i1, %o1
4000fe10: 40 00 2f b4 call 4001bce0 <memcpy>
4000fe14: 90 02 00 1a add %o0, %i2, %o0
fs_info->c.modified = true;
4000fe18: e2 2e 20 9c stb %l1, [ %i0 + 0x9c ]
return bytes_to_write;
4000fe1c: 10 bf ff e9 b 4000fdc0 <fat_cluster_write+0xec>
4000fe20: 90 10 00 1d mov %i5, %o0
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &blk_buf);
4000fe24: 94 10 20 02 mov 2, %o2
4000fe28: 7f ff fe cc call 4000f958 <fat_buf_access>
4000fe2c: 90 10 00 18 mov %i0, %o0
if (RC_OK == rc)
4000fe30: 10 bf ff e2 b 4000fdb8 <fat_cluster_write+0xe4>
4000fe34: 80 a2 20 00 cmp %o0, 0
return sector_number >> (fs_info->vol.bytes_per_block_log2 - fs_info->vol.sec_log2);
4000fe38: 10 bf ff bd b 4000fd2c <fat_cluster_write+0x58>
4000fe3c: 85 34 80 03 srl %l2, %g3, %g2
40011910 <fat_file_close>:
{
40011910: 9d e3 bf a0 save %sp, -96, %sp
if (fat_fd->links_num > 1)
40011914: c2 06 60 08 ld [ %i1 + 8 ], %g1
40011918: 80 a0 60 01 cmp %g1, 1
4001191c: 08 80 00 05 bleu 40011930 <fat_file_close+0x20>
40011920: 82 00 7f ff add %g1, -1, %g1
fat_fd->links_num--;
40011924: c2 26 60 08 st %g1, [ %i1 + 8 ]
rc = fat_buf_release(fs_info);
40011928: 7f ff f8 3c call 4000fa18 <fat_buf_release>
4001192c: 81 e8 00 00 restore
fat_file_update(fs_info, fat_fd);
40011930: 92 10 00 19 mov %i1, %o1
40011934: 7f ff ff 17 call 40011590 <fat_file_update>
40011938: 90 10 00 18 mov %i0, %o0
if (fat_fd->flags & FAT_FILE_REMOVED)
4001193c: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
40011940: 80 88 60 01 btst 1, %g1
40011944: 12 80 00 0b bne 40011970 <fat_file_close+0x60>
40011948: 94 10 20 00 clr %o2
if (fat_ino_is_unique(fs_info, fat_fd->ino))
4001194c: d2 06 60 0c ld [ %i1 + 0xc ], %o1
40011950: 7f ff fc 56 call 40010aa8 <fat_ino_is_unique>
40011954: 90 10 00 18 mov %i0, %o0
40011958: 80 a2 20 00 cmp %o0, 0
4001195c: 22 80 00 1b be,a 400119c8 <fat_file_close+0xb8>
40011960: c4 06 40 00 ld [ %i1 ], %g2
fat_fd->links_num = 0;
40011964: c0 26 60 08 clr [ %i1 + 8 ]
rc = fat_buf_release(fs_info);
40011968: 7f ff f8 2c call 4000fa18 <fat_buf_release>
4001196c: 81 e8 00 00 restore
rc = fat_file_truncate(fs_info, fat_fd, 0);
40011970: 92 10 00 19 mov %i1, %o1
40011974: 7f ff ff a4 call 40011804 <fat_file_truncate>
40011978: 90 10 00 18 mov %i0, %o0
if (rc == RC_OK)
4001197c: 80 a2 20 00 cmp %o0, 0
40011980: 12 bf ff ea bne 40011928 <fat_file_close+0x18>
<== NEVER TAKEN
40011984: 90 10 00 18 mov %i0, %o0
next = the_node->next;
40011988: c4 06 40 00 ld [ %i1 ], %g2
previous = the_node->previous;
4001198c: c2 06 60 04 ld [ %i1 + 4 ], %g1
_hash_delete(fs_info->rhash, key, fat_fd->ino, fat_fd);
40011990: d2 06 60 0c ld [ %i1 + 0xc ], %o1
next->previous = previous;
40011994: c2 20 a0 04 st %g1, [ %g2 + 4 ]
if (fat_ino_is_unique(fs_info, fat_fd->ino))
40011998: 7f ff fc 44 call 40010aa8 <fat_ino_is_unique>
4001199c: c4 20 40 00 st %g2, [ %g1 ]
400119a0: 80 a2 20 00 cmp %o0, 0
400119a4: 02 80 00 05 be 400119b8 <fat_file_close+0xa8>
<== ALWAYS TAKEN
400119a8: 01 00 00 00 nop
fat_free_unique_ino(fs_info, fat_fd->ino);
400119ac: d2 06 60 0c ld [ %i1 + 0xc ], %o1
<== NOT EXECUTED
400119b0: 7f ff fc 33 call 40010a7c <fat_free_unique_ino>
<== NOT EXECUTED
400119b4: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
free(fat_fd);
400119b8: 7f ff c8 68 call 40003b58 <free>
400119bc: 90 10 00 19 mov %i1, %o0
rc = fat_buf_release(fs_info);
400119c0: 7f ff f8 16 call 4000fa18 <fat_buf_release>
400119c4: 81 e8 00 00 restore
previous = the_node->previous;
400119c8: c2 06 60 04 ld [ %i1 + 4 ], %g1
next->previous = previous;
400119cc: c2 20 a0 04 st %g1, [ %g2 + 4 ]
free(fat_fd);
400119d0: 90 10 00 19 mov %i1, %o0
400119d4: 7f ff c8 61 call 40003b58 <free>
400119d8: c4 20 40 00 st %g2, [ %g1 ]
rc = fat_buf_release(fs_info);
400119dc: 7f ff f8 0f call 4000fa18 <fat_buf_release>
400119e0: 81 e8 00 00 restore
40011ab8 <fat_file_extend>:
{
40011ab8: 9d e3 bf 90 save %sp, -112, %sp
*a_length = new_length;
40011abc: f6 27 00 00 st %i3, [ %i4 ]
uint32_t chain = 0;
40011ac0: c0 27 bf f0 clr [ %fp + -16 ]
uint32_t last_cl = 0;
40011ac4: c0 27 bf f8 clr [ %fp + -8 ]
if (new_length <= fat_fd->fat_file_size)
40011ac8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
40011acc: 80 a0 40 1b cmp %g1, %i3
40011ad0: 1a 80 00 54 bcc 40011c20 <fat_file_extend+0x168>
40011ad4: a0 10 20 00 clr %l0
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
40011ad8: c4 06 60 20 ld [ %i1 + 0x20 ], %g2
40011adc: 80 a0 a0 01 cmp %g2, 1
40011ae0: 22 80 00 53 be,a 40011c2c <fat_file_extend+0x174>
40011ae4: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
bytes_remain = (fs_info->vol.bpc -
40011ae8: fa 06 20 08 ld [ %i0 + 8 ], %i5
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
40011aec: 84 07 7f ff add %i5, -1, %g2
40011af0: a4 08 40 02 and %g1, %g2, %l2
bytes_remain = (fs_info->vol.bpc -
40011af4: ba 27 40 12 sub %i5, %l2, %i5
40011af8: ba 0f 40 02 and %i5, %g2, %i5
40011afc: 80 a0 00 1d cmp %g0, %i5
bytes2add = new_length - fat_fd->fat_file_size;
40011b00: 86 26 c0 01 sub %i3, %g1, %g3
40011b04: 84 40 20 00 addx %g0, 0, %g2
if (bytes2add > bytes_remain)
40011b08: 80 a7 40 03 cmp %i5, %g3
40011b0c: 1a 80 00 41 bcc 40011c10 <fat_file_extend+0x158>
40011b10: 84 0e 80 02 and %i2, %g2, %g2
if (zero_fill && bytes_remain > 0) {
40011b14: 80 a0 a0 00 cmp %g2, 0
40011b18: 12 80 00 51 bne 40011c5c <fat_file_extend+0x1a4>
<== NEVER TAKEN
40011b1c: a2 20 c0 1d sub %g3, %i5, %l1
if (bytes2add == 0)
40011b20: 80 a4 60 00 cmp %l1, 0
40011b24: 02 80 00 3e be 40011c1c <fat_file_extend+0x164>
40011b28: 9a 10 00 1a mov %i2, %o5
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
40011b2c: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2
40011b30: 82 04 7f ff add %l1, -1, %g1
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
40011b34: 98 07 bf f8 add %fp, -8, %o4
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
40011b38: b5 30 40 02 srl %g1, %g2, %i2
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
40011b3c: 96 07 bf fc add %fp, -4, %o3
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
40011b40: b4 06 a0 01 inc %i2
rc = fat_scan_fat_for_free_clusters(fs_info, &chain, cls2add,
40011b44: 92 07 bf f0 add %fp, -16, %o1
40011b48: 94 10 00 1a mov %i2, %o2
40011b4c: 7f ff fd 2d call 40011000 <fat_scan_fat_for_free_clusters>
40011b50: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
40011b54: a0 92 20 00 orcc %o0, 0, %l0
40011b58: 32 80 00 33 bne,a 40011c24 <fat_file_extend+0x16c>
<== NEVER TAKEN
40011b5c: b0 10 00 10 mov %l0, %i0
<== NOT EXECUTED
if ((cls_added == 0) && (bytes_remain == 0))
40011b60: c2 07 bf fc ld [ %fp + -4 ], %g1
40011b64: 80 90 40 1d orcc %g1, %i5, %g0
40011b68: 02 80 00 38 be 40011c48 <fat_file_extend+0x190>
40011b6c: 80 a0 40 1a cmp %g1, %i2
if (cls2add != cls_added)
40011b70: 02 80 00 08 be 40011b90 <fat_file_extend+0xd8>
40011b74: b4 26 80 01 sub %i2, %g1, %i2
uint32_t missing = (cls2add - cls_added) << fs_info->vol.bpc_log2;
40011b78: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2
40011b7c: b5 2e 80 02 sll %i2, %g2, %i2
new_length -= bytes2add < missing ? bytes2add : missing;
40011b80: 80 a6 80 11 cmp %i2, %l1
40011b84: 38 80 00 02 bgu,a 40011b8c <fat_file_extend+0xd4>
<== ALWAYS TAKEN
40011b88: b4 10 00 11 mov %l1, %i2
40011b8c: b6 26 c0 1a sub %i3, %i2, %i3
if (cls_added > 0)
40011b90: 80 a0 60 00 cmp %g1, 0
40011b94: 22 80 00 47 be,a 40011cb0 <fat_file_extend+0x1f8>
40011b98: f6 27 00 00 st %i3, [ %i4 ]
if ( fat_fd->fat_file_size == 0 )
40011b9c: d6 06 60 18 ld [ %i1 + 0x18 ], %o3
40011ba0: 80 a2 e0 00 cmp %o3, 0
40011ba4: 32 80 00 48 bne,a 40011cc4 <fat_file_extend+0x20c>
40011ba8: d2 06 60 3c ld [ %i1 + 0x3c ], %o1
fat_fd->map.disk_cln = chain;
40011bac: c4 07 bf f0 ld [ %fp + -16 ], %g2
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40011bb0: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
40011bb4: 82 10 60 02 or %g1, 2, %g1
40011bb8: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
fat_fd->map.file_cln = 0;
40011bbc: c0 26 60 34 clr [ %i1 + 0x34 ]
fat_fd->cln = cln;
40011bc0: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40011bc4: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ]
fat_fd->map.last_cln = last_cl;
40011bc8: c2 07 bf f8 ld [ %fp + -8 ], %g1
40011bcc: c2 26 60 3c st %g1, [ %i1 + 0x3c ]
if (fat_fd->fat_file_type == FAT_DIRECTORY)
40011bd0: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
40011bd4: 80 a0 60 00 cmp %g1, 0
40011bd8: 32 80 00 36 bne,a 40011cb0 <fat_file_extend+0x1f8>
40011bdc: f6 27 00 00 st %i3, [ %i4 ]
rc = fat_init_clusters_chain(fs_info, chain);
40011be0: d2 07 bf f0 ld [ %fp + -16 ], %o1
40011be4: 7f ff fb 49 call 40010908 <fat_init_clusters_chain>
40011be8: 90 10 00 18 mov %i0, %o0
if ( rc != RC_OK )
40011bec: 82 92 20 00 orcc %o0, 0, %g1
40011bf0: 22 80 00 30 be,a 40011cb0 <fat_file_extend+0x1f8>
<== ALWAYS TAKEN
40011bf4: f6 27 00 00 st %i3, [ %i4 ]
fat_free_fat_clusters_chain(fs_info, chain);
40011bf8: d2 07 bf f0 ld [ %fp + -16 ], %o1
<== NOT EXECUTED
40011bfc: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
40011c00: 7f ff fc c8 call 40010f20 <fat_free_fat_clusters_chain>
<== NOT EXECUTED
40011c04: a0 10 00 01 mov %g1, %l0
<== NOT EXECUTED
return rc;
40011c08: 81 c7 e0 08 ret
<== NOT EXECUTED
40011c0c: 91 e8 00 10 restore %g0, %l0, %o0
<== NOT EXECUTED
if (zero_fill && bytes_remain > 0) {
40011c10: 80 a0 a0 00 cmp %g2, 0
40011c14: 12 80 00 12 bne 40011c5c <fat_file_extend+0x1a4>
40011c18: a2 10 20 00 clr %l1
return RC_OK;
40011c1c: a0 10 20 00 clr %l0
}
40011c20: b0 10 00 10 mov %l0, %i0
40011c24: 81 c7 e0 08 ret
40011c28: 81 e8 00 00 restore
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
40011c2c: 80 a0 a0 00 cmp %g2, 0
40011c30: 32 bf ff af bne,a 40011aec <fat_file_extend+0x34>
<== NEVER TAKEN
40011c34: fa 06 20 08 ld [ %i0 + 8 ], %i5
<== NOT EXECUTED
40011c38: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
40011c3c: 80 88 a0 03 btst 3, %g2
40011c40: 22 bf ff ab be,a 40011aec <fat_file_extend+0x34>
<== NEVER TAKEN
40011c44: fa 06 20 08 ld [ %i0 + 8 ], %i5
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
40011c48: 40 00 26 4a call 4001b570 <__errno>
40011c4c: a0 10 3f ff mov -1, %l0
40011c50: 82 10 20 1c mov 0x1c, %g1
40011c54: 10 bf ff f3 b 40011c20 <fat_file_extend+0x168>
40011c58: c2 22 00 00 st %g1, [ %o0 ]
uint32_t cl_start = start >> fs_info->vol.bpc_log2;
40011c5c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
40011c60: 96 07 bf fc add %fp, -4, %o3
40011c64: 95 30 40 0a srl %g1, %o2, %o2
40011c68: 92 10 00 19 mov %i1, %o1
40011c6c: 7f ff fd 5a call 400111d4 <fat_file_lseek>
40011c70: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
40011c74: a0 92 60 00 orcc %o1, 0, %l0
40011c78: 32 bf ff eb bne,a 40011c24 <fat_file_extend+0x16c>
<== NEVER TAKEN
40011c7c: b0 10 00 10 mov %l0, %i0
<== NOT EXECUTED
bytes_written = fat_cluster_set (fs_info, cur_cln, ofs, bytes_remain, 0);
40011c80: d2 07 bf fc ld [ %fp + -4 ], %o1
40011c84: 98 10 20 00 clr %o4
40011c88: 96 10 00 1d mov %i5, %o3
40011c8c: 94 10 00 12 mov %l2, %o2
40011c90: 90 10 00 18 mov %i0, %o0
40011c94: 7f ff f7 b5 call 4000fb68 <fat_cluster_set>
40011c98: a0 10 3f ff mov -1, %l0
if (bytes_remain != bytes_written)
40011c9c: 80 a2 00 1d cmp %o0, %i5
40011ca0: 32 bf ff e1 bne,a 40011c24 <fat_file_extend+0x16c>
<== NEVER TAKEN
40011ca4: b0 10 00 10 mov %l0, %i0
<== NOT EXECUTED
40011ca8: 10 bf ff 9f b 40011b24 <fat_file_extend+0x6c>
40011cac: 80 a4 60 00 cmp %l1, 0
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40011cb0: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
40011cb4: 82 10 60 02 or %g1, 2, %g1
fat_fd->fat_file_size = s;
40011cb8: f6 26 60 18 st %i3, [ %i1 + 0x18 ]
return RC_OK;
40011cbc: 10 bf ff d9 b 40011c20 <fat_file_extend+0x168>
40011cc0: c2 2e 60 30 stb %g1, [ %i1 + 0x30 ]
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
40011cc4: 80 a2 7f ff cmp %o1, -1
40011cc8: 22 80 00 0d be,a 40011cfc <fat_file_extend+0x244>
<== NEVER TAKEN
40011ccc: 92 10 00 19 mov %i1, %o1
<== NOT EXECUTED
old_last_cl = fat_fd->map.last_cln;
40011cd0: d2 27 bf f4 st %o1, [ %fp + -12 ]
rc = fat_set_fat_cluster(fs_info, old_last_cl, chain);
40011cd4: 90 10 00 18 mov %i0, %o0
40011cd8: 7f ff fb ee call 40010c90 <fat_set_fat_cluster>
40011cdc: d4 07 bf f0 ld [ %fp + -16 ], %o2
if ( rc != RC_OK )
40011ce0: 82 92 20 00 orcc %o0, 0, %g1
40011ce4: 12 bf ff c6 bne 40011bfc <fat_file_extend+0x144>
<== NEVER TAKEN
40011ce8: d2 07 bf f0 ld [ %fp + -16 ], %o1
fat_buf_release(fs_info);
40011cec: 7f ff f7 4b call 4000fa18 <fat_buf_release>
40011cf0: 90 10 00 18 mov %i0, %o0
fat_fd->map.last_cln = last_cl;
40011cf4: 10 bf ff b6 b 40011bcc <fat_file_extend+0x114>
40011cf8: c2 07 bf f8 ld [ %fp + -8 ], %g1
rc = fat_file_ioctl(fs_info, fat_fd, F_CLU_NUM,
40011cfc: 98 07 bf f4 add %fp, -12, %o4
<== NOT EXECUTED
40011d00: 96 02 ff ff add %o3, -1, %o3
<== NOT EXECUTED
40011d04: 94 10 20 01 mov 1, %o2
<== NOT EXECUTED
40011d08: 7f ff ff 37 call 400119e4 <fat_file_ioctl>
<== NOT EXECUTED
40011d0c: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
40011d10: d2 07 bf f4 ld [ %fp + -12 ], %o1
<== NOT EXECUTED
if ( rc != RC_OK )
40011d14: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
40011d18: 02 bf ff ef be 40011cd4 <fat_file_extend+0x21c>
<== NOT EXECUTED
40011d1c: 82 10 00 08 mov %o0, %g1
<== NOT EXECUTED
40011d20: 10 bf ff b7 b 40011bfc <fat_file_extend+0x144>
<== NOT EXECUTED
40011d24: d2 07 bf f0 ld [ %fp + -16 ], %o1
<== NOT EXECUTED
400119e4 <fat_file_ioctl>:
{
400119e4: 9d e3 bf 98 save %sp, -104, %sp
va_start(ap, cmd);
400119e8: 82 07 a0 50 add %fp, 0x50, %g1
400119ec: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
switch (cmd)
400119f0: 80 a6 a0 01 cmp %i2, 1
va_start(ap, cmd);
400119f4: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
400119f8: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
uint32_t cur_cln = 0;
400119fc: c0 27 bf f8 clr [ %fp + -8 ]
switch (cmd)
40011a00: 12 80 00 22 bne 40011a88 <fat_file_ioctl+0xa4>
<== NEVER TAKEN
40011a04: c2 27 bf fc st %g1, [ %fp + -4 ]
ret = va_arg(ap, uint32_t *);
40011a08: 84 07 a0 58 add %fp, 0x58, %g2
40011a0c: c4 27 bf fc st %g2, [ %fp + -4 ]
if ( pos >= fat_fd->fat_file_size ) {
40011a10: c4 06 60 18 ld [ %i1 + 0x18 ], %g2
40011a14: 80 a0 80 1b cmp %g2, %i3
40011a18: 08 80 00 22 bleu 40011aa0 <fat_file_ioctl+0xbc>
<== NEVER TAKEN
40011a1c: ba 10 00 1c mov %i4, %i5
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
40011a20: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
40011a24: 80 a0 60 01 cmp %g1, 1
40011a28: 32 80 00 0d bne,a 40011a5c <fat_file_ioctl+0x78>
40011a2c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2
40011a30: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
40011a34: 80 a0 60 00 cmp %g1, 0
40011a38: 32 80 00 09 bne,a 40011a5c <fat_file_ioctl+0x78>
<== NEVER TAKEN
40011a3c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2
<== NOT EXECUTED
40011a40: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1
40011a44: 80 88 60 03 btst 3, %g1
40011a48: 22 80 00 05 be,a 40011a5c <fat_file_ioctl+0x78>
40011a4c: d4 0e 20 0c ldub [ %i0 + 0xc ], %o2
*ret = 0;
40011a50: c0 27 00 00 clr [ %i4 ]
break;
40011a54: 81 c7 e0 08 ret
40011a58: 91 e8 20 00 restore %g0, 0, %o0
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
40011a5c: 90 10 00 18 mov %i0, %o0
40011a60: 96 07 bf f8 add %fp, -8, %o3
40011a64: 95 36 c0 0a srl %i3, %o2, %o2
40011a68: 7f ff fd db call 400111d4 <fat_file_lseek>
40011a6c: 92 10 00 19 mov %i1, %o1
if ( rc != RC_OK )
40011a70: b0 92 60 00 orcc %o1, 0, %i0
40011a74: 12 80 00 03 bne 40011a80 <fat_file_ioctl+0x9c>
<== NEVER TAKEN
40011a78: c2 07 bf f8 ld [ %fp + -8 ], %g1
*ret = cur_cln;
40011a7c: c2 27 40 00 st %g1, [ %i5 ]
break;
40011a80: 81 c7 e0 08 ret
40011a84: 81 e8 00 00 restore
errno = EINVAL;
40011a88: 40 00 26 ba call 4001b570 <__errno>
<== NOT EXECUTED
40011a8c: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40011a90: 82 10 20 16 mov 0x16, %g1
<== NOT EXECUTED
40011a94: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
}
40011a98: 81 c7 e0 08 ret
<== NOT EXECUTED
40011a9c: 81 e8 00 00 restore
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
40011aa0: 40 00 26 b4 call 4001b570 <__errno>
<== NOT EXECUTED
40011aa4: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40011aa8: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
40011aac: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40011ab0: 81 c7 e0 08 ret
<== NOT EXECUTED
40011ab4: 81 e8 00 00 restore
<== NOT EXECUTED
40011270 <fat_file_open>:
{
40011270: 9d e3 bf a0 save %sp, -96, %sp
return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) +
40011274: c2 06 40 00 ld [ %i1 ], %g1
if (cln == 1)
40011278: 80 a0 60 01 cmp %g1, 1
4001127c: 02 80 00 0b be 400112a8 <fat_file_open+0x38>
40011280: 80 a0 60 00 cmp %g1, 0
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40011284: 32 80 00 76 bne,a 4001145c <fat_file_open+0x1ec>
40011288: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
4001128c: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
40011290: 80 88 a0 03 btst 3, %g2
40011294: 22 80 00 72 be,a 4001145c <fat_file_open+0x1ec>
<== NEVER TAKEN
40011298: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
<== NOT EXECUTED
return fs_info->vol.rdir_loc;
4001129c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
fs_info->vol.sec_mul);
400112a0: fa 0e 20 03 ldub [ %i0 + 3 ], %i5
return (fat_cluster_num_to_sector_num(fs_info, cln) <<
400112a4: 83 28 40 1d sll %g1, %i5, %g1
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
400112a8: c4 06 60 04 ld [ %i1 + 4 ], %g2
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
400112ac: e0 06 20 80 ld [ %i0 + 0x80 ], %l0
400112b0: bb 30 a0 09 srl %g2, 9, %i5
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
400112b4: 85 30 a0 05 srl %g2, 5, %g2
return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) +
400112b8: ba 07 40 01 add %i5, %g1, %i5
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
400112bc: 84 08 a0 0f and %g2, 0xf, %g2
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
400112c0: bb 2f 60 04 sll %i5, 4, %i5
400112c4: ba 07 40 02 add %i5, %g2, %i5
uint32_t mod = (key1) % FAT_HASH_MODULE;
400112c8: 82 0f 60 01 and %i5, 1, %g1
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
400112cc: b7 28 60 01 sll %g1, 1, %i3
400112d0: b6 06 c0 01 add %i3, %g1, %i3
400112d4: b7 2e e0 02 sll %i3, 2, %i3
return _Chain_Immutable_head( the_chain )->next;
400112d8: c8 04 00 1b ld [ %l0 + %i3 ], %g4
400112dc: a0 04 00 1b add %l0, %i3, %l0
return &the_chain->Tail.Node;
400112e0: b8 04 20 04 add %l0, 4, %i4
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
400112e4: 80 a1 00 1c cmp %g4, %i4
400112e8: 22 80 00 1e be,a 40011360 <fat_file_open+0xf0>
400112ec: de 06 20 84 ld [ %i0 + 0x84 ], %o7
return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) +
400112f0: c2 01 20 20 ld [ %g4 + 0x20 ], %g1
if (cln == 1)
400112f4: 80 a0 60 01 cmp %g1, 1
400112f8: 02 80 00 0b be 40011324 <fat_file_open+0xb4>
400112fc: 80 a0 60 00 cmp %g1, 0
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40011300: 32 80 00 5c bne,a 40011470 <fat_file_open+0x200>
40011304: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
40011308: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
4001130c: 80 88 a0 03 btst 3, %g2
40011310: 22 80 00 58 be,a 40011470 <fat_file_open+0x200>
<== NEVER TAKEN
40011314: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
<== NOT EXECUTED
return fs_info->vol.rdir_loc;
40011318: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
fs_info->vol.sec_mul);
4001131c: c4 0e 20 03 ldub [ %i0 + 3 ], %g2
return (fat_cluster_num_to_sector_num(fs_info, cln) <<
40011320: 83 28 40 02 sll %g1, %g2, %g1
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
40011324: c6 01 20 24 ld [ %g4 + 0x24 ], %g3
40011328: 85 30 e0 09 srl %g3, 9, %g2
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
4001132c: 87 30 e0 05 srl %g3, 5, %g3
return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) +
40011330: 82 00 80 01 add %g2, %g1, %g1
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
40011334: 86 08 e0 0f and %g3, 0xf, %g3
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
40011338: 83 28 60 04 sll %g1, 4, %g1
4001133c: 82 00 40 03 add %g1, %g3, %g1
if ( (key1) == ck)
40011340: 80 a7 40 01 cmp %i5, %g1
40011344: 22 80 00 80 be,a 40011544 <fat_file_open+0x2d4>
40011348: c2 01 20 08 ld [ %g4 + 8 ], %g1
the_node = the_node->next;
4001134c: c8 01 00 00 ld [ %g4 ], %g4
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
40011350: 80 a1 00 1c cmp %g4, %i4
40011354: 32 bf ff e8 bne,a 400112f4 <fat_file_open+0x84>
40011358: c2 01 20 20 ld [ %g4 + 0x20 ], %g1
rtems_chain_node *the_node = rtems_chain_first(hash + mod);
4001135c: de 06 20 84 ld [ %i0 + 0x84 ], %o7
return _Chain_Immutable_head( the_chain )->next;
40011360: c8 03 c0 1b ld [ %o7 + %i3 ], %g4
40011364: 9e 03 c0 1b add %o7, %i3, %o7
return &the_chain->Tail.Node;
40011368: 9e 03 e0 04 add %o7, 4, %o7
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
4001136c: 80 a1 00 0f cmp %g4, %o7
40011370: 02 80 00 1e be 400113e8 <fat_file_open+0x178>
<== ALWAYS TAKEN
40011374: 92 10 20 50 mov 0x50, %o1
return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) +
40011378: c2 01 20 20 ld [ %g4 + 0x20 ], %g1
<== NOT EXECUTED
if (cln == 1)
4001137c: 80 a0 60 01 cmp %g1, 1
<== NOT EXECUTED
40011380: 02 80 00 0b be 400113ac <fat_file_open+0x13c>
<== NOT EXECUTED
40011384: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40011388: 32 80 00 3f bne,a 40011484 <fat_file_open+0x214>
<== NOT EXECUTED
4001138c: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
<== NOT EXECUTED
40011390: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
<== NOT EXECUTED
40011394: 80 88 a0 03 btst 3, %g2
<== NOT EXECUTED
40011398: 22 80 00 3b be,a 40011484 <fat_file_open+0x214>
<== NOT EXECUTED
4001139c: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
<== NOT EXECUTED
return fs_info->vol.rdir_loc;
400113a0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
<== NOT EXECUTED
fs_info->vol.sec_mul);
400113a4: c4 0e 20 03 ldub [ %i0 + 3 ], %g2
<== NOT EXECUTED
return (fat_cluster_num_to_sector_num(fs_info, cln) <<
400113a8: 83 28 40 02 sll %g1, %g2, %g1
<== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
400113ac: c6 01 20 24 ld [ %g4 + 0x24 ], %g3
<== NOT EXECUTED
400113b0: 85 30 e0 09 srl %g3, 9, %g2
<== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
400113b4: 87 30 e0 05 srl %g3, 5, %g3
<== NOT EXECUTED
return ( ((fat_cluster_num_to_sector512_num(fs_info, pos->cln) +
400113b8: 82 00 80 01 add %g2, %g1, %g1
<== NOT EXECUTED
((pos->ofs >> 5) & (FAT_DIRENTRIES_PER_SEC512 - 1)) );
400113bc: 86 08 e0 0f and %g3, 0xf, %g3
<== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
400113c0: 83 28 60 04 sll %g1, 4, %g1
<== NOT EXECUTED
400113c4: 82 00 40 03 add %g1, %g3, %g1
<== NOT EXECUTED
if ( (key1) == ck)
400113c8: 80 a7 40 01 cmp %i5, %g1
<== NOT EXECUTED
400113cc: 02 80 00 33 be 40011498 <fat_file_open+0x228>
<== NOT EXECUTED
400113d0: 80 a7 60 00 cmp %i5, 0
<== NOT EXECUTED
the_node = the_node->next;
400113d4: c8 01 00 00 ld [ %g4 ], %g4
<== NOT EXECUTED
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
400113d8: 80 a1 00 0f cmp %g4, %o7
<== NOT EXECUTED
400113dc: 32 bf ff e8 bne,a 4001137c <fat_file_open+0x10c>
<== NOT EXECUTED
400113e0: c2 01 20 20 ld [ %g4 + 0x20 ], %g1
<== NOT EXECUTED
lfat_fd = (*fat_fd) = (fat_file_fd_t*)calloc(1, sizeof(fat_file_fd_t));
400113e4: 92 10 20 50 mov 0x50, %o1
<== NOT EXECUTED
400113e8: 7f ff f6 08 call 4000ec08 <calloc>
400113ec: 90 10 20 01 mov 1, %o0
400113f0: d0 26 80 00 st %o0, [ %i2 ]
if ( lfat_fd == NULL )
400113f4: 80 a2 20 00 cmp %o0, 0
400113f8: 02 80 00 5a be 40011560 <fat_file_open+0x2f0>
<== NEVER TAKEN
400113fc: a2 10 00 08 mov %o0, %l1
lfat_fd->flags &= ~FAT_FILE_REMOVED;
40011400: c2 0c 60 30 ldub [ %l1 + 0x30 ], %g1
40011404: 82 08 7f fe and %g1, -2, %g1
40011408: c2 2c 60 30 stb %g1, [ %l1 + 0x30 ]
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
4001140c: 82 10 3f ff mov -1, %g1
lfat_fd->dir_pos = *dir_pos;
40011410: f6 06 40 00 ld [ %i1 ], %i3
40011414: c8 06 60 04 ld [ %i1 + 4 ], %g4
40011418: c6 06 60 08 ld [ %i1 + 8 ], %g3
4001141c: c4 06 60 0c ld [ %i1 + 0xc ], %g2
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
40011420: c2 24 60 3c st %g1, [ %l1 + 0x3c ]
lfat_fd->links_num = 1;
40011424: b4 10 20 01 mov 1, %i2
old_last = tail->previous;
40011428: c2 04 20 08 ld [ %l0 + 8 ], %g1
4001142c: f4 24 60 08 st %i2, [ %l1 + 8 ]
lfat_fd->dir_pos = *dir_pos;
40011430: f6 24 60 20 st %i3, [ %l1 + 0x20 ]
40011434: c8 24 60 24 st %g4, [ %l1 + 0x24 ]
40011438: c6 24 60 28 st %g3, [ %l1 + 0x28 ]
4001143c: c4 24 60 2c st %g2, [ %l1 + 0x2c ]
lfat_fd->ino = key;
40011440: fa 24 60 0c st %i5, [ %l1 + 0xc ]
the_node->next = tail;
40011444: f8 24 40 00 st %i4, [ %l1 ]
tail->previous = the_node;
40011448: e2 24 20 08 st %l1, [ %l0 + 8 ]
old_last->next = the_node;
4001144c: e2 20 40 00 st %l1, [ %g1 ]
the_node->previous = old_last;
40011450: c2 24 60 04 st %g1, [ %l1 + 4 ]
}
40011454: 81 c7 e0 08 ret
40011458: 91 e8 20 00 restore %g0, 0, %o0
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
4001145c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
40011460: 82 00 7f fe add %g1, -2, %g1
40011464: 83 28 40 03 sll %g1, %g3, %g1
40011468: 10 bf ff 8e b 400112a0 <fat_file_open+0x30>
4001146c: 82 00 40 02 add %g1, %g2, %g1
40011470: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
40011474: 82 00 7f fe add %g1, -2, %g1
40011478: 83 28 40 03 sll %g1, %g3, %g1
4001147c: 10 bf ff a8 b 4001131c <fat_file_open+0xac>
40011480: 82 00 40 02 add %g1, %g2, %g1
40011484: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
<== NOT EXECUTED
40011488: 82 00 7f fe add %g1, -2, %g1
<== NOT EXECUTED
4001148c: 83 28 40 03 sll %g1, %g3, %g1
<== NOT EXECUTED
40011490: 10 bf ff c5 b 400113a4 <fat_file_open+0x134>
<== NOT EXECUTED
40011494: 82 00 40 02 add %g1, %g2, %g1
<== NOT EXECUTED
if ( ((key2) == 0) || ((key2) == ffd->ino) )
40011498: 02 80 00 07 be 400114b4 <fat_file_open+0x244>
<== NOT EXECUTED
4001149c: 92 10 20 50 mov 0x50, %o1
<== NOT EXECUTED
400114a0: c2 01 20 0c ld [ %g4 + 0xc ], %g1
<== NOT EXECUTED
400114a4: 80 a7 40 01 cmp %i5, %g1
<== NOT EXECUTED
400114a8: 32 bf ff cc bne,a 400113d8 <fat_file_open+0x168>
<== NOT EXECUTED
400114ac: c8 01 00 00 ld [ %g4 ], %g4
<== NOT EXECUTED
lfat_fd = (*fat_fd) = (fat_file_fd_t*)calloc(1, sizeof(fat_file_fd_t));
400114b0: 92 10 20 50 mov 0x50, %o1
<== NOT EXECUTED
400114b4: 7f ff f5 d5 call 4000ec08 <calloc>
<== NOT EXECUTED
400114b8: 90 10 20 01 mov 1, %o0
<== NOT EXECUTED
400114bc: d0 26 80 00 st %o0, [ %i2 ]
<== NOT EXECUTED
if ( lfat_fd == NULL )
400114c0: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
400114c4: 02 80 00 27 be 40011560 <fat_file_open+0x2f0>
<== NOT EXECUTED
400114c8: a2 10 00 08 mov %o0, %l1
<== NOT EXECUTED
lfat_fd->flags &= ~FAT_FILE_REMOVED;
400114cc: c2 0c 60 30 ldub [ %l1 + 0x30 ], %g1
<== NOT EXECUTED
400114d0: 82 08 7f fe and %g1, -2, %g1
<== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
400114d4: fa 06 40 00 ld [ %i1 ], %i5
<== NOT EXECUTED
400114d8: c8 06 60 04 ld [ %i1 + 4 ], %g4
<== NOT EXECUTED
400114dc: c6 06 60 08 ld [ %i1 + 8 ], %g3
<== NOT EXECUTED
400114e0: c4 06 60 0c ld [ %i1 + 0xc ], %g2
<== NOT EXECUTED
lfat_fd->flags &= ~FAT_FILE_REMOVED;
400114e4: c2 2c 60 30 stb %g1, [ %l1 + 0x30 ]
<== NOT EXECUTED
lfat_fd->links_num = 1;
400114e8: 82 10 20 01 mov 1, %g1
<== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
400114ec: fa 24 60 20 st %i5, [ %l1 + 0x20 ]
<== NOT EXECUTED
lfat_fd->ino = fat_get_unique_ino(fs_info);
400114f0: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
lfat_fd->links_num = 1;
400114f4: c2 24 60 08 st %g1, [ %l1 + 8 ]
<== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
400114f8: 82 10 3f ff mov -1, %g1
<== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
400114fc: c8 24 60 24 st %g4, [ %l1 + 0x24 ]
<== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
40011500: c2 24 60 3c st %g1, [ %l1 + 0x3c ]
<== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
40011504: c6 24 60 28 st %g3, [ %l1 + 0x28 ]
<== NOT EXECUTED
lfat_fd->ino = fat_get_unique_ino(fs_info);
40011508: 7f ff fd 1e call 40010980 <fat_get_unique_ino>
<== NOT EXECUTED
4001150c: c4 24 60 2c st %g2, [ %l1 + 0x2c ]
<== NOT EXECUTED
if ( lfat_fd->ino == 0 )
40011510: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
40011514: 02 80 00 11 be 40011558 <fat_file_open+0x2e8>
<== NOT EXECUTED
40011518: d0 24 60 0c st %o0, [ %l1 + 0xc ]
<== NOT EXECUTED
4001151c: e0 06 20 80 ld [ %i0 + 0x80 ], %l0
<== NOT EXECUTED
40011520: a0 04 00 1b add %l0, %i3, %l0
<== NOT EXECUTED
old_last = tail->previous;
40011524: c2 04 20 08 ld [ %l0 + 8 ], %g1
<== NOT EXECUTED
40011528: b8 04 20 04 add %l0, 4, %i4
<== NOT EXECUTED
the_node->next = tail;
4001152c: f8 24 40 00 st %i4, [ %l1 ]
<== NOT EXECUTED
tail->previous = the_node;
40011530: e2 24 20 08 st %l1, [ %l0 + 8 ]
<== NOT EXECUTED
old_last->next = the_node;
40011534: e2 20 40 00 st %l1, [ %g1 ]
<== NOT EXECUTED
the_node->previous = old_last;
40011538: c2 24 60 04 st %g1, [ %l1 + 4 ]
<== NOT EXECUTED
}
4001153c: 81 c7 e0 08 ret
<== NOT EXECUTED
40011540: 91 e8 20 00 restore %g0, 0, %o0
<== NOT EXECUTED
(*fat_fd) = lfat_fd;
40011544: c8 26 80 00 st %g4, [ %i2 ]
lfat_fd->links_num++;
40011548: 82 00 60 01 inc %g1
4001154c: c2 21 20 08 st %g1, [ %g4 + 8 ]
return rc;
40011550: 81 c7 e0 08 ret
40011554: 91 e8 20 00 restore %g0, 0, %o0
free((*fat_fd));
40011558: 7f ff c9 80 call 40003b58 <free>
<== NOT EXECUTED
4001155c: d0 06 80 00 ld [ %i2 ], %o0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
40011560: 40 00 28 04 call 4001b570 <__errno>
<== NOT EXECUTED
40011564: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40011568: 82 10 20 0c mov 0xc, %g1
<== NOT EXECUTED
4001156c: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40011570: 81 c7 e0 08 ret
<== NOT EXECUTED
40011574: 81 e8 00 00 restore
<== NOT EXECUTED
40011614 <fat_file_read>:
{
40011614: 9d e3 bf 98 save %sp, -104, %sp
uint32_t cur_cln = 0;
40011618: c0 27 bf fc clr [ %fp + -4 ]
{
4001161c: ba 10 00 18 mov %i0, %i5
if (count == 0)
40011620: 80 a6 e0 00 cmp %i3, 0
40011624: 02 80 00 27 be 400116c0 <fat_file_read+0xac>
<== NEVER TAKEN
40011628: b0 10 20 00 clr %i0
if ( start >= fat_fd->fat_file_size )
4001162c: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
40011630: 80 a0 40 1a cmp %g1, %i2
40011634: 08 80 00 23 bleu 400116c0 <fat_file_read+0xac>
40011638: 80 a0 40 1b cmp %g1, %i3
if ((count > fat_fd->fat_file_size) ||
4001163c: 1a 80 00 5d bcc 400117b0 <fat_file_read+0x19c>
40011640: 84 20 40 1b sub %g1, %i3, %g2
count = fat_fd->fat_file_size - start;
40011644: b6 20 40 1a sub %g1, %i2, %i3
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
40011648: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
4001164c: 80 a0 60 01 cmp %g1, 1
40011650: 32 80 00 1e bne,a 400116c8 <fat_file_read+0xb4>
40011654: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2
40011658: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
4001165c: 80 a0 60 00 cmp %g1, 0
40011660: 32 80 00 1a bne,a 400116c8 <fat_file_read+0xb4>
<== NEVER TAKEN
40011664: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2
<== NOT EXECUTED
40011668: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1
4001166c: 80 88 60 03 btst 3, %g1
40011670: 22 80 00 16 be,a 400116c8 <fat_file_read+0xb4>
40011674: e4 0f 60 0c ldub [ %i5 + 0xc ], %l2
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->cln);
40011678: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4001167c: 80 a0 60 00 cmp %g1, 0
40011680: 32 80 00 5c bne,a 400117f0 <fat_file_read+0x1dc>
<== NEVER TAKEN
40011684: c4 0f 60 05 ldub [ %i5 + 5 ], %g2
<== NOT EXECUTED
return fs_info->vol.rdir_loc;
40011688: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
byte = start & (fs_info->vol.bps - 1);
4001168c: d4 17 40 00 lduh [ %i5 ], %o2
sec += (start >> fs_info->vol.sec_log2);
40011690: d2 0f 60 02 ldub [ %i5 + 2 ], %o1
byte = start & (fs_info->vol.bps - 1);
40011694: 94 02 bf ff add %o2, -1, %o2
sec += (start >> fs_info->vol.sec_log2);
40011698: 93 36 80 09 srl %i2, %o1, %o1
ret = _fat_block_read(fs_info, sec, byte, count, buf);
4001169c: 98 10 00 1c mov %i4, %o4
400116a0: 96 10 00 1b mov %i3, %o3
400116a4: 94 0a 80 1a and %o2, %i2, %o2
400116a8: 92 02 40 01 add %o1, %g1, %o1
400116ac: 7f ff f8 e4 call 4000fa3c <_fat_block_read>
400116b0: 90 10 00 1d mov %i5, %o0
400116b4: b0 92 20 00 orcc %o0, 0, %i0
400116b8: 06 80 00 43 bl 400117c4 <fat_file_read+0x1b0>
<== NEVER TAKEN
400116bc: 01 00 00 00 nop
}
400116c0: 81 c7 e0 08 ret
400116c4: 81 e8 00 00 restore
cl_start = start >> fs_info->vol.bpc_log2;
400116c8: a5 36 80 12 srl %i2, %l2, %l2
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
400116cc: e0 07 60 08 ld [ %i5 + 8 ], %l0
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
400116d0: 94 10 00 12 mov %l2, %o2
400116d4: 96 07 bf fc add %fp, -4, %o3
400116d8: 92 10 00 19 mov %i1, %o1
400116dc: 7f ff fe be call 400111d4 <fat_file_lseek>
400116e0: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
400116e4: b0 92 60 00 orcc %o1, 0, %i0
400116e8: 12 bf ff f6 bne 400116c0 <fat_file_read+0xac>
<== NEVER TAKEN
400116ec: a0 04 3f ff add %l0, -1, %l0
uint32_t cmpltd = 0;
400116f0: a2 10 20 00 clr %l1
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
400116f4: b4 0c 00 1a and %l0, %i2, %i2
400116f8: 10 80 00 1f b 40011774 <fat_file_read+0x160>
400116fc: 84 10 00 1a mov %i2, %g2
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40011700: 80 88 e0 03 btst 3, %g3
<== NOT EXECUTED
40011704: 22 80 00 26 be,a 4001179c <fat_file_read+0x188>
<== NOT EXECUTED
40011708: c6 0f 60 05 ldub [ %i5 + 5 ], %g3
<== NOT EXECUTED
return fs_info->vol.rdir_loc;
4001170c: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
<== NOT EXECUTED
byte = ofs & (fs_info->vol.bps - 1);
40011710: d4 17 40 00 lduh [ %i5 ], %o2
sec += (ofs >> fs_info->vol.sec_log2);
40011714: d2 0f 60 02 ldub [ %i5 + 2 ], %o1
40011718: 93 30 80 09 srl %g2, %o1, %o1
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
4001171c: 98 07 00 11 add %i4, %l1, %o4
byte = ofs & (fs_info->vol.bps - 1);
40011720: 94 02 bf ff add %o2, -1, %o2
ret = _fat_block_read(fs_info, sec, byte, c, buf + cmpltd);
40011724: 96 10 00 10 mov %l0, %o3
40011728: 94 0a 80 02 and %o2, %g2, %o2
4001172c: 92 02 40 01 add %o1, %g1, %o1
40011730: 7f ff f8 c3 call 4000fa3c <_fat_block_read>
40011734: 90 10 00 1d mov %i5, %o0
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
40011738: 94 07 bf fc add %fp, -4, %o2
if ( ret < 0 )
4001173c: 80 a2 20 00 cmp %o0, 0
40011740: 06 80 00 21 bl 400117c4 <fat_file_read+0x1b0>
<== NEVER TAKEN
40011744: 90 10 00 1d mov %i5, %o0
save_cln = cur_cln;
40011748: e6 07 bf fc ld [ %fp + -4 ], %l3
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
4001174c: 92 10 00 13 mov %l3, %o1
40011750: 7f ff fc da call 40010ab8 <fat_get_fat_cluster>
40011754: b6 26 c0 10 sub %i3, %l0, %i3
cmpltd += c;
40011758: a2 04 40 10 add %l1, %l0, %l1
if ( rc != RC_OK )
4001175c: 80 a2 20 00 cmp %o0, 0
40011760: 12 bf ff d8 bne 400116c0 <fat_file_read+0xac>
<== NEVER TAKEN
40011764: b0 10 00 08 mov %o0, %i0
while (count > 0)
40011768: 80 a6 e0 00 cmp %i3, 0
4001176c: 02 80 00 18 be 400117cc <fat_file_read+0x1b8>
40011770: 84 10 20 00 clr %g2
c = MIN(count, (fs_info->vol.bpc - ofs));
40011774: e0 07 60 08 ld [ %i5 + 8 ], %l0
40011778: a0 24 00 02 sub %l0, %g2, %l0
4001177c: 80 a4 00 1b cmp %l0, %i3
40011780: 38 80 00 02 bgu,a 40011788 <fat_file_read+0x174>
40011784: a0 10 00 1b mov %i3, %l0
sec = fat_cluster_num_to_sector_num(fs_info, cur_cln);
40011788: c2 07 bf fc ld [ %fp + -4 ], %g1
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
4001178c: 80 a0 60 00 cmp %g1, 0
40011790: 22 bf ff dc be,a 40011700 <fat_file_read+0xec>
<== NEVER TAKEN
40011794: c6 0f 60 16 ldub [ %i5 + 0x16 ], %g3
<== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
40011798: c6 0f 60 05 ldub [ %i5 + 5 ], %g3
4001179c: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
400117a0: 82 00 7f fe add %g1, -2, %g1
400117a4: 83 28 40 03 sll %g1, %g3, %g1
400117a8: 10 bf ff da b 40011710 <fat_file_read+0xfc>
400117ac: 82 00 40 09 add %g1, %o1, %g1
if ((count > fat_fd->fat_file_size) ||
400117b0: 80 a0 80 1a cmp %g2, %i2
400117b4: 3a bf ff a6 bcc,a 4001164c <fat_file_read+0x38>
400117b8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
400117bc: 10 bf ff a3 b 40011648 <fat_file_read+0x34>
400117c0: b6 20 40 1a sub %g1, %i2, %i3
}
400117c4: 81 c7 e0 08 ret
<== NOT EXECUTED
400117c8: 91 e8 3f ff restore %g0, -1, %o0
<== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
400117cc: c4 0f 60 0c ldub [ %i5 + 0xc ], %g2
400117d0: 82 06 bf ff add %i2, -1, %g1
fat_fd->map.disk_cln = save_cln;
400117d4: e6 26 60 38 st %l3, [ %i1 + 0x38 ]
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
400117d8: 82 00 40 11 add %g1, %l1, %g1
400117dc: 83 30 40 02 srl %g1, %g2, %g1
fat_fd->map.file_cln = cl_start +
400117e0: a4 00 40 12 add %g1, %l2, %l2
400117e4: e4 26 60 34 st %l2, [ %i1 + 0x34 ]
return cmpltd;
400117e8: 81 c7 e0 08 ret
400117ec: 91 e8 00 11 restore %g0, %l1, %o0
400117f0: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
<== NOT EXECUTED
400117f4: 82 00 7f fe add %g1, -2, %g1
<== NOT EXECUTED
400117f8: 83 28 40 02 sll %g1, %g2, %g1
<== NOT EXECUTED
400117fc: 10 bf ff a4 b 4001168c <fat_file_read+0x78>
<== NOT EXECUTED
40011800: 82 00 40 09 add %g1, %o1, %g1
<== NOT EXECUTED
40011f98 <fat_file_size>:
{
40011f98: 9d e3 bf 98 save %sp, -104, %sp
uint32_t cur_cln = fat_fd->cln;
40011f9c: f8 06 60 1c ld [ %i1 + 0x1c ], %i4
40011fa0: f8 27 bf fc st %i4, [ %fp + -4 ]
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
40011fa4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
40011fa8: 80 a0 60 01 cmp %g1, 1
40011fac: 22 80 00 22 be,a 40012034 <fat_file_size+0x9c>
40011fb0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
fat_fd->fat_file_size = 0;
40011fb4: c0 26 60 18 clr [ %i1 + 0x18 ]
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
40011fb8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
40011fbc: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
40011fc0: 82 0f 00 01 and %i4, %g1, %g1
40011fc4: 80 a0 80 01 cmp %g2, %g1
40011fc8: 18 80 00 0f bgu 40012004 <fat_file_size+0x6c>
<== ALWAYS TAKEN
40011fcc: 92 10 00 1c mov %i4, %o1
uint32_t save_cln = 0;
40011fd0: 10 80 00 15 b 40012024 <fat_file_size+0x8c>
<== NOT EXECUTED
40011fd4: b8 10 20 00 clr %i4
<== NOT EXECUTED
fat_fd->fat_file_size += fs_info->vol.bpc;
40011fd8: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
40011fdc: 82 00 40 02 add %g1, %g2, %g1
40011fe0: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
40011fe4: c4 07 bf fc ld [ %fp + -4 ], %g2
40011fe8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
40011fec: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
40011ff0: 82 08 80 01 and %g2, %g1, %g1
40011ff4: 80 a0 40 03 cmp %g1, %g3
40011ff8: 1a 80 00 0b bcc 40012024 <fat_file_size+0x8c>
40011ffc: 92 10 00 02 mov %g2, %o1
40012000: b8 10 00 02 mov %g2, %i4
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
40012004: 94 07 bf fc add %fp, -4, %o2
40012008: 7f ff fa ac call 40010ab8 <fat_get_fat_cluster>
4001200c: 90 10 00 18 mov %i0, %o0
if ( rc != RC_OK )
40012010: 80 a2 20 00 cmp %o0, 0
40012014: 22 bf ff f1 be,a 40011fd8 <fat_file_size+0x40>
<== ALWAYS TAKEN
40012018: c4 06 20 08 ld [ %i0 + 8 ], %g2
}
4001201c: 81 c7 e0 08 ret
40012020: 91 e8 00 08 restore %g0, %o0, %o0
return rc;
40012024: 90 10 20 00 clr %o0
fat_fd->map.last_cln = save_cln;
40012028: f8 26 60 3c st %i4, [ %i1 + 0x3c ]
}
4001202c: 81 c7 e0 08 ret
40012030: 91 e8 00 08 restore %g0, %o0, %o0
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
40012034: 80 a0 60 00 cmp %g1, 0
40012038: 32 bf ff e0 bne,a 40011fb8 <fat_file_size+0x20>
<== NEVER TAKEN
4001203c: c0 26 60 18 clr [ %i1 + 0x18 ]
<== NOT EXECUTED
40012040: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1
40012044: 80 88 60 03 btst 3, %g1
40012048: 22 bf ff dc be,a 40011fb8 <fat_file_size+0x20>
4001204c: c0 26 60 18 clr [ %i1 + 0x18 ]
fat_fd->fat_file_size = fs_info->vol.rdir_size;
40012050: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
40012054: c2 26 60 18 st %g1, [ %i1 + 0x18 ]
return rc;
40012058: 10 bf ff f1 b 4001201c <fat_file_size+0x84>
4001205c: 90 10 20 00 clr %o0
40011804 <fat_file_truncate>:
{
40011804: 9d e3 bf 98 save %sp, -104, %sp
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
40011808: 82 10 3f ff mov -1, %g1
uint32_t cur_cln = 0;
4001180c: c0 27 bf f8 clr [ %fp + -8 ]
uint32_t new_last_cln = FAT_UNDEFINED_VALUE;
40011810: c2 27 bf fc st %g1, [ %fp + -4 ]
if ( new_length >= fat_fd->fat_file_size )
40011814: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
40011818: 80 a0 40 1a cmp %g1, %i2
4001181c: 08 80 00 32 bleu 400118e4 <fat_file_truncate+0xe0>
40011820: 80 a0 60 00 cmp %g1, 0
assert(fat_fd->fat_file_size);
40011824: 02 80 00 33 be 400118f0 <fat_file_truncate+0xec>
<== NEVER TAKEN
40011828: 17 10 00 99 sethi %hi(0x40026400), %o3
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
4001182c: c4 0e 20 0c ldub [ %i0 + 0xc ], %g2
40011830: c6 06 20 08 ld [ %i0 + 8 ], %g3
40011834: b4 06 80 03 add %i2, %g3, %i2
40011838: b4 06 bf ff add %i2, -1, %i2
4001183c: b5 36 80 02 srl %i2, %g2, %i2
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
40011840: 85 2e 80 02 sll %i2, %g2, %g2
40011844: 80 a0 40 02 cmp %g1, %g2
40011848: 08 80 00 27 bleu 400118e4 <fat_file_truncate+0xe0>
4001184c: 80 a6 a0 00 cmp %i2, 0
if (cl_start != 0)
40011850: 02 80 00 0a be 40011878 <fat_file_truncate+0x74>
40011854: 96 07 bf f8 add %fp, -8, %o3
rc = fat_file_lseek(fs_info, fat_fd, cl_start - 1, &new_last_cln);
40011858: 96 07 bf fc add %fp, -4, %o3
4001185c: 94 06 bf ff add %i2, -1, %o2
40011860: 92 10 00 19 mov %i1, %o1
40011864: 7f ff fe 5c call 400111d4 <fat_file_lseek>
40011868: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
4001186c: 80 a2 60 00 cmp %o1, 0
40011870: 12 80 00 1e bne 400118e8 <fat_file_truncate+0xe4>
<== NEVER TAKEN
40011874: 96 07 bf f8 add %fp, -8, %o3
rc = fat_file_lseek(fs_info, fat_fd, cl_start, &cur_cln);
40011878: 94 10 00 1a mov %i2, %o2
4001187c: 92 10 00 19 mov %i1, %o1
40011880: 7f ff fe 55 call 400111d4 <fat_file_lseek>
40011884: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
40011888: 80 a2 60 00 cmp %o1, 0
4001188c: 12 80 00 17 bne 400118e8 <fat_file_truncate+0xe4>
<== NEVER TAKEN
40011890: 01 00 00 00 nop
rc = fat_free_fat_clusters_chain(fs_info, cur_cln);
40011894: d2 07 bf f8 ld [ %fp + -8 ], %o1
40011898: 7f ff fd a2 call 40010f20 <fat_free_fat_clusters_chain>
4001189c: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
400118a0: 92 92 20 00 orcc %o0, 0, %o1
400118a4: 12 80 00 11 bne 400118e8 <fat_file_truncate+0xe4>
<== NEVER TAKEN
400118a8: 80 a6 a0 00 cmp %i2, 0
if (cl_start != 0)
400118ac: 02 80 00 0f be 400118e8 <fat_file_truncate+0xe4>
400118b0: 92 10 20 00 clr %o1
rc = fat_set_fat_cluster(fs_info, new_last_cln, FAT_GENFAT_EOC);
400118b4: d2 07 bf fc ld [ %fp + -4 ], %o1
400118b8: 94 10 3f ff mov -1, %o2
400118bc: 7f ff fc f5 call 40010c90 <fat_set_fat_cluster>
400118c0: 90 10 00 18 mov %i0, %o0
if ( rc != RC_OK )
400118c4: 92 92 20 00 orcc %o0, 0, %o1
400118c8: 12 80 00 08 bne 400118e8 <fat_file_truncate+0xe4>
<== NEVER TAKEN
400118cc: c2 07 bf fc ld [ %fp + -4 ], %g1
fat_fd->map.file_cln = cl_start - 1;
400118d0: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = new_last_cln;
400118d4: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
fat_fd->map.file_cln = cl_start - 1;
400118d8: f4 26 60 34 st %i2, [ %i1 + 0x34 ]
fat_fd->map.last_cln = new_last_cln;
400118dc: 10 80 00 03 b 400118e8 <fat_file_truncate+0xe4>
400118e0: c2 26 60 3c st %g1, [ %i1 + 0x3c ]
return rc;
400118e4: 92 10 20 00 clr %o1
}
400118e8: 81 c7 e0 08 ret
400118ec: 91 e8 00 09 restore %g0, %o1, %o0
assert(fat_fd->fat_file_size);
400118f0: 15 10 00 9a sethi %hi(0x40026800), %o2
<== NOT EXECUTED
400118f4: 11 10 00 9a sethi %hi(0x40026800), %o0
<== NOT EXECUTED
400118f8: 96 12 e3 f0 or %o3, 0x3f0, %o3
<== NOT EXECUTED
400118fc: 94 12 a0 50 or %o2, 0x50, %o2
<== NOT EXECUTED
40011900: 92 10 22 e3 mov 0x2e3, %o1
<== NOT EXECUTED
40011904: 40 00 1c 24 call 40018994 <__assert_func>
<== NOT EXECUTED
40011908: 90 12 20 08 or %o0, 8, %o0
<== NOT EXECUTED
4001190c: 01 00 00 00 nop
<== NOT EXECUTED
40011590 <fat_file_update>:
{
40011590: 9d e3 bf a0 save %sp, -96, %sp
if (!FAT_FILE_IS_REMOVED(fat_fd) &&
40011594: c2 0e 60 30 ldub [ %i1 + 0x30 ], %g1
40011598: 80 88 60 01 btst 1, %g1
4001159c: 12 80 00 1c bne 4001160c <fat_file_update+0x7c>
400115a0: ba 10 20 00 clr %i5
400115a4: 80 88 60 02 btst 2, %g1
400115a8: 02 80 00 19 be 4001160c <fat_file_update+0x7c>
400115ac: 01 00 00 00 nop
FAT_FILE_HAS_META_DATA_CHANGED(fat_fd) &&
400115b0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
400115b4: 80 a0 60 01 cmp %g1, 1
400115b8: 12 80 00 06 bne 400115d0 <fat_file_update+0x40>
400115bc: 92 10 00 19 mov %i1, %o1
!FAT_FD_OF_ROOT_DIR(fat_fd))
400115c0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
400115c4: 80 a0 60 00 cmp %g1, 0
400115c8: 02 80 00 11 be 4001160c <fat_file_update+0x7c>
<== ALWAYS TAKEN
400115cc: 01 00 00 00 nop
rc = fat_file_write_first_cluster_num(fs_info, fat_fd);
400115d0: 40 00 06 15 call 40012e24 <fat_file_write_first_cluster_num>
400115d4: 90 10 00 18 mov %i0, %o0
rc = fat_file_write_file_size(fs_info, fat_fd);
400115d8: 92 10 00 19 mov %i1, %o1
rc = fat_file_write_first_cluster_num(fs_info, fat_fd);
400115dc: ba 10 00 08 mov %o0, %i5
rc = fat_file_write_file_size(fs_info, fat_fd);
400115e0: 40 00 06 42 call 40012ee8 <fat_file_write_file_size>
400115e4: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
400115e8: 80 a2 20 00 cmp %o0, 0
400115ec: 32 80 00 02 bne,a 400115f4 <fat_file_update+0x64>
<== NEVER TAKEN
400115f0: ba 10 00 08 mov %o0, %i5
<== NOT EXECUTED
rc = fat_file_write_time_and_date(fs_info, fat_fd);
400115f4: 92 10 00 19 mov %i1, %o1
400115f8: 40 00 05 a6 call 40012c90 <fat_file_write_time_and_date>
400115fc: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
40011600: 80 a2 20 00 cmp %o0, 0
40011604: 32 80 00 02 bne,a 4001160c <fat_file_update+0x7c>
<== NEVER TAKEN
40011608: ba 10 00 08 mov %o0, %i5
<== NOT EXECUTED
}
4001160c: 81 c7 e0 08 ret
40011610: 91 e8 00 1d restore %g0, %i5, %o0
40011d28 <fat_file_write>:
{
40011d28: 9d e3 bf 98 save %sp, -104, %sp
uint32_t c = 0;
40011d2c: c0 27 bf f8 clr [ %fp + -8 ]
if ( count == 0 )
40011d30: 80 a6 e0 00 cmp %i3, 0
40011d34: 02 80 00 4c be 40011e64 <fat_file_write+0x13c>
<== NEVER TAKEN
40011d38: 92 10 20 00 clr %o1
if (start >= fat_fd->size_limit)
40011d3c: fa 06 60 14 ld [ %i1 + 0x14 ], %i5
40011d40: 80 a7 40 1a cmp %i5, %i2
40011d44: 08 80 00 43 bleu 40011e50 <fat_file_write+0x128>
<== NEVER TAKEN
40011d48: ba 27 40 1a sub %i5, %i2, %i5
40011d4c: 80 a7 40 1b cmp %i5, %i3
bool zero_fill = start > fat_fd->fat_file_size;
40011d50: 18 80 00 47 bgu 40011e6c <fat_file_write+0x144>
<== ALWAYS TAKEN
40011d54: c2 06 60 18 ld [ %i1 + 0x18 ], %g1
40011d58: 80 a0 40 1a cmp %g1, %i2
<== NOT EXECUTED
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
40011d5c: 92 10 00 19 mov %i1, %o1
<== NOT EXECUTED
40011d60: 94 40 20 00 addx %g0, 0, %o2
<== NOT EXECUTED
40011d64: b6 06 80 1d add %i2, %i5, %i3
<== NOT EXECUTED
40011d68: 98 07 bf f8 add %fp, -8, %o4
<== NOT EXECUTED
40011d6c: 96 10 00 1b mov %i3, %o3
<== NOT EXECUTED
40011d70: 7f ff ff 52 call 40011ab8 <fat_file_extend>
<== NOT EXECUTED
40011d74: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
if (RC_OK == rc)
40011d78: 92 92 20 00 orcc %o0, 0, %o1
<== NOT EXECUTED
40011d7c: 12 80 00 3a bne 40011e64 <fat_file_write+0x13c>
<== NOT EXECUTED
40011d80: c2 07 bf f8 ld [ %fp + -8 ], %g1
<== NOT EXECUTED
if (c != (start + count))
40011d84: 80 a6 c0 01 cmp %i3, %g1
<== NOT EXECUTED
40011d88: 32 80 00 02 bne,a 40011d90 <fat_file_write+0x68>
40011d8c: ba 20 40 1a sub %g1, %i2, %i5
40011d90: f6 0e 20 0c ldub [ %i0 + 0xc ], %i3
return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16));
40011d94: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
40011d98: 80 a0 60 01 cmp %g1, 1
40011d9c: 02 80 00 51 be 40011ee0 <fat_file_write+0x1b8>
40011da0: a1 36 80 1b srl %i2, %i3, %l0
uint32_t cur_cln = 0;
40011da4: c0 27 bf fc clr [ %fp + -4 ]
rc = fat_file_lseek(fs_info, fat_fd, start_cln, &cur_cln);
40011da8: 94 10 00 10 mov %l0, %o2
40011dac: 96 07 bf fc add %fp, -4, %o3
40011db0: 92 10 00 19 mov %i1, %o1
40011db4: 7f ff fd 08 call 400111d4 <fat_file_lseek>
40011db8: 90 10 00 18 mov %i0, %o0
if (RC_OK == rc)
40011dbc: 80 a2 60 00 cmp %o1, 0
40011dc0: 12 80 00 44 bne 40011ed0 <fat_file_write+0x1a8>
<== NEVER TAKEN
40011dc4: b7 2c 00 1b sll %l0, %i3, %i3
uint32_t save_cln = 0; /* FIXME: This might be incorrect, cf. below */
40011dc8: a4 10 20 00 clr %l2
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
40011dcc: b4 26 80 1b sub %i2, %i3, %i2
uint32_t cmpltd = 0;
40011dd0: a2 10 20 00 clr %l1
uint32_t ofs_cln = start - (start_cln << fs_info->vol.bpc_log2);
40011dd4: b6 10 00 1a mov %i2, %i3
ret = fat_cluster_write(fs_info,
40011dd8: 94 10 00 1b mov %i3, %o2
while ( (RC_OK == rc)
40011ddc: 80 a2 60 00 cmp %o1, 0
40011de0: 12 80 00 31 bne 40011ea4 <fat_file_write+0x17c>
<== NEVER TAKEN
40011de4: 90 10 00 18 mov %i0, %o0
40011de8: 80 a7 60 00 cmp %i5, 0
40011dec: 22 80 00 2f be,a 40011ea8 <fat_file_write+0x180>
40011df0: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1
c = MIN(bytes_to_write, (fs_info->vol.bpc - ofs_cln));
40011df4: d6 06 20 08 ld [ %i0 + 8 ], %o3
40011df8: 96 22 c0 1b sub %o3, %i3, %o3
40011dfc: 80 a2 c0 1d cmp %o3, %i5
40011e00: 08 80 00 03 bleu 40011e0c <fat_file_write+0xe4>
40011e04: 98 07 00 11 add %i4, %l1, %o4
40011e08: 96 10 00 1d mov %i5, %o3
ret = fat_cluster_write(fs_info,
40011e0c: 7f ff f7 b2 call 4000fcd4 <fat_cluster_write>
40011e10: d2 07 bf fc ld [ %fp + -4 ], %o1
if (0 > ret)
40011e14: 80 a2 20 00 cmp %o0, 0
40011e18: 06 bf ff f0 bl 40011dd8 <fat_file_write+0xb0>
<== NEVER TAKEN
40011e1c: 92 10 3f ff mov -1, %o1
save_cln = cur_cln;
40011e20: e4 07 bf fc ld [ %fp + -4 ], %l2
cmpltd += ret;
40011e24: a2 04 40 08 add %l1, %o0, %l1
if (0 < bytes_to_write)
40011e28: 92 10 20 00 clr %o1
40011e2c: ba a7 40 08 subcc %i5, %o0, %i5
40011e30: 02 bf ff ea be 40011dd8 <fat_file_write+0xb0>
40011e34: b6 10 20 00 clr %i3
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
40011e38: 92 10 00 12 mov %l2, %o1
40011e3c: 94 07 bf fc add %fp, -4, %o2
40011e40: 7f ff fb 1e call 40010ab8 <fat_get_fat_cluster>
40011e44: 90 10 00 18 mov %i0, %o0
40011e48: 10 bf ff e4 b 40011dd8 <fat_file_write+0xb0>
40011e4c: 92 10 00 08 mov %o0, %o1
rtems_set_errno_and_return_minus_one(EFBIG);
40011e50: 40 00 25 c8 call 4001b570 <__errno>
<== NOT EXECUTED
40011e54: 01 00 00 00 nop
<== NOT EXECUTED
40011e58: 82 10 20 1b mov 0x1b, %g1 ! 1b <_TLS_Alignment+0x1a>
<== NOT EXECUTED
40011e5c: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40011e60: 92 10 3f ff mov -1, %o1
<== NOT EXECUTED
}
40011e64: 81 c7 e0 08 ret
40011e68: 91 e8 00 09 restore %g0, %o1, %o0
bool zero_fill = start > fat_fd->fat_file_size;
40011e6c: 80 a0 40 1a cmp %g1, %i2
rc = fat_file_extend(fs_info, fat_fd, zero_fill, start + count, &c);
40011e70: 92 10 00 19 mov %i1, %o1
40011e74: 94 40 20 00 addx %g0, 0, %o2
40011e78: ba 10 00 1b mov %i3, %i5
40011e7c: 98 07 bf f8 add %fp, -8, %o4
40011e80: b6 06 80 1d add %i2, %i5, %i3
40011e84: 90 10 00 18 mov %i0, %o0
40011e88: 7f ff ff 0c call 40011ab8 <fat_file_extend>
40011e8c: 96 10 00 1b mov %i3, %o3
if (RC_OK == rc)
40011e90: 92 92 20 00 orcc %o0, 0, %o1
40011e94: 12 bf ff f4 bne 40011e64 <fat_file_write+0x13c>
40011e98: c2 07 bf f8 ld [ %fp + -8 ], %g1
if (c != (start + count))
40011e9c: 10 bf ff bb b 40011d88 <fat_file_write+0x60>
40011ea0: 80 a6 c0 01 cmp %i3, %g1
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
40011ea4: c2 0e 20 0c ldub [ %i0 + 0xc ], %g1
<== NOT EXECUTED
40011ea8: b4 06 bf ff add %i2, -1, %i2
fat_fd->map.disk_cln = save_cln;
40011eac: e4 26 60 38 st %l2, [ %i1 + 0x38 ]
((ofs_cln_save + cmpltd - 1) >> fs_info->vol.bpc_log2);
40011eb0: b4 06 80 11 add %i2, %l1, %i2
40011eb4: b5 36 80 01 srl %i2, %g1, %i2
fat_fd->map.file_cln = start_cln +
40011eb8: a0 06 80 10 add %i2, %l0, %l0
if (RC_OK != rc)
40011ebc: 80 a2 60 00 cmp %o1, 0
40011ec0: 12 80 00 04 bne 40011ed0 <fat_file_write+0x1a8>
<== NEVER TAKEN
40011ec4: e0 26 60 34 st %l0, [ %i1 + 0x34 ]
return cmpltd;
40011ec8: 92 10 00 11 mov %l1, %o1
if (0 > ret)
40011ecc: 80 a2 60 00 cmp %o1, 0
40011ed0: 16 bf ff e5 bge 40011e64 <fat_file_write+0x13c>
<== ALWAYS TAKEN
40011ed4: 01 00 00 00 nop
rc = -1;
40011ed8: 10 bf ff e3 b 40011e64 <fat_file_write+0x13c>
<== NOT EXECUTED
40011edc: 92 10 3f ff mov -1, %o1 ! ffffffff <RAM_END+0xbfbfffff>
<== NOT EXECUTED
return (FAT_FD_OF_ROOT_DIR(fat_fd)) && (volume_type & (FAT_FAT12 | FAT_FAT16));
40011ee0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
40011ee4: 80 a0 60 00 cmp %g1, 0
40011ee8: 32 bf ff b0 bne,a 40011da8 <fat_file_write+0x80>
<== NEVER TAKEN
40011eec: c0 27 bf fc clr [ %fp + -4 ]
<== NOT EXECUTED
40011ef0: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1
40011ef4: 80 88 60 03 btst 3, %g1
40011ef8: 22 bf ff ac be,a 40011da8 <fat_file_write+0x80>
40011efc: c0 27 bf fc clr [ %fp + -4 ]
cln = fat_fd->cln;
40011f00: d2 06 60 1c ld [ %i1 + 0x1c ], %o1
byte = start & (fs_info->vol.bpc -1);
40011f04: d4 06 20 08 ld [ %i0 + 8 ], %o2
ret = fat_cluster_write(fs_info,
40011f08: 92 02 40 10 add %o1, %l0, %o1
byte = start & (fs_info->vol.bpc -1);
40011f0c: 94 02 bf ff add %o2, -1, %o2
ret = fat_cluster_write(fs_info,
40011f10: 98 10 00 1c mov %i4, %o4
40011f14: 96 10 00 1d mov %i5, %o3
40011f18: 94 0a 80 1a and %o2, %i2, %o2
40011f1c: 7f ff f7 6e call 4000fcd4 <fat_cluster_write>
40011f20: 90 10 00 18 mov %i0, %o0
if (0 > ret)
40011f24: 80 a2 20 00 cmp %o0, 0
40011f28: 06 bf ff ec bl 40011ed8 <fat_file_write+0x1b0>
<== NEVER TAKEN
40011f2c: 92 10 00 08 mov %o0, %o1
}
40011f30: 81 c7 e0 08 ret
40011f34: 91 e8 00 09 restore %g0, %o1, %o0
40012ee8 <fat_file_write_file_size>:
{
40012ee8: 9d e3 bf 90 save %sp, -112, %sp
uint32_t le_new_length = 0;
40012eec: c0 27 bf fc clr [ %fp + -4 ]
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln);
40012ef0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40012ef4: 80 a0 60 00 cmp %g1, 0
40012ef8: 32 80 00 07 bne,a 40012f14 <fat_file_write_file_size+0x2c>
40012efc: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
40012f00: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
40012f04: 80 88 a0 03 btst 3, %g2
40012f08: 32 80 00 07 bne,a 40012f24 <fat_file_write_file_size+0x3c>
<== ALWAYS TAKEN
40012f0c: d2 06 20 28 ld [ %i0 + 0x28 ], %o1
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
40012f10: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
<== NOT EXECUTED
40012f14: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
40012f18: 92 00 7f fe add %g1, -2, %o1
40012f1c: 93 2a 40 03 sll %o1, %g3, %o1
40012f20: 92 02 40 02 add %o1, %g2, %o1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012f24: d4 06 60 24 ld [ %i1 + 0x24 ], %o2
40012f28: c2 0e 20 02 ldub [ %i0 + 2 ], %g1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1));
40012f2c: fa 16 00 00 lduh [ %i0 ], %i5
if (fat_fd->fat_file_type == FAT_DIRECTORY) {
40012f30: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012f34: 83 32 80 01 srl %o2, %g1, %g1
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1));
40012f38: ba 07 7f ff add %i5, -1, %i5
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012f3c: 92 00 40 09 add %g1, %o1, %o1
if (fat_fd->fat_file_type == FAT_DIRECTORY) {
40012f40: 80 a0 a0 00 cmp %g2, 0
40012f44: 02 80 00 07 be 40012f60 <fat_file_write_file_size+0x78>
40012f48: ba 0f 40 0a and %i5, %o2, %i5
le_new_length = CT_LE_L(fat_fd->fat_file_size);
40012f4c: d0 06 60 18 ld [ %i1 + 0x18 ], %o0
40012f50: 40 00 1e 82 call 4001a958 <__bswapsi2>
40012f54: d2 27 bf f4 st %o1, [ %fp + -12 ]
40012f58: d0 27 bf fc st %o0, [ %fp + -4 ]
40012f5c: d2 07 bf f4 ld [ %fp + -12 ], %o1
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_SIZE_OFFSET, 4,
40012f60: 98 07 bf fc add %fp, -4, %o4
40012f64: 96 10 20 04 mov 4, %o3
40012f68: 94 07 60 1c add %i5, 0x1c, %o2
40012f6c: 7f ff f2 d4 call 4000fabc <fat_sector_write>
40012f70: 90 10 00 18 mov %i0, %o0
}
40012f74: b1 3a 20 1f sra %o0, 0x1f, %i0
40012f78: 81 c7 e0 08 ret
40012f7c: 81 e8 00 00 restore
40012e24 <fat_file_write_first_cluster_num>:
{
40012e24: 9d e3 bf 98 save %sp, -104, %sp
uint16_t le_cl_hi = 0;
40012e28: c0 37 bf fe clrh [ %fp + -2 ]
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln);
40012e2c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40012e30: 80 a0 60 00 cmp %g1, 0
40012e34: 12 80 00 06 bne 40012e4c <fat_file_write_first_cluster_num+0x28>
40012e38: fa 06 60 1c ld [ %i1 + 0x1c ], %i5
40012e3c: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
40012e40: 80 88 a0 03 btst 3, %g2
40012e44: 32 80 00 07 bne,a 40012e60 <fat_file_write_first_cluster_num+0x3c>
<== ALWAYS TAKEN
40012e48: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
40012e4c: c6 0e 20 05 ldub [ %i0 + 5 ], %g3
40012e50: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
40012e54: 82 00 7f fe add %g1, -2, %g1
40012e58: 83 28 40 03 sll %g1, %g3, %g1
40012e5c: 82 00 40 02 add %g1, %g2, %g1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012e60: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
40012e64: f8 0e 20 02 ldub [ %i0 + 2 ], %i4
byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1);
40012e68: f6 16 00 00 lduh [ %i0 ], %i3
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012e6c: b9 30 80 1c srl %g2, %i4, %i4
byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1);
40012e70: b6 06 ff ff add %i3, -1, %i3
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012e74: b8 07 00 01 add %i4, %g1, %i4
byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1);
40012e78: b6 0e c0 02 and %i3, %g2, %i3
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
40012e7c: 83 2f 60 08 sll %i5, 8, %g1
40012e80: 85 2f 60 10 sll %i5, 0x10, %g2
40012e84: 85 30 a0 18 srl %g2, 0x18, %g2
40012e88: 82 10 40 02 or %g1, %g2, %g1
ret1 = fat_sector_write(fs_info, sec,
40012e8c: 98 07 bf fc add %fp, -4, %o4
40012e90: 94 06 e0 1a add %i3, 0x1a, %o2
40012e94: 92 10 00 1c mov %i4, %o1
le_cl_low = CT_LE_W((uint16_t )(new_cln & 0x0000FFFF));
40012e98: c2 37 bf fc sth %g1, [ %fp + -4 ]
ret1 = fat_sector_write(fs_info, sec,
40012e9c: 96 10 20 02 mov 2, %o3
40012ea0: 7f ff f3 07 call 4000fabc <fat_sector_write>
40012ea4: 90 10 00 18 mov %i0, %o0
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
40012ea8: bb 37 60 10 srl %i5, 0x10, %i5
40012eac: 83 2f 60 08 sll %i5, 8, %g1
ret1 = fat_sector_write(fs_info, sec,
40012eb0: b4 10 00 08 mov %o0, %i2
ret2 = fat_sector_write(fs_info, sec,
40012eb4: 98 07 bf fe add %fp, -2, %o4
40012eb8: 96 10 20 02 mov 2, %o3
40012ebc: 94 06 e0 14 add %i3, 0x14, %o2
40012ec0: 92 10 00 1c mov %i4, %o1
40012ec4: 90 10 00 18 mov %i0, %o0
le_cl_hi = CT_LE_W((uint16_t )((new_cln & 0xFFFF0000) >> 16));
40012ec8: bb 37 60 08 srl %i5, 8, %i5
40012ecc: ba 10 40 1d or %g1, %i5, %i5
ret2 = fat_sector_write(fs_info, sec,
40012ed0: 7f ff f2 fb call 4000fabc <fat_sector_write>
40012ed4: fa 37 bf fe sth %i5, [ %fp + -2 ]
if ( (ret1 < 0) || (ret2 < 0) )
40012ed8: b0 12 00 1a or %o0, %i2, %i0
}
40012edc: b1 3e 20 1f sra %i0, 0x1f, %i0
40012ee0: 81 c7 e0 08 ret
40012ee4: 81 e8 00 00 restore
40012c90 <fat_file_write_time_and_date>:
{
40012c90: 9d e3 bf 98 save %sp, -104, %sp
sec = fat_cluster_num_to_sector_num(fs_info, fat_fd->dir_pos.sname.cln);
40012c94: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40012c98: 80 a0 60 00 cmp %g1, 0
40012c9c: 12 80 00 06 bne 40012cb4 <fat_file_write_time_and_date+0x24>
40012ca0: ba 10 00 18 mov %i0, %i5
40012ca4: c4 0e 20 16 ldub [ %i0 + 0x16 ], %g2
40012ca8: 80 88 a0 03 btst 3, %g2
40012cac: 32 80 00 07 bne,a 40012cc8 <fat_file_write_time_and_date+0x38>
<== ALWAYS TAKEN
40012cb0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
40012cb4: c4 0f 60 05 ldub [ %i5 + 5 ], %g2
40012cb8: f8 07 60 3c ld [ %i5 + 0x3c ], %i4
40012cbc: 82 00 7f fe add %g1, -2, %g1
40012cc0: 83 28 40 02 sll %g1, %g2, %g1
40012cc4: 82 00 40 1c add %g1, %i4, %g1
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012cc8: c4 06 60 24 ld [ %i1 + 0x24 ], %g2
40012ccc: f8 0f 60 02 ldub [ %i5 + 2 ], %i4
byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1);
40012cd0: f6 17 40 00 lduh [ %i5 ], %i3
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
40012cd4: d0 06 60 4c ld [ %i1 + 0x4c ], %o0
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012cd8: b9 30 80 1c srl %g2, %i4, %i4
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
40012cdc: 94 07 bf fc add %fp, -4, %o2
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->vol.sec_log2);
40012ce0: b8 07 00 01 add %i4, %g1, %i4
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
40012ce4: 92 07 bf fe add %fp, -2, %o1
byte = fat_fd->dir_pos.sname.ofs & (fs_info->vol.bps - 1);
40012ce8: b6 06 ff ff add %i3, -1, %i3
msdos_date_unix2dos(fat_fd->mtime, &date, &time_val);
40012cec: 40 00 18 19 call 40018d50 <msdos_date_unix2dos>
40012cf0: b6 0e c0 02 and %i3, %g2, %i3
time_val = CT_LE_W(time_val);
40012cf4: c2 17 bf fc lduh [ %fp + -4 ], %g1
40012cf8: 85 28 60 08 sll %g1, 8, %g2
40012cfc: 83 28 60 10 sll %g1, 0x10, %g1
40012d00: 83 30 60 18 srl %g1, 0x18, %g1
40012d04: 82 10 80 01 or %g2, %g1, %g1
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET,
40012d08: 98 07 bf fc add %fp, -4, %o4
40012d0c: 96 10 20 02 mov 2, %o3
40012d10: 94 06 e0 16 add %i3, 0x16, %o2
40012d14: 92 10 00 1c mov %i4, %o1
time_val = CT_LE_W(time_val);
40012d18: c2 37 bf fc sth %g1, [ %fp + -4 ]
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET,
40012d1c: 7f ff f3 68 call 4000fabc <fat_sector_write>
40012d20: 90 10 00 1d mov %i5, %o0
date = CT_LE_W(date);
40012d24: c2 17 bf fe lduh [ %fp + -2 ], %g1
40012d28: 85 28 60 08 sll %g1, 8, %g2
40012d2c: 83 28 60 10 sll %g1, 0x10, %g1
40012d30: 83 30 60 18 srl %g1, 0x18, %g1
40012d34: 82 10 80 01 or %g2, %g1, %g1
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WTIME_OFFSET,
40012d38: b4 10 00 08 mov %o0, %i2
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET,
40012d3c: 98 07 bf fe add %fp, -2, %o4
40012d40: 96 10 20 02 mov 2, %o3
40012d44: 94 06 e0 18 add %i3, 0x18, %o2
date = CT_LE_W(date);
40012d48: c2 37 bf fe sth %g1, [ %fp + -2 ]
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_WDATE_OFFSET,
40012d4c: 92 10 00 1c mov %i4, %o1
40012d50: 90 10 00 1d mov %i5, %o0
40012d54: 7f ff f3 5a call 4000fabc <fat_sector_write>
40012d58: b0 10 3f ff mov -1, %i0
if ( ret < 0 )
40012d5c: 80 a2 20 00 cmp %o0, 0
40012d60: 36 80 00 02 bge,a 40012d68 <fat_file_write_time_and_date+0xd8>
<== ALWAYS TAKEN
40012d64: b1 3e a0 1f sra %i2, 0x1f, %i0
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_ADATE_OFFSET,
40012d68: 98 07 bf fe add %fp, -2, %o4
40012d6c: 96 10 20 02 mov 2, %o3
40012d70: 94 06 e0 12 add %i3, 0x12, %o2
40012d74: 92 10 00 1c mov %i4, %o1
40012d78: 7f ff f3 51 call 4000fabc <fat_sector_write>
40012d7c: 90 10 00 1d mov %i5, %o0
if ( ret < 0 )
40012d80: 80 a2 20 00 cmp %o0, 0
40012d84: 26 80 00 02 bl,a 40012d8c <fat_file_write_time_and_date+0xfc>
<== NEVER TAKEN
40012d88: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
msdos_date_unix2dos(fat_fd->ctime, &date, &time_val);
40012d8c: d0 06 60 44 ld [ %i1 + 0x44 ], %o0
40012d90: 94 07 bf fc add %fp, -4, %o2
40012d94: 40 00 17 ef call 40018d50 <msdos_date_unix2dos>
40012d98: 92 07 bf fe add %fp, -2, %o1
time_val = CT_LE_W(time_val);
40012d9c: c2 17 bf fc lduh [ %fp + -4 ], %g1
40012da0: 85 28 60 08 sll %g1, 8, %g2
40012da4: 83 28 60 10 sll %g1, 0x10, %g1
40012da8: 83 30 60 18 srl %g1, 0x18, %g1
40012dac: 82 10 80 01 or %g2, %g1, %g1
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CTIME_OFFSET,
40012db0: 98 07 bf fc add %fp, -4, %o4
40012db4: 96 10 20 02 mov 2, %o3
40012db8: 94 06 e0 0e add %i3, 0xe, %o2
time_val = CT_LE_W(time_val);
40012dbc: c2 37 bf fc sth %g1, [ %fp + -4 ]
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CTIME_OFFSET,
40012dc0: 92 10 00 1c mov %i4, %o1
40012dc4: 7f ff f3 3e call 4000fabc <fat_sector_write>
40012dc8: 90 10 00 1d mov %i5, %o0
if ( ret < 0 )
40012dcc: 80 a2 20 00 cmp %o0, 0
40012dd0: 26 80 00 02 bl,a 40012dd8 <fat_file_write_time_and_date+0x148>
<== NEVER TAKEN
40012dd4: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
date = CT_LE_W(date);
40012dd8: c2 17 bf fe lduh [ %fp + -2 ], %g1
40012ddc: 85 28 60 08 sll %g1, 8, %g2
40012de0: 83 28 60 10 sll %g1, 0x10, %g1
40012de4: 83 30 60 18 srl %g1, 0x18, %g1
40012de8: 82 10 80 01 or %g2, %g1, %g1
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET,
40012dec: 98 07 bf fe add %fp, -2, %o4
40012df0: 96 10 20 02 mov 2, %o3
40012df4: 94 06 e0 10 add %i3, 0x10, %o2
date = CT_LE_W(date);
40012df8: c2 37 bf fe sth %g1, [ %fp + -2 ]
ret = fat_sector_write(fs_info, sec, byte + MSDOS_FILE_CDATE_OFFSET,
40012dfc: 92 10 00 1c mov %i4, %o1
40012e00: 7f ff f3 2f call 4000fabc <fat_sector_write>
40012e04: 90 10 00 1d mov %i5, %o0
if ( ret < 0 )
40012e08: 80 a2 20 00 cmp %o0, 0
40012e0c: 06 80 00 04 bl 40012e1c <fat_file_write_time_and_date+0x18c>
<== NEVER TAKEN
40012e10: 01 00 00 00 nop
}
40012e14: 81 c7 e0 08 ret
40012e18: 81 e8 00 00 restore
40012e1c: 81 c7 e0 08 ret
<== NOT EXECUTED
40012e20: 91 e8 3f ff restore %g0, -1, %o0
<== NOT EXECUTED
40010f20 <fat_free_fat_clusters_chain>:
{
40010f20: 9d e3 bf 98 save %sp, -104, %sp
uint32_t next_cln = 0;
40010f24: c0 27 bf fc clr [ %fp + -4 ]
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
40010f28: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
40010f2c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
40010f30: 82 0e 40 01 and %i1, %g1, %g1
40010f34: 80 a0 80 01 cmp %g2, %g1
40010f38: 08 80 00 26 bleu 40010fd0 <fat_free_fat_clusters_chain+0xb0>
<== NEVER TAKEN
40010f3c: ba 10 00 18 mov %i0, %i5
uint32_t cur_cln = chain;
40010f40: b8 10 00 19 mov %i1, %i4
uint32_t freed_cls_cnt = 0;
40010f44: b6 10 20 00 clr %i3
int rc = RC_OK, rc1 = RC_OK;
40010f48: 10 80 00 0e b 40010f80 <fat_free_fat_clusters_chain+0x60>
40010f4c: b0 10 20 00 clr %i0
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
40010f50: 7f ff ff 50 call 40010c90 <fat_set_fat_cluster>
40010f54: 01 00 00 00 nop
if ( rc != RC_OK )
40010f58: 80 a2 20 00 cmp %o0, 0
40010f5c: 32 80 00 02 bne,a 40010f64 <fat_free_fat_clusters_chain+0x44>
<== NEVER TAKEN
40010f60: b0 10 00 08 mov %o0, %i0
<== NOT EXECUTED
cur_cln = next_cln;
40010f64: f8 07 bf fc ld [ %fp + -4 ], %i4
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
40010f68: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
40010f6c: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
40010f70: 82 0f 00 01 and %i4, %g1, %g1
40010f74: 80 a0 40 02 cmp %g1, %g2
40010f78: 1a 80 00 18 bcc 40010fd8 <fat_free_fat_clusters_chain+0xb8>
40010f7c: b6 06 e0 01 inc %i3
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
40010f80: 92 10 00 1c mov %i4, %o1
40010f84: 94 07 bf fc add %fp, -4, %o2
40010f88: 7f ff fe cc call 40010ab8 <fat_get_fat_cluster>
40010f8c: 90 10 00 1d mov %i5, %o0
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
40010f90: 92 10 00 1c mov %i4, %o1
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
40010f94: 82 10 00 08 mov %o0, %g1
rc = fat_set_fat_cluster(fs_info, cur_cln, FAT_GENFAT_FREE);
40010f98: 94 10 20 00 clr %o2
if ( rc != RC_OK )
40010f9c: 80 a0 60 00 cmp %g1, 0
40010fa0: 02 bf ff ec be 40010f50 <fat_free_fat_clusters_chain+0x30>
<== ALWAYS TAKEN
40010fa4: 90 10 00 1d mov %i5, %o0
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
40010fa8: c4 07 60 4c ld [ %i5 + 0x4c ], %g2
<== NOT EXECUTED
40010fac: 80 a0 bf ff cmp %g2, -1
<== NOT EXECUTED
40010fb0: 02 80 00 03 be 40010fbc <fat_free_fat_clusters_chain+0x9c>
<== NOT EXECUTED
40010fb4: b6 00 80 1b add %g2, %i3, %i3
<== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
40010fb8: f6 27 60 4c st %i3, [ %i5 + 0x4c ]
<== NOT EXECUTED
rc = fat_get_fat_cluster(fs_info, cur_cln, &next_cln);
40010fbc: b0 10 00 01 mov %g1, %i0
<== NOT EXECUTED
fat_buf_release(fs_info);
40010fc0: 7f ff fa 96 call 4000fa18 <fat_buf_release>
<== NOT EXECUTED
40010fc4: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
return rc;
40010fc8: 81 c7 e0 08 ret
<== NOT EXECUTED
40010fcc: 81 e8 00 00 restore
<== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
40010fd0: b6 10 20 00 clr %i3
<== NOT EXECUTED
int rc = RC_OK, rc1 = RC_OK;
40010fd4: b0 10 20 00 clr %i0
<== NOT EXECUTED
fs_info->vol.next_cl = chain;
40010fd8: f2 27 60 54 st %i1, [ %i5 + 0x54 ]
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
40010fdc: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
40010fe0: 80 a0 7f ff cmp %g1, -1
40010fe4: 02 80 00 03 be 40010ff0 <fat_free_fat_clusters_chain+0xd0>
<== ALWAYS TAKEN
40010fe8: b6 00 40 1b add %g1, %i3, %i3
fs_info->vol.free_cls += freed_cls_cnt;
40010fec: f6 27 60 4c st %i3, [ %i5 + 0x4c ]
<== NOT EXECUTED
fat_buf_release(fs_info);
40010ff0: 7f ff fa 8a call 4000fa18 <fat_buf_release>
40010ff4: 90 10 00 1d mov %i5, %o0
}
40010ff8: 81 c7 e0 08 ret
40010ffc: 81 e8 00 00 restore
40010a7c <fat_free_unique_ino>:
fat_free_unique_ino(
fat_fs_info_t *fs_info,
uint32_t ino
)
{
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
40010a7c: c2 02 20 94 ld [ %o0 + 0x94 ], %g1
<== NOT EXECUTED
40010a80: c6 02 20 88 ld [ %o0 + 0x88 ], %g3
<== NOT EXECUTED
40010a84: 92 22 40 01 sub %o1, %g1, %o1
<== NOT EXECUTED
40010a88: 85 32 60 03 srl %o1, 3, %g2
<== NOT EXECUTED
40010a8c: c8 08 c0 02 ldub [ %g3 + %g2 ], %g4
<== NOT EXECUTED
40010a90: 92 0a 60 07 and %o1, 7, %o1
<== NOT EXECUTED
40010a94: 82 10 20 01 mov 1, %g1
<== NOT EXECUTED
40010a98: 93 28 40 09 sll %g1, %o1, %o1
<== NOT EXECUTED
40010a9c: 92 29 00 09 andn %g4, %o1, %o1
<== NOT EXECUTED
}
40010aa0: 81 c3 e0 08 retl
<== NOT EXECUTED
40010aa4: d2 28 c0 02 stb %o1, [ %g3 + %g2 ]
<== NOT EXECUTED
40010ab8 <fat_get_fat_cluster>:
fat_get_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t *ret_val
)
{
40010ab8: 9d e3 bf 98 save %sp, -104, %sp
<== NOT EXECUTED
uint8_t *sec_buf;
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
40010abc: 80 a6 60 01 cmp %i1, 1
<== NOT EXECUTED
40010ac0: 08 80 00 28 bleu 40010b60 <fat_get_fat_cluster+0xa8>
<== NOT EXECUTED
40010ac4: ba 10 00 18 mov %i0, %i5
<== NOT EXECUTED
40010ac8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
<== NOT EXECUTED
40010acc: 82 00 60 01 inc %g1
<== NOT EXECUTED
40010ad0: 80 a0 40 19 cmp %g1, %i1
<== NOT EXECUTED
40010ad4: 0a 80 00 23 bcs 40010b60 <fat_get_fat_cluster+0xa8>
<== NOT EXECUTED
40010ad8: 01 00 00 00 nop
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
40010adc: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1
<== NOT EXECUTED
40010ae0: 80 88 60 01 btst 1, %g1
<== NOT EXECUTED
40010ae4: 12 80 00 25 bne 40010b78 <fat_get_fat_cluster+0xc0>
<== NOT EXECUTED
40010ae8: b7 36 60 01 srl %i1, 1, %i3
<== NOT EXECUTED
40010aec: 80 88 60 02 btst 2, %g1
<== NOT EXECUTED
40010af0: 02 80 00 03 be 40010afc <fat_get_fat_cluster+0x44>
<== NOT EXECUTED
40010af4: a1 2e 60 02 sll %i1, 2, %l0
<== NOT EXECUTED
40010af8: a1 2e 60 01 sll %i1, 1, %l0
<== NOT EXECUTED
40010afc: f8 0f 60 02 ldub [ %i5 + 2 ], %i4
<== NOT EXECUTED
40010b00: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
<== NOT EXECUTED
40010b04: b9 34 00 1c srl %l0, %i4, %i4
<== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
40010b08: f6 17 40 00 lduh [ %i5 ], %i3
<== NOT EXECUTED
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
40010b0c: b8 07 00 01 add %i4, %g1, %i4
<== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
40010b10: 94 10 20 01 mov 1, %o2
<== NOT EXECUTED
40010b14: 96 07 bf fc add %fp, -4, %o3
<== NOT EXECUTED
40010b18: 92 10 00 1c mov %i4, %o1
<== NOT EXECUTED
40010b1c: 7f ff fb 8f call 4000f958 <fat_buf_access>
<== NOT EXECUTED
40010b20: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
if (rc != RC_OK)
40010b24: b0 92 20 00 orcc %o0, 0, %i0
<== NOT EXECUTED
40010b28: 12 80 00 48 bne 40010c48 <fat_get_fat_cluster+0x190>
<== NOT EXECUTED
40010b2c: 01 00 00 00 nop
<== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
40010b30: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1
<== NOT EXECUTED
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
40010b34: b7 2e e0 10 sll %i3, 0x10, %i3
<== NOT EXECUTED
switch ( fs_info->vol.type )
40010b38: 80 a0 60 02 cmp %g1, 2
<== NOT EXECUTED
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
40010b3c: b7 36 e0 10 srl %i3, 0x10, %i3
<== NOT EXECUTED
40010b40: b6 06 ff ff add %i3, -1, %i3
<== NOT EXECUTED
switch ( fs_info->vol.type )
40010b44: 02 80 00 35 be 40010c18 <fat_get_fat_cluster+0x160>
<== NOT EXECUTED
40010b48: b6 0e c0 10 and %i3, %l0, %i3
<== NOT EXECUTED
40010b4c: 80 a0 60 04 cmp %g1, 4
<== NOT EXECUTED
40010b50: 02 80 00 2c be 40010c00 <fat_get_fat_cluster+0x148>
<== NOT EXECUTED
40010b54: 80 a0 60 01 cmp %g1, 1
<== NOT EXECUTED
40010b58: 02 80 00 18 be 40010bb8 <fat_get_fat_cluster+0x100>
<== NOT EXECUTED
40010b5c: c4 07 bf fc ld [ %fp + -4 ], %g2
<== NOT EXECUTED
*ret_val = *((uint32_t *)(sec_buf + ofs));
*ret_val = CF_LE_L(*ret_val);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
40010b60: 40 00 2a 84 call 4001b570 <__errno>
<== NOT EXECUTED
40010b64: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40010b68: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
40010b6c: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40010b70: 81 c7 e0 08 ret
<== NOT EXECUTED
40010b74: 81 e8 00 00 restore
<== NOT EXECUTED
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
40010b78: f8 0f 60 02 ldub [ %i5 + 2 ], %i4
40010b7c: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
40010b80: a0 06 c0 19 add %i3, %i1, %l0
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
40010b84: 94 10 20 01 mov 1, %o2
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
40010b88: b9 34 00 1c srl %l0, %i4, %i4
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
40010b8c: f6 17 40 00 lduh [ %i5 ], %i3
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
40010b90: b8 07 00 01 add %i4, %g1, %i4
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
40010b94: 96 07 bf fc add %fp, -4, %o3
40010b98: 92 10 00 1c mov %i4, %o1
40010b9c: 7f ff fb 6f call 4000f958 <fat_buf_access>
40010ba0: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
40010ba4: b0 92 20 00 orcc %o0, 0, %i0
40010ba8: 22 bf ff e3 be,a 40010b34 <fat_get_fat_cluster+0x7c>
<== ALWAYS TAKEN
40010bac: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1
break;
}
return RC_OK;
}
40010bb0: 81 c7 e0 08 ret
<== NOT EXECUTED
40010bb4: 81 e8 00 00 restore
<== NOT EXECUTED
*ret_val = (*(sec_buf + ofs));
40010bb8: c8 08 80 1b ldub [ %g2 + %i3 ], %g4
40010bbc: c8 26 80 00 st %g4, [ %i2 ]
if ( ofs == (fs_info->vol.bps - 1) )
40010bc0: c6 17 40 00 lduh [ %i5 ], %g3
40010bc4: 86 00 ff ff add %g3, -1, %g3
40010bc8: 80 a0 c0 1b cmp %g3, %i3
40010bcc: 02 80 00 21 be 40010c50 <fat_get_fat_cluster+0x198>
40010bd0: b6 00 80 1b add %g2, %i3, %i3
*ret_val |= *(sec_buf + ofs + 1) << 8;
40010bd4: c2 0e e0 01 ldub [ %i3 + 1 ], %g1
40010bd8: 83 28 60 08 sll %g1, 8, %g1
40010bdc: 82 10 40 04 or %g1, %g4, %g1
40010be0: c2 26 80 00 st %g1, [ %i2 ]
if ( FAT_CLUSTER_IS_ODD(cln) )
40010be4: 80 8e 60 01 btst 1, %i1
40010be8: 22 80 00 17 be,a 40010c44 <fat_get_fat_cluster+0x18c>
40010bec: 82 08 6f ff and %g1, 0xfff, %g1
*ret_val = (*ret_val) >> FAT12_SHIFT;
40010bf0: 83 30 60 04 srl %g1, 4, %g1
40010bf4: c2 26 80 00 st %g1, [ %i2 ]
40010bf8: 81 c7 e0 08 ret
40010bfc: 81 e8 00 00 restore
*ret_val = *((uint32_t *)(sec_buf + ofs));
40010c00: c2 07 bf fc ld [ %fp + -4 ], %g1
*ret_val = CF_LE_L(*ret_val);
40010c04: 40 00 27 55 call 4001a958 <__bswapsi2>
40010c08: d0 00 40 1b ld [ %g1 + %i3 ], %o0
40010c0c: d0 26 80 00 st %o0, [ %i2 ]
break;
40010c10: 81 c7 e0 08 ret
40010c14: 81 e8 00 00 restore
*ret_val = *((uint16_t *)(sec_buf + ofs));
40010c18: c2 07 bf fc ld [ %fp + -4 ], %g1
*ret_val = CF_LE_W(*ret_val);
40010c1c: c4 10 40 1b lduh [ %g1 + %i3 ], %g2
40010c20: 83 28 a0 08 sll %g2, 8, %g1
40010c24: 85 28 a0 10 sll %g2, 0x10, %g2
40010c28: 85 30 a0 18 srl %g2, 0x18, %g2
40010c2c: 82 10 40 02 or %g1, %g2, %g1
40010c30: 83 28 60 10 sll %g1, 0x10, %g1
40010c34: 83 30 60 10 srl %g1, 0x10, %g1
40010c38: c2 26 80 00 st %g1, [ %i2 ]
break;
40010c3c: 81 c7 e0 08 ret
40010c40: 81 e8 00 00 restore
*ret_val = (*ret_val) & FAT_FAT12_MASK;
40010c44: c2 26 80 00 st %g1, [ %i2 ]
40010c48: 81 c7 e0 08 ret
40010c4c: 81 e8 00 00 restore
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
40010c50: 96 07 bf fc add %fp, -4, %o3
40010c54: 94 10 20 01 mov 1, %o2
40010c58: 92 07 20 01 add %i4, 1, %o1
40010c5c: 7f ff fb 3f call 4000f958 <fat_buf_access>
40010c60: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
40010c64: 80 a2 20 00 cmp %o0, 0
40010c68: 12 80 00 08 bne 40010c88 <fat_get_fat_cluster+0x1d0>
<== NEVER TAKEN
40010c6c: c2 07 bf fc ld [ %fp + -4 ], %g1
*ret_val |= *sec_buf << 8;
40010c70: c2 08 40 00 ldub [ %g1 ], %g1
40010c74: c4 06 80 00 ld [ %i2 ], %g2
40010c78: 83 28 60 08 sll %g1, 8, %g1
40010c7c: 82 10 40 02 or %g1, %g2, %g1
40010c80: 10 bf ff d9 b 40010be4 <fat_get_fat_cluster+0x12c>
40010c84: c2 26 80 00 st %g1, [ %i2 ]
}
40010c88: 81 c7 e0 08 ret
<== NOT EXECUTED
40010c8c: 91 e8 00 08 restore %g0, %o0, %o0
<== NOT EXECUTED
40010980 <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(fat_fs_info_t *fs_info)
{
40010980: 9d e3 bf a0 save %sp, -96, %sp
<== NOT EXECUTED
40010984: d2 06 20 90 ld [ %i0 + 0x90 ], %o1
<== NOT EXECUTED
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
}
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
40010988: 03 03 ff ff sethi %hi(0xffffc00), %g1
<== NOT EXECUTED
4001098c: b4 10 63 ff or %g1, 0x3ff, %i2 ! fffffff <RAM_SIZE+0xfbfffff>
<== NOT EXECUTED
for (j = 0; j < fs_info->uino_pool_size; j++)
40010990: 80 a2 60 00 cmp %o1, 0
<== NOT EXECUTED
40010994: 22 80 00 23 be,a 40010a20 <fat_get_unique_ino+0xa0>
<== NOT EXECUTED
40010998: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
<== NOT EXECUTED
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
4001099c: c8 06 20 88 ld [ %i0 + 0x88 ], %g4
<== NOT EXECUTED
400109a0: c2 06 20 8c ld [ %i0 + 0x8c ], %g1
<== NOT EXECUTED
400109a4: 87 30 60 03 srl %g1, 3, %g3
<== NOT EXECUTED
400109a8: c4 49 00 03 ldsb [ %g4 + %g3 ], %g2
<== NOT EXECUTED
400109ac: b8 08 60 07 and %g1, 7, %i4
<== NOT EXECUTED
400109b0: b6 01 00 03 add %g4, %g3, %i3
<== NOT EXECUTED
400109b4: 85 38 80 1c sra %g2, %i4, %g2
<== NOT EXECUTED
400109b8: 80 88 a0 01 btst 1, %g2
<== NOT EXECUTED
400109bc: 02 80 00 26 be 40010a54 <fat_get_unique_ino+0xd4>
<== NOT EXECUTED
400109c0: c6 09 00 03 ldub [ %g4 + %g3 ], %g3
<== NOT EXECUTED
for (j = 0; j < fs_info->uino_pool_size; j++)
400109c4: 10 80 00 0e b 400109fc <fat_get_unique_ino+0x7c>
<== NOT EXECUTED
400109c8: ba 10 20 00 clr %i5
<== NOT EXECUTED
400109cc: 80 a7 40 09 cmp %i5, %o1
<== NOT EXECUTED
400109d0: 02 80 00 12 be 40010a18 <fat_get_unique_ino+0x98>
<== NOT EXECUTED
400109d4: c2 26 20 8c st %g1, [ %i0 + 0x8c ]
<== NOT EXECUTED
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
400109d8: c2 06 20 8c ld [ %i0 + 0x8c ], %g1
<== NOT EXECUTED
400109dc: 87 30 60 03 srl %g1, 3, %g3
<== NOT EXECUTED
400109e0: c4 49 00 03 ldsb [ %g4 + %g3 ], %g2
<== NOT EXECUTED
400109e4: b8 08 60 07 and %g1, 7, %i4
<== NOT EXECUTED
400109e8: b6 01 00 03 add %g4, %g3, %i3
<== NOT EXECUTED
400109ec: 85 38 80 1c sra %g2, %i4, %g2
<== NOT EXECUTED
400109f0: 80 88 a0 01 btst 1, %g2
<== NOT EXECUTED
400109f4: 02 80 00 18 be 40010a54 <fat_get_unique_ino+0xd4>
<== NOT EXECUTED
400109f8: c6 09 00 03 ldub [ %g4 + %g3 ], %g3
<== NOT EXECUTED
fs_info->index++;
400109fc: 82 00 60 01 inc %g1
<== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
40010a00: 80 a0 40 09 cmp %g1, %o1
<== NOT EXECUTED
40010a04: 0a bf ff f2 bcs 400109cc <fat_get_unique_ino+0x4c>
<== NOT EXECUTED
40010a08: ba 07 60 01 inc %i5
<== NOT EXECUTED
for (j = 0; j < fs_info->uino_pool_size; j++)
40010a0c: 80 a7 40 09 cmp %i5, %o1
<== NOT EXECUTED
40010a10: 12 bf ff f2 bne 400109d8 <fat_get_unique_ino+0x58>
<== NOT EXECUTED
40010a14: c0 26 20 8c clr [ %i0 + 0x8c ]
<== NOT EXECUTED
40010a18: 93 2a 60 01 sll %o1, 1, %o1
<== NOT EXECUTED
if ((fs_info->uino_pool_size << 1) < (0x0FFFFFFF - fs_info->uino_base))
40010a1c: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
<== NOT EXECUTED
40010a20: 82 26 80 01 sub %i2, %g1, %g1
<== NOT EXECUTED
40010a24: 80 a0 40 09 cmp %g1, %o1
<== NOT EXECUTED
40010a28: 08 80 00 13 bleu 40010a74 <fat_get_unique_ino+0xf4>
<== NOT EXECUTED
40010a2c: 01 00 00 00 nop
<== NOT EXECUTED
{
fs_info->uino_pool_size <<= 1;
40010a30: d2 26 20 90 st %o1, [ %i0 + 0x90 ]
<== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
40010a34: 40 00 1f f9 call 40018a18 <realloc>
<== NOT EXECUTED
40010a38: d0 06 20 88 ld [ %i0 + 0x88 ], %o0
<== NOT EXECUTED
if (fs_info->uino != NULL)
40010a3c: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
40010a40: 02 80 00 0d be 40010a74 <fat_get_unique_ino+0xf4>
<== NOT EXECUTED
40010a44: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
<== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
40010a48: d2 06 20 90 ld [ %i0 + 0x90 ], %o1
<== NOT EXECUTED
40010a4c: 10 bf ff d1 b 40010990 <fat_get_unique_ino+0x10>
<== NOT EXECUTED
40010a50: d2 26 20 8c st %o1, [ %i0 + 0x8c ]
<== NOT EXECUTED
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
40010a54: 82 10 20 01 mov 1, %g1
<== NOT EXECUTED
40010a58: b9 28 40 1c sll %g1, %i4, %i4
<== NOT EXECUTED
40010a5c: 86 17 00 03 or %i4, %g3, %g3
<== NOT EXECUTED
40010a60: c6 2e c0 00 stb %g3, [ %i3 ]
<== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
40010a64: c2 06 20 94 ld [ %i0 + 0x94 ], %g1
<== NOT EXECUTED
40010a68: f0 06 20 8c ld [ %i0 + 0x8c ], %i0
<== NOT EXECUTED
40010a6c: 81 c7 e0 08 ret
<== NOT EXECUTED
40010a70: 91 e8 40 18 restore %g1, %i0, %o0
<== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
40010a74: 81 c7 e0 08 ret
<== NOT EXECUTED
40010a78: 91 e8 20 00 restore %g0, 0, %o0
<== NOT EXECUTED
40010908 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
fat_fs_info_t *fs_info,
uint32_t start_cln
)
{
40010908: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
ssize_t ret = 0;
uint32_t cur_cln = start_cln;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
4001090c: 10 80 00 0e b 40010944 <fat_init_clusters_chain+0x3c>
40010910: f2 27 bf fc st %i1, [ %fp + -4 ]
{
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
40010914: 7f ff fc 95 call 4000fb68 <fat_cluster_set>
40010918: d6 06 20 08 ld [ %i0 + 8 ], %o3
if ( ret != fs_info->vol.bpc )
4001091c: c2 06 20 08 ld [ %i0 + 8 ], %g1
40010920: 80 a0 40 08 cmp %g1, %o0
{
return -1;
}
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
40010924: 94 07 bf fc add %fp, -4, %o2
if ( ret != fs_info->vol.bpc )
40010928: 12 80 00 13 bne 40010974 <fat_init_clusters_chain+0x6c>
<== NEVER TAKEN
4001092c: 90 10 00 18 mov %i0, %o0
rc = fat_get_fat_cluster(fs_info, cur_cln, &cur_cln);
40010930: 40 00 00 62 call 40010ab8 <fat_get_fat_cluster>
40010934: d2 07 bf fc ld [ %fp + -4 ], %o1
if ( rc != RC_OK )
40010938: 80 a2 20 00 cmp %o0, 0
4001093c: 12 80 00 0c bne 4001096c <fat_init_clusters_chain+0x64>
<== NEVER TAKEN
40010940: f2 07 bf fc ld [ %fp + -4 ], %i1
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
40010944: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
40010948: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
4001094c: 92 10 00 19 mov %i1, %o1
40010950: 98 10 20 00 clr %o4
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
40010954: b2 0e 40 02 and %i1, %g2, %i1
ret = fat_cluster_set(fs_info, cur_cln, 0, fs_info->vol.bpc, 0);
40010958: 94 10 20 00 clr %o2
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
4001095c: 80 a6 40 01 cmp %i1, %g1
40010960: 0a bf ff ed bcs 40010914 <fat_init_clusters_chain+0xc>
40010964: 90 10 00 18 mov %i0, %o0
return rc;
}
}
return rc;
40010968: 90 10 20 00 clr %o0
}
4001096c: 81 c7 e0 08 ret
40010970: 91 e8 00 08 restore %g0, %o0, %o0
return -1;
40010974: 90 10 3f ff mov -1, %o0
<== NOT EXECUTED
}
40010978: 81 c7 e0 08 ret
<== NOT EXECUTED
4001097c: 91 e8 00 08 restore %g0, %o0, %o0
<== NOT EXECUTED
4000fe40 <fat_init_volume_info>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_init_volume_info(fat_fs_info_t *fs_info, const char *device)
{
4000fe40: 9d e3 bf 00 save %sp, -256, %sp
ssize_t ret = 0;
struct stat stat_buf;
int i = 0;
rtems_bdbuf_buffer *block = NULL;
vol->fd = open(device, O_RDWR);
4000fe44: 92 10 20 02 mov 2, %o1
{
4000fe48: ae 10 00 18 mov %i0, %l7
rtems_bdbuf_buffer *block = NULL;
4000fe4c: c0 27 bf 84 clr [ %fp + -124 ]
vol->fd = open(device, O_RDWR);
4000fe50: 7f ff d2 52 call 40004798 <open>
4000fe54: 90 10 00 19 mov %i1, %o0
if (vol->fd < 0)
4000fe58: 80 a2 20 00 cmp %o0, 0
4000fe5c: 06 80 01 db bl 400105c8 <fat_init_volume_info+0x788>
<== NEVER TAKEN
4000fe60: d0 25 e0 68 st %o0, [ %l7 + 0x68 ]
{
rtems_set_errno_and_return_minus_one(ENXIO);
}
rc = fstat(vol->fd, &stat_buf);
4000fe64: 7f ff cf 53 call 40003bb0 <fstat>
4000fe68: 92 07 bf 98 add %fp, -104, %o1
if (rc != 0)
4000fe6c: 80 a2 20 00 cmp %o0, 0
4000fe70: 12 80 01 d3 bne 400105bc <fat_init_volume_info+0x77c>
<== NEVER TAKEN
4000fe74: 07 00 00 3c sethi %hi(0xf000), %g3
close(vol->fd);
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
4000fe78: c4 07 bf a8 ld [ %fp + -88 ], %g2
4000fe7c: 84 08 80 03 and %g2, %g3, %g2
4000fe80: 07 00 00 18 sethi %hi(0x6000), %g3
4000fe84: 80 a0 80 03 cmp %g2, %g3
4000fe88: 12 80 01 ce bne 400105c0 <fat_init_volume_info+0x780>
<== NEVER TAKEN
4000fe8c: d0 06 20 68 ld [ %i0 + 0x68 ], %o0
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
4000fe90: 94 06 20 6c add %i0, 0x6c, %o2
4000fe94: 13 10 01 10 sethi %hi(0x40044000), %o1
4000fe98: 7f ff fb d8 call 4000edf8 <ioctl>
4000fe9c: 92 12 62 09 or %o1, 0x209, %o1 ! 40044209 <__end+0x17ea9>
rtems_set_errno_and_return_minus_one(ENXIO);
}
/* check that device is registred as block device and lock it */
rc = rtems_disk_fd_get_disk_device(vol->fd, &vol->dd);
if (rc != 0) {
4000fea0: b0 92 20 00 orcc %o0, 0, %i0
4000fea4: 12 80 01 c6 bne 400105bc <fat_init_volume_info+0x77c>
<== NEVER TAKEN
4000fea8: c4 1f bf b8 ldd [ %fp + -72 ], %g2
close(vol->fd);
rtems_set_errno_and_return_minus_one(ENXIO);
}
vol->dev = stat_buf.st_rdev;
4000feac: c4 3d e0 70 std %g2, [ %l7 + 0x70 ]
/* Read boot record */
/* FIXME: Asserts FAT_MAX_BPB_SIZE < bdbuf block size */
sc = rtems_bdbuf_read( vol->dd, 0, &block);
4000feb0: 94 07 bf 84 add %fp, -124, %o2
4000feb4: d0 05 e0 6c ld [ %l7 + 0x6c ], %o0
4000feb8: 40 00 21 3f call 400183b4 <rtems_bdbuf_read>
4000febc: 92 10 20 00 clr %o1
if (sc != RTEMS_SUCCESSFUL)
4000fec0: 80 a2 20 00 cmp %o0, 0
4000fec4: 12 80 01 c7 bne 400105e0 <fat_init_volume_info+0x7a0>
<== NEVER TAKEN
4000fec8: d0 07 bf 84 ld [ %fp + -124 ], %o0
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO);
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
4000fecc: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
4000fed0: c2 08 a0 20 ldub [ %g2 + 0x20 ], %g1
4000fed4: c2 2f bf 7f stb %g1, [ %fp + -129 ]
4000fed8: c2 08 a0 21 ldub [ %g2 + 0x21 ], %g1
4000fedc: c2 2f bf 7e stb %g1, [ %fp + -130 ]
4000fee0: c2 08 a0 22 ldub [ %g2 + 0x22 ], %g1
4000fee4: c2 2f bf 7d stb %g1, [ %fp + -131 ]
4000fee8: c2 08 a0 23 ldub [ %g2 + 0x23 ], %g1
4000feec: c2 2f bf 7b stb %g1, [ %fp + -133 ]
4000fef0: c2 08 a0 24 ldub [ %g2 + 0x24 ], %g1
4000fef4: c2 2f bf 7c stb %g1, [ %fp + -132 ]
4000fef8: c2 08 a0 25 ldub [ %g2 + 0x25 ], %g1
4000fefc: c2 2f bf 77 stb %g1, [ %fp + -137 ]
4000ff00: c2 08 a0 26 ldub [ %g2 + 0x26 ], %g1
4000ff04: c2 2f bf 76 stb %g1, [ %fp + -138 ]
4000ff08: c2 08 a0 27 ldub [ %g2 + 0x27 ], %g1
4000ff0c: c2 2f bf 73 stb %g1, [ %fp + -141 ]
4000ff10: c2 08 a0 28 ldub [ %g2 + 0x28 ], %g1
4000ff14: e4 08 a0 0b ldub [ %g2 + 0xb ], %l2
4000ff18: f8 08 a0 0c ldub [ %g2 + 0xc ], %i4
4000ff1c: e2 08 a0 0d ldub [ %g2 + 0xd ], %l1
4000ff20: ec 08 a0 0e ldub [ %g2 + 0xe ], %l6
4000ff24: fa 08 a0 0f ldub [ %g2 + 0xf ], %i5
4000ff28: f2 08 a0 10 ldub [ %g2 + 0x10 ], %i1
4000ff2c: ea 08 a0 11 ldub [ %g2 + 0x11 ], %l5
4000ff30: e0 08 a0 12 ldub [ %g2 + 0x12 ], %l0
4000ff34: e6 08 a0 13 ldub [ %g2 + 0x13 ], %l3
4000ff38: f6 08 a0 14 ldub [ %g2 + 0x14 ], %i3
4000ff3c: e8 08 a0 16 ldub [ %g2 + 0x16 ], %l4
4000ff40: f4 08 a0 17 ldub [ %g2 + 0x17 ], %i2
4000ff44: c2 2f bf 6f stb %g1, [ %fp + -145 ]
4000ff48: c2 08 a0 2c ldub [ %g2 + 0x2c ], %g1
4000ff4c: c2 2f bf 74 stb %g1, [ %fp + -140 ]
4000ff50: c2 08 a0 2d ldub [ %g2 + 0x2d ], %g1
4000ff54: c2 2f bf 67 stb %g1, [ %fp + -153 ]
4000ff58: c2 08 a0 2e ldub [ %g2 + 0x2e ], %g1
4000ff5c: c2 2f bf 75 stb %g1, [ %fp + -139 ]
4000ff60: c2 08 a0 2f ldub [ %g2 + 0x2f ], %g1
4000ff64: c2 2f bf 6b stb %g1, [ %fp + -149 ]
4000ff68: c2 08 a0 30 ldub [ %g2 + 0x30 ], %g1
4000ff6c: c2 2f bf 66 stb %g1, [ %fp + -154 ]
4000ff70: c2 08 a0 31 ldub [ %g2 + 0x31 ], %g1
sc = rtems_bdbuf_release( block);
4000ff74: 40 00 21 99 call 400185d8 <rtems_bdbuf_release>
4000ff78: c2 2f bf 65 stb %g1, [ %fp + -155 ]
if (sc != RTEMS_SUCCESSFUL)
4000ff7c: 80 a2 20 00 cmp %o0, 0
4000ff80: 12 80 01 98 bne 400105e0 <fat_init_volume_info+0x7a0>
<== NEVER TAKEN
4000ff84: b8 0f 20 ff and %i4, 0xff, %i4
close(vol->fd);
rtems_set_errno_and_return_minus_one( EIO );
}
/* Evaluate boot record */
vol->bps = FAT_GET_BR_BYTES_PER_SECTOR(boot_rec);
4000ff88: a4 0c a0 ff and %l2, 0xff, %l2
4000ff8c: b9 2f 20 08 sll %i4, 8, %i4
4000ff90: a4 17 00 12 or %i4, %l2, %l2
if ( (vol->bps != 512) &&
4000ff94: 84 04 be 00 add %l2, -512, %g2
4000ff98: 84 08 bd ff and %g2, -513, %g2
4000ff9c: 85 28 a0 10 sll %g2, 0x10, %g2
(vol->bps != 1024) &&
(vol->bps != 2048) &&
4000ffa0: 80 a0 a0 00 cmp %g2, 0
4000ffa4: 02 80 00 07 be 4000ffc0 <fat_init_volume_info+0x180>
<== ALWAYS TAKEN
4000ffa8: e4 35 c0 00 sth %l2, [ %l7 ]
(vol->bps != 1024) &&
4000ffac: 84 04 b8 00 add %l2, -2048, %g2
<== NOT EXECUTED
4000ffb0: 07 3f ff c2 sethi %hi(0xffff0800), %g3
<== NOT EXECUTED
(vol->bps != 2048) &&
4000ffb4: 80 a8 80 03 andncc %g2, %g3, %g0
<== NOT EXECUTED
4000ffb8: 12 80 00 41 bne 400100bc <fat_init_volume_info+0x27c>
<== NOT EXECUTED
4000ffbc: 01 00 00 00 nop
<== NOT EXECUTED
(vol->bps != 4096))
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
4000ffc0: 93 2c a0 10 sll %l2, 0x10, %o1
4000ffc4: 85 32 60 19 srl %o1, 0x19, %g2
4000ffc8: 80 88 a0 01 btst 1, %g2
4000ffcc: 12 80 00 09 bne 4000fff0 <fat_init_volume_info+0x1b0>
<== ALWAYS TAKEN
4000ffd0: c0 2d e0 03 clrb [ %l7 + 3 ]
4000ffd4: 86 10 20 00 clr %g3
<== NOT EXECUTED
i >>= 1, vol->sec_mul++);
4000ffd8: 85 38 a0 01 sra %g2, 1, %g2
<== NOT EXECUTED
4000ffdc: 88 00 e0 01 add %g3, 1, %g4
<== NOT EXECUTED
for (vol->sec_mul = 0, i = (vol->bps >> FAT_SECTOR512_BITS); (i & 1) == 0;
4000ffe0: 80 88 a0 01 btst 1, %g2
<== NOT EXECUTED
4000ffe4: 02 bf ff fd be 4000ffd8 <fat_init_volume_info+0x198>
<== NOT EXECUTED
4000ffe8: 86 10 00 04 mov %g4, %g3
<== NOT EXECUTED
4000ffec: c8 2d e0 03 stb %g4, [ %l7 + 3 ]
<== NOT EXECUTED
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
4000fff0: 85 32 60 10 srl %o1, 0x10, %g2
4000fff4: 80 8c a0 01 btst 1, %l2
4000fff8: 12 80 00 0a bne 40010020 <fat_init_volume_info+0x1e0>
<== NEVER TAKEN
4000fffc: c0 2d e0 02 clrb [ %l7 + 2 ]
40010000: 10 80 00 03 b 4001000c <fat_init_volume_info+0x1cc>
40010004: 86 10 20 01 mov 1, %g3
40010008: 86 10 00 01 mov %g1, %g3
i >>= 1, vol->sec_log2++);
4001000c: 85 38 a0 01 sra %g2, 1, %g2
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
40010010: 80 88 a0 01 btst 1, %g2
40010014: 02 bf ff fd be 40010008 <fat_init_volume_info+0x1c8>
40010018: 82 00 e0 01 add %g3, 1, %g1
4001001c: c6 2d e0 02 stb %g3, [ %l7 + 2 ]
/* Assign the sector size as bdbuf block size for now.
* If possible the bdbuf block size will get increased to the cluster
* size at the end of this method for better performance */
sc = rtems_bdbuf_set_block_size (vol->dd, vol->bps, true);
40010020: 94 10 20 01 mov 1, %o2
40010024: d0 05 e0 6c ld [ %l7 + 0x6c ], %o0
40010028: 40 00 21 f7 call 40018804 <rtems_bdbuf_set_block_size>
4001002c: 93 32 60 10 srl %o1, 0x10, %o1
if (sc != RTEMS_SUCCESSFUL)
40010030: 80 a2 20 00 cmp %o0, 0
40010034: 12 80 00 22 bne 400100bc <fat_init_volume_info+0x27c>
<== NEVER TAKEN
40010038: 84 10 20 01 mov 1, %g2
{
close(vol->fd);
rtems_set_errno_and_return_minus_one( EINVAL );
}
vol->bytes_per_block = vol->bps;
4001003c: c8 15 c0 00 lduh [ %l7 ], %g4
vol->bytes_per_block_log2 = vol->sec_log2;
40010040: de 0d e0 02 ldub [ %l7 + 2 ], %o7
vol->bytes_per_block = vol->bps;
40010044: 89 29 20 10 sll %g4, 0x10, %g4
40010048: b9 31 20 10 srl %g4, 0x10, %i4
vol->bytes_per_block_log2 = vol->sec_log2;
4001004c: de 2d e0 14 stb %o7, [ %l7 + 0x14 ]
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
40010050: 9a 8c 60 ff andcc %l1, 0xff, %o5
vol->bytes_per_block = vol->bps;
40010054: f8 25 e0 10 st %i4, [ %l7 + 0x10 ]
vol->sectors_per_block = 1;
40010058: c4 2d e0 0d stb %g2, [ %l7 + 0xd ]
if (vol->spc == 0)
4001005c: 02 80 00 18 be 400100bc <fat_init_volume_info+0x27c>
<== NEVER TAKEN
40010060: e2 2d e0 04 stb %l1, [ %l7 + 4 ]
{
close(vol->fd);
rtems_set_errno_and_return_minus_one(EINVAL);
}
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
40010064: c0 2d e0 05 clrb [ %l7 + 5 ]
40010068: 80 8c 60 01 btst 1, %l1
4001006c: 12 80 00 1c bne 400100dc <fat_init_volume_info+0x29c>
40010070: 84 10 00 0d mov %o5, %g2
40010074: 10 80 00 03 b 40010080 <fat_init_volume_info+0x240>
40010078: 86 10 20 01 mov 1, %g3
4001007c: 86 10 00 01 mov %g1, %g3
i >>= 1, vol->spc_log2++);
40010080: 85 38 a0 01 sra %g2, 1, %g2
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
40010084: 80 88 a0 01 btst 1, %g2
40010088: 02 bf ff fd be 4001007c <fat_init_volume_info+0x23c>
4001008c: 82 00 e0 01 add %g3, 1, %g1
40010090: 84 08 e0 ff and %g3, 0xff, %g2
40010094: c6 2d e0 05 stb %g3, [ %l7 + 5 ]
40010098: 86 10 20 01 mov 1, %g3
4001009c: 10 80 00 12 b 400100e4 <fat_init_volume_info+0x2a4>
400100a0: 87 28 c0 02 sll %g3, %g2, %g3
if (fs_info->c.state == FAT_CACHE_EMPTY)
400100a4: c4 0d e0 9d ldub [ %l7 + 0x9d ], %g2
<== NOT EXECUTED
400100a8: 80 a0 a0 00 cmp %g2, 0
<== NOT EXECUTED
400100ac: 02 80 00 04 be 400100bc <fat_init_volume_info+0x27c>
<== NOT EXECUTED
400100b0: 01 00 00 00 nop
<== NOT EXECUTED
400100b4: 7f ff fd b3 call 4000f780 <fat_buf_release.part.5>
<== NOT EXECUTED
400100b8: 90 10 00 17 mov %l7, %o0
<== NOT EXECUTED
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
FAT_FSINFO_LEAD_SIGNATURE_VALUE)
{
_fat_block_release(fs_info);
close(vol->fd);
400100bc: 7f ff ce 44 call 400039cc <close>
<== NOT EXECUTED
400100c0: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
400100c4: 40 00 2d 2b call 4001b570 <__errno>
<== NOT EXECUTED
400100c8: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
400100cc: 82 10 20 16 mov 0x16, %g1
<== NOT EXECUTED
400100d0: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
400100d4: 81 c7 e0 08 ret
<== NOT EXECUTED
400100d8: 81 e8 00 00 restore
<== NOT EXECUTED
for (vol->spc_log2 = 0, i = vol->spc; (i & 1) == 0;
400100dc: 84 10 20 00 clr %g2
400100e0: 86 10 20 01 mov 1, %g3
if (vol->spc != UINT32_C(1) << vol->spc_log2)
400100e4: 80 a3 40 03 cmp %o5, %g3
400100e8: 12 bf ff f5 bne 400100bc <fat_init_volume_info+0x27c>
<== NEVER TAKEN
400100ec: b9 2f 00 02 sll %i4, %g2, %i4
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
400100f0: c0 2d e0 0c clrb [ %l7 + 0xc ]
400100f4: 84 10 00 1c mov %i4, %g2
400100f8: 80 8f 20 01 btst 1, %i4
400100fc: 12 80 00 0a bne 40010124 <fat_init_volume_info+0x2e4>
<== NEVER TAKEN
40010100: f8 25 e0 08 st %i4, [ %l7 + 8 ]
40010104: 10 80 00 03 b 40010110 <fat_init_volume_info+0x2d0>
40010108: 86 10 20 01 mov 1, %g3
4001010c: 86 10 00 01 mov %g1, %g3
i >>= 1, vol->bpc_log2++);
40010110: 85 38 a0 01 sra %g2, 1, %g2
for (vol->bpc_log2 = 0, i = vol->bpc; (i & 1) == 0;
40010114: 80 88 a0 01 btst 1, %g2
40010118: 02 bf ff fd be 4001010c <fat_init_volume_info+0x2cc>
4001011c: 82 00 e0 01 add %g3, 1, %g1
40010120: c6 2d e0 0c stb %g3, [ %l7 + 0xc ]
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
40010124: 89 31 20 10 srl %g4, 0x10, %g4
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
40010128: ba 0f 60 ff and %i5, 0xff, %i5
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
4001012c: 86 01 3f ff add %g4, -1, %g3
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
40010130: ac 0d a0 ff and %l6, 0xff, %l6
40010134: bb 2f 60 08 sll %i5, 8, %i5
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
40010138: a0 0c 20 ff and %l0, 0xff, %l0
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
4001013c: ac 17 40 16 or %i5, %l6, %l6
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
40010140: a1 2c 20 08 sll %l0, 8, %l0
40010144: aa 0d 60 ff and %l5, 0xff, %l5
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
40010148: f2 2d e0 15 stb %i1, [ %l7 + 0x15 ]
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
4001014c: a0 14 00 15 or %l0, %l5, %l0
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
40010150: ec 35 e0 20 sth %l6, [ %l7 + 0x20 ]
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
40010154: 85 2c 20 10 sll %l0, 0x10, %g2
vol->rdir_entrs = FAT_GET_BR_FILES_PER_ROOT_DIR(boot_rec);
40010158: e0 35 e0 2c sth %l0, [ %l7 + 0x2c ]
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
4001015c: 85 30 a0 0b srl %g2, 0xb, %g2
40010160: 84 00 80 03 add %g2, %g3, %g2
40010164: 83 38 a0 1f sra %g2, 0x1f, %g1
40010168: 81 80 60 00 wr %g1, %y
4001016c: 01 00 00 00 nop
40010170: 01 00 00 00 nop
40010174: 01 00 00 00 nop
40010178: 88 78 80 04 sdiv %g2, %g4, %g4
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
4001017c: 9f 29 00 0f sll %g4, %o7, %o7
vol->rdir_secs = ((vol->rdir_entrs * FAT_DIRENTRY_SIZE) + (vol->bps - 1)) /
40010180: c8 25 e0 30 st %g4, [ %l7 + 0x30 ]
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
40010184: b4 0e a0 ff and %i2, 0xff, %i2
40010188: b5 2e a0 08 sll %i2, 8, %i2
4001018c: a8 0d 20 ff and %l4, 0xff, %l4
40010190: a8 16 80 14 or %i2, %l4, %l4
40010194: a9 2d 20 10 sll %l4, 0x10, %l4
40010198: 80 a5 20 00 cmp %l4, 0
4001019c: 02 80 00 9c be 4001040c <fat_init_volume_info+0x5cc>
400101a0: de 25 e0 34 st %o7, [ %l7 + 0x34 ]
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT(boot_rec);
400101a4: a9 35 20 10 srl %l4, 0x10, %l4
400101a8: e8 25 e0 24 st %l4, [ %l7 + 0x24 ]
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
400101ac: b2 0e 60 ff and %i1, 0xff, %i1
400101b0: ad 2d a0 10 sll %l6, 0x10, %l6
400101b4: b2 5e 40 14 smul %i1, %l4, %i1
400101b8: ad 35 a0 10 srl %l6, 0x10, %l6
400101bc: ac 06 40 16 add %i1, %l6, %l6
400101c0: 88 01 00 16 add %g4, %l6, %g4
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
400101c4: ec 25 e0 28 st %l6, [ %l7 + 0x28 ]
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
400101c8: 84 0e e0 ff and %i3, 0xff, %g2
400101cc: 85 28 a0 08 sll %g2, 8, %g2
400101d0: a6 0c e0 ff and %l3, 0xff, %l3
400101d4: 84 10 80 13 or %g2, %l3, %g2
400101d8: 85 28 a0 10 sll %g2, 0x10, %g2
400101dc: 80 a0 a0 00 cmp %g2, 0
400101e0: 02 80 00 7f be 400103dc <fat_init_volume_info+0x59c>
400101e4: c8 25 e0 3c st %g4, [ %l7 + 0x3c ]
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec);
400101e8: 85 30 a0 10 srl %g2, 0x10, %g2
400101ec: c4 25 e0 38 st %g2, [ %l7 + 0x38 ]
data_secs = vol->tot_secs - vol->data_fsec;
400101f0: 88 20 80 04 sub %g2, %g4, %g4
vol->data_cls = data_secs / vol->spc;
400101f4: 81 80 20 00 wr %g0, %y
400101f8: 01 00 00 00 nop
400101fc: 01 00 00 00 nop
40010200: 01 00 00 00 nop
40010204: 84 71 00 0d udiv %g4, %o5, %g2
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
40010208: 80 a0 af f4 cmp %g2, 0xff4
4001020c: 18 80 00 69 bgu 400103b0 <fat_init_volume_info+0x570>
40010210: c4 25 e0 40 st %g2, [ %l7 + 0x40 ]
vol->type = FAT_FAT12;
40010214: 84 10 20 01 mov 1, %g2
40010218: c4 2d e0 16 stb %g2, [ %l7 + 0x16 ]
vol->mask = FAT_FAT12_MASK;
4001021c: 84 10 2f ff mov 0xfff, %g2
40010220: c4 25 e0 18 st %g2, [ %l7 + 0x18 ]
vol->eoc_val = FAT_FAT12_EOC;
40010224: 84 10 2f f8 mov 0xff8, %g2
40010228: c4 25 e0 1c st %g2, [ %l7 + 0x1c ]
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = FAT_UNDEFINED_VALUE;
4001022c: 84 10 3f ff mov -1, %g2
vol->rdir_cl = 0;
40010230: c0 25 e0 44 clr [ %l7 + 0x44 ]
vol->mirror = 0;
40010234: c0 2d e0 5c clrb [ %l7 + 0x5c ]
vol->afat = 0;
40010238: c0 2d e0 64 clrb [ %l7 + 0x64 ]
vol->free_cls = FAT_UNDEFINED_VALUE;
4001023c: c4 25 e0 4c st %g2, [ %l7 + 0x4c ]
vol->next_cl = FAT_UNDEFINED_VALUE;
40010240: c4 25 e0 54 st %g2, [ %l7 + 0x54 ]
if (fs_info->c.state == FAT_CACHE_EMPTY)
40010244: c4 0d e0 9d ldub [ %l7 + 0x9d ], %g2
40010248: 80 a0 a0 00 cmp %g2, 0
4001024c: 12 80 00 7c bne 4001043c <fat_init_volume_info+0x5fc>
40010250: 01 00 00 00 nop
}
_fat_block_release(fs_info);
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
40010254: c4 0d e0 64 ldub [ %l7 + 0x64 ], %g2
40010258: c8 05 e0 24 ld [ %l7 + 0x24 ], %g4
4001025c: c6 15 e0 20 lduh [ %l7 + 0x20 ], %g3
40010260: 84 58 80 04 smul %g2, %g4, %g2
40010264: 84 00 80 03 add %g2, %g3, %g2
40010268: c4 25 e0 60 st %g2, [ %l7 + 0x60 ]
/* set up collection of fat-files fd */
fs_info->vhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
4001026c: 92 10 20 0c mov 0xc, %o1
40010270: 7f ff fa 66 call 4000ec08 <calloc>
40010274: 90 10 20 02 mov 2, %o0
40010278: d0 25 e0 80 st %o0, [ %l7 + 0x80 ]
if ( fs_info->vhash == NULL )
4001027c: 80 a2 20 00 cmp %o0, 0
40010280: 02 80 01 03 be 4001068c <fat_init_volume_info+0x84c>
<== NEVER TAKEN
40010284: 84 10 00 08 mov %o0, %g2
head->previous = NULL;
40010288: c0 22 20 04 clr [ %o0 + 4 ]
return &the_chain->Tail.Node;
4001028c: ba 02 20 04 add %o0, 4, %i5
head->next = tail;
40010290: fa 22 00 00 st %i5, [ %o0 ]
return &the_chain->Tail.Node;
40010294: 86 02 20 0c add %o0, 0xc, %g3
40010298: 88 02 20 10 add %o0, 0x10, %g4
tail->previous = head;
4001029c: c4 20 a0 08 st %g2, [ %g2 + 8 ]
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->vhash + i);
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
400102a0: 92 10 20 0c mov 0xc, %o1
head->next = tail;
400102a4: c8 20 a0 0c st %g4, [ %g2 + 0xc ]
400102a8: 90 10 20 02 mov 2, %o0
head->previous = NULL;
400102ac: c0 20 a0 10 clr [ %g2 + 0x10 ]
400102b0: 7f ff fa 56 call 4000ec08 <calloc>
400102b4: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
400102b8: d0 25 e0 84 st %o0, [ %l7 + 0x84 ]
if ( fs_info->rhash == NULL )
400102bc: 80 a2 20 00 cmp %o0, 0
400102c0: 02 80 00 e7 be 4001065c <fat_init_volume_info+0x81c>
<== NEVER TAKEN
400102c4: 84 10 00 08 mov %o0, %g2
}
for (i = 0; i < FAT_HASH_SIZE; i++)
rtems_chain_initialize_empty(fs_info->rhash + i);
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
400102c8: c8 0d e0 03 ldub [ %l7 + 3 ], %g4
400102cc: c6 05 e0 38 ld [ %l7 + 0x38 ], %g3
400102d0: c0 22 20 04 clr [ %o0 + 4 ]
400102d4: 87 28 c0 04 sll %g3, %g4, %g3
return &the_chain->Tail.Node;
400102d8: ba 02 20 04 add %o0, 4, %i5
400102dc: 87 28 e0 04 sll %g3, 4, %g3
head->next = tail;
400102e0: fa 22 00 00 st %i5, [ %o0 ]
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
400102e4: 88 10 21 00 mov 0x100, %g4
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
400102e8: c6 25 e0 94 st %g3, [ %l7 + 0x94 ]
return &the_chain->Tail.Node;
400102ec: 86 02 20 0c add %o0, 0xc, %g3
fs_info->uino_pool_size = FAT_UINO_POOL_INIT_SIZE;
400102f0: c8 25 e0 90 st %g4, [ %l7 + 0x90 ]
400102f4: 88 02 20 10 add %o0, 0x10, %g4
fs_info->index = 0;
400102f8: c0 25 e0 8c clr [ %l7 + 0x8c ]
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
400102fc: 92 10 20 01 mov 1, %o1
tail->previous = head;
40010300: c4 20 a0 08 st %g2, [ %g2 + 8 ]
40010304: 90 10 21 00 mov 0x100, %o0
head->next = tail;
40010308: c8 20 a0 0c st %g4, [ %g2 + 0xc ]
head->previous = NULL;
4001030c: c0 20 a0 10 clr [ %g2 + 0x10 ]
40010310: 7f ff fa 3e call 4000ec08 <calloc>
40010314: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
if ( fs_info->uino == NULL )
40010318: 80 a2 20 00 cmp %o0, 0
4001031c: 02 80 00 b9 be 40010600 <fat_init_volume_info+0x7c0>
<== NEVER TAKEN
40010320: d0 25 e0 88 st %o0, [ %l7 + 0x88 ]
close(vol->fd);
free(fs_info->vhash);
free(fs_info->rhash);
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
40010324: d0 15 c0 00 lduh [ %l7 ], %o0
40010328: 7f ff fa 38 call 4000ec08 <calloc>
4001032c: 92 10 20 01 mov 1, %o1
if (fs_info->sec_buf == NULL)
40010330: 80 a2 20 00 cmp %o0, 0
40010334: 02 80 00 ce be 4001066c <fat_init_volume_info+0x82c>
<== NEVER TAKEN
40010338: d0 25 e0 a4 st %o0, [ %l7 + 0xa4 ]
return (sec_num & (vol->spc - 1)) == 0;
4001033c: c4 0d e0 04 ldub [ %l7 + 4 ], %g2
40010340: c6 05 e0 3c ld [ %l7 + 0x3c ], %g3
40010344: 84 00 bf ff add %g2, -1, %g2
/*
* If possible we will use the cluster size as bdbuf block size for faster
* file access. This requires that certain sectors are aligned to cluster
* borders.
*/
if (is_cluster_aligned(vol, vol->data_fsec)
40010348: 80 88 80 03 btst %g2, %g3
4001034c: 12 80 00 d6 bne 400106a4 <fat_init_volume_info+0x864>
<== NEVER TAKEN
40010350: 01 00 00 00 nop
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
40010354: c6 0d e0 16 ldub [ %l7 + 0x16 ], %g3
40010358: 80 a0 e0 04 cmp %g3, 4
4001035c: 22 80 00 07 be,a 40010378 <fat_init_volume_info+0x538>
40010360: d2 05 e0 08 ld [ %l7 + 8 ], %o1
return (sec_num & (vol->spc - 1)) == 0;
40010364: c6 05 e0 28 ld [ %l7 + 0x28 ], %g3
&& (FAT_FAT32 == vol->type || is_cluster_aligned(vol, vol->rdir_loc)))
40010368: 80 88 80 03 btst %g2, %g3
4001036c: 12 80 00 ce bne 400106a4 <fat_init_volume_info+0x864>
<== NEVER TAKEN
40010370: 01 00 00 00 nop
{
sc = rtems_bdbuf_set_block_size (vol->dd, vol->bpc, true);
40010374: d2 05 e0 08 ld [ %l7 + 8 ], %o1
40010378: d0 05 e0 6c ld [ %l7 + 0x6c ], %o0
4001037c: 40 00 21 22 call 40018804 <rtems_bdbuf_set_block_size>
40010380: 94 10 20 01 mov 1, %o2
if (sc == RTEMS_SUCCESSFUL)
40010384: 80 a2 20 00 cmp %o0, 0
40010388: 12 80 00 c7 bne 400106a4 <fat_init_volume_info+0x864>
4001038c: 01 00 00 00 nop
{
vol->bytes_per_block = vol->bpc;
40010390: c8 05 e0 08 ld [ %l7 + 8 ], %g4
vol->bytes_per_block_log2 = vol->bpc_log2;
40010394: c6 0d e0 0c ldub [ %l7 + 0xc ], %g3
vol->sectors_per_block = vol->spc;
40010398: c4 0d e0 04 ldub [ %l7 + 4 ], %g2
vol->bytes_per_block = vol->bpc;
4001039c: c8 25 e0 10 st %g4, [ %l7 + 0x10 ]
vol->bytes_per_block_log2 = vol->bpc_log2;
400103a0: c6 2d e0 14 stb %g3, [ %l7 + 0x14 ]
vol->sectors_per_block = vol->spc;
400103a4: c4 2d e0 0d stb %g2, [ %l7 + 0xd ]
400103a8: 81 c7 e0 08 ret
400103ac: 81 e8 00 00 restore
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
400103b0: 07 00 00 3f sethi %hi(0xfc00), %g3
400103b4: 88 10 e3 f4 or %g3, 0x3f4, %g4 ! fff4 <_ISR_Stack_size+0xeff4>
400103b8: 80 a0 80 04 cmp %g2, %g4
400103bc: 38 80 00 24 bgu,a 4001044c <fat_init_volume_info+0x60c>
400103c0: 07 03 ff ff sethi %hi(0xffffc00), %g3
vol->mask = FAT_FAT16_MASK;
400103c4: 84 10 e3 ff or %g3, 0x3ff, %g2 ! fffffff <RAM_SIZE+0xfbfffff>
vol->type = FAT_FAT16;
400103c8: 88 10 20 02 mov 2, %g4
vol->eoc_val = FAT_FAT16_EOC;
400103cc: 86 10 e3 f8 or %g3, 0x3f8, %g3
vol->type = FAT_FAT16;
400103d0: c8 2d e0 16 stb %g4, [ %l7 + 0x16 ]
400103d4: 10 bf ff 96 b 4001022c <fat_init_volume_info+0x3ec>
400103d8: c4 3d e0 18 std %g2, [ %l7 + 0x18 ]
vol->tot_secs = FAT_GET_BR_TOTAL_SECTORS_NUM32(boot_rec);
400103dc: c6 0f bf 7d ldub [ %fp + -131 ], %g3
400103e0: 87 28 e0 10 sll %g3, 0x10, %g3
400103e4: c4 0f bf 7e ldub [ %fp + -130 ], %g2
400103e8: fa 0f bf 7f ldub [ %fp + -129 ], %i5
400103ec: c2 0f bf 7b ldub [ %fp + -133 ], %g1
400103f0: 85 28 a0 08 sll %g2, 8, %g2
400103f4: 84 10 80 03 or %g2, %g3, %g2
400103f8: 87 28 60 18 sll %g1, 0x18, %g3
400103fc: 84 10 80 1d or %g2, %i5, %g2
40010400: 84 10 80 03 or %g2, %g3, %g2
40010404: 10 bf ff 7b b 400101f0 <fat_init_volume_info+0x3b0>
40010408: c4 25 e0 38 st %g2, [ %l7 + 0x38 ]
vol->fat_length = FAT_GET_BR_SECTORS_PER_FAT32(boot_rec);
4001040c: c4 0f bf 76 ldub [ %fp + -138 ], %g2
40010410: 85 28 a0 10 sll %g2, 0x10, %g2
40010414: e8 0f bf 77 ldub [ %fp + -137 ], %l4
40010418: c6 0f bf 7c ldub [ %fp + -132 ], %g3
4001041c: c2 0f bf 73 ldub [ %fp + -141 ], %g1
40010420: a9 2d 20 08 sll %l4, 8, %l4
40010424: a8 15 00 02 or %l4, %g2, %l4
40010428: 85 28 60 18 sll %g1, 0x18, %g2
4001042c: a8 15 00 03 or %l4, %g3, %l4
40010430: a8 15 00 02 or %l4, %g2, %l4
40010434: 10 bf ff 5e b 400101ac <fat_init_volume_info+0x36c>
40010438: e8 25 e0 24 st %l4, [ %l7 + 0x24 ]
4001043c: 7f ff fc d1 call 4000f780 <fat_buf_release.part.5>
40010440: 90 10 00 17 mov %l7, %o0
vol->afat_loc = vol->fat_loc + vol->fat_length * vol->afat;
40010444: 10 bf ff 85 b 40010258 <fat_init_volume_info+0x418>
40010448: c4 0d e0 64 ldub [ %l7 + 0x64 ], %g2
else if ( vol->data_cls < FAT_FAT32_MASK - 1 )
4001044c: 88 10 e3 fd or %g3, 0x3fd, %g4
40010450: 80 a0 80 04 cmp %g2, %g4
40010454: 18 bf ff 1a bgu 400100bc <fat_init_volume_info+0x27c>
<== NEVER TAKEN
40010458: b8 10 e3 ff or %g3, 0x3ff, %i4
vol->eoc_val = FAT_FAT32_EOC;
4001045c: ba 10 e3 f8 or %g3, 0x3f8, %i5
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
40010460: c6 0f bf 75 ldub [ %fp + -139 ], %g3
40010464: c2 0f bf 6b ldub [ %fp + -149 ], %g1
40010468: c4 0f bf 67 ldub [ %fp + -153 ], %g2
4001046c: 87 28 e0 10 sll %g3, 0x10, %g3
40010470: c8 0f bf 74 ldub [ %fp + -140 ], %g4
40010474: 85 28 a0 08 sll %g2, 8, %g2
40010478: 84 10 80 03 or %g2, %g3, %g2
4001047c: 87 28 60 18 sll %g1, 0x18, %g3
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
40010480: c2 0f bf 6f ldub [ %fp + -145 ], %g1
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
40010484: 84 10 80 04 or %g2, %g4, %g2
vol->eoc_val = FAT_FAT32_EOC;
40010488: f8 3d e0 18 std %i4, [ %l7 + 0x18 ]
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
4001048c: 84 10 80 03 or %g2, %g3, %g2
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
40010490: 88 08 7f 80 and %g1, -128, %g4
vol->type = FAT_FAT32;
40010494: 86 10 20 04 mov 4, %g3
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
40010498: c4 25 e0 44 st %g2, [ %l7 + 0x44 ]
if (vol->mirror)
4001049c: 80 88 60 80 btst 0x80, %g1
vol->type = FAT_FAT32;
400104a0: c6 2d e0 16 stb %g3, [ %l7 + 0x16 ]
if (vol->mirror)
400104a4: 02 80 00 44 be 400105b4 <fat_init_volume_info+0x774>
<== ALWAYS TAKEN
400104a8: c8 2d e0 5c stb %g4, [ %l7 + 0x5c ]
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
400104ac: c2 0f bf 6f ldub [ %fp + -145 ], %g1
<== NOT EXECUTED
400104b0: 82 08 60 0f and %g1, 0xf, %g1
<== NOT EXECUTED
400104b4: c2 2d e0 64 stb %g1, [ %l7 + 0x64 ]
<== NOT EXECUTED
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
400104b8: c4 0f bf 65 ldub [ %fp + -155 ], %g2
400104bc: c6 0f bf 66 ldub [ %fp + -154 ], %g3
400104c0: 85 28 a0 08 sll %g2, 8, %g2
400104c4: 84 10 80 03 or %g2, %g3, %g2
400104c8: c4 35 e0 48 sth %g2, [ %l7 + 0x48 ]
if( vol->info_sec == 0 )
400104cc: 85 28 a0 10 sll %g2, 0x10, %g2
400104d0: 93 30 a0 10 srl %g2, 0x10, %o1
400104d4: 80 a2 60 00 cmp %o1, 0
400104d8: 02 bf fe f9 be 400100bc <fat_init_volume_info+0x27c>
<== NEVER TAKEN
400104dc: 96 10 20 04 mov 4, %o3
ret = _fat_block_read(fs_info, vol->info_sec , 0,
400104e0: 98 07 bf 88 add %fp, -120, %o4
400104e4: 94 10 20 00 clr %o2
400104e8: 7f ff fd 55 call 4000fa3c <_fat_block_read>
400104ec: 90 10 00 17 mov %l7, %o0
if ( ret < 0 )
400104f0: 80 a2 20 00 cmp %o0, 0
400104f4: 06 80 00 56 bl 4001064c <fat_init_volume_info+0x80c>
<== NEVER TAKEN
400104f8: c6 0f bf 8b ldub [ %fp + -117 ], %g3
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
400104fc: 87 28 e0 18 sll %g3, 0x18, %g3
40010500: c4 0f bf 89 ldub [ %fp + -119 ], %g2
40010504: c8 0f bf 8a ldub [ %fp + -118 ], %g4
40010508: fa 0f bf 88 ldub [ %fp + -120 ], %i5
4001050c: 85 28 a0 08 sll %g2, 8, %g2
40010510: 89 29 20 10 sll %g4, 0x10, %g4
40010514: 84 10 80 04 or %g2, %g4, %g2
40010518: 84 10 80 1d or %g2, %i5, %g2
4001051c: 84 10 80 03 or %g2, %g3, %g2
40010520: 07 10 58 54 sethi %hi(0x41615000), %g3
40010524: 86 10 e2 52 or %g3, 0x252, %g3 ! 41615252 <RAM_END+0x1215252>
40010528: 80 a0 80 03 cmp %g2, %g3
4001052c: 12 bf fe de bne 400100a4 <fat_init_volume_info+0x264>
<== NEVER TAKEN
40010530: 98 07 bf 88 add %fp, -120, %o4
ret = _fat_block_read(fs_info, vol->info_sec , FAT_FSI_INFO,
40010534: d2 15 e0 48 lduh [ %l7 + 0x48 ], %o1
40010538: 96 10 20 0c mov 0xc, %o3
4001053c: 94 10 21 e4 mov 0x1e4, %o2
40010540: 7f ff fd 3f call 4000fa3c <_fat_block_read>
40010544: 90 10 00 17 mov %l7, %o0
if ( ret < 0 )
40010548: 80 a2 20 00 cmp %o0, 0
4001054c: 06 80 00 3a bl 40010634 <fat_init_volume_info+0x7f4>
<== NEVER TAKEN
40010550: c6 0f bf 8d ldub [ %fp + -115 ], %g3
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
40010554: f6 0f bf 8e ldub [ %fp + -114 ], %i3
40010558: f2 0f bf 8c ldub [ %fp + -116 ], %i1
4001055c: f8 0f bf 8f ldub [ %fp + -113 ], %i4
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
40010560: c4 0f bf 91 ldub [ %fp + -111 ], %g2
40010564: fa 0f bf 92 ldub [ %fp + -110 ], %i5
40010568: f4 0f bf 90 ldub [ %fp + -112 ], %i2
4001056c: c8 0f bf 93 ldub [ %fp + -109 ], %g4
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
40010570: 87 28 e0 08 sll %g3, 8, %g3
40010574: b7 2e e0 10 sll %i3, 0x10, %i3
40010578: b9 2f 20 18 sll %i4, 0x18, %i4
4001057c: 86 10 c0 1b or %g3, %i3, %g3
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
40010580: 85 28 a0 08 sll %g2, 8, %g2
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
40010584: 86 10 c0 19 or %g3, %i1, %g3
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
40010588: bb 2f 60 10 sll %i5, 0x10, %i5
FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
4001058c: 86 10 c0 1c or %g3, %i4, %g3
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
40010590: 84 10 80 1d or %g2, %i5, %g2
40010594: 89 29 20 18 sll %g4, 0x18, %g4
40010598: 84 10 80 1a or %g2, %i2, %g2
vol->free_cls_in_fs_info =
4001059c: c6 25 e0 50 st %g3, [ %l7 + 0x50 ]
FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
400105a0: 84 10 80 04 or %g2, %g4, %g2
vol->free_cls = vol->free_cls_in_fs_info;
400105a4: c6 25 e0 4c st %g3, [ %l7 + 0x4c ]
vol->next_cl_in_fs_info =
400105a8: c4 25 e0 58 st %g2, [ %l7 + 0x58 ]
400105ac: 10 bf ff 26 b 40010244 <fat_init_volume_info+0x404>
400105b0: c4 25 e0 54 st %g2, [ %l7 + 0x54 ]
vol->afat = 0;
400105b4: 10 bf ff c1 b 400104b8 <fat_init_volume_info+0x678>
400105b8: c0 2d e0 64 clrb [ %l7 + 0x64 ]
close(vol->fd);
400105bc: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
400105c0: 7f ff cd 03 call 400039cc <close>
<== NOT EXECUTED
400105c4: 01 00 00 00 nop
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENXIO);
400105c8: 40 00 2b ea call 4001b570 <__errno>
<== NOT EXECUTED
400105cc: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xbfbfffff>
<== NOT EXECUTED
400105d0: 82 10 20 06 mov 6, %g1
<== NOT EXECUTED
400105d4: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
400105d8: 81 c7 e0 08 ret
<== NOT EXECUTED
400105dc: 81 e8 00 00 restore
<== NOT EXECUTED
close(vol->fd);
400105e0: 7f ff cc fb call 400039cc <close>
<== NOT EXECUTED
400105e4: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
400105e8: 40 00 2b e2 call 4001b570 <__errno>
<== NOT EXECUTED
400105ec: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
400105f0: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
400105f4: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
400105f8: 81 c7 e0 08 ret
<== NOT EXECUTED
400105fc: 81 e8 00 00 restore
<== NOT EXECUTED
close(vol->fd);
40010600: 7f ff cc f3 call 400039cc <close>
<== NOT EXECUTED
40010604: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
free(fs_info->vhash);
40010608: 7f ff cd 54 call 40003b58 <free>
<== NOT EXECUTED
4001060c: d0 05 e0 80 ld [ %l7 + 0x80 ], %o0
<== NOT EXECUTED
free(fs_info->rhash);
40010610: d0 05 e0 84 ld [ %l7 + 0x84 ], %o0
<== NOT EXECUTED
free(fs_info->uino);
40010614: 7f ff cd 51 call 40003b58 <free>
<== NOT EXECUTED
40010618: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
4001061c: 40 00 2b d5 call 4001b570 <__errno>
<== NOT EXECUTED
40010620: 01 00 00 00 nop
<== NOT EXECUTED
40010624: 82 10 20 0c mov 0xc, %g1 ! c <_TLS_Alignment+0xb>
<== NOT EXECUTED
40010628: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
4001062c: 81 c7 e0 08 ret
<== NOT EXECUTED
40010630: 81 e8 00 00 restore
<== NOT EXECUTED
if (fs_info->c.state == FAT_CACHE_EMPTY)
40010634: c4 0d e0 9d ldub [ %l7 + 0x9d ], %g2
<== NOT EXECUTED
40010638: 80 a0 a0 00 cmp %g2, 0
<== NOT EXECUTED
4001063c: 02 80 00 04 be 4001064c <fat_init_volume_info+0x80c>
<== NOT EXECUTED
40010640: 01 00 00 00 nop
<== NOT EXECUTED
40010644: 7f ff fc 4f call 4000f780 <fat_buf_release.part.5>
<== NOT EXECUTED
40010648: 90 10 00 17 mov %l7, %o0
<== NOT EXECUTED
close(vol->fd);
4001064c: 7f ff cc e0 call 400039cc <close>
<== NOT EXECUTED
40010650: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
return -1;
40010654: 81 c7 e0 08 ret
<== NOT EXECUTED
40010658: 91 e8 3f ff restore %g0, -1, %o0
<== NOT EXECUTED
close(vol->fd);
4001065c: 7f ff cc dc call 400039cc <close>
<== NOT EXECUTED
40010660: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
free(fs_info->vhash);
40010664: 10 bf ff ec b 40010614 <fat_init_volume_info+0x7d4>
<== NOT EXECUTED
40010668: d0 05 e0 80 ld [ %l7 + 0x80 ], %o0
<== NOT EXECUTED
close(vol->fd);
4001066c: 7f ff cc d8 call 400039cc <close>
<== NOT EXECUTED
40010670: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
free(fs_info->vhash);
40010674: 7f ff cd 39 call 40003b58 <free>
<== NOT EXECUTED
40010678: d0 05 e0 80 ld [ %l7 + 0x80 ], %o0
<== NOT EXECUTED
free(fs_info->rhash);
4001067c: 7f ff cd 37 call 40003b58 <free>
<== NOT EXECUTED
40010680: d0 05 e0 84 ld [ %l7 + 0x84 ], %o0
<== NOT EXECUTED
free(fs_info->uino);
40010684: 10 bf ff e4 b 40010614 <fat_init_volume_info+0x7d4>
<== NOT EXECUTED
40010688: d0 05 e0 88 ld [ %l7 + 0x88 ], %o0
<== NOT EXECUTED
close(vol->fd);
4001068c: 7f ff cc d0 call 400039cc <close>
<== NOT EXECUTED
40010690: d0 05 e0 68 ld [ %l7 + 0x68 ], %o0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
40010694: 40 00 2b b7 call 4001b570 <__errno>
<== NOT EXECUTED
40010698: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
4001069c: 82 10 20 0c mov 0xc, %g1
<== NOT EXECUTED
400106a0: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
400106a4: 81 c7 e0 08 ret
400106a8: 81 e8 00 00 restore
40011000 <fat_scan_fat_for_free_clusters>:
{
40011000: 9d e3 bf 98 save %sp, -104, %sp
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
40011004: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls)
40011008: e0 06 20 54 ld [ %i0 + 0x54 ], %l0
4001100c: 84 04 3f fe add %l0, -2, %g2
{
40011010: a4 10 00 18 mov %i0, %l2
if (fs_info->vol.next_cl - 2 < fs_info->vol.data_cls)
40011014: 80 a0 40 02 cmp %g1, %g2
40011018: 18 80 00 03 bgu 40011024 <fat_scan_fat_for_free_clusters+0x24>
4001101c: a6 00 60 02 add %g1, 2, %l3
uint32_t cl4find = 2;
40011020: a0 10 20 02 mov 2, %l0
*cls_added = 0;
40011024: c0 26 c0 00 clr [ %i3 ]
while (*cls_added != count && i < data_cls_val)
40011028: 80 a4 e0 02 cmp %l3, 2
4001102c: 18 80 00 03 bgu 40011038 <fat_scan_fat_for_free_clusters+0x38>
<== ALWAYS TAKEN
40011030: 82 10 20 01 mov 1, %g1
40011034: 82 10 20 00 clr %g1
<== NOT EXECUTED
40011038: 80 88 60 ff btst 0xff, %g1
4001103c: 02 80 00 50 be 4001117c <fat_scan_fat_for_free_clusters+0x17c>
<== NEVER TAKEN
40011040: 80 a6 a0 00 cmp %i2, 0
40011044: 02 80 00 4e be 4001117c <fat_scan_fat_for_free_clusters+0x17c>
<== NEVER TAKEN
40011048: a2 10 20 02 mov 2, %l1
uint32_t save_cln = FAT_UNDEFINED_VALUE;
4001104c: 10 80 00 19 b 400110b0 <fat_scan_fat_for_free_clusters+0xb0>
40011050: a8 10 3f ff mov -1, %l4
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
40011054: 94 10 3f ff mov -1, %o2
40011058: 92 10 00 10 mov %l0, %o1
4001105c: 7f ff ff 0d call 40010c90 <fat_set_fat_cluster>
40011060: 90 10 00 12 mov %l2, %o0
if ( rc != RC_OK )
40011064: b0 92 20 00 orcc %o0, 0, %i0
40011068: 12 80 00 38 bne 40011148 <fat_scan_fat_for_free_clusters+0x148>
<== NEVER TAKEN
4001106c: 80 a7 60 00 cmp %i5, 0
if (zero_fill)
40011070: 32 80 00 38 bne,a 40011150 <fat_scan_fat_for_free_clusters+0x150>
40011074: d6 04 a0 08 ld [ %l2 + 8 ], %o3
(*cls_added)++;
40011078: c2 06 c0 00 ld [ %i3 ], %g1
4001107c: 82 00 60 01 inc %g1
40011080: c2 26 c0 00 st %g1, [ %i3 ]
40011084: a8 10 00 10 mov %l0, %l4
cl4find++;
40011088: a0 04 20 01 inc %l0
if (cl4find >= data_cls_val)
4001108c: 80 a4 c0 10 cmp %l3, %l0
40011090: 18 80 00 03 bgu 4001109c <fat_scan_fat_for_free_clusters+0x9c>
40011094: a2 04 60 01 inc %l1
cl4find = 2;
40011098: a0 10 20 02 mov 2, %l0
while (*cls_added != count && i < data_cls_val)
4001109c: 80 a6 80 01 cmp %i2, %g1
400110a0: 02 80 00 38 be 40011180 <fat_scan_fat_for_free_clusters+0x180>
400110a4: 80 a4 40 13 cmp %l1, %l3
400110a8: 3a 80 00 37 bcc,a 40011184 <fat_scan_fat_for_free_clusters+0x184>
400110ac: e8 27 00 00 st %l4, [ %i4 ]
uint32_t next_cln = 0;
400110b0: c0 27 bf fc clr [ %fp + -4 ]
rc = fat_get_fat_cluster(fs_info, cl4find, &next_cln);
400110b4: 94 07 bf fc add %fp, -4, %o2
400110b8: 92 10 00 10 mov %l0, %o1
400110bc: 7f ff fe 7f call 40010ab8 <fat_get_fat_cluster>
400110c0: 90 10 00 12 mov %l2, %o0
if (*cls_added != 0)
400110c4: c2 06 c0 00 ld [ %i3 ], %g1
if ( rc != RC_OK )
400110c8: 80 a2 20 00 cmp %o0, 0
400110cc: 12 80 00 3a bne 400111b4 <fat_scan_fat_for_free_clusters+0x1b4>
<== NEVER TAKEN
400110d0: b0 10 00 08 mov %o0, %i0
if (next_cln == FAT_GENFAT_FREE)
400110d4: c4 07 bf fc ld [ %fp + -4 ], %g2
400110d8: 80 a0 a0 00 cmp %g2, 0
400110dc: 32 bf ff ec bne,a 4001108c <fat_scan_fat_for_free_clusters+0x8c>
400110e0: a0 04 20 01 inc %l0
if (*cls_added == 0)
400110e4: 80 a0 60 00 cmp %g1, 0
400110e8: 22 bf ff db be,a 40011054 <fat_scan_fat_for_free_clusters+0x54>
400110ec: e0 26 40 00 st %l0, [ %i1 ]
rc = fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_EOC);
400110f0: 94 10 3f ff mov -1, %o2
400110f4: 92 10 00 10 mov %l0, %o1
400110f8: 7f ff fe e6 call 40010c90 <fat_set_fat_cluster>
400110fc: 90 10 00 12 mov %l2, %o0
if ( rc != RC_OK )
40011100: b0 92 20 00 orcc %o0, 0, %i0
40011104: 12 80 00 2f bne 400111c0 <fat_scan_fat_for_free_clusters+0x1c0>
<== NEVER TAKEN
40011108: 94 10 00 10 mov %l0, %o2
rc = fat_set_fat_cluster(fs_info, save_cln, cl4find);
4001110c: 92 10 00 14 mov %l4, %o1
40011110: 7f ff fe e0 call 40010c90 <fat_set_fat_cluster>
40011114: 90 10 00 12 mov %l2, %o0
if ( rc != RC_OK )
40011118: b0 92 20 00 orcc %o0, 0, %i0
4001111c: 02 bf ff d5 be 40011070 <fat_scan_fat_for_free_clusters+0x70>
<== ALWAYS TAKEN
40011120: 80 a7 60 00 cmp %i5, 0
fat_free_fat_clusters_chain(fs_info, (*chain));
40011124: d2 06 40 00 ld [ %i1 ], %o1
<== NOT EXECUTED
40011128: 7f ff ff 7e call 40010f20 <fat_free_fat_clusters_chain>
<== NOT EXECUTED
4001112c: 90 10 00 12 mov %l2, %o0
<== NOT EXECUTED
(void) fat_set_fat_cluster(fs_info, cl4find, FAT_GENFAT_FREE);
40011130: 94 10 20 00 clr %o2
<== NOT EXECUTED
40011134: 92 10 00 10 mov %l0, %o1
<== NOT EXECUTED
40011138: 7f ff fe d6 call 40010c90 <fat_set_fat_cluster>
<== NOT EXECUTED
4001113c: 90 10 00 12 mov %l2, %o0
<== NOT EXECUTED
fat_buf_release(fs_info);
40011140: 7f ff fa 36 call 4000fa18 <fat_buf_release>
<== NOT EXECUTED
40011144: 90 10 00 12 mov %l2, %o0
<== NOT EXECUTED
return rc;
40011148: 81 c7 e0 08 ret
<== NOT EXECUTED
4001114c: 81 e8 00 00 restore
<== NOT EXECUTED
ssize_t bytes_written =
40011150: 98 10 20 00 clr %o4
40011154: 94 10 20 00 clr %o2
40011158: 92 10 00 10 mov %l0, %o1
4001115c: 7f ff fa 83 call 4000fb68 <fat_cluster_set>
40011160: 90 10 00 12 mov %l2, %o0
if (fs_info->vol.bpc != bytes_written)
40011164: c2 04 a0 08 ld [ %l2 + 8 ], %g1
40011168: 80 a0 40 08 cmp %g1, %o0
4001116c: 22 bf ff c4 be,a 4001107c <fat_scan_fat_for_free_clusters+0x7c>
<== ALWAYS TAKEN
40011170: c2 06 c0 00 ld [ %i3 ], %g1
rc = -1;
40011174: 10 bf ff ec b 40011124 <fat_scan_fat_for_free_clusters+0x124>
<== NOT EXECUTED
40011178: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
uint32_t save_cln = FAT_UNDEFINED_VALUE;
4001117c: a8 10 3f ff mov -1, %l4
<== NOT EXECUTED
*last_cl = save_cln;
40011180: e8 27 00 00 st %l4, [ %i4 ]
fs_info->vol.next_cl = save_cln;
40011184: e8 24 a0 54 st %l4, [ %l2 + 0x54 ]
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
40011188: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1
4001118c: 80 a0 7f ff cmp %g1, -1
40011190: 02 80 00 05 be 400111a4 <fat_scan_fat_for_free_clusters+0x1a4>
<== ALWAYS TAKEN
40011194: 90 10 00 12 mov %l2, %o0
fs_info->vol.free_cls -= (*cls_added);
40011198: c4 06 c0 00 ld [ %i3 ], %g2
<== NOT EXECUTED
4001119c: 82 20 40 02 sub %g1, %g2, %g1
<== NOT EXECUTED
400111a0: c2 24 a0 4c st %g1, [ %l2 + 0x4c ]
<== NOT EXECUTED
fat_buf_release(fs_info);
400111a4: 7f ff fa 1d call 4000fa18 <fat_buf_release>
400111a8: b0 10 20 00 clr %i0
}
400111ac: 81 c7 e0 08 ret
400111b0: 81 e8 00 00 restore
if (*cls_added != 0)
400111b4: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
400111b8: 02 80 00 05 be 400111cc <fat_scan_fat_for_free_clusters+0x1cc>
<== NOT EXECUTED
400111bc: 01 00 00 00 nop
<== NOT EXECUTED
fat_free_fat_clusters_chain(fs_info, (*chain));
400111c0: d2 06 40 00 ld [ %i1 ], %o1
<== NOT EXECUTED
400111c4: 7f ff ff 57 call 40010f20 <fat_free_fat_clusters_chain>
<== NOT EXECUTED
400111c8: 90 10 00 12 mov %l2, %o0
<== NOT EXECUTED
return rc;
400111cc: 81 c7 e0 08 ret
<== NOT EXECUTED
400111d0: 81 e8 00 00 restore
<== NOT EXECUTED
4000fabc <fat_sector_write>:
fat_fs_info_t *fs_info,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
4000fabc: 9d e3 bf 98 save %sp, -104, %sp
uint32_t sec_num = start;
uint32_t ofs = offset;
uint8_t *sec_buf;
uint32_t c = 0;
while(count > 0)
4000fac0: 80 a6 e0 00 cmp %i3, 0
4000fac4: 02 80 00 27 be 4000fb60 <fat_sector_write+0xa4>
<== NEVER TAKEN
4000fac8: a0 10 20 00 clr %l0
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
4000facc: 10 80 00 13 b 4000fb18 <fat_sector_write+0x5c>
4000fad0: a2 10 20 01 mov 1, %l1
c = MIN(count, (fs_info->vol.bps - ofs));
if (c == fs_info->vol.bytes_per_block)
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
else
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_READ, &sec_buf);
4000fad4: 94 10 20 01 mov 1, %o2
4000fad8: 96 07 bf fc add %fp, -4, %o3
4000fadc: 7f ff ff 9f call 4000f958 <fat_buf_access>
4000fae0: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
return -1;
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4000fae4: 92 07 00 10 add %i4, %l0, %o1
if (rc != RC_OK)
4000fae8: 80 a2 20 00 cmp %o0, 0
4000faec: 12 80 00 1c bne 4000fb5c <fat_sector_write+0xa0>
<== NEVER TAKEN
4000faf0: 94 10 00 1d mov %i5, %o2
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4000faf4: d0 07 bf fc ld [ %fp + -4 ], %o0
4000faf8: 40 00 30 7a call 4001bce0 <memcpy>
4000fafc: 90 02 00 1a add %o0, %i2, %o0
4000fb00: e2 2e 20 9c stb %l1, [ %i0 + 0x9c ]
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
4000fb04: a0 04 00 1d add %l0, %i5, %l0
sec_num++;
4000fb08: b2 06 60 01 inc %i1
while(count > 0)
4000fb0c: b6 a6 c0 1d subcc %i3, %i5, %i3
4000fb10: 02 80 00 14 be 4000fb60 <fat_sector_write+0xa4>
<== ALWAYS TAKEN
4000fb14: b4 10 20 00 clr %i2
c = MIN(count, (fs_info->vol.bps - ofs));
4000fb18: fa 16 00 00 lduh [ %i0 ], %i5
4000fb1c: ba 27 40 1a sub %i5, %i2, %i5
4000fb20: 80 a7 40 1b cmp %i5, %i3
4000fb24: 38 80 00 02 bgu,a 4000fb2c <fat_sector_write+0x70>
4000fb28: ba 10 00 1b mov %i3, %i5
if (c == fs_info->vol.bytes_per_block)
4000fb2c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
4000fb30: 80 a0 40 1d cmp %g1, %i5
4000fb34: 12 bf ff e8 bne 4000fad4 <fat_sector_write+0x18>
<== ALWAYS TAKEN
4000fb38: 92 10 00 19 mov %i1, %o1
rc = fat_buf_access(fs_info, sec_num, FAT_OP_TYPE_GET, &sec_buf);
4000fb3c: 94 10 20 02 mov 2, %o2
<== NOT EXECUTED
4000fb40: 96 07 bf fc add %fp, -4, %o3
<== NOT EXECUTED
4000fb44: 7f ff ff 85 call 4000f958 <fat_buf_access>
<== NOT EXECUTED
4000fb48: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
memcpy((sec_buf + ofs), (buff + cmpltd), c);
4000fb4c: 92 07 00 10 add %i4, %l0, %o1
<== NOT EXECUTED
if (rc != RC_OK)
4000fb50: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
4000fb54: 02 bf ff e8 be 4000faf4 <fat_sector_write+0x38>
<== NOT EXECUTED
4000fb58: 94 10 00 1d mov %i5, %o2
<== NOT EXECUTED
return -1;
4000fb5c: a0 10 3f ff mov -1, %l0
<== NOT EXECUTED
ofs = 0;
}
return cmpltd;
}
4000fb60: 81 c7 e0 08 ret
4000fb64: 91 e8 00 10 restore %g0, %l0, %o0
40010c90 <fat_set_fat_cluster>:
fat_set_fat_cluster(
fat_fs_info_t *fs_info,
uint32_t cln,
uint32_t in_val
)
{
40010c90: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
uint32_t sec = 0;
uint32_t ofs = 0;
uint16_t fat16_clv = 0;
uint32_t fat32_clv = 0;
uint8_t *sec_buf = NULL;
40010c94: c0 27 bf fc clr [ %fp + -4 ]
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
40010c98: 80 a6 60 01 cmp %i1, 1
40010c9c: 08 80 00 76 bleu 40010e74 <fat_set_fat_cluster+0x1e4>
<== NEVER TAKEN
40010ca0: ba 10 00 18 mov %i0, %i5
40010ca4: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
40010ca8: 82 00 60 01 inc %g1
40010cac: 80 a0 40 19 cmp %g1, %i1
40010cb0: 0a 80 00 71 bcs 40010e74 <fat_set_fat_cluster+0x1e4>
<== NEVER TAKEN
40010cb4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
40010cb8: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1
40010cbc: 80 88 60 01 btst 1, %g1
40010cc0: 12 80 00 24 bne 40010d50 <fat_set_fat_cluster+0xc0>
40010cc4: b9 36 60 01 srl %i1, 1, %i4
40010cc8: 80 88 60 02 btst 2, %g1
40010ccc: 02 80 00 03 be 40010cd8 <fat_set_fat_cluster+0x48>
40010cd0: a3 2e 60 02 sll %i1, 2, %l1
40010cd4: a3 2e 60 01 sll %i1, 1, %l1
40010cd8: f6 0f 60 02 ldub [ %i5 + 2 ], %i3
40010cdc: c2 07 60 60 ld [ %i5 + 0x60 ], %g1
40010ce0: b7 34 40 1b srl %l1, %i3, %i3
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
40010ce4: f8 17 40 00 lduh [ %i5 ], %i4
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
40010ce8: b6 06 c0 01 add %i3, %g1, %i3
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &sec_buf);
40010cec: 94 10 20 01 mov 1, %o2
40010cf0: 96 07 bf fc add %fp, -4, %o3
40010cf4: 92 10 00 1b mov %i3, %o1
40010cf8: 7f ff fb 18 call 4000f958 <fat_buf_access>
40010cfc: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
40010d00: b0 92 20 00 orcc %o0, 0, %i0
40010d04: 12 80 00 11 bne 40010d48 <fat_set_fat_cluster+0xb8>
<== NEVER TAKEN
40010d08: b9 2f 20 10 sll %i4, 0x10, %i4
return rc;
switch ( fs_info->vol.type )
40010d0c: e4 0f 60 16 ldub [ %i5 + 0x16 ], %l2
40010d10: 80 a4 a0 02 cmp %l2, 2
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
40010d14: b9 37 20 10 srl %i4, 0x10, %i4
40010d18: b8 07 3f ff add %i4, -1, %i4
switch ( fs_info->vol.type )
40010d1c: 02 80 00 35 be 40010df0 <fat_set_fat_cluster+0x160>
40010d20: b8 0f 00 11 and %i4, %l1, %i4
40010d24: 80 a4 a0 04 cmp %l2, 4
40010d28: 02 80 00 26 be 40010dc0 <fat_set_fat_cluster+0x130>
40010d2c: 80 a4 a0 01 cmp %l2, 1
40010d30: 02 80 00 0a be 40010d58 <fat_set_fat_cluster+0xc8>
<== ALWAYS TAKEN
40010d34: 80 8e 60 01 btst 1, %i1
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
40010d38: 40 00 2a 0e call 4001b570 <__errno>
<== NOT EXECUTED
40010d3c: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40010d40: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
40010d44: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
break;
}
return RC_OK;
}
40010d48: 81 c7 e0 08 ret
<== NOT EXECUTED
40010d4c: 81 e8 00 00 restore
<== NOT EXECUTED
40010d50: 10 bf ff e2 b 40010cd8 <fat_set_fat_cluster+0x48>
40010d54: a2 07 00 19 add %i4, %i1, %l1
if ( FAT_CLUSTER_IS_ODD(cln) )
40010d58: 02 80 00 30 be 40010e18 <fat_set_fat_cluster+0x188>
40010d5c: c2 07 bf fc ld [ %fp + -4 ], %g1
*(sec_buf + ofs) &= 0x0F;
40010d60: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
40010d64: 84 08 a0 0f and %g2, 0xf, %g2
40010d68: c4 28 40 1c stb %g2, [ %g1 + %i4 ]
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
40010d6c: 83 2e a0 04 sll %i2, 4, %g1
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00F0);
40010d70: c4 07 bf fc ld [ %fp + -4 ], %g2
40010d74: c6 08 80 1c ldub [ %g2 + %i4 ], %g3
40010d78: 82 10 40 03 or %g1, %g3, %g1
40010d7c: c2 28 80 1c stb %g1, [ %g2 + %i4 ]
fs_info->c.modified = true;
40010d80: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ]
if ( ofs == (fs_info->vol.bps - 1) )
40010d84: c2 17 40 00 lduh [ %i5 ], %g1
40010d88: 82 00 7f ff add %g1, -1, %g1
40010d8c: 80 a0 40 1c cmp %g1, %i4
40010d90: 02 80 00 52 be 40010ed8 <fat_set_fat_cluster+0x248>
40010d94: c2 07 bf fc ld [ %fp + -4 ], %g1
*(sec_buf + ofs + 1) &= 0x00;
40010d98: b8 07 20 01 inc %i4
40010d9c: c0 28 40 1c clrb [ %g1 + %i4 ]
*(sec_buf + ofs + 1) |= (uint8_t )((fat16_clv & 0xFF00)>>8);
40010da0: 83 2e a0 14 sll %i2, 0x14, %g1
40010da4: c4 07 bf fc ld [ %fp + -4 ], %g2
40010da8: c6 08 80 1c ldub [ %g2 + %i4 ], %g3
40010dac: 83 30 60 18 srl %g1, 0x18, %g1
40010db0: 82 10 40 03 or %g1, %g3, %g1
40010db4: c2 28 80 1c stb %g1, [ %g2 + %i4 ]
40010db8: 81 c7 e0 08 ret
40010dbc: 81 e8 00 00 restore
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
40010dc0: 11 3c 00 00 sethi %hi(0xf0000000), %o0
40010dc4: 40 00 26 e5 call 4001a958 <__bswapsi2>
40010dc8: 90 2e 80 08 andn %i2, %o0, %o0
*((uint32_t *)(sec_buf + ofs)) &= CT_LE_L(0xF0000000);
40010dcc: c4 07 bf fc ld [ %fp + -4 ], %g2
40010dd0: c2 00 80 1c ld [ %g2 + %i4 ], %g1
40010dd4: 82 08 60 f0 and %g1, 0xf0, %g1
*((uint32_t *)(sec_buf + ofs)) |= fat32_clv;
40010dd8: 90 10 40 08 or %g1, %o0, %o0
40010ddc: d0 20 80 1c st %o0, [ %g2 + %i4 ]
40010de0: 82 10 20 01 mov 1, %g1
40010de4: c2 2f 60 9c stb %g1, [ %i5 + 0x9c ]
40010de8: 81 c7 e0 08 ret
40010dec: 81 e8 00 00 restore
(uint16_t )(CT_LE_W(in_val));
40010df0: 83 2e a0 08 sll %i2, 8, %g1
40010df4: b5 2e a0 10 sll %i2, 0x10, %i2
40010df8: b5 36 a0 18 srl %i2, 0x18, %i2
40010dfc: b4 10 40 1a or %g1, %i2, %i2
*((uint16_t *)(sec_buf + ofs)) =
40010e00: c2 07 bf fc ld [ %fp + -4 ], %g1
40010e04: f4 30 40 1c sth %i2, [ %g1 + %i4 ]
40010e08: 82 10 20 01 mov 1, %g1
40010e0c: c2 2f 60 9c stb %g1, [ %i5 + 0x9c ]
40010e10: 81 c7 e0 08 ret
40010e14: 81 e8 00 00 restore
*(sec_buf + ofs) &= 0x00;
40010e18: c0 28 40 1c clrb [ %g1 + %i4 ]
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
40010e1c: b4 0e af ff and %i2, 0xfff, %i2
*(sec_buf + ofs) |= (uint8_t)(fat16_clv & 0x00FF);
40010e20: c4 07 bf fc ld [ %fp + -4 ], %g2
40010e24: c2 08 80 1c ldub [ %g2 + %i4 ], %g1
40010e28: 82 16 80 01 or %i2, %g1, %g1
40010e2c: c2 28 80 1c stb %g1, [ %g2 + %i4 ]
40010e30: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ]
if ( ofs == (fs_info->vol.bps - 1) )
40010e34: c2 17 40 00 lduh [ %i5 ], %g1
40010e38: 82 00 7f ff add %g1, -1, %g1
40010e3c: 80 a0 40 1c cmp %g1, %i4
40010e40: 02 80 00 13 be 40010e8c <fat_set_fat_cluster+0x1fc>
<== NEVER TAKEN
40010e44: c4 07 bf fc ld [ %fp + -4 ], %g2
*(sec_buf + ofs + 1) &= 0xF0;
40010e48: b8 07 20 01 inc %i4
40010e4c: c2 08 80 1c ldub [ %g2 + %i4 ], %g1
40010e50: 82 08 7f f0 and %g1, -16, %g1
40010e54: c2 28 80 1c stb %g1, [ %g2 + %i4 ]
*(sec_buf + ofs+1) |= (uint8_t)((fat16_clv & 0xFF00)>>8);
40010e58: b5 36 a0 08 srl %i2, 8, %i2
40010e5c: c2 07 bf fc ld [ %fp + -4 ], %g1
40010e60: c4 08 40 1c ldub [ %g1 + %i4 ], %g2
40010e64: b4 16 80 02 or %i2, %g2, %i2
40010e68: f4 28 40 1c stb %i2, [ %g1 + %i4 ]
40010e6c: 81 c7 e0 08 ret
40010e70: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(EIO);
40010e74: 40 00 29 bf call 4001b570 <__errno>
<== NOT EXECUTED
40010e78: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40010e7c: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
40010e80: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40010e84: 81 c7 e0 08 ret
<== NOT EXECUTED
40010e88: 81 e8 00 00 restore
<== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
40010e8c: 96 07 bf fc add %fp, -4, %o3
<== NOT EXECUTED
40010e90: 94 10 20 01 mov 1, %o2
<== NOT EXECUTED
40010e94: 92 06 e0 01 add %i3, 1, %o1
<== NOT EXECUTED
40010e98: 7f ff fa b0 call 4000f958 <fat_buf_access>
<== NOT EXECUTED
40010e9c: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
if (rc != RC_OK)
40010ea0: b0 92 20 00 orcc %o0, 0, %i0
<== NOT EXECUTED
40010ea4: 12 bf ff a9 bne 40010d48 <fat_set_fat_cluster+0xb8>
<== NOT EXECUTED
40010ea8: c4 07 bf fc ld [ %fp + -4 ], %g2
<== NOT EXECUTED
*sec_buf &= 0xF0;
40010eac: c2 08 80 00 ldub [ %g2 ], %g1
<== NOT EXECUTED
40010eb0: 82 08 7f f0 and %g1, -16, %g1
<== NOT EXECUTED
40010eb4: c2 28 80 00 stb %g1, [ %g2 ]
<== NOT EXECUTED
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
40010eb8: b5 36 a0 08 srl %i2, 8, %i2
<== NOT EXECUTED
40010ebc: c4 07 bf fc ld [ %fp + -4 ], %g2
<== NOT EXECUTED
40010ec0: c2 08 80 00 ldub [ %g2 ], %g1
<== NOT EXECUTED
40010ec4: 82 16 80 01 or %i2, %g1, %g1
<== NOT EXECUTED
40010ec8: c2 28 80 00 stb %g1, [ %g2 ]
<== NOT EXECUTED
40010ecc: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ]
<== NOT EXECUTED
40010ed0: 81 c7 e0 08 ret
<== NOT EXECUTED
40010ed4: 81 e8 00 00 restore
<== NOT EXECUTED
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
40010ed8: 96 07 bf fc add %fp, -4, %o3
40010edc: 94 10 20 01 mov 1, %o2
40010ee0: 92 06 e0 01 add %i3, 1, %o1
40010ee4: 7f ff fa 9d call 4000f958 <fat_buf_access>
40010ee8: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
40010eec: b0 92 20 00 orcc %o0, 0, %i0
40010ef0: 12 bf ff 96 bne 40010d48 <fat_set_fat_cluster+0xb8>
<== NEVER TAKEN
40010ef4: c2 07 bf fc ld [ %fp + -4 ], %g1
*sec_buf &= 0x00;
40010ef8: c0 28 40 00 clrb [ %g1 ]
*sec_buf |= (uint8_t)((fat16_clv & 0xFF00)>>8);
40010efc: 83 2e a0 14 sll %i2, 0x14, %g1
40010f00: c4 07 bf fc ld [ %fp + -4 ], %g2
40010f04: c6 08 80 00 ldub [ %g2 ], %g3
40010f08: 83 30 60 18 srl %g1, 0x18, %g1
40010f0c: 82 10 40 03 or %g1, %g3, %g1
40010f10: c2 28 80 00 stb %g1, [ %g2 ]
40010f14: e4 2f 60 9c stb %l2, [ %i5 + 0x9c ]
40010f18: 81 c7 e0 08 ret
40010f1c: 81 e8 00 00 restore
400107b8 <fat_shutdown_drive>:
* RC_OK on success, or -1 if error occured
* and errno set appropriately
*/
int
fat_shutdown_drive(fat_fs_info_t *fs_info)
{
400107b8: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
int i = 0;
rc = fat_sync(fs_info);
400107bc: 7f ff ff bc call 400106ac <fat_sync>
400107c0: 90 10 00 18 mov %i0, %o0
rc = -1;
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->vhash + i;
400107c4: fa 06 20 80 ld [ %i0 + 0x80 ], %i5
if ( rc != RC_OK )
400107c8: 80 a0 00 08 cmp %g0, %o0
rc = fat_sync(fs_info);
400107cc: b4 10 00 08 mov %o0, %i2
return _Chain_Immutable_head( the_chain )->next;
400107d0: d0 07 40 00 ld [ %i5 ], %o0
{
400107d4: b8 10 00 18 mov %i0, %i4
return &the_chain->Tail.Node;
400107d8: b6 07 60 04 add %i5, 4, %i3
if ( rc != RC_OK )
400107dc: b0 60 20 00 subx %g0, 0, %i0
if ( !_Chain_Is_empty(the_chain))
400107e0: 80 a6 c0 08 cmp %i3, %o0
400107e4: 22 80 00 0c be,a 40010814 <fat_shutdown_drive+0x5c>
400107e8: d0 07 60 0c ld [ %i5 + 0xc ], %o0
new_first = old_first->next;
400107ec: c2 02 00 00 ld [ %o0 ], %g1
head->next = new_first;
400107f0: c2 27 40 00 st %g1, [ %i5 ]
while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL )
free(node);
400107f4: 7f ff cc d9 call 40003b58 <free>
400107f8: fa 20 60 04 st %i5, [ %g1 + 4 ]
return _Chain_Immutable_head( the_chain )->next;
400107fc: d0 07 40 00 ld [ %i5 ], %o0
if ( !_Chain_Is_empty(the_chain))
40010800: 80 a6 c0 08 cmp %i3, %o0
40010804: 32 bf ff fb bne,a 400107f0 <fat_shutdown_drive+0x38>
40010808: c2 02 00 00 ld [ %o0 ], %g1
4001080c: fa 07 20 80 ld [ %i4 + 0x80 ], %i5
return _Chain_Immutable_head( the_chain )->next;
40010810: d0 07 60 0c ld [ %i5 + 0xc ], %o0
return &the_chain->Tail.Node;
40010814: b6 07 60 10 add %i5, 0x10, %i3
if ( !_Chain_Is_empty(the_chain))
40010818: 80 a2 00 1b cmp %o0, %i3
4001081c: 02 80 00 0a be 40010844 <fat_shutdown_drive+0x8c>
<== ALWAYS TAKEN
40010820: b2 07 60 0c add %i5, 0xc, %i1
new_first = old_first->next;
40010824: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
head->next = new_first;
40010828: c2 27 60 0c st %g1, [ %i5 + 0xc ]
<== NOT EXECUTED
4001082c: 7f ff cc cb call 40003b58 <free>
<== NOT EXECUTED
40010830: f2 20 60 04 st %i1, [ %g1 + 4 ]
<== NOT EXECUTED
return _Chain_Immutable_head( the_chain )->next;
40010834: d0 07 60 0c ld [ %i5 + 0xc ], %o0
<== NOT EXECUTED
if ( !_Chain_Is_empty(the_chain))
40010838: 80 a6 c0 08 cmp %i3, %o0
<== NOT EXECUTED
4001083c: 32 bf ff fb bne,a 40010828 <fat_shutdown_drive+0x70>
<== NOT EXECUTED
40010840: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
40010844: fa 07 20 84 ld [ %i4 + 0x84 ], %i5
return _Chain_Immutable_head( the_chain )->next;
40010848: d0 07 40 00 ld [ %i5 ], %o0
return &the_chain->Tail.Node;
4001084c: b6 07 60 04 add %i5, 4, %i3
if ( !_Chain_Is_empty(the_chain))
40010850: 80 a6 c0 08 cmp %i3, %o0
40010854: 22 80 00 0c be,a 40010884 <fat_shutdown_drive+0xcc>
<== ALWAYS TAKEN
40010858: d0 07 60 0c ld [ %i5 + 0xc ], %o0
new_first = old_first->next;
4001085c: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
head->next = new_first;
40010860: c2 27 40 00 st %g1, [ %i5 ]
<== NOT EXECUTED
while ( (node = rtems_chain_get_unprotected(the_chain)) != NULL )
free(node);
40010864: 7f ff cc bd call 40003b58 <free>
<== NOT EXECUTED
40010868: fa 20 60 04 st %i5, [ %g1 + 4 ]
<== NOT EXECUTED
return _Chain_Immutable_head( the_chain )->next;
4001086c: d0 07 40 00 ld [ %i5 ], %o0
<== NOT EXECUTED
if ( !_Chain_Is_empty(the_chain))
40010870: 80 a2 00 1b cmp %o0, %i3
<== NOT EXECUTED
40010874: 32 bf ff fb bne,a 40010860 <fat_shutdown_drive+0xa8>
<== NOT EXECUTED
40010878: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
4001087c: fa 07 20 84 ld [ %i4 + 0x84 ], %i5
<== NOT EXECUTED
return _Chain_Immutable_head( the_chain )->next;
40010880: d0 07 60 0c ld [ %i5 + 0xc ], %o0
<== NOT EXECUTED
return &the_chain->Tail.Node;
40010884: b6 07 60 10 add %i5, 0x10, %i3
if ( !_Chain_Is_empty(the_chain))
40010888: 80 a6 c0 08 cmp %i3, %o0
4001088c: 02 80 00 0a be 400108b4 <fat_shutdown_drive+0xfc>
<== ALWAYS TAKEN
40010890: b2 07 60 0c add %i5, 0xc, %i1
new_first = old_first->next;
40010894: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
head->next = new_first;
40010898: c2 27 60 0c st %g1, [ %i5 + 0xc ]
<== NOT EXECUTED
4001089c: 7f ff cc af call 40003b58 <free>
<== NOT EXECUTED
400108a0: f2 20 60 04 st %i1, [ %g1 + 4 ]
<== NOT EXECUTED
return _Chain_Immutable_head( the_chain )->next;
400108a4: d0 07 60 0c ld [ %i5 + 0xc ], %o0
<== NOT EXECUTED
if ( !_Chain_Is_empty(the_chain))
400108a8: 80 a6 c0 08 cmp %i3, %o0
<== NOT EXECUTED
400108ac: 32 bf ff fb bne,a 40010898 <fat_shutdown_drive+0xe0>
<== NOT EXECUTED
400108b0: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
}
free(fs_info->vhash);
400108b4: 7f ff cc a9 call 40003b58 <free>
400108b8: d0 07 20 80 ld [ %i4 + 0x80 ], %o0
free(fs_info->rhash);
400108bc: 7f ff cc a7 call 40003b58 <free>
400108c0: d0 07 20 84 ld [ %i4 + 0x84 ], %o0
free(fs_info->uino);
400108c4: 7f ff cc a5 call 40003b58 <free>
400108c8: d0 07 20 88 ld [ %i4 + 0x88 ], %o0
free(fs_info->sec_buf);
400108cc: 7f ff cc a3 call 40003b58 <free>
400108d0: d0 07 20 a4 ld [ %i4 + 0xa4 ], %o0
close(fs_info->vol.fd);
400108d4: 7f ff cc 3e call 400039cc <close>
400108d8: d0 07 20 68 ld [ %i4 + 0x68 ], %o0
if (rc)
400108dc: 80 a6 a0 00 cmp %i2, 0
400108e0: 12 80 00 04 bne 400108f0 <fat_shutdown_drive+0x138>
<== NEVER TAKEN
400108e4: 01 00 00 00 nop
errno = EIO;
return rc;
}
400108e8: 81 c7 e0 08 ret
400108ec: 81 e8 00 00 restore
errno = EIO;
400108f0: 40 00 2b 20 call 4001b570 <__errno>
<== NOT EXECUTED
400108f4: 01 00 00 00 nop
<== NOT EXECUTED
400108f8: 82 10 20 05 mov 5, %g1 ! 5 <_TLS_Alignment+0x4>
<== NOT EXECUTED
400108fc: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
}
40010900: 81 c7 e0 08 ret
<== NOT EXECUTED
40010904: 81 e8 00 00 restore
<== NOT EXECUTED
400106ac <fat_sync>:
return RC_OK;
}
int
fat_sync(fat_fs_info_t *fs_info)
{
400106ac: 9d e3 bf 98 save %sp, -104, %sp
if (fs_info->vol.type == FAT_FAT32)
400106b0: c2 0e 20 16 ldub [ %i0 + 0x16 ], %g1
{
400106b4: ba 10 00 18 mov %i0, %i5
if (fs_info->vol.type == FAT_FAT32)
400106b8: 80 a0 60 04 cmp %g1, 4
400106bc: 02 80 00 0d be 400106f0 <fat_sync+0x44>
400106c0: b0 10 20 00 clr %i0
if (fs_info->c.state == FAT_CACHE_EMPTY)
400106c4: c2 0f 60 9d ldub [ %i5 + 0x9d ], %g1
400106c8: 80 a0 60 00 cmp %g1, 0
400106cc: 12 80 00 18 bne 4001072c <fat_sync+0x80>
400106d0: 01 00 00 00 nop
if ( rc != RC_OK )
rc = -1;
fat_buf_release(fs_info);
if (rtems_bdbuf_syncdev(fs_info->vol.dd) != RTEMS_SUCCESSFUL)
400106d4: 40 00 20 29 call 40018778 <rtems_bdbuf_syncdev>
400106d8: d0 07 60 6c ld [ %i5 + 0x6c ], %o0
400106dc: 80 a2 20 00 cmp %o0, 0
400106e0: 12 80 00 34 bne 400107b0 <fat_sync+0x104>
<== NEVER TAKEN
400106e4: 01 00 00 00 nop
rc = -1;
return rc;
}
400106e8: 81 c7 e0 08 ret
400106ec: 81 e8 00 00 restore
uint32_t free_count = fs_info->vol.free_cls;
400106f0: f6 07 60 4c ld [ %i5 + 0x4c ], %i3
if (free_count != fs_info->vol.free_cls_in_fs_info)
400106f4: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
400106f8: 80 a6 c0 01 cmp %i3, %g1
400106fc: 12 80 00 1e bne 40010774 <fat_sync+0xc8>
<== NEVER TAKEN
40010700: f8 07 60 54 ld [ %i5 + 0x54 ], %i4
if (next_free != fs_info->vol.next_cl_in_fs_info)
40010704: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
40010708: 80 a7 00 01 cmp %i4, %g1
4001070c: 12 80 00 0b bne 40010738 <fat_sync+0x8c>
40010710: 01 00 00 00 nop
if ( (ret1 < 0) || (ret2 < 0) )
40010714: b0 0e 20 ff and %i0, 0xff, %i0
40010718: b0 20 00 18 neg %i0
if (fs_info->c.state == FAT_CACHE_EMPTY)
4001071c: c2 0f 60 9d ldub [ %i5 + 0x9d ], %g1
40010720: 80 a0 60 00 cmp %g1, 0
40010724: 02 bf ff ec be 400106d4 <fat_sync+0x28>
40010728: 01 00 00 00 nop
4001072c: 7f ff fc 15 call 4000f780 <fat_buf_release.part.5>
40010730: 90 10 00 1d mov %i5, %o0
40010734: 30 bf ff e8 b,a 400106d4 <fat_sync+0x28>
uint32_t le_next_free = CT_LE_L(next_free);
40010738: 40 00 28 88 call 4001a958 <__bswapsi2>
4001073c: 90 10 00 1c mov %i4, %o0
fs_info->vol.next_cl_in_fs_info = next_free;
40010740: f8 27 60 58 st %i4, [ %i5 + 0x58 ]
ret2 = fat_sector_write(fs_info,
40010744: 98 07 bf fc add %fp, -4, %o4
40010748: d2 17 60 48 lduh [ %i5 + 0x48 ], %o1
uint32_t le_next_free = CT_LE_L(next_free);
4001074c: d0 27 bf fc st %o0, [ %fp + -4 ]
ret2 = fat_sector_write(fs_info,
40010750: 96 10 20 04 mov 4, %o3
40010754: 94 10 21 ec mov 0x1ec, %o2
40010758: 7f ff fc d9 call 4000fabc <fat_sector_write>
4001075c: 90 10 00 1d mov %i5, %o0
40010760: 91 32 20 1f srl %o0, 0x1f, %o0
40010764: b0 12 00 18 or %o0, %i0, %i0
if ( (ret1 < 0) || (ret2 < 0) )
40010768: b0 0e 20 ff and %i0, 0xff, %i0
4001076c: 10 bf ff ec b 4001071c <fat_sync+0x70>
40010770: b0 20 00 18 neg %i0
uint32_t le_free_count = CT_LE_L(free_count);
40010774: 40 00 28 79 call 4001a958 <__bswapsi2>
<== NOT EXECUTED
40010778: 90 10 00 1b mov %i3, %o0
<== NOT EXECUTED
fs_info->vol.free_cls_in_fs_info = free_count;
4001077c: f6 27 60 50 st %i3, [ %i5 + 0x50 ]
<== NOT EXECUTED
ret1 = fat_sector_write(fs_info,
40010780: 98 07 bf fc add %fp, -4, %o4
<== NOT EXECUTED
40010784: d2 17 60 48 lduh [ %i5 + 0x48 ], %o1
<== NOT EXECUTED
uint32_t le_free_count = CT_LE_L(free_count);
40010788: d0 27 bf fc st %o0, [ %fp + -4 ]
<== NOT EXECUTED
ret1 = fat_sector_write(fs_info,
4001078c: 96 10 20 04 mov 4, %o3
<== NOT EXECUTED
40010790: 94 10 21 e8 mov 0x1e8, %o2
<== NOT EXECUTED
40010794: 7f ff fc ca call 4000fabc <fat_sector_write>
<== NOT EXECUTED
40010798: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
if (next_free != fs_info->vol.next_cl_in_fs_info)
4001079c: c2 07 60 58 ld [ %i5 + 0x58 ], %g1
<== NOT EXECUTED
400107a0: 80 a7 00 01 cmp %i4, %g1
<== NOT EXECUTED
400107a4: 02 bf ff dc be 40010714 <fat_sync+0x68>
<== NOT EXECUTED
400107a8: b1 32 20 1f srl %o0, 0x1f, %i0
<== NOT EXECUTED
400107ac: 30 bf ff e3 b,a 40010738 <fat_sync+0x8c>
<== NOT EXECUTED
}
400107b0: 81 c7 e0 08 ret
<== NOT EXECUTED
400107b4: 91 e8 3f ff restore %g0, -1, %o0
<== NOT EXECUTED
40012238 <msdos_creat_node>:
fat_file_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
40012238: 9d e3 bf 00 save %sp, -256, %sp
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
4001223c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
40012240: e0 00 60 08 ld [ %g1 + 8 ], %l0
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
40012244: c0 27 bf 6c clr [ %fp + -148 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
40012248: 82 10 3f ff mov -1, %g1
time_t now;
uint16_t time_val = 0;
4001224c: c0 37 bf 68 clrh [ %fp + -152 ]
fat_dir_pos_init(&dir_pos);
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
40012250: 80 a6 e1 04 cmp %i3, 0x104
uint16_t date = 0;
40012254: c0 37 bf 6a clrh [ %fp + -150 ]
memset(short_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40012258: c0 27 bf 80 clr [ %fp + -128 ]
4001225c: c0 27 bf 84 clr [ %fp + -124 ]
dir_pos->sname.cln = 0;
40012260: c0 27 bf 70 clr [ %fp + -144 ]
40012264: c0 27 bf 88 clr [ %fp + -120 ]
40012268: c0 27 bf 8c clr [ %fp + -116 ]
dir_pos->sname.ofs = 0;
4001226c: c0 27 bf 74 clr [ %fp + -140 ]
40012270: c0 27 bf 90 clr [ %fp + -112 ]
40012274: c0 27 bf 94 clr [ %fp + -108 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
40012278: c2 27 bf 78 st %g1, [ %fp + -136 ]
4001227c: c0 27 bf 98 clr [ %fp + -104 ]
40012280: c0 27 bf 9c clr [ %fp + -100 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
40012284: c2 27 bf 7c st %g1, [ %fp + -132 ]
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
40012288: c0 27 bf c0 clr [ %fp + -64 ]
4001228c: c0 27 bf c4 clr [ %fp + -60 ]
40012290: c0 27 bf c8 clr [ %fp + -56 ]
40012294: c0 27 bf cc clr [ %fp + -52 ]
40012298: c0 27 bf d0 clr [ %fp + -48 ]
4001229c: c0 27 bf d4 clr [ %fp + -44 ]
400122a0: c0 27 bf d8 clr [ %fp + -40 ]
400122a4: c0 27 bf dc clr [ %fp + -36 ]
400122a8: c0 27 bf e0 clr [ %fp + -32 ]
400122ac: c0 27 bf e4 clr [ %fp + -28 ]
400122b0: c0 27 bf e8 clr [ %fp + -24 ]
400122b4: c0 27 bf ec clr [ %fp + -20 ]
400122b8: c0 27 bf f0 clr [ %fp + -16 ]
400122bc: c0 27 bf f4 clr [ %fp + -12 ]
400122c0: c0 27 bf f8 clr [ %fp + -8 ]
400122c4: c0 27 bf fc clr [ %fp + -4 ]
if (name_len > MSDOS_NAME_MAX_LFN_WITH_DOT) {
400122c8: 14 80 00 e5 bg 4001265c <msdos_creat_node+0x424>
<== NEVER TAKEN
400122cc: f8 06 20 08 ld [ %i0 + 8 ], %i4
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
}
name_type = msdos_long_to_short (fs_info->converter,
400122d0: d0 04 20 cc ld [ %l0 + 0xcc ], %o0
400122d4: 98 10 20 0b mov 0xb, %o4
400122d8: 96 07 bf 80 add %fp, -128, %o3
400122dc: 94 10 00 1b mov %i3, %o2
400122e0: 40 00 01 c1 call 400129e4 <msdos_long_to_short>
400122e4: 92 10 00 1a mov %i2, %o1
name, name_len,
MSDOS_DIR_NAME(short_node),
MSDOS_NAME_MAX);
if (name_type == MSDOS_NAME_INVALID) {
400122e8: a6 92 20 00 orcc %o0, 0, %l3
400122ec: 02 80 00 e1 be 40012670 <msdos_creat_node+0x438>
<== NEVER TAKEN
400122f0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(EINVAL);
}
/* fill reserved field */
*MSDOS_DIR_NT_RES(short_node) = MSDOS_RES_NT_VALUE;
400122f4: c0 2f bf 8c clrb [ %fp + -116 ]
/* set up last write date and time */
now = time(NULL);
400122f8: 40 00 35 c8 call 4001fa18 <time>
400122fc: 90 10 20 00 clr %o0
static inline void fat_file_set_ctime_mtime(fat_file_fd_t *fat_fd, time_t t)
{
fat_fd->ctime = t;
fat_fd->mtime = t;
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40012300: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
40012304: a2 10 00 08 mov %o0, %l1
40012308: a4 10 00 09 mov %o1, %l2
4001230c: 82 10 60 02 or %g1, 2, %g1
fat_fd->ctime = t;
40012310: d2 27 20 44 st %o1, [ %i4 + 0x44 ]
fat_file_set_ctime_mtime(parent_fat_fd, now);
msdos_date_unix2dos(now, &date, &time_val);
40012314: 94 07 bf 68 add %fp, -152, %o2
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40012318: c2 2f 20 30 stb %g1, [ %i4 + 0x30 ]
4001231c: 92 07 bf 6a add %fp, -150, %o1
fat_fd->ctime = t;
40012320: e2 27 20 40 st %l1, [ %i4 + 0x40 ]
40012324: 90 10 00 12 mov %l2, %o0
fat_fd->mtime = t;
40012328: e2 27 20 48 st %l1, [ %i4 + 0x48 ]
4001232c: 40 00 1a 89 call 40018d50 <msdos_date_unix2dos>
40012330: e4 27 20 4c st %l2, [ %i4 + 0x4c ]
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
40012334: c4 17 bf 68 lduh [ %fp + -152 ], %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
40012338: c2 17 bf 6a lduh [ %fp + -150 ], %g1
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
4001233c: 89 28 a0 08 sll %g2, 8, %g4
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
40012340: 87 28 60 08 sll %g1, 8, %g3
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
40012344: 85 28 a0 10 sll %g2, 0x10, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
40012348: 83 28 60 10 sll %g1, 0x10, %g1
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
4001234c: 85 30 a0 18 srl %g2, 0x18, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
40012350: 83 30 60 18 srl %g1, 0x18, %g1
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
40012354: 84 11 00 02 or %g4, %g2, %g2
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
40012358: 82 10 c0 01 or %g3, %g1, %g1
*MSDOS_DIR_CRT_TIME(short_node) = CT_LE_W(time_val);
4001235c: c4 37 bf 8e sth %g2, [ %fp + -114 ]
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == FAT_DIRECTORY) {
40012360: 80 a6 60 00 cmp %i1, 0
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
40012364: c4 37 bf 96 sth %g2, [ %fp + -106 ]
*MSDOS_DIR_CRT_DATE(short_node) = CT_LE_W(date);
40012368: c2 37 bf 90 sth %g1, [ %fp + -112 ]
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
4001236c: c2 37 bf 98 sth %g1, [ %fp + -104 ]
*MSDOS_DIR_LAST_ACCESS_DATE(short_node) = CT_LE_W(date);
40012370: c2 37 bf 92 sth %g1, [ %fp + -110 ]
if (type == FAT_DIRECTORY) {
40012374: 02 80 00 13 be 400123c0 <msdos_creat_node+0x188>
40012378: c0 27 bf 9c clr [ %fp + -100 ]
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == FAT_HARD_LINK) {
4001237c: 80 a6 60 02 cmp %i1, 2
40012380: 02 80 00 2c be 40012430 <msdos_creat_node+0x1f8>
<== NEVER TAKEN
40012384: 82 07 bf 80 add %fp, -128, %g1
/*
* find free space in the parent directory and write new initialized
* FAT 32 Bytes Directory Entry Structure to the disk
*/
rc = msdos_get_name_node(parent_loc, true, name, name_len,
40012388: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
4001238c: 9a 07 bf 70 add %fp, -144, %o5
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
40012390: c2 0f bf 8b ldub [ %fp + -117 ], %g1
40012394: 82 10 60 20 or %g1, 0x20, %g1
rc = msdos_get_name_node(parent_loc, true, name, name_len,
40012398: 98 10 00 13 mov %l3, %o4
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
4001239c: c2 2f bf 8b stb %g1, [ %fp + -117 ]
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400123a0: 96 10 00 1b mov %i3, %o3
400123a4: 94 10 00 1a mov %i2, %o2
400123a8: 92 10 20 01 mov 1, %o1
400123ac: 40 00 07 90 call 400141ec <msdos_get_name_node>
400123b0: 90 10 00 18 mov %i0, %o0
400123b4: ba 10 00 08 mov %o0, %i5
err:
/* mark the used 32bytes structure on the disk as free */
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
return rc;
}
400123b8: 81 c7 e0 08 ret
400123bc: 91 e8 00 1d restore %g0, %i5, %o0
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400123c0: 82 07 bf 80 add %fp, -128, %g1
400123c4: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
400123c8: 9a 07 bf 70 add %fp, -144, %o5
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
400123cc: c2 0f bf 8b ldub [ %fp + -117 ], %g1
400123d0: 82 10 60 10 or %g1, 0x10, %g1
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400123d4: 98 10 00 13 mov %l3, %o4
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
400123d8: c2 2f bf 8b stb %g1, [ %fp + -117 ]
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400123dc: 96 10 00 1b mov %i3, %o3
400123e0: 94 10 00 1a mov %i2, %o2
400123e4: 92 10 20 01 mov 1, %o1
400123e8: 40 00 07 81 call 400141ec <msdos_get_name_node>
400123ec: 90 10 00 18 mov %i0, %o0
if ( rc != RC_OK )
400123f0: ba 92 20 00 orcc %o0, 0, %i5
400123f4: 12 bf ff f1 bne 400123b8 <msdos_creat_node+0x180>
<== NEVER TAKEN
400123f8: 94 07 bf 6c add %fp, -148, %o2
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
400123fc: 92 07 bf 70 add %fp, -144, %o1
40012400: 7f ff fb 9c call 40011270 <fat_file_open>
40012404: 90 10 00 10 mov %l0, %o0
if (rc != RC_OK)
40012408: ba 92 20 00 orcc %o0, 0, %i5
4001240c: 02 80 00 3e be 40012504 <msdos_creat_node+0x2cc>
<== ALWAYS TAKEN
40012410: c2 07 bf 6c ld [ %fp + -148 ], %g1
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
40012414: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
<== NOT EXECUTED
40012418: 94 10 20 e5 mov 0xe5, %o2
<== NOT EXECUTED
4001241c: 92 07 bf 70 add %fp, -144, %o1
<== NOT EXECUTED
40012420: 40 00 02 d8 call 40012f80 <msdos_set_first_char4file_name>
<== NOT EXECUTED
40012424: b0 10 00 1d mov %i5, %i0
<== NOT EXECUTED
}
40012428: 81 c7 e0 08 ret
<== NOT EXECUTED
4001242c: 81 e8 00 00 restore
<== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(&fs_info->fat,
40012430: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
<== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40012434: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
40012438: 32 80 00 07 bne,a 40012454 <msdos_creat_node+0x21c>
<== NOT EXECUTED
4001243c: c4 0c 20 05 ldub [ %l0 + 5 ], %g2
<== NOT EXECUTED
40012440: c4 0c 20 16 ldub [ %l0 + 0x16 ], %g2
<== NOT EXECUTED
40012444: 80 88 a0 03 btst 3, %g2
<== NOT EXECUTED
40012448: 32 80 00 07 bne,a 40012464 <msdos_creat_node+0x22c>
<== NOT EXECUTED
4001244c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
<== NOT EXECUTED
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
40012450: c4 0c 20 05 ldub [ %l0 + 5 ], %g2
<== NOT EXECUTED
40012454: d2 04 20 3c ld [ %l0 + 0x3c ], %o1
<== NOT EXECUTED
40012458: 82 00 7f fe add %g1, -2, %g1
<== NOT EXECUTED
4001245c: 83 28 40 02 sll %g1, %g2, %g1
<== NOT EXECUTED
40012460: 82 00 40 09 add %g1, %o1, %g1
<== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
40012464: c4 14 00 00 lduh [ %l0 ], %g2
<== NOT EXECUTED
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
40012468: d4 07 60 24 ld [ %i5 + 0x24 ], %o2
<== NOT EXECUTED
4001246c: d2 0c 20 02 ldub [ %l0 + 2 ], %o1
<== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
40012470: 84 00 bf ff add %g2, -1, %g2
<== NOT EXECUTED
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
40012474: 93 32 80 09 srl %o2, %o1, %o1
<== NOT EXECUTED
ret = _fat_block_read(&fs_info->fat,
40012478: 98 07 bf a0 add %fp, -96, %o4
<== NOT EXECUTED
4001247c: 96 10 20 20 mov 0x20, %o3
<== NOT EXECUTED
40012480: 94 08 80 0a and %g2, %o2, %o2
<== NOT EXECUTED
40012484: 92 02 40 01 add %o1, %g1, %o1
<== NOT EXECUTED
40012488: 7f ff f5 6d call 4000fa3c <_fat_block_read>
<== NOT EXECUTED
4001248c: 90 10 00 10 mov %l0, %o0
<== NOT EXECUTED
if (ret < 0) {
40012490: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
40012494: 06 80 00 8b bl 400126c0 <msdos_creat_node+0x488>
<== NOT EXECUTED
40012498: c4 0f bf ad ldub [ %fp + -83 ], %g2
<== NOT EXECUTED
*MSDOS_DIR_CRT_TIME_TENTH(short_node)=*MSDOS_DIR_CRT_TIME_TENTH(link_node);
4001249c: c4 2f bf 8d stb %g2, [ %fp + -115 ]
<== NOT EXECUTED
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400124a0: 82 07 bf 80 add %fp, -128, %g1
<== NOT EXECUTED
*MSDOS_DIR_CRT_TIME(short_node) =*MSDOS_DIR_CRT_TIME(link_node);
400124a4: c4 17 bf ae lduh [ %fp + -82 ], %g2
<== NOT EXECUTED
400124a8: c4 37 bf 8e sth %g2, [ %fp + -114 ]
<== NOT EXECUTED
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400124ac: 9a 07 bf 70 add %fp, -144, %o5
<== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
400124b0: c4 17 bf b0 lduh [ %fp + -80 ], %g2
<== NOT EXECUTED
400124b4: c4 37 bf 90 sth %g2, [ %fp + -112 ]
<== NOT EXECUTED
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400124b8: 98 10 00 13 mov %l3, %o4
<== NOT EXECUTED
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
400124bc: c4 07 bf bc ld [ %fp + -68 ], %g2
<== NOT EXECUTED
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400124c0: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
<== NOT EXECUTED
400124c4: 96 10 00 1b mov %i3, %o3
<== NOT EXECUTED
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
400124c8: c2 0f bf ab ldub [ %fp + -85 ], %g1
<== NOT EXECUTED
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
400124cc: c4 27 bf 9c st %g2, [ %fp + -100 ]
<== NOT EXECUTED
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
400124d0: 82 10 60 20 or %g1, 0x20, %g1
<== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
400124d4: c4 17 bf ba lduh [ %fp + -70 ], %g2
<== NOT EXECUTED
400124d8: c4 37 bf 9a sth %g2, [ %fp + -102 ]
<== NOT EXECUTED
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400124dc: 94 10 00 1a mov %i2, %o2
<== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
400124e0: c4 17 bf b4 lduh [ %fp + -76 ], %g2
<== NOT EXECUTED
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400124e4: 92 10 20 01 mov 1, %o1
<== NOT EXECUTED
400124e8: 90 10 00 18 mov %i0, %o0
<== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
400124ec: c4 37 bf 94 sth %g2, [ %fp + -108 ]
<== NOT EXECUTED
rc = msdos_get_name_node(parent_loc, true, name, name_len,
400124f0: 40 00 07 3f call 400141ec <msdos_get_name_node>
<== NOT EXECUTED
400124f4: c2 2f bf 8b stb %g1, [ %fp + -117 ]
<== NOT EXECUTED
400124f8: ba 10 00 08 mov %o0, %i5
<== NOT EXECUTED
}
400124fc: 81 c7 e0 08 ret
<== NOT EXECUTED
40012500: 91 e8 00 1d restore %g0, %i5, %o0
<== NOT EXECUTED
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40012504: c4 08 60 30 ldub [ %g1 + 0x30 ], %g2
40012508: 84 10 a0 02 or %g2, 2, %g2
4001250c: c4 28 60 30 stb %g2, [ %g1 + 0x30 ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
40012510: 05 00 08 00 sethi %hi(0x200000), %g2
fat_fd->fat_file_type = FAT_DIRECTORY;
40012514: c0 20 60 10 clr [ %g1 + 0x10 ]
rc = fat_file_extend(&fs_info->fat,
40012518: 98 07 bf a0 add %fp, -96, %o4
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
4001251c: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
rc = fat_file_extend(&fs_info->fat,
40012520: 94 10 20 01 mov 1, %o2
fat_fd->ctime = t;
40012524: e2 20 60 40 st %l1, [ %g1 + 0x40 ]
40012528: 92 10 00 01 mov %g1, %o1
4001252c: e4 20 60 44 st %l2, [ %g1 + 0x44 ]
40012530: 90 10 00 10 mov %l0, %o0
fat_fd->mtime = t;
40012534: e2 20 60 48 st %l1, [ %g1 + 0x48 ]
40012538: e4 20 60 4c st %l2, [ %g1 + 0x4c ]
4001253c: 7f ff fd 5f call 40011ab8 <fat_file_extend>
40012540: d6 04 20 08 ld [ %l0 + 8 ], %o3
if (rc != RC_OK)
40012544: ba 92 20 00 orcc %o0, 0, %i5
40012548: 32 bf ff b4 bne,a 40012418 <msdos_creat_node+0x1e0>
<== NEVER TAKEN
4001254c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
<== NOT EXECUTED
memcpy(DOT_NODE_P(dot_dotdot), short_node,
40012550: d8 1f bf 88 ldd [ %fp + -120 ], %o4
40012554: c4 1f bf 98 ldd [ %fp + -104 ], %g2
40012558: e4 1f bf 80 ldd [ %fp + -128 ], %l2
4001255c: f4 1f bf 90 ldd [ %fp + -112 ], %i2
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
40012560: 03 10 00 9a sethi %hi(0x40026800), %g1
40012564: d2 00 62 90 ld [ %g1 + 0x290 ], %o1 ! 40026a90 <MSDOS_DOT_NAME>
40012568: 94 10 20 0b mov 0xb, %o2
memcpy(DOT_NODE_P(dot_dotdot), short_node,
4001256c: d8 3f bf c8 std %o4, [ %fp + -56 ]
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
40012570: 90 07 bf c0 add %fp, -64, %o0
memcpy(DOT_NODE_P(dot_dotdot), short_node,
40012574: c4 3f bf d8 std %g2, [ %fp + -40 ]
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
40012578: d8 3f bf e8 std %o4, [ %fp + -24 ]
4001257c: c4 3f bf f8 std %g2, [ %fp + -8 ]
memcpy(DOT_NODE_P(dot_dotdot), short_node,
40012580: e4 3f bf c0 std %l2, [ %fp + -64 ]
40012584: f4 3f bf d0 std %i2, [ %fp + -48 ]
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
40012588: e4 3f bf e0 std %l2, [ %fp + -32 ]
memcpy(MSDOS_DIR_NAME(DOT_NODE_P(dot_dotdot)), MSDOS_DOT_NAME,
4001258c: 40 00 25 d5 call 4001bce0 <memcpy>
40012590: f4 3f bf f0 std %i2, [ %fp + -16 ]
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
40012594: 03 10 00 9a sethi %hi(0x40026800), %g1
40012598: d2 00 62 8c ld [ %g1 + 0x28c ], %o1 ! 40026a8c <MSDOS_DOTDOT_NAME>
4001259c: 94 10 20 0b mov 0xb, %o2
400125a0: 40 00 25 d0 call 4001bce0 <memcpy>
400125a4: 90 07 bf e0 add %fp, -32, %o0
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
400125a8: c2 07 20 20 ld [ %i4 + 0x20 ], %g1
400125ac: 80 a0 60 01 cmp %g1, 1
400125b0: 22 80 00 37 be,a 4001268c <msdos_creat_node+0x454>
400125b4: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
400125b8: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
400125bc: 85 30 60 10 srl %g1, 0x10, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
400125c0: 89 28 60 08 sll %g1, 8, %g4
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
400125c4: 87 28 a0 08 sll %g2, 8, %g3
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
400125c8: 83 28 60 10 sll %g1, 0x10, %g1
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
400125cc: 85 30 a0 08 srl %g2, 8, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
400125d0: 83 30 60 18 srl %g1, 0x18, %g1
CT_LE_W((uint16_t )(((parent_fat_fd->cln) & 0xFFFF0000)>>16));
400125d4: 84 10 c0 02 or %g3, %g2, %g2
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
400125d8: 82 11 00 01 or %g4, %g1, %g1
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
400125dc: c4 37 bf f4 sth %g2, [ %fp + -12 ]
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) =
400125e0: c2 37 bf fa sth %g1, [ %fp + -6 ]
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
400125e4: 98 07 bf c0 add %fp, -64, %o4
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
400125e8: d2 07 bf 6c ld [ %fp + -148 ], %o1
400125ec: c2 02 60 1c ld [ %o1 + 0x1c ], %g1
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
400125f0: 85 30 60 10 srl %g1, 0x10, %g2
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
400125f4: 89 28 60 08 sll %g1, 8, %g4
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
400125f8: 87 28 a0 08 sll %g2, 8, %g3
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
400125fc: 83 28 60 10 sll %g1, 0x10, %g1
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
40012600: 85 30 a0 08 srl %g2, 8, %g2
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
40012604: 83 30 60 18 srl %g1, 0x18, %g1
CT_LE_W((uint16_t )(((fat_fd->cln) & 0xFFFF0000) >> 16));
40012608: 84 10 c0 02 or %g3, %g2, %g2
CT_LE_W((uint16_t )((fat_fd->cln) & 0x0000FFFF));
4001260c: 82 11 00 01 or %g4, %g1, %g1
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
40012610: 96 10 20 40 mov 0x40, %o3
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOT_NODE_P(dot_dotdot)) =
40012614: c2 37 bf da sth %g1, [ %fp + -38 ]
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
40012618: 94 10 20 00 clr %o2
*MSDOS_DIR_FIRST_CLUSTER_HI(DOT_NODE_P(dot_dotdot)) =
4001261c: c4 37 bf d4 sth %g2, [ %fp + -44 ]
ret = fat_file_write(&fs_info->fat, fat_fd, 0,
40012620: 7f ff fd c2 call 40011d28 <fat_file_write>
40012624: 90 10 00 10 mov %l0, %o0
if (ret < 0)
40012628: 80 a2 20 00 cmp %o0, 0
4001262c: 06 80 00 16 bl 40012684 <msdos_creat_node+0x44c>
<== NEVER TAKEN
40012630: d2 07 bf 6c ld [ %fp + -148 ], %o1
rc = fat_file_write_first_cluster_num(&fs_info->fat, fat_fd);
40012634: 40 00 01 fc call 40012e24 <fat_file_write_first_cluster_num>
40012638: 90 10 00 10 mov %l0, %o0
if (rc != RC_OK)
4001263c: ba 92 20 00 orcc %o0, 0, %i5
40012640: 02 80 00 1d be 400126b4 <msdos_creat_node+0x47c>
<== ALWAYS TAKEN
40012644: d2 07 bf 6c ld [ %fp + -148 ], %o1
fat_file_close(&fs_info->fat, fat_fd);
40012648: d2 07 bf 6c ld [ %fp + -148 ], %o1
<== NOT EXECUTED
4001264c: 7f ff fc b1 call 40011910 <fat_file_close>
<== NOT EXECUTED
40012650: 90 10 00 10 mov %l0, %o0
<== NOT EXECUTED
msdos_set_first_char4file_name(parent_loc->mt_entry, &dir_pos, 0xE5);
40012654: 10 bf ff 71 b 40012418 <msdos_creat_node+0x1e0>
<== NOT EXECUTED
40012658: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
4001265c: 40 00 23 c5 call 4001b570 <__errno>
<== NOT EXECUTED
40012660: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
40012664: 82 10 20 5b mov 0x5b, %g1
<== NOT EXECUTED
40012668: 10 bf ff 54 b 400123b8 <msdos_creat_node+0x180>
<== NOT EXECUTED
4001266c: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EINVAL);
40012670: 40 00 23 c0 call 4001b570 <__errno>
<== NOT EXECUTED
40012674: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
40012678: 82 10 20 16 mov 0x16, %g1
<== NOT EXECUTED
4001267c: 10 bf ff 4f b 400123b8 <msdos_creat_node+0x180>
<== NOT EXECUTED
40012680: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
rc = -1;
40012684: 10 bf ff f1 b 40012648 <msdos_creat_node+0x410>
<== NOT EXECUTED
40012688: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(parent_fat_fd)) &&
4001268c: 80 a0 60 00 cmp %g1, 0
40012690: 32 bf ff cb bne,a 400125bc <msdos_creat_node+0x384>
<== NEVER TAKEN
40012694: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
<== NOT EXECUTED
40012698: c2 0c 20 16 ldub [ %l0 + 0x16 ], %g1
4001269c: 80 88 60 04 btst 4, %g1
400126a0: 22 bf ff c7 be,a 400125bc <msdos_creat_node+0x384>
<== ALWAYS TAKEN
400126a4: c2 07 20 1c ld [ %i4 + 0x1c ], %g1
*MSDOS_DIR_FIRST_CLUSTER_LOW(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
400126a8: c0 37 bf fa clrh [ %fp + -6 ]
<== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) = 0x0000;
400126ac: 10 bf ff ce b 400125e4 <msdos_creat_node+0x3ac>
<== NOT EXECUTED
400126b0: c0 37 bf f4 clrh [ %fp + -12 ]
<== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
400126b4: 7f ff fc 97 call 40011910 <fat_file_close>
400126b8: 90 10 00 10 mov %l0, %o0
400126bc: 30 bf ff 3f b,a 400123b8 <msdos_creat_node+0x180>
return -1;
400126c0: 10 bf ff 3e b 400123b8 <msdos_creat_node+0x180>
400126c4: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
40018f14 <msdos_date_dos2unix>:
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
40018f14: 83 32 60 05 srl %o1, 5, %g1
if (lastdosdate != dd) {
40018f18: 07 10 00 ad sethi %hi(0x4002b400), %g3
40018f1c: da 10 e3 20 lduh [ %g3 + 0x320 ], %o5 ! 4002b720 <lastdosdate>
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
40018f20: 89 32 60 0b srl %o1, 0xb, %g4
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
40018f24: 84 08 60 3f and %g1, 0x3f, %g2
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
40018f28: 88 09 20 1f and %g4, 0x1f, %g4
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
40018f2c: 83 28 a0 04 sll %g2, 4, %g1
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
40018f30: 88 59 27 08 smul %g4, 0x708, %g4
seconds = 2 * ((dt & MSDOS_DT_2SECONDS_MASK) >> MSDOS_DT_2SECONDS_SHIFT)
40018f34: 92 0a 60 1f and %o1, 0x1f, %o1
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
40018f38: 82 20 40 02 sub %g1, %g2, %g1
if (lastdosdate != dd) {
40018f3c: 80 a3 40 08 cmp %o5, %o0
+ ((dt & MSDOS_DT_MINUTES_MASK) >> MSDOS_DT_MINUTES_SHIFT) * 60
40018f40: 83 28 60 01 sll %g1, 1, %g1
+ ((dt & MSDOS_DT_HOURS_MASK) >> MSDOS_DT_HOURS_SHIFT) * 3600;
40018f44: 88 01 00 01 add %g4, %g1, %g4
40018f48: 88 01 00 09 add %g4, %o1, %g4
if (lastdosdate != dd) {
40018f4c: 02 80 00 34 be 4001901c <msdos_date_dos2unix+0x108>
40018f50: 89 29 20 01 sll %g4, 1, %g4
lastdosdate = dd;
40018f54: d0 30 e3 20 sth %o0, [ %g3 + 0x320 ]
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
40018f58: 99 32 20 09 srl %o0, 9, %o4
days = 0;
40018f5c: 84 10 20 00 clr %g2
for (y = 0; y < year; y++)
40018f60: 82 10 20 00 clr %g1
40018f64: 9a 8b 20 7f andcc %o4, 0x7f, %o5
40018f68: 12 80 00 08 bne 40018f88 <msdos_date_dos2unix+0x74>
<== ALWAYS TAKEN
40018f6c: 86 10 21 6e mov 0x16e, %g3
months = year & 0x03 ? regyear : leapyear;
40018f70: 10 80 00 0b b 40018f9c <msdos_date_dos2unix+0x88>
<== NOT EXECUTED
40018f74: 80 8b 20 03 btst 3, %o4
<== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
40018f78: 86 08 60 03 and %g1, 3, %g3
40018f7c: 80 a0 00 03 cmp %g0, %g3
40018f80: 86 60 3f ff subx %g0, -1, %g3
40018f84: 86 00 e1 6d add %g3, 0x16d, %g3
for (y = 0; y < year; y++)
40018f88: 82 00 60 01 inc %g1
40018f8c: 80 a3 40 01 cmp %o5, %g1
40018f90: 12 bf ff fa bne 40018f78 <msdos_date_dos2unix+0x64>
40018f94: 84 00 80 03 add %g2, %g3, %g2
months = year & 0x03 ? regyear : leapyear;
40018f98: 80 8b 20 03 btst 3, %o4
40018f9c: 12 80 00 1e bne 40019014 <msdos_date_dos2unix+0x100>
40018fa0: 03 10 00 a6 sethi %hi(0x40029800), %g1
40018fa4: 03 10 00 a6 sethi %hi(0x40029800), %g1
40018fa8: 82 10 60 78 or %g1, 0x78, %g1 ! 40029878 <leapyear>
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
40018fac: 87 32 20 05 srl %o0, 5, %g3
40018fb0: 86 08 e0 0f and %g3, 0xf, %g3
if (month == 0) {
40018fb4: 80 a0 e0 01 cmp %g3, 1
40018fb8: 28 80 00 0b bleu,a 40018fe4 <msdos_date_dos2unix+0xd0>
40018fbc: 82 0a 20 1f and %o0, 0x1f, %g1
40018fc0: 87 28 e0 01 sll %g3, 1, %g3
40018fc4: 86 00 ff fe add %g3, -2, %g3
40018fc8: 86 00 40 03 add %g1, %g3, %g3
days += months[m];
40018fcc: da 10 40 00 lduh [ %g1 ], %o5
40018fd0: 82 00 60 02 add %g1, 2, %g1
for (m = 0; m < month - 1; m++)
40018fd4: 80 a0 c0 01 cmp %g3, %g1
40018fd8: 12 bf ff fd bne 40018fcc <msdos_date_dos2unix+0xb8>
<== NEVER TAKEN
40018fdc: 84 00 80 0d add %g2, %o5, %g2
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
40018fe0: 82 0a 20 1f and %o0, 0x1f, %g1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
40018fe4: 11 00 00 54 sethi %hi(0x15000), %o0
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
40018fe8: 82 00 7f ff add %g1, -1, %g1
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
40018fec: 90 12 21 80 or %o0, 0x180, %o0
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
40018ff0: 84 00 40 02 add %g1, %g2, %g2
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
40018ff4: 03 10 00 ad sethi %hi(0x4002b400), %g1
40018ff8: 84 58 80 08 smul %g2, %o0, %g2
40018ffc: 11 04 b3 a9 sethi %hi(0x12cea400), %o0
40019000: 90 12 22 00 or %o0, 0x200, %o0 ! 12cea600 <RAM_SIZE+0x128ea600>
40019004: 90 00 80 08 add %g2, %o0, %o0
40019008: d0 20 63 1c st %o0, [ %g1 + 0x31c ]
}
4001900c: 81 c3 e0 08 retl
40019010: 90 01 00 08 add %g4, %o0, %o0
months = year & 0x03 ? regyear : leapyear;
40019014: 10 bf ff e6 b 40018fac <msdos_date_dos2unix+0x98>
40019018: 82 10 60 90 or %g1, 0x90, %g1
4001901c: 03 10 00 ad sethi %hi(0x4002b400), %g1
40019020: d0 00 63 1c ld [ %g1 + 0x31c ], %o0 ! 4002b71c <lastseconds>
}
40019024: 81 c3 e0 08 retl
40019028: 90 01 00 08 add %g4, %o0, %o0
40018d50 <msdos_date_unix2dos>:
if (lasttime != t) {
40018d50: 1b 10 00 ad sethi %hi(0x4002b400), %o5
40018d54: c2 03 63 2c ld [ %o5 + 0x32c ], %g1 ! 4002b72c <lasttime>
40018d58: 80 a0 40 08 cmp %g1, %o0
40018d5c: 02 80 00 5a be 40018ec4 <msdos_date_unix2dos+0x174>
40018d60: 03 22 22 22 sethi %hi(0x88888800), %g1
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
40018d64: 82 10 60 89 or %g1, 0x89, %g1 ! 88888889 <RAM_END+0x48488889>
40018d68: 80 52 00 01 umul %o0, %g1, %g0
40018d6c: 87 40 00 00 rd %y, %g3
40018d70: 97 30 e0 05 srl %g3, 5, %o3
40018d74: 80 52 c0 01 umul %o3, %g1, %g0
40018d78: 83 40 00 00 rd %y, %g1
40018d7c: 89 30 60 05 srl %g1, 5, %g4
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
40018d80: 05 24 68 ac sethi %hi(0x91a2b000), %g2
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
40018d84: 83 29 20 04 sll %g4, 4, %g1
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
40018d88: 84 10 a3 c5 or %g2, 0x3c5, %g2
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
40018d8c: 82 20 40 04 sub %g1, %g4, %g1
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
40018d90: 80 52 00 02 umul %o0, %g2, %g0
40018d94: 85 40 00 00 rd %y, %g2
40018d98: 19 2a aa aa sethi %hi(0xaaaaa800), %o4
40018d9c: 85 30 a0 0b srl %g2, 0xb, %g2
40018da0: 98 13 22 ab or %o4, 0x2ab, %o4
40018da4: 80 50 80 0c umul %g2, %o4, %g0
40018da8: 99 40 00 00 rd %y, %o4
40018dac: 89 33 20 04 srl %o4, 4, %g4
40018db0: 87 29 20 01 sll %g4, 1, %g3
40018db4: 88 00 c0 04 add %g3, %g4, %g4
40018db8: 89 29 20 03 sll %g4, 3, %g4
40018dbc: 84 20 80 04 sub %g2, %g4, %g2
40018dc0: 85 28 a0 0b sll %g2, 0xb, %g2
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
40018dc4: 83 28 60 02 sll %g1, 2, %g1
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
40018dc8: 87 2a e0 04 sll %o3, 4, %g3
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
40018dcc: 82 22 c0 01 sub %o3, %g1, %g1
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
40018dd0: 86 20 c0 0b sub %g3, %o3, %g3
+ (((t / 60) % 60) << MSDOS_DT_MINUTES_SHIFT)
40018dd4: 83 28 60 05 sll %g1, 5, %g1
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
40018dd8: 87 28 e0 02 sll %g3, 2, %g3
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
40018ddc: 82 00 40 02 add %g1, %g2, %g1
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
40018de0: 84 22 00 03 sub %o0, %g3, %g2
40018de4: 85 30 a0 01 srl %g2, 1, %g2
lasttime = t;
40018de8: d0 23 63 2c st %o0, [ %o5 + 0x32c ]
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
40018dec: 82 00 40 02 add %g1, %g2, %g1
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
40018df0: 05 10 00 ad sethi %hi(0x4002b400), %g2
40018df4: c2 30 a3 22 sth %g1, [ %g2 + 0x322 ] ! 4002b722 <lastdtime>
+ (((t / 3600) % 24) << MSDOS_DT_HOURS_SHIFT);
40018df8: 86 10 00 01 mov %g1, %g3
if (days != lastday) {
40018dfc: 05 10 00 ad sethi %hi(0x4002b400), %g2
days = t / (SECONDSPERDAY);
40018e00: 03 30 8b 91 sethi %hi(0xc22e4400), %g1
if (days != lastday) {
40018e04: c8 00 a3 28 ld [ %g2 + 0x328 ], %g4
days = t / (SECONDSPERDAY);
40018e08: 82 10 61 07 or %g1, 0x107, %g1
40018e0c: 80 52 00 01 umul %o0, %g1, %g0
40018e10: 91 40 00 00 rd %y, %o0
40018e14: 03 10 00 ad sethi %hi(0x4002b400), %g1
40018e18: 91 32 20 10 srl %o0, 0x10, %o0
if (days != lastday) {
40018e1c: 80 a1 00 08 cmp %g4, %o0
40018e20: 02 80 00 26 be 40018eb8 <msdos_date_unix2dos+0x168>
40018e24: c2 10 63 24 lduh [ %g1 + 0x324 ], %g1
lastday = days;
40018e28: d0 20 a3 28 st %o0, [ %g2 + 0x328 ]
for (year = 1970;; year++) {
40018e2c: 10 80 00 03 b 40018e38 <msdos_date_unix2dos+0xe8>
40018e30: 84 10 27 b2 mov 0x7b2, %g2
40018e34: 84 00 a0 01 inc %g2
inc = year & 0x03 ? 365 : 366;
40018e38: 88 08 a0 03 and %g2, 3, %g4
40018e3c: 80 a0 00 04 cmp %g0, %g4
40018e40: 82 60 3f ff subx %g0, -1, %g1
40018e44: 82 00 61 6d add %g1, 0x16d, %g1
if (days < inc)
40018e48: 80 a2 00 01 cmp %o0, %g1
40018e4c: 3a bf ff fa bcc,a 40018e34 <msdos_date_unix2dos+0xe4>
40018e50: 90 22 00 01 sub %o0, %g1, %o0
months = year & 0x03 ? regyear : leapyear;
40018e54: 80 a1 20 00 cmp %g4, 0
40018e58: 02 80 00 22 be 40018ee0 <msdos_date_unix2dos+0x190>
<== ALWAYS TAKEN
40018e5c: 1b 10 00 a6 sethi %hi(0x40029800), %o5
40018e60: 1b 10 00 a6 sethi %hi(0x40029800), %o5
<== NOT EXECUTED
40018e64: 9a 13 60 90 or %o5, 0x90, %o5 ! 40029890 <regyear>
<== NOT EXECUTED
for (month = 0; month < 12; month++) {
40018e68: 82 10 20 00 clr %g1
if (days < months[month])
40018e6c: 89 28 60 01 sll %g1, 1, %g4
40018e70: c8 13 40 04 lduh [ %o5 + %g4 ], %g4
40018e74: 80 a1 00 08 cmp %g4, %o0
40018e78: 18 80 00 1c bgu 40018ee8 <msdos_date_unix2dos+0x198>
<== ALWAYS TAKEN
40018e7c: 82 00 60 01 inc %g1
for (month = 0; month < 12; month++) {
40018e80: 80 a0 60 0c cmp %g1, 0xc
<== NOT EXECUTED
40018e84: 12 bf ff fa bne 40018e6c <msdos_date_unix2dos+0x11c>
<== NOT EXECUTED
40018e88: 90 22 00 04 sub %o0, %g4, %o0
<== NOT EXECUTED
40018e8c: 82 10 21 a0 mov 0x1a0, %g1
<== NOT EXECUTED
+ ((month + 1) << MSDOS_DD_MONTH_SHIFT);
40018e90: 82 00 60 01 inc %g1
<== NOT EXECUTED
if (year > 1980)
40018e94: 80 a0 a7 bc cmp %g2, 0x7bc
<== NOT EXECUTED
+ ((month + 1) << MSDOS_DD_MONTH_SHIFT);
40018e98: 90 00 40 08 add %g1, %o0, %o0
<== NOT EXECUTED
if (year > 1980)
40018e9c: 08 80 00 19 bleu 40018f00 <msdos_date_unix2dos+0x1b0>
<== NOT EXECUTED
40018ea0: 82 10 00 08 mov %o0, %g1
<== NOT EXECUTED
lastddate += (year - 1980) <<
40018ea4: 84 00 b8 44 add %g2, -1980, %g2
40018ea8: 85 28 a0 09 sll %g2, 9, %g2
40018eac: 82 02 00 02 add %o0, %g2, %g1
40018eb0: 05 10 00 ad sethi %hi(0x4002b400), %g2
40018eb4: c2 30 a3 24 sth %g1, [ %g2 + 0x324 ] ! 4002b724 <lastddate>
*dtp = lastdtime;
40018eb8: c6 32 80 00 sth %g3, [ %o2 ]
}
40018ebc: 81 c3 e0 08 retl
40018ec0: c2 32 40 00 sth %g1, [ %o1 ]
40018ec4: 03 10 00 ad sethi %hi(0x4002b400), %g1
40018ec8: c6 10 63 22 lduh [ %g1 + 0x322 ], %g3 ! 4002b722 <lastdtime>
*dtp = lastdtime;
40018ecc: c6 32 80 00 sth %g3, [ %o2 ]
40018ed0: 03 10 00 ad sethi %hi(0x4002b400), %g1
40018ed4: c2 10 63 24 lduh [ %g1 + 0x324 ], %g1 ! 4002b724 <lastddate>
}
40018ed8: 81 c3 e0 08 retl
40018edc: c2 32 40 00 sth %g1, [ %o1 ]
months = year & 0x03 ? regyear : leapyear;
40018ee0: 10 bf ff e2 b 40018e68 <msdos_date_unix2dos+0x118>
40018ee4: 9a 13 60 78 or %o5, 0x78, %o5
40018ee8: 83 28 60 05 sll %g1, 5, %g1
+ ((month + 1) << MSDOS_DD_MONTH_SHIFT);
40018eec: 82 00 60 01 inc %g1
if (year > 1980)
40018ef0: 80 a0 a7 bc cmp %g2, 0x7bc
+ ((month + 1) << MSDOS_DD_MONTH_SHIFT);
40018ef4: 90 00 40 08 add %g1, %o0, %o0
if (year > 1980)
40018ef8: 18 bf ff eb bgu 40018ea4 <msdos_date_unix2dos+0x154>
<== ALWAYS TAKEN
40018efc: 82 10 00 08 mov %o0, %g1
*dtp = lastdtime;
40018f00: c6 32 80 00 sth %g3, [ %o2 ]
<== NOT EXECUTED
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
40018f04: 05 10 00 ad sethi %hi(0x4002b400), %g2
<== NOT EXECUTED
*ddp = lastddate;
40018f08: c2 32 40 00 sth %g1, [ %o1 ]
<== NOT EXECUTED
}
40018f0c: 81 c3 e0 08 retl
<== NOT EXECUTED
40018f10: d0 30 a3 24 sth %o0, [ %g2 + 0x324 ]
<== NOT EXECUTED
40013110 <msdos_dir_is_empty>:
{
40013110: 9d e3 bf a0 save %sp, -96, %sp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
40013114: e0 06 20 08 ld [ %i0 + 8 ], %l0
40013118: f8 14 00 00 lduh [ %l0 ], %i4
*ret_val = false;
4001311c: c0 2e 80 00 clrb [ %i2 ]
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
40013120: 25 10 00 9a sethi %hi(0x40026800), %l2
40013124: f0 04 20 c8 ld [ %l0 + 0xc8 ], %i0
(strncmp(MSDOS_DIR_NAME((entry)),
40013128: 27 10 00 9a sethi %hi(0x40026800), %l3
uint32_t j = 0, i = 0;
4001312c: a8 10 20 00 clr %l4
40013130: b9 2f 20 10 sll %i4, 0x10, %i4
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
40013134: a4 14 a1 90 or %l2, 0x190, %l2
(strncmp(MSDOS_DIR_NAME((entry)),
40013138: a6 14 e1 a0 or %l3, 0x1a0, %l3
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * fs_info->fat.vol.bps,
4001313c: 97 37 20 10 srl %i4, 0x10, %o3
40013140: 98 10 00 18 mov %i0, %o4
40013144: 94 5a c0 14 smul %o3, %l4, %o2
40013148: 92 10 00 19 mov %i1, %o1
4001314c: 7f ff f9 32 call 40011614 <fat_file_read>
40013150: 90 10 00 10 mov %l0, %o0
40013154: 80 a2 20 00 cmp %o0, 0
40013158: 02 80 00 24 be 400131e8 <msdos_dir_is_empty+0xd8>
<== NEVER TAKEN
4001315c: 80 a2 20 1f cmp %o0, 0x1f
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40013160: 04 80 00 26 ble 400131f8 <msdos_dir_is_empty+0xe8>
<== NEVER TAKEN
40013164: b0 10 3f ff mov -1, %i0
assert(ret == fs_info->fat.vol.bps);
40013168: f8 14 00 00 lduh [ %l0 ], %i4
4001316c: b9 2f 20 10 sll %i4, 0x10, %i4
40013170: a3 37 20 10 srl %i4, 0x10, %l1
40013174: 80 a4 40 08 cmp %l1, %o0
40013178: 12 80 00 29 bne 4001321c <msdos_dir_is_empty+0x10c>
<== NEVER TAKEN
4001317c: 80 a4 60 00 cmp %l1, 0
40013180: f0 04 20 c8 ld [ %l0 + 0xc8 ], %i0
for (i = 0;
40013184: 02 80 00 24 be 40013214 <msdos_dir_is_empty+0x104>
<== NEVER TAKEN
40013188: ba 10 00 18 mov %i0, %i5
if (((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
4001318c: f6 0f 40 00 ldub [ %i5 ], %i3
40013190: 80 a6 e0 e5 cmp %i3, 0xe5
40013194: 22 80 00 1c be,a 40013204 <msdos_dir_is_empty+0xf4>
40013198: ba 07 60 20 add %i5, 0x20, %i5
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
4001319c: c2 0f 60 0b ldub [ %i5 + 0xb ], %g1
400131a0: 82 08 60 3f and %g1, 0x3f, %g1
400131a4: 80 a0 60 0f cmp %g1, 0xf
400131a8: 02 80 00 16 be 40013200 <msdos_dir_is_empty+0xf0>
400131ac: 94 10 20 0b mov 0xb, %o2
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
400131b0: 92 10 00 12 mov %l2, %o1
400131b4: 40 00 27 7a call 4001cf9c <strncmp>
400131b8: 90 10 00 1d mov %i5, %o0
MSDOS_ATTR_LFN) ||
400131bc: 80 a2 20 00 cmp %o0, 0
400131c0: 02 80 00 10 be 40013200 <msdos_dir_is_empty+0xf0>
400131c4: 94 10 20 0b mov 0xb, %o2
(strncmp(MSDOS_DIR_NAME((entry)),
400131c8: 92 10 00 13 mov %l3, %o1
400131cc: 40 00 27 74 call 4001cf9c <strncmp>
400131d0: 90 10 00 1d mov %i5, %o0
MSDOS_SHORT_NAME_LEN) == 0) ||
400131d4: 80 a2 20 00 cmp %o0, 0
400131d8: 02 80 00 0a be 40013200 <msdos_dir_is_empty+0xf0>
400131dc: 80 a6 e0 00 cmp %i3, 0
if ((*MSDOS_DIR_NAME(entry)) ==
400131e0: 12 80 00 06 bne 400131f8 <msdos_dir_is_empty+0xe8>
400131e4: b0 10 20 00 clr %i0
*ret_val = true;
400131e8: 82 10 20 01 mov 1, %g1
400131ec: c2 2e 80 00 stb %g1, [ %i2 ]
return RC_OK;
400131f0: 81 c7 e0 08 ret
400131f4: 91 e8 20 00 restore %g0, 0, %o0
}
400131f8: 81 c7 e0 08 ret
400131fc: 81 e8 00 00 restore
40013200: ba 07 60 20 add %i5, 0x20, %i5
for (i = 0;
40013204: 82 27 40 18 sub %i5, %i0, %g1
40013208: 80 a4 40 01 cmp %l1, %g1
4001320c: 38 bf ff e1 bgu,a 40013190 <msdos_dir_is_empty+0x80>
40013210: f6 0f 40 00 ldub [ %i5 ], %i3
j++;
40013214: 10 bf ff ca b 4001313c <msdos_dir_is_empty+0x2c>
40013218: a8 05 20 01 inc %l4
assert(ret == fs_info->fat.vol.bps);
4001321c: 17 10 00 9a sethi %hi(0x40026800), %o3
<== NOT EXECUTED
40013220: 15 10 00 9a sethi %hi(0x40026800), %o2
<== NOT EXECUTED
40013224: 11 10 00 9a sethi %hi(0x40026800), %o0
<== NOT EXECUTED
40013228: 96 12 e1 28 or %o3, 0x128, %o3
<== NOT EXECUTED
4001322c: 94 12 a2 78 or %o2, 0x278, %o2
<== NOT EXECUTED
40013230: 92 10 23 c5 mov 0x3c5, %o1
<== NOT EXECUTED
40013234: 40 00 15 d8 call 40018994 <__assert_func>
<== NOT EXECUTED
40013238: 90 12 21 48 or %o0, 0x148, %o0
<== NOT EXECUTED
4001323c: 01 00 00 00 nop
<== NOT EXECUTED
400197a4 <msdos_dir_read>:
* the number of bytes read on success, or -1 if error occured (errno
* set apropriately).
*/
ssize_t
msdos_dir_read(rtems_libio_t *iop, void *buffer, size_t count)
{
400197a4: 9d e3 be 40 save %sp, -448, %sp
int rc = RC_OK;
int eno = 0;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
400197a8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
400197ac: ea 00 60 08 ld [ %g1 + 8 ], %l5
rtems_dosfs_convert_control *converter = fs_info->converter;
400197b0: c2 05 60 cc ld [ %l5 + 0xcc ], %g1
const rtems_dosfs_convert_handler *convert_handler = converter->handler;
400197b4: ec 00 40 00 ld [ %g1 ], %l6
rtems_dosfs_convert_control *converter = fs_info->converter;
400197b8: c2 27 be c0 st %g1, [ %fp + -320 ]
400197bc: 90 05 60 b0 add %l5, 0xb0, %o0
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
fat_file_fd_t *tmp_fat_fd = NULL;
struct dirent tmp_dirent;
size_t lfn_len = 0;
uint16_t *lfn_buf = converter->buffer.data;
400197c0: e6 00 60 04 ld [ %g1 + 4 ], %l3
char *sfn_buf = converter->buffer.data;
const size_t buf_size = converter->buffer.size;
400197c4: c2 00 60 08 ld [ %g1 + 8 ], %g1
400197c8: c2 27 be a8 st %g1, [ %fp + -344 ]
* cast start and count - protect against using sizes that are not exact
* multiples of the -dirent- size. These could result in unexpected
* results
*/
start = iop->offset / sizeof(struct dirent);
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
400197cc: b5 36 a0 03 srl %i2, 3, %i2
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
400197d0: e8 06 20 18 ld [ %i0 + 0x18 ], %l4
400197d4: d0 27 be ac st %o0, [ %fp + -340 ]
fat_file_fd_t *tmp_fat_fd = NULL;
400197d8: c0 27 be cc clr [ %fp + -308 ]
_Mutex_recursive_Acquire( mutex );
400197dc: 7f ff cf 0f call 4000d418 <_Mutex_recursive_Acquire>
400197e0: c0 27 be d0 clr [ %fp + -304 ]
start = iop->offset / sizeof(struct dirent);
400197e4: d0 1e 20 08 ldd [ %i0 + 8 ], %o0
400197e8: 94 10 20 00 clr %o2
400197ec: 40 00 04 68 call 4001a98c <__divdi3>
400197f0: 96 10 21 18 mov 0x118, %o3
{
400197f4: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
400197f8: 03 03 a8 3a sethi %hi(0xea0e800), %g1
* too, so read such set of sectors is quick operation for low-level IO
* layer.
*/
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
fat_fd->fat_file_size :
400197fc: c4 05 20 20 ld [ %l4 + 0x20 ], %g2
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
40019800: 82 10 62 0f or %g1, 0x20f, %g1
start = iop->offset / sizeof(struct dirent);
40019804: a0 10 00 09 mov %o1, %l0
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
40019808: 80 56 80 01 umul %i2, %g1, %g0
4001980c: b5 40 00 00 rd %y, %i2
fat_fd->fat_file_size :
40019810: 80 a0 a0 01 cmp %g2, 1
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
40019814: b5 36 a0 01 srl %i2, 1, %i2
fat_fd->fat_file_size :
40019818: 02 80 00 fd be 40019c0c <msdos_dir_read+0x468>
4001981c: b4 5e a1 18 smul %i2, 0x118, %i2
40019820: c2 05 60 08 ld [ %l5 + 8 ], %g1
40019824: c2 27 be b0 st %g1, [ %fp + -336 ]
fs_info->fat.vol.bpc;
while (count > 0 && cmpltd >= 0)
40019828: 80 a6 a0 00 cmp %i2, 0
4001982c: 02 80 01 0a be 40019c54 <msdos_dir_read+0x4b0>
<== NEVER TAKEN
40019830: 03 00 00 3f sethi %hi(0xfc00), %g1
40019834: c0 27 be c4 clr [ %fp + -316 ]
* convert dir entry from fixed 8+3 format (without dot)
* to 0..8 + 1dot + 0..3 format
*/
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
sfn_buf, entry); /* src text */
eno = (*convert_handler->codepage_to_utf8) (
40019838: 82 10 63 ff or %g1, 0x3ff, %g1
uint8_t lfn_checksum = 0;
4001983c: c0 2f be bb clrb [ %fp + -325 ]
int lfn_entries = 0;
40019840: a4 10 20 00 clr %l2
size_t lfn_len = 0;
40019844: c0 27 be b4 clr [ %fp + -332 ]
uint32_t lfn_start = FAT_FILE_SHORT_NAME;
40019848: b6 10 3f ff mov -1, %i3
eno = (*convert_handler->codepage_to_utf8) (
4001984c: c2 27 be bc st %g1, [ %fp + -324 ]
ssize_t cmpltd = 0;
40019850: ba 10 20 00 clr %i5
ret = fat_file_read(&fs_info->fat, fat_fd, (j * bts2rd),
40019854: d8 05 60 c8 ld [ %l5 + 0xc8 ], %o4
40019858: d6 07 be b0 ld [ %fp + -336 ], %o3
4001985c: d4 07 be c4 ld [ %fp + -316 ], %o2
40019860: 92 10 00 14 mov %l4, %o1
40019864: 7f ff df 6c call 40011614 <fat_file_read>
40019868: 90 10 00 15 mov %l5, %o0
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
4001986c: 80 a2 20 1f cmp %o0, 0x1f
40019870: 04 80 00 f2 ble 40019c38 <msdos_dir_read+0x494>
<== NEVER TAKEN
40019874: b8 10 00 08 mov %o0, %i4
for (i = 0; i < ret && cmpltd >= 0; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40019878: 88 38 00 1d xnor %g0, %i5, %g4
4001987c: 80 a7 60 00 cmp %i5, 0
40019880: 06 80 00 46 bl 40019998 <msdos_dir_read+0x1f4>
<== NEVER TAKEN
40019884: 9f 31 20 1f srl %g4, 0x1f, %o7
char* entry = (char*) fs_info->cl_buf + i;
40019888: e2 05 60 c8 ld [ %l5 + 0xc8 ], %l1
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
4001988c: c2 0c 40 00 ldub [ %l1 ], %g1
40019890: 9e 88 60 ff andcc %g1, 0xff, %o7
40019894: 02 80 00 28 be 40019934 <msdos_dir_read+0x190>
<== NEVER TAKEN
40019898: 01 00 00 00 nop
for (i = 0; i < ret && cmpltd >= 0; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
4001989c: ae 10 20 00 clr %l7 ! 0 <PROM_START>
lfn_start = FAT_FILE_SHORT_NAME;
400198a0: b2 10 3f ff mov -1, %i1
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
400198a4: 80 a3 e0 e5 cmp %o7, 0xe5
400198a8: 22 80 00 17 be,a 40019904 <msdos_dir_read+0x160>
400198ac: ae 05 e0 20 add %l7, 0x20, %l7
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
400198b0: de 0c 60 0b ldub [ %l1 + 0xb ], %o7
400198b4: 80 8b e0 08 btst 8, %o7
400198b8: 02 80 00 3f be 400199b4 <msdos_dir_read+0x210>
400198bc: 98 0b e0 3f and %o7, 0x3f, %o4
400198c0: 80 a3 20 0f cmp %o4, 0xf
400198c4: 32 80 00 10 bne,a 40019904 <msdos_dir_read+0x160>
400198c8: ae 05 e0 20 add %l7, 0x20, %l7
if (lfn_start == FAT_FILE_SHORT_NAME)
400198cc: 80 a6 ff ff cmp %i3, -1
400198d0: 02 80 00 a1 be 40019b54 <msdos_dir_read+0x3b0>
400198d4: 96 10 20 00 clr %o3
if ((lfn_entries != (*MSDOS_DIR_ENTRY_TYPE(entry) &
400198d8: c2 0c 40 00 ldub [ %l1 ], %g1
400198dc: 82 08 60 3f and %g1, 0x3f, %g1
400198e0: 80 a0 40 12 cmp %g1, %l2
400198e4: 12 80 00 06 bne 400198fc <msdos_dir_read+0x158>
400198e8: c2 0f be bb ldub [ %fp + -325 ], %g1
MSDOS_LAST_LONG_ENTRY_MASK)) ||
400198ec: de 0c 60 0d ldub [ %l1 + 0xd ], %o7
400198f0: 80 a3 c0 01 cmp %o7, %g1
400198f4: 02 80 00 14 be 40019944 <msdos_dir_read+0x1a0>
<== ALWAYS TAKEN
400198f8: c2 07 be a8 ld [ %fp + -344 ], %g1
lfn_start = FAT_FILE_SHORT_NAME;
400198fc: b6 10 3f ff mov -1, %i3
for (i = 0; i < ret && cmpltd >= 0; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40019900: ae 05 e0 20 add %l7, 0x20, %l7
40019904: 83 31 20 1f srl %g4, 0x1f, %g1
40019908: 80 a5 c0 1c cmp %l7, %i4
4001990c: 1a 80 00 23 bcc 40019998 <msdos_dir_read+0x1f4>
40019910: 9e 10 00 01 mov %g1, %o7
40019914: 80 a0 60 00 cmp %g1, 0
40019918: 02 80 00 21 be 4001999c <msdos_dir_read+0x1f8>
<== NEVER TAKEN
4001991c: c2 07 be c4 ld [ %fp + -316 ], %g1
char* entry = (char*) fs_info->cl_buf + i;
40019920: d2 05 60 c8 ld [ %l5 + 0xc8 ], %o1
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
40019924: c2 0a 40 17 ldub [ %o1 + %l7 ], %g1
40019928: 9e 88 60 ff andcc %g1, 0xff, %o7
4001992c: 12 bf ff de bne 400198a4 <msdos_dir_read+0x100>
40019930: a2 02 40 17 add %o1, %l7, %l1
_Mutex_recursive_Release( mutex );
40019934: 7f ff ce de call 4000d4ac <_Mutex_recursive_Release>
40019938: d0 07 be ac ld [ %fp + -340 ], %o0
j++;
}
msdos_fs_unlock(fs_info);
return cmpltd;
}
4001993c: 81 c7 e0 08 ret
40019940: 91 e8 00 1d restore %g0, %i5, %o0
lfn_entries--;
40019944: a4 04 bf ff add %l2, -1, %l2
40019948: c8 27 be a4 st %g4, [ %fp + -348 ]
lfn_len += msdos_get_utf16_string_from_long_entry (
4001994c: 96 0a e0 01 and %o3, 1, %o3
offset_lfn = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
40019950: 95 2c a0 01 sll %l2, 1, %o2
lfn_len += msdos_get_utf16_string_from_long_entry (
40019954: 90 10 00 11 mov %l1, %o0
offset_lfn = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
40019958: 94 02 80 12 add %o2, %l2, %o2
4001995c: 95 2a a0 02 sll %o2, 2, %o2
40019960: 94 02 80 12 add %o2, %l2, %o2
&lfn_buf[offset_lfn],
40019964: 93 2a a0 01 sll %o2, 1, %o1
lfn_len += msdos_get_utf16_string_from_long_entry (
40019968: 94 20 40 0a sub %g1, %o2, %o2
4001996c: 7f ff e6 35 call 40013240 <msdos_get_utf16_string_from_long_entry>
40019970: 92 04 c0 09 add %l3, %o1, %o1
40019974: c2 07 be b4 ld [ %fp + -332 ], %g1
40019978: 82 00 40 08 add %g1, %o0, %g1
4001997c: c2 27 be b4 st %g1, [ %fp + -332 ]
for (i = 0; i < ret && cmpltd >= 0; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40019980: ae 05 e0 20 add %l7, 0x20, %l7
40019984: c8 07 be a4 ld [ %fp + -348 ], %g4
40019988: 83 31 20 1f srl %g4, 0x1f, %g1
4001998c: 80 a5 c0 1c cmp %l7, %i4
40019990: 0a bf ff e1 bcs 40019914 <msdos_dir_read+0x170>
40019994: 9e 10 00 01 mov %g1, %o7
40019998: c2 07 be c4 ld [ %fp + -316 ], %g1
4001999c: c4 07 be b0 ld [ %fp + -336 ], %g2
400199a0: 82 00 40 02 add %g1, %g2, %g1
while (count > 0 && cmpltd >= 0)
400199a4: 80 8b e0 ff btst 0xff, %o7
400199a8: 12 bf ff ab bne 40019854 <msdos_dir_read+0xb0>
<== ALWAYS TAKEN
400199ac: c2 27 be c4 st %g1, [ %fp + -316 ]
400199b0: 30 bf ff e1 b,a 40019934 <msdos_dir_read+0x190>
<== NOT EXECUTED
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
400199b4: 80 a3 20 0f cmp %o4, 0xf
400199b8: 02 bf ff c5 be 400198cc <msdos_dir_read+0x128>
<== NEVER TAKEN
400199bc: 80 a4 20 00 cmp %l0, 0
if (start)
400199c0: 12 80 00 62 bne 40019b48 <msdos_dir_read+0x3a4>
400199c4: 80 8b e0 10 btst 0x10, %o7
if ((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_DIRECTORY)
400199c8: 02 80 00 50 be 40019b08 <msdos_dir_read+0x364>
400199cc: 82 10 20 08 mov 8, %g1
tmp_dirent.d_type = DT_DIR;
400199d0: 82 10 20 04 mov 4, %g1
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
400199d4: d6 07 be c4 ld [ %fp + -316 ], %o3
tmp_dirent.d_type = DT_DIR;
400199d8: c2 2f be fa stb %g1, [ %fp + -262 ]
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
400199dc: 98 07 be d0 add %fp, -304, %o4
400199e0: 94 10 20 01 mov 1, %o2
400199e4: 92 10 00 14 mov %l4, %o1
400199e8: 7f ff df ff call 400119e4 <fat_file_ioctl>
400199ec: 90 10 00 15 mov %l5, %o0
if (rc != RC_OK)
400199f0: 80 a2 20 00 cmp %o0, 0
400199f4: 12 80 00 50 bne 40019b34 <msdos_dir_read+0x390>
<== NEVER TAKEN
400199f8: 82 10 00 08 mov %o0, %g1
dir_pos.sname.cln = cur_cln;
400199fc: c2 07 be d0 ld [ %fp + -304 ], %g1
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
40019a00: f2 27 be e0 st %i1, [ %fp + -288 ]
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
40019a04: 94 07 be cc add %fp, -308, %o2
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
40019a08: f2 27 be e4 st %i1, [ %fp + -284 ]
40019a0c: 92 07 be d8 add %fp, -296, %o1
dir_pos.sname.cln = cur_cln;
40019a10: c2 27 be d8 st %g1, [ %fp + -296 ]
rc = fat_file_open(&fs_info->fat, &dir_pos, &tmp_fat_fd);
40019a14: 90 10 00 15 mov %l5, %o0
40019a18: 7f ff de 16 call 40011270 <fat_file_open>
40019a1c: ee 27 be dc st %l7, [ %fp + -292 ]
if (rc != RC_OK)
40019a20: 80 a2 20 00 cmp %o0, 0
40019a24: 12 80 00 43 bne 40019b30 <msdos_dir_read+0x38c>
<== NEVER TAKEN
40019a28: c2 07 be cc ld [ %fp + -308 ], %g1
tmp_dirent.d_ino = tmp_fat_fd->ino;
40019a2c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
tmp_dirent.d_off = start + cmpltd;
40019a30: 89 3f 60 1f sra %i5, 0x1f, %g4
40019a34: fa 27 be f4 st %i5, [ %fp + -268 ]
if (lfn_entries == 0 &&
40019a38: 80 a6 ff ff cmp %i3, -1
tmp_dirent.d_off = start + cmpltd;
40019a3c: c8 27 be f0 st %g4, [ %fp + -272 ]
tmp_dirent.d_reclen = sizeof(struct dirent);
40019a40: 88 10 21 18 mov 0x118, %g4
tmp_dirent.d_ino = tmp_fat_fd->ino;
40019a44: c0 27 be e8 clr [ %fp + -280 ]
tmp_dirent.d_reclen = sizeof(struct dirent);
40019a48: c8 37 be f8 sth %g4, [ %fp + -264 ]
if (lfn_entries == 0 &&
40019a4c: 02 80 00 05 be 40019a60 <msdos_dir_read+0x2bc>
40019a50: c2 27 be ec st %g1, [ %fp + -276 ]
40019a54: 80 a4 a0 00 cmp %l2, 0
40019a58: 02 80 00 57 be 40019bb4 <msdos_dir_read+0x410>
<== ALWAYS TAKEN
40019a5c: 01 00 00 00 nop
size_t len = sizeof(tmp_dirent.d_name) - 1;
40019a60: 82 10 20 ff mov 0xff, %g1 ! ff <_TLS_Alignment+0xfe>
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
40019a64: 92 10 00 11 mov %l1, %o1
size_t len = sizeof(tmp_dirent.d_name) - 1;
40019a68: c2 27 be d4 st %g1, [ %fp + -300 ]
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
40019a6c: 7f ff e5 fd call 40013260 <msdos_format_dirent_with_dot>
40019a70: 90 10 00 13 mov %l3, %o0
eno = (*convert_handler->codepage_to_utf8) (
40019a74: c4 07 be bc ld [ %fp + -324 ], %g2
tmp_dirent.d_namlen = msdos_format_dirent_with_dot(
40019a78: d0 37 be fc sth %o0, [ %fp + -260 ]
eno = (*convert_handler->codepage_to_utf8) (
40019a7c: 94 0a 00 02 and %o0, %g2, %o2
40019a80: c2 05 a0 04 ld [ %l6 + 4 ], %g1
40019a84: d0 07 be c0 ld [ %fp + -320 ], %o0
40019a88: 98 07 be d4 add %fp, -300, %o4
40019a8c: 96 07 be fe add %fp, -258, %o3
40019a90: 9f c0 40 00 call %g1
40019a94: 92 10 00 13 mov %l3, %o1
if ( 0 == eno ) {
40019a98: a2 92 20 00 orcc %o0, 0, %l1
40019a9c: 12 80 00 40 bne 40019b9c <msdos_dir_read+0x3f8>
<== NEVER TAKEN
40019aa0: c2 07 be d4 ld [ %fp + -300 ], %g1
tmp_dirent.d_name[len] = '\0';
40019aa4: 88 07 80 01 add %fp, %g1, %g4
tmp_dirent.d_namlen = len;
40019aa8: c2 37 be fc sth %g1, [ %fp + -260 ]
40019aac: b6 10 3f ff mov -1, %i3
tmp_dirent.d_name[len] = '\0';
40019ab0: c0 29 3e fe clrb [ %g4 + -258 ]
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
40019ab4: 94 10 21 18 mov 0x118, %o2
40019ab8: c2 07 a0 48 ld [ %fp + 0x48 ], %g1
40019abc: 90 00 40 1d add %g1, %i5, %o0
40019ac0: 40 00 08 88 call 4001bce0 <memcpy>
40019ac4: 92 07 be e8 add %fp, -280, %o1
iop->offset = iop->offset + sizeof(struct dirent);
40019ac8: d8 1e 20 08 ldd [ %i0 + 8 ], %o4
40019acc: 96 83 61 18 addcc %o5, 0x118, %o3
40019ad0: 94 43 20 00 addx %o4, 0, %o2
40019ad4: d4 3e 20 08 std %o2, [ %i0 + 8 ]
rc = fat_file_close(&fs_info->fat, tmp_fat_fd);
40019ad8: 90 10 00 15 mov %l5, %o0
40019adc: 7f ff df 8d call 40011910 <fat_file_close>
40019ae0: d2 07 be cc ld [ %fp + -308 ], %o1
cmpltd += (sizeof(struct dirent));
40019ae4: ba 07 61 18 add %i5, 0x118, %i5
if (rc != RC_OK)
40019ae8: 80 a2 20 00 cmp %o0, 0
40019aec: 12 80 00 11 bne 40019b30 <msdos_dir_read+0x38c>
<== NEVER TAKEN
40019af0: b4 06 be e8 add %i2, -280, %i2
if (count <= 0)
40019af4: 80 a6 a0 00 cmp %i2, 0
40019af8: 02 bf ff 8f be 40019934 <msdos_dir_read+0x190>
<== ALWAYS TAKEN
40019afc: 88 38 00 1d xnor %g0, %i5, %g4
for (i = 0; i < ret && cmpltd >= 0; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40019b00: 10 bf ff 81 b 40019904 <msdos_dir_read+0x160>
<== NOT EXECUTED
40019b04: ae 05 e0 20 add %l7, 0x20, %l7
<== NOT EXECUTED
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
40019b08: d6 07 be c4 ld [ %fp + -316 ], %o3
tmp_dirent.d_type = DT_REG;
40019b0c: c2 2f be fa stb %g1, [ %fp + -262 ]
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
40019b10: 98 07 be d0 add %fp, -304, %o4
40019b14: 94 10 20 01 mov 1, %o2
40019b18: 92 10 00 14 mov %l4, %o1
40019b1c: 7f ff df b2 call 400119e4 <fat_file_ioctl>
40019b20: 90 10 00 15 mov %l5, %o0
if (rc != RC_OK)
40019b24: 80 a2 20 00 cmp %o0, 0
40019b28: 02 bf ff b6 be 40019a00 <msdos_dir_read+0x25c>
<== ALWAYS TAKEN
40019b2c: c2 07 be d0 ld [ %fp + -304 ], %g1
40019b30: 82 10 00 08 mov %o0, %g1
<== NOT EXECUTED
40019b34: d0 07 be ac ld [ %fp + -340 ], %o0
<== NOT EXECUTED
40019b38: 7f ff ce 5d call 4000d4ac <_Mutex_recursive_Release>
<== NOT EXECUTED
40019b3c: ba 10 00 01 mov %g1, %i5
<== NOT EXECUTED
}
40019b40: 81 c7 e0 08 ret
<== NOT EXECUTED
40019b44: 91 e8 00 1d restore %g0, %i5, %o0
<== NOT EXECUTED
start--;
40019b48: a0 04 3f ff add %l0, -1, %l0
lfn_start = FAT_FILE_SHORT_NAME;
40019b4c: 10 bf ff 6d b 40019900 <msdos_dir_read+0x15c>
40019b50: b6 10 3f ff mov -1, %i3
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
40019b54: 80 88 60 40 btst 0x40, %g1
40019b58: 22 bf ff 6b be,a 40019904 <msdos_dir_read+0x160>
40019b5c: ae 05 e0 20 add %l7, 0x20, %l7
lfn_start =
40019b60: c4 07 be c4 ld [ %fp + -316 ], %g2
lfn_entries = (*MSDOS_DIR_ENTRY_TYPE(entry) &
40019b64: a4 08 60 3f and %g1, 0x3f, %l2
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
40019b68: c2 0c 60 0d ldub [ %l1 + 0xd ], %g1
40019b6c: c8 27 be a4 st %g4, [ %fp + -348 ]
lfn_start =
40019b70: b6 00 80 17 add %g2, %l7, %i3
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
40019b74: c2 2f be bb stb %g1, [ %fp + -325 ]
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
40019b78: 94 10 21 00 mov 0x100, %o2
40019b7c: 92 10 20 00 clr %o1
40019b80: 90 07 be fe add %fp, -258, %o0
40019b84: 40 00 08 93 call 4001bdd0 <memset>
40019b88: c0 27 be b4 clr [ %fp + -332 ]
lfn_start =
40019b8c: b7 36 e0 05 srl %i3, 5, %i3
is_first_entry = true;
40019b90: 96 10 20 01 mov 1, %o3
40019b94: 10 bf ff 51 b 400198d8 <msdos_dir_read+0x134>
40019b98: c8 07 be a4 ld [ %fp + -348 ], %g4
errno = eno;
40019b9c: 40 00 06 75 call 4001b570 <__errno>
<== NOT EXECUTED
40019ba0: b6 10 3f ff mov -1, %i3
<== NOT EXECUTED
40019ba4: e2 22 00 00 st %l1, [ %o0 ]
<== NOT EXECUTED
cmpltd = -1;
40019ba8: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
40019bac: 10 bf ff 55 b 40019900 <msdos_dir_read+0x15c>
<== NOT EXECUTED
40019bb0: 88 10 20 00 clr %g4
<== NOT EXECUTED
lfn_checksum == msdos_lfn_checksum(entry)) {
40019bb4: 7f ff e3 7f call 400129b0 <msdos_lfn_checksum>
40019bb8: 90 10 00 11 mov %l1, %o0
if (lfn_entries == 0 &&
40019bbc: c2 0f be bb ldub [ %fp + -325 ], %g1
40019bc0: 80 a2 00 01 cmp %o0, %g1
40019bc4: 12 bf ff a7 bne 40019a60 <msdos_dir_read+0x2bc>
<== NEVER TAKEN
40019bc8: 82 10 20 ff mov 0xff, %g1
size_t len = sizeof(tmp_dirent.d_name) - 1;
40019bcc: c2 27 be d4 st %g1, [ %fp + -300 ]
eno = (*convert_handler->utf16_to_utf8) (
40019bd0: 98 07 be d4 add %fp, -300, %o4
40019bd4: c2 05 a0 0c ld [ %l6 + 0xc ], %g1
40019bd8: d4 07 be b4 ld [ %fp + -332 ], %o2
40019bdc: d0 07 be c0 ld [ %fp + -320 ], %o0
40019be0: 96 07 be fe add %fp, -258, %o3
40019be4: 9f c0 40 00 call %g1
40019be8: 92 10 00 13 mov %l3, %o1
if (eno == 0) {
40019bec: 80 a2 20 00 cmp %o0, 0
40019bf0: 12 bf ff 9d bne 40019a64 <msdos_dir_read+0x2c0>
40019bf4: 82 10 20 ff mov 0xff, %g1
tmp_dirent.d_namlen = len;
40019bf8: c2 07 be d4 ld [ %fp + -300 ], %g1
tmp_dirent.d_name[len] = '\0';
40019bfc: 88 07 80 01 add %fp, %g1, %g4
tmp_dirent.d_namlen = len;
40019c00: c2 37 be fc sth %g1, [ %fp + -260 ]
tmp_dirent.d_name[len] = '\0';
40019c04: 10 bf ff ac b 40019ab4 <msdos_dir_read+0x310>
40019c08: c0 29 3e fe clrb [ %g4 + -258 ]
bts2rd = (FAT_FD_OF_ROOT_DIR(fat_fd) &&
40019c0c: c2 05 20 24 ld [ %l4 + 0x24 ], %g1
40019c10: 80 a0 60 00 cmp %g1, 0
40019c14: 32 bf ff 04 bne,a 40019824 <msdos_dir_read+0x80>
<== NEVER TAKEN
40019c18: c2 05 60 08 ld [ %l5 + 8 ], %g1
<== NOT EXECUTED
40019c1c: c2 0d 60 16 ldub [ %l5 + 0x16 ], %g1
40019c20: 80 88 60 03 btst 3, %g1
40019c24: 22 bf ff 00 be,a 40019824 <msdos_dir_read+0x80>
<== NEVER TAKEN
40019c28: c2 05 60 08 ld [ %l5 + 8 ], %g1
<== NOT EXECUTED
fat_fd->fat_file_size :
40019c2c: c2 05 20 18 ld [ %l4 + 0x18 ], %g1
40019c30: 10 bf fe fe b 40019828 <msdos_dir_read+0x84>
40019c34: c2 27 be b0 st %g1, [ %fp + -336 ]
40019c38: 7f ff ce 1d call 4000d4ac <_Mutex_recursive_Release>
<== NOT EXECUTED
40019c3c: d0 07 be ac ld [ %fp + -340 ], %o0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
40019c40: 40 00 06 4c call 4001b570 <__errno>
<== NOT EXECUTED
40019c44: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
40019c48: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
40019c4c: 10 bf ff 3c b 4001993c <msdos_dir_read+0x198>
<== NOT EXECUTED
40019c50: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
ssize_t cmpltd = 0;
40019c54: 10 bf ff 38 b 40019934 <msdos_dir_read+0x190>
<== NOT EXECUTED
40019c58: ba 10 20 00 clr %i5
<== NOT EXECUTED
40019ed8 <msdos_file_ftruncate>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately).
*/
int
msdos_file_ftruncate(rtems_libio_t *iop, off_t length)
{
40019ed8: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
40019edc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
40019ee0: f8 00 60 08 ld [ %g1 + 8 ], %i4
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
40019ee4: fa 06 20 18 ld [ %i0 + 0x18 ], %i5
40019ee8: b6 07 20 b0 add %i4, 0xb0, %i3
_Mutex_recursive_Acquire( mutex );
40019eec: 7f ff cd 4b call 4000d418 <_Mutex_recursive_Acquire>
40019ef0: 90 10 00 1b mov %i3, %o0
uint32_t old_length;
msdos_fs_lock(fs_info);
old_length = fat_fd->fat_file_size;
if (length < old_length) {
40019ef4: 82 10 20 00 clr %g1
40019ef8: 80 a0 40 19 cmp %g1, %i1
40019efc: 14 80 00 23 bg 40019f88 <msdos_file_ftruncate+0xb0>
<== NEVER TAKEN
40019f00: e0 07 60 18 ld [ %i5 + 0x18 ], %l0
40019f04: 02 80 00 1f be 40019f80 <msdos_file_ftruncate+0xa8>
<== ALWAYS TAKEN
40019f08: 80 a4 00 1a cmp %l0, %i2
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
} else {
uint32_t new_length;
rc = fat_file_extend(&fs_info->fat,
40019f0c: 98 07 bf fc add %fp, -4, %o4
<== NOT EXECUTED
40019f10: 96 10 00 1a mov %i2, %o3
40019f14: 94 10 20 01 mov 1, %o2
40019f18: 92 10 00 1d mov %i5, %o1
40019f1c: 7f ff de e7 call 40011ab8 <fat_file_extend>
40019f20: 90 10 00 1c mov %i4, %o0
fat_fd,
true,
length,
&new_length);
if (rc == RC_OK && length != new_length) {
40019f24: b0 92 20 00 orcc %o0, 0, %i0
40019f28: 12 80 00 12 bne 40019f70 <msdos_file_ftruncate+0x98>
<== NEVER TAKEN
40019f2c: 80 a6 00 19 cmp %i0, %i1
40019f30: 12 80 00 28 bne 40019fd0 <msdos_file_ftruncate+0xf8>
<== NEVER TAKEN
40019f34: c2 07 bf fc ld [ %fp + -4 ], %g1
40019f38: 80 a0 40 1a cmp %g1, %i2
40019f3c: 12 80 00 26 bne 40019fd4 <msdos_file_ftruncate+0xfc>
<== NEVER TAKEN
40019f40: 94 10 00 10 mov %l0, %o2
40019f44: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
40019f48: 82 10 60 02 or %g1, 2, %g1
fat_fd->fat_file_size = s;
40019f4c: f4 27 60 18 st %i2, [ %i5 + 0x18 ]
}
if (rc == RC_OK)
{
fat_file_set_file_size(fat_fd, length);
fat_file_set_ctime_mtime(fat_fd, time(NULL));
40019f50: 90 10 20 00 clr %o0
40019f54: 40 00 16 b1 call 4001fa18 <time>
40019f58: c2 2f 60 30 stb %g1, [ %i5 + 0x30 ]
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019f5c: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
40019f60: 82 10 60 02 or %g1, 2, %g1
fat_fd->ctime = t;
40019f64: d0 3f 60 40 std %o0, [ %i5 + 0x40 ]
fat_fd->mtime = t;
40019f68: d0 3f 60 48 std %o0, [ %i5 + 0x48 ]
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019f6c: c2 2f 60 30 stb %g1, [ %i5 + 0x30 ]
_Mutex_recursive_Release( mutex );
40019f70: 7f ff cd 4f call 4000d4ac <_Mutex_recursive_Release>
40019f74: 90 10 00 1b mov %i3, %o0
}
msdos_fs_unlock(fs_info);
return rc;
}
40019f78: 81 c7 e0 08 ret
40019f7c: 81 e8 00 00 restore
if (length < old_length) {
40019f80: 08 bf ff e4 bleu 40019f10 <msdos_file_ftruncate+0x38>
40019f84: 98 07 bf fc add %fp, -4, %o4
rc = fat_file_truncate(&fs_info->fat, fat_fd, length);
40019f88: 94 10 00 1a mov %i2, %o2
40019f8c: 92 10 00 1d mov %i5, %o1
40019f90: 7f ff de 1d call 40011804 <fat_file_truncate>
40019f94: 90 10 00 1c mov %i4, %o0
if (rc == RC_OK)
40019f98: b0 92 20 00 orcc %o0, 0, %i0
40019f9c: 12 bf ff f5 bne 40019f70 <msdos_file_ftruncate+0x98>
<== NEVER TAKEN
40019fa0: 90 10 20 00 clr %o0
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019fa4: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
40019fa8: 82 10 60 02 or %g1, 2, %g1
fat_fd->fat_file_size = s;
40019fac: f4 27 60 18 st %i2, [ %i5 + 0x18 ]
fat_file_set_ctime_mtime(fat_fd, time(NULL));
40019fb0: 40 00 16 9a call 4001fa18 <time>
40019fb4: c2 2f 60 30 stb %g1, [ %i5 + 0x30 ]
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019fb8: c2 0f 60 30 ldub [ %i5 + 0x30 ], %g1
40019fbc: 82 10 60 02 or %g1, 2, %g1
fat_fd->ctime = t;
40019fc0: d0 3f 60 40 std %o0, [ %i5 + 0x40 ]
fat_fd->mtime = t;
40019fc4: d0 3f 60 48 std %o0, [ %i5 + 0x48 ]
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019fc8: 10 bf ff ea b 40019f70 <msdos_file_ftruncate+0x98>
40019fcc: c2 2f 60 30 stb %g1, [ %i5 + 0x30 ]
fat_file_truncate(&fs_info->fat, fat_fd, old_length);
40019fd0: 94 10 00 10 mov %l0, %o2
<== NOT EXECUTED
40019fd4: 92 10 00 1d mov %i5, %o1
<== NOT EXECUTED
40019fd8: 7f ff de 0b call 40011804 <fat_file_truncate>
<== NOT EXECUTED
40019fdc: 90 10 00 1c mov %i4, %o0
<== NOT EXECUTED
errno = ENOSPC;
40019fe0: 40 00 05 64 call 4001b570 <__errno>
<== NOT EXECUTED
40019fe4: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40019fe8: 82 10 20 1c mov 0x1c, %g1
<== NOT EXECUTED
40019fec: 10 bf ff e1 b 40019f70 <msdos_file_ftruncate+0x98>
<== NOT EXECUTED
40019ff0: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40019ff4 <msdos_file_sync>:
* RETURNS:
* RC_OK on success, or -1 if error occured (errno set appropriately)
*/
int
msdos_file_sync(rtems_libio_t *iop)
{
40019ff4: 9d e3 bf a0 save %sp, -96, %sp
int rc = RC_OK;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
40019ff8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
40019ffc: fa 00 60 08 ld [ %g1 + 8 ], %i5
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
4001a000: f6 06 20 18 ld [ %i0 + 0x18 ], %i3
4001a004: b8 07 60 b0 add %i5, 0xb0, %i4
_Mutex_recursive_Acquire( mutex );
4001a008: 7f ff cd 04 call 4000d418 <_Mutex_recursive_Acquire>
4001a00c: 90 10 00 1c mov %i4, %o0
msdos_fs_lock(fs_info);
rc = fat_file_update(&fs_info->fat, fat_fd);
4001a010: 92 10 00 1b mov %i3, %o1
4001a014: 7f ff dd 5f call 40011590 <fat_file_update>
4001a018: 90 10 00 1d mov %i5, %o0
if (rc != RC_OK)
4001a01c: b0 92 20 00 orcc %o0, 0, %i0
4001a020: 12 80 00 04 bne 4001a030 <msdos_file_sync+0x3c>
<== NEVER TAKEN
4001a024: 01 00 00 00 nop
{
msdos_fs_unlock(fs_info);
return rc;
}
rc = fat_sync(&fs_info->fat);
4001a028: 7f ff d9 a1 call 400106ac <fat_sync>
4001a02c: 90 10 00 1d mov %i5, %o0
_Mutex_recursive_Release( mutex );
4001a030: 7f ff cd 1f call 4000d4ac <_Mutex_recursive_Release>
4001a034: 90 10 00 1c mov %i4, %o0
msdos_fs_unlock(fs_info);
return RC_OK;
}
4001a038: 81 c7 e0 08 ret
4001a03c: 81 e8 00 00 restore
40019d48 <msdos_file_write>:
* the number of bytes written on success, or -1 if error occured
* and errno set appropriately
*/
ssize_t
msdos_file_write(rtems_libio_t *iop,const void *buffer, size_t count)
{
40019d48: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
msdos_fs_info_t *fs_info = iop->pathinfo.mt_entry->fs_info;
40019d4c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
40019d50: f6 00 60 08 ld [ %g1 + 8 ], %i3
fat_file_fd_t *fat_fd = iop->pathinfo.node_access;
40019d54: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
40019d58: a0 06 e0 b0 add %i3, 0xb0, %l0
_Mutex_recursive_Acquire( mutex );
40019d5c: 7f ff cd af call 4000d418 <_Mutex_recursive_Acquire>
40019d60: 90 10 00 10 mov %l0, %o0
{
40019d64: ba 10 00 18 mov %i0, %i5
40019d68: c2 06 00 00 ld [ %i0 ], %g1
msdos_fs_lock(fs_info);
if (rtems_libio_iop_is_append(iop))
40019d6c: 80 88 62 00 btst 0x200, %g1
40019d70: 32 80 00 24 bne,a 40019e00 <msdos_file_write+0xb8>
40019d74: d4 07 20 18 ld [ %i4 + 0x18 ], %o2
40019d78: d4 06 20 0c ld [ %i0 + 0xc ], %o2
iop->offset = fat_fd->fat_file_size;
ret = fat_file_write(&fs_info->fat, fat_fd, iop->offset, count,
40019d7c: 98 10 00 19 mov %i1, %o4
40019d80: 96 10 00 1a mov %i2, %o3
40019d84: 92 10 00 1c mov %i4, %o1
40019d88: 7f ff df e8 call 40011d28 <fat_file_write>
40019d8c: 90 10 00 1b mov %i3, %o0
buffer);
if (ret < 0)
40019d90: b0 92 20 00 orcc %o0, 0, %i0
40019d94: 06 80 00 25 bl 40019e28 <msdos_file_write+0xe0>
40019d98: 85 3e 20 1f sra %i0, 0x1f, %g2
/*
* update file size in both fat-file descriptor and file control block if
* file was extended
*/
iop->offset += ret;
40019d9c: f4 1f 60 08 ldd [ %i5 + 8 ], %i2
40019da0: 9a 86 00 1b addcc %i0, %i3, %o5
40019da4: 98 40 80 1a addx %g2, %i2, %o4
40019da8: d8 3f 60 08 std %o4, [ %i5 + 8 ]
if (iop->offset > fat_fd->fat_file_size)
40019dac: 80 a3 20 00 cmp %o4, 0
40019db0: 04 80 00 17 ble 40019e0c <msdos_file_write+0xc4>
<== ALWAYS TAKEN
40019db4: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019db8: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
<== NOT EXECUTED
40019dbc: 82 10 60 02 or %g1, 2, %g1
fat_file_set_file_size(fat_fd, (uint32_t) iop->offset);
40019dc0: da 27 20 18 st %o5, [ %i4 + 0x18 ]
40019dc4: c2 2f 20 30 stb %g1, [ %i4 + 0x30 ]
if (ret > 0)
40019dc8: 80 a6 20 00 cmp %i0, 0
40019dcc: 02 80 00 09 be 40019df0 <msdos_file_write+0xa8>
<== NEVER TAKEN
40019dd0: 01 00 00 00 nop
fat_file_set_ctime_mtime(fat_fd, time(NULL));
40019dd4: 40 00 17 11 call 4001fa18 <time>
40019dd8: 90 10 20 00 clr %o0 ! 0 <PROM_START>
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019ddc: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
40019de0: 82 10 60 02 or %g1, 2, %g1
fat_fd->ctime = t;
40019de4: d0 3f 20 40 std %o0, [ %i4 + 0x40 ]
fat_fd->mtime = t;
40019de8: d0 3f 20 48 std %o0, [ %i4 + 0x48 ]
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019dec: c2 2f 20 30 stb %g1, [ %i4 + 0x30 ]
_Mutex_recursive_Release( mutex );
40019df0: 7f ff cd af call 4000d4ac <_Mutex_recursive_Release>
40019df4: 90 10 00 10 mov %l0, %o0
msdos_fs_unlock(fs_info);
return ret;
}
40019df8: 81 c7 e0 08 ret
40019dfc: 81 e8 00 00 restore
iop->offset = fat_fd->fat_file_size;
40019e00: d4 26 20 0c st %o2, [ %i0 + 0xc ]
40019e04: 10 bf ff de b 40019d7c <msdos_file_write+0x34>
40019e08: c0 26 20 08 clr [ %i0 + 8 ]
if (iop->offset > fat_fd->fat_file_size)
40019e0c: 12 bf ff f0 bne 40019dcc <msdos_file_write+0x84>
<== NEVER TAKEN
40019e10: 80 a6 20 00 cmp %i0, 0
40019e14: 80 a3 40 01 cmp %o5, %g1
40019e18: 08 bf ff ed bleu 40019dcc <msdos_file_write+0x84>
40019e1c: 80 a6 20 00 cmp %i0, 0
fat_fd->flags |= FAT_FILE_META_DATA_CHANGED;
40019e20: 10 bf ff e7 b 40019dbc <msdos_file_write+0x74>
40019e24: c2 0f 20 30 ldub [ %i4 + 0x30 ], %g1
return -1;
40019e28: b0 10 3f ff mov -1, %i0
40019e2c: 7f ff cd a0 call 4000d4ac <_Mutex_recursive_Release>
40019e30: 90 10 00 10 mov %l0, %o0
40019e34: 81 c7 e0 08 ret
40019e38: 81 e8 00 00 restore
4001902c <msdos_filename_utf8_to_long_name_for_compare>:
rtems_dosfs_convert_control *converter,
const uint8_t *utf8_name,
const size_t utf8_name_size,
uint8_t *long_name,
const size_t long_name_size)
{
4001902c: 9d e3 bf 98 save %sp, -104, %sp
ssize_t returned_size = 0;
int eno = 0;
size_t name_size;
size_t dest_size = long_name_size;
40019030: f8 27 bf fc st %i4, [ %fp + -4 ]
returned_size = msdos_filename_process_dot_names (
40019034: 96 10 00 1c mov %i4, %o3
40019038: 94 10 00 1b mov %i3, %o2
4001903c: 92 10 00 1a mov %i2, %o1
40019040: 7f ff ff 1f call 40018cbc <msdos_filename_process_dot_names>
40019044: 90 10 00 19 mov %i1, %o0
utf8_name,
utf8_name_size,
long_name,
long_name_size);
if (returned_size == 0) {
40019048: 80 a2 20 00 cmp %o0, 0
4001904c: 12 80 00 12 bne 40019094 <msdos_filename_utf8_to_long_name_for_compare+0x68>
<== NEVER TAKEN
40019050: 94 10 00 1a mov %i2, %o2
for ( i = size_returned - UTF8_FULL_STOP_SIZE;
40019054: 80 a6 a0 00 cmp %i2, 0
40019058: 14 80 00 15 bg 400190ac <msdos_filename_utf8_to_long_name_for_compare+0x80>
<== ALWAYS TAKEN
4001905c: 82 06 bf ff add %i2, -1, %g1
name_size = msdos_filename_delete_trailing_dots (
&utf8_name[0],
utf8_name_size);
if (name_size > 0) {
40019060: 80 a2 a0 00 cmp %o2, 0
<== NOT EXECUTED
40019064: 02 80 00 18 be 400190c4 <msdos_filename_utf8_to_long_name_for_compare+0x98>
<== NEVER TAKEN
40019068: 98 07 bf fc add %fp, -4, %o4
eno = (*converter->handler->utf8_normalize_and_fold) (
4001906c: c2 06 00 00 ld [ %i0 ], %g1
40019070: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
40019074: 96 10 00 1b mov %i3, %o3
40019078: 92 10 00 19 mov %i1, %o1
4001907c: 9f c0 40 00 call %g1
40019080: 90 10 00 18 mov %i0, %o0
converter,
utf8_name,
name_size,
long_name,
&dest_size);
if (eno == 0) {
40019084: ba 92 20 00 orcc %o0, 0, %i5
40019088: 12 80 00 10 bne 400190c8 <msdos_filename_utf8_to_long_name_for_compare+0x9c>
<== NEVER TAKEN
4001908c: 01 00 00 00 nop
returned_size = (ssize_t)dest_size;
40019090: d0 07 bf fc ld [ %fp + -4 ], %o0
errno = eno;
returned_size = -1;
}
return returned_size;
}
40019094: 81 c7 e0 08 ret
40019098: 91 e8 00 08 restore %g0, %o0, %o0
i -= UTF8_FULL_STOP_SIZE;
4001909c: 82 00 7f ff add %g1, -1, %g1
for ( i = size_returned - UTF8_FULL_STOP_SIZE;
400190a0: 80 a0 7f ff cmp %g1, -1
400190a4: 02 bf ff f0 be 40019064 <msdos_filename_utf8_to_long_name_for_compare+0x38>
<== NEVER TAKEN
400190a8: 80 a2 a0 00 cmp %o2, 0
&& filename_utf8[i] == UTF8_FULL_STOP;) {
400190ac: c4 0e 40 01 ldub [ %i1 + %g1 ], %g2
400190b0: 80 a0 a0 2e cmp %g2, 0x2e
400190b4: 22 bf ff fa be,a 4001909c <msdos_filename_utf8_to_long_name_for_compare+0x70>
400190b8: 94 10 00 01 mov %g1, %o2
if (name_size > 0) {
400190bc: 10 bf ff ea b 40019064 <msdos_filename_utf8_to_long_name_for_compare+0x38>
400190c0: 80 a2 a0 00 cmp %o2, 0
eno = EINVAL;
400190c4: ba 10 20 16 mov 0x16, %i5
<== NOT EXECUTED
errno = eno;
400190c8: 40 00 09 2a call 4001b570 <__errno>
<== NOT EXECUTED
400190cc: 01 00 00 00 nop
<== NOT EXECUTED
400190d0: fa 22 00 00 st %i5, [ %o0 ]
<== NOT EXECUTED
return returned_size;
400190d4: 10 bf ff f0 b 40019094 <msdos_filename_utf8_to_long_name_for_compare+0x68>
<== NOT EXECUTED
400190d8: 90 10 3f ff mov -1, %o0
<== NOT EXECUTED
4001921c <msdos_filename_utf8_to_long_name_for_save>:
rtems_dosfs_convert_control *converter,
const uint8_t *utf8_name,
const size_t utf8_name_size,
uint16_t *long_name,
const size_t long_name_size)
{
4001921c: 9d e3 bf 98 save %sp, -104, %sp
size_t name_size_tmp;
int i;
uint16_t c;
unsigned int chars_written;
name_size_tmp = long_name_size;
40019220: f8 27 bf fc st %i4, [ %fp + -4 ]
for ( i = size_returned - UTF8_FULL_STOP_SIZE;
40019224: 80 a6 a0 00 cmp %i2, 0
40019228: 14 80 00 07 bg 40019244 <msdos_filename_utf8_to_long_name_for_save+0x28>
<== ALWAYS TAKEN
4001922c: 82 06 bf ff add %i2, -1, %g1
40019230: 30 80 00 0a b,a 40019258 <msdos_filename_utf8_to_long_name_for_save+0x3c>
<== NOT EXECUTED
i -= UTF8_FULL_STOP_SIZE;
40019234: 82 00 7f ff add %g1, -1, %g1
for ( i = size_returned - UTF8_FULL_STOP_SIZE;
40019238: 80 a0 7f ff cmp %g1, -1
4001923c: 02 80 00 07 be 40019258 <msdos_filename_utf8_to_long_name_for_save+0x3c>
<== NEVER TAKEN
40019240: 80 a6 a0 00 cmp %i2, 0
&& filename_utf8[i] == UTF8_FULL_STOP;) {
40019244: c4 0e 40 01 ldub [ %i1 + %g1 ], %g2
40019248: 80 a0 a0 2e cmp %g2, 0x2e
4001924c: 22 bf ff fa be,a 40019234 <msdos_filename_utf8_to_long_name_for_save+0x18>
40019250: b4 10 00 01 mov %g1, %i2
name_size = msdos_filename_delete_trailing_dots (
&utf8_name[0],
utf8_name_size);
if (name_size > 0) {
40019254: 80 a6 a0 00 cmp %i2, 0
40019258: 02 80 00 65 be 400193ec <msdos_filename_utf8_to_long_name_for_save+0x1d0>
<== NEVER TAKEN
4001925c: 98 07 bf fc add %fp, -4, %o4
/*
* Finally convert from UTF-8 to UTF-16
*/
eno = (*converter->handler->utf8_to_utf16) (
40019260: c2 06 00 00 ld [ %i0 ], %g1
40019264: c2 00 60 08 ld [ %g1 + 8 ], %g1
40019268: 96 10 00 1b mov %i3, %o3
4001926c: 94 10 00 1a mov %i2, %o2
40019270: 92 10 00 19 mov %i1, %o1
40019274: 9f c0 40 00 call %g1
40019278: 90 10 00 18 mov %i0, %o0
converter,
utf8_name,
name_size,
&long_name[0],
&name_size_tmp);
if (eno == 0) {
4001927c: ba 92 20 00 orcc %o0, 0, %i5
40019280: 12 80 00 3c bne 40019370 <msdos_filename_utf8_to_long_name_for_save+0x154>
<== NEVER TAKEN
40019284: c8 07 bf fc ld [ %fp + -4 ], %g4
if (name_size_tmp <= (MSDOS_NAME_MAX_LNF_LEN * MSDOS_NAME_LFN_BYTES_PER_CHAR))
40019288: 80 a1 21 fe cmp %g4, 0x1fe
4001928c: 38 80 00 39 bgu,a 40019370 <msdos_filename_utf8_to_long_name_for_save+0x154>
40019290: ba 10 20 5b mov 0x5b, %i5
if ( eno == 0 )
{
/*
* Validate the characters and assign them to the UTF-16 file name
*/
for ( i = 0;
40019294: 80 a1 20 00 cmp %g4, 0
40019298: 02 80 00 57 be 400193f4 <msdos_filename_utf8_to_long_name_for_save+0x1d8>
<== NEVER TAKEN
4001929c: 86 10 00 1b mov %i3, %g3
retval = codepage_valid_char_map[char_num];
400192a0: 1f 10 00 9a sethi %hi(0x40026800), %o7
switch ( char_num )
400192a4: 31 10 00 64 sethi %hi(0x40019000), %i0
retval = codepage_valid_char_map[char_num];
400192a8: 9e 13 e3 68 or %o7, 0x368, %o7
switch ( char_num )
400192ac: b0 16 20 dc or %i0, 0xdc, %i0
uint16_t char_num = CF_LE_W( utf16_character );
400192b0: c4 10 c0 00 lduh [ %g3 ], %g2
400192b4: 83 28 a0 08 sll %g2, 8, %g1
400192b8: 85 28 a0 10 sll %g2, 0x10, %g2
400192bc: 85 30 a0 18 srl %g2, 0x18, %g2
400192c0: 82 10 40 02 or %g1, %g2, %g1
if ( char_num <= 0x00ff ) {
400192c4: b5 28 60 10 sll %g1, 0x10, %i2
400192c8: b3 36 a0 10 srl %i2, 0x10, %i1
400192cc: 80 a6 60 ff cmp %i1, 0xff
400192d0: 18 80 00 0d bgu 40019304 <msdos_filename_utf8_to_long_name_for_save+0xe8>
400192d4: 84 10 00 01 mov %g1, %g2
switch ( char_num )
400192d8: 82 00 7f d5 add %g1, -43, %g1
400192dc: 83 28 60 10 sll %g1, 0x10, %g1
400192e0: 83 30 60 10 srl %g1, 0x10, %g1
400192e4: 80 a0 60 4f cmp %g1, 0x4f
400192e8: 18 80 00 05 bgu 400192fc <msdos_filename_utf8_to_long_name_for_save+0xe0>
400192ec: 83 28 60 02 sll %g1, 2, %g1
400192f0: c2 06 00 01 ld [ %i0 + %g1 ], %g1
400192f4: 81 c0 40 00 jmp %g1
400192f8: 01 00 00 00 nop
400192fc: b5 36 a0 10 srl %i2, 0x10, %i2
retval = codepage_valid_char_map[char_num];
40019300: c4 0b c0 1a ldub [ %o7 + %i2 ], %g2
return CT_LE_W( retval );
40019304: 83 28 a0 08 sll %g2, 8, %g1
40019308: 85 28 a0 10 sll %g2, 0x10, %g2
4001930c: 85 30 a0 18 srl %g2, 0x18, %g2
40019310: 84 10 40 02 or %g1, %g2, %g2
name_size
&& (c = msdos_get_valid_utf16_filename_character ( long_name[i]) );
40019314: 83 28 a0 10 sll %g2, 0x10, %g1
40019318: 80 a0 60 00 cmp %g1, 0
4001931c: 02 80 00 1a be 40019384 <msdos_filename_utf8_to_long_name_for_save+0x168>
40019320: 80 a1 20 02 cmp %g4, 2
++i ) {
long_name[i] = c;
40019324: c4 30 c0 00 sth %g2, [ %g3 ]
returned_size += MSDOS_NAME_LFN_BYTES_PER_CHAR;
40019328: ba 07 60 02 add %i5, 2, %i5
for ( i = 0;
4001932c: 88 81 3f fe addcc %g4, -2, %g4
40019330: 12 bf ff e0 bne 400192b0 <msdos_filename_utf8_to_long_name_for_save+0x94>
40019334: 86 00 e0 02 add %g3, 2, %g3
40019338: 85 3f 60 01 sra %i5, 1, %g2
4001933c: 83 28 a0 01 sll %g2, 1, %g1
40019340: 82 00 7f fe add %g1, -2, %g1
returned_size += MSDOS_NAME_LFN_BYTES_PER_CHAR;
}
else if ( name_size != 0 )
eno = EINVAL;
chars_written = returned_size / MSDOS_NAME_LFN_BYTES_PER_CHAR;
if ( long_name [chars_written - 1] != UTF16_NULL
40019344: c2 16 c0 01 lduh [ %i3 + %g1 ], %g1
40019348: 80 a0 60 00 cmp %g1, 0
4001934c: 02 80 00 2d be 40019400 <msdos_filename_utf8_to_long_name_for_save+0x1e4>
<== NEVER TAKEN
40019350: 82 07 60 02 add %i5, 2, %g1
&& (returned_size + UTF16_NULL_SIZE ) <= long_name_size ) {
40019354: 80 a0 40 1c cmp %g1, %i4
40019358: 18 80 00 04 bgu 40019368 <msdos_filename_utf8_to_long_name_for_save+0x14c>
<== NEVER TAKEN
4001935c: b0 10 00 1d mov %i5, %i0
long_name[chars_written] = UTF16_NULL;
40019360: 85 28 a0 01 sll %g2, 1, %g2
40019364: c0 36 c0 02 clrh [ %i3 + %g2 ]
40019368: 81 c7 e0 08 ret
4001936c: 81 e8 00 00 restore
}
else
eno = EINVAL;
if ( eno != 0 ) {
errno = eno;
40019370: 40 00 08 80 call 4001b570 <__errno>
40019374: b0 10 3f ff mov -1, %i0
40019378: fa 22 00 00 st %i5, [ %o0 ]
4001937c: 81 c7 e0 08 ret
40019380: 81 e8 00 00 restore
if ( name_size == UTF16_NULL_SIZE && c == UTF16_NULL ) {
40019384: 12 80 00 0c bne 400193b4 <msdos_filename_utf8_to_long_name_for_save+0x198>
<== ALWAYS TAKEN
40019388: b0 07 60 02 add %i5, 2, %i0
long_name[i] = c;
4001938c: c0 30 c0 00 clrh [ %g3 ]
<== NOT EXECUTED
chars_written = returned_size / MSDOS_NAME_LFN_BYTES_PER_CHAR;
40019390: 85 3e 20 01 sra %i0, 1, %g2
<== NOT EXECUTED
if ( long_name [chars_written - 1] != UTF16_NULL
40019394: 83 28 a0 01 sll %g2, 1, %g1
<== NOT EXECUTED
40019398: 82 00 7f fe add %g1, -2, %g1
<== NOT EXECUTED
4001939c: c2 16 c0 01 lduh [ %i3 + %g1 ], %g1
<== NOT EXECUTED
400193a0: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
400193a4: 12 80 00 19 bne 40019408 <msdos_filename_utf8_to_long_name_for_save+0x1ec>
<== NOT EXECUTED
400193a8: ba 07 60 04 add %i5, 4, %i5
<== NOT EXECUTED
returned_size = -1;
}
return returned_size;
}
400193ac: 81 c7 e0 08 ret
<== NOT EXECUTED
400193b0: 81 e8 00 00 restore
<== NOT EXECUTED
400193b4: 85 3f 60 01 sra %i5, 1, %g2
if ( long_name [chars_written - 1] != UTF16_NULL
400193b8: 83 28 a0 01 sll %g2, 1, %g1
400193bc: 82 00 7f fe add %g1, -2, %g1
400193c0: c2 16 c0 01 lduh [ %i3 + %g1 ], %g1
400193c4: 80 a0 60 00 cmp %g1, 0
400193c8: 22 bf ff ea be,a 40019370 <msdos_filename_utf8_to_long_name_for_save+0x154>
<== NEVER TAKEN
400193cc: ba 10 20 16 mov 0x16, %i5
<== NOT EXECUTED
&& (returned_size + UTF16_NULL_SIZE ) <= long_name_size ) {
400193d0: ba 07 60 02 add %i5, 2, %i5
400193d4: 80 a7 40 1c cmp %i5, %i4
400193d8: 18 bf ff e6 bgu 40019370 <msdos_filename_utf8_to_long_name_for_save+0x154>
<== NEVER TAKEN
400193dc: ba 10 20 16 mov 0x16, %i5
long_name[chars_written] = UTF16_NULL;
400193e0: 85 28 a0 01 sll %g2, 1, %g2
400193e4: 10 bf ff e3 b 40019370 <msdos_filename_utf8_to_long_name_for_save+0x154>
400193e8: c0 36 c0 02 clrh [ %i3 + %g2 ]
eno = EINVAL;
400193ec: 10 bf ff e1 b 40019370 <msdos_filename_utf8_to_long_name_for_save+0x154>
<== NOT EXECUTED
400193f0: ba 10 20 16 mov 0x16, %i5
<== NOT EXECUTED
for ( i = 0;
400193f4: 84 10 20 00 clr %g2
<== NOT EXECUTED
400193f8: 10 bf ff d3 b 40019344 <msdos_filename_utf8_to_long_name_for_save+0x128>
<== NOT EXECUTED
400193fc: 82 10 3f fe mov -2, %g1
<== NOT EXECUTED
}
40019400: 81 c7 e0 08 ret
<== NOT EXECUTED
40019404: 91 e8 00 1d restore %g0, %i5, %o0
<== NOT EXECUTED
&& (returned_size + UTF16_NULL_SIZE ) <= long_name_size ) {
40019408: 80 a7 00 1d cmp %i4, %i5
<== NOT EXECUTED
4001940c: 1a bf ff d6 bcc 40019364 <msdos_filename_utf8_to_long_name_for_save+0x148>
<== NOT EXECUTED
40019410: 85 28 a0 01 sll %g2, 1, %g2
<== NOT EXECUTED
40019414: 81 c7 e0 08 ret
<== NOT EXECUTED
40019418: 81 e8 00 00 restore
<== NOT EXECUTED
4001941c <msdos_filename_utf8_to_short_name_for_compare>:
rtems_dosfs_convert_control *converter,
const uint8_t *utf8_name,
const size_t utf8_name_size,
void *short_name,
const size_t short_name_size)
{
4001941c: 9d e3 bf 68 save %sp, -152, %sp
int eno = 0;
const uint8_t *name_ptr = utf8_name;
char *dest_ptr = (char*)short_name;
size_t name_size = utf8_name_size;
uint8_t name_normalized_buf[(MSDOS_SHORT_NAME_LEN +1) * MSDOS_NAME_MAX_UTF8_BYTES_PER_CHAR];
size_t name_size_tmp = sizeof(name_normalized_buf);
40019420: 82 10 20 30 mov 0x30, %g1
returned_size = msdos_filename_process_dot_names (
40019424: 96 10 00 1c mov %i4, %o3
size_t name_size_tmp = sizeof(name_normalized_buf);
40019428: c2 27 bf cc st %g1, [ %fp + -52 ]
returned_size = msdos_filename_process_dot_names (
4001942c: 94 10 00 1b mov %i3, %o2
40019430: 92 10 00 1a mov %i2, %o1
40019434: 7f ff fe 22 call 40018cbc <msdos_filename_process_dot_names>
40019438: 90 10 00 19 mov %i1, %o0
utf8_name,
utf8_name_size,
short_name,
short_name_size);
if (returned_size == 0) {
4001943c: ba 92 20 00 orcc %o0, 0, %i5
40019440: 12 80 00 1e bne 400194b8 <msdos_filename_utf8_to_short_name_for_compare+0x9c>
40019444: 80 a6 a0 00 cmp %i2, 0
while ( *name_size >= UTF8_FULL_STOP_SIZE
40019448: 32 80 00 07 bne,a 40019464 <msdos_filename_utf8_to_short_name_for_compare+0x48>
<== ALWAYS TAKEN
4001944c: c2 0e 40 00 ldub [ %i1 ], %g1
if ( eno == 0 ) {
memcpy (&dest_ptr[0], &name_ptr[0], name_size);
returned_size = name_size;
}
} else
eno = EINVAL;
40019450: 10 80 00 17 b 400194ac <msdos_filename_utf8_to_short_name_for_compare+0x90>
<== NOT EXECUTED
40019454: b8 10 20 16 mov 0x16, %i4
<== NOT EXECUTED
while ( *name_size >= UTF8_FULL_STOP_SIZE
40019458: 02 bf ff fe be 40019450 <msdos_filename_utf8_to_short_name_for_compare+0x34>
<== NOT EXECUTED
4001945c: b2 06 60 01 inc %i1
<== NOT EXECUTED
&& **name_utf8 == UTF8_FULL_STOP) {
40019460: c2 0e 40 00 ldub [ %i1 ], %g1
<== NOT EXECUTED
40019464: 80 a0 60 2e cmp %g1, 0x2e
40019468: 22 bf ff fc be,a 40019458 <msdos_filename_utf8_to_short_name_for_compare+0x3c>
<== NEVER TAKEN
4001946c: b4 86 bf ff addcc %i2, -1, %i2
<== NOT EXECUTED
eno = (*converter->handler->utf8_normalize_and_fold) (
40019470: c2 06 00 00 ld [ %i0 ], %g1
40019474: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
40019478: 98 07 bf cc add %fp, -52, %o4
4001947c: 96 07 bf d0 add %fp, -48, %o3
40019480: 94 10 00 1a mov %i2, %o2
40019484: 92 10 00 19 mov %i1, %o1
40019488: 9f c0 40 00 call %g1
4001948c: 90 10 00 18 mov %i0, %o0
name_size = name_size_tmp;
40019490: fa 07 bf cc ld [ %fp + -52 ], %i5
if ( eno == ENOMEM ) {
40019494: 80 a2 20 0c cmp %o0, 0xc
40019498: 02 80 00 0a be 400194c0 <msdos_filename_utf8_to_short_name_for_compare+0xa4>
<== NEVER TAKEN
4001949c: b8 10 00 08 mov %o0, %i4
if ( eno == 0 ) {
400194a0: 80 a7 20 00 cmp %i4, 0
400194a4: 02 80 00 08 be 400194c4 <msdos_filename_utf8_to_short_name_for_compare+0xa8>
<== ALWAYS TAKEN
400194a8: 94 10 00 1d mov %i5, %o2
}
if ( eno != 0 ) {
errno = eno;
400194ac: 40 00 08 31 call 4001b570 <__errno>
<== NOT EXECUTED
400194b0: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
400194b4: f8 22 00 00 st %i4, [ %o0 ]
<== NOT EXECUTED
returned_size = -1;
}
return returned_size;
}
400194b8: 81 c7 e0 08 ret
400194bc: 91 e8 00 1d restore %g0, %i5, %o0
memcpy (&dest_ptr[0], &name_ptr[0], name_size);
400194c0: 94 10 00 1d mov %i5, %o2
<== NOT EXECUTED
400194c4: 92 07 bf d0 add %fp, -48, %o1
400194c8: 90 10 00 1b mov %i3, %o0
400194cc: 40 00 0a 05 call 4001bce0 <memcpy>
400194d0: b0 10 00 1d mov %i5, %i0
}
400194d4: 81 c7 e0 08 ret
400194d8: 81 e8 00 00 restore
400194dc <msdos_filename_utf8_to_short_name_for_save>:
rtems_dosfs_convert_control *converter,
const uint8_t *utf8_name,
const size_t utf8_name_size,
void *short_name,
const size_t short_name_size)
{
400194dc: 9d e3 bf 88 save %sp, -120, %sp
char *dest_ptr = (char*)short_name;
unsigned int i;
size_t name_size_tmp;
char name_to_format_buf[MSDOS_SHORT_NAME_LEN +1];
returned_size = msdos_filename_process_dot_names (
400194e0: 94 10 00 1b mov %i3, %o2
400194e4: 96 10 00 1c mov %i4, %o3
400194e8: 92 10 00 1a mov %i2, %o1
400194ec: 7f ff fd f4 call 40018cbc <msdos_filename_process_dot_names>
400194f0: 90 10 00 19 mov %i1, %o0
utf8_name,
utf8_name_size,
short_name,
short_name_size);
if (returned_size == 0) {
400194f4: ba 92 20 00 orcc %o0, 0, %i5
400194f8: 12 80 00 08 bne 40019518 <msdos_filename_utf8_to_short_name_for_save+0x3c>
<== NEVER TAKEN
400194fc: 80 a6 a0 00 cmp %i2, 0
while ( *name_size >= UTF8_FULL_STOP_SIZE
40019500: 32 80 00 0b bne,a 4001952c <msdos_filename_utf8_to_short_name_for_save+0x50>
<== ALWAYS TAKEN
40019504: c2 0e 40 00 ldub [ %i1 ], %g1
else
eno = EINVAL;
}
if ( eno != 0 ) {
errno = eno;
40019508: 40 00 08 1a call 4001b570 <__errno>
<== NOT EXECUTED
4001950c: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
40019510: 82 10 20 16 mov 0x16, %g1
<== NOT EXECUTED
40019514: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
return -1;
}
return returned_size;
}
40019518: 81 c7 e0 08 ret
4001951c: 91 e8 00 1d restore %g0, %i5, %o0
while ( *name_size >= UTF8_FULL_STOP_SIZE
40019520: 02 bf ff fa be 40019508 <msdos_filename_utf8_to_short_name_for_save+0x2c>
<== NOT EXECUTED
40019524: b2 06 60 01 inc %i1
<== NOT EXECUTED
&& **name_utf8 == UTF8_FULL_STOP) {
40019528: c2 0e 40 00 ldub [ %i1 ], %g1
<== NOT EXECUTED
4001952c: 80 a0 60 2e cmp %g1, 0x2e
40019530: 22 bf ff fc be,a 40019520 <msdos_filename_utf8_to_short_name_for_save+0x44>
<== NEVER TAKEN
40019534: b4 86 bf ff addcc %i2, -1, %i2
<== NOT EXECUTED
eno = (*converter->handler->utf8_to_codepage) (
40019538: c2 06 00 00 ld [ %i0 ], %g1
name_size_tmp = sizeof ( name_to_format_buf );
4001953c: 84 10 20 0c mov 0xc, %g2
40019540: c4 27 bf ec st %g2, [ %fp + -20 ]
eno = (*converter->handler->utf8_to_codepage) (
40019544: 94 10 00 1a mov %i2, %o2
40019548: c2 00 40 00 ld [ %g1 ], %g1
4001954c: a0 07 bf f0 add %fp, -16, %l0
40019550: 98 07 bf ec add %fp, -20, %o4
40019554: 96 10 00 10 mov %l0, %o3
40019558: 92 10 00 19 mov %i1, %o1
4001955c: 9f c0 40 00 call %g1
40019560: 90 10 00 18 mov %i0, %o0
name_size = name_size_tmp;
40019564: f4 07 bf ec ld [ %fp + -20 ], %i2
for (i = 0; i < name_size; ++i)
40019568: 80 a6 a0 00 cmp %i2, 0
4001956c: 02 bf ff eb be 40019518 <msdos_filename_utf8_to_short_name_for_save+0x3c>
<== NEVER TAKEN
40019570: 09 10 00 9b sethi %hi(0x40026c00), %g4
40019574: 82 10 20 00 clr %g1
40019578: 10 80 00 03 b 40019584 <msdos_filename_utf8_to_short_name_for_save+0xa8>
4001957c: 88 11 23 a1 or %g4, 0x3a1, %g4
40019580: 82 10 00 02 mov %g2, %g1
40019584: c6 0c 00 01 ldub [ %l0 + %g1 ], %g3
name_to_format_buf[i] = toupper ( (unsigned char)(name_to_format_buf[i]) );
40019588: c4 09 00 03 ldub [ %g4 + %g3 ], %g2
4001958c: 84 08 a0 03 and %g2, 3, %g2
40019590: 80 a0 a0 02 cmp %g2, 2
40019594: 22 80 00 02 be,a 4001959c <msdos_filename_utf8_to_short_name_for_save+0xc0>
40019598: 86 00 ff e0 add %g3, -32, %g3
for (i = 0; i < name_size; ++i)
4001959c: 84 00 60 01 add %g1, 1, %g2
400195a0: 80 a6 80 02 cmp %i2, %g2
400195a4: 12 bf ff f7 bne 40019580 <msdos_filename_utf8_to_short_name_for_save+0xa4>
400195a8: c6 2c 00 01 stb %g3, [ %l0 + %g1 ]
if ( 0x20 == *name_ptr )
400195ac: c6 0f bf f0 ldub [ %fp + -16 ], %g3
400195b0: 80 a0 e0 20 cmp %g3, 0x20
400195b4: 02 80 00 09 be 400195d8 <msdos_filename_utf8_to_short_name_for_save+0xfc>
400195b8: 80 a0 e0 e5 cmp %g3, 0xe5
else if ( 0xE5 == *name_ptr )
400195bc: 02 80 00 0a be 400195e4 <msdos_filename_utf8_to_short_name_for_save+0x108>
<== NEVER TAKEN
400195c0: 05 10 00 9a sethi %hi(0x40026800), %g2
char c = codepage_valid_char_map[character];
400195c4: 84 10 a3 68 or %g2, 0x368, %g2 ! 40026b68 <codepage_valid_char_map>
if (c == 0) {
400195c8: c8 48 80 03 ldsb [ %g2 + %g3 ], %g4
400195cc: 80 a1 20 00 cmp %g4, 0
400195d0: 12 80 00 03 bne 400195dc <msdos_filename_utf8_to_short_name_for_save+0x100>
400195d4: c4 08 80 03 ldub [ %g2 + %g3 ], %g2
c = '_';
400195d8: 84 10 20 5f mov 0x5f, %g2
dest_ptr[0] = msdos_get_valid_codepage_filename_character(*name_ptr);
400195dc: 10 80 00 04 b 400195ec <msdos_filename_utf8_to_short_name_for_save+0x110>
400195e0: c4 2e c0 00 stb %g2, [ %i3 ]
dest_ptr[0] = 0x05;
400195e4: 84 10 20 05 mov 5, %g2
<== NOT EXECUTED
400195e8: c4 2e c0 00 stb %g2, [ %i3 ]
<== NOT EXECUTED
for (i = 1; i <= 7 && name_size && *name_ptr != '.'; ++i) {
400195ec: 80 a0 60 00 cmp %g1, 0
400195f0: 02 80 00 68 be 40019790 <msdos_filename_utf8_to_short_name_for_save+0x2b4>
400195f4: c8 0f bf f1 ldub [ %fp + -15 ], %g4
400195f8: 80 a1 20 2e cmp %g4, 0x2e
400195fc: 02 80 00 2f be 400196b8 <msdos_filename_utf8_to_short_name_for_save+0x1dc>
40019600: 05 10 00 9a sethi %hi(0x40026800), %g2
40019604: 84 10 a3 68 or %g2, 0x368, %g2 ! 40026b68 <codepage_valid_char_map>
if (c == 0) {
40019608: f4 48 80 04 ldsb [ %g2 + %g4 ], %i2
++returned_size;
4001960c: ba 10 20 01 mov 1, %i5
if (c == 0) {
40019610: 80 a6 a0 00 cmp %i2, 0
40019614: 12 80 00 03 bne 40019620 <msdos_filename_utf8_to_short_name_for_save+0x144>
40019618: c6 08 80 04 ldub [ %g2 + %g4 ], %g3
c = '_';
4001961c: 86 10 20 5f mov 0x5f, %g3
dest_ptr[i] = msdos_get_valid_codepage_filename_character(*name_ptr);
40019620: c6 2e c0 1d stb %g3, [ %i3 + %i5 ]
40019624: 88 07 bf f1 add %fp, -15, %g4
--name_size;
40019628: 86 00 7f ff add %g1, -1, %g3
4001962c: b4 01 00 1d add %g4, %i5, %i2
++returned_size;
40019630: ba 07 60 01 inc %i5
for (i = 1; i <= 7 && name_size && *name_ptr != '.'; ++i) {
40019634: 80 a7 60 08 cmp %i5, 8
40019638: 02 80 00 16 be 40019690 <msdos_filename_utf8_to_short_name_for_save+0x1b4>
4001963c: b2 10 00 1d mov %i5, %i1
40019640: 80 a0 e0 00 cmp %g3, 0
40019644: 22 80 00 22 be,a 400196cc <msdos_filename_utf8_to_short_name_for_save+0x1f0>
40019648: 82 10 00 19 mov %i1, %g1
4001964c: c8 0c 00 1d ldub [ %l0 + %i5 ], %g4
40019650: 80 a1 20 2e cmp %g4, 0x2e
40019654: 02 80 00 4d be 40019788 <msdos_filename_utf8_to_short_name_for_save+0x2ac>
40019658: b4 06 a0 01 inc %i2
if (c == 0) {
4001965c: f4 48 80 04 ldsb [ %g2 + %g4 ], %i2
40019660: 82 10 00 03 mov %g3, %g1
40019664: 80 a6 a0 00 cmp %i2, 0
40019668: 02 bf ff ed be 4001961c <msdos_filename_utf8_to_short_name_for_save+0x140>
4001966c: c6 08 80 04 ldub [ %g2 + %g4 ], %g3
dest_ptr[i] = msdos_get_valid_codepage_filename_character(*name_ptr);
40019670: c6 2e c0 1d stb %g3, [ %i3 + %i5 ]
40019674: 88 07 bf f1 add %fp, -15, %g4
--name_size;
40019678: 86 00 7f ff add %g1, -1, %g3
4001967c: b4 01 00 1d add %g4, %i5, %i2
++returned_size;
40019680: ba 07 60 01 inc %i5
for (i = 1; i <= 7 && name_size && *name_ptr != '.'; ++i) {
40019684: 80 a7 60 08 cmp %i5, 8
40019688: 12 bf ff ee bne 40019640 <msdos_filename_utf8_to_short_name_for_save+0x164>
4001968c: b2 10 00 1d mov %i5, %i1
if ( name_size > 0 && *name_ptr == '.' ) {
40019690: 80 a0 e0 00 cmp %g3, 0
40019694: 22 80 00 2d be,a 40019748 <msdos_filename_utf8_to_short_name_for_save+0x26c>
40019698: 82 10 20 08 mov 8, %g1
4001969c: c8 0e 80 00 ldub [ %i2 ], %g4
400196a0: 80 a1 20 2e cmp %g4, 0x2e
400196a4: 12 80 00 17 bne 40019700 <msdos_filename_utf8_to_short_name_for_save+0x224>
400196a8: 88 10 20 08 mov 8, %g4
++name_ptr;
400196ac: b4 06 a0 01 inc %i2
--name_size;
400196b0: 10 80 00 0f b 400196ec <msdos_filename_utf8_to_short_name_for_save+0x210>
400196b4: 86 00 7f fe add %g1, -2, %g3
400196b8: 86 00 7f ff add %g1, -1, %g3
++name_ptr;
400196bc: b4 07 bf f2 add %fp, -14, %i2
for (i = 1; i <= 7 && name_size && *name_ptr != '.'; ++i) {
400196c0: b2 10 20 01 mov 1, %i1
++returned_size;
400196c4: ba 10 20 01 mov 1, %i5
400196c8: 82 10 00 19 mov %i1, %g1
dest_ptr[i] = ' ';
400196cc: 84 10 20 20 mov 0x20, %g2
400196d0: c4 2e c0 01 stb %g2, [ %i3 + %g1 ]
for (; i < 8; ++i) {
400196d4: 82 00 60 01 inc %g1
400196d8: 80 a0 60 08 cmp %g1, 8
400196dc: 32 bf ff fe bne,a 400196d4 <msdos_filename_utf8_to_short_name_for_save+0x1f8>
400196e0: c4 2e c0 01 stb %g2, [ %i3 + %g1 ]
400196e4: ba 27 40 19 sub %i5, %i1, %i5
400196e8: ba 07 60 08 add %i5, 8, %i5
for (; i <= 10 && name_size ; i++) {
400196ec: 80 a0 e0 00 cmp %g3, 0
400196f0: 02 80 00 24 be 40019780 <msdos_filename_utf8_to_short_name_for_save+0x2a4>
400196f4: 05 10 00 9a sethi %hi(0x40026800), %g2
400196f8: 88 10 00 1d mov %i5, %g4
400196fc: 84 10 a3 68 or %g2, 0x368, %g2
40019700: 82 10 20 08 mov 8, %g1
40019704: b4 26 80 04 sub %i2, %g4, %i2
40019708: 10 80 00 05 b 4001971c <msdos_filename_utf8_to_short_name_for_save+0x240>
4001970c: 86 00 e0 08 add %g3, 8, %g3
40019710: 80 a0 c0 01 cmp %g3, %g1
40019714: 22 80 00 0e be,a 4001974c <msdos_filename_utf8_to_short_name_for_save+0x270>
40019718: 84 06 c0 01 add %i3, %g1, %g2
char c = codepage_valid_char_map[character];
4001971c: c8 0e 80 1d ldub [ %i2 + %i5 ], %g4
if (c == 0) {
40019720: f2 48 80 04 ldsb [ %g2 + %g4 ], %i1
40019724: 80 a6 60 00 cmp %i1, 0
40019728: 12 80 00 03 bne 40019734 <msdos_filename_utf8_to_short_name_for_save+0x258>
4001972c: c8 08 80 04 ldub [ %g2 + %g4 ], %g4
c = '_';
40019730: 88 10 20 5f mov 0x5f, %g4
dest_ptr[i] = msdos_get_valid_codepage_filename_character(*name_ptr);
40019734: c8 2e c0 01 stb %g4, [ %i3 + %g1 ]
for (; i <= 10 && name_size ; i++) {
40019738: 82 00 60 01 inc %g1
4001973c: 80 a0 60 0b cmp %g1, 0xb
40019740: 12 bf ff f4 bne 40019710 <msdos_filename_utf8_to_short_name_for_save+0x234>
40019744: ba 07 60 01 inc %i5
40019748: 84 06 c0 01 add %i3, %g1, %g2
dest_ptr[i] = ' ';
4001974c: 86 10 20 20 mov 0x20, %g3
for ( ; i < short_name_size; ++i ) {
40019750: 80 a0 40 1c cmp %g1, %i4
40019754: 1a bf ff 71 bcc 40019518 <msdos_filename_utf8_to_short_name_for_save+0x3c>
40019758: b6 06 c0 1c add %i3, %i4, %i3
dest_ptr[i] = ' ';
4001975c: c6 28 80 00 stb %g3, [ %g2 ]
40019760: 84 00 a0 01 inc %g2
for ( ; i < short_name_size; ++i ) {
40019764: 80 a0 80 1b cmp %g2, %i3
40019768: 32 bf ff fe bne,a 40019760 <msdos_filename_utf8_to_short_name_for_save+0x284>
4001976c: c6 28 80 00 stb %g3, [ %g2 ]
40019770: ba 27 40 01 sub %i5, %g1, %i5
40019774: ba 07 40 1c add %i5, %i4, %i5
}
40019778: 81 c7 e0 08 ret
4001977c: 91 e8 00 1d restore %g0, %i5, %o0
for (; i <= 10 && name_size ; i++) {
40019780: 10 bf ff f2 b 40019748 <msdos_filename_utf8_to_short_name_for_save+0x26c>
40019784: 82 10 20 08 mov 8, %g1
--name_size;
40019788: 10 bf ff d0 b 400196c8 <msdos_filename_utf8_to_short_name_for_save+0x1ec>
4001978c: 86 00 7f fe add %g1, -2, %g3
for (i = 1; i <= 7 && name_size && *name_ptr != '.'; ++i) {
40019790: 86 10 20 00 clr %g3
++name_ptr;
40019794: b4 07 bf f1 add %fp, -15, %i2
for (i = 1; i <= 7 && name_size && *name_ptr != '.'; ++i) {
40019798: b2 10 20 01 mov 1, %i1
++returned_size;
4001979c: 10 bf ff cb b 400196c8 <msdos_filename_utf8_to_short_name_for_save+0x1ec>
400197a0: ba 10 20 01 mov 1, %i5
400142e8 <msdos_find_name>:
{
400142e8: 9d e3 bf 60 save %sp, -160, %sp
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
400142ec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
400142f0: f8 00 60 08 ld [ %g1 + 8 ], %i4
name_type = msdos_long_to_short (
400142f4: d0 07 20 cc ld [ %i4 + 0xcc ], %o0
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
400142f8: ba 07 bf e0 add %fp, -32, %i5
name_type = msdos_long_to_short (
400142fc: 98 10 20 0b mov 0xb, %o4
40014300: 96 10 00 1d mov %i5, %o3
40014304: 94 10 00 1a mov %i2, %o2
40014308: 92 10 00 19 mov %i1, %o1
fat_file_fd_t *fat_fd = NULL;
4001430c: c0 27 bf cc clr [ %fp + -52 ]
memset(node_entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40014310: c0 27 bf e0 clr [ %fp + -32 ]
40014314: c0 27 bf e4 clr [ %fp + -28 ]
40014318: c0 27 bf e8 clr [ %fp + -24 ]
4001431c: c0 27 bf ec clr [ %fp + -20 ]
40014320: c0 27 bf f0 clr [ %fp + -16 ]
40014324: c0 27 bf f4 clr [ %fp + -12 ]
40014328: c0 27 bf f8 clr [ %fp + -8 ]
name_type = msdos_long_to_short (
4001432c: 7f ff f9 ae call 400129e4 <msdos_long_to_short>
40014330: c0 27 bf fc clr [ %fp + -4 ]
rc = msdos_get_name_node(parent_loc, false, name, name_len, name_type,
40014334: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
40014338: 98 10 00 08 mov %o0, %o4
4001433c: 96 10 00 1a mov %i2, %o3
40014340: 9a 07 bf d0 add %fp, -48, %o5
40014344: 94 10 00 19 mov %i1, %o2
40014348: 92 10 20 00 clr %o1
4001434c: 7f ff ff a8 call 400141ec <msdos_get_name_node>
40014350: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
40014354: ba 92 20 00 orcc %o0, 0, %i5
40014358: 12 80 00 1d bne 400143cc <msdos_find_name+0xe4>
4001435c: c2 0f bf eb ldub [ %fp + -21 ], %g1
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
40014360: 80 88 60 08 btst 8, %g1
40014364: 12 80 00 1c bne 400143d4 <msdos_find_name+0xec>
<== NEVER TAKEN
40014368: 82 08 60 3f and %g1, 0x3f, %g1
4001436c: 80 a0 60 0f cmp %g1, 0xf
40014370: 02 80 00 19 be 400143d4 <msdos_find_name+0xec>
<== NEVER TAKEN
40014374: 94 07 bf cc add %fp, -52, %o2
rc = fat_file_open(&fs_info->fat, &dir_pos, &fat_fd);
40014378: 92 07 bf d0 add %fp, -48, %o1
4001437c: 7f ff f3 bd call 40011270 <fat_file_open>
40014380: 90 10 00 1c mov %i4, %o0
if (rc != RC_OK)
40014384: ba 92 20 00 orcc %o0, 0, %i5
40014388: 12 80 00 11 bne 400143cc <msdos_find_name+0xe4>
<== NEVER TAKEN
4001438c: c2 07 bf cc ld [ %fp + -52 ], %g1
fat_fd->dir_pos = dir_pos;
40014390: c4 1f bf d0 ldd [ %fp + -48 ], %g2
40014394: c4 38 60 20 std %g2, [ %g1 + 0x20 ]
40014398: c4 1f bf d8 ldd [ %fp + -40 ], %g2
4001439c: c4 38 60 28 std %g2, [ %g1 + 0x28 ]
if (fat_fd->links_num == 1)
400143a0: c4 00 60 08 ld [ %g1 + 8 ], %g2
400143a4: 80 a0 a0 01 cmp %g2, 1
400143a8: 02 80 00 0f be 400143e4 <msdos_find_name+0xfc>
400143ac: c4 17 bf fa lduh [ %fp + -6 ], %g2
rc = fat_file_close(&fs_info->fat, parent_loc->node_access);
400143b0: d2 06 20 08 ld [ %i0 + 8 ], %o1
400143b4: 7f ff f5 57 call 40011910 <fat_file_close>
400143b8: 90 10 00 1c mov %i4, %o0
if (rc != RC_OK)
400143bc: ba 92 20 00 orcc %o0, 0, %i5
400143c0: 12 80 00 54 bne 40014510 <msdos_find_name+0x228>
<== NEVER TAKEN
400143c4: c2 07 bf cc ld [ %fp + -52 ], %g1
parent_loc->node_access = fat_fd;
400143c8: c2 26 20 08 st %g1, [ %i0 + 8 ]
}
400143cc: 81 c7 e0 08 ret
400143d0: 91 e8 00 1d restore %g0, %i5, %o0
return MSDOS_NAME_NOT_FOUND_ERR;
400143d4: 3b 00 00 1f sethi %hi(0x7c00), %i5
<== NOT EXECUTED
400143d8: ba 17 61 01 or %i5, 0x101, %i5 ! 7d01 <_ISR_Stack_size+0x6d01>
<== NOT EXECUTED
}
400143dc: 81 c7 e0 08 ret
<== NOT EXECUTED
400143e0: 91 e8 00 1d restore %g0, %i5, %o0
<== NOT EXECUTED
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
400143e4: c8 17 bf f4 lduh [ %fp + -12 ], %g4
400143e8: 87 28 a0 08 sll %g2, 8, %g3
400143ec: bb 28 a0 10 sll %g2, 0x10, %i5
400143f0: 85 29 20 08 sll %g4, 8, %g2
400143f4: bb 37 60 18 srl %i5, 0x18, %i5
400143f8: 89 29 20 10 sll %g4, 0x10, %g4
400143fc: 86 10 c0 1d or %g3, %i5, %g3
40014400: 89 31 20 18 srl %g4, 0x18, %g4
40014404: 87 28 e0 10 sll %g3, 0x10, %g3
40014408: 84 10 80 04 or %g2, %g4, %g2
4001440c: 87 30 e0 10 srl %g3, 0x10, %g3
40014410: 85 28 a0 10 sll %g2, 0x10, %g2
40014414: 84 10 80 03 or %g2, %g3, %g2
40014418: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
4001441c: c4 17 bf f8 lduh [ %fp + -8 ], %g2
40014420: c2 17 bf f6 lduh [ %fp + -10 ], %g1
40014424: 91 28 a0 08 sll %g2, 8, %o0
40014428: 93 28 60 08 sll %g1, 8, %o1
4001442c: 85 28 a0 10 sll %g2, 0x10, %g2
40014430: 83 28 60 10 sll %g1, 0x10, %g1
40014434: 85 30 a0 18 srl %g2, 0x18, %g2
40014438: 83 30 60 18 srl %g1, 0x18, %g1
4001443c: 84 12 00 02 or %o0, %g2, %g2
40014440: 82 12 40 01 or %o1, %g1, %g1
40014444: 91 28 a0 10 sll %g2, 0x10, %o0
40014448: 93 28 60 10 sll %g1, 0x10, %o1
4001444c: 91 32 20 10 srl %o0, 0x10, %o0
40014450: 40 00 12 b1 call 40018f14 <msdos_date_dos2unix>
40014454: 93 32 60 10 srl %o1, 0x10, %o1
40014458: c2 07 bf cc ld [ %fp + -52 ], %g1
4001445c: d0 20 60 4c st %o0, [ %g1 + 0x4c ]
fat_fd->ctime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
40014460: c4 17 bf f0 lduh [ %fp + -16 ], %g2
fat_fd->mtime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
40014464: c0 20 60 48 clr [ %g1 + 0x48 ]
fat_fd->ctime = msdos_date_dos2unix(CF_LE_W(date), CF_LE_W(time_val));
40014468: 91 28 a0 08 sll %g2, 8, %o0
4001446c: c2 17 bf ee lduh [ %fp + -18 ], %g1
40014470: 93 28 60 08 sll %g1, 8, %o1
40014474: 85 28 a0 10 sll %g2, 0x10, %g2
40014478: 83 28 60 10 sll %g1, 0x10, %g1
4001447c: 85 30 a0 18 srl %g2, 0x18, %g2
40014480: 83 30 60 18 srl %g1, 0x18, %g1
40014484: 84 12 00 02 or %o0, %g2, %g2
40014488: 82 12 40 01 or %o1, %g1, %g1
4001448c: 91 28 a0 10 sll %g2, 0x10, %o0
40014490: 93 28 60 10 sll %g1, 0x10, %o1
40014494: 91 32 20 10 srl %o0, 0x10, %o0
40014498: 40 00 12 9f call 40018f14 <msdos_date_dos2unix>
4001449c: 93 32 60 10 srl %o1, 0x10, %o1
400144a0: fa 07 bf cc ld [ %fp + -52 ], %i5
400144a4: c0 27 60 40 clr [ %i5 + 0x40 ]
400144a8: d0 27 60 44 st %o0, [ %i5 + 0x44 ]
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
400144ac: c2 0f bf eb ldub [ %fp + -21 ], %g1
400144b0: 80 88 60 10 btst 0x10, %g1
400144b4: 32 80 00 1b bne,a 40014520 <msdos_find_name+0x238>
400144b8: c0 27 60 10 clr [ %i5 + 0x10 ]
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
400144bc: 40 00 19 27 call 4001a958 <__bswapsi2>
400144c0: d0 07 bf fc ld [ %fp + -4 ], %o0
fat_fd->fat_file_type = FAT_FILE;
400144c4: 82 10 20 04 mov 4, %g1
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
400144c8: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
fat_fd->fat_file_type = FAT_FILE;
400144cc: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
400144d0: 82 10 3f ff mov -1, %g1
400144d4: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
if ((fat_fd->fat_file_size != 0) &&
400144d8: 80 a2 20 00 cmp %o0, 0
fat_fd->map.disk_cln = fat_fd->cln;
400144dc: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
fat_fd->map.file_cln = 0;
400144e0: c0 27 60 34 clr [ %i5 + 0x34 ]
if ((fat_fd->fat_file_size != 0) &&
400144e4: 02 80 00 08 be 40014504 <msdos_find_name+0x21c>
400144e8: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
400144ec: c4 07 20 08 ld [ %i4 + 8 ], %g2
400144f0: 80 a0 80 08 cmp %g2, %o0
400144f4: 2a 80 00 05 bcs,a 40014508 <msdos_find_name+0x220>
400144f8: 82 10 3f ff mov -1, %g1
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
400144fc: 10 bf ff ad b 400143b0 <msdos_find_name+0xc8>
40014500: c2 27 60 3c st %g1, [ %i5 + 0x3c ]
40014504: 82 10 3f ff mov -1, %g1
40014508: 10 bf ff aa b 400143b0 <msdos_find_name+0xc8>
4001450c: c2 27 60 3c st %g1, [ %i5 + 0x3c ]
fat_file_close(&fs_info->fat, fat_fd);
40014510: d2 07 bf cc ld [ %fp + -52 ], %o1
<== NOT EXECUTED
40014514: 7f ff f4 ff call 40011910 <fat_file_close>
<== NOT EXECUTED
40014518: 90 10 00 1c mov %i4, %o0
<== NOT EXECUTED
return rc;
4001451c: 30 bf ff ac b,a 400143cc <msdos_find_name+0xe4>
<== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
40014520: 03 00 08 00 sethi %hi(0x200000), %g1
40014524: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
rc = fat_file_size(&fs_info->fat, fat_fd);
40014528: 92 10 00 1d mov %i5, %o1
4001452c: 7f ff f6 9b call 40011f98 <fat_file_size>
40014530: 90 10 00 1c mov %i4, %o0
if (rc != RC_OK)
40014534: ba 92 20 00 orcc %o0, 0, %i5
40014538: 12 bf ff f7 bne 40014514 <msdos_find_name+0x22c>
<== NEVER TAKEN
4001453c: d2 07 bf cc ld [ %fp + -52 ], %o1
40014540: fa 07 bf cc ld [ %fp + -52 ], %i5
40014544: 10 bf ff e5 b 400144d8 <msdos_find_name+0x1f0>
40014548: d0 07 60 18 ld [ %i5 + 0x18 ], %o0
4001339c <msdos_find_name_in_fat_file>:
const uint8_t *name_utf8,
int name_utf8_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry)
{
4001339c: 9d e3 be d0 save %sp, -304, %sp
<== NOT EXECUTED
int retval = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
400133a0: e0 06 20 08 ld [ %i0 + 8 ], %l0
<== NOT EXECUTED
ssize_t name_len_for_compare;
uint32_t bts2rd = 0;
uint32_t empty_file_offset = 0;
uint32_t empty_entry_count = 0;
unsigned int lfn_entries;
rtems_dosfs_convert_control *converter = fs_info->converter;
400133a4: c2 04 20 cc ld [ %l0 + 0xcc ], %g1
<== NOT EXECUTED
void *buffer = converter->buffer.data;
400133a8: c4 00 60 04 ld [ %g1 + 4 ], %g2
<== NOT EXECUTED
rtems_dosfs_convert_control *converter = fs_info->converter;
400133ac: c2 27 bf 4c st %g1, [ %fp + -180 ]
<== NOT EXECUTED
size_t buffer_size = converter->buffer.size;
400133b0: c2 00 60 08 ld [ %g1 + 8 ], %g1
<== NOT EXECUTED
400133b4: c2 27 bf 48 st %g1, [ %fp + -184 ]
<== NOT EXECUTED
assert(name_utf8_len > 0);
400133b8: 82 97 20 00 orcc %i4, 0, %g1
<== NOT EXECUTED
{
400133bc: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
<== NOT EXECUTED
400133c0: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
<== NOT EXECUTED
400133c4: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
<== NOT EXECUTED
assert(name_utf8_len > 0);
400133c8: 04 80 02 69 ble 40013d6c <msdos_find_name_in_fat_file+0x9d0>
<== NOT EXECUTED
400133cc: c4 27 bf 58 st %g2, [ %fp + -168 ]
<== NOT EXECUTED
dir_pos->sname.cln = 0;
400133d0: c2 07 a0 5c ld [ %fp + 0x5c ], %g1
<== NOT EXECUTED
400133d4: c0 20 40 00 clr [ %g1 ]
<== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
400133d8: 82 10 3f ff mov -1, %g1
<== NOT EXECUTED
dir_pos->sname.ofs = 0;
400133dc: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
<== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
400133e0: c2 20 a0 08 st %g1, [ %g2 + 8 ]
<== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
400133e4: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
<== NOT EXECUTED
dir_pos->sname.ofs = 0;
400133e8: c0 20 a0 04 clr [ %g2 + 4 ]
<== NOT EXECUTED
fat_dir_pos_init(dir_pos);
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
400133ec: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
<== NOT EXECUTED
400133f0: 80 a0 60 01 cmp %g1, 1
<== NOT EXECUTED
400133f4: 22 80 00 1c be,a 40013464 <msdos_find_name_in_fat_file+0xc8>
<== NOT EXECUTED
400133f8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
<== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
400133fc: e2 04 20 08 ld [ %l0 + 8 ], %l1
<== NOT EXECUTED
switch ( name_type ) {
40013400: c2 07 a0 58 ld [ %fp + 0x58 ], %g1
<== NOT EXECUTED
40013404: 80 a0 60 01 cmp %g1, 1
<== NOT EXECUTED
40013408: 02 80 00 20 be 40013488 <msdos_find_name_in_fat_file+0xec>
<== NOT EXECUTED
4001340c: 80 a0 60 02 cmp %g1, 2
<== NOT EXECUTED
40013410: 12 80 00 0f bne 4001344c <msdos_find_name_in_fat_file+0xb0>
<== NOT EXECUTED
40013414: f6 07 bf 58 ld [ %fp + -168 ], %i3
<== NOT EXECUTED
}
else
retval = -1;
break;
case MSDOS_NAME_LONG:
name_len_for_save = msdos_filename_utf8_to_long_name_for_save (
40013418: f0 07 bf 48 ld [ %fp + -184 ], %i0
<== NOT EXECUTED
4001341c: f8 07 bf 4c ld [ %fp + -180 ], %i4
<== NOT EXECUTED
40013420: d4 07 a0 54 ld [ %fp + 0x54 ], %o2
<== NOT EXECUTED
40013424: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
<== NOT EXECUTED
40013428: 98 10 00 18 mov %i0, %o4
<== NOT EXECUTED
4001342c: 96 10 00 1b mov %i3, %o3
<== NOT EXECUTED
40013430: 40 00 17 7b call 4001921c <msdos_filename_utf8_to_long_name_for_save>
<== NOT EXECUTED
40013434: 90 10 00 1c mov %i4, %o0
<== NOT EXECUTED
converter,
name_utf8,
name_utf8_len,
buffer,
buffer_size);
if (name_len_for_save > 0) {
40013438: ba 92 20 00 orcc %o0, 0, %i5
<== NOT EXECUTED
4001343c: 14 80 01 5d bg 400139b0 <msdos_find_name_in_fat_file+0x614>
<== NOT EXECUTED
40013440: d4 07 a0 54 ld [ %fp + 0x54 ], %o2
<== NOT EXECUTED
entry = fs_info->cl_buf;
40013444: 81 c7 e0 08 ret
<== NOT EXECUTED
40013448: 91 e8 3f ff restore %g0, -1, %o0
<== NOT EXECUTED
}
else
retval = -1;
break;
default:
errno = EINVAL;
4001344c: 40 00 20 49 call 4001b570 <__errno>
<== NOT EXECUTED
40013450: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40013454: 82 10 20 16 mov 0x16, %g1
<== NOT EXECUTED
40013458: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
4001345c: 81 c7 e0 08 ret
<== NOT EXECUTED
40013460: 81 e8 00 00 restore
<== NOT EXECUTED
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
40013464: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
40013468: 32 bf ff e6 bne,a 40013400 <msdos_find_name_in_fat_file+0x64>
<== NOT EXECUTED
4001346c: e2 04 20 08 ld [ %l0 + 8 ], %l1
<== NOT EXECUTED
40013470: c2 0c 20 16 ldub [ %l0 + 0x16 ], %g1
<== NOT EXECUTED
40013474: 80 88 60 03 btst 3, %g1
<== NOT EXECUTED
40013478: 22 bf ff e2 be,a 40013400 <msdos_find_name_in_fat_file+0x64>
<== NOT EXECUTED
4001347c: e2 04 20 08 ld [ %l0 + 8 ], %l1
<== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
40013480: 10 bf ff e0 b 40013400 <msdos_find_name_in_fat_file+0x64>
<== NOT EXECUTED
40013484: e2 06 60 18 ld [ %i1 + 0x18 ], %l1
<== NOT EXECUTED
name_len_for_compare = msdos_filename_utf8_to_short_name_for_compare (
40013488: d6 07 bf 58 ld [ %fp + -168 ], %o3
<== NOT EXECUTED
4001348c: d4 07 a0 54 ld [ %fp + 0x54 ], %o2
<== NOT EXECUTED
40013490: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
<== NOT EXECUTED
40013494: d0 07 bf 4c ld [ %fp + -180 ], %o0
<== NOT EXECUTED
40013498: 40 00 17 e1 call 4001941c <msdos_filename_utf8_to_short_name_for_compare>
<== NOT EXECUTED
4001349c: 98 10 20 0b mov 0xb, %o4
<== NOT EXECUTED
lfn_entries = 0;
400134a0: 86 10 20 00 clr %g3
<== NOT EXECUTED
if (name_len_for_compare > 0) {
400134a4: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
400134a8: 04 bf ff e7 ble 40013444 <msdos_find_name_in_fat_file+0xa8>
<== NOT EXECUTED
400134ac: ac 10 00 08 mov %o0, %l6
<== NOT EXECUTED
uint32_t entries_per_block = bts2rd / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
400134b0: 83 34 60 05 srl %l1, 5, %g1
<== NOT EXECUTED
400134b4: f2 27 a0 48 st %i1, [ %fp + 0x48 ]
<== NOT EXECUTED
uint32_t empty_file_offset = 0;
400134b8: a4 10 20 00 clr %l2
<== NOT EXECUTED
uint32_t entries_per_block = bts2rd / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
400134bc: c2 27 bf 44 st %g1, [ %fp + -188 ]
<== NOT EXECUTED
*entry_matched = false;
400134c0: ae 10 20 00 clr %l7
<== NOT EXECUTED
rtems_dosfs_convert_control *converter = fs_info->converter;
400134c4: c2 04 20 cc ld [ %l0 + 0xcc ], %g1
<== NOT EXECUTED
400134c8: c2 27 bf 54 st %g1, [ %fp + -172 ]
<== NOT EXECUTED
lfn_start->cln = FAT_FILE_SHORT_NAME;
400134cc: 82 10 3f ff mov -1, %g1
<== NOT EXECUTED
while ( (bytes_read = fat_file_read (&fs_info->fat, fat_fd, (dir_offset * bts2rd),
400134d0: d8 04 20 c8 ld [ %l0 + 0xc8 ], %o4
<== NOT EXECUTED
lfn_start->cln = FAT_FILE_SHORT_NAME;
400134d4: c2 27 bf 68 st %g1, [ %fp + -152 ]
<== NOT EXECUTED
if (*empty_entry_count == (lfn_entries + 1))
400134d8: 82 00 e0 01 add %g3, 1, %g1
<== NOT EXECUTED
while ( (bytes_read = fat_file_read (&fs_info->fat, fat_fd, (dir_offset * bts2rd),
400134dc: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
<== NOT EXECUTED
*entry_matched = false;
400134e0: c0 2f bf 63 clrb [ %fp + -157 ]
<== NOT EXECUTED
400134e4: b2 10 00 12 mov %l2, %i1
<== NOT EXECUTED
uint8_t lfn_checksum = 0;
400134e8: c0 2f bf 53 clrb [ %fp + -173 ]
<== NOT EXECUTED
400134ec: a4 10 00 1a mov %i2, %l2
<== NOT EXECUTED
if (*empty_entry_count == (lfn_entries + 1))
400134f0: c2 27 bf 5c st %g1, [ %fp + -164 ]
<== NOT EXECUTED
400134f4: b4 10 00 17 mov %l7, %i2
<== NOT EXECUTED
while ( (bytes_read = fat_file_read (&fs_info->fat, fat_fd, (dir_offset * bts2rd),
400134f8: 96 10 00 11 mov %l1, %o3
<== NOT EXECUTED
400134fc: 94 10 00 1a mov %i2, %o2
<== NOT EXECUTED
40013500: 90 10 00 10 mov %l0, %o0
<== NOT EXECUTED
40013504: 7f ff f8 44 call 40011614 <fat_file_read>
<== NOT EXECUTED
40013508: aa 10 00 16 mov %l6, %l5
<== NOT EXECUTED
uint32_t empty_entry_count = 0;
4001350c: b6 10 20 00 clr %i3
<== NOT EXECUTED
uint32_t dir_offset = 0;
40013510: a8 10 20 00 clr %l4
<== NOT EXECUTED
int lfn_entry = 0;
40013514: b0 10 20 00 clr %i0
<== NOT EXECUTED
&& rc == RC_OK)
40013518: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
4001351c: 02 80 00 b2 be 400137e4 <msdos_find_name_in_fat_file+0x448>
<== NOT EXECUTED
40013520: a6 10 20 00 clr %l3
<== NOT EXECUTED
if (bytes_read < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40013524: 80 a2 20 1f cmp %o0, 0x1f
<== NOT EXECUTED
40013528: 04 80 01 65 ble 40013abc <msdos_find_name_in_fat_file+0x720>
<== NOT EXECUTED
4001352c: 80 a4 40 08 cmp %l1, %o0
<== NOT EXECUTED
assert(bytes_read == bts2rd);
40013530: 12 80 02 03 bne 40013d3c <msdos_find_name_in_fat_file+0x9a0>
<== NOT EXECUTED
40013534: ba 10 20 00 clr %i5
<== NOT EXECUTED
lfn_start->cln = FAT_FILE_SHORT_NAME;
40013538: 10 80 00 1c b 400135a8 <msdos_find_name_in_fat_file+0x20c>
<== NOT EXECUTED
4001353c: ae 10 3f ff mov -1, %l7
<== NOT EXECUTED
if (create_node && !empty_space_found)
40013540: 12 80 00 06 bne 40013558 <msdos_find_name_in_fat_file+0x1bc>
<== NOT EXECUTED
40013544: 80 a4 a0 00 cmp %l2, 0
<== NOT EXECUTED
40013548: 22 80 00 05 be,a 4001355c <msdos_find_name_in_fat_file+0x1c0>
<== NOT EXECUTED
4001354c: c4 0f 20 0b ldub [ %i4 + 0xb ], %g2
<== NOT EXECUTED
*empty_entry_count = 0;
40013550: b6 10 20 00 clr %i3
<== NOT EXECUTED
*empty_file_offset = 0;
40013554: b2 10 20 00 clr %i1
<== NOT EXECUTED
if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
40013558: c4 0f 20 0b ldub [ %i4 + 0xb ], %g2
<== NOT EXECUTED
4001355c: 86 08 a0 3f and %g2, 0x3f, %g3
<== NOT EXECUTED
40013560: 80 a0 e0 0f cmp %g3, 0xf
<== NOT EXECUTED
40013564: 02 80 00 26 be 400135fc <msdos_find_name_in_fat_file+0x260>
<== NOT EXECUTED
40013568: c6 0f bf 63 ldub [ %fp + -157 ], %g3
<== NOT EXECUTED
if (entry_matched)
4001356c: 80 a0 e0 00 cmp %g3, 0
<== NOT EXECUTED
40013570: 02 80 00 31 be 40013634 <msdos_find_name_in_fat_file+0x298>
<== NOT EXECUTED
40013574: 80 88 a0 08 btst 8, %g2
<== NOT EXECUTED
if (lfn_entry ||
40013578: 80 a5 60 00 cmp %l5, 0
<== NOT EXECUTED
4001357c: 14 80 00 04 bg 4001358c <msdos_find_name_in_fat_file+0x1f0>
<== NOT EXECUTED
40013580: 80 a6 20 00 cmp %i0, 0
<== NOT EXECUTED
40013584: 02 80 00 ea be 4001392c <msdos_find_name_in_fat_file+0x590>
<== NOT EXECUTED
40013588: 88 10 20 00 clr %g4
<== NOT EXECUTED
lfn_start->cln = FAT_FILE_SHORT_NAME;
4001358c: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
*entry_matched = false;
40013590: aa 10 00 16 mov %l6, %l5
<== NOT EXECUTED
40013594: c0 2f bf 63 clrb [ %fp + -157 ]
<== NOT EXECUTED
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40013598: ba 07 60 20 add %i5, 0x20, %i5
<== NOT EXECUTED
for (dir_entry = 0;
4001359c: 80 a4 40 1d cmp %l1, %i5
<== NOT EXECUTED
400135a0: 28 80 00 87 bleu,a 400137bc <msdos_find_name_in_fat_file+0x420>
<== NOT EXECUTED
400135a4: d8 04 20 c8 ld [ %l0 + 0xc8 ], %o4
<== NOT EXECUTED
char* entry = (char*) fs_info->cl_buf + dir_entry;
400135a8: c2 04 20 c8 ld [ %l0 + 0xc8 ], %g1
<== NOT EXECUTED
400135ac: b8 00 40 1d add %g1, %i5, %i4
<== NOT EXECUTED
if (*empty_entry_count == 0)
400135b0: 80 a6 e0 00 cmp %i3, 0
<== NOT EXECUTED
400135b4: 12 80 00 03 bne 400135c0 <msdos_find_name_in_fat_file+0x224>
<== NOT EXECUTED
400135b8: c2 08 40 1d ldub [ %g1 + %i5 ], %g1
<== NOT EXECUTED
400135bc: b2 06 80 1d add %i2, %i5, %i1
<== NOT EXECUTED
if (remainder_empty)
400135c0: 84 88 60 ff andcc %g1, 0xff, %g2
<== NOT EXECUTED
400135c4: 02 80 00 c5 be 400138d8 <msdos_find_name_in_fat_file+0x53c>
<== NOT EXECUTED
400135c8: 80 a0 a0 e5 cmp %g2, 0xe5
<== NOT EXECUTED
else if (entry_empty)
400135cc: 12 bf ff dd bne 40013540 <msdos_find_name_in_fat_file+0x1a4>
<== NOT EXECUTED
400135d0: 80 8c e0 ff btst 0xff, %l3
<== NOT EXECUTED
if (create_node)
400135d4: 80 a4 a0 00 cmp %l2, 0
<== NOT EXECUTED
400135d8: 22 bf ff ee be,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
400135dc: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
if (*empty_entry_count == (lfn_entries + 1))
400135e0: c2 07 bf 5c ld [ %fp + -164 ], %g1
<== NOT EXECUTED
(*empty_entry_count)++;
400135e4: b6 06 e0 01 inc %i3
<== NOT EXECUTED
if (*empty_entry_count == (lfn_entries + 1))
400135e8: 80 a6 c0 01 cmp %i3, %g1
<== NOT EXECUTED
400135ec: 22 bf ff e8 be,a 4001358c <msdos_find_name_in_fat_file+0x1f0>
<== NOT EXECUTED
400135f0: a6 10 20 01 mov 1, %l3
<== NOT EXECUTED
lfn_start->cln = FAT_FILE_SHORT_NAME;
400135f4: 10 bf ff e7 b 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
400135f8: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
(lfn_start.cln == FAT_FILE_SHORT_NAME);
400135fc: c4 07 bf 68 ld [ %fp + -152 ], %g2
<== NOT EXECUTED
if (is_first_lfn_entry)
40013600: 80 a0 bf ff cmp %g2, -1
<== NOT EXECUTED
40013604: 02 80 00 7d be 400137f8 <msdos_find_name_in_fat_file+0x45c>
<== NOT EXECUTED
40013608: 82 08 60 3f and %g1, 0x3f, %g1
<== NOT EXECUTED
if ((lfn_entry != (*MSDOS_DIR_ENTRY_TYPE(entry) &
4001360c: 80 a6 00 01 cmp %i0, %g1
<== NOT EXECUTED
40013610: 32 bf ff e0 bne,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
40013614: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
40013618: c2 0f 20 0d ldub [ %i4 + 0xd ], %g1
<== NOT EXECUTED
4001361c: c6 0f bf 53 ldub [ %fp + -173 ], %g3
<== NOT EXECUTED
40013620: 80 a0 c0 01 cmp %g3, %g1
<== NOT EXECUTED
40013624: 32 bf ff db bne,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
40013628: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
bool is_first_lfn_entry =
4001362c: 10 80 00 7f b 40013828 <msdos_find_name_in_fat_file+0x48c>
<== NOT EXECUTED
40013630: 84 38 00 02 xnor %g0, %g2, %g2
<== NOT EXECUTED
} else if ((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_VOLUME_ID)
40013634: 32 bf ff da bne,a 4001359c <msdos_find_name_in_fat_file+0x200>
<== NOT EXECUTED
40013638: ba 07 60 20 add %i5, 0x20, %i5
<== NOT EXECUTED
size_t bytes_converted = buf_size;
4001363c: 82 10 20 0c mov 0xc, %g1
<== NOT EXECUTED
ssize_t bytes_written = msdos_format_dirent_with_dot(char_buf, entry);
40013640: 92 10 00 1c mov %i4, %o1
<== NOT EXECUTED
size_t bytes_converted = buf_size;
40013644: c2 27 bf 64 st %g1, [ %fp + -156 ]
<== NOT EXECUTED
ssize_t bytes_written = msdos_format_dirent_with_dot(char_buf, entry);
40013648: 7f ff ff 06 call 40013260 <msdos_format_dirent_with_dot>
<== NOT EXECUTED
4001364c: 90 07 bf 70 add %fp, -144, %o0
<== NOT EXECUTED
if (bytes_written > 0) {
40013650: 94 92 20 00 orcc %o0, 0, %o2
<== NOT EXECUTED
40013654: 04 80 01 b8 ble 40013d34 <msdos_find_name_in_fat_file+0x998>
<== NOT EXECUTED
40013658: c2 4f bf 70 ldsb [ %fp + -144 ], %g1
<== NOT EXECUTED
if (char_buf[0] == 0x05)
4001365c: 80 a0 60 05 cmp %g1, 5
<== NOT EXECUTED
40013660: 12 80 00 04 bne 40013670 <msdos_find_name_in_fat_file+0x2d4>
<== NOT EXECUTED
40013664: 98 07 bf 64 add %fp, -156, %o4
<== NOT EXECUTED
char_buf[0] = 0xE5;
40013668: 82 10 3f e5 mov -27, %g1
<== NOT EXECUTED
4001366c: c2 2f bf 70 stb %g1, [ %fp + -144 ]
<== NOT EXECUTED
eno = (*converter->handler->codepage_to_utf8) (
40013670: d0 07 bf 54 ld [ %fp + -172 ], %o0
<== NOT EXECUTED
40013674: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
40013678: c2 00 60 04 ld [ %g1 + 4 ], %g1
<== NOT EXECUTED
4001367c: 96 07 bf 90 add %fp, -112, %o3
<== NOT EXECUTED
40013680: 9f c0 40 00 call %g1
<== NOT EXECUTED
40013684: 92 07 bf 70 add %fp, -144, %o1
<== NOT EXECUTED
if (eno == 0)
40013688: aa 92 20 00 orcc %o0, 0, %l5
<== NOT EXECUTED
4001368c: 02 80 00 8e be 400138c4 <msdos_find_name_in_fat_file+0x528>
<== NOT EXECUTED
40013690: d4 07 bf 64 ld [ %fp + -156 ], %o2
<== NOT EXECUTED
errno = eno;
40013694: 40 00 1f b7 call 4001b570 <__errno>
<== NOT EXECUTED
40013698: 01 00 00 00 nop
<== NOT EXECUTED
4001369c: ea 22 00 00 st %l5, [ %o0 ]
<== NOT EXECUTED
bytes_in_entry = msdos_short_entry_to_utf8_name (
400136a0: 94 10 3f ff mov -1, %o2
<== NOT EXECUTED
name_len_remaining = msdos_compare_entry_against_filename (
400136a4: d6 07 bf 58 ld [ %fp + -168 ], %o3
<== NOT EXECUTED
400136a8: d0 07 bf 54 ld [ %fp + -172 ], %o0
<== NOT EXECUTED
400136ac: 9a 07 bf 63 add %fp, -157, %o5
<== NOT EXECUTED
400136b0: 98 10 00 16 mov %l6, %o4
<== NOT EXECUTED
400136b4: 7f ff fc 55 call 40012808 <msdos_compare_entry_against_filename>
<== NOT EXECUTED
400136b8: 92 07 bf 90 add %fp, -112, %o1
<== NOT EXECUTED
if (entry_matched && name_len_remaining == 0) {
400136bc: c2 0f bf 63 ldub [ %fp + -157 ], %g1
<== NOT EXECUTED
400136c0: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
400136c4: 02 bf ff b2 be 4001358c <msdos_find_name_in_fat_file+0x1f0>
<== NOT EXECUTED
400136c8: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
400136cc: 32 bf ff b1 bne,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
400136d0: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
rc = msdos_on_entry_found (
400136d4: fa 23 a0 60 st %i5, [ %sp + 0x60 ]
<== NOT EXECUTED
400136d8: 82 07 bf 68 add %fp, -152, %g1
<== NOT EXECUTED
400136dc: e8 23 a0 5c st %l4, [ %sp + 0x5c ]
<== NOT EXECUTED
400136e0: b4 10 00 12 mov %l2, %i2
<== NOT EXECUTED
400136e4: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
<== NOT EXECUTED
400136e8: a4 10 00 19 mov %i1, %l2
<== NOT EXECUTED
400136ec: da 07 a0 5c ld [ %fp + 0x5c ], %o5
<== NOT EXECUTED
400136f0: f2 07 a0 48 ld [ %fp + 0x48 ], %i1
<== NOT EXECUTED
400136f4: d6 07 a0 60 ld [ %fp + 0x60 ], %o3
<== NOT EXECUTED
400136f8: 98 10 00 1c mov %i4, %o4
<== NOT EXECUTED
400136fc: 94 10 00 11 mov %l1, %o2
<== NOT EXECUTED
40013700: 92 10 00 19 mov %i1, %o1
<== NOT EXECUTED
40013704: 7f ff fc 65 call 40012898 <msdos_on_entry_found>
<== NOT EXECUTED
40013708: 90 10 00 10 mov %l0, %o0
<== NOT EXECUTED
dir_entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
4001370c: ba 07 60 20 add %i5, 0x20, %i5
<== NOT EXECUTED
for (dir_entry = 0;
40013710: 80 a7 40 11 cmp %i5, %l1
<== NOT EXECUTED
40013714: 1a 80 01 92 bcc 40013d5c <msdos_find_name_in_fat_file+0x9c0>
<== NOT EXECUTED
40013718: b0 10 00 08 mov %o0, %i0
<== NOT EXECUTED
4001371c: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
40013720: 12 80 01 8f bne 40013d5c <msdos_find_name_in_fat_file+0x9c0>
<== NOT EXECUTED
40013724: 82 10 00 1a mov %i2, %g1
<== NOT EXECUTED
if ( retval == RC_OK
40013728: 80 88 60 ff btst 0xff, %g1
<== NOT EXECUTED
4001372c: 02 bf ff 4c be 4001345c <msdos_find_name_in_fat_file+0xc0>
<== NOT EXECUTED
40013730: c2 07 a0 58 ld [ %fp + 0x58 ], %g1
<== NOT EXECUTED
switch (name_type) {
40013734: 80 a0 60 01 cmp %g1, 1
<== NOT EXECUTED
40013738: 02 80 00 ac be 400139e8 <msdos_find_name_in_fat_file+0x64c>
<== NOT EXECUTED
4001373c: 80 a0 60 02 cmp %g1, 2
<== NOT EXECUTED
40013740: 12 bf ff 43 bne 4001344c <msdos_find_name_in_fat_file+0xb0>
<== NOT EXECUTED
40013744: d8 07 bf 48 ld [ %fp + -184 ], %o4
<== NOT EXECUTED
name_len_for_save = msdos_filename_utf8_to_long_name_for_save (
40013748: d6 07 bf 58 ld [ %fp + -168 ], %o3
<== NOT EXECUTED
4001374c: d4 07 a0 54 ld [ %fp + 0x54 ], %o2
<== NOT EXECUTED
40013750: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
<== NOT EXECUTED
40013754: 40 00 16 b2 call 4001921c <msdos_filename_utf8_to_long_name_for_save>
<== NOT EXECUTED
40013758: d0 07 bf 4c ld [ %fp + -180 ], %o0
<== NOT EXECUTED
if (name_len_for_save > 0) {
4001375c: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
40013760: 04 bf ff 39 ble 40013444 <msdos_find_name_in_fat_file+0xa8>
<== NOT EXECUTED
40013764: b8 02 20 19 add %o0, 0x19, %i4
<== NOT EXECUTED
/ MSDOS_LFN_ENTRY_SIZE;
40013768: 03 13 b1 3b sethi %hi(0x4ec4ec00), %g1
<== NOT EXECUTED
4001376c: 82 10 60 4f or %g1, 0x4f, %g1 ! 4ec4ec4f <RAM_END+0xe84ec4f>
<== NOT EXECUTED
40013770: 80 57 00 01 umul %i4, %g1, %g0
<== NOT EXECUTED
40013774: b9 40 00 00 rd %y, %i4
<== NOT EXECUTED
40013778: b9 37 20 03 srl %i4, 3, %i4
<== NOT EXECUTED
if (empty_entry_count < lfn_entries + 1)
4001377c: b4 07 20 01 add %i4, 1, %i2
<== NOT EXECUTED
40013780: 80 a6 80 1b cmp %i2, %i3
<== NOT EXECUTED
40013784: 08 80 00 d7 bleu 40013ae0 <msdos_find_name_in_fat_file+0x744>
<== NOT EXECUTED
40013788: 98 07 bf 90 add %fp, -112, %o4
<== NOT EXECUTED
empty_file_offset = fat_fd->fat_file_size -
4001378c: e4 06 60 18 ld [ %i1 + 0x18 ], %l2
<== NOT EXECUTED
ret = fat_file_extend(&fs_info->fat,
40013790: d6 04 20 08 ld [ %l0 + 8 ], %o3
<== NOT EXECUTED
40013794: 96 04 80 0b add %l2, %o3, %o3
<== NOT EXECUTED
40013798: 94 10 20 01 mov 1, %o2
<== NOT EXECUTED
4001379c: 92 10 00 19 mov %i1, %o1
<== NOT EXECUTED
400137a0: 7f ff f8 c6 call 40011ab8 <fat_file_extend>
<== NOT EXECUTED
400137a4: 90 10 00 10 mov %l0, %o0
<== NOT EXECUTED
if (ret != RC_OK)
400137a8: b0 92 20 00 orcc %o0, 0, %i0
<== NOT EXECUTED
400137ac: 02 80 00 cc be 40013adc <msdos_find_name_in_fat_file+0x740>
<== NOT EXECUTED
400137b0: b7 2e e0 05 sll %i3, 5, %i3
<== NOT EXECUTED
empty_entry_count
);
}
return retval;
}
400137b4: 81 c7 e0 08 ret
<== NOT EXECUTED
400137b8: 81 e8 00 00 restore
<== NOT EXECUTED
while ( (bytes_read = fat_file_read (&fs_info->fat, fat_fd, (dir_offset * bts2rd),
400137bc: d2 07 a0 48 ld [ %fp + 0x48 ], %o1
<== NOT EXECUTED
400137c0: b4 06 80 11 add %i2, %l1, %i2
<== NOT EXECUTED
400137c4: 96 10 00 11 mov %l1, %o3
<== NOT EXECUTED
400137c8: 94 10 00 1a mov %i2, %o2
<== NOT EXECUTED
400137cc: 90 10 00 10 mov %l0, %o0
<== NOT EXECUTED
400137d0: 7f ff f7 91 call 40011614 <fat_file_read>
<== NOT EXECUTED
400137d4: a8 05 20 01 inc %l4
<== NOT EXECUTED
&& rc == RC_OK)
400137d8: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
400137dc: 12 bf ff 53 bne 40013528 <msdos_find_name_in_fat_file+0x18c>
<== NOT EXECUTED
400137e0: 80 a2 20 1f cmp %o0, 0x1f
<== NOT EXECUTED
400137e4: b4 10 00 12 mov %l2, %i2
<== NOT EXECUTED
400137e8: b0 10 20 00 clr %i0
<== NOT EXECUTED
400137ec: a4 10 00 19 mov %i1, %l2
<== NOT EXECUTED
400137f0: 10 80 00 4a b 40013918 <msdos_find_name_in_fat_file+0x57c>
<== NOT EXECUTED
400137f4: f2 07 a0 48 ld [ %fp + 0x48 ], %i1
<== NOT EXECUTED
entry_matched = false;
400137f8: c0 2f bf 63 clrb [ %fp + -157 ]
<== NOT EXECUTED
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
400137fc: c2 0f 00 00 ldub [ %i4 ], %g1
<== NOT EXECUTED
40013800: 80 88 60 40 btst 0x40, %g1
<== NOT EXECUTED
40013804: 22 bf ff 66 be,a 4001359c <msdos_find_name_in_fat_file+0x200>
<== NOT EXECUTED
40013808: ba 07 60 20 add %i5, 0x20, %i5
<== NOT EXECUTED
lfn_start.cln = dir_offset;
4001380c: e8 27 bf 68 st %l4, [ %fp + -152 ]
<== NOT EXECUTED
lfn_start.ofs = dir_entry;
40013810: fa 27 bf 6c st %i5, [ %fp + -148 ]
<== NOT EXECUTED
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
40013814: c2 0f 20 0d ldub [ %i4 + 0xd ], %g1
<== NOT EXECUTED
40013818: c2 2f bf 53 stb %g1, [ %fp + -173 ]
<== NOT EXECUTED
lfn_entry = (*MSDOS_DIR_ENTRY_TYPE(entry)
4001381c: f0 0f 00 00 ldub [ %i4 ], %i0
<== NOT EXECUTED
40013820: b0 0e 20 3f and %i0, 0x3f, %i0
<== NOT EXECUTED
bool is_first_lfn_entry =
40013824: 84 38 00 02 xnor %g0, %g2, %g2
<== NOT EXECUTED
size_t bytes_in_utf8 = buf_size;
40013828: 82 10 20 70 mov 0x70, %g1
<== NOT EXECUTED
4001382c: 80 a0 00 02 cmp %g0, %g2
<== NOT EXECUTED
40013830: 94 60 3f ff subx %g0, -1, %o2
<== NOT EXECUTED
40013834: c2 27 bf 64 st %g1, [ %fp + -156 ]
<== NOT EXECUTED
40013838: 92 07 bf 70 add %fp, -144, %o1
<== NOT EXECUTED
4001383c: 90 10 00 1c mov %i4, %o0
<== NOT EXECUTED
40013840: 7f ff fc 3c call 40012930 <msdos_get_utf16_string_from_long_entry.part.2>
<== NOT EXECUTED
40013844: b0 06 3f ff add %i0, -1, %i0
<== NOT EXECUTED
if (retval >= 0) {
40013848: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
4001384c: 06 80 00 0c bl 4001387c <msdos_find_name_in_fat_file+0x4e0>
<== NOT EXECUTED
40013850: 94 10 00 08 mov %o0, %o2
<== NOT EXECUTED
eno = (*converter->handler->utf16_to_utf8) (
40013854: d0 07 bf 54 ld [ %fp + -172 ], %o0
<== NOT EXECUTED
40013858: c2 02 00 00 ld [ %o0 ], %g1
<== NOT EXECUTED
4001385c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
<== NOT EXECUTED
40013860: 98 07 bf 64 add %fp, -156, %o4
<== NOT EXECUTED
40013864: 96 07 bf 90 add %fp, -112, %o3
<== NOT EXECUTED
40013868: 9f c0 40 00 call %g1
<== NOT EXECUTED
4001386c: 92 07 bf 70 add %fp, -144, %o1
<== NOT EXECUTED
if ( eno == 0 ) {
40013870: b8 92 20 00 orcc %o0, 0, %i4
<== NOT EXECUTED
40013874: 12 80 00 40 bne 40013974 <msdos_find_name_in_fat_file+0x5d8>
<== NOT EXECUTED
40013878: d4 07 bf 64 ld [ %fp + -156 ], %o2
<== NOT EXECUTED
if (bytes_in_entry > 0) {
4001387c: 80 a2 a0 00 cmp %o2, 0
<== NOT EXECUTED
40013880: 22 bf ff 44 be,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
40013884: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
name_len_remaining = msdos_compare_entry_against_filename (
40013888: d6 07 bf 58 ld [ %fp + -168 ], %o3
<== NOT EXECUTED
4001388c: d0 07 bf 54 ld [ %fp + -172 ], %o0
<== NOT EXECUTED
40013890: 98 10 00 15 mov %l5, %o4
<== NOT EXECUTED
40013894: 9a 07 bf 63 add %fp, -157, %o5
<== NOT EXECUTED
40013898: 7f ff fb dc call 40012808 <msdos_compare_entry_against_filename>
<== NOT EXECUTED
4001389c: 92 07 bf 90 add %fp, -112, %o1
<== NOT EXECUTED
if (name_len_remaining < 0 || !entry_matched) {
400138a0: aa 92 20 00 orcc %o0, 0, %l5
<== NOT EXECUTED
400138a4: 26 bf ff 3b bl,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
400138a8: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
400138ac: c2 0f bf 63 ldub [ %fp + -157 ], %g1
<== NOT EXECUTED
400138b0: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
400138b4: 32 bf ff 3a bne,a 4001359c <msdos_find_name_in_fat_file+0x200>
<== NOT EXECUTED
400138b8: ba 07 60 20 add %i5, 0x20, %i5
<== NOT EXECUTED
lfn_start->cln = FAT_FILE_SHORT_NAME;
400138bc: 10 bf ff 35 b 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
400138c0: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
if (bytes_in_entry > 0) {
400138c4: 80 a2 a0 00 cmp %o2, 0
<== NOT EXECUTED
400138c8: 22 bf ff 32 be,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
400138cc: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
name_len_remaining = msdos_compare_entry_against_filename (
400138d0: 10 bf ff 76 b 400136a8 <msdos_find_name_in_fat_file+0x30c>
<== NOT EXECUTED
400138d4: d6 07 bf 58 ld [ %fp + -168 ], %o3
<== NOT EXECUTED
400138d8: b4 10 00 12 mov %l2, %i2
<== NOT EXECUTED
400138dc: a4 10 00 19 mov %i1, %l2
<== NOT EXECUTED
if (!create_node)
400138e0: 80 a6 a0 00 cmp %i2, 0
<== NOT EXECUTED
400138e4: 12 80 00 06 bne 400138fc <msdos_find_name_in_fat_file+0x560>
<== NOT EXECUTED
400138e8: f2 07 a0 48 ld [ %fp + 0x48 ], %i1
<== NOT EXECUTED
rc = MSDOS_NAME_NOT_FOUND_ERR;
400138ec: 31 00 00 1f sethi %hi(0x7c00), %i0
<== NOT EXECUTED
400138f0: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <_ISR_Stack_size+0x6d01>
<== NOT EXECUTED
400138f4: 81 c7 e0 08 ret
<== NOT EXECUTED
400138f8: 81 e8 00 00 restore
<== NOT EXECUTED
if ( !empty_space_found
400138fc: 80 8c e0 ff btst 0xff, %l3
<== NOT EXECUTED
40013900: 12 80 00 06 bne 40013918 <msdos_find_name_in_fat_file+0x57c>
<== NOT EXECUTED
40013904: b0 10 20 00 clr %i0
<== NOT EXECUTED
*empty_entry_count +=
40013908: c2 07 bf 44 ld [ %fp + -188 ], %g1
<== NOT EXECUTED
4001390c: b6 00 40 1b add %g1, %i3, %i3
<== NOT EXECUTED
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013910: bb 37 60 05 srl %i5, 5, %i5
<== NOT EXECUTED
*empty_entry_count +=
40013914: b6 26 c0 1d sub %i3, %i5, %i3
<== NOT EXECUTED
if (!create_node)
40013918: 80 a6 a0 00 cmp %i2, 0
<== NOT EXECUTED
4001391c: 02 bf ff f4 be 400138ec <msdos_find_name_in_fat_file+0x550>
<== NOT EXECUTED
40013920: 82 10 20 01 mov 1, %g1
<== NOT EXECUTED
if ( retval == RC_OK
40013924: 10 bf ff 82 b 4001372c <msdos_find_name_in_fat_file+0x390>
<== NOT EXECUTED
40013928: 80 88 60 ff btst 0xff, %g1
<== NOT EXECUTED
cs = 0;
4001392c: 10 80 00 03 b 40013938 <msdos_find_name_in_fat_file+0x59c>
<== NOT EXECUTED
40013930: 84 10 20 00 clr %g2
<== NOT EXECUTED
40013934: c2 0f 00 04 ldub [ %i4 + %g4 ], %g1
<== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
40013938: 84 08 a0 ff and %g2, 0xff, %g2
<== NOT EXECUTED
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
4001393c: 88 01 20 01 inc %g4
<== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
40013940: 87 28 a0 07 sll %g2, 7, %g3
<== NOT EXECUTED
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
40013944: 80 a1 20 0b cmp %g4, 0xb
<== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
40013948: 85 30 a0 01 srl %g2, 1, %g2
<== NOT EXECUTED
4001394c: 84 00 c0 02 add %g3, %g2, %g2
<== NOT EXECUTED
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
40013950: 12 bf ff f9 bne 40013934 <msdos_find_name_in_fat_file+0x598>
<== NOT EXECUTED
40013954: 84 00 80 01 add %g2, %g1, %g2
<== NOT EXECUTED
name_len_remaining > 0 ||
40013958: c2 0f bf 53 ldub [ %fp + -173 ], %g1
<== NOT EXECUTED
4001395c: 84 08 a0 ff and %g2, 0xff, %g2
<== NOT EXECUTED
40013960: 80 a0 80 01 cmp %g2, %g1
<== NOT EXECUTED
40013964: 32 bf ff 0b bne,a 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
40013968: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
rc = msdos_on_entry_found (
4001396c: 10 bf ff 5b b 400136d8 <msdos_find_name_in_fat_file+0x33c>
<== NOT EXECUTED
40013970: fa 23 a0 60 st %i5, [ %sp + 0x60 ]
<== NOT EXECUTED
errno = eno;
40013974: 40 00 1e ff call 4001b570 <__errno>
<== NOT EXECUTED
40013978: 01 00 00 00 nop
<== NOT EXECUTED
4001397c: f8 22 00 00 st %i4, [ %o0 ]
<== NOT EXECUTED
name_len_remaining = msdos_compare_entry_against_filename (
40013980: 98 10 00 15 mov %l5, %o4
<== NOT EXECUTED
40013984: d6 07 bf 58 ld [ %fp + -168 ], %o3
<== NOT EXECUTED
40013988: d0 07 bf 54 ld [ %fp + -172 ], %o0
<== NOT EXECUTED
bytes_in_entry = msdos_long_entry_to_utf8_name (
4001398c: 94 10 3f ff mov -1, %o2
<== NOT EXECUTED
name_len_remaining = msdos_compare_entry_against_filename (
40013990: 9a 07 bf 63 add %fp, -157, %o5
<== NOT EXECUTED
40013994: 7f ff fb 9d call 40012808 <msdos_compare_entry_against_filename>
<== NOT EXECUTED
40013998: 92 07 bf 90 add %fp, -112, %o1
<== NOT EXECUTED
if (name_len_remaining < 0 || !entry_matched) {
4001399c: aa 92 20 00 orcc %o0, 0, %l5
<== NOT EXECUTED
400139a0: 36 bf ff c4 bge,a 400138b0 <msdos_find_name_in_fat_file+0x514>
<== NOT EXECUTED
400139a4: c2 0f bf 63 ldub [ %fp + -157 ], %g1
<== NOT EXECUTED
lfn_start->cln = FAT_FILE_SHORT_NAME;
400139a8: 10 bf fe fa b 40013590 <msdos_find_name_in_fat_file+0x1f4>
<== NOT EXECUTED
400139ac: ee 27 bf 68 st %l7, [ %fp + -152 ]
<== NOT EXECUTED
name_len_for_compare = msdos_filename_utf8_to_long_name_for_compare (
400139b0: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
<== NOT EXECUTED
400139b4: 98 10 00 18 mov %i0, %o4
<== NOT EXECUTED
400139b8: 96 10 00 1b mov %i3, %o3
<== NOT EXECUTED
400139bc: 40 00 15 9c call 4001902c <msdos_filename_utf8_to_long_name_for_compare>
400139c0: 90 10 00 1c mov %i4, %o0
if (0 >= name_len_for_compare) {
400139c4: ac 92 20 00 orcc %o0, 0, %l6
400139c8: 04 bf fe 9f ble 40013444 <msdos_find_name_in_fat_file+0xa8>
<== NEVER TAKEN
400139cc: 86 07 60 19 add %i5, 0x19, %g3
/ MSDOS_LFN_ENTRY_SIZE;
400139d0: 03 13 b1 3b sethi %hi(0x4ec4ec00), %g1
400139d4: 82 10 60 4f or %g1, 0x4f, %g1 ! 4ec4ec4f <RAM_END+0xe84ec4f>
400139d8: 80 50 c0 01 umul %g3, %g1, %g0
400139dc: 87 40 00 00 rd %y, %g3
400139e0: 10 bf fe b4 b 400134b0 <msdos_find_name_in_fat_file+0x114>
400139e4: 87 30 e0 03 srl %g3, 3, %g3
name_len_for_save = msdos_filename_utf8_to_short_name_for_save (
400139e8: d6 07 bf 58 ld [ %fp + -168 ], %o3
400139ec: d4 07 a0 54 ld [ %fp + 0x54 ], %o2
400139f0: d2 07 a0 50 ld [ %fp + 0x50 ], %o1
400139f4: d0 07 bf 4c ld [ %fp + -180 ], %o0
400139f8: 40 00 16 b9 call 400194dc <msdos_filename_utf8_to_short_name_for_save>
400139fc: 98 10 20 0b mov 0xb, %o4
if (name_len_for_save > 0 ) {
40013a00: 80 a2 20 00 cmp %o0, 0
40013a04: 04 bf fe 90 ble 40013444 <msdos_find_name_in_fat_file+0xa8>
<== NEVER TAKEN
40013a08: 80 a6 e0 00 cmp %i3, 0
if (empty_entry_count < lfn_entries + 1)
40013a0c: 12 80 00 0c bne 40013a3c <msdos_find_name_in_fat_file+0x6a0>
40013a10: 98 07 bf 90 add %fp, -112, %o4
empty_file_offset = fat_fd->fat_file_size -
40013a14: e4 06 60 18 ld [ %i1 + 0x18 ], %l2
ret = fat_file_extend(&fs_info->fat,
40013a18: d6 04 20 08 ld [ %l0 + 8 ], %o3
40013a1c: 96 04 80 0b add %l2, %o3, %o3
40013a20: 94 10 20 01 mov 1, %o2
40013a24: 92 10 00 19 mov %i1, %o1
40013a28: 7f ff f8 24 call 40011ab8 <fat_file_extend>
40013a2c: 90 10 00 10 mov %l0, %o0
if (ret != RC_OK)
40013a30: b0 92 20 00 orcc %o0, 0, %i0
40013a34: 12 80 00 28 bne 40013ad4 <msdos_find_name_in_fat_file+0x738>
<== ALWAYS TAKEN
40013a38: 01 00 00 00 nop
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
40013a3c: c6 07 a0 5c ld [ %fp + 0x5c ], %g3
40013a40: 84 10 3f ff mov -1, %g2
pos->ofs = file_offset & (bts2rd - 1);
40013a44: 82 04 7f ff add %l1, -1, %g1
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
40013a48: c4 20 e0 08 st %g2, [ %g3 + 8 ]
pos->ofs = file_offset & (bts2rd - 1);
40013a4c: 82 08 40 12 and %g1, %l2, %g1
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
40013a50: c4 20 e0 0c st %g2, [ %g3 + 0xc ]
return fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
40013a54: 98 10 00 03 mov %g3, %o4
pos->ofs = file_offset & (bts2rd - 1);
40013a58: c2 20 e0 04 st %g1, [ %g3 + 4 ]
return fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
40013a5c: 96 10 00 12 mov %l2, %o3
40013a60: 94 10 20 01 mov 1, %o2
40013a64: 92 10 00 19 mov %i1, %o1
40013a68: 7f ff f7 df call 400119e4 <fat_file_ioctl>
40013a6c: 90 10 00 10 mov %l0, %o0
entry = fs_info->cl_buf;
40013a70: f4 04 20 c8 ld [ %l0 + 0xc8 ], %i2
40013a74: a2 10 20 20 mov 0x20, %l1
40013a78: b6 10 20 20 mov 0x20, %i3
memcpy(entry, name_dir_entry, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013a7c: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
40013a80: 94 10 20 20 mov 0x20, %o2
40013a84: 40 00 20 97 call 4001bce0 <memcpy>
40013a88: 90 10 00 1a mov %i2, %o0
bytes_written = fat_file_write(&fs_info->fat, fat_fd,
40013a8c: d8 04 20 c8 ld [ %l0 + 0xc8 ], %o4
40013a90: 96 10 00 1b mov %i3, %o3
40013a94: 94 10 00 12 mov %l2, %o2
40013a98: 92 10 00 19 mov %i1, %o1
40013a9c: 90 10 00 10 mov %l0, %o0
40013aa0: 7f ff f8 a2 call 40011d28 <fat_file_write>
40013aa4: b0 10 20 00 clr %i0
if (bytes_written == (ssize_t) length)
40013aa8: 80 a2 00 11 cmp %o0, %l1
40013aac: 02 bf fe 6c be 4001345c <msdos_find_name_in_fat_file+0xc0>
<== ALWAYS TAKEN
40013ab0: 80 a2 3f ff cmp %o0, -1
else if (bytes_written == -1)
40013ab4: 02 bf fe 64 be 40013444 <msdos_find_name_in_fat_file+0xa8>
<== NOT EXECUTED
40013ab8: 01 00 00 00 nop
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
40013abc: 40 00 1e ad call 4001b570 <__errno>
<== NOT EXECUTED
40013ac0: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xbfbfffff>
<== NOT EXECUTED
40013ac4: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
40013ac8: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40013acc: 81 c7 e0 08 ret
<== NOT EXECUTED
40013ad0: 81 e8 00 00 restore
<== NOT EXECUTED
40013ad4: 81 c7 e0 08 ret
40013ad8: 81 e8 00 00 restore
empty_file_offset = fat_fd->fat_file_size -
40013adc: a4 24 80 1b sub %l2, %i3, %l2
if ((*c == ' ') || (*c == '.'))
40013ae0: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
40013ae4: c2 48 40 00 ldsb [ %g1 ], %g1
slot = (empty_file_offset /
40013ae8: 89 34 a0 05 srl %l2, 5, %g4
if ((*c == ' ') || (*c == '.'))
40013aec: 80 a0 60 2e cmp %g1, 0x2e
40013af0: 02 80 00 86 be 40013d08 <msdos_find_name_in_fat_file+0x96c>
<== NEVER TAKEN
40013af4: 88 01 00 1a add %g4, %i2, %g4
40013af8: 80 a0 60 20 cmp %g1, 0x20
40013afc: 02 80 00 84 be 40013d0c <msdos_find_name_in_fat_file+0x970>
<== NEVER TAKEN
40013b00: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
40013b04: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
40013b08: c2 48 60 01 ldsb [ %g1 + 1 ], %g1
40013b0c: 80 a0 60 20 cmp %g1, 0x20
40013b10: 02 80 00 82 be 40013d18 <msdos_find_name_in_fat_file+0x97c>
40013b14: 80 a0 60 2e cmp %g1, 0x2e
40013b18: 02 80 00 81 be 40013d1c <msdos_find_name_in_fat_file+0x980>
<== NEVER TAKEN
40013b1c: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
for (i = 0; i < 2; i++, c++)
40013b20: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
40013b24: 86 00 60 02 add %g1, 2, %g3
40013b28: 3b 10 00 9a sethi %hi(0x40026800), %i5
40013b2c: 82 10 20 0c mov 0xc, %g1
40013b30: ba 17 61 e0 or %i5, 0x1e0, %i5
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
40013b34: 85 31 00 01 srl %g4, %g1, %g2
40013b38: 84 08 a0 0f and %g2, 0xf, %g2
40013b3c: c4 0f 40 02 ldub [ %i5 + %g2 ], %g2
40013b40: c4 28 c0 00 stb %g2, [ %g3 ]
40013b44: 82 00 7f fc add %g1, -4, %g1
for (i = 0; i < 4; i++, c++)
40013b48: 80 a0 7f fc cmp %g1, -4
40013b4c: 12 bf ff fa bne 40013b34 <msdos_find_name_in_fat_file+0x798>
40013b50: 86 00 e0 01 inc %g3
*c++ = '~';
40013b54: 82 10 20 7e mov 0x7e, %g1
40013b58: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
40013b5c: c2 28 a0 06 stb %g1, [ %g2 + 6 ]
*c = '1';
40013b60: 82 10 20 31 mov 0x31, %g1
40013b64: c2 28 a0 07 stb %g1, [ %g2 + 7 ]
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
40013b68: 86 10 20 00 clr %g3
cs = 0;
40013b6c: ba 10 20 00 clr %i5
40013b70: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
40013b74: c4 08 40 03 ldub [ %g1 + %g3 ], %g2
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
40013b78: 82 0f 60 ff and %i5, 0xff, %g1
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
40013b7c: 86 00 e0 01 inc %g3
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
40013b80: bb 28 60 07 sll %g1, 7, %i5
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
40013b84: 80 a0 e0 0b cmp %g3, 0xb
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
40013b88: 83 30 60 01 srl %g1, 1, %g1
40013b8c: 82 00 40 02 add %g1, %g2, %g1
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
40013b90: 12 bf ff f8 bne 40013b70 <msdos_find_name_in_fat_file+0x7d4>
40013b94: ba 07 40 01 add %i5, %g1, %i5
pos->ofs = file_offset & (bts2rd - 1);
40013b98: c4 07 a0 5c ld [ %fp + 0x5c ], %g2
40013b9c: a2 04 7f ff add %l1, -1, %l1
40013ba0: 82 0c 40 12 and %l1, %l2, %g1
40013ba4: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
return fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
40013ba8: 98 00 a0 08 add %g2, 8, %o4
40013bac: 96 10 00 12 mov %l2, %o3
40013bb0: 94 10 20 01 mov 1, %o2
40013bb4: 92 10 00 19 mov %i1, %o1
40013bb8: 7f ff f7 8b call 400119e4 <fat_file_ioctl>
40013bbc: 90 10 00 10 mov %l0, %o0
if (ret != RC_OK)
40013bc0: b0 92 20 00 orcc %o0, 0, %i0
40013bc4: 12 bf fe 26 bne 4001345c <msdos_find_name_in_fat_file+0xc0>
<== NEVER TAKEN
40013bc8: c2 07 a0 5c ld [ %fp + 0x5c ], %g1
* MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
40013bcc: b1 2f 20 05 sll %i4, 5, %i0
short_file_offset = empty_file_offset + lfn_entries
40013bd0: 96 06 00 12 add %i0, %l2, %o3
pos->ofs = file_offset & (bts2rd - 1);
40013bd4: a2 0a c0 11 and %o3, %l1, %l1
40013bd8: e2 20 60 04 st %l1, [ %g1 + 4 ]
return fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM,
40013bdc: 98 10 00 01 mov %g1, %o4
40013be0: 94 10 20 01 mov 1, %o2
40013be4: 92 10 00 19 mov %i1, %o1
40013be8: 7f ff f7 7f call 400119e4 <fat_file_ioctl>
40013bec: 90 10 00 10 mov %l0, %o0
40013bf0: b7 2e a0 05 sll %i2, 5, %i3
for (lfn_entry = 0; lfn_entry < lfn_entries; ++lfn_entry) {
40013bf4: 80 a7 20 00 cmp %i4, 0
entry = fs_info->cl_buf;
40013bf8: f4 04 20 c8 ld [ %l0 + 0xc8 ], %i2
for (lfn_entry = 0; lfn_entry < lfn_entries; ++lfn_entry) {
40013bfc: 02 bf ff a0 be 40013a7c <msdos_find_name_in_fat_file+0x6e0>
<== NEVER TAKEN
40013c00: a2 10 00 1b mov %i3, %l1
40013c04: c2 07 bf 58 ld [ %fp + -168 ], %g1
40013c08: aa 5f 20 1a smul %i4, 0x1a, %l5
40013c0c: a8 10 00 1c mov %i4, %l4
40013c10: aa 05 7f e6 add %l5, -26, %l5
40013c14: a6 10 20 00 clr %l3
40013c18: aa 00 40 15 add %g1, %l5, %l5
entry = fs_info->cl_buf;
40013c1c: 98 10 00 1a mov %i2, %o4
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013c20: 90 10 00 0c mov %o4, %o0
40013c24: 94 10 20 20 mov 0x20, %o2
40013c28: 40 00 20 6a call 4001bdd0 <memset>
40013c2c: 92 10 20 00 clr %o1
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
40013c30: fa 2a 20 0d stb %i5, [ %o0 + 0xd ]
n = (const uint8_t *) name_converted +
40013c34: 84 10 00 15 mov %l5, %g2
if (*n != 0 || *(n + 1) != 0)
40013c38: c8 08 80 00 ldub [ %g2 ], %g4
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013c3c: 98 10 00 08 mov %o0, %o4
40013c40: 82 02 20 01 add %o0, 1, %g1
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; ++i)
40013c44: 86 10 20 00 clr %g3
if (*n != 0 || *(n + 1) != 0)
40013c48: 80 89 20 ff btst 0xff, %g4
40013c4c: 12 80 00 15 bne 40013ca0 <msdos_find_name_in_fat_file+0x904>
<== ALWAYS TAKEN
40013c50: 9a 10 20 00 clr %o5
40013c54: de 08 a0 01 ldub [ %g2 + 1 ], %o7
<== NOT EXECUTED
40013c58: 80 a3 e0 00 cmp %o7, 0
40013c5c: 32 80 00 12 bne,a 40013ca4 <msdos_find_name_in_fat_file+0x908>
40013c60: c8 28 40 00 stb %g4, [ %g1 ]
p [0] = fill;
40013c64: da 28 40 00 stb %o5, [ %g1 ]
40013c68: 88 00 e0 01 add %g3, 1, %g4
p [1] = fill;
40013c6c: da 28 60 01 stb %o5, [ %g1 + 1 ]
switch (i)
40013c70: 80 a0 e0 04 cmp %g3, 4
40013c74: 02 80 00 12 be 40013cbc <msdos_find_name_in_fat_file+0x920>
40013c78: 9a 10 3f ff mov -1, %o5
40013c7c: 80 a0 e0 0a cmp %g3, 0xa
40013c80: 12 80 00 12 bne 40013cc8 <msdos_find_name_in_fat_file+0x92c>
40013c84: 80 a1 20 0d cmp %g4, 0xd
p += 4;
40013c88: 82 00 60 04 add %g1, 4, %g1
entry = fs_info->cl_buf;
40013c8c: 86 10 00 04 mov %g4, %g3
if (*n != 0 || *(n + 1) != 0)
40013c90: c8 08 80 00 ldub [ %g2 ], %g4
40013c94: 80 89 20 ff btst 0xff, %g4
40013c98: 22 bf ff f0 be,a 40013c58 <msdos_find_name_in_fat_file+0x8bc>
40013c9c: de 08 a0 01 ldub [ %g2 + 1 ], %o7
*p = *n;
40013ca0: c8 28 40 00 stb %g4, [ %g1 ]
n += MSDOS_NAME_LFN_BYTES_PER_CHAR;
40013ca4: 84 00 a0 02 add %g2, 2, %g2
*(p + 1) = *(n + 1);
40013ca8: c8 08 bf ff ldub [ %g2 + -1 ], %g4
40013cac: c8 28 60 01 stb %g4, [ %g1 + 1 ]
switch (i)
40013cb0: 80 a0 e0 04 cmp %g3, 4
40013cb4: 12 bf ff f2 bne 40013c7c <msdos_find_name_in_fat_file+0x8e0>
40013cb8: 88 00 e0 01 add %g3, 1, %g4
p += 5;
40013cbc: 82 00 60 05 add %g1, 5, %g1
entry = fs_info->cl_buf;
40013cc0: 10 bf ff f4 b 40013c90 <msdos_find_name_in_fat_file+0x8f4>
40013cc4: 86 10 00 04 mov %g4, %g3
for (i = 0; i < MSDOS_LFN_LEN_PER_ENTRY; ++i)
40013cc8: 12 bf ff f1 bne 40013c8c <msdos_find_name_in_fat_file+0x8f0>
40013ccc: 82 00 60 02 add %g1, 2, %g1
if (lfn_entry == 0)
40013cd0: 80 a4 e0 00 cmp %l3, 0
40013cd4: 02 80 00 15 be 40013d28 <msdos_find_name_in_fat_file+0x98c>
40013cd8: e8 2b 00 00 stb %l4, [ %o4 ]
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
40013cdc: c2 0b 20 0b ldub [ %o4 + 0xb ], %g1
40013ce0: 82 10 60 0f or %g1, 0xf, %g1
40013ce4: c2 2b 20 0b stb %g1, [ %o4 + 0xb ]
for (lfn_entry = 0; lfn_entry < lfn_entries; ++lfn_entry) {
40013ce8: a6 04 e0 01 inc %l3
40013cec: a8 05 3f ff add %l4, -1, %l4
entry += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
40013cf0: 98 03 20 20 add %o4, 0x20, %o4
for (lfn_entry = 0; lfn_entry < lfn_entries; ++lfn_entry) {
40013cf4: 80 a7 00 13 cmp %i4, %l3
40013cf8: 12 bf ff ca bne 40013c20 <msdos_find_name_in_fat_file+0x884>
40013cfc: aa 05 7f e6 add %l5, -26, %l5
40013d00: 10 bf ff 5f b 40013a7c <msdos_find_name_in_fat_file+0x6e0>
40013d04: b4 06 80 18 add %i2, %i0, %i2
*c = '_';
40013d08: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
<== NOT EXECUTED
40013d0c: 82 10 20 5f mov 0x5f, %g1
<== NOT EXECUTED
40013d10: 10 bf ff 7d b 40013b04 <msdos_find_name_in_fat_file+0x768>
<== NOT EXECUTED
40013d14: c2 28 80 00 stb %g1, [ %g2 ]
<== NOT EXECUTED
40013d18: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
40013d1c: 82 10 20 5f mov 0x5f, %g1
40013d20: 10 bf ff 80 b 40013b20 <msdos_find_name_in_fat_file+0x784>
40013d24: c2 28 a0 01 stb %g1, [ %g2 + 1 ]
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
40013d28: 82 15 20 40 or %l4, 0x40, %g1
40013d2c: 10 bf ff ec b 40013cdc <msdos_find_name_in_fat_file+0x940>
40013d30: c2 2b 00 00 stb %g1, [ %o4 ]
eno = EINVAL;
40013d34: 10 bf fe 58 b 40013694 <msdos_find_name_in_fat_file+0x2f8>
<== NOT EXECUTED
40013d38: aa 10 20 16 mov 0x16, %l5
<== NOT EXECUTED
assert(bytes_read == bts2rd);
40013d3c: 17 10 00 9a sethi %hi(0x40026800), %o3
<== NOT EXECUTED
40013d40: 15 10 00 9a sethi %hi(0x40026800), %o2
<== NOT EXECUTED
40013d44: 11 10 00 9a sethi %hi(0x40026800), %o0
<== NOT EXECUTED
40013d48: 96 12 e1 c8 or %o3, 0x1c8, %o3
<== NOT EXECUTED
40013d4c: 94 12 a2 38 or %o2, 0x238, %o2
<== NOT EXECUTED
40013d50: 92 10 25 4c mov 0x54c, %o1
<== NOT EXECUTED
40013d54: 40 00 13 10 call 40018994 <__assert_func>
<== NOT EXECUTED
40013d58: 90 12 21 48 or %o0, 0x148, %o0
<== NOT EXECUTED
40013d5c: 80 a0 00 18 cmp %g0, %i0
40013d60: 82 60 3f ff subx %g0, -1, %g1
40013d64: 10 bf fe 71 b 40013728 <msdos_find_name_in_fat_file+0x38c>
40013d68: 82 0e 80 01 and %i2, %g1, %g1
assert(name_utf8_len > 0);
40013d6c: 17 10 00 9a sethi %hi(0x40026800), %o3
<== NOT EXECUTED
40013d70: 15 10 00 9a sethi %hi(0x40026800), %o2
<== NOT EXECUTED
40013d74: 11 10 00 9a sethi %hi(0x40026800), %o0
<== NOT EXECUTED
40013d78: 96 12 e1 b0 or %o3, 0x1b0, %o3
<== NOT EXECUTED
40013d7c: 94 12 a2 58 or %o2, 0x258, %o2
<== NOT EXECUTED
40013d80: 92 10 27 45 mov 0x745, %o1
<== NOT EXECUTED
40013d84: 40 00 13 04 call 40018994 <__assert_func>
<== NOT EXECUTED
40013d88: 90 12 21 48 or %o0, 0x148, %o0
<== NOT EXECUTED
40013d8c: 01 00 00 00 nop
<== NOT EXECUTED
40013d90 <msdos_find_node_by_cluster_num_in_fat_file>:
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
40013d90: 9d e3 bf a0 save %sp, -96, %sp
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
40013d94: c2 06 60 20 ld [ %i1 + 0x20 ], %g1
40013d98: 80 a0 60 01 cmp %g1, 1
40013d9c: 02 80 00 34 be 40013e6c <msdos_find_node_by_cluster_num_in_fat_file+0xdc>
40013da0: e2 06 20 08 ld [ %i0 + 8 ], %l1
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
40013da4: f0 04 60 08 ld [ %l1 + 8 ], %i0
40013da8: d8 04 60 c8 ld [ %l1 + 0xc8 ], %o4
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
rtems_set_errno_and_return_minus_one( EIO );
assert(ret == bts2rd);
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40013dac: a4 10 20 00 clr %l2
while ((ret = fat_file_read(&fs_info->fat, fat_fd, j * bts2rd, bts2rd,
40013db0: 96 10 00 18 mov %i0, %o3
40013db4: 94 10 00 12 mov %l2, %o2
40013db8: 92 10 00 19 mov %i1, %o1
40013dbc: 7f ff f6 16 call 40011614 <fat_file_read>
40013dc0: 90 10 00 11 mov %l1, %o0
40013dc4: 80 a2 20 00 cmp %o0, 0
40013dc8: 02 80 00 25 be 40013e5c <msdos_find_node_by_cluster_num_in_fat_file+0xcc>
<== NEVER TAKEN
40013dcc: 80 a2 20 1f cmp %o0, 0x1f
if ( ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE )
40013dd0: 04 80 00 42 ble 40013ed8 <msdos_find_node_by_cluster_num_in_fat_file+0x148>
<== NEVER TAKEN
40013dd4: 80 a2 00 18 cmp %o0, %i0
assert(ret == bts2rd);
40013dd8: 12 80 00 46 bne 40013ef0 <msdos_find_node_by_cluster_num_in_fat_file+0x160>
<== NEVER TAKEN
40013ddc: a0 10 20 00 clr %l0
{
char* entry = (char*) fs_info->cl_buf + i;
40013de0: d8 04 60 c8 ld [ %l1 + 0xc8 ], %o4
40013de4: ba 10 00 0c mov %o4, %i5
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
40013de8: c2 0f 40 00 ldub [ %i5 ], %g1
40013dec: 80 a0 60 00 cmp %g1, 0
40013df0: 02 80 00 1b be 40013e5c <msdos_find_node_by_cluster_num_in_fat_file+0xcc>
<== NEVER TAKEN
40013df4: 80 a0 60 e5 cmp %g1, 0xe5
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
return MSDOS_NAME_NOT_FOUND_ERR;
/* if this entry is empty - skip it */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
40013df8: 22 80 00 14 be,a 40013e48 <msdos_find_node_by_cluster_num_in_fat_file+0xb8>
<== NEVER TAKEN
40013dfc: a0 04 20 20 add %l0, 0x20, %l0
<== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
40013e00: c2 17 60 1a lduh [ %i5 + 0x1a ], %g1
40013e04: c6 17 60 14 lduh [ %i5 + 0x14 ], %g3
40013e08: 85 28 60 08 sll %g1, 8, %g2
40013e0c: 89 28 60 10 sll %g1, 0x10, %g4
40013e10: 83 28 e0 08 sll %g3, 8, %g1
40013e14: 89 31 20 18 srl %g4, 0x18, %g4
40013e18: 87 28 e0 10 sll %g3, 0x10, %g3
40013e1c: 84 10 80 04 or %g2, %g4, %g2
40013e20: 87 30 e0 18 srl %g3, 0x18, %g3
40013e24: 85 28 a0 10 sll %g2, 0x10, %g2
40013e28: 82 10 40 03 or %g1, %g3, %g1
40013e2c: 85 30 a0 10 srl %g2, 0x10, %g2
40013e30: 83 28 60 10 sll %g1, 0x10, %g1
40013e34: 82 10 40 02 or %g1, %g2, %g1
40013e38: 80 a0 40 1a cmp %g1, %i2
40013e3c: 22 80 00 16 be,a 40013e94 <msdos_find_node_by_cluster_num_in_fat_file+0x104>
40013e40: 98 10 00 1b mov %i3, %o4
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
40013e44: a0 04 20 20 add %l0, 0x20, %l0
40013e48: 80 a4 00 18 cmp %l0, %i0
40013e4c: 0a bf ff e7 bcs 40013de8 <msdos_find_node_by_cluster_num_in_fat_file+0x58>
<== ALWAYS TAKEN
40013e50: ba 07 60 20 add %i5, 0x20, %i5
40013e54: 10 bf ff d7 b 40013db0 <msdos_find_node_by_cluster_num_in_fat_file+0x20>
<== NOT EXECUTED
40013e58: a4 04 80 08 add %l2, %o0, %l2
<== NOT EXECUTED
return MSDOS_NAME_NOT_FOUND_ERR;
40013e5c: 31 00 00 1f sethi %hi(0x7c00), %i0
<== NOT EXECUTED
40013e60: b0 16 21 01 or %i0, 0x101, %i0 ! 7d01 <_ISR_Stack_size+0x6d01>
<== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
40013e64: 81 c7 e0 08 ret
<== NOT EXECUTED
40013e68: 81 e8 00 00 restore
<== NOT EXECUTED
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
40013e6c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
40013e70: 80 a0 60 00 cmp %g1, 0
40013e74: 32 bf ff cd bne,a 40013da8 <msdos_find_node_by_cluster_num_in_fat_file+0x18>
<== NEVER TAKEN
40013e78: f0 04 60 08 ld [ %l1 + 8 ], %i0
<== NOT EXECUTED
40013e7c: c2 0c 60 16 ldub [ %l1 + 0x16 ], %g1
40013e80: 80 88 60 03 btst 3, %g1
40013e84: 22 bf ff c9 be,a 40013da8 <msdos_find_node_by_cluster_num_in_fat_file+0x18>
<== NEVER TAKEN
40013e88: f0 04 60 08 ld [ %l1 + 8 ], %i0
<== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
40013e8c: 10 bf ff c7 b 40013da8 <msdos_find_node_by_cluster_num_in_fat_file+0x18>
40013e90: f0 06 60 18 ld [ %i1 + 0x18 ], %i0
rc = fat_file_ioctl(&fs_info->fat, fat_fd, F_CLU_NUM, j * bts2rd,
40013e94: 96 10 00 12 mov %l2, %o3
40013e98: 94 10 20 01 mov 1, %o2
40013e9c: 92 10 00 19 mov %i1, %o1
40013ea0: 7f ff f6 d1 call 400119e4 <fat_file_ioctl>
40013ea4: 90 10 00 11 mov %l1, %o0
if (rc != RC_OK)
40013ea8: b0 92 20 00 orcc %o0, 0, %i0
40013eac: 12 bf ff ee bne 40013e64 <msdos_find_node_by_cluster_num_in_fat_file+0xd4>
<== NEVER TAKEN
40013eb0: 82 10 3f ff mov -1, %g1
dir_pos->sname.ofs = i;
40013eb4: e0 26 e0 04 st %l0, [ %i3 + 4 ]
memcpy(dir_entry, entry,
40013eb8: 94 10 20 20 mov 0x20, %o2
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
40013ebc: c2 26 e0 08 st %g1, [ %i3 + 8 ]
memcpy(dir_entry, entry,
40013ec0: 92 10 00 1d mov %i5, %o1
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
40013ec4: c2 26 e0 0c st %g1, [ %i3 + 0xc ]
memcpy(dir_entry, entry,
40013ec8: 40 00 1f 86 call 4001bce0 <memcpy>
40013ecc: 90 10 00 1c mov %i4, %o0
return RC_OK;
40013ed0: 81 c7 e0 08 ret
40013ed4: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one( EIO );
40013ed8: 40 00 1d a6 call 4001b570 <__errno>
<== NOT EXECUTED
40013edc: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
40013ee0: 82 10 20 05 mov 5, %g1
<== NOT EXECUTED
40013ee4: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
40013ee8: 81 c7 e0 08 ret
<== NOT EXECUTED
40013eec: 81 e8 00 00 restore
<== NOT EXECUTED
assert(ret == bts2rd);
40013ef0: 17 10 00 9a sethi %hi(0x40026800), %o3
<== NOT EXECUTED
40013ef4: 15 10 00 9a sethi %hi(0x40026800), %o2
<== NOT EXECUTED
40013ef8: 11 10 00 9a sethi %hi(0x40026800), %o0
<== NOT EXECUTED
40013efc: 96 12 e1 f8 or %o3, 0x1f8, %o3
<== NOT EXECUTED
40013f00: 94 12 a2 08 or %o2, 0x208, %o2
<== NOT EXECUTED
40013f04: 92 10 27 f0 mov 0x7f0, %o1
<== NOT EXECUTED
40013f08: 40 00 12 a3 call 40018994 <__assert_func>
<== NOT EXECUTED
40013f0c: 90 12 21 48 or %o0, 0x148, %o0
<== NOT EXECUTED
40013f10: 01 00 00 00 nop
<== NOT EXECUTED
40005e1c <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
40005e1c: 9d e3 be b8 save %sp, -328, %sp
memset(&fmt_params, 0, sizeof(fmt_params));
/*
* open device for writing
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
40005e20: 92 10 20 02 mov 2, %o1
40005e24: 90 10 00 19 mov %i1, %o0
memset(&fmt_params, 0, sizeof(fmt_params));
40005e28: c0 27 bf 40 clr [ %fp + -192 ]
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
40005e2c: 15 10 00 98 sethi %hi(0x40026000), %o2
memset(&fmt_params, 0, sizeof(fmt_params));
40005e30: c0 27 bf 44 clr [ %fp + -188 ]
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
40005e34: 94 12 a3 a0 or %o2, 0x3a0, %o2
memset(&fmt_params, 0, sizeof(fmt_params));
40005e38: c0 27 bf 48 clr [ %fp + -184 ]
{
40005e3c: ba 10 00 18 mov %i0, %i5
memset(&fmt_params, 0, sizeof(fmt_params));
40005e40: c0 27 bf 4c clr [ %fp + -180 ]
40005e44: c0 27 bf 50 clr [ %fp + -176 ]
40005e48: c0 27 bf 54 clr [ %fp + -172 ]
40005e4c: c0 27 bf 58 clr [ %fp + -168 ]
40005e50: c0 27 bf 5c clr [ %fp + -164 ]
40005e54: c0 27 bf 60 clr [ %fp + -160 ]
40005e58: c0 27 bf 64 clr [ %fp + -156 ]
40005e5c: c0 27 bf 68 clr [ %fp + -152 ]
40005e60: c0 27 bf 6c clr [ %fp + -148 ]
40005e64: c0 27 bf 70 clr [ %fp + -144 ]
40005e68: c0 27 bf 74 clr [ %fp + -140 ]
40005e6c: c0 27 bf 78 clr [ %fp + -136 ]
40005e70: c0 27 bf 7c clr [ %fp + -132 ]
40005e74: c0 27 bf 80 clr [ %fp + -128 ]
40005e78: c0 27 bf 84 clr [ %fp + -124 ]
40005e7c: c0 27 bf 88 clr [ %fp + -120 ]
40005e80: c0 27 bf 8c clr [ %fp + -116 ]
40005e84: c0 27 bf 90 clr [ %fp + -112 ]
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, "open device\n");
40005e88: 7f ff ff 43 call 40005b94 <msdos_format_printf>
40005e8c: c0 27 bf 94 clr [ %fp + -108 ]
fd = open(devname, O_RDWR);
40005e90: 92 10 20 02 mov 2, %o1
40005e94: 7f ff fa 41 call 40004798 <open>
40005e98: 90 10 00 18 mov %i0, %o0
if (fd == -1) {
40005e9c: 80 a2 3f ff cmp %o0, -1
40005ea0: 02 80 01 26 be 40006338 <msdos_format+0x51c>
<== NEVER TAKEN
40005ea4: a0 10 00 08 mov %o0, %l0
}
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40005ea8: 96 10 00 18 mov %i0, %o3
40005eac: 92 10 20 02 mov 2, %o1
40005eb0: 90 10 00 19 mov %i1, %o0
40005eb4: 15 10 00 98 sethi %hi(0x40026000), %o2
40005eb8: 7f ff ff 37 call 40005b94 <msdos_format_printf>
40005ebc: 94 12 a3 b0 or %o2, 0x3b0, %o2 ! 400263b0 <rtems_filesystem_null_handlers+0xa8>
"stat check: %s\n", devname);
if (ret_val == 0) {
ret_val = fstat(fd, &stat_buf);
40005ec0: 92 07 bf 98 add %fp, -104, %o1
40005ec4: 7f ff f7 3b call 40003bb0 <fstat>
40005ec8: 90 10 00 10 mov %l0, %o0
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
40005ecc: 96 10 00 1d mov %i5, %o3
ret_val = fstat(fd, &stat_buf);
40005ed0: b0 10 00 08 mov %o0, %i0
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
40005ed4: 92 10 20 01 mov 1, %o1
40005ed8: 15 10 00 98 sethi %hi(0x40026000), %o2
40005edc: 90 10 00 19 mov %i1, %o0
40005ee0: 7f ff ff 2d call 40005b94 <msdos_format_printf>
40005ee4: 94 12 a3 c0 or %o2, 0x3c0, %o2
"formating: %s\n", devname);
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) && (!S_ISBLK(stat_buf.st_mode))) {
40005ee8: 80 a6 20 00 cmp %i0, 0
40005eec: 12 80 01 08 bne 4000630c <msdos_format+0x4f0>
<== NEVER TAKEN
40005ef0: 05 00 00 3c sethi %hi(0xf000), %g2
40005ef4: c2 07 bf a8 ld [ %fp + -88 ], %g1
40005ef8: 82 08 40 02 and %g1, %g2, %g1
40005efc: 05 00 00 18 sethi %hi(0x6000), %g2
40005f00: 80 a0 40 02 cmp %g1, %g2
40005f04: 12 80 01 08 bne 40006324 <msdos_format+0x508>
<== NEVER TAKEN
40005f08: 94 07 bf 40 add %fp, -192, %o2
memset(fmt_params,0,sizeof(*fmt_params));
40005f0c: c0 27 bf 40 clr [ %fp + -192 ]
40005f10: c0 27 bf 44 clr [ %fp + -188 ]
static inline int rtems_disk_fd_get_media_block_size(
int fd,
uint32_t *media_block_size
)
{
return ioctl(fd, RTEMS_BLKIO_GETMEDIABLKSIZE, media_block_size);
40005f14: 3b 10 01 10 sethi %hi(0x40044000), %i5
40005f18: c0 27 bf 48 clr [ %fp + -184 ]
40005f1c: 90 10 00 10 mov %l0, %o0
40005f20: c0 27 bf 4c clr [ %fp + -180 ]
40005f24: 92 17 62 02 or %i5, 0x202, %o1
40005f28: c0 27 bf 50 clr [ %fp + -176 ]
40005f2c: c0 27 bf 54 clr [ %fp + -172 ]
40005f30: c0 27 bf 58 clr [ %fp + -168 ]
40005f34: c0 27 bf 5c clr [ %fp + -164 ]
40005f38: c0 27 bf 60 clr [ %fp + -160 ]
40005f3c: c0 27 bf 64 clr [ %fp + -156 ]
40005f40: c0 27 bf 68 clr [ %fp + -152 ]
40005f44: c0 27 bf 6c clr [ %fp + -148 ]
40005f48: c0 27 bf 70 clr [ %fp + -144 ]
40005f4c: c0 27 bf 74 clr [ %fp + -140 ]
40005f50: c0 27 bf 78 clr [ %fp + -136 ]
40005f54: c0 27 bf 7c clr [ %fp + -132 ]
40005f58: c0 27 bf 80 clr [ %fp + -128 ]
40005f5c: c0 27 bf 84 clr [ %fp + -124 ]
40005f60: c0 27 bf 88 clr [ %fp + -120 ]
40005f64: c0 27 bf 8c clr [ %fp + -116 ]
40005f68: c0 27 bf 90 clr [ %fp + -112 ]
40005f6c: 40 00 23 a3 call 4000edf8 <ioctl>
40005f70: c0 27 bf 94 clr [ %fp + -108 ]
40005f74: d8 07 bf 44 ld [ %fp + -188 ], %o4
if (ret_val == 0) {
40005f78: 80 a2 20 00 cmp %o0, 0
40005f7c: 02 80 01 00 be 4000637c <msdos_format+0x560>
<== ALWAYS TAKEN
40005f80: b0 10 00 08 mov %o0, %i0
if ( fmt_params->totl_sector_cnt == 0 )
40005f84: 80 a3 20 00 cmp %o4, 0
<== NOT EXECUTED
40005f88: 02 80 01 e1 be 4000670c <msdos_format+0x8f0>
<== NOT EXECUTED
40005f8c: 01 00 00 00 nop
<== NOT EXECUTED
40005f90: fa 07 bf 48 ld [ %fp + -184 ], %i5
40005f94: c2 0f bf 70 ldub [ %fp + -144 ], %g1
40005f98: c6 07 bf 50 ld [ %fp + -176 ], %g3
40005f9c: 82 58 40 03 smul %g1, %g3, %g1
40005fa0: 82 00 40 1d add %g1, %i5, %g1
fmt_params->root_dir_start_sec =
40005fa4: c2 27 bf 60 st %g1, [ %fp + -160 ]
if (fmt_params->root_dir_sectors > 0) {
40005fa8: c4 07 bf 5c ld [ %fp + -164 ], %g2
40005fac: 80 a0 a0 00 cmp %g2, 0
40005fb0: 02 80 01 dc be 40006720 <msdos_format+0x904>
40005fb4: c2 07 bf 4c ld [ %fp + -180 ], %g1
fmt_params->root_dir_fmt_sec_cnt = fmt_params->root_dir_sectors;
40005fb8: c4 27 bf 64 st %g2, [ %fp + -156 ]
if (ret_val == 0) {
40005fbc: 80 a6 20 00 cmp %i0, 0
40005fc0: 12 80 00 d3 bne 4000630c <msdos_format+0x4f0>
40005fc4: 80 a6 60 00 cmp %i1, 0
if ((rqdata != NULL) && (rqdata->OEMName != NULL)) {
40005fc8: 02 80 02 d2 be 40006b10 <msdos_format+0xcf4>
40005fcc: 07 10 00 98 sethi %hi(0x40026000), %g3
40005fd0: c6 06 40 00 ld [ %i1 ], %g3
40005fd4: 80 a0 e0 00 cmp %g3, 0
40005fd8: 22 80 02 ce be,a 40006b10 <msdos_format+0xcf4>
40005fdc: 07 10 00 98 sethi %hi(0x40026000), %g3
40005fe0: 3b 10 00 9b sethi %hi(0x40026c00), %i5
from = "RTEMS"; /* default: make "from" point to OS Name */
40005fe4: 82 07 bf 73 add %fp, -141, %g1
40005fe8: ba 17 63 a1 or %i5, 0x3a1, %i5
40005fec: b8 07 bf 7b add %fp, -133, %i4
*to++=' ';
40005ff0: 10 80 00 07 b 4000600c <msdos_format+0x1f0>
40005ff4: b6 10 20 20 mov 0x20, %i3
*to++ = *from++;
40005ff8: c4 28 7f ff stb %g2, [ %g1 + -1 ]
40005ffc: 86 00 e0 01 inc %g3
for (cnt = 0; cnt < (sizeof(fmt_params->OEMName)-1); cnt++) {
40006000: 80 a0 40 1c cmp %g1, %i4
40006004: 02 80 00 0c be 40006034 <msdos_format+0x218>
<== NEVER TAKEN
40006008: c0 28 40 00 clrb [ %g1 ]
if (isprint((unsigned char)*from)) {
4000600c: c4 08 c0 00 ldub [ %g3 ], %g2
40006010: 88 08 a0 ff and %g2, 0xff, %g4
40006014: c8 4f 40 04 ldsb [ %i5 + %g4 ], %g4
40006018: 80 89 20 97 btst 0x97, %g4
4000601c: 12 bf ff f7 bne 40005ff8 <msdos_format+0x1dc>
40006020: 82 00 60 01 inc %g1
*to++=' ';
40006024: f6 28 7f ff stb %i3, [ %g1 + -1 ]
for (cnt = 0; cnt < (sizeof(fmt_params->OEMName)-1); cnt++) {
40006028: 80 a0 40 1c cmp %g1, %i4
4000602c: 12 bf ff f8 bne 4000600c <msdos_format+0x1f0>
40006030: c0 28 40 00 clrb [ %g1 ]
if ((rqdata != NULL) &&
40006034: 80 a6 60 00 cmp %i1, 0
40006038: 02 80 02 b4 be 40006b08 <msdos_format+0xcec>
4000603c: 07 10 00 99 sethi %hi(0x40026400), %g3
(rqdata->VolLabel != NULL)) {
40006040: c6 06 60 04 ld [ %i1 + 4 ], %g3
if ((rqdata != NULL) &&
40006044: 80 a0 e0 00 cmp %g3, 0
40006048: 22 80 02 b0 be,a 40006b08 <msdos_format+0xcec>
4000604c: 07 10 00 99 sethi %hi(0x40026400), %g3
fmt_params->VolLabel_present = true;
40006050: 82 10 20 01 mov 1, %g1
40006054: c2 2f bf 88 stb %g1, [ %fp + -120 ]
40006058: b8 07 bf 87 add %fp, -121, %i4
from = ""; /* default: make "from" point to empty string */
4000605c: 82 07 bf 7c add %fp, -132, %g1
*to++=' ';
40006060: 10 80 00 07 b 4000607c <msdos_format+0x260>
40006064: b6 10 20 20 mov 0x20, %i3
*to++ = *from++;
40006068: c4 28 7f ff stb %g2, [ %g1 + -1 ]
4000606c: 86 00 e0 01 inc %g3
for (cnt = 0; cnt < (sizeof(fmt_params->VolLabel)-1); cnt++) {
40006070: 80 a0 40 1c cmp %g1, %i4
40006074: 02 80 00 0c be 400060a4 <msdos_format+0x288>
<== NEVER TAKEN
40006078: c0 28 40 00 clrb [ %g1 ]
if (isprint((unsigned char)*from)) {
4000607c: c4 08 c0 00 ldub [ %g3 ], %g2
40006080: 88 08 a0 ff and %g2, 0xff, %g4
40006084: c8 4f 40 04 ldsb [ %i5 + %g4 ], %g4
40006088: 80 89 20 97 btst 0x97, %g4
4000608c: 12 bf ff f7 bne 40006068 <msdos_format+0x24c>
40006090: 82 00 60 01 inc %g1
*to++=' ';
40006094: f6 28 7f ff stb %i3, [ %g1 + -1 ]
for (cnt = 0; cnt < (sizeof(fmt_params->VolLabel)-1); cnt++) {
40006098: 80 a0 40 1c cmp %g1, %i4
4000609c: 12 bf ff f8 bne 4000607c <msdos_format+0x260>
400060a0: c0 28 40 00 clrb [ %g1 ]
rc = rtems_clock_get_tod_timeval(&time_value);
400060a4: 40 00 0b 66 call 40008e3c <rtems_clock_get_tod_timeval>
400060a8: 90 07 bf 30 add %fp, -208, %o0
if (rc == RTEMS_SUCCESSFUL) {
400060ac: 80 a2 20 00 cmp %o0, 0
400060b0: 12 80 03 d7 bne 4000700c <msdos_format+0x11f0>
<== ALWAYS TAKEN
400060b4: c2 07 bf 34 ld [ %fp + -204 ], %g1
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
400060b8: 83 28 60 01 sll %g1, 1, %g1
<== NOT EXECUTED
400060bc: c2 27 bf 8c st %g1, [ %fp + -116 ]
<== NOT EXECUTED
if (ret_val == 0) {
ret_val = msdos_format_determine_fmt_params(fd,rqdata,&fmt_params);
}
if (ret_val == 0) {
fmt_params.sec = malloc(fmt_params.bytes_per_sector);
400060c0: 7f ff f7 66 call 40003e58 <malloc>
400060c4: d0 07 bf 40 ld [ %fp + -192 ], %o0
if (fmt_params.sec == NULL) {
400060c8: 80 a2 20 00 cmp %o0, 0
400060cc: 02 80 02 60 be 40006a4c <msdos_format+0xc30>
<== NEVER TAKEN
400060d0: d0 27 bf 94 st %o0, [ %fp + -108 ]
}
/*
* if requested, write whole disk/partition with 0xe5
*/
if ((ret_val == 0) &&
400060d4: 80 a6 60 00 cmp %i1, 0
400060d8: 32 80 02 0a bne,a 40006900 <msdos_format+0xae4>
400060dc: c2 0e 60 15 ldub [ %i1 + 0x15 ], %g1
(rqdata != NULL) &&
400060e0: b6 10 20 00 clr %i3
*/
if (ret_val == 0) {
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
400060e4: 92 10 20 02 mov 2, %o1
400060e8: 90 10 00 19 mov %i1, %o0
400060ec: 15 10 00 99 sethi %hi(0x40026400), %o2
400060f0: 7f ff fe a9 call 40005b94 <msdos_format_printf>
400060f4: 94 12 a0 a8 or %o2, 0xa8, %o2 ! 400264a8 <rtems_filesystem_null_handlers+0x1a0>
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
400060f8: 96 10 20 00 clr %o3
"read MRB sector\n");
ret_val = msdos_format_read_sec(fd,
400060fc: f8 07 bf 40 ld [ %fp + -192 ], %i4
40006100: fa 07 bf 94 ld [ %fp + -108 ], %i5
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
40006104: 92 10 20 00 clr %o1
40006108: 94 10 20 00 clr %o2
4000610c: 40 00 23 76 call 4000eee4 <lseek>
40006110: 90 10 00 10 mov %l0, %o0
40006114: 80 a2 20 00 cmp %o0, 0
40006118: 06 80 02 4d bl 40006a4c <msdos_format+0xc30>
<== NEVER TAKEN
4000611c: 94 10 00 1c mov %i4, %o2
if (0 > read(fd,buffer,sector_size)) {
40006120: 92 10 00 1d mov %i5, %o1
40006124: 40 00 23 a7 call 4000efc0 <read>
40006128: 90 10 00 10 mov %l0, %o0
4000612c: 80 a2 20 00 cmp %o0, 0
40006130: 06 80 02 47 bl 40006a4c <msdos_format+0xc30>
<== NEVER TAKEN
40006134: 92 10 20 02 mov 2, %o1
0,
fmt_params.bytes_per_sector,
fmt_params.sec);
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40006138: 15 10 00 99 sethi %hi(0x40026400), %o2
4000613c: 90 10 00 19 mov %i1, %o0
40006140: 7f ff fe 95 call 40005b94 <msdos_format_printf>
40006144: 94 12 a0 48 or %o2, 0x48, %o2
if (fmt_params->totl_sector_cnt < 0x10000) {
40006148: c2 07 bf 44 ld [ %fp + -188 ], %g1
4000614c: 05 00 00 3f sethi %hi(0xfc00), %g2
40006150: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <_ISR_Stack_size+0xefff>
40006154: 80 a0 40 02 cmp %g1, %g2
40006158: 18 80 02 37 bgu 40006a34 <msdos_format+0xc18>
4000615c: a5 30 60 08 srl %g1, 8, %l2
40006160: b1 30 60 08 srl %g1, 8, %i0
40006164: b8 10 00 01 mov %g1, %i4
40006168: a2 10 20 00 clr %l1
4000616c: b4 10 20 00 clr %i2
40006170: a4 10 20 00 clr %l2
40006174: a6 10 20 00 clr %l3
"generate MRB sector\n");
ret_val = msdos_format_gen_mbr(fmt_params.sec,&fmt_params);
40006178: fa 07 bf 94 ld [ %fp + -108 ], %i5
memset(mbr,0,RTEMS_IDE_PARTITION_TABLE_OFFSET);
4000617c: 94 10 21 be mov 0x1be, %o2
40006180: 92 10 20 00 clr %o1
40006184: 40 00 57 13 call 4001bdd0 <memset>
40006188: 90 10 00 1d mov %i5, %o0
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
4000618c: c0 2f 61 fe clrb [ %i5 + 0x1fe ]
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
40006190: 94 10 20 08 mov 8, %o2
memset(mbr + RTEMS_IDE_PARTITION_TABLE_OFFSET + RTEMS_IDE_PARTITION_TABLE_SIZE,
40006194: c0 2f 61 ff clrb [ %i5 + 0x1ff ]
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
40006198: 92 07 bf 73 add %fp, -141, %o1
4000619c: 40 00 56 d1 call 4001bce0 <memcpy>
400061a0: 90 07 60 03 add %i5, 3, %o0
FAT_SET_BR_BYTES_PER_SECTOR(mbr , fmt_params->bytes_per_sector);
400061a4: c4 07 bf 40 ld [ %fp + -192 ], %g2
400061a8: c4 2f 60 0b stb %g2, [ %i5 + 0xb ]
400061ac: 85 30 a0 08 srl %g2, 8, %g2
400061b0: c4 2f 60 0c stb %g2, [ %i5 + 0xc ]
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
400061b4: 88 10 20 02 mov 2, %g4
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
400061b8: c2 07 bf 4c ld [ %fp + -180 ], %g1
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
400061bc: c4 07 bf 48 ld [ %fp + -184 ], %g2
FAT_SET_BR_SECTORS_PER_CLUSTER(mbr , fmt_params->sectors_per_cluster);
400061c0: c2 2f 60 0d stb %g1, [ %i5 + 0xd ]
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
400061c4: 83 30 a0 08 srl %g2, 8, %g1
400061c8: c4 2f 60 0e stb %g2, [ %i5 + 0xe ]
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
400061cc: 86 10 20 01 mov 1, %g3
FAT_SET_BR_RESERVED_SECTORS_NUM(mbr, fmt_params->rsvd_sector_cnt);
400061d0: c2 2f 60 0f stb %g1, [ %i5 + 0xf ]
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
400061d4: c8 2f 60 10 stb %g4, [ %i5 + 0x10 ]
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
400061d8: c2 07 bf 58 ld [ %fp + -168 ], %g1
400061dc: c2 2f 60 11 stb %g1, [ %i5 + 0x11 ]
400061e0: c4 07 bf 58 ld [ %fp + -168 ], %g2
400061e4: 85 30 a0 08 srl %g2, 8, %g2
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
400061e8: f8 2f 60 13 stb %i4, [ %i5 + 0x13 ]
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
400061ec: c4 2f 60 12 stb %g2, [ %i5 + 0x12 ]
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
400061f0: f0 2f 60 14 stb %i0, [ %i5 + 0x14 ]
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
400061f4: c2 0f bf 71 ldub [ %fp + -143 ], %g1
400061f8: c2 2f 60 15 stb %g1, [ %i5 + 0x15 ]
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
400061fc: 82 10 3f ff mov -1, %g1
40006200: c0 2f 60 19 clrb [ %i5 + 0x19 ]
40006204: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
40006208: 82 10 20 06 mov 6, %g1
4000620c: c0 2f 60 1b clrb [ %i5 + 0x1b ]
40006210: c2 2f 60 1a stb %g1, [ %i5 + 0x1a ]
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
40006214: c6 2f 60 1c stb %g3, [ %i5 + 0x1c ]
40006218: c0 2f 60 1d clrb [ %i5 + 0x1d ]
4000621c: c0 2f 60 1e clrb [ %i5 + 0x1e ]
40006220: c0 2f 60 1f clrb [ %i5 + 0x1f ]
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
40006224: e6 2f 60 20 stb %l3, [ %i5 + 0x20 ]
40006228: e4 2f 60 21 stb %l2, [ %i5 + 0x21 ]
4000622c: f4 2f 60 22 stb %i2, [ %i5 + 0x22 ]
40006230: e2 2f 60 23 stb %l1, [ %i5 + 0x23 ]
if (fmt_params->fattype != FAT_FAT32) {
40006234: c2 0f bf 72 ldub [ %fp + -142 ], %g1
40006238: 80 a0 60 04 cmp %g1, 4
4000623c: 02 80 03 38 be 40006f1c <msdos_format+0x1100>
40006240: c2 07 bf 50 ld [ %fp + -176 ], %g1
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
40006244: c2 2f 60 16 stb %g1, [ %i5 + 0x16 ]
40006248: 83 30 60 08 srl %g1, 8, %g1
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
4000624c: c0 2f 60 24 clrb [ %i5 + 0x24 ]
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
40006250: 94 10 20 0b mov 0xb, %o2
FAT_SET_BR_SECTORS_PER_FAT(mbr ,fmt_params->sectors_per_fat);
40006254: c2 2f 60 17 stb %g1, [ %i5 + 0x17 ]
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
40006258: 82 10 20 29 mov 0x29, %g1
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
4000625c: c0 2f 60 25 clrb [ %i5 + 0x25 ]
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
40006260: 92 07 bf 7c add %fp, -132, %o1
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
40006264: c2 2f 60 26 stb %g1, [ %i5 + 0x26 ]
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
40006268: 90 07 60 2b add %i5, 0x2b, %o0
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
4000626c: c2 07 bf 8c ld [ %fp + -116 ], %g1
40006270: 89 30 60 08 srl %g1, 8, %g4
40006274: 87 30 60 10 srl %g1, 0x10, %g3
40006278: 85 30 60 18 srl %g1, 0x18, %g2
4000627c: c2 2f 60 27 stb %g1, [ %i5 + 0x27 ]
40006280: c8 2f 60 28 stb %g4, [ %i5 + 0x28 ]
40006284: c6 2f 60 29 stb %g3, [ %i5 + 0x29 ]
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
40006288: 40 00 56 96 call 4001bce0 <memcpy>
4000628c: c4 2f 60 2a stb %g2, [ %i5 + 0x2a ]
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
40006290: c2 0f bf 72 ldub [ %fp + -142 ], %g1
40006294: 80 a0 60 01 cmp %g1, 1
40006298: 02 80 03 76 be 40007070 <msdos_format+0x1254>
4000629c: 90 07 60 36 add %i5, 0x36, %o0
400062a0: 13 10 00 98 sethi %hi(0x40026000), %o1
400062a4: 92 12 63 90 or %o1, 0x390, %o1 ! 40026390 <rtems_filesystem_null_handlers+0x88>
400062a8: 40 00 56 8e call 4001bce0 <memcpy>
400062ac: 94 10 20 08 mov 8, %o2
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
400062b0: 82 10 20 55 mov 0x55, %g1
400062b4: c2 2f 61 fe stb %g1, [ %i5 + 0x1fe ]
400062b8: 82 10 3f aa mov -86, %g1
400062bc: c2 2f 61 ff stb %g1, [ %i5 + 0x1ff ]
FAT_SET_VAL8(mbr,0,0xeb);
400062c0: 82 10 3f eb mov -21, %g1
400062c4: c2 2f 40 00 stb %g1, [ %i5 ]
FAT_SET_VAL8(mbr,1,0x3c);
400062c8: 82 10 20 3c mov 0x3c, %g1
400062cc: c2 2f 60 01 stb %g1, [ %i5 + 1 ]
FAT_SET_VAL8(mbr,2,0x90);
400062d0: 82 10 3f 90 mov -112, %g1
400062d4: c2 2f 60 02 stb %g1, [ %i5 + 2 ]
/*
* write master boot record to disk
* also write copy of MBR to disk
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
400062d8: 92 10 20 02 mov 2, %o1
400062dc: 90 10 00 19 mov %i1, %o0
400062e0: 15 10 00 99 sethi %hi(0x40026400), %o2
400062e4: 7f ff fe 2c call 40005b94 <msdos_format_printf>
400062e8: 94 12 a0 70 or %o2, 0x70, %o2 ! 40026470 <rtems_filesystem_null_handlers+0x168>
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
400062ec: d6 07 bf 94 ld [ %fp + -108 ], %o3
400062f0: d4 07 bf 40 ld [ %fp + -192 ], %o2
400062f4: 92 10 20 00 clr %o1
400062f8: 7f ff fe 41 call 40005bfc <msdos_format_write_sec>
400062fc: 90 10 00 10 mov %l0, %o0
0,
fmt_params.bytes_per_sector,
fmt_params.sec);
}
if ((ret_val == 0) &&
40006300: b0 92 20 00 orcc %o0, 0, %i0
40006304: 02 80 01 09 be 40006728 <msdos_format+0x90c>
<== ALWAYS TAKEN
40006308: c2 07 bf 68 ld [ %fp + -152 ], %g1
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
close(fd);
4000630c: 7f ff f5 b0 call 400039cc <close>
40006310: 90 10 00 10 mov %l0, %o0
}
free(fmt_params.sec);
40006314: 7f ff f6 11 call 40003b58 <free>
40006318: d0 07 bf 94 ld [ %fp + -108 ], %o0
return ret_val;
}
4000631c: 81 c7 e0 08 ret
40006320: 81 e8 00 00 restore
errno = ENOTTY;
40006324: 40 00 54 93 call 4001b570 <__errno>
<== NOT EXECUTED
40006328: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
4000632c: 82 10 20 19 mov 0x19, %g1
<== NOT EXECUTED
40006330: 10 bf ff f7 b 4000630c <msdos_format+0x4f0>
<== NOT EXECUTED
40006334: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40006338: 90 10 00 19 mov %i1, %o0
<== NOT EXECUTED
4000633c: 96 10 00 18 mov %i0, %o3
<== NOT EXECUTED
40006340: 92 10 20 02 mov 2, %o1
<== NOT EXECUTED
40006344: 15 10 00 98 sethi %hi(0x40026000), %o2
<== NOT EXECUTED
40006348: 7f ff fe 13 call 40005b94 <msdos_format_printf>
<== NOT EXECUTED
4000634c: 94 12 a3 b0 or %o2, 0x3b0, %o2 ! 400263b0 <rtems_filesystem_null_handlers+0xa8>
<== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
40006350: 96 10 00 18 mov %i0, %o3
<== NOT EXECUTED
40006354: 90 10 00 19 mov %i1, %o0
<== NOT EXECUTED
40006358: 92 10 20 01 mov 1, %o1
<== NOT EXECUTED
4000635c: 15 10 00 98 sethi %hi(0x40026000), %o2
<== NOT EXECUTED
40006360: 7f ff fe 0d call 40005b94 <msdos_format_printf>
<== NOT EXECUTED
40006364: 94 12 a3 c0 or %o2, 0x3c0, %o2 ! 400263c0 <rtems_filesystem_null_handlers+0xb8>
<== NOT EXECUTED
free(fmt_params.sec);
40006368: d0 07 bf 94 ld [ %fp + -108 ], %o0
<== NOT EXECUTED
4000636c: 7f ff f5 fb call 40003b58 <free>
<== NOT EXECUTED
40006370: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
}
40006374: 81 c7 e0 08 ret
<== NOT EXECUTED
40006378: 81 e8 00 00 restore
<== NOT EXECUTED
static inline int rtems_disk_fd_get_block_count(
int fd,
rtems_blkdev_bnum *block_count
)
{
return ioctl(fd, RTEMS_BLKIO_GETSIZE, block_count);
4000637c: 94 07 bf 44 add %fp, -188, %o2
40006380: 92 17 62 05 or %i5, 0x205, %o1
40006384: 40 00 22 9d call 4000edf8 <ioctl>
40006388: 90 10 00 10 mov %l0, %o0
if (ret_val == 0) {
4000638c: b0 92 20 00 orcc %o0, 0, %i0
40006390: 12 80 01 e2 bne 40006b18 <msdos_format+0xcfc>
<== NEVER TAKEN
40006394: d6 07 bf 40 ld [ %fp + -192 ], %o3
total_size = (uint64_t)fmt_params->bytes_per_sector * fmt_params->totl_sector_cnt;
40006398: d8 07 bf 44 ld [ %fp + -188 ], %o4
4000639c: ba 52 c0 0c umul %o3, %o4, %i5
400063a0: b9 40 00 00 rd %y, %i4
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
400063a4: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
400063a8: 9a 10 00 1c mov %i4, %o5
400063ac: f8 3f bf 28 std %i4, [ %fp + -216 ]
400063b0: 92 10 20 02 mov 2, %o1
400063b4: 15 10 00 98 sethi %hi(0x40026000), %o2
400063b8: 90 10 00 19 mov %i1, %o0
400063bc: 7f ff fd f6 call 40005b94 <msdos_format_printf>
400063c0: 94 12 a3 d0 or %o2, 0x3d0, %o2
if ((rqdata == NULL) || (rqdata->fat_num == 0)) {
400063c4: 80 a6 60 00 cmp %i1, 0
400063c8: 02 80 02 8e be 40006e00 <msdos_format+0xfe4>
400063cc: 82 10 20 02 mov 2, %g1
400063d0: d6 06 60 0c ld [ %i1 + 0xc ], %o3
400063d4: 80 a2 e0 00 cmp %o3, 0
400063d8: 22 80 01 d2 be,a 40006b20 <msdos_format+0xd04>
400063dc: 96 10 20 02 mov 2, %o3
else if (rqdata->fat_num <= 6) {
400063e0: 80 a2 e0 06 cmp %o3, 6
400063e4: 18 80 03 26 bgu 4000707c <msdos_format+0x1260>
400063e8: 01 00 00 00 nop
fmt_params->fat_num = rqdata->fat_num;
400063ec: d6 2f bf 70 stb %o3, [ %fp + -144 ]
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
400063f0: 15 10 00 99 sethi %hi(0x40026400), %o2
400063f4: 92 10 20 02 mov 2, %o1
400063f8: 94 12 a0 10 or %o2, 0x10, %o2
400063fc: 7f ff fd e6 call 40005b94 <msdos_format_printf>
40006400: 90 10 00 19 mov %i1, %o0
if (rqdata != NULL && rqdata->sectors_per_cluster != 0) {
40006404: c2 06 60 08 ld [ %i1 + 8 ], %g1
40006408: 80 a0 60 00 cmp %g1, 0
4000640c: 02 80 02 85 be 40006e20 <msdos_format+0x1004>
40006410: 05 00 00 1f sethi %hi(0x7c00), %g2
40006414: 84 58 6f f5 smul %g1, 0xff5, %g2
if (fmt_params->totl_sector_cnt < FAT_FAT12_MAX_CLN * fat12_sect_per_clust) {
40006418: c6 07 bf 44 ld [ %fp + -188 ], %g3
4000641c: 80 a0 c0 02 cmp %g3, %g2
40006420: 1a 80 02 83 bcc 40006e2c <msdos_format+0x1010>
40006424: 05 00 00 3f sethi %hi(0xfc00), %g2
fmt_params->fattype = FAT_FAT12;
40006428: 82 10 20 01 mov 1, %g1
4000642c: c2 2f bf 72 stb %g1, [ %fp + -142 ]
fmt_params->sectors_per_cluster = 2;
40006430: 82 10 20 02 mov 2, %g1
40006434: c2 27 bf 4c st %g1, [ %fp + -180 ]
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata, fmt_params );
40006438: 92 07 bf 40 add %fp, -192, %o1
4000643c: 94 07 bf 4c add %fp, -180, %o2
40006440: 7f ff fe 02 call 40005c48 <msdos_set_sectors_per_cluster_from_request.isra.1>
40006444: 90 10 00 19 mov %i1, %o0
if (ret_val == 0) {
40006448: b0 92 20 00 orcc %o0, 0, %i0
4000644c: 12 bf fe ce bne 40005f84 <msdos_format+0x168>
<== NEVER TAKEN
40006450: d8 07 bf 44 ld [ %fp + -188 ], %o4
&& fmt_params->fattype != fat_type
40006454: c4 0f bf 72 ldub [ %fp + -142 ], %g2
40006458: 80 a0 a0 ff cmp %g2, 0xff
4000645c: 02 80 03 14 be 400070ac <msdos_format+0x1290>
<== NEVER TAKEN
40006460: c2 07 bf 44 ld [ %fp + -188 ], %g1
&& fmt_params->totl_sector_cnt > 0 ) {
40006464: 80 a0 60 00 cmp %g1, 0
40006468: 02 80 00 a9 be 4000670c <msdos_format+0x8f0>
<== NEVER TAKEN
4000646c: 01 00 00 00 nop
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
40006470: 37 10 00 00 sethi %hi(0x40000000), %i3
uint32_t ms_sectors_per_cluster_limit_FAT12 =
40006474: f0 27 bf 20 st %i0, [ %fp + -224 ]
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
40006478: 9a 87 40 1b addcc %i5, %i3, %o5
4000647c: 83 33 60 1e srl %o5, 0x1e, %g1
40006480: b4 10 20 00 clr %i2
40006484: 98 47 00 1a addx %i4, %i2, %o4
40006488: 85 2b 20 02 sll %o4, 2, %g2
4000648c: b6 10 80 01 or %g2, %g1, %i3
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40006490: 03 10 00 99 sethi %hi(0x40026400), %g1
40006494: 82 10 60 28 or %g1, 0x28, %g1 ! 40026428 <rtems_filesystem_null_handlers+0x120>
if (MS_BYTES_PER_CLUSTER_LIMIT_FAT12 < (sectors_per_cluster * bytes_per_sector)) {
40006498: 23 00 00 04 sethi %hi(0x1000), %l1
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
4000649c: c2 27 bf 24 st %g1, [ %fp + -220 ]
uint32_t ms_sectors_per_cluster_limit_FAT16 =
400064a0: 2b 00 00 20 sethi %hi(0x8000), %l5
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
400064a4: 03 00 00 3f sethi %hi(0xfc00), %g1
uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
400064a8: a4 10 20 00 clr %l2
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
400064ac: 29 00 00 40 sethi %hi(0x10000), %l4
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
400064b0: a6 10 63 f5 or %g1, 0x3f5, %l3
uint32_t ms_sectors_per_cluster_limit_FAT16 =
400064b4: aa 15 60 01 or %l5, 1, %l5
uint32_t ms_sectors_per_cluster_limit_FAT12 =
400064b8: ac 14 60 01 or %l1, 1, %l6
if (ret_val == 0 && rqdata != NULL)
400064bc: 80 a6 60 00 cmp %i1, 0
400064c0: 02 80 02 1c be 40006d30 <msdos_format+0xf14>
400064c4: d6 07 bf 4c ld [ %fp + -180 ], %o3
fmt_params->skip_alignment = rqdata->skip_alignment;
400064c8: c2 0e 60 16 ldub [ %i1 + 0x16 ], %g1
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
400064cc: d4 07 bf 24 ld [ %fp + -220 ], %o2
fmt_params->skip_alignment = rqdata->skip_alignment;
400064d0: c2 2f bf 90 stb %g1, [ %fp + -112 ]
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
400064d4: 92 10 20 02 mov 2, %o1
400064d8: 7f ff fd af call 40005b94 <msdos_format_printf>
400064dc: 90 10 00 19 mov %i1, %o0
if (fmt_params->fattype == FAT_FAT32) {
400064e0: ee 0f bf 72 ldub [ %fp + -142 ], %l7
400064e4: ba 0d e0 ff and %l7, 0xff, %i5
400064e8: 80 a7 60 04 cmp %i5, 4
400064ec: 02 80 02 1a be 40006d54 <msdos_format+0xf38>
400064f0: 82 10 00 17 mov %l7, %g1
fmt_params->rsvd_sector_cnt = 1;
400064f4: 84 10 20 01 mov 1, %g2
400064f8: c4 27 bf 48 st %g2, [ %fp + -184 ]
(rqdata->files_per_root_dir > 0)) {
400064fc: c6 06 60 10 ld [ %i1 + 0x10 ], %g3
if ((rqdata != NULL) &&
40006500: 80 a0 e0 00 cmp %g3, 0
40006504: 02 80 02 2b be 40006db0 <msdos_format+0xf94>
40006508: 80 a7 60 02 cmp %i5, 2
4000650c: 86 00 ff ff add %g3, -1, %g3
40006510: 96 10 20 01 mov 1, %o3
(2*fmt_params->bytes_per_sector/
40006514: f8 07 bf 40 ld [ %fp + -192 ], %i4
40006518: 83 2f 20 01 sll %i4, 1, %g1
4000651c: 85 30 60 05 srl %g1, 5, %g2
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
40006520: 86 00 80 03 add %g2, %g3, %g3
fmt_params->files_per_root_dir -= (fmt_params->files_per_root_dir %
40006524: 81 80 20 00 wr %g0, %y
40006528: 01 00 00 00 nop
4000652c: 01 00 00 00 nop
40006530: 01 00 00 00 nop
40006534: 82 70 c0 02 udiv %g3, %g2, %g1
40006538: 82 58 40 02 smul %g1, %g2, %g1
4000653c: c2 27 bf 58 st %g1, [ %fp + -168 ]
40006540: 83 28 60 05 sll %g1, 5, %g1
40006544: 9a 07 3f ff add %i4, -1, %o5
+ fmt_params->bytes_per_sector - 1)
40006548: 82 03 40 01 add %o5, %g1, %g1
/ fmt_params->bytes_per_sector);
4000654c: 81 80 20 00 wr %g0, %y
40006550: 01 00 00 00 nop
40006554: 01 00 00 00 nop
40006558: 01 00 00 00 nop
4000655c: 92 70 40 1c udiv %g1, %i4, %o1
fmt_params->root_dir_sectors =
40006560: d2 27 bf 5c st %o1, [ %fp + -164 ]
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
40006564: 81 80 20 00 wr %g0, %y
40006568: 01 00 00 00 nop
4000656c: 01 00 00 00 nop
40006570: 01 00 00 00 nop
40006574: 84 75 00 1c udiv %l4, %i4, %g2
ret_val = msdos_format_eval_sectors_per_cluster(fmt_params->fattype,
40006578: c2 07 bf 4c ld [ %fp + -180 ], %g1
4000657c: d8 07 bf 44 ld [ %fp + -188 ], %o4
40006580: de 0f bf 70 ldub [ %fp + -144 ], %o7
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
40006584: 80 a0 40 02 cmp %g1, %g2
40006588: 08 80 00 06 bleu 400065a0 <msdos_format+0x784>
<== ALWAYS TAKEN
4000658c: f0 0f bf 90 ldub [ %fp + -112 ], %i0
sectors_per_cluster /= 2;
40006590: 83 30 60 01 srl %g1, 1, %g1
<== NOT EXECUTED
while (MS_BYTES_PER_CLUSTER_LIMIT / bytes_per_sector < sectors_per_cluster) {
40006594: 80 a0 40 02 cmp %g1, %g2
<== NOT EXECUTED
40006598: 38 bf ff ff bgu,a 40006594 <msdos_format+0x778>
<== NOT EXECUTED
4000659c: 83 30 60 01 srl %g1, 1, %g1
<== NOT EXECUTED
fatdata_sect_cnt = total_sector_cnt
400065a0: 94 23 00 0b sub %o4, %o3, %o2
400065a4: 9e 0b e0 ff and %o7, 0xff, %o7
400065a8: b0 0e 20 ff and %i0, 0xff, %i0
return (sectors + clustersize - 1) & ~(clustersize - 1);
400065ac: 96 02 ff ff add %o3, -1, %o3
400065b0: 90 02 7f ff add %o1, -1, %o0
if (! skip_alignment)
400065b4: 80 a6 20 00 cmp %i0, 0
400065b8: 12 80 01 5c bne 40006b28 <msdos_format+0xd0c>
400065bc: 80 a7 60 01 cmp %i5, 1
return (sectors + clustersize - 1) & ~(clustersize - 1);
400065c0: 84 20 00 01 neg %g1, %g2
400065c4: 86 02 c0 01 add %o3, %g1, %g3
400065c8: 86 08 c0 02 and %g3, %g2, %g3
if (fattype == FAT_FAT12) {
400065cc: 02 80 01 86 be 40006be4 <msdos_format+0xdc8>
400065d0: 86 23 00 03 sub %o4, %g3, %g3
else if (fattype == FAT_FAT16) {
400065d4: 80 a7 60 02 cmp %i5, 2
400065d8: 22 80 01 d4 be,a 40006d28 <msdos_format+0xf0c>
400065dc: 88 02 00 01 add %o0, %g1, %g4
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
400065e0: 81 80 20 00 wr %g0, %y
400065e4: 01 00 00 00 nop
400065e8: 01 00 00 00 nop
400065ec: 01 00 00 00 nop
400065f0: 84 70 c0 01 udiv %g3, %g1, %g2
fat_capacity = fatdata_cluster_cnt * 4;
400065f4: 89 28 a0 02 sll %g2, 2, %g4
+ (bytes_per_sector - 1))
400065f8: 88 03 40 04 add %o5, %g4, %g4
400065fc: b4 00 7f ff add %g1, -1, %i2
sectors_per_fat = ((fat_capacity
40006600: 81 80 20 00 wr %g0, %y
40006604: 01 00 00 00 nop
40006608: 01 00 00 00 nop
4000660c: 01 00 00 00 nop
40006610: 86 71 00 1c udiv %g4, %i4, %g3
if (! skip_alignment)
40006614: 80 a6 20 00 cmp %i0, 0
fat_sectors_cnt = loc_align_object (sectors_per_fat * fat_num,
40006618: 86 58 c0 0f smul %g3, %o7, %g3
if (! skip_alignment)
4000661c: 12 80 00 05 bne 40006630 <msdos_format+0x814>
40006620: 88 00 c0 1a add %g3, %i2, %g4
return (sectors + clustersize - 1) & ~(clustersize - 1);
40006624: 86 20 00 01 neg %g1, %g3
40006628: 86 08 c0 04 and %g3, %g4, %g3
4000662c: 88 00 c0 1a add %g3, %i2, %g4
/ sectors_per_cluster));
40006630: 81 80 20 00 wr %g0, %y
40006634: 01 00 00 00 nop
40006638: 01 00 00 00 nop
4000663c: 01 00 00 00 nop
40006640: b4 71 00 01 udiv %g4, %g1, %i2
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
40006644: 80 a7 60 01 cmp %i5, 1
40006648: 02 80 01 45 be 40006b5c <msdos_format+0xd40>
4000664c: 84 20 80 1a sub %g2, %i2, %g2
40006650: 80 a7 60 02 cmp %i5, 2
40006654: 12 80 00 09 bne 40006678 <msdos_format+0x85c>
40006658: 80 a0 80 13 cmp %g2, %l3
((fattype == FAT_FAT16) && (*data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
4000665c: 28 80 01 70 bleu,a 40006c1c <msdos_format+0xe00>
40006660: c2 27 bf 4c st %g1, [ %fp + -180 ]
sectors_per_cluster *= 2;
40006664: 83 28 60 01 sll %g1, 1, %g1
} else if ((sectors_per_cluster * bytes_per_sector)
40006668: 88 5f 00 01 smul %i4, %g1, %g4
4000666c: 80 a1 00 14 cmp %g4, %l4
40006670: 08 bf ff d2 bleu 400065b8 <msdos_format+0x79c>
<== ALWAYS TAKEN
40006674: 80 a6 20 00 cmp %i0, 0
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
40006678: 81 80 20 00 wr %g0, %y
4000667c: 01 00 00 00 nop
40006680: 01 00 00 00 nop
40006684: 01 00 00 00 nop
40006688: 88 70 c0 0f udiv %g3, %o7, %g4
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
4000668c: c2 27 bf 4c st %g1, [ %fp + -180 ]
uint32_t ms_sectors_per_cluster_limit_FAT12 =
40006690: 81 80 20 00 wr %g0, %y
40006694: 01 00 00 00 nop
40006698: 01 00 00 00 nop
4000669c: 01 00 00 00 nop
400066a0: 86 75 80 1c udiv %l6, %i4, %g3
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
400066a4: c8 27 bf 50 st %g4, [ %fp + -176 ]
if ( number_of_clusters < FAT_FAT12_MAX_CLN
400066a8: 80 a0 c0 01 cmp %g3, %g1
uint32_t ms_sectors_per_cluster_limit_FAT16 =
400066ac: 81 80 20 00 wr %g0, %y
400066b0: 01 00 00 00 nop
400066b4: 01 00 00 00 nop
400066b8: 01 00 00 00 nop
400066bc: 88 75 40 1c udiv %l5, %i4, %g4
if ( number_of_clusters < FAT_FAT12_MAX_CLN
400066c0: 0a 80 02 80 bcs 400070c0 <msdos_format+0x12a4>
400066c4: 80 a0 af f4 cmp %g2, 0xff4
400066c8: 18 80 02 7e bgu 400070c0 <msdos_format+0x12a4>
<== ALWAYS TAKEN
400066cc: 86 10 20 01 mov 1, %g3
if (fat_type != fmt_params->fattype) {
400066d0: ae 08 e0 ff and %g3, 0xff, %l7
400066d4: 80 a7 40 17 cmp %i5, %l7
400066d8: 12 80 01 bd bne 40006dcc <msdos_format+0xfb0>
<== ALWAYS TAKEN
400066dc: c6 2f bf 72 stb %g3, [ %fp + -142 ]
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
400066e0: ae 1d c0 1d xor %l7, %i5, %l7
400066e4: 84 10 00 0c mov %o4, %g2
400066e8: 80 a0 00 17 cmp %g0, %l7
++iteration_cnt;
400066ec: a4 04 a0 01 inc %l2
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
400066f0: 82 40 20 00 addx %g0, 0, %g1
&& fmt_params->fattype != fat_type
400066f4: 80 88 60 ff btst 0xff, %g1
400066f8: 02 80 01 d7 be 40006e54 <msdos_format+0x1038>
400066fc: 80 a3 20 00 cmp %o4, 0
&& fmt_params->totl_sector_cnt > 0 ) {
40006700: 80 a0 a0 00 cmp %g2, 0
40006704: 12 bf ff 6f bne 400064c0 <msdos_format+0x6a4>
<== ALWAYS TAKEN
40006708: 80 a6 60 00 cmp %i1, 0
errno = EINVAL;
4000670c: 40 00 53 99 call 4001b570 <__errno>
40006710: b0 10 3f ff mov -1, %i0
40006714: 82 10 20 16 mov 0x16, %g1
40006718: 10 bf fe 1e b 40005f90 <msdos_format+0x174>
4000671c: c2 22 00 00 st %g1, [ %o0 ]
fmt_params->root_dir_fmt_sec_cnt = fmt_params->sectors_per_cluster;
40006720: 10 bf fe 27 b 40005fbc <msdos_format+0x1a0>
40006724: c2 27 bf 64 st %g1, [ %fp + -156 ]
if ((ret_val == 0) &&
40006728: 80 a0 60 00 cmp %g1, 0
4000672c: 02 80 00 0e be 40006764 <msdos_format+0x948>
40006730: 92 10 20 02 mov 2, %o1
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40006734: 90 10 00 19 mov %i1, %o0
40006738: 15 10 00 99 sethi %hi(0x40026400), %o2
4000673c: 7f ff fd 16 call 40005b94 <msdos_format_printf>
40006740: 94 12 a0 88 or %o2, 0x88, %o2 ! 40026488 <rtems_filesystem_null_handlers+0x180>
ret_val = msdos_format_write_sec(fd,
40006744: d6 07 bf 94 ld [ %fp + -108 ], %o3
40006748: d4 07 bf 40 ld [ %fp + -192 ], %o2
4000674c: d2 07 bf 68 ld [ %fp + -152 ], %o1
40006750: 7f ff fd 2b call 40005bfc <msdos_format_write_sec>
40006754: 90 10 00 10 mov %l0, %o0
if ((ret_val == 0) &&
40006758: b0 92 20 00 orcc %o0, 0, %i0
4000675c: 12 bf fe ec bne 4000630c <msdos_format+0x4f0>
<== NEVER TAKEN
40006760: 01 00 00 00 nop
40006764: c2 07 bf 6c ld [ %fp + -148 ], %g1
40006768: 80 a0 60 00 cmp %g1, 0
4000676c: 12 80 00 8a bne 40006994 <msdos_format+0xb78>
40006770: c2 07 bf 94 ld [ %fp + -108 ], %g1
ret_val = msdos_format_fill_sectors
40006774: c0 23 a0 5c clr [ %sp + 0x5c ]
40006778: 96 10 00 10 mov %l0, %o3
fmt_params.fat_num*fmt_params.sectors_per_fat,/* sector count */
4000677c: da 0f bf 70 ldub [ %fp + -144 ], %o5
ret_val = msdos_format_fill_sectors
40006780: c2 07 bf 50 ld [ %fp + -176 ], %g1
40006784: d8 07 bf 48 ld [ %fp + -184 ], %o4
40006788: 9a 5b 40 01 smul %o5, %g1, %o5
4000678c: 94 10 00 19 mov %i1, %o2
40006790: 92 07 bf 94 add %fp, -108, %o1
40006794: 7f ff fd 51 call 40005cd8 <msdos_format_fill_sectors.isra.3>
40006798: 90 07 bf 40 add %fp, -192, %o0
if (ret_val == 0) {
4000679c: b0 92 20 00 orcc %o0, 0, %i0
400067a0: 12 bf fe db bne 4000630c <msdos_format+0x4f0>
<== NEVER TAKEN
400067a4: 96 10 00 10 mov %l0, %o3
ret_val = msdos_format_fill_sectors
400067a8: c0 23 a0 5c clr [ %sp + 0x5c ]
400067ac: d8 1f bf 60 ldd [ %fp + -160 ], %o4
400067b0: 94 10 00 19 mov %i1, %o2
400067b4: 92 07 bf 94 add %fp, -108, %o1
400067b8: 7f ff fd 48 call 40005cd8 <msdos_format_fill_sectors.isra.3>
400067bc: 90 07 bf 40 add %fp, -192, %o0
if ((ret_val == 0) && fmt_params.VolLabel_present) {
400067c0: b0 92 20 00 orcc %o0, 0, %i0
400067c4: 12 bf fe d2 bne 4000630c <msdos_format+0x4f0>
<== NEVER TAKEN
400067c8: c2 0f bf 88 ldub [ %fp + -120 ], %g1
400067cc: d0 07 bf 94 ld [ %fp + -108 ], %o0
400067d0: 80 a0 60 00 cmp %g1, 0
400067d4: 12 80 00 5c bne 40006944 <msdos_format+0xb28>
400067d8: d4 07 bf 40 ld [ %fp + -192 ], %o2
memset(fmt_params.sec,0,fmt_params.bytes_per_sector);
400067dc: 40 00 55 7d call 4001bdd0 <memset>
400067e0: 92 10 20 00 clr %o1
switch(fmt_params.fattype) {
400067e4: c2 0f bf 72 ldub [ %fp + -142 ], %g1
400067e8: 80 a0 60 02 cmp %g1, 2
400067ec: 02 80 00 b0 be 40006aac <msdos_format+0xc90>
400067f0: 80 a0 60 04 cmp %g1, 4
400067f4: 02 80 00 98 be 40006a54 <msdos_format+0xc38>
400067f8: 80 a0 60 01 cmp %g1, 1
400067fc: 02 80 00 b9 be 40006ae0 <msdos_format+0xcc4>
<== ALWAYS TAKEN
40006800: c2 07 bf 94 ld [ %fp + -108 ], %g1
errno = EINVAL;
40006804: 40 00 53 5b call 4001b570 <__errno>
<== NOT EXECUTED
40006808: ba 10 3f ff mov -1, %i5
<== NOT EXECUTED
4000680c: 82 10 20 16 mov 0x16, %g1
<== NOT EXECUTED
40006810: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
if (fmt_params.fattype == FAT_FAT32) {
40006814: c2 0f bf 72 ldub [ %fp + -142 ], %g1
40006818: 80 a0 60 04 cmp %g1, 4
4000681c: 12 80 00 0e bne 40006854 <msdos_format+0xa38>
40006820: c4 0f bf 90 ldub [ %fp + -112 ], %g2
FAT_SET_VAL32(fmt_params.sec,8,FAT_FAT32_EOC);
40006824: c2 07 bf 94 ld [ %fp + -108 ], %g1
40006828: 84 10 3f f8 mov -8, %g2
4000682c: c4 28 60 08 stb %g2, [ %g1 + 8 ]
40006830: 82 10 3f ff mov -1, %g1
40006834: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006838: c2 28 a0 09 stb %g1, [ %g2 + 9 ]
4000683c: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006840: c2 28 a0 0a stb %g1, [ %g2 + 0xa ]
40006844: 84 10 20 0f mov 0xf, %g2
40006848: c2 07 bf 94 ld [ %fp + -108 ], %g1
4000684c: c4 28 60 0b stb %g2, [ %g1 + 0xb ]
if (! skip_alignment)
40006850: c4 0f bf 90 ldub [ %fp + -112 ], %g2
start_sector = loc_align_object (fmt_params.rsvd_sector_cnt,
40006854: f8 07 bf 48 ld [ %fp + -184 ], %i4
if (! skip_alignment)
40006858: 80 a0 a0 00 cmp %g2, 0
4000685c: 12 80 00 06 bne 40006874 <msdos_format+0xa58>
40006860: c2 07 bf 4c ld [ %fp + -180 ], %g1
return (sectors + clustersize - 1) & ~(clustersize - 1);
40006864: b8 07 00 01 add %i4, %g1, %i4
40006868: 82 20 00 01 neg %g1
4000686c: b8 07 3f ff add %i4, -1, %i4
40006870: b8 0f 00 01 and %i4, %g1, %i4
for (i = 0;
40006874: c2 0f bf 70 ldub [ %fp + -144 ], %g1
40006878: 80 a0 60 00 cmp %g1, 0
4000687c: 02 80 01 fb be 40007068 <msdos_format+0x124c>
<== NEVER TAKEN
40006880: 80 a7 60 00 cmp %i5, 0
(i < fmt_params.fat_num) && (ret_val == 0);
40006884: 02 80 00 06 be 4000689c <msdos_format+0xa80>
<== ALWAYS TAKEN
40006888: d2 07 bf 50 ld [ %fp + -176 ], %o1
ret_val = -1;
4000688c: 10 bf fe a0 b 4000630c <msdos_format+0x4f0>
<== NOT EXECUTED
40006890: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
(i < fmt_params.fat_num) && (ret_val == 0);
40006894: 12 80 00 19 bne 400068f8 <msdos_format+0xadc>
<== NEVER TAKEN
40006898: d2 07 bf 50 ld [ %fp + -176 ], %o1
ret_val = msdos_format_write_sec
4000689c: d6 07 bf 94 ld [ %fp + -108 ], %o3
400068a0: d4 07 bf 40 ld [ %fp + -192 ], %o2
+ (i * fmt_params.sectors_per_fat),
400068a4: 92 5f 40 09 smul %i5, %o1, %o1
ret_val = msdos_format_write_sec
400068a8: 90 10 00 10 mov %l0, %o0
400068ac: 7f ff fc d4 call 40005bfc <msdos_format_write_sec>
400068b0: 92 02 40 1c add %o1, %i4, %o1
(i < fmt_params.fat_num) && (ret_val == 0);
400068b4: c2 0f bf 70 ldub [ %fp + -144 ], %g1
i++) {
400068b8: ba 07 60 01 inc %i5
for (i = 0;
400068bc: 80 a0 40 1d cmp %g1, %i5
400068c0: 14 bf ff f5 bg 40006894 <msdos_format+0xa78>
400068c4: 80 a2 20 00 cmp %o0, 0
if (ret_val == 0 && rqdata != NULL && rqdata->sync_device) {
400068c8: 80 a2 20 00 cmp %o0, 0
400068cc: 12 80 00 0b bne 400068f8 <msdos_format+0xadc>
<== NEVER TAKEN
400068d0: 80 8e e0 ff btst 0xff, %i3
400068d4: 22 bf fe 8e be,a 4000630c <msdos_format+0x4f0>
400068d8: b0 10 00 08 mov %o0, %i0
400068dc: c2 0e 60 17 ldub [ %i1 + 0x17 ], %g1
400068e0: 80 a0 60 00 cmp %g1, 0
400068e4: 02 bf fe 8a be 4000630c <msdos_format+0x4f0>
400068e8: 13 08 00 10 sethi %hi(0x20004000), %o1
return ioctl(fd, RTEMS_BLKIO_GETDISKDEV, dd_ptr);
}
static inline int rtems_disk_fd_sync(int fd)
{
return ioctl(fd, RTEMS_BLKIO_SYNCDEV);
400068ec: 90 10 00 10 mov %l0, %o0
400068f0: 40 00 21 42 call 4000edf8 <ioctl>
400068f4: 92 12 62 06 or %o1, 0x206, %o1
400068f8: 10 bf fe 85 b 4000630c <msdos_format+0x4f0>
400068fc: b0 10 00 08 mov %o0, %i0
(rqdata != NULL) &&
40006900: 80 a0 60 00 cmp %g1, 0
40006904: 12 bf fd f8 bne 400060e4 <msdos_format+0x2c8>
<== ALWAYS TAKEN
40006908: b6 10 20 01 mov 1, %i3
ret_val = msdos_format_fill_sectors
4000690c: 82 10 3f e5 mov -27, %g1
<== NOT EXECUTED
40006910: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
<== NOT EXECUTED
40006914: 98 10 20 00 clr %o4
<== NOT EXECUTED
40006918: da 07 bf 44 ld [ %fp + -188 ], %o5
<== NOT EXECUTED
4000691c: 96 10 00 10 mov %l0, %o3
<== NOT EXECUTED
40006920: 94 10 00 19 mov %i1, %o2
<== NOT EXECUTED
40006924: 92 07 bf 94 add %fp, -108, %o1
<== NOT EXECUTED
40006928: 7f ff fc ec call 40005cd8 <msdos_format_fill_sectors.isra.3>
<== NOT EXECUTED
4000692c: 90 07 bf 40 add %fp, -192, %o0
<== NOT EXECUTED
if (ret_val == 0) {
40006930: b0 92 20 00 orcc %o0, 0, %i0
<== NOT EXECUTED
40006934: 12 bf fe 76 bne 4000630c <msdos_format+0x4f0>
<== NOT EXECUTED
40006938: 01 00 00 00 nop
<== NOT EXECUTED
(rqdata != NULL) &&
4000693c: 10 bf fd ea b 400060e4 <msdos_format+0x2c8>
<== NOT EXECUTED
40006940: b6 10 20 01 mov 1, %i3 ! 1 <_TLS_Alignment>
<== NOT EXECUTED
memset(fmt_params.sec,0,fmt_params.bytes_per_sector);
40006944: 40 00 55 23 call 4001bdd0 <memset>
40006948: 92 10 20 00 clr %o1
memcpy(MSDOS_DIR_NAME(fmt_params.sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
4000694c: d0 07 bf 94 ld [ %fp + -108 ], %o0
40006950: 94 10 20 0b mov 0xb, %o2
40006954: 40 00 54 e3 call 4001bce0 <memcpy>
40006958: 92 07 bf 7c add %fp, -132, %o1
*MSDOS_DIR_ATTR(fmt_params.sec) = MSDOS_ATTR_VOLUME_ID;
4000695c: c2 07 bf 94 ld [ %fp + -108 ], %g1
40006960: 84 10 20 08 mov 8, %g2
40006964: c4 28 60 0b stb %g2, [ %g1 + 0xb ]
ret_val = msdos_format_write_sec
40006968: 90 10 00 10 mov %l0, %o0
4000696c: d6 07 bf 94 ld [ %fp + -108 ], %o3
40006970: d4 07 bf 40 ld [ %fp + -192 ], %o2
40006974: 7f ff fc a2 call 40005bfc <msdos_format_write_sec>
40006978: d2 07 bf 60 ld [ %fp + -160 ], %o1
if (ret_val == 0) {
4000697c: 80 a2 20 00 cmp %o0, 0
40006980: 32 bf fe 63 bne,a 4000630c <msdos_format+0x4f0>
<== NEVER TAKEN
40006984: b0 10 00 08 mov %o0, %i0
<== NOT EXECUTED
40006988: d0 07 bf 94 ld [ %fp + -108 ], %o0
4000698c: 10 bf ff 94 b 400067dc <msdos_format+0x9c0>
40006990: d4 07 bf 40 ld [ %fp + -192 ], %o2
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
40006994: 92 10 20 00 clr %o1
40006998: 94 10 22 00 mov 0x200, %o2
4000699c: 40 00 55 0d call 4001bdd0 <memset>
400069a0: 90 10 00 01 mov %g1, %o0
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
400069a4: 86 10 20 61 mov 0x61, %g3
400069a8: ba 10 20 52 mov 0x52, %i5
400069ac: 88 10 20 41 mov 0x41, %g4
400069b0: fa 2a 00 00 stb %i5, [ %o0 ]
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO, 0xffffffff);
400069b4: 84 10 3f ff mov -1, %g2
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
400069b8: fa 2a 20 01 stb %i5, [ %o0 + 1 ]
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
400069bc: ba 10 20 72 mov 0x72, %i5
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
400069c0: c6 2a 20 02 stb %g3, [ %o0 + 2 ]
400069c4: c8 2a 20 03 stb %g4, [ %o0 + 3 ]
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
400069c8: c6 2a 21 e7 stb %g3, [ %o0 + 0x1e7 ]
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
400069cc: 86 10 20 55 mov 0x55, %g3
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
400069d0: fa 2a 21 e4 stb %i5, [ %o0 + 0x1e4 ]
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
400069d4: c6 2a 21 fe stb %g3, [ %o0 + 0x1fe ]
400069d8: 86 10 3f aa mov -86, %g3
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
400069dc: fa 2a 21 e5 stb %i5, [ %o0 + 0x1e5 ]
400069e0: c8 2a 21 e6 stb %g4, [ %o0 + 0x1e6 ]
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
400069e4: c6 2a 21 ff stb %g3, [ %o0 + 0x1ff ]
FAT_SET_FSINFO_FREE_CLUSTER_COUNT(fsinfo+FAT_FSI_INFO, 0xffffffff);
400069e8: c4 2a 21 e8 stb %g2, [ %o0 + 0x1e8 ]
400069ec: c4 2a 21 e9 stb %g2, [ %o0 + 0x1e9 ]
400069f0: c4 2a 21 ea stb %g2, [ %o0 + 0x1ea ]
400069f4: c4 2a 21 eb stb %g2, [ %o0 + 0x1eb ]
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO, 0xffffffff);
400069f8: c4 2a 21 ec stb %g2, [ %o0 + 0x1ec ]
400069fc: c4 2a 21 ed stb %g2, [ %o0 + 0x1ed ]
40006a00: c4 2a 21 ee stb %g2, [ %o0 + 0x1ee ]
40006a04: c4 2a 21 ef stb %g2, [ %o0 + 0x1ef ]
(fmt_params.fsinfo_sec != 0)) {
40006a08: d2 07 bf 6c ld [ %fp + -148 ], %o1
if ((ret_val == 0) &&
40006a0c: 80 a2 60 00 cmp %o1, 0
40006a10: 02 bf ff 59 be 40006774 <msdos_format+0x958>
<== NEVER TAKEN
40006a14: d6 07 bf 94 ld [ %fp + -108 ], %o3
ret_val = msdos_format_write_sec(fd,
40006a18: d4 07 bf 40 ld [ %fp + -192 ], %o2
40006a1c: 7f ff fc 78 call 40005bfc <msdos_format_write_sec>
40006a20: 90 10 00 10 mov %l0, %o0
if (ret_val == 0) {
40006a24: b0 92 20 00 orcc %o0, 0, %i0
40006a28: 22 bf ff 54 be,a 40006778 <msdos_format+0x95c>
<== ALWAYS TAKEN
40006a2c: c0 23 a0 5c clr [ %sp + 0x5c ]
40006a30: 30 bf fe 37 b,a 4000630c <msdos_format+0x4f0>
<== NOT EXECUTED
40006a34: b5 30 60 10 srl %g1, 0x10, %i2
40006a38: a6 10 00 01 mov %g1, %l3
40006a3c: a3 30 60 18 srl %g1, 0x18, %l1
if (fmt_params->totl_sector_cnt < 0x10000) {
40006a40: b0 10 20 00 clr %i0
40006a44: 10 bf fd cd b 40006178 <msdos_format+0x35c>
40006a48: b8 10 20 00 clr %i4
ret_val = -1;
40006a4c: 10 bf fe 30 b 4000630c <msdos_format+0x4f0>
<== NOT EXECUTED
40006a50: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
FAT_SET_VAL32(fmt_params.sec,0,0xffffff00|fmt_params.media_code);
40006a54: c4 0f bf 71 ldub [ %fp + -143 ], %g2
40006a58: c2 07 bf 94 ld [ %fp + -108 ], %g1
40006a5c: c4 28 40 00 stb %g2, [ %g1 ]
40006a60: 82 10 3f ff mov -1, %g1
40006a64: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006a68: c2 28 a0 01 stb %g1, [ %g2 + 1 ]
FAT_SET_VAL32(fmt_params.sec,4,0xc0000000|FAT_FAT32_EOC);
40006a6c: 86 10 3f f8 mov -8, %g3
FAT_SET_VAL32(fmt_params.sec,0,0xffffff00|fmt_params.media_code);
40006a70: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006a74: c2 28 a0 02 stb %g1, [ %g2 + 2 ]
break;
40006a78: ba 10 20 00 clr %i5
FAT_SET_VAL32(fmt_params.sec,0,0xffffff00|fmt_params.media_code);
40006a7c: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006a80: c2 28 a0 03 stb %g1, [ %g2 + 3 ]
FAT_SET_VAL32(fmt_params.sec,4,0xc0000000|FAT_FAT32_EOC);
40006a84: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006a88: c6 28 a0 04 stb %g3, [ %g2 + 4 ]
40006a8c: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006a90: c2 28 a0 05 stb %g1, [ %g2 + 5 ]
40006a94: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006a98: c2 28 a0 06 stb %g1, [ %g2 + 6 ]
40006a9c: 84 10 3f cf mov -49, %g2
40006aa0: c2 07 bf 94 ld [ %fp + -108 ], %g1
break;
40006aa4: 10 bf ff 5c b 40006814 <msdos_format+0x9f8>
40006aa8: c4 28 60 07 stb %g2, [ %g1 + 7 ]
FAT_SET_VAL8(fmt_params.sec,0,fmt_params.media_code);
40006aac: c2 07 bf 94 ld [ %fp + -108 ], %g1
40006ab0: c4 0f bf 71 ldub [ %fp + -143 ], %g2
40006ab4: c4 28 40 00 stb %g2, [ %g1 ]
FAT_SET_VAL8(fmt_params.sec,1,0xff);
40006ab8: 82 10 3f ff mov -1, %g1
40006abc: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006ac0: c2 28 a0 01 stb %g1, [ %g2 + 1 ]
FAT_SET_VAL16(fmt_params.sec,2,FAT_FAT16_EOC);
40006ac4: 86 10 3f f8 mov -8, %g3
40006ac8: c4 07 bf 94 ld [ %fp + -108 ], %g2
40006acc: c6 28 a0 02 stb %g3, [ %g2 + 2 ]
break;
40006ad0: ba 10 20 00 clr %i5
FAT_SET_VAL16(fmt_params.sec,2,FAT_FAT16_EOC);
40006ad4: c4 07 bf 94 ld [ %fp + -108 ], %g2
break;
40006ad8: 10 bf ff 4f b 40006814 <msdos_format+0x9f8>
40006adc: c2 28 a0 03 stb %g1, [ %g2 + 3 ]
FAT_SET_VAL8(fmt_params.sec,0,(fmt_params.media_code));
40006ae0: c4 0f bf 71 ldub [ %fp + -143 ], %g2
40006ae4: c4 28 40 00 stb %g2, [ %g1 ]
FAT_SET_VAL8(fmt_params.sec,1,(0x0f | (FAT_FAT12_EOC << 4)));
40006ae8: 84 10 3f 8f mov -113, %g2
40006aec: c2 07 bf 94 ld [ %fp + -108 ], %g1
40006af0: c4 28 60 01 stb %g2, [ %g1 + 1 ]
break;
40006af4: ba 10 20 00 clr %i5
FAT_SET_VAL8(fmt_params.sec,2,(FAT_FAT12_EOC >> 4));
40006af8: c2 07 bf 94 ld [ %fp + -108 ], %g1
40006afc: 84 10 3f ff mov -1, %g2
break;
40006b00: 10 bf ff 45 b 40006814 <msdos_format+0x9f8>
40006b04: c4 28 60 02 stb %g2, [ %g1 + 2 ]
from = ""; /* default: make "from" point to empty string */
40006b08: 10 bf fd 54 b 40006058 <msdos_format+0x23c>
40006b0c: 86 10 e0 40 or %g3, 0x40, %g3
from = "RTEMS"; /* default: make "from" point to OS Name */
40006b10: 10 bf fd 34 b 40005fe0 <msdos_format+0x1c4>
40006b14: 86 10 e3 78 or %g3, 0x378, %g3
40006b18: 10 bf fd 1b b 40005f84 <msdos_format+0x168>
<== NOT EXECUTED
40006b1c: d8 07 bf 44 ld [ %fp + -188 ], %o4
<== NOT EXECUTED
fmt_params->fat_num = 2;
40006b20: 10 bf fe 34 b 400063f0 <msdos_format+0x5d4>
40006b24: c2 2f bf 70 stb %g1, [ %fp + -144 ]
if (fattype == FAT_FAT12) {
40006b28: 02 80 00 3b be 40006c14 <msdos_format+0xdf8>
40006b2c: 86 10 00 0a mov %o2, %g3
else if (fattype == FAT_FAT16) {
40006b30: 80 a7 60 02 cmp %i5, 2
40006b34: 12 bf fe ab bne 400065e0 <msdos_format+0x7c4>
<== NEVER TAKEN
40006b38: 84 10 00 09 mov %o1, %g2
fatdata_sect_cnt = fatdata_sect_cnt
40006b3c: 86 20 c0 02 sub %g3, %g2, %g3
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
40006b40: 81 80 20 00 wr %g0, %y
40006b44: 01 00 00 00 nop
40006b48: 01 00 00 00 nop
40006b4c: 01 00 00 00 nop
40006b50: 84 70 c0 01 udiv %g3, %g1, %g2
fat_capacity = fatdata_cluster_cnt * 2;
40006b54: 10 bf fe a9 b 400065f8 <msdos_format+0x7dc>
40006b58: 89 28 a0 01 sll %g2, 1, %g4
if (((fattype == FAT_FAT12) && (*data_cluster_cnt > FAT_FAT12_MAX_CLN)) ||
40006b5c: 80 a0 af f5 cmp %g2, 0xff5
40006b60: 38 80 00 1c bgu,a 40006bd0 <msdos_format+0xdb4>
40006b64: 83 28 60 01 sll %g1, 1, %g1
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
40006b68: 81 80 20 00 wr %g0, %y
40006b6c: 01 00 00 00 nop
40006b70: 01 00 00 00 nop
40006b74: 01 00 00 00 nop
40006b78: 88 70 c0 0f udiv %g3, %o7, %g4
fmt_params->sectors_per_cluster = sectors_per_cluster_adj;
40006b7c: c2 27 bf 4c st %g1, [ %fp + -180 ]
uint32_t ms_sectors_per_cluster_limit_FAT12 =
40006b80: 81 80 20 00 wr %g0, %y
40006b84: 01 00 00 00 nop
40006b88: 01 00 00 00 nop
40006b8c: 01 00 00 00 nop
40006b90: 86 75 80 1c udiv %l6, %i4, %g3
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
40006b94: c8 27 bf 50 st %g4, [ %fp + -176 ]
if ( number_of_clusters < FAT_FAT12_MAX_CLN
40006b98: 80 a0 c0 01 cmp %g3, %g1
uint32_t ms_sectors_per_cluster_limit_FAT16 =
40006b9c: 81 80 20 00 wr %g0, %y
40006ba0: 01 00 00 00 nop
40006ba4: 01 00 00 00 nop
40006ba8: 01 00 00 00 nop
40006bac: 88 75 40 1c udiv %l5, %i4, %g4
if ( number_of_clusters < FAT_FAT12_MAX_CLN
40006bb0: 0a 80 01 44 bcs 400070c0 <msdos_format+0x12a4>
40006bb4: 80 a0 af f4 cmp %g2, 0xff4
40006bb8: 38 80 01 43 bgu,a 400070c4 <msdos_format+0x12a8>
<== NEVER TAKEN
40006bbc: 07 00 00 3f sethi %hi(0xfc00), %g3
<== NOT EXECUTED
fmt_params->fattype = msdos_get_fat_type(
40006bc0: 82 10 20 01 mov 1, %g1
40006bc4: ae 10 20 01 mov 1, %l7
40006bc8: 10 bf fe c6 b 400066e0 <msdos_format+0x8c4>
40006bcc: c2 2f bf 72 stb %g1, [ %fp + -142 ]
if (MS_BYTES_PER_CLUSTER_LIMIT_FAT12 < (sectors_per_cluster * bytes_per_sector)) {
40006bd0: 88 5f 00 01 smul %i4, %g1, %g4
40006bd4: 80 a1 00 11 cmp %g4, %l1
40006bd8: 08 bf fe 78 bleu 400065b8 <msdos_format+0x79c>
<== ALWAYS TAKEN
40006bdc: 80 a6 20 00 cmp %i0, 0
40006be0: 30 bf ff e2 b,a 40006b68 <msdos_format+0xd4c>
<== NOT EXECUTED
return (sectors + clustersize - 1) & ~(clustersize - 1);
40006be4: 88 02 00 01 add %o0, %g1, %g4
40006be8: 84 09 00 02 and %g4, %g2, %g2
fatdata_sect_cnt = fatdata_sect_cnt
40006bec: 86 20 c0 02 sub %g3, %g2, %g3
fatdata_cluster_cnt = fatdata_sect_cnt/sectors_per_cluster;
40006bf0: 81 80 20 00 wr %g0, %y
40006bf4: 01 00 00 00 nop
40006bf8: 01 00 00 00 nop
40006bfc: 01 00 00 00 nop
40006c00: 84 70 c0 01 udiv %g3, %g1, %g2
fat_capacity = fatdata_cluster_cnt * 3 / 2;
40006c04: 89 28 a0 01 sll %g2, 1, %g4
40006c08: 88 01 00 02 add %g4, %g2, %g4
40006c0c: 10 bf fe 7b b 400065f8 <msdos_format+0x7dc>
40006c10: 89 31 20 01 srl %g4, 1, %g4
return sectors;
40006c14: 10 bf ff f6 b 40006bec <msdos_format+0xdd0>
40006c18: 84 10 00 09 mov %o1, %g2
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
40006c1c: 81 80 20 00 wr %g0, %y
40006c20: 01 00 00 00 nop
40006c24: 01 00 00 00 nop
40006c28: 01 00 00 00 nop
40006c2c: 88 70 c0 0f udiv %g3, %o7, %g4
uint32_t ms_sectors_per_cluster_limit_FAT12 =
40006c30: 81 80 20 00 wr %g0, %y
40006c34: 01 00 00 00 nop
40006c38: 01 00 00 00 nop
40006c3c: 01 00 00 00 nop
40006c40: 86 75 80 1c udiv %l6, %i4, %g3
*sectors_per_fat_ptr = fat_sectors_cnt / fat_num;
40006c44: c8 27 bf 50 st %g4, [ %fp + -176 ]
if ( number_of_clusters < FAT_FAT12_MAX_CLN
40006c48: 80 a0 c0 01 cmp %g3, %g1
uint32_t ms_sectors_per_cluster_limit_FAT16 =
40006c4c: 81 80 20 00 wr %g0, %y
40006c50: 01 00 00 00 nop
40006c54: 01 00 00 00 nop
40006c58: 01 00 00 00 nop
40006c5c: 88 75 40 1c udiv %l5, %i4, %g4
if ( number_of_clusters < FAT_FAT12_MAX_CLN
40006c60: 0a 80 00 04 bcs 40006c70 <msdos_format+0xe54>
40006c64: 80 a0 af f4 cmp %g2, 0xff4
40006c68: 28 80 00 58 bleu,a 40006dc8 <msdos_format+0xfac>
<== NEVER TAKEN
40006c6c: 82 10 20 01 mov 1, %g1
<== NOT EXECUTED
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
40006c70: 80 a1 00 01 cmp %g4, %g1
40006c74: 1a 80 00 45 bcc 40006d88 <msdos_format+0xf6c>
40006c78: 03 00 00 3f sethi %hi(0xfc00), %g1
fmt_params->fattype = msdos_get_fat_type(
40006c7c: 82 10 20 04 mov 4, %g1
40006c80: c2 2f bf 72 stb %g1, [ %fp + -142 ]
if ( (gigs & ( 1 << b) ) != 0 )
40006c84: 86 10 20 01 mov 1, %g3
for ( b = 31; b > 0; b-- ) {
40006c88: 82 10 20 1f mov 0x1f, %g1
if (fat_type != fmt_params->fattype) {
40006c8c: 80 a7 60 04 cmp %i5, 4
40006c90: 12 80 00 06 bne 40006ca8 <msdos_format+0xe8c>
40006c94: ae 0d e0 ff and %l7, 0xff, %l7
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
40006c98: 10 bf fe 93 b 400066e4 <msdos_format+0x8c8>
40006c9c: ae 1d c0 1d xor %l7, %i5, %l7
for ( b = 31; b > 0; b-- ) {
40006ca0: 02 80 00 06 be 40006cb8 <msdos_format+0xe9c>
<== NEVER TAKEN
40006ca4: 84 10 20 01 mov 1, %g2
if ( (gigs & ( 1 << b) ) != 0 )
40006ca8: 85 28 c0 01 sll %g3, %g1, %g2
40006cac: 80 8e c0 02 btst %i3, %g2
40006cb0: 22 bf ff fc be,a 40006ca0 <msdos_format+0xe84>
40006cb4: 82 80 7f ff addcc %g1, -1, %g1
fmt_params->sectors_per_cluster = 1 << b;
40006cb8: c4 27 bf 4c st %g2, [ %fp + -180 ]
ret_val = msdos_set_sectors_per_cluster_from_request( rqdata,
40006cbc: 94 07 bf 4c add %fp, -180, %o2
40006cc0: 92 07 bf 40 add %fp, -192, %o1
40006cc4: 7f ff fb e1 call 40005c48 <msdos_set_sectors_per_cluster_from_request.isra.1>
40006cc8: 90 10 00 19 mov %i1, %o0
if (fat_type != fmt_params->fattype && 1 < iteration_cnt) {
40006ccc: c2 0f bf 72 ldub [ %fp + -142 ], %g1
40006cd0: ba 18 40 1d xor %g1, %i5, %i5
40006cd4: 80 a0 00 1d cmp %g0, %i5
40006cd8: 84 0c a0 ff and %l2, 0xff, %g2
40006cdc: 86 40 20 00 addx %g0, 0, %g3
40006ce0: 88 10 20 01 mov 1, %g4
40006ce4: 80 a0 a0 01 cmp %g2, 1
40006ce8: 18 80 00 03 bgu 40006cf4 <msdos_format+0xed8>
40006cec: 82 10 00 03 mov %g3, %g1
40006cf0: 88 10 20 00 clr %g4
40006cf4: 80 89 20 ff btst 0xff, %g4
40006cf8: 02 80 00 38 be 40006dd8 <msdos_format+0xfbc>
40006cfc: d8 07 bf 44 ld [ %fp + -188 ], %o4
40006d00: 80 a0 e0 00 cmp %g3, 0
40006d04: 02 80 00 35 be 40006dd8 <msdos_format+0xfbc>
<== NEVER TAKEN
40006d08: 80 a2 20 00 cmp %o0, 0
--fmt_params->totl_sector_cnt;
40006d0c: 98 03 3f ff add %o4, -1, %o4
40006d10: d8 27 bf 44 st %o4, [ %fp + -188 ]
40006d14: 84 10 00 0c mov %o4, %g2
while( ret_val == 0
40006d18: 02 bf fe 7a be 40006700 <msdos_format+0x8e4>
<== ALWAYS TAKEN
40006d1c: a4 04 a0 01 inc %l2
40006d20: 10 bf fc 99 b 40005f84 <msdos_format+0x168>
<== NOT EXECUTED
40006d24: b0 10 00 08 mov %o0, %i0
<== NOT EXECUTED
return (sectors + clustersize - 1) & ~(clustersize - 1);
40006d28: 10 bf ff 85 b 40006b3c <msdos_format+0xd20>
40006d2c: 84 09 00 02 and %g4, %g2, %g2
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40006d30: d4 07 bf 24 ld [ %fp + -220 ], %o2
40006d34: 92 10 20 02 mov 2, %o1
40006d38: 7f ff fb 97 call 40005b94 <msdos_format_printf>
40006d3c: 90 10 20 00 clr %o0
if (fmt_params->fattype == FAT_FAT32) {
40006d40: c2 0f bf 72 ldub [ %fp + -142 ], %g1
40006d44: ba 08 60 ff and %g1, 0xff, %i5
40006d48: 80 a7 60 04 cmp %i5, 4
40006d4c: 12 80 00 17 bne 40006da8 <msdos_format+0xf8c>
40006d50: 84 10 20 01 mov 1, %g2
fmt_params->rsvd_sector_cnt = 32;
40006d54: 82 10 20 20 mov 0x20, %g1
40006d58: c2 27 bf 48 st %g1, [ %fp + -184 ]
fmt_params->mbr_copy_sec = 6;
40006d5c: 82 10 20 06 mov 6, %g1
fmt_params->fsinfo_sec = 1;
40006d60: 84 10 20 01 mov 1, %g2
fmt_params->mbr_copy_sec = 6;
40006d64: c2 27 bf 68 st %g1, [ %fp + -152 ]
fmt_params->fsinfo_sec = 1;
40006d68: ae 10 20 04 mov 4, %l7
fmt_params->files_per_root_dir = 0;
40006d6c: c0 27 bf 58 clr [ %fp + -168 ]
fmt_params->fsinfo_sec = 1;
40006d70: 96 10 20 20 mov 0x20, %o3
40006d74: 82 10 20 00 clr %g1
40006d78: c4 27 bf 6c st %g2, [ %fp + -148 ]
40006d7c: ba 10 20 04 mov 4, %i5
40006d80: 10 bf fd f1 b 40006544 <msdos_format+0x728>
40006d84: f8 07 bf 40 ld [ %fp + -192 ], %i4
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
40006d88: 82 10 63 f4 or %g1, 0x3f4, %g1
40006d8c: 80 a0 40 02 cmp %g1, %g2
40006d90: 0a bf ff bc bcs 40006c80 <msdos_format+0xe64>
40006d94: 82 10 20 04 mov 4, %g1
fmt_params->fattype = msdos_get_fat_type(
40006d98: 82 10 20 02 mov 2, %g1
40006d9c: ae 10 20 02 mov 2, %l7
40006da0: 10 bf fe 50 b 400066e0 <msdos_format+0x8c4>
40006da4: c2 2f bf 72 stb %g1, [ %fp + -142 ]
fmt_params->rsvd_sector_cnt = 1;
40006da8: c4 27 bf 48 st %g2, [ %fp + -184 ]
if (fmt_params->fattype == FAT_FAT16) {
40006dac: 80 a7 60 02 cmp %i5, 2
40006db0: 02 80 00 10 be 40006df0 <msdos_format+0xfd4>
40006db4: ae 10 00 01 mov %g1, %l7
40006db8: d6 07 bf 48 ld [ %fp + -184 ], %o3
40006dbc: 86 10 20 3f mov 0x3f, %g3
40006dc0: 10 bf fd d5 b 40006514 <msdos_format+0x6f8>
40006dc4: ba 08 60 ff and %g1, 0xff, %i5
fmt_params->fattype = msdos_get_fat_type(
40006dc8: c2 2f bf 72 stb %g1, [ %fp + -142 ]
<== NOT EXECUTED
fmt_params->sectors_per_cluster = 2;
40006dcc: 82 10 20 02 mov 2, %g1
40006dd0: 10 bf ff bb b 40006cbc <msdos_format+0xea0>
40006dd4: c2 27 bf 4c st %g1, [ %fp + -180 ]
40006dd8: 84 10 00 0c mov %o4, %g2
while( ret_val == 0
40006ddc: 80 a2 20 00 cmp %o0, 0
40006de0: 02 bf fe 45 be 400066f4 <msdos_format+0x8d8>
<== ALWAYS TAKEN
40006de4: a4 04 a0 01 inc %l2
40006de8: 10 bf fc 67 b 40005f84 <msdos_format+0x168>
<== NOT EXECUTED
40006dec: b0 10 00 08 mov %o0, %i0
<== NOT EXECUTED
40006df0: d6 07 bf 48 ld [ %fp + -184 ], %o3
if (fmt_params->fattype == FAT_FAT16) {
40006df4: 86 10 21 ff mov 0x1ff, %g3
40006df8: 10 bf fd c7 b 40006514 <msdos_format+0x6f8>
40006dfc: ba 08 60 ff and %g1, 0xff, %i5
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40006e00: 15 10 00 99 sethi %hi(0x40026400), %o2
fmt_params->fat_num = 2;
40006e04: c2 2f bf 70 stb %g1, [ %fp + -144 ]
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
40006e08: 96 10 20 02 mov 2, %o3
40006e0c: 94 12 a0 10 or %o2, 0x10, %o2
40006e10: 92 10 20 02 mov 2, %o1
40006e14: 7f ff fb 60 call 40005b94 <msdos_format_printf>
40006e18: 90 10 20 00 clr %o0
{
40006e1c: 05 00 00 1f sethi %hi(0x7c00), %g2
uint32_t fat16_sect_per_clust = 32;
40006e20: 82 10 20 20 mov 0x20, %g1
{
40006e24: 10 bf fd 7d b 40006418 <msdos_format+0x5fc>
40006e28: 84 10 a3 a8 or %g2, 0x3a8, %g2
else if (fmt_params->totl_sector_cnt < FAT_FAT16_MAX_CLN * fat16_sect_per_clust) {
40006e2c: 84 10 a3 f5 or %g2, 0x3f5, %g2
40006e30: 82 58 40 02 smul %g1, %g2, %g1
40006e34: 80 a0 c0 01 cmp %g3, %g1
40006e38: 1a 80 00 79 bcc 4000701c <msdos_format+0x1200>
40006e3c: 82 10 20 04 mov 4, %g1
fmt_params->fattype = FAT_FAT16;
40006e40: 82 10 20 02 mov 2, %g1
40006e44: c2 2f bf 72 stb %g1, [ %fp + -142 ]
fmt_params->sectors_per_cluster = 2;
40006e48: 82 10 20 02 mov 2, %g1
40006e4c: 10 bf fd 7b b 40006438 <msdos_format+0x61c>
40006e50: c2 27 bf 4c st %g1, [ %fp + -180 ]
if ( fmt_params->totl_sector_cnt == 0 )
40006e54: 02 bf fe 2e be 4000670c <msdos_format+0x8f0>
<== NEVER TAKEN
40006e58: f0 07 bf 20 ld [ %fp + -224 ], %i0
40006e5c: c2 0f bf 90 ldub [ %fp + -112 ], %g1
if (FAT_FAT32 != fmt_params->fattype)
40006e60: c4 0f bf 72 ldub [ %fp + -142 ], %g2
40006e64: c6 07 bf 4c ld [ %fp + -180 ], %g3
40006e68: 80 a0 a0 04 cmp %g2, 4
40006e6c: 02 80 00 0d be 40006ea0 <msdos_format+0x1084>
40006e70: 88 08 60 ff and %g1, 0xff, %g4
if (! skip_alignment)
40006e74: 88 88 60 ff andcc %g1, 0xff, %g4
40006e78: 12 80 00 06 bne 40006e90 <msdos_format+0x1074>
40006e7c: c4 07 bf 5c ld [ %fp + -164 ], %g2
return (sectors + clustersize - 1) & ~(clustersize - 1);
40006e80: 82 00 bf ff add %g2, -1, %g1
40006e84: 84 20 00 03 neg %g3, %g2
40006e88: 82 00 40 03 add %g1, %g3, %g1
40006e8c: 84 08 40 02 and %g1, %g2, %g2
* (fmt_params->bytes_per_sector / FAT_DIRENTRY_SIZE);
40006e90: c2 07 bf 40 ld [ %fp + -192 ], %g1
40006e94: 83 30 60 05 srl %g1, 5, %g1
40006e98: 82 58 40 02 smul %g1, %g2, %g1
fmt_params->files_per_root_dir = loc_align_object (fmt_params->root_dir_sectors,
40006e9c: c2 27 bf 58 st %g1, [ %fp + -168 ]
if (! skip_alignment)
40006ea0: 80 a1 20 00 cmp %g4, 0
40006ea4: 12 80 00 06 bne 40006ebc <msdos_format+0x10a0>
40006ea8: fa 07 bf 48 ld [ %fp + -184 ], %i5
return (sectors + clustersize - 1) & ~(clustersize - 1);
40006eac: 82 07 7f ff add %i5, -1, %g1
40006eb0: ba 20 00 03 neg %g3, %i5
40006eb4: 82 00 40 03 add %g1, %g3, %g1
40006eb8: ba 08 40 1d and %g1, %i5, %i5
if ((rqdata != NULL) && (rqdata->media != 0)) {
40006ebc: 80 a6 60 00 cmp %i1, 0
40006ec0: 02 80 00 14 be 40006f10 <msdos_format+0x10f4>
40006ec4: fa 27 bf 48 st %i5, [ %fp + -184 ]
40006ec8: f8 0e 60 14 ldub [ %i1 + 0x14 ], %i4
40006ecc: 92 8f 20 ff andcc %i4, 0xff, %o1
40006ed0: 02 80 00 11 be 40006f14 <msdos_format+0x10f8>
40006ed4: 82 10 3f f8 mov -8, %g1
const char valid_media_codes[] =
40006ed8: 03 10 00 99 sethi %hi(0x40026400), %g1
40006edc: c4 18 60 c0 ldd [ %g1 + 0xc0 ], %g2 ! 400264c0 <rtems_filesystem_null_handlers+0x1b8>
40006ee0: 88 10 60 c0 or %g1, 0xc0, %g4
40006ee4: c2 09 20 08 ldub [ %g4 + 8 ], %g1
40006ee8: c4 3f bf 30 std %g2, [ %fp + -208 ]
if (NULL==memchr(valid_media_codes,
40006eec: 94 10 20 09 mov 9, %o2
const char valid_media_codes[] =
40006ef0: c2 2f bf 38 stb %g1, [ %fp + -200 ]
if (NULL==memchr(valid_media_codes,
40006ef4: 40 00 53 0a call 4001bb1c <memchr>
40006ef8: 90 07 bf 30 add %fp, -208, %o0
40006efc: 80 a2 20 00 cmp %o0, 0
40006f00: 02 bf fe 03 be 4000670c <msdos_format+0x8f0>
<== ALWAYS TAKEN
40006f04: 01 00 00 00 nop
fmt_params->media_code = rqdata->media;
40006f08: 10 bf fc 23 b 40005f94 <msdos_format+0x178>
<== NOT EXECUTED
40006f0c: f8 2f bf 71 stb %i4, [ %fp + -143 ]
<== NOT EXECUTED
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
40006f10: 82 10 3f f8 mov -8, %g1
40006f14: 10 bf fc 20 b 40005f94 <msdos_format+0x178>
40006f18: c2 2f bf 71 stb %g1, [ %fp + -143 ]
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
40006f1c: 85 30 60 08 srl %g1, 8, %g2
40006f20: c2 2f 60 24 stb %g1, [ %i5 + 0x24 ]
40006f24: b9 30 60 10 srl %g1, 0x10, %i4
40006f28: c4 2f 60 25 stb %g2, [ %i5 + 0x25 ]
40006f2c: 85 30 60 18 srl %g1, 0x18, %g2
FAT_SET_BR_EXT_FLAGS(mbr , 0);
40006f30: c0 2f 60 28 clrb [ %i5 + 0x28 ]
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
40006f34: 82 10 20 29 mov 0x29, %g1
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
40006f38: c4 2f 60 27 stb %g2, [ %i5 + 0x27 ]
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
40006f3c: 84 07 60 47 add %i5, 0x47, %g2
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
40006f40: f8 2f 60 26 stb %i4, [ %i5 + 0x26 ]
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
40006f44: 94 10 20 08 mov 8, %o2
FAT_SET_BR_EXT_FLAGS(mbr , 0);
40006f48: c0 2f 60 29 clrb [ %i5 + 0x29 ]
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
40006f4c: 13 10 00 99 sethi %hi(0x40026400), %o1
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
40006f50: c0 2f 60 2a clrb [ %i5 + 0x2a ]
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
40006f54: 92 12 60 60 or %o1, 0x60, %o1
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
40006f58: c0 2f 60 2b clrb [ %i5 + 0x2b ]
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
40006f5c: 90 07 60 52 add %i5, 0x52, %o0
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
40006f60: f8 07 bf 68 ld [ %fp + -152 ], %i4
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
40006f64: c8 2f 60 2c stb %g4, [ %i5 + 0x2c ]
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
40006f68: 89 37 20 08 srl %i4, 8, %g4
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
40006f6c: c0 2f 60 2d clrb [ %i5 + 0x2d ]
40006f70: c0 2f 60 2e clrb [ %i5 + 0x2e ]
40006f74: c0 2f 60 2f clrb [ %i5 + 0x2f ]
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
40006f78: c6 2f 60 30 stb %g3, [ %i5 + 0x30 ]
40006f7c: c0 2f 60 31 clrb [ %i5 + 0x31 ]
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
40006f80: f8 2f 60 32 stb %i4, [ %i5 + 0x32 ]
40006f84: c8 2f 60 33 stb %g4, [ %i5 + 0x33 ]
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
40006f88: c0 2f 60 34 clrb [ %i5 + 0x34 ]
40006f8c: c0 2f 60 35 clrb [ %i5 + 0x35 ]
40006f90: c0 2f 60 36 clrb [ %i5 + 0x36 ]
40006f94: c0 2f 60 37 clrb [ %i5 + 0x37 ]
40006f98: c0 2f 60 38 clrb [ %i5 + 0x38 ]
40006f9c: c0 2f 60 39 clrb [ %i5 + 0x39 ]
40006fa0: c0 2f 60 3a clrb [ %i5 + 0x3a ]
40006fa4: c0 2f 60 3b clrb [ %i5 + 0x3b ]
40006fa8: c0 2f 60 3c clrb [ %i5 + 0x3c ]
40006fac: c0 2f 60 3d clrb [ %i5 + 0x3d ]
40006fb0: c0 2f 60 3e clrb [ %i5 + 0x3e ]
40006fb4: c0 2f 60 3f clrb [ %i5 + 0x3f ]
FAT_SET_BR_FAT32_DRVNUM(mbr , 0); /* only needed for INT13... */
40006fb8: c0 2f 60 40 clrb [ %i5 + 0x40 ]
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
40006fbc: c0 2f 60 41 clrb [ %i5 + 0x41 ]
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
40006fc0: c2 2f 60 42 stb %g1, [ %i5 + 0x42 ]
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
40006fc4: c0 2f 60 43 clrb [ %i5 + 0x43 ]
40006fc8: c0 2f 60 44 clrb [ %i5 + 0x44 ]
40006fcc: c0 2f 60 45 clrb [ %i5 + 0x45 ]
40006fd0: c0 2f 60 46 clrb [ %i5 + 0x46 ]
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
40006fd4: c0 2f 60 47 clrb [ %i5 + 0x47 ]
40006fd8: c0 28 a0 01 clrb [ %g2 + 1 ]
40006fdc: c0 28 a0 02 clrb [ %g2 + 2 ]
40006fe0: c0 28 a0 03 clrb [ %g2 + 3 ]
40006fe4: c0 28 a0 04 clrb [ %g2 + 4 ]
40006fe8: c0 28 a0 05 clrb [ %g2 + 5 ]
40006fec: c0 28 a0 06 clrb [ %g2 + 6 ]
40006ff0: c0 28 a0 07 clrb [ %g2 + 7 ]
40006ff4: c0 28 a0 08 clrb [ %g2 + 8 ]
40006ff8: c0 28 a0 09 clrb [ %g2 + 9 ]
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
40006ffc: 40 00 53 39 call 4001bce0 <memcpy>
40007000: c0 28 a0 0a clrb [ %g2 + 0xa ]
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
40007004: 10 bf fc ac b 400062b4 <msdos_format+0x498>
40007008: 82 10 20 55 mov 0x55, %g1
*volid_ptr = rand();
4000700c: 40 00 56 0f call 4001c848 <rand>
40007010: 01 00 00 00 nop
40007014: 10 bf fc 2b b 400060c0 <msdos_format+0x2a4>
40007018: d0 27 bf 8c st %o0, [ %fp + -116 ]
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
4000701c: 84 10 20 00 clr %g2
40007020: 07 10 00 00 sethi %hi(0x40000000), %g3
fmt_params->fattype = FAT_FAT32;
40007024: c2 2f bf 72 stb %g1, [ %fp + -142 ]
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
40007028: b6 87 40 03 addcc %i5, %g3, %i3
for (b = 31; b > 0; b--)
4000702c: 82 10 20 1f mov 0x1f, %g1
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
40007030: b4 47 00 02 addx %i4, %g2, %i2
if ((gigs & (1 << b)) != 0)
40007034: 88 10 20 01 mov 1, %g4
uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
40007038: 87 2e a0 02 sll %i2, 2, %g3
4000703c: 85 36 e0 1e srl %i3, 0x1e, %g2
40007040: 10 80 00 04 b 40007050 <msdos_format+0x1234>
40007044: 86 10 c0 02 or %g3, %g2, %g3
for (b = 31; b > 0; b--)
40007048: 02 80 00 17 be 400070a4 <msdos_format+0x1288>
4000704c: 84 10 20 01 mov 1, %g2
if ((gigs & (1 << b)) != 0)
40007050: 85 29 00 01 sll %g4, %g1, %g2
40007054: 80 88 c0 02 btst %g3, %g2
40007058: 02 bf ff fc be 40007048 <msdos_format+0x122c>
4000705c: 82 80 7f ff addcc %g1, -1, %g1
fmt_params->sectors_per_cluster = 1 << b;
40007060: 10 bf fc f6 b 40006438 <msdos_format+0x61c>
40007064: c4 27 bf 4c st %g2, [ %fp + -180 ]
for (i = 0;
40007068: 10 bf fe 18 b 400068c8 <msdos_format+0xaac>
<== NOT EXECUTED
4000706c: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
40007070: 13 10 00 98 sethi %hi(0x40026000), %o1
40007074: 10 bf fc 8d b 400062a8 <msdos_format+0x48c>
40007078: 92 12 63 80 or %o1, 0x380, %o1 ! 40026380 <rtems_filesystem_null_handlers+0x78>
errno = EINVAL;
4000707c: 40 00 51 3d call 4001b570 <__errno>
40007080: 01 00 00 00 nop
40007084: 82 10 20 16 mov 0x16, %g1 ! 16 <_TLS_Alignment+0x15>
40007088: c2 22 00 00 st %g1, [ %o0 ]
if ( fmt_params->totl_sector_cnt == 0 )
4000708c: c2 07 bf 44 ld [ %fp + -188 ], %g1
40007090: 80 a0 60 00 cmp %g1, 0
40007094: 02 bf fd 9e be 4000670c <msdos_format+0x8f0>
<== NEVER TAKEN
40007098: fa 07 bf 48 ld [ %fp + -184 ], %i5
ret_val = -1;
4000709c: 10 bf fb be b 40005f94 <msdos_format+0x178>
400070a0: b0 10 3f ff mov -1, %i0
fmt_params->sectors_per_cluster = 1 << b;
400070a4: 10 bf fc e5 b 40006438 <msdos_format+0x61c>
400070a8: c4 27 bf 4c st %g2, [ %fp + -180 ]
if ( fmt_params->totl_sector_cnt == 0 )
400070ac: 80 a0 60 00 cmp %g1, 0
<== NOT EXECUTED
400070b0: 02 bf fd 97 be 4000670c <msdos_format+0x8f0>
<== NOT EXECUTED
400070b4: c6 07 bf 4c ld [ %fp + -180 ], %g3
<== NOT EXECUTED
400070b8: 10 bf ff 6f b 40006e74 <msdos_format+0x1058>
<== NOT EXECUTED
400070bc: c2 0f bf 90 ldub [ %fp + -112 ], %g1
<== NOT EXECUTED
else if ( number_of_clusters < FAT_FAT16_MAX_CLN
400070c0: 07 00 00 3f sethi %hi(0xfc00), %g3
400070c4: 86 10 e3 f4 or %g3, 0x3f4, %g3 ! fff4 <_ISR_Stack_size+0xeff4>
400070c8: 80 a0 c0 02 cmp %g3, %g2
400070cc: 0a bf fe ec bcs 40006c7c <msdos_format+0xe60>
400070d0: 80 a1 00 01 cmp %g4, %g1
400070d4: 1a bf fd 7f bcc 400066d0 <msdos_format+0x8b4>
<== ALWAYS TAKEN
400070d8: 86 10 20 02 mov 2, %g3
fmt_params->fattype = msdos_get_fat_type(
400070dc: 10 bf fe e9 b 40006c80 <msdos_format+0xe64>
<== NOT EXECUTED
400070e0: 82 10 20 04 mov 4, %g1
<== NOT EXECUTED
40013260 <msdos_format_dirent_with_dot>:
for (i = MSDOS_SHORT_BASE_LEN, src_tmp = src + MSDOS_SHORT_BASE_LEN - 1;
40013260: 82 02 60 07 add %o1, 7, %g1
40013264: 88 10 20 08 mov 8, %g4
i > 0 && *src_tmp == ' ';
40013268: c6 48 40 00 ldsb [ %g1 ], %g3
4001326c: 80 a0 e0 20 cmp %g3, 0x20
40013270: 12 80 00 15 bne 400132c4 <msdos_format_dirent_with_dot+0x64>
40013274: 84 01 3f ff add %g4, -1, %g2
40013278: 88 10 00 02 mov %g2, %g4
for (i = MSDOS_SHORT_BASE_LEN, src_tmp = src + MSDOS_SHORT_BASE_LEN - 1;
4001327c: 80 a0 a0 00 cmp %g2, 0
40013280: 12 bf ff fa bne 40013268 <msdos_format_dirent_with_dot+0x8>
<== ALWAYS TAKEN
40013284: 82 00 7f ff add %g1, -1, %g1
i > 0 && *src_tmp == ' ';
40013288: c2 4a 60 0a ldsb [ %o1 + 0xa ], %g1
4001328c: 80 a0 60 20 cmp %g1, 0x20
40013290: 12 80 00 3d bne 40013384 <msdos_format_dirent_with_dot+0x124>
40013294: 82 10 20 2e mov 0x2e, %g1
40013298: c2 4a 60 09 ldsb [ %o1 + 9 ], %g1
4001329c: 80 a0 60 20 cmp %g1, 0x20
400132a0: 32 80 00 1c bne,a 40013310 <msdos_format_dirent_with_dot+0xb0>
400132a4: 96 10 20 01 mov 1, %o3
400132a8: c2 4a 60 08 ldsb [ %o1 + 8 ], %g1
400132ac: 80 a0 60 20 cmp %g1, 0x20
400132b0: 12 80 00 18 bne 40013310 <msdos_format_dirent_with_dot+0xb0>
400132b4: 96 10 20 00 clr %o3
*dst = '\0'; /* terminate string */
400132b8: c0 2a 00 00 clrb [ %o0 ]
}
400132bc: 81 c3 e0 08 retl
400132c0: 90 10 00 02 mov %g2, %o0
400132c4: 1b 10 00 9b sethi %hi(0x40026c00), %o5
400132c8: 82 10 20 00 clr %g1
400132cc: 9a 13 63 a1 or %o5, 0x3a1, %o5
400132d0: 98 10 00 04 mov %g4, %o4
400132d4: c6 0a 40 01 ldub [ %o1 + %g1 ], %g3
*dst++ = tolower((unsigned char)(*src_tmp++));
400132d8: c4 0b 40 03 ldub [ %o5 + %g3 ], %g2
400132dc: 84 08 a0 03 and %g2, 3, %g2
400132e0: 80 a0 a0 01 cmp %g2, 1
400132e4: 22 80 00 02 be,a 400132ec <msdos_format_dirent_with_dot+0x8c>
400132e8: 86 00 e0 20 add %g3, 0x20, %g3
400132ec: c6 2a 00 01 stb %g3, [ %o0 + %g1 ]
400132f0: 82 00 60 01 inc %g1
while (i-- > 0) {
400132f4: 84 23 00 01 sub %o4, %g1, %g2
400132f8: 80 a0 a0 00 cmp %g2, 0
400132fc: 34 bf ff f7 bg,a 400132d8 <msdos_format_dirent_with_dot+0x78>
40013300: c6 0a 40 01 ldub [ %o1 + %g1 ], %g3
40013304: 90 02 00 0c add %o0, %o4, %o0
40013308: 10 bf ff e0 b 40013288 <msdos_format_dirent_with_dot+0x28>
4001330c: 84 10 00 04 mov %g4, %g2
*dst++ = '.'; /* append dot */
40013310: 82 10 20 2e mov 0x2e, %g1
40013314: c2 2a 00 00 stb %g1, [ %o0 ]
40013318: 94 02 20 01 add %o0, 1, %o2
++len; /* dot */
4001331c: 84 00 a0 01 inc %g2
src_tmp = src + MSDOS_SHORT_BASE_LEN;
40013320: 92 02 60 08 add %o1, 8, %o1
40013324: 1b 10 00 9b sethi %hi(0x40026c00), %o5
40013328: 98 10 00 0b mov %o3, %o4
4001332c: 88 10 00 0a mov %o2, %g4
40013330: 9a 13 63 a1 or %o5, 0x3a1, %o5
40013334: c6 0a 40 00 ldub [ %o1 ], %g3
*dst++ = tolower((unsigned char)(*src_tmp++));
40013338: c2 0b 40 03 ldub [ %o5 + %g3 ], %g1
4001333c: 82 08 60 03 and %g1, 3, %g1
40013340: 92 02 60 01 inc %o1
40013344: 80 a0 60 01 cmp %g1, 1
40013348: 12 80 00 03 bne 40013354 <msdos_format_dirent_with_dot+0xf4>
4001334c: 88 01 20 01 inc %g4
40013350: 86 00 e0 20 add %g3, 0x20, %g3
while (i-- > 0) {
40013354: 98 03 3f ff add %o4, -1, %o4
40013358: 82 03 20 01 add %o4, 1, %g1
4001335c: 80 a0 60 00 cmp %g1, 0
40013360: 14 bf ff f5 bg 40013334 <msdos_format_dirent_with_dot+0xd4>
40013364: c6 29 3f ff stb %g3, [ %g4 + -1 ]
40013368: 90 02 e0 01 add %o3, 1, %o0
4001336c: 90 02 80 08 add %o2, %o0, %o0
40013370: 84 00 a0 01 inc %g2
*dst = '\0'; /* terminate string */
40013374: c0 2a 00 00 clrb [ %o0 ]
40013378: 84 02 c0 02 add %o3, %g2, %g2
}
4001337c: 81 c3 e0 08 retl
40013380: 90 10 00 02 mov %g2, %o0
*dst++ = '.'; /* append dot */
40013384: 94 02 20 01 add %o0, 1, %o2
40013388: c2 2a 00 00 stb %g1, [ %o0 ]
++len; /* dot */
4001338c: 84 00 a0 01 inc %g2
src_tmp = src + MSDOS_SHORT_BASE_LEN;
40013390: 92 02 60 08 add %o1, 8, %o1
40013394: 10 bf ff e4 b 40013324 <msdos_format_dirent_with_dot+0xc4>
40013398: 96 10 20 02 mov 2, %o3
40013f14 <msdos_get_dotdot_dir_info_cluster_num_and_offset>:
{
40013f14: 9d e3 bf 50 save %sp, -176, %sp
msdos_fs_info_t *fs_info = mt_entry->fs_info;
40013f18: f8 06 20 08 ld [ %i0 + 8 ], %i4
fat_file_fd_t *fat_fd = NULL;
40013f1c: c0 27 bf bc clr [ %fp + -68 ]
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
40013f20: 94 07 bf bc add %fp, -68, %o2
rtems_dosfs_convert_control *converter = fs_info->converter;
40013f24: e0 07 20 cc ld [ %i4 + 0xcc ], %l0
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
40013f28: 92 10 00 1a mov %i2, %o1
40013f2c: 7f ff f4 d1 call 40011270 <fat_file_open>
40013f30: 90 10 00 1c mov %i4, %o0
if (rc != RC_OK)
40013f34: ba 92 20 00 orcc %o0, 0, %i5
40013f38: 02 80 00 04 be 40013f48 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x34>
<== ALWAYS TAKEN
40013f3c: c2 07 bf bc ld [ %fp + -68 ], %g1
}
40013f40: 81 c7 e0 08 ret
40013f44: 91 e8 00 1d restore %g0, %i5, %o0
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
40013f48: 05 00 08 00 sethi %hi(0x200000), %g2
fat_fd->cln = cln;
40013f4c: f2 20 60 1c st %i1, [ %g1 + 0x1c ]
rc = fat_file_size(&fs_info->fat, fat_fd);
40013f50: 92 10 00 01 mov %g1, %o1
fat_fd->fat_file_type = FAT_DIRECTORY;
40013f54: c0 20 60 10 clr [ %g1 + 0x10 ]
rc = fat_file_size(&fs_info->fat, fat_fd);
40013f58: 90 10 00 1c mov %i4, %o0
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
40013f5c: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
fat_fd->map.file_cln = 0;
40013f60: c0 20 60 34 clr [ %g1 + 0x34 ]
rc = fat_file_size(&fs_info->fat, fat_fd);
40013f64: 7f ff f8 0d call 40011f98 <fat_file_size>
40013f68: f2 20 60 38 st %i1, [ %g1 + 0x38 ]
if (rc != RC_OK)
40013f6c: ba 92 20 00 orcc %o0, 0, %i5
40013f70: 12 80 00 90 bne 400141b0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x29c>
<== NEVER TAKEN
40013f74: 98 10 20 0b mov 0xb, %o4
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013f78: ba 07 bf c0 add %fp, -64, %i5
msdos_long_to_short(
40013f7c: 96 10 00 1d mov %i5, %o3
40013f80: 94 10 20 01 mov 1, %o2
40013f84: 33 10 00 98 sethi %hi(0x40026000), %i1
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013f88: c0 27 bf c0 clr [ %fp + -64 ]
msdos_long_to_short(
40013f8c: 92 16 62 b8 or %i1, 0x2b8, %o1
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013f90: c0 27 bf c4 clr [ %fp + -60 ]
msdos_long_to_short(
40013f94: 90 10 00 10 mov %l0, %o0
memset(dot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013f98: c0 27 bf c8 clr [ %fp + -56 ]
40013f9c: c0 27 bf cc clr [ %fp + -52 ]
40013fa0: c0 27 bf d0 clr [ %fp + -48 ]
40013fa4: c0 27 bf d4 clr [ %fp + -44 ]
40013fa8: c0 27 bf d8 clr [ %fp + -40 ]
msdos_long_to_short(
40013fac: 7f ff fa 8e call 400129e4 <msdos_long_to_short>
40013fb0: c0 27 bf dc clr [ %fp + -36 ]
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, (const uint8_t*)".", 1,
40013fb4: fa 23 a0 60 st %i5, [ %sp + 0x60 ]
40013fb8: 9a 10 20 01 mov 1, %o5
40013fbc: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
40013fc0: 98 10 20 01 mov 1, %o4
40013fc4: d2 07 bf bc ld [ %fp + -68 ], %o1
40013fc8: 96 16 62 b8 or %i1, 0x2b8, %o3
40013fcc: 94 10 20 00 clr %o2
40013fd0: 7f ff fc f3 call 4001339c <msdos_find_name_in_fat_file>
40013fd4: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
40013fd8: ba 92 20 00 orcc %o0, 0, %i5
40013fdc: 12 80 00 75 bne 400141b0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x29c>
<== NEVER TAKEN
40013fe0: 98 10 20 0b mov 0xb, %o4
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013fe4: ba 07 bf e0 add %fp, -32, %i5
msdos_long_to_short(
40013fe8: 96 10 00 1d mov %i5, %o3
40013fec: 94 10 20 02 mov 2, %o2
40013ff0: 33 10 00 99 sethi %hi(0x40026400), %i1
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013ff4: c0 27 bf e0 clr [ %fp + -32 ]
msdos_long_to_short(
40013ff8: 92 16 63 e8 or %i1, 0x3e8, %o1
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40013ffc: c0 27 bf e4 clr [ %fp + -28 ]
msdos_long_to_short(
40014000: 90 10 00 10 mov %l0, %o0
memset(dotdot_node, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
40014004: c0 27 bf e8 clr [ %fp + -24 ]
40014008: c0 27 bf ec clr [ %fp + -20 ]
4001400c: c0 27 bf f0 clr [ %fp + -16 ]
40014010: c0 27 bf f4 clr [ %fp + -12 ]
40014014: c0 27 bf f8 clr [ %fp + -8 ]
msdos_long_to_short(
40014018: 7f ff fa 73 call 400129e4 <msdos_long_to_short>
4001401c: c0 27 bf fc clr [ %fp + -4 ]
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, (const uint8_t*)"..", 2,
40014020: fa 23 a0 60 st %i5, [ %sp + 0x60 ]
40014024: 9a 10 20 01 mov 1, %o5
40014028: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
4001402c: 98 10 20 02 mov 2, %o4
40014030: d2 07 bf bc ld [ %fp + -68 ], %o1
40014034: 96 16 63 e8 or %i1, 0x3e8, %o3
40014038: 94 10 20 00 clr %o2
4001403c: 7f ff fc d8 call 4001339c <msdos_find_name_in_fat_file>
40014040: 90 10 00 18 mov %i0, %o0
if (rc != RC_OK)
40014044: ba 92 20 00 orcc %o0, 0, %i5
40014048: 12 80 00 5a bne 400141b0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x29c>
<== NEVER TAKEN
4001404c: c4 17 bf da lduh [ %fp + -38 ], %g2
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
40014050: c2 17 bf d4 lduh [ %fp + -44 ], %g1
40014054: b3 28 a0 08 sll %g2, 8, %i1
40014058: a1 28 60 08 sll %g1, 8, %l0
rc = fat_file_close(&fs_info->fat, fat_fd);
4001405c: d2 07 bf bc ld [ %fp + -68 ], %o1
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
40014060: 85 28 a0 10 sll %g2, 0x10, %g2
40014064: 83 28 60 10 sll %g1, 0x10, %g1
40014068: 85 30 a0 18 srl %g2, 0x18, %g2
4001406c: 83 30 60 18 srl %g1, 0x18, %g1
40014070: b2 16 40 02 or %i1, %g2, %i1
rc = fat_file_close(&fs_info->fat, fat_fd);
40014074: 90 10 00 1c mov %i4, %o0
40014078: 7f ff f6 26 call 40011910 <fat_file_close>
4001407c: a0 14 00 01 or %l0, %g1, %l0
if ( rc != RC_OK )
40014080: ba 92 20 00 orcc %o0, 0, %i5
40014084: 12 bf ff af bne 40013f40 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2c>
<== NEVER TAKEN
40014088: c6 17 bf fa lduh [ %fp + -6 ], %g3
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
4001408c: c4 17 bf f4 lduh [ %fp + -12 ], %g2
40014090: 83 28 e0 08 sll %g3, 8, %g1
40014094: 89 28 a0 08 sll %g2, 8, %g4
40014098: 87 28 e0 10 sll %g3, 0x10, %g3
4001409c: 85 28 a0 10 sll %g2, 0x10, %g2
400140a0: 87 30 e0 18 srl %g3, 0x18, %g3
400140a4: 85 30 a0 18 srl %g2, 0x18, %g2
400140a8: 82 10 40 03 or %g1, %g3, %g1
400140ac: 84 11 00 02 or %g4, %g2, %g2
400140b0: 83 28 60 10 sll %g1, 0x10, %g1
400140b4: 85 28 a0 10 sll %g2, 0x10, %g2
400140b8: 83 30 60 10 srl %g1, 0x10, %g1
400140bc: 80 90 80 01 orcc %g2, %g1, %g0
400140c0: 12 80 00 08 bne 400140e0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1cc>
400140c4: 94 07 bf bc add %fp, -68, %o2
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
400140c8: 82 10 3f ff mov -1, %g1
dir_pos->sname.ofs = 0;
400140cc: c0 26 a0 04 clr [ %i2 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
400140d0: c2 26 a0 08 st %g1, [ %i2 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
400140d4: c2 26 a0 0c st %g1, [ %i2 + 0xc ]
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
400140d8: 82 10 20 01 mov 1, %g1
400140dc: c2 26 80 00 st %g1, [ %i2 ]
rc = fat_file_open(&fs_info->fat, dir_pos, &fat_fd);
400140e0: 92 10 00 1a mov %i2, %o1
400140e4: 7f ff f4 63 call 40011270 <fat_file_open>
400140e8: 90 10 00 1c mov %i4, %o0
if (rc != RC_OK)
400140ec: ba 92 20 00 orcc %o0, 0, %i5
400140f0: 12 bf ff 94 bne 40013f40 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2c>
<== NEVER TAKEN
400140f4: c2 17 bf fa lduh [ %fp + -6 ], %g1
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
400140f8: c6 17 bf f4 lduh [ %fp + -12 ], %g3
400140fc: 85 28 60 08 sll %g1, 8, %g2
40014100: 89 28 60 10 sll %g1, 0x10, %g4
40014104: 83 28 e0 08 sll %g3, 8, %g1
40014108: 87 28 e0 10 sll %g3, 0x10, %g3
4001410c: 87 30 e0 18 srl %g3, 0x18, %g3
40014110: 89 31 20 18 srl %g4, 0x18, %g4
40014114: 82 10 40 03 or %g1, %g3, %g1
40014118: 84 10 80 04 or %g2, %g4, %g2
4001411c: 83 28 60 10 sll %g1, 0x10, %g1
40014120: 85 28 a0 10 sll %g2, 0x10, %g2
40014124: 85 30 a0 10 srl %g2, 0x10, %g2
40014128: 82 90 40 02 orcc %g1, %g2, %g1
4001412c: 12 80 00 27 bne 400141c8 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2b4>
40014130: c6 07 bf bc ld [ %fp + -68 ], %g3
fat_fd->cln = fs_info->fat.vol.rdir_cl;
40014134: c2 07 20 44 ld [ %i4 + 0x44 ], %g1
40014138: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
4001413c: 05 00 08 00 sethi %hi(0x200000), %g2
fat_fd->fat_file_type = FAT_DIRECTORY;
40014140: c0 20 e0 10 clr [ %g3 + 0x10 ]
rc = fat_file_size(&fs_info->fat, fat_fd);
40014144: 92 10 00 03 mov %g3, %o1
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
40014148: c4 20 e0 14 st %g2, [ %g3 + 0x14 ]
rc = fat_file_size(&fs_info->fat, fat_fd);
4001414c: 90 10 00 1c mov %i4, %o0
fat_fd->map.file_cln = 0;
40014150: c0 20 e0 34 clr [ %g3 + 0x34 ]
rc = fat_file_size(&fs_info->fat, fat_fd);
40014154: 7f ff f7 91 call 40011f98 <fat_file_size>
40014158: c2 20 e0 38 st %g1, [ %g3 + 0x38 ]
fat_file_close(&fs_info->fat, fat_fd);
4001415c: d2 07 bf bc ld [ %fp + -68 ], %o1
if (rc != RC_OK)
40014160: 80 a2 20 00 cmp %o0, 0
40014164: 12 80 00 1b bne 400141d0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2bc>
<== NEVER TAKEN
40014168: ba 10 00 08 mov %o0, %i5
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
4001416c: 85 2e 60 10 sll %i1, 0x10, %g2
40014170: 85 30 a0 10 srl %g2, 0x10, %g2
40014174: 95 2c 20 10 sll %l0, 0x10, %o2
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
40014178: 98 10 00 1b mov %i3, %o4
4001417c: 96 10 00 1a mov %i2, %o3
40014180: 94 12 80 02 or %o2, %g2, %o2
40014184: 7f ff ff 03 call 40013d90 <msdos_find_node_by_cluster_num_in_fat_file>
40014188: 90 10 00 18 mov %i0, %o0
fat_file_close(&fs_info->fat, fat_fd);
4001418c: d2 07 bf bc ld [ %fp + -68 ], %o1
rc = msdos_find_node_by_cluster_num_in_fat_file(mt_entry, fat_fd, cl4find,
40014190: ba 10 00 08 mov %o0, %i5
if (rc != RC_OK)
40014194: 80 a7 60 00 cmp %i5, 0
40014198: 12 80 00 12 bne 400141e0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2cc>
<== NEVER TAKEN
4001419c: 90 10 00 1c mov %i4, %o0
rc = fat_file_close(&fs_info->fat, fat_fd);
400141a0: 7f ff f5 dc call 40011910 <fat_file_close>
400141a4: 01 00 00 00 nop
return rc;
400141a8: 10 bf ff 66 b 40013f40 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2c>
400141ac: ba 10 00 08 mov %o0, %i5
fat_file_close(&fs_info->fat, fat_fd);
400141b0: d2 07 bf bc ld [ %fp + -68 ], %o1
<== NOT EXECUTED
400141b4: 90 10 00 1c mov %i4, %o0
<== NOT EXECUTED
400141b8: 7f ff f5 d6 call 40011910 <fat_file_close>
<== NOT EXECUTED
400141bc: b0 10 00 1d mov %i5, %i0
<== NOT EXECUTED
}
400141c0: 81 c7 e0 08 ret
<== NOT EXECUTED
400141c4: 81 e8 00 00 restore
<== NOT EXECUTED
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
400141c8: 10 bf ff dd b 4001413c <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x228>
400141cc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
fat_file_close(&fs_info->fat, fat_fd);
400141d0: 7f ff f5 d0 call 40011910 <fat_file_close>
<== NOT EXECUTED
400141d4: 90 10 00 1c mov %i4, %o0
<== NOT EXECUTED
return rc;
400141d8: 81 c7 e0 08 ret
<== NOT EXECUTED
400141dc: 91 e8 00 1d restore %g0, %i5, %o0
<== NOT EXECUTED
fat_file_close(&fs_info->fat, fat_fd);
400141e0: 7f ff f5 cc call 40011910 <fat_file_close>
<== NOT EXECUTED
400141e4: b0 10 00 1d mov %i5, %i0
<== NOT EXECUTED
return rc;
400141e8: 30 bf ff f6 b,a 400141c0 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x2ac>
<== NOT EXECUTED
400141ec <msdos_get_name_node>:
{
400141ec: 9d e3 bf 98 save %sp, -104, %sp
400141f0: e0 07 a0 5c ld [ %fp + 0x5c ], %l0
rc = msdos_find_name_in_fat_file(parent_loc->mt_entry, fat_fd,
400141f4: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
400141f8: 9a 10 00 1c mov %i4, %o5
400141fc: fa 23 a0 5c st %i5, [ %sp + 0x5c ]
40014200: 98 10 00 1b mov %i3, %o4
40014204: d2 06 20 08 ld [ %i0 + 8 ], %o1
40014208: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
4001420c: 96 10 00 1a mov %i2, %o3
40014210: 7f ff fc 63 call 4001339c <msdos_find_name_in_fat_file>
40014214: 94 10 00 19 mov %i1, %o2
if ((rc != RC_OK) && (rc != MSDOS_NAME_NOT_FOUND_ERR))
40014218: 80 a0 00 08 cmp %g0, %o0
4001421c: 03 00 00 1f sethi %hi(0x7c00), %g1
40014220: 86 40 20 00 addx %g0, 0, %g3
40014224: 82 10 61 01 or %g1, 0x101, %g1
40014228: 84 1a 00 01 xor %o0, %g1, %g2
4001422c: 80 a0 00 02 cmp %g0, %g2
40014230: 84 40 20 00 addx %g0, 0, %g2
if (!create_node)
40014234: 80 88 c0 02 btst %g3, %g2
40014238: 12 80 00 05 bne 4001424c <msdos_get_name_node+0x60>
4001423c: b8 10 00 08 mov %o0, %i4
40014240: 80 a6 60 00 cmp %i1, 0
40014244: 02 80 00 04 be 40014254 <msdos_get_name_node+0x68>
40014248: 80 a2 00 01 cmp %o0, %g1
}
4001424c: 81 c7 e0 08 ret
40014250: 91 e8 00 1c restore %g0, %i4, %o0
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
40014254: 02 bf ff fe be 4001424c <msdos_get_name_node+0x60>
40014258: 80 a2 20 00 cmp %o0, 0
if (rc == RC_OK)
4001425c: 12 bf ff fc bne 4001424c <msdos_get_name_node+0x60>
<== NEVER TAKEN
40014260: 94 10 20 02 mov 2, %o2
if (strncmp(name, "..", 2) == 0)
40014264: 90 10 00 1a mov %i2, %o0
40014268: 13 10 00 99 sethi %hi(0x40026400), %o1
4001426c: 40 00 23 4c call 4001cf9c <strncmp>
40014270: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 400267e8 <rtems_blkdev_imfs_node+0x50>
40014274: 80 a2 20 00 cmp %o0, 0
40014278: 12 bf ff f5 bne 4001424c <msdos_get_name_node+0x60>
4001427c: 01 00 00 00 nop
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
40014280: c2 14 20 1a lduh [ %l0 + 0x1a ], %g1
40014284: c4 14 20 14 lduh [ %l0 + 0x14 ], %g2
40014288: b3 28 60 08 sll %g1, 8, %i1
4001428c: 87 28 60 10 sll %g1, 0x10, %g3
40014290: 83 28 a0 08 sll %g2, 8, %g1
40014294: 87 30 e0 18 srl %g3, 0x18, %g3
40014298: 85 28 a0 10 sll %g2, 0x10, %g2
4001429c: b2 16 40 03 or %i1, %g3, %i1
400142a0: 85 30 a0 18 srl %g2, 0x18, %g2
400142a4: b3 2e 60 10 sll %i1, 0x10, %i1
400142a8: 82 10 40 02 or %g1, %g2, %g1
400142ac: b3 36 60 10 srl %i1, 0x10, %i1
400142b0: 83 28 60 10 sll %g1, 0x10, %g1
if (dotdot_cln == 0)
400142b4: b2 90 40 19 orcc %g1, %i1, %i1
400142b8: 12 80 00 08 bne 400142d8 <msdos_get_name_node+0xec>
400142bc: 82 10 3f ff mov -1, %g1
dir_pos->sname.ofs = 0;
400142c0: c0 27 60 04 clr [ %i5 + 4 ]
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
400142c4: c2 27 60 08 st %g1, [ %i5 + 8 ]
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
400142c8: c2 27 60 0c st %g1, [ %i5 + 0xc ]
dir_pos->sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
400142cc: 82 10 20 01 mov 1, %g1
400142d0: 10 bf ff df b 4001424c <msdos_get_name_node+0x60>
400142d4: c2 27 40 00 st %g1, [ %i5 ]
rc =
400142d8: f0 06 20 14 ld [ %i0 + 0x14 ], %i0
400142dc: b6 10 00 10 mov %l0, %i3
400142e0: 7f ff ff 0d call 40013f14 <msdos_get_dotdot_dir_info_cluster_num_and_offset>
400142e4: 95 e8 00 1d restore %g0, %i5, %o2
40013240 <msdos_get_utf16_string_from_long_entry>:
if (buf_size >= MSDOS_LFN_ENTRY_SIZE) {
40013240: 80 a2 a0 19 cmp %o2, 0x19
<== NOT EXECUTED
40013244: 08 80 00 05 bleu 40013258 <msdos_get_utf16_string_from_long_entry+0x18>
<== NOT EXECUTED
40013248: 94 10 00 0b mov %o3, %o2
<== NOT EXECUTED
4001324c: 82 13 c0 00 mov %o7, %g1
<== NOT EXECUTED
40013250: 7f ff fd b8 call 40012930 <msdos_get_utf16_string_from_long_entry.part.2>
<== NOT EXECUTED
40013254: 9e 10 40 00 mov %g1, %o7
<== NOT EXECUTED
}
40013258: 81 c3 e0 08 retl
<== NOT EXECUTED
4001325c: 90 10 20 0c mov 0xc, %o0
<== NOT EXECUTED
400071d0 <msdos_initialize_support>:
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *file_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
rtems_dosfs_convert_control *converter
)
{
400071d0: 9d e3 bf 88 save %sp, -120, %sp
msdos_fs_info_t *fs_info = NULL;
fat_file_fd_t *fat_fd = NULL;
fat_dir_pos_t root_pos;
uint32_t cl_buf_size;
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
400071d4: 92 10 20 d0 mov 0xd0, %o1
fat_file_fd_t *fat_fd = NULL;
400071d8: c0 27 bf ec clr [ %fp + -20 ]
fs_info = (msdos_fs_info_t *)calloc(1, sizeof(msdos_fs_info_t));
400071dc: 40 00 1e 8b call 4000ec08 <calloc>
400071e0: 90 10 20 01 mov 1, %o0
if (!fs_info)
400071e4: ba 92 20 00 orcc %o0, 0, %i5
400071e8: 02 80 00 52 be 40007330 <msdos_initialize_support+0x160>
<== NEVER TAKEN
400071ec: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
fs_info->converter = converter;
400071f0: f8 27 60 cc st %i4, [ %i5 + 0xcc ]
temp_mt_entry->fs_info = fs_info;
400071f4: fa 26 20 08 st %i5, [ %i0 + 8 ]
rc = fat_init_volume_info(&fs_info->fat, temp_mt_entry->dev);
400071f8: 40 00 23 12 call 4000fe40 <fat_init_volume_info>
400071fc: d2 06 20 38 ld [ %i0 + 0x38 ], %o1
if (rc != RC_OK)
40007200: b8 92 20 00 orcc %o0, 0, %i4
40007204: 12 80 00 38 bne 400072e4 <msdos_initialize_support+0x114>
<== NEVER TAKEN
40007208: 82 10 3f ff mov -1, %g1
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
4000720c: f4 27 60 ac st %i2, [ %i5 + 0xac ]
* open fat-file which correspondes to root directory
* (so inode number 0x00000010 is always used for root directory)
*/
fat_dir_pos_init(&root_pos);
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
40007210: 94 07 bf ec add %fp, -20, %o2
fs_info->directory_handlers = directory_handlers;
40007214: f6 27 60 a8 st %i3, [ %i5 + 0xa8 ]
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
40007218: 92 07 bf f0 add %fp, -16, %o1
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
4000721c: c2 27 bf f8 st %g1, [ %fp + -8 ]
40007220: 90 10 00 1d mov %i5, %o0
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
40007224: c2 27 bf fc st %g1, [ %fp + -4 ]
root_pos.sname.cln = FAT_ROOTDIR_CLUSTER_NUM;
40007228: 82 10 20 01 mov 1, %g1
dir_pos->sname.ofs = 0;
4000722c: c0 27 bf f4 clr [ %fp + -12 ]
rc = fat_file_open(&fs_info->fat, &root_pos, &fat_fd);
40007230: 40 00 28 10 call 40011270 <fat_file_open>
40007234: c2 27 bf f0 st %g1, [ %fp + -16 ]
if (rc != RC_OK)
40007238: b8 92 20 00 orcc %o0, 0, %i4
4000723c: 12 80 00 28 bne 400072dc <msdos_initialize_support+0x10c>
<== NEVER TAKEN
40007240: f4 07 bf ec ld [ %fp + -20 ], %i2
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
fat_fd->cln = fs_info->fat.vol.rdir_cl;
40007244: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
40007248: 05 00 08 00 sethi %hi(0x200000), %g2
fat_fd->fat_file_type = FAT_DIRECTORY;
4000724c: c0 26 a0 10 clr [ %i2 + 0x10 ]
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
40007250: 80 a0 60 00 cmp %g1, 0
fat_fd->size_limit = MSDOS_MAX_DIR_LENGTH;
40007254: c4 26 a0 14 st %g2, [ %i2 + 0x14 ]
fat_fd->cln = fs_info->fat.vol.rdir_cl;
40007258: c2 26 a0 1c st %g1, [ %i2 + 0x1c ]
fat_fd->map.file_cln = 0;
4000725c: c0 26 a0 34 clr [ %i2 + 0x34 ]
if ( fat_fd->cln == 0 )
40007260: 12 80 00 25 bne 400072f4 <msdos_initialize_support+0x124>
40007264: c2 26 a0 38 st %g1, [ %i2 + 0x38 ]
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
40007268: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
4000726c: c2 26 a0 18 st %g1, [ %i2 + 0x18 ]
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
40007270: d0 07 60 08 ld [ %i5 + 8 ], %o0
40007274: 80 a2 00 01 cmp %o0, %g1
40007278: 2a 80 00 02 bcs,a 40007280 <msdos_initialize_support+0xb0>
4000727c: 90 10 00 01 mov %g1, %o0
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
40007280: 40 00 1e 62 call 4000ec08 <calloc>
40007284: 92 10 20 01 mov 1, %o1
if (fs_info->cl_buf == NULL)
40007288: 80 a2 20 00 cmp %o0, 0
4000728c: 02 80 00 22 be 40007314 <msdos_initialize_support+0x144>
<== NEVER TAKEN
40007290: d0 27 60 c8 st %o0, [ %i5 + 0xc8 ]
const char *_name)
{
struct _Mutex_recursive_Control _init =
_MUTEX_RECURSIVE_NAMED_INITIALIZER(_name);
*_mutex = _init;
40007294: 03 10 00 97 sethi %hi(0x40025c00), %g1
40007298: 82 10 60 40 or %g1, 0x40, %g1 ! 40025c40 <_rodata_start+0x10>
4000729c: c0 27 60 b0 clr [ %i5 + 0xb0 ]
400072a0: c2 27 60 c0 st %g1, [ %i5 + 0xc0 ]
400072a4: c0 27 60 b4 clr [ %i5 + 0xb4 ]
}
rtems_recursive_mutex_init(&fs_info->vol_mutex,
RTEMS_FILESYSTEM_TYPE_DOSFS);
temp_mt_entry->mt_fs_root->location.node_access = fat_fd;
400072a8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
400072ac: c0 27 60 b8 clr [ %i5 + 0xb8 ]
400072b0: c0 27 60 bc clr [ %i5 + 0xbc ]
400072b4: c0 27 60 c4 clr [ %i5 + 0xc4 ]
400072b8: f4 20 60 08 st %i2, [ %g1 + 8 ]
temp_mt_entry->mt_fs_root->location.handlers = directory_handlers;
400072bc: f6 20 60 10 st %i3, [ %g1 + 0x10 ]
temp_mt_entry->ops = op_table;
400072c0: f2 26 20 0c st %i1, [ %i0 + 0xc ]
return rc;
}
400072c4: 81 c7 e0 08 ret
400072c8: 91 e8 00 1c restore %g0, %i4, %o0
fat_file_close(&fs_info->fat, fat_fd);
400072cc: d2 07 bf ec ld [ %fp + -20 ], %o1
<== NOT EXECUTED
400072d0: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
400072d4: 40 00 29 8f call 40011910 <fat_file_close>
<== NOT EXECUTED
400072d8: b8 10 00 01 mov %g1, %i4
<== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
400072dc: 40 00 25 37 call 400107b8 <fat_shutdown_drive>
<== NOT EXECUTED
400072e0: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
free(fs_info);
400072e4: 7f ff f2 1d call 40003b58 <free>
<== NOT EXECUTED
400072e8: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
}
400072ec: 81 c7 e0 08 ret
<== NOT EXECUTED
400072f0: 91 e8 00 1c restore %g0, %i4, %o0
<== NOT EXECUTED
rc = fat_file_size(&fs_info->fat, fat_fd);
400072f4: 92 10 00 1a mov %i2, %o1
400072f8: 40 00 2b 28 call 40011f98 <fat_file_size>
400072fc: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
40007300: 82 92 20 00 orcc %o0, 0, %g1
40007304: 12 bf ff f2 bne 400072cc <msdos_initialize_support+0xfc>
<== NEVER TAKEN
40007308: f4 07 bf ec ld [ %fp + -20 ], %i2
cl_buf_size = fs_info->fat.vol.bpc;
4000730c: 10 bf ff dd b 40007280 <msdos_initialize_support+0xb0>
40007310: d0 07 60 08 ld [ %i5 + 8 ], %o0
fat_file_close(&fs_info->fat, fat_fd);
40007314: 92 10 00 1a mov %i2, %o1
<== NOT EXECUTED
40007318: 40 00 29 7e call 40011910 <fat_file_close>
<== NOT EXECUTED
4000731c: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
fat_shutdown_drive(&fs_info->fat);
40007320: 40 00 25 26 call 400107b8 <fat_shutdown_drive>
<== NOT EXECUTED
40007324: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
free(fs_info);
40007328: 7f ff f2 0c call 40003b58 <free>
<== NOT EXECUTED
4000732c: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
40007330: 40 00 50 90 call 4001b570 <__errno>
<== NOT EXECUTED
40007334: b8 10 3f ff mov -1, %i4
<== NOT EXECUTED
40007338: 82 10 20 0c mov 0xc, %g1
<== NOT EXECUTED
4000733c: 10 bf ff ec b 400072ec <msdos_initialize_support+0x11c>
<== NOT EXECUTED
40007340: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
400129b0 <msdos_lfn_checksum>:
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
400129b0: 84 10 20 00 clr %g2
<== NOT EXECUTED
cs = 0;
400129b4: 82 10 20 00 clr %g1
<== NOT EXECUTED
400129b8: c8 0a 00 02 ldub [ %o0 + %g2 ], %g4
<== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
400129bc: 82 08 60 ff and %g1, 0xff, %g1
<== NOT EXECUTED
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
400129c0: 84 00 a0 01 inc %g2
<== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
400129c4: 87 28 60 07 sll %g1, 7, %g3
<== NOT EXECUTED
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
400129c8: 80 a0 a0 0b cmp %g2, 0xb
<== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + name[i];
400129cc: 83 30 60 01 srl %g1, 1, %g1
<== NOT EXECUTED
400129d0: 82 00 40 04 add %g1, %g4, %g1
<== NOT EXECUTED
for (i = 0; i < MSDOS_SHORT_NAME_LEN; ++i) {
400129d4: 12 bf ff f9 bne 400129b8 <msdos_lfn_checksum+0x8>
<== NOT EXECUTED
400129d8: 82 00 c0 01 add %g3, %g1, %g1
<== NOT EXECUTED
}
400129dc: 81 c3 e0 08 retl
<== NOT EXECUTED
400129e0: 90 08 60 ff and %g1, 0xff, %o0
<== NOT EXECUTED
400129e4 <msdos_long_to_short>:
{
400129e4: 9d e3 bf 88 save %sp, -120, %sp
size_t codepage_name_len = converter->buffer.size;
400129e8: c2 06 20 08 ld [ %i0 + 8 ], %g1
400129ec: c2 27 bf fc st %g1, [ %fp + -4 ]
memset (sfn, ' ', sfn_len);
400129f0: 94 10 00 1c mov %i4, %o2
void *buffer = converter->buffer.data;
400129f4: fa 06 20 04 ld [ %i0 + 4 ], %i5
memset (sfn, ' ', sfn_len);
400129f8: 92 10 20 20 mov 0x20, %o1
400129fc: 40 00 24 f5 call 4001bdd0 <memset>
40012a00: 90 10 00 1b mov %i3, %o0
if ((lfn[0] == '.') && (lfn_len == 1))
40012a04: c2 4e 40 00 ldsb [ %i1 ], %g1
40012a08: 80 a0 60 2e cmp %g1, 0x2e
40012a0c: 02 80 00 86 be 40012c24 <msdos_long_to_short+0x240>
40012a10: 80 a6 a0 00 cmp %i2, 0
for (i = 0; i < lfn_len; i++)
40012a14: 04 80 00 7d ble 40012c08 <msdos_long_to_short+0x224>
<== NEVER TAKEN
40012a18: 80 a0 60 20 cmp %g1, 0x20
if ((lfn[i] != ' ') && (lfn[i] != '.'))
40012a1c: 12 80 00 0c bne 40012a4c <msdos_long_to_short+0x68>
40012a20: 82 10 20 00 clr %g1
for (i = 0; i < lfn_len; i++)
40012a24: 82 00 60 01 inc %g1
40012a28: 80 a6 80 01 cmp %i2, %g1
40012a2c: 04 80 00 79 ble 40012c10 <msdos_long_to_short+0x22c>
40012a30: 01 00 00 00 nop
if ((lfn[i] != ' ') && (lfn[i] != '.'))
40012a34: c4 4e 40 01 ldsb [ %i1 + %g1 ], %g2
40012a38: 80 a0 a0 20 cmp %g2, 0x20
40012a3c: 02 bf ff fa be 40012a24 <msdos_long_to_short+0x40>
40012a40: 80 a0 a0 2e cmp %g2, 0x2e
40012a44: 02 bf ff f9 be 40012a28 <msdos_long_to_short+0x44>
40012a48: 82 00 60 01 inc %g1
eno = (*converter->handler->utf8_to_codepage) (
40012a4c: c2 06 00 00 ld [ %i0 ], %g1
40012a50: c2 00 40 00 ld [ %g1 ], %g1
40012a54: 98 07 bf fc add %fp, -4, %o4
40012a58: 96 10 00 1d mov %i5, %o3
40012a5c: 94 10 00 1a mov %i2, %o2
40012a60: 92 10 00 19 mov %i1, %o1
40012a64: 9f c0 40 00 call %g1
40012a68: 90 10 00 18 mov %i0, %o0
if (eno == EINVAL)
40012a6c: 80 a2 20 16 cmp %o0, 0x16
40012a70: 22 80 00 56 be,a 40012bc8 <msdos_long_to_short+0x1e4>
40012a74: ba 10 20 02 mov 2, %i5
while (*name && (count < name_len))
40012a78: ec 0f 40 00 ldub [ %i5 ], %l6
type = msdos_name_type (
40012a7c: e4 07 bf fc ld [ %fp + -4 ], %l2
while (*name && (count < name_len))
40012a80: 93 2d a0 18 sll %l6, 0x18, %o1
40012a84: 80 a0 00 09 cmp %g0, %o1
40012a88: 83 3c a0 1f sra %l2, 0x1f, %g1
40012a8c: 84 40 20 00 addx %g0, 0, %g2
40012a90: 82 20 40 12 sub %g1, %l2, %g1
40012a94: 83 30 60 1f srl %g1, 0x1f, %g1
40012a98: 82 08 80 01 and %g2, %g1, %g1
40012a9c: 80 a0 60 00 cmp %g1, 0
40012aa0: 02 80 00 6f be 40012c5c <msdos_long_to_short+0x278>
<== NEVER TAKEN
40012aa4: a8 10 00 01 mov %g1, %l4
if ((ch == '.') || isalnum((unsigned char)ch) ||
40012aa8: 27 10 00 9b sethi %hi(0x40026c00), %l3
40012aac: 82 14 e3 a1 or %l3, 0x3a1, %g1 ! 40026fa1 <_ctype_+0x1>
(strchr("$%'-_@~`!(){}^#&", ch) != NULL) || (unsigned char) ch > 127)
40012ab0: 2b 10 00 9a sethi %hi(0x40026800), %l5
if ((ch == '.') || isalnum((unsigned char)ch) ||
40012ab4: c2 27 bf f0 st %g1, [ %fp + -16 ]
(strchr("$%'-_@~`!(){}^#&", ch) != NULL) || (unsigned char) ch > 127)
40012ab8: 82 15 61 10 or %l5, 0x110, %g1
bool uppercase = false;
40012abc: c0 2f bf f7 clrb [ %fp + -9 ]
if (strchr(" +,;=[]", ch) != NULL)
40012ac0: 21 10 00 9a sethi %hi(0x40026800), %l0
bool lowercase = false;
40012ac4: c0 2f bf f6 clrb [ %fp + -10 ]
int count = 0;
40012ac8: ae 10 20 00 clr %l7
(strchr("$%'-_@~`!(){}^#&", ch) != NULL) || (unsigned char) ch > 127)
40012acc: c2 27 bf ec st %g1, [ %fp + -20 ]
int dot_at = -1;
40012ad0: a2 10 3f ff mov -1, %l1
if (strchr(" +,;=[]", ch) != NULL)
40012ad4: a0 14 21 08 or %l0, 0x108, %l0
40012ad8: a7 3a 60 18 sra %o1, 0x18, %l3
40012adc: 90 10 00 10 mov %l0, %o0
40012ae0: 40 00 28 31 call 4001cba4 <strchr>
40012ae4: 92 10 00 13 mov %l3, %o1
40012ae8: 80 a2 20 00 cmp %o0, 0
40012aec: 32 80 00 37 bne,a 40012bc8 <msdos_long_to_short+0x1e4>
40012af0: ba 10 20 02 mov 2, %i5
if ((ch == '.') || isalnum((unsigned char)ch) ||
40012af4: 80 a4 e0 2e cmp %l3, 0x2e
40012af8: 02 80 00 3f be 40012bf4 <msdos_long_to_short+0x210>
40012afc: c2 07 bf f0 ld [ %fp + -16 ], %g1
40012b00: aa 0d a0 ff and %l6, 0xff, %l5
40012b04: de 0d 40 01 ldub [ %l5 + %g1 ], %o7
40012b08: 80 8b e0 07 btst 7, %o7
40012b0c: 12 80 00 0a bne 40012b34 <msdos_long_to_short+0x150>
40012b10: d0 07 bf ec ld [ %fp + -20 ], %o0
(strchr("$%'-_@~`!(){}^#&", ch) != NULL) || (unsigned char) ch > 127)
40012b14: 40 00 28 24 call 4001cba4 <strchr>
40012b18: 92 10 00 13 mov %l3, %o1
40012b1c: 80 a2 20 00 cmp %o0, 0
40012b20: 12 80 00 05 bne 40012b34 <msdos_long_to_short+0x150>
40012b24: 89 35 60 07 srl %l5, 7, %g4
40012b28: 80 a1 20 00 cmp %g4, 0
40012b2c: 22 80 00 3c be,a 40012c1c <msdos_long_to_short+0x238>
40012b30: ba 10 20 00 clr %i5
if (dot_at >= 0)
40012b34: 80 a4 7f ff cmp %l1, -1
40012b38: 02 80 00 51 be 40012c7c <msdos_long_to_short+0x298>
40012b3c: 82 25 c0 11 sub %l7, %l1, %g1
if (is_dot || ((count - dot_at) > 3))
40012b40: 80 a0 60 03 cmp %g1, 3
40012b44: 34 80 00 21 bg,a 40012bc8 <msdos_long_to_short+0x1e4>
40012b48: ba 10 20 02 mov 2, %i5
else if ((*name >= 'A') && (*name <= 'Z'))
40012b4c: 82 05 bf bf add %l6, -65, %g1
40012b50: 82 08 60 ff and %g1, 0xff, %g1
40012b54: 80 a0 60 19 cmp %g1, 0x19
40012b58: 28 80 00 07 bleu,a 40012b74 <msdos_long_to_short+0x190>
40012b5c: e8 2f bf f7 stb %l4, [ %fp + -9 ]
else if ((*name >= 'a') && (*name <= 'z'))
40012b60: 86 05 bf 9f add %l6, -97, %g3
40012b64: 86 08 e0 ff and %g3, 0xff, %g3
40012b68: 80 a0 e0 19 cmp %g3, 0x19
40012b6c: 28 80 00 02 bleu,a 40012b74 <msdos_long_to_short+0x190>
40012b70: e8 2f bf f6 stb %l4, [ %fp + -10 ]
count++;
40012b74: ae 05 e0 01 inc %l7
while (*name && (count < name_len))
40012b78: 82 10 20 01 mov 1, %g1
40012b7c: 80 a4 80 17 cmp %l2, %l7
40012b80: 14 80 00 03 bg 40012b8c <msdos_long_to_short+0x1a8>
40012b84: ec 0f 40 17 ldub [ %i5 + %l7 ], %l6
40012b88: 82 10 20 00 clr %g1
40012b8c: 80 88 60 ff btst 0xff, %g1
40012b90: 02 80 00 07 be 40012bac <msdos_long_to_short+0x1c8>
40012b94: c2 0f bf f6 ldub [ %fp + -10 ], %g1
40012b98: 93 2d a0 18 sll %l6, 0x18, %o1
40012b9c: 80 a2 60 00 cmp %o1, 0
40012ba0: 32 bf ff cf bne,a 40012adc <msdos_long_to_short+0xf8>
<== ALWAYS TAKEN
40012ba4: a7 3a 60 18 sra %o1, 0x18, %l3
if (lowercase && uppercase)
40012ba8: c2 0f bf f6 ldub [ %fp + -10 ], %g1
<== NOT EXECUTED
40012bac: 80 88 60 ff btst 0xff, %g1
40012bb0: 02 80 00 2b be 40012c5c <msdos_long_to_short+0x278>
40012bb4: c2 0f bf f7 ldub [ %fp + -9 ], %g1
40012bb8: 80 88 60 ff btst 0xff, %g1
40012bbc: 02 80 00 03 be 40012bc8 <msdos_long_to_short+0x1e4>
40012bc0: ba 10 20 01 mov 1, %i5
type = MSDOS_NAME_LONG;
40012bc4: ba 10 20 02 mov 2, %i5
short_filename_length = msdos_filename_utf8_to_short_name_for_save (
40012bc8: 98 10 00 1c mov %i4, %o4
40012bcc: 96 10 00 1b mov %i3, %o3
40012bd0: 94 10 00 1a mov %i2, %o2
40012bd4: 92 10 00 19 mov %i1, %o1
40012bd8: 40 00 1a 41 call 400194dc <msdos_filename_utf8_to_short_name_for_save>
40012bdc: 90 10 00 18 mov %i0, %o0
if (short_filename_length < 0 ) {
40012be0: 80 a2 20 00 cmp %o0, 0
40012be4: 26 80 00 0e bl,a 40012c1c <msdos_long_to_short+0x238>
<== NEVER TAKEN
40012be8: ba 10 20 00 clr %i5
<== NOT EXECUTED
}
40012bec: 81 c7 e0 08 ret
40012bf0: 91 e8 00 1d restore %g0, %i5, %o0
if (dot_at >= 0)
40012bf4: 80 a4 7f ff cmp %l1, -1
40012bf8: 32 bf ff f4 bne,a 40012bc8 <msdos_long_to_short+0x1e4>
40012bfc: ba 10 20 02 mov 2, %i5
40012c00: 10 bf ff dd b 40012b74 <msdos_long_to_short+0x190>
40012c04: a2 10 00 17 mov %l7, %l1
for (i = 0; i < lfn_len; i++)
40012c08: 82 10 20 00 clr %g1
<== NOT EXECUTED
if (i == lfn_len)
40012c0c: 80 a6 80 01 cmp %i2, %g1
<== NOT EXECUTED
40012c10: 32 bf ff 90 bne,a 40012a50 <msdos_long_to_short+0x6c>
<== NEVER TAKEN
40012c14: c2 06 00 00 ld [ %i0 ], %g1
<== NOT EXECUTED
type = MSDOS_NAME_INVALID;
40012c18: ba 10 20 00 clr %i5
}
40012c1c: 81 c7 e0 08 ret
40012c20: 91 e8 00 1d restore %g0, %i5, %o0
if ((lfn[0] == '.') && (lfn_len == 1))
40012c24: 80 a6 a0 01 cmp %i2, 1
40012c28: 22 80 00 0f be,a 40012c64 <msdos_long_to_short+0x280>
40012c2c: ba 10 20 01 mov 1, %i5
if ((lfn[0] == '.') && (lfn[1] == '.') && (lfn_len == 2))
40012c30: c4 4e 60 01 ldsb [ %i1 + 1 ], %g2
40012c34: 80 a0 a0 2e cmp %g2, 0x2e
40012c38: 12 80 00 04 bne 40012c48 <msdos_long_to_short+0x264>
<== NEVER TAKEN
40012c3c: 80 a6 a0 02 cmp %i2, 2
40012c40: 22 80 00 0c be,a 40012c70 <msdos_long_to_short+0x28c>
40012c44: c2 2e e0 01 stb %g1, [ %i3 + 1 ]
for (i = 0; i < lfn_len; i++)
40012c48: 80 a6 a0 00 cmp %i2, 0
40012c4c: 14 bf ff 76 bg 40012a24 <msdos_long_to_short+0x40>
<== ALWAYS TAKEN
40012c50: 82 10 20 00 clr %g1
if (i == lfn_len)
40012c54: 10 bf ff ef b 40012c10 <msdos_long_to_short+0x22c>
<== NOT EXECUTED
40012c58: 80 a6 80 01 cmp %i2, %g1
<== NOT EXECUTED
return MSDOS_NAME_SHORT;
40012c5c: 10 bf ff db b 40012bc8 <msdos_long_to_short+0x1e4>
40012c60: ba 10 20 01 mov 1, %i5
sfn[0] = '.';
40012c64: c2 2e c0 00 stb %g1, [ %i3 ]
}
40012c68: 81 c7 e0 08 ret
40012c6c: 91 e8 00 1d restore %g0, %i5, %o0
return MSDOS_NAME_SHORT;
40012c70: ba 10 20 01 mov 1, %i5
40012c74: 10 bf ff de b 40012bec <msdos_long_to_short+0x208>
40012c78: c2 2e c0 00 stb %g1, [ %i3 ]
if (count == 8 && !is_dot)
40012c7c: 80 a5 e0 08 cmp %l7, 8
40012c80: 12 bf ff b4 bne 40012b50 <msdos_long_to_short+0x16c>
40012c84: 82 05 bf bf add %l6, -65, %g1
type = MSDOS_NAME_LONG;
40012c88: 10 bf ff d0 b 40012bc8 <msdos_long_to_short+0x1e4>
40012c8c: ba 10 20 02 mov 2, %i5
40007344 <msdos_mknod>:
const char *name,
size_t namelen,
mode_t mode,
dev_t dev
)
{
40007344: 9d e3 bf a0 save %sp, -96, %sp
fat_file_type_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
40007348: 03 00 00 3c sethi %hi(0xf000), %g1
4000734c: 05 00 00 10 sethi %hi(0x4000), %g2
40007350: 82 0e c0 01 and %i3, %g1, %g1
40007354: 80 a0 40 02 cmp %g1, %g2
40007358: 02 80 00 0b be 40007384 <msdos_mknod+0x40>
4000735c: 07 00 00 20 sethi %hi(0x8000), %g3
{
type = FAT_DIRECTORY;
}
else if (S_ISREG(mode))
40007360: 80 a0 40 03 cmp %g1, %g3
40007364: 12 80 00 0f bne 400073a0 <msdos_mknod+0x5c>
<== NEVER TAKEN
40007368: 84 10 20 04 mov 4, %g2
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
/* Create an MSDOS node */
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
4000736c: b8 10 00 1b mov %i3, %i4
40007370: ba 10 20 00 clr %i5
40007374: b6 10 00 1a mov %i2, %i3
40007378: b4 10 00 19 mov %i1, %i2
4000737c: 40 00 2b af call 40012238 <msdos_creat_node>
40007380: 93 e8 00 02 restore %g0, %g2, %o1
type = FAT_DIRECTORY;
40007384: 84 10 20 00 clr %g2
rc = msdos_creat_node(parentloc, type, name, namelen, mode, NULL);
40007388: b8 10 00 1b mov %i3, %i4
4000738c: ba 10 20 00 clr %i5
40007390: b6 10 00 1a mov %i2, %i3
40007394: b4 10 00 19 mov %i1, %i2
40007398: 40 00 2b a8 call 40012238 <msdos_creat_node>
4000739c: 93 e8 00 02 restore %g0, %g2, %o1
rtems_set_errno_and_return_minus_one(EINVAL);
400073a0: 40 00 50 74 call 4001b570 <__errno>
<== NOT EXECUTED
400073a4: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
400073a8: 82 10 20 16 mov 0x16, %g1
<== NOT EXECUTED
400073ac: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
return rc;
}
400073b0: 81 c7 e0 08 ret
<== NOT EXECUTED
400073b4: 81 e8 00 00 restore
<== NOT EXECUTED
400073b8 <msdos_rename>:
const rtems_filesystem_location_info_t *old_loc,
const rtems_filesystem_location_info_t *new_parent_loc,
const char *new_name,
size_t new_namelen
)
{
400073b8: 9d e3 bf a0 save %sp, -96, %sp
<== NOT EXECUTED
int rc = RC_OK;
fat_file_fd_t *old_fat_fd = old_loc->node_access;
400073bc: fa 06 60 08 ld [ %i1 + 8 ], %i5
<== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
400073c0: 9a 10 00 1d mov %i5, %o5
<== NOT EXECUTED
400073c4: 19 00 00 20 sethi %hi(0x8000), %o4
<== NOT EXECUTED
400073c8: 96 10 00 1c mov %i4, %o3
<== NOT EXECUTED
400073cc: 94 10 00 1b mov %i3, %o2
<== NOT EXECUTED
400073d0: 92 10 20 02 mov 2, %o1
<== NOT EXECUTED
400073d4: 40 00 2b 99 call 40012238 <msdos_creat_node>
<== NOT EXECUTED
400073d8: 90 10 00 1a mov %i2, %o0
<== NOT EXECUTED
FAT_HARD_LINK,new_name,new_namelen,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
400073dc: 80 a2 20 00 cmp %o0, 0
<== NOT EXECUTED
400073e0: 02 80 00 04 be 400073f0 <msdos_rename+0x38>
<== NOT EXECUTED
400073e4: b0 10 00 08 mov %o0, %i0
<== NOT EXECUTED
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
return rc;
}
400073e8: 81 c7 e0 08 ret
<== NOT EXECUTED
400073ec: 81 e8 00 00 restore
<== NOT EXECUTED
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
400073f0: f0 06 60 14 ld [ %i1 + 0x14 ], %i0
<== NOT EXECUTED
400073f4: b4 10 20 e5 mov 0xe5, %i2
<== NOT EXECUTED
400073f8: 40 00 2e e2 call 40012f80 <msdos_set_first_char4file_name>
<== NOT EXECUTED
400073fc: 93 ef 60 20 restore %i5, 0x20, %o1
<== NOT EXECUTED
40007400 <msdos_rmnod>:
#include "msdos.h"
int
msdos_rmnod(const rtems_filesystem_location_info_t *parent_pathloc,
const rtems_filesystem_location_info_t *pathloc)
{
40007400: 9d e3 bf 98 save %sp, -104, %sp
int rc = RC_OK;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access;
40007404: fa 06 60 08 ld [ %i1 + 8 ], %i5
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
40007408: d0 06 60 14 ld [ %i1 + 0x14 ], %o0
if (fat_fd->fat_file_type == FAT_DIRECTORY)
4000740c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
40007410: 80 a0 60 00 cmp %g1, 0
40007414: 12 80 00 11 bne 40007458 <msdos_rmnod+0x58>
40007418: f8 02 20 08 ld [ %o0 + 8 ], %i4
{
bool is_empty = false;
4000741c: c0 2f bf ff clrb [ %fp + -1 ]
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
40007420: 94 07 bf ff add %fp, -1, %o2
40007424: 40 00 2f 3b call 40013110 <msdos_dir_is_empty>
40007428: 92 10 00 1d mov %i5, %o1
if (rc != RC_OK)
4000742c: b0 92 20 00 orcc %o0, 0, %i0
40007430: 12 80 00 12 bne 40007478 <msdos_rmnod+0x78>
<== NEVER TAKEN
40007434: c2 0f bf ff ldub [ %fp + -1 ], %g1
{
return rc;
}
if (!is_empty)
40007438: 80 a0 60 00 cmp %g1, 0
4000743c: 02 80 00 11 be 40007480 <msdos_rmnod+0x80>
40007440: 01 00 00 00 nop
/*
* We deny attempts to delete open directory (if directory is current
* directory we assume it is open one)
*/
if (fat_fd->links_num > 1)
40007444: c2 07 60 08 ld [ %i5 + 8 ], %g1
40007448: 80 a0 60 01 cmp %g1, 1
4000744c: 18 80 00 13 bgu 40007498 <msdos_rmnod+0x98>
<== NEVER TAKEN
40007450: 01 00 00 00 nop
40007454: d0 06 60 14 ld [ %i1 + 0x14 ], %o0
* not used - mount() not implemenetd yet.
*/
}
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry, &fat_fd->dir_pos,
40007458: 94 10 20 e5 mov 0xe5, %o2
4000745c: 40 00 2e c9 call 40012f80 <msdos_set_first_char4file_name>
40007460: 92 07 60 20 add %i5, 0x20, %o1
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
40007464: b0 92 20 00 orcc %o0, 0, %i0
40007468: 12 80 00 04 bne 40007478 <msdos_rmnod+0x78>
<== NEVER TAKEN
4000746c: 92 10 00 1d mov %i5, %o1
{
return rc;
}
fat_file_mark_removed(&fs_info->fat, fat_fd);
40007470: 40 00 2a b2 call 40011f38 <fat_file_mark_removed>
40007474: 90 10 00 1c mov %i4, %o0
return rc;
}
40007478: 81 c7 e0 08 ret
4000747c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
40007480: 40 00 50 3c call 4001b570 <__errno>
40007484: b0 10 3f ff mov -1, %i0
40007488: 82 10 20 5a mov 0x5a, %g1
4000748c: c2 22 00 00 st %g1, [ %o0 ]
40007490: 81 c7 e0 08 ret
40007494: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(EBUSY);
40007498: 40 00 50 36 call 4001b570 <__errno>
<== NOT EXECUTED
4000749c: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
400074a0: 82 10 20 10 mov 0x10, %g1
<== NOT EXECUTED
400074a4: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
400074a8: 81 c7 e0 08 ret
<== NOT EXECUTED
400074ac: 81 e8 00 00 restore
<== NOT EXECUTED
40012f80 <msdos_set_first_char4file_name>:
{
40012f80: 9d e3 bf 98 save %sp, -104, %sp
fat_pos_t start = dir_pos->lname;
40012f84: c2 06 60 0c ld [ %i1 + 0xc ], %g1
40012f88: c4 06 60 08 ld [ %i1 + 8 ], %g2
msdos_fs_info_t *fs_info = mt_entry->fs_info;
40012f8c: fa 06 20 08 ld [ %i0 + 8 ], %i5
{
40012f90: f4 2f a0 4c stb %i2, [ %fp + 0x4c ]
fat_pos_t start = dir_pos->lname;
40012f94: c2 27 bf fc st %g1, [ %fp + -4 ]
40012f98: c4 27 bf f8 st %g2, [ %fp + -8 ]
fat_pos_t end = dir_pos->sname;
40012f9c: f8 06 40 00 ld [ %i1 ], %i4
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
40012fa0: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
40012fa4: 80 a0 40 1c cmp %g1, %i4
40012fa8: 02 80 00 54 be 400130f8 <msdos_set_first_char4file_name+0x178>
40012fac: f4 06 60 04 ld [ %i1 + 4 ], %i2
dir_block_size = fs_info->fat.vol.bpc;
40012fb0: f6 07 60 08 ld [ %i5 + 8 ], %i3
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
40012fb4: c2 06 60 08 ld [ %i1 + 8 ], %g1
40012fb8: 80 a0 7f ff cmp %g1, -1
40012fbc: 22 80 00 4a be,a 400130e4 <msdos_set_first_char4file_name+0x164>
40012fc0: c2 06 60 04 ld [ %i1 + 4 ], %g1
40012fc4: c4 07 bf fc ld [ %fp + -4 ], %g2
40012fc8: 10 80 00 1b b 40013034 <msdos_set_first_char4file_name+0xb4>
40012fcc: d2 07 bf f8 ld [ %fp + -8 ], %o1
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40012fd0: 80 88 60 03 btst 3, %g1
40012fd4: 22 80 00 1c be,a 40013044 <msdos_set_first_char4file_name+0xc4>
<== NEVER TAKEN
40012fd8: c2 0f 60 05 ldub [ %i5 + 5 ], %g1
<== NOT EXECUTED
return fs_info->vol.rdir_loc;
40012fdc: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
40012fe0: d4 17 40 00 lduh [ %i5 ], %o2
(start.ofs >> fs_info->fat.vol.sec_log2));
40012fe4: d2 0f 60 02 ldub [ %i5 + 2 ], %o1
40012fe8: 93 30 80 09 srl %g2, %o1, %o1
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
40012fec: 94 02 bf ff add %o2, -1, %o2
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
40012ff0: 98 07 a0 4c add %fp, 0x4c, %o4
40012ff4: 94 0a 80 02 and %o2, %g2, %o2
40012ff8: 96 10 20 01 mov 1, %o3
40012ffc: 92 02 40 01 add %o1, %g1, %o1
40013000: 7f ff f2 af call 4000fabc <fat_sector_write>
40013004: 90 10 00 1d mov %i5, %o0
if (ret < 0)
40013008: 80 a2 20 00 cmp %o0, 0
4001300c: 06 80 00 20 bl 4001308c <msdos_set_first_char4file_name+0x10c>
<== NEVER TAKEN
40013010: b0 10 3f ff mov -1, %i0
if ((start.cln == end.cln) && (start.ofs == end.ofs))
40013014: d2 07 bf f8 ld [ %fp + -8 ], %o1
40013018: c2 07 bf fc ld [ %fp + -4 ], %g1
4001301c: 80 a7 00 09 cmp %i4, %o1
40013020: 02 80 00 1d be 40013094 <msdos_set_first_char4file_name+0x114>
40013024: 84 00 60 20 add %g1, 0x20, %g2
if (start.ofs >= dir_block_size)
40013028: 80 a0 80 1b cmp %g2, %i3
4001302c: 1a 80 00 1f bcc 400130a8 <msdos_set_first_char4file_name+0x128>
40013030: c4 27 bf fc st %g2, [ %fp + -4 ]
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
40013034: 80 a2 60 00 cmp %o1, 0
40013038: 22 bf ff e6 be,a 40012fd0 <msdos_set_first_char4file_name+0x50>
4001303c: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
40013040: c2 0f 60 05 ldub [ %i5 + 5 ], %g1
40013044: c6 07 60 3c ld [ %i5 + 0x3c ], %g3
40013048: 92 02 7f fe add %o1, -2, %o1
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
4001304c: d4 17 40 00 lduh [ %i5 ], %o2
40013050: 83 2a 40 01 sll %o1, %g1, %g1
(start.ofs >> fs_info->fat.vol.sec_log2));
40013054: d2 0f 60 02 ldub [ %i5 + 2 ], %o1
40013058: 82 00 40 03 add %g1, %g3, %g1
4001305c: 93 30 80 09 srl %g2, %o1, %o1
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));
40013060: 94 02 bf ff add %o2, -1, %o2
ret = fat_sector_write(&fs_info->fat, sec, byte + MSDOS_FILE_NAME_OFFSET,
40013064: 98 07 a0 4c add %fp, 0x4c, %o4
40013068: 94 0a 80 02 and %o2, %g2, %o2
4001306c: 96 10 20 01 mov 1, %o3
40013070: 92 02 40 01 add %o1, %g1, %o1
40013074: 7f ff f2 92 call 4000fabc <fat_sector_write>
40013078: 90 10 00 1d mov %i5, %o0
if (ret < 0)
4001307c: 80 a2 20 00 cmp %o0, 0
40013080: 16 bf ff e6 bge 40013018 <msdos_set_first_char4file_name+0x98>
<== ALWAYS TAKEN
40013084: d2 07 bf f8 ld [ %fp + -8 ], %o1
return -1;
40013088: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
}
4001308c: 81 c7 e0 08 ret
<== NOT EXECUTED
40013090: 81 e8 00 00 restore
<== NOT EXECUTED
if ((start.cln == end.cln) && (start.ofs == end.ofs))
40013094: 80 a6 80 01 cmp %i2, %g1
40013098: 12 bf ff e5 bne 4001302c <msdos_set_first_char4file_name+0xac>
4001309c: 80 a0 80 1b cmp %g2, %i3
return RC_OK;
400130a0: 81 c7 e0 08 ret
400130a4: 91 e8 20 00 restore %g0, 0, %o0
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
400130a8: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
400130ac: 80 a7 00 01 cmp %i4, %g1
400130b0: 12 80 00 06 bne 400130c8 <msdos_set_first_char4file_name+0x148>
<== ALWAYS TAKEN
400130b4: 94 07 bf f8 add %fp, -8, %o2
400130b8: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1
<== NOT EXECUTED
400130bc: 80 88 60 03 btst 3, %g1
<== NOT EXECUTED
400130c0: 12 bf ff f8 bne 400130a0 <msdos_set_first_char4file_name+0x120>
<== NOT EXECUTED
400130c4: 01 00 00 00 nop
<== NOT EXECUTED
rc = fat_get_fat_cluster(&fs_info->fat, start.cln, &start.cln);
400130c8: 7f ff f6 7c call 40010ab8 <fat_get_fat_cluster>
400130cc: 90 10 00 1d mov %i5, %o0
if ( rc != RC_OK )
400130d0: b0 92 20 00 orcc %o0, 0, %i0
400130d4: 12 bf ff ee bne 4001308c <msdos_set_first_char4file_name+0x10c>
<== NEVER TAKEN
400130d8: 84 10 20 00 clr %g2
start.ofs = 0;
400130dc: 10 bf ff bb b 40012fc8 <msdos_set_first_char4file_name+0x48>
400130e0: c0 27 bf fc clr [ %fp + -4 ]
start = dir_pos->sname;
400130e4: c2 27 bf fc st %g1, [ %fp + -4 ]
400130e8: c4 06 40 00 ld [ %i1 ], %g2
400130ec: c4 27 bf f8 st %g2, [ %fp + -8 ]
400130f0: 10 bf ff b6 b 40012fc8 <msdos_set_first_char4file_name+0x48>
400130f4: c4 07 bf fc ld [ %fp + -4 ], %g2
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
400130f8: c2 0f 60 16 ldub [ %i5 + 0x16 ], %g1
400130fc: 80 88 60 03 btst 3, %g1
40013100: 22 bf ff ad be,a 40012fb4 <msdos_set_first_char4file_name+0x34>
<== NEVER TAKEN
40013104: f6 07 60 08 ld [ %i5 + 8 ], %i3
<== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
40013108: 10 bf ff ab b 40012fb4 <msdos_set_first_char4file_name+0x34>
4001310c: f6 07 60 34 ld [ %i5 + 0x34 ], %i3
400074b0 <msdos_statvfs>:
#include "msdos.h"
int msdos_statvfs(
const rtems_filesystem_location_info_t *__restrict root_loc,
struct statvfs *__restrict sb)
{
400074b0: 9d e3 bf 98 save %sp, -104, %sp
msdos_fs_info_t *fs_info = root_loc->mt_entry->fs_info;
400074b4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
400074b8: f8 00 60 08 ld [ %g1 + 8 ], %i4
rtems_recursive_mutex_lock(&fs_info->vol_mutex);
400074bc: a2 07 20 b0 add %i4, 0xb0, %l1
_Mutex_recursive_Acquire( mutex );
400074c0: 40 00 17 d6 call 4000d418 <_Mutex_recursive_Acquire>
400074c4: 90 10 00 11 mov %l1, %o0
fat_vol_t *vol = &fs_info->fat.vol;
msdos_fs_lock(fs_info);
sb->f_bsize = FAT_SECTOR512_SIZE;
sb->f_frsize = vol->bpc;
400074c8: c2 07 20 08 ld [ %i4 + 8 ], %g1
sb->f_blocks = vol->data_cls;
400074cc: e0 07 20 40 ld [ %i4 + 0x40 ], %l0
sb->f_bsize = FAT_SECTOR512_SIZE;
400074d0: 84 10 22 00 mov 0x200, %g2
sb->f_frsize = vol->bpc;
400074d4: c2 26 60 04 st %g1, [ %i1 + 4 ]
sb->f_bavail = 0;
sb->f_files = 0; // FAT doesn't store inodes
sb->f_ffree = 0;
sb->f_favail = 0;
sb->f_flag = 0;
sb->f_namemax = MSDOS_NAME_MAX_LNF_LEN;
400074d8: 82 10 20 ff mov 0xff, %g1
sb->f_bsize = FAT_SECTOR512_SIZE;
400074dc: c4 26 40 00 st %g2, [ %i1 ]
sb->f_namemax = MSDOS_NAME_MAX_LNF_LEN;
400074e0: c2 26 60 34 st %g1, [ %i1 + 0x34 ]
sb->f_bfree = 0;
400074e4: c0 26 60 10 clr [ %i1 + 0x10 ]
400074e8: c0 26 60 14 clr [ %i1 + 0x14 ]
sb->f_bavail = 0;
400074ec: c0 26 60 18 clr [ %i1 + 0x18 ]
400074f0: c0 26 60 1c clr [ %i1 + 0x1c ]
sb->f_blocks = vol->data_cls;
400074f4: c0 26 60 08 clr [ %i1 + 8 ]
400074f8: e0 26 60 0c st %l0, [ %i1 + 0xc ]
sb->f_files = 0; // FAT doesn't store inodes
400074fc: c0 26 60 20 clr [ %i1 + 0x20 ]
sb->f_ffree = 0;
40007500: c0 26 60 24 clr [ %i1 + 0x24 ]
sb->f_favail = 0;
40007504: c0 26 60 28 clr [ %i1 + 0x28 ]
sb->f_flag = 0;
40007508: c0 26 60 30 clr [ %i1 + 0x30 ]
if (vol->free_cls == FAT_UNDEFINED_VALUE)
4000750c: c2 07 20 4c ld [ %i4 + 0x4c ], %g1
40007510: 80 a0 7f ff cmp %g1, -1
40007514: 22 80 00 0b be,a 40007540 <msdos_statvfs+0x90>
<== ALWAYS TAKEN
40007518: a0 04 20 02 add %l0, 2, %l0
}
}
}
else
{
sb->f_bfree = vol->free_cls;
4000751c: c0 26 60 10 clr [ %i1 + 0x10 ]
<== NOT EXECUTED
40007520: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
<== NOT EXECUTED
sb->f_bavail = vol->free_cls;
40007524: c0 26 60 18 clr [ %i1 + 0x18 ]
<== NOT EXECUTED
40007528: c2 26 60 1c st %g1, [ %i1 + 0x1c ]
<== NOT EXECUTED
}
msdos_fs_unlock(fs_info);
return RC_OK;
4000752c: b0 10 20 00 clr %i0
<== NOT EXECUTED
_Mutex_recursive_Release( mutex );
40007530: 40 00 17 df call 4000d4ac <_Mutex_recursive_Release>
40007534: 90 10 00 11 mov %l1, %o0
}
40007538: 81 c7 e0 08 ret
4000753c: 81 e8 00 00 restore
for (; cur_cl < data_cls_val; ++cur_cl)
40007540: 80 a4 20 02 cmp %l0, 2
40007544: 08 bf ff fa bleu 4000752c <msdos_statvfs+0x7c>
<== NEVER TAKEN
40007548: c0 27 bf fc clr [ %fp + -4 ]
uint32_t cur_cl = 2;
4000754c: 10 80 00 10 b 4000758c <msdos_statvfs+0xdc>
40007550: ba 10 20 02 mov 2, %i5
if (value == FAT_GENFAT_FREE)
40007554: 80 a0 60 00 cmp %g1, 0
40007558: 12 80 00 0a bne 40007580 <msdos_statvfs+0xd0>
4000755c: ba 07 60 01 inc %i5
sb->f_bfree++;
40007560: f4 1e 60 10 ldd [ %i1 + 0x10 ], %i2
sb->f_bavail++;
40007564: c4 1e 60 18 ldd [ %i1 + 0x18 ], %g2
sb->f_bfree++;
40007568: 9a 86 e0 01 addcc %i3, 1, %o5
4000756c: 98 46 a0 00 addx %i2, 0, %o4
sb->f_bavail++;
40007570: b6 80 e0 01 addcc %g3, 1, %i3
sb->f_bfree++;
40007574: d8 3e 60 10 std %o4, [ %i1 + 0x10 ]
sb->f_bavail++;
40007578: b4 40 a0 00 addx %g2, 0, %i2
4000757c: f4 3e 60 18 std %i2, [ %i1 + 0x18 ]
for (; cur_cl < data_cls_val; ++cur_cl)
40007580: 80 a4 00 1d cmp %l0, %i5
40007584: 02 bf ff eb be 40007530 <msdos_statvfs+0x80>
40007588: b0 10 20 00 clr %i0
rc = fat_get_fat_cluster(&fs_info->fat, cur_cl, &value);
4000758c: 92 10 00 1d mov %i5, %o1
40007590: 94 07 bf fc add %fp, -4, %o2
40007594: 40 00 25 49 call 40010ab8 <fat_get_fat_cluster>
40007598: 90 10 00 1c mov %i4, %o0
if (rc != RC_OK)
4000759c: b0 92 20 00 orcc %o0, 0, %i0
400075a0: 02 bf ff ed be 40007554 <msdos_statvfs+0xa4>
<== ALWAYS TAKEN
400075a4: c2 07 bf fc ld [ %fp + -4 ], %g1
400075a8: 40 00 17 c1 call 4000d4ac <_Mutex_recursive_Release>
<== NOT EXECUTED
400075ac: 90 10 00 11 mov %l1, %o0
<== NOT EXECUTED
400075b0: 81 c7 e0 08 ret
<== NOT EXECUTED
400075b4: 81 e8 00 00 restore
<== NOT EXECUTED
40012200 <rtems_dosfs_create_default_converter>:
rtems_dosfs_convert_control super;
uint8_t buffer[MSDOS_NAME_MAX_LFN_BYTES];
} msdos_default_convert_control;
rtems_dosfs_convert_control *rtems_dosfs_create_default_converter(void)
{
40012200: 9d e3 bf a0 save %sp, -96, %sp
msdos_default_convert_control *self = malloc( sizeof( *self ) );
40012204: 7f ff c7 15 call 40003e58 <malloc>
40012208: 90 10 22 14 mov 0x214, %o0
if ( self != NULL ) {
4001220c: b0 92 20 00 orcc %o0, 0, %i0
40012210: 02 80 00 08 be 40012230 <rtems_dosfs_create_default_converter+0x30>
<== NEVER TAKEN
40012214: 03 10 00 9a sethi %hi(0x40026800), %g1
rtems_dosfs_convert_control *super = &self->super;
super->handler = &msdos_default_convert_handler;
40012218: 82 10 60 64 or %g1, 0x64, %g1 ! 40026864 <msdos_default_convert_handler>
super->buffer.data = &self->buffer;
4001221c: 84 06 20 0c add %i0, 0xc, %g2
super->handler = &msdos_default_convert_handler;
40012220: c2 26 00 00 st %g1, [ %i0 ]
super->buffer.size = sizeof( self->buffer );
40012224: 82 10 22 08 mov 0x208, %g1
super->buffer.data = &self->buffer;
40012228: c4 26 20 04 st %g2, [ %i0 + 4 ]
super->buffer.size = sizeof( self->buffer );
4001222c: c2 26 20 08 st %g1, [ %i0 + 8 ]
}
return &self->super;
}
40012230: 81 c7 e0 08 ret
40012234: 81 e8 00 00 restore
40006df0 <rtems_dosfs_create_utf8_converter>:
};
rtems_dosfs_convert_control *rtems_dosfs_create_utf8_converter(
const char *codepage
)
{
40006df0: 9d e3 bf a0 save %sp, -96, %sp
msdos_utf8_convert_control *self = malloc( sizeof( *self ) );
40006df4: 7f ff f6 58 call 40004754 <malloc>
40006df8: 90 10 24 2c mov 0x42c, %o0
if ( self != NULL ) {
40006dfc: ba 92 20 00 orcc %o0, 0, %i5
40006e00: 02 80 00 27 be 40006e9c <rtems_dosfs_create_utf8_converter+0xac>
<== NEVER TAKEN
40006e04: 39 10 00 cb sethi %hi(0x40032c00), %i4
self->desc_codepage_to_utf8 = iconv_open( "UTF-8", codepage );
40006e08: 92 10 00 18 mov %i0, %o1
40006e0c: 40 00 60 21 call 4001ee90 <iconv_open>
40006e10: 90 17 23 b0 or %i4, 0x3b0, %o0
40006e14: d0 27 60 0c st %o0, [ %i5 + 0xc ]
self->desc_utf8_to_codepage = iconv_open( codepage, "UTF-8" );
40006e18: 92 17 23 b0 or %i4, 0x3b0, %o1
40006e1c: 40 00 60 1d call 4001ee90 <iconv_open>
40006e20: 90 10 00 18 mov %i0, %o0
40006e24: d0 27 60 10 st %o0, [ %i5 + 0x10 ]
self->desc_utf16_to_utf8 = iconv_open( "UTF-8", "UTF-16LE" );
40006e28: 37 10 00 cb sethi %hi(0x40032c00), %i3
40006e2c: 90 17 23 b0 or %i4, 0x3b0, %o0
40006e30: 40 00 60 18 call 4001ee90 <iconv_open>
40006e34: 92 16 e3 b8 or %i3, 0x3b8, %o1
40006e38: d0 27 60 14 st %o0, [ %i5 + 0x14 ]
self->desc_utf8_to_utf16 = iconv_open( "UTF-16LE", "UTF-8" );
40006e3c: 92 17 23 b0 or %i4, 0x3b0, %o1
40006e40: 40 00 60 14 call 4001ee90 <iconv_open>
40006e44: 90 16 e3 b8 or %i3, 0x3b8, %o0
40006e48: d0 27 60 18 st %o0, [ %i5 + 0x18 ]
if (
40006e4c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
40006e50: 80 a0 7f ff cmp %g1, -1
40006e54: 22 80 00 15 be,a 40006ea8 <rtems_dosfs_create_utf8_converter+0xb8>
<== NEVER TAKEN
40006e58: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
self->desc_utf16_to_utf8 != INVALID_ICONV_DESC
&& self->desc_utf8_to_codepage != INVALID_ICONV_DESC
40006e5c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
40006e60: 80 a0 7f ff cmp %g1, -1
40006e64: 22 80 00 11 be,a 40006ea8 <rtems_dosfs_create_utf8_converter+0xb8>
<== NEVER TAKEN
40006e68: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
&& self->desc_codepage_to_utf8 != INVALID_ICONV_DESC
40006e6c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
&& self->desc_utf8_to_utf16 != INVALID_ICONV_DESC
40006e70: 80 a0 7f ff cmp %g1, -1
40006e74: 02 80 00 0c be 40006ea4 <rtems_dosfs_create_utf8_converter+0xb4>
<== NEVER TAKEN
40006e78: 80 a2 3f ff cmp %o0, -1
40006e7c: 02 80 00 0a be 40006ea4 <rtems_dosfs_create_utf8_converter+0xb4>
<== NEVER TAKEN
40006e80: 03 10 00 cb sethi %hi(0x40032c00), %g1
) {
rtems_dosfs_convert_control *super = &self->super;
super->handler = &msdos_utf8_convert_handler;
40006e84: 82 10 63 f4 or %g1, 0x3f4, %g1 ! 40032ff4 <msdos_utf8_convert_handler>
super->buffer.data = &self->buffer;
40006e88: 84 07 60 1c add %i5, 0x1c, %g2
super->handler = &msdos_utf8_convert_handler;
40006e8c: c2 27 40 00 st %g1, [ %i5 ]
super->buffer.size = sizeof( self->buffer );
40006e90: 82 10 24 10 mov 0x410, %g1
super->buffer.data = &self->buffer;
40006e94: c4 27 60 04 st %g2, [ %i5 + 4 ]
super->buffer.size = sizeof( self->buffer );
40006e98: c2 27 60 08 st %g1, [ %i5 + 8 ]
self = NULL;
}
}
return &self->super;
}
40006e9c: 81 c7 e0 08 ret
40006ea0: 91 e8 00 1d restore %g0, %i5, %o0
msdos_utf8_destroy( &self->super );
40006ea4: 90 10 00 1d mov %i5, %o0
<== NOT EXECUTED
40006ea8: 7f ff ff 8e call 40006ce0 <msdos_utf8_destroy>
<== NOT EXECUTED
40006eac: ba 10 20 00 clr %i5
<== NOT EXECUTED
}
40006eb0: 81 c7 e0 08 ret
<== NOT EXECUTED
40006eb4: 91 e8 00 1d restore %g0, %i5, %o0
<== NOT EXECUTED
4000716c <rtems_dosfs_initialize>:
*/
int rtems_dosfs_initialize(
rtems_filesystem_mount_table_entry_t *mt_entry,
const void *data
)
{
4000716c: 9d e3 bf a0 save %sp, -96, %sp
int rc = 0;
const rtems_dosfs_mount_options *mount_options = data;
rtems_dosfs_convert_control *converter;
if (mount_options == NULL || mount_options->converter == NULL) {
40007170: 80 a6 60 00 cmp %i1, 0
40007174: 02 80 00 0c be 400071a4 <rtems_dosfs_initialize+0x38>
40007178: 01 00 00 00 nop
4000717c: f8 06 40 00 ld [ %i1 ], %i4
40007180: 80 a7 20 00 cmp %i4, 0
40007184: 02 80 00 08 be 400071a4 <rtems_dosfs_initialize+0x38>
<== NEVER TAKEN
40007188: 37 10 00 9a sethi %hi(0x40026800), %i3
} else {
converter = mount_options->converter;
}
if (converter != NULL) {
rc = msdos_initialize_support(mt_entry,
4000718c: 35 10 00 9a sethi %hi(0x40026800), %i2
40007190: 33 10 00 99 sethi %hi(0x40026400), %i1
40007194: b6 16 e0 84 or %i3, 0x84, %i3
40007198: b4 16 a0 c4 or %i2, 0xc4, %i2
4000719c: 40 00 00 0d call 400071d0 <msdos_initialize_support>
400071a0: 93 ee 60 cc restore %i1, 0xcc, %o1
converter = rtems_dosfs_create_default_converter();
400071a4: 40 00 2c 17 call 40012200 <rtems_dosfs_create_default_converter>
400071a8: 01 00 00 00 nop
if (converter != NULL) {
400071ac: b8 92 20 00 orcc %o0, 0, %i4
400071b0: 12 bf ff f7 bne 4000718c <rtems_dosfs_initialize+0x20>
<== ALWAYS TAKEN
400071b4: 37 10 00 9a sethi %hi(0x40026800), %i3
&msdos_ops,
&msdos_file_handlers,
&msdos_dir_handlers,
converter);
} else {
errno = ENOMEM;
400071b8: 40 00 50 ee call 4001b570 <__errno>
<== NOT EXECUTED
400071bc: b0 10 3f ff mov -1, %i0
<== NOT EXECUTED
400071c0: 82 10 20 0c mov 0xc, %g1
<== NOT EXECUTED
400071c4: c2 22 00 00 st %g1, [ %o0 ]
<== NOT EXECUTED
rc = -1;
}
return rc;
}
400071c8: 81 c7 e0 08 ret
<== NOT EXECUTED
400071cc: 81 e8 00 00 restore
<== NOT EXECUTED