summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2013-04-18 18:23:51 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2013-04-18 18:23:51 (GMT)
commit6ee0e05fb94445551840fcb80b9b1c254c736799 (patch)
tree0acf68cdc69dae2ff0e2a72b36e4efb6f8fbfd06 /tools/h5repack/h5repack_copy.c
parent94f89911545edce6fc9ebde2c83357cbda0bbd70 (diff)
downloadhdf5-6ee0e05fb94445551840fcb80b9b1c254c736799.zip
hdf5-6ee0e05fb94445551840fcb80b9b1c254c736799.tar.gz
hdf5-6ee0e05fb94445551840fcb80b9b1c254c736799.tar.bz2
[svn-r23599] Bring revisions 22802 : 23085 from trunk to revise_chunks.
h5committested.
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index cf55d7f..02337fd 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -773,6 +773,7 @@ int do_copy_objects(hid_t fidin,
void *hslab_buf=NULL; /* hyperslab buffer for raw data */
int has_filter; /* current object has a filter */
int req_filter; /* there was a request for a filter */
+ int req_obj_layout=0; /* request layout to current object */
unsigned crt_order_flags; /* group creation order flag */
unsigned i;
unsigned u;
@@ -904,6 +905,22 @@ int do_copy_objects(hid_t fidin,
}
}
+ /* check if layout change requested individual object */
+ if (options->layout_g != H5D_LAYOUT_ERROR)
+ {
+ pack_info_t *pckinfo;
+ /* any dataset is specified */
+ if (options->op_tbl->nelems > 0)
+ {
+ /* check if object exist */
+ pckinfo = options_get_object (travt->objs[i].name, options->op_tbl);
+ if (pckinfo)
+ {
+ req_obj_layout = 1;
+ }
+ }
+ }
+
/* early detection of references */
if((dset_in = H5Dopen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
goto error;
@@ -1023,6 +1040,9 @@ int do_copy_objects(hid_t fidin,
goto error;
}
+ /* only if layout change requested for entire file or
+ * individual obj */
+ if (options->all_layout > 0 || req_obj_layout == 1)
/*-------------------------------------------------
* Unset the unlimited max dims if convert to other
* than chunk layouts, because unlimited max dims