diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2001-09-17 19:37:15 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2001-09-17 19:37:15 (GMT) |
commit | ee0c2bb4561c5ffc6b7d860a0670491c00f99bbe (patch) | |
tree | 756d36786a99f70255816184ff1f2f86596da6d5 /src | |
parent | ee6a5bf86b2ae70add2575f0ed1eb882ee8cdd24 (diff) | |
download | hdf5-ee0c2bb4561c5ffc6b7d860a0670491c00f99bbe.zip hdf5-ee0c2bb4561c5ffc6b7d860a0670491c00f99bbe.tar.gz hdf5-ee0c2bb4561c5ffc6b7d860a0670491c00f99bbe.tar.bz2 |
[svn-r4444] Purpose:
Feature
Description:
The H5Pset_fapl_split() used to assume both meta and raw files
have the same prefix name. This prohibited the option to specify
the two files reside on different file systems. E.g., having
meta-file as /user/home/data1.meta and raw-file as /pfs/data1.raw.
Solution:
Added feature that if the raw or meta extension string contains
a "%s", it will be substituted by the filename given for H5Fopen
or H5Fcreate. This is same as the multi-file syntax. If no %s
is found, one is inserted at the beginning. This is the previous
behavior.
Platforms tested:
Modi4 (parallel, serial) and eirene (parallel).
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmulti.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index f0ef846..2c880a6 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -231,6 +231,12 @@ H5FD_multi_init(void) * Wednesday, August 11, 1999 * * Modifications: + * Albert Cheng, Sep 17, 2001 + * Added feature that if the raw or meta extension string contains + * a "%s", it will be substituted by the filename given for H5Fopen + * or H5Fcreate. This is same as the multi-file syntax. If no %s + * is found, one is inserted at the beginning. This is the previous + * behavior. * *------------------------------------------------------------------------- */ @@ -262,9 +268,26 @@ H5Pset_fapl_split(hid_t fapl, const char *meta_ext, hid_t meta_plist_id, memb_fapl[H5FD_MEM_DRAW] = raw_plist_id; /* The names */ - sprintf(meta_name, "%%s%s", meta_ext?meta_ext:".meta"); + /* process meta filename */ + if (meta_ext){ + if (strstr(meta_ext, "%s")) + strcpy(meta_name, meta_ext); + else + sprintf(meta_name, "%%s%s", meta_ext); + } + else + strcpy(meta_name, "%s.meta"); memb_name[H5FD_MEM_SUPER] = meta_name; - sprintf(raw_name, "%%s%s", raw_ext?raw_ext:".raw"); + + /* process raw filename */ + if (raw_ext){ + if (strstr(raw_ext, "%s")) + strcpy(raw_name, raw_ext); + else + sprintf(raw_name, "%%s%s", raw_ext); + } + else + strcpy(raw_name, "%s.raw"); memb_name[H5FD_MEM_DRAW] = raw_name; /* The sizes */ |