diff options
author | Robb Matzke <matzke@llnl.gov> | 1997-12-11 21:35:46 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1997-12-11 21:35:46 (GMT) |
commit | faca6fbaa8c557b18d6b264841fc8717d1e73816 (patch) | |
tree | 2123e6290a24e6ad94c776e45283800cc6917f92 /src/H5Fsec2.c | |
parent | 3c16901751f40fcbbf36878fe13b0237a3753bc9 (diff) | |
download | hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.zip hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.tar.gz hdf5-faca6fbaa8c557b18d6b264841fc8717d1e73816.tar.bz2 |
[svn-r145] ./src/H5Osdtyp.c -> H5Odtype.c
./src/H5Osdim.c -> H5Osdspace.c
./src/Makefile.in
Changed the names of these files to better reflect what they
actually do.
./src/H5.c
./src/H5AC.c
./src/H5B.c
./src/H5C.c
./src/H5D.c
./src/H5E.c
./src/H5Eprivate.h
./src/H5Epublic.h
./src/H5F.c
./src/H5Fcore.c
./src/H5Ffamily.c
./src/H5Fistore.c
./src/H5Flow.c
./src/H5Fsec2.c
./src/H5Fsplit.c
./src/H5Fstdio.c
./src/H5G.c
./src/H5Gent.c
./src/H5Gnode.c
./src/H5Gshad.c
./src/H5Gstab.c
./src/H5H.c
./src/H5M.c
./src/H5MF.c
./src/H5O.c
./src/H5Osdtyp.c (./src/H5Odtype.c)
./src/H5P.c
./src/H5T.c
./src/H5detect.c
./src/H5private.h
Added an argument to the HRETURN_ERROR(), HGOTO_ERROR(), and
HERROR() macros which is a string error message. This allows
us to give extra information which can't be represented by the
major and minor error numbers. This information was
previously in comments just before or after the macro call.
The string isn't currently used, but I'm planning to change
the test files so they print an error trace when something
fails. This should make debugging a little faster since it's
often obvious what's wrong if we could just see the error
stack without even having to start a debugger.
Diffstat (limited to 'src/H5Fsec2.c')
-rw-r--r-- | src/H5Fsec2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Fsec2.c b/src/H5Fsec2.c index 4d82d11..03cd240 100644 --- a/src/H5Fsec2.c +++ b/src/H5Fsec2.c @@ -82,7 +82,7 @@ H5F_sec2_open (const char *name, uintn flags, H5F_search_t *key/*out*/) oflags |= (flags & H5F_ACC_TRUNC) ? O_TRUNC : 0; if ((fd=open (name, oflags, 0666))<0) { - HRETURN_ERROR (H5E_IO, H5E_CANTOPENFILE, NULL);/*open failed*/ + HRETURN_ERROR (H5E_IO, H5E_CANTOPENFILE, NULL, "open failed"); } lf = H5MM_xcalloc (1, sizeof(H5F_low_t)); @@ -126,7 +126,7 @@ H5F_sec2_close (H5F_low_t *lf) FUNC_ENTER (H5F_sec2_close, FAIL); if (close (lf->u.sec2.fd)<0) { - HRETURN_ERROR (H5E_IO, H5E_CLOSEERROR, FAIL); /*close failed*/ + HRETURN_ERROR (H5E_IO, H5E_CLOSEERROR, FAIL, "close failed"); } lf->u.sec2.fd = -1; @@ -185,7 +185,7 @@ H5F_sec2_read (H5F_low_t *lf, const haddr_t *addr, size_t size, uint8 *buf) lf->u.sec2.op==H5F_OP_UNKNOWN || lf->u.sec2.cur!=offset) { if (lseek (lf->u.sec2.fd, offset, SEEK_SET)<0) { - HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL); /*lseek failed*/ + HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "lseek failed"); } lf->u.sec2.cur = offset; } @@ -205,7 +205,7 @@ H5F_sec2_read (H5F_low_t *lf, const haddr_t *addr, size_t size, uint8 *buf) */ if ((n=read (lf->u.sec2.fd, buf, size))<0) { lf->u.sec2.op = H5F_OP_UNKNOWN; - HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL); /*read failed*/ + HRETURN_ERROR (H5E_IO, H5E_READERROR, FAIL, "read failed"); } else if (n<size) { HDmemset (buf+n, 0, size-n); } @@ -264,7 +264,7 @@ H5F_sec2_write (H5F_low_t *lf, const haddr_t *addr, size_t size, lf->u.sec2.op==H5F_OP_UNKNOWN || lf->u.sec2.cur!=offset) { if (lseek (lf->u.sec2.fd, offset, SEEK_SET)<0) { - HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL); /*lseek failed*/ + HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "lseek failed"); } lf->u.sec2.cur = offset; } @@ -275,7 +275,7 @@ H5F_sec2_write (H5F_low_t *lf, const haddr_t *addr, size_t size, */ if (size != write (lf->u.sec2.fd, buf, size)) { lf->u.sec2.op = H5F_OP_UNKNOWN; - HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL); /*write failed*/ + HRETURN_ERROR (H5E_IO, H5E_WRITEERROR, FAIL, "write failed"); } /* |