Re: [Libguestfs] [PATCH 2/2] dib: use remove_duplicates instead of own code

2016-09-23 Thread Richard W.M. Jones
On Fri, Sep 23, 2016 at 06:05:25PM +0200, Pino Toscano wrote: > Use a common function to remove duplicates in an unsorted list. > > Just refactoring, with no behaviour change. Except it's no longer O(n^2) :-) ACK series. Rich. > --- > dib/cmdline.ml | 2 +- > dib/utils.ml | 4 > 2

[Libguestfs] [PATCH 1/2] mllib: move remove_duplicates from v2v

2016-09-23 Thread Pino Toscano
Simple code motion. --- mllib/common_utils.ml | 9 + mllib/common_utils.mli | 6 ++ v2v/utils.ml | 9 - v2v/utils.mli | 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index

[Libguestfs] [PATCH 2/2] dib: use remove_duplicates instead of own code

2016-09-23 Thread Pino Toscano
Use a common function to remove duplicates in an unsorted list. Just refactoring, with no behaviour change. --- dib/cmdline.ml | 2 +- dib/utils.ml | 4 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dib/cmdline.ml b/dib/cmdline.ml index 1fd6c71..144e5a7 100644 ---

Re: [Libguestfs] [PATCH v3 1/3] New API: internal_find_block

2016-09-23 Thread NoxDaFox
2016-09-23 11:52 GMT+03:00 Pino Toscano : > On Tuesday, 20 September 2016 16:19:30 CEST Matteo Cafasso wrote: > > + for (index = 0; index < count; index++) { > > +fsattr = tsk_fs_file_attr_get_idx (fsfile, index); > > + > > +if (fsattr != NULL && fsattr->flags &

Re: [Libguestfs] [PATCH v3 0/3] New API - find_block

2016-09-23 Thread Pino Toscano
On Tuesday, 20 September 2016 16:19:29 CEST Matteo Cafasso wrote: > v3: > > - fixed attribute walk callback: checking against TSK_FS_BLOCK_FLAG_RAW flag > would >exclude compressed data blocks which are still important. >Yet we want to exclude sparse blocks (TSK_FS_BLOCK_FLAG_SPARSE) as

Re: [Libguestfs] [PATCH v3 1/3] New API: internal_find_block

2016-09-23 Thread Pino Toscano
On Tuesday, 20 September 2016 16:19:30 CEST Matteo Cafasso wrote: > + for (index = 0; index < count; index++) { > +fsattr = tsk_fs_file_attr_get_idx (fsfile, index); > + > +if (fsattr != NULL && fsattr->flags & TSK_FS_ATTR_NONRES) > + tsk_fs_attr_walk (fsattr, flags,