summaryrefslogtreecommitdiffstats
path: root/src/H5HLcache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-20 00:44:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-20 00:44:12 (GMT)
commit5fdc21c6115f56d46894156fb70531260c44d8d5 (patch)
tree5be22f270e94be81ed5dc3751b0c8a4e4262d3c6 /src/H5HLcache.c
parente66ae8b671b17400f3dfb38b131825b7377a96b5 (diff)
downloadhdf5-5fdc21c6115f56d46894156fb70531260c44d8d5.zip
hdf5-5fdc21c6115f56d46894156fb70531260c44d8d5.tar.gz
hdf5-5fdc21c6115f56d46894156fb70531260c44d8d5.tar.bz2
[svn-r18045] Description:
Slush changes back & forth between trunk, the merging branch and the metadata journaling branch to level them out to a reasonably common set of code to work from for the next set of more significant changes. Tested on: Mac OS X/32 10.6.2 (amazon) w/debug (h5committest not required on this branch)
Diffstat (limited to 'src/H5HLcache.c')
-rw-r--r--src/H5HLcache.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index bcf9fdd..8f617f7 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -205,19 +205,19 @@ H5HL_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * udata1,
/* Check magic number */
if(HDmemcmp(hdr, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC))
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad heap signature")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad heap signature")
p += H5_SIZEOF_MAGIC;
/* Version */
if(H5HL_VERSION != *p++)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "wrong version number in global heap")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "wrong version number in global heap")
/* Reserved */
p += 3;
/* Allocate space in memory for the heap */
if(NULL == (heap = H5FL_CALLOC(H5HL_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
/* heap data size */
H5F_DECODE_LENGTH(f, p, heap->heap_alloc);
@@ -225,22 +225,22 @@ H5HL_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * udata1,
/* free list head */
H5F_DECODE_LENGTH(f, p, free_block);
if(free_block != H5HL_FREE_NULL && free_block >= heap->heap_alloc)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad heap free list")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "bad heap free list")
/* data */
H5F_addr_decode(f, &p, &(heap->addr));
if(NULL == (heap->chunk = H5FL_BLK_CALLOC(lheap_chunk, (sizeof_hdr + heap->heap_alloc))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
if(heap->heap_alloc &&
H5F_block_read(f, H5FD_MEM_LHEAP, heap->addr, heap->heap_alloc, dxpl_id, heap->chunk + sizeof_hdr) < 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "unable to read heap data")
+ HGOTO_ERROR(H5E_HEAP, H5E_READERROR, NULL, "unable to read heap data")
/* Build free list */
while(H5HL_FREE_NULL != free_block) {
if(free_block >= heap->heap_alloc)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad heap free list")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, NULL, "bad heap free list")
if(NULL == (fl = H5FL_MALLOC(H5HL_free_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_HEAP, H5E_CANTALLOC, NULL, "memory allocation failed")
fl->offset = free_block;
fl->prev = tail;
fl->next = NULL;
@@ -254,11 +254,11 @@ H5HL_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * udata1,
H5F_DECODE_LENGTH(f, p, free_block);
if(free_block == 0)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "free block size is zero?")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADVALUE, NULL, "free block size is zero?")
H5F_DECODE_LENGTH(f, p, fl->size);
if(fl->offset + fl->size > heap->heap_alloc)
- HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, NULL, "bad heap free list")
+ HGOTO_ERROR(H5E_HEAP, H5E_BADRANGE, NULL, "bad heap free list")
} /* end while */
/* Set return value */