diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-12-05 17:33:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-12-05 17:33:31 (GMT) |
commit | b46e9055944a06b642b1ff1a200aea84cdfb34a6 (patch) | |
tree | 189ce595bbc6c0ce4ae49f47b635fd1e0b2ee325 /src/H5FDlog.c | |
parent | e3c98c2899039b0a3e49205bad3a84ebbfacdff4 (diff) | |
download | hdf5-b46e9055944a06b642b1ff1a200aea84cdfb34a6.zip hdf5-b46e9055944a06b642b1ff1a200aea84cdfb34a6.tar.gz hdf5-b46e9055944a06b642b1ff1a200aea84cdfb34a6.tar.bz2 |
[svn-r4673] Purpose:
Backward Compatibility Fix
Description:
H5Pset_fapl_log's parameters have changed from a simple "verbosity" level
to bit-masked flags to enable various behaviors.
Solution:
Added in v1.4 compat stuff, on the unlikely chance that others are actually
using this code in some production way.
There are no C++ or FORTRAN wrappers for this call.
Platforms tested:
FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index 27359b2..6a3d077 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -252,6 +252,53 @@ H5FD_log_init(void) FUNC_LEAVE(H5FD_LOG_g); } +#ifdef H5_WANT_H5_V1_4_COMPAT + +/*------------------------------------------------------------------------- + * Function: H5Pset_fapl_log + * + * Purpose: Modify the file access property list to use the H5FD_LOG + * driver defined in this source file. There are no driver + * specific properties. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Robb Matzke + * Thursday, February 19, 1998 + * + * Modifications: + * We copy the LOGFILE value into our own access properties. + * + * Raymond Lu, 2001-10-25 + * Changed the file access list to the new generic property list. + * + *------------------------------------------------------------------------- + */ +herr_t +H5Pset_fapl_log(hid_t fapl_id, char *logfile, int verbosity) +{ + H5FD_log_fapl_t fa; /* File access property list information */ + H5P_genplist_t *plist; /* Property list pointer */ + herr_t ret_value=FAIL; + + FUNC_ENTER(H5Pset_fapl_log, FAIL); + H5TRACE3("e","isIs",fapl_id,logfile,verbosity); + + if(TRUE!=H5P_isa_class(fapl_id,H5P_FILE_ACCESS) || NULL == (plist = H5I_object(fapl_id))) + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list"); + + fa.logfile=logfile; + if(verbosity>0) { + fa.flags=H5FD_LOG_LOC_IO|H5FD_LOG_FLAVOR; + if(verbosity>1) + fa.flags|=H5FD_LOG_FILE_IO; + } /* end if */ + fa.buf_size=32*(1024*1024); + ret_value= H5P_set_driver(plist, H5FD_LOG, &fa); + + FUNC_LEAVE(ret_value); +} +#else /* H5_WANT_H5_V1_4_COMPAT */ /*------------------------------------------------------------------------- * Function: H5Pset_fapl_log @@ -293,6 +340,7 @@ H5Pset_fapl_log(hid_t fapl_id, char *logfile, unsigned flags, size_t buf_size) FUNC_LEAVE(ret_value); } +#endif /* H5_WANT_H5_V1_4_COMPAT */ /*------------------------------------------------------------------------- |