/* Indirect. */
else if (fileblock < (INDIRECT_BLOCKS + (blksz / 4))) {
if (indir1_block == NULL) {
- indir1_block = (uint32_t *) malloc (blksz);
+ indir1_block = (uint32_t *) memalign(ARCH_DMA_MINALIGN,
+ blksz);
if (indir1_block == NULL) {
printf ("** ext2fs read block (indir 1) malloc failed. **\n");
return (-1);
indir1_block = NULL;
indir1_size = 0;
indir1_blkno = -1;
- indir1_block = (uint32_t *) malloc (blksz);
+ indir1_block = (uint32_t *) memalign(ARCH_DMA_MINALIGN,
+ blksz);
if (indir1_block == NULL) {
printf ("** ext2fs read block (indir 1) malloc failed. **\n");
return (-1);
+ blksz / 4);
if (indir1_block == NULL) {
- indir1_block = (uint32_t *) malloc (blksz);
+ indir1_block = (uint32_t *) memalign(ARCH_DMA_MINALIGN,
+ blksz);
if (indir1_block == NULL) {
printf ("** ext2fs read block (indir 2 1) malloc failed. **\n");
return (-1);
indir1_block = NULL;
indir1_size = 0;
indir1_blkno = -1;
- indir1_block = (uint32_t *) malloc (blksz);
+ indir1_block = (uint32_t *) memalign(ARCH_DMA_MINALIGN,
+ blksz);
if (indir1_block == NULL) {
printf ("** ext2fs read block (indir 2 1) malloc failed. **\n");
return (-1);
}
if (indir2_block == NULL) {
- indir2_block = (uint32_t *) malloc (blksz);
+ indir2_block = (uint32_t *) memalign(ARCH_DMA_MINALIGN,
+ blksz);
if (indir2_block == NULL) {
printf ("** ext2fs read block (indir 2 2) malloc failed. **\n");
return (-1);
indir2_block = NULL;
indir2_size = 0;
indir2_blkno = -1;
- indir2_block = (uint32_t *) malloc (blksz);
+ indir2_block = (uint32_t *) memalign(ARCH_DMA_MINALIGN,
+ blksz);
if (indir2_block == NULL) {
printf ("** ext2fs read block (indir 2 2) malloc failed. **\n");
return (-1);