Pino Toscano
2017-Jun-19 15:38 UTC
Re: [Libguestfs] [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
On Monday, 19 June 2017 15:31:26 CEST Richard W.M. Jones wrote:> These won't be used by the daemon, so interferes with us using > common/utils in the daemon, so they are moved to a different library. > ---I checked it again, and the daemon does use structs cleanups: $ cat generator/main.ml [...] output_to "daemon/structs-cleanups.c" Daemon.generate_daemon_structs_cleanups_c; output_to "daemon/structs-cleanups.h" Daemon.generate_daemon_structs_cleanups_h; See commits 32f0f9b032db592b50c4a4b0da29ef0de0478633 and 31fb6e20418e8f1b0647c92af0464f2009e9a997. So structs cleanups could stay in libutils -- OTOH, structs printing is only used in the library, and by guestfish. Thanks, -- Pino Toscano
Richard W.M. Jones
2017-Jun-19 15:44 UTC
Re: [Libguestfs] [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
On Mon, Jun 19, 2017 at 05:38:53PM +0200, Pino Toscano wrote:> On Monday, 19 June 2017 15:31:26 CEST Richard W.M. Jones wrote: > > These won't be used by the daemon, so interferes with us using > > common/utils in the daemon, so they are moved to a different library. > > --- > > I checked it again, and the daemon does use structs cleanups: > > $ cat generator/main.ml > [...] > output_to "daemon/structs-cleanups.c" > Daemon.generate_daemon_structs_cleanups_c; > output_to "daemon/structs-cleanups.h" > Daemon.generate_daemon_structs_cleanups_h;Those are different from common/structs/structs-cleanups.[ch] though (hence why they use different generator functions to generate them). Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Pino Toscano
2017-Jun-19 16:08 UTC
Re: [Libguestfs] [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
On Monday, 19 June 2017 17:44:40 CEST Richard W.M. Jones wrote:> On Mon, Jun 19, 2017 at 05:38:53PM +0200, Pino Toscano wrote: > > On Monday, 19 June 2017 15:31:26 CEST Richard W.M. Jones wrote: > > > These won't be used by the daemon, so interferes with us using > > > common/utils in the daemon, so they are moved to a different library. > > > --- > > > > I checked it again, and the daemon does use structs cleanups: > > > > $ cat generator/main.ml > > [...] > > output_to "daemon/structs-cleanups.c" > > Daemon.generate_daemon_structs_cleanups_c; > > output_to "daemon/structs-cleanups.h" > > Daemon.generate_daemon_structs_cleanups_h; > > Those are different from common/structs/structs-cleanups.[ch] though > (hence why they use different generator functions to generate them).Not that much though -- the differences basically are: a) slightly different names for the cleanup functions (i.e. those associated with the __attribute__((cleanup(...))) b) the _free and _list_free in the library are exported I guess this can be a later cleanup (pun intended!). -- Pino Toscano
Possibly Parallel Threads
- Re: [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
- [PATCH 1/2] daemon: generate cleanup handlers for structs
- [PATCH v7 10/13] utils: Split out structs cleanups and printing into common/structs.
- [PATCH v8 07/42] common/utils: Move ‘uefi.c’ to ‘lib/’.
- [PATCH v2 2/7] lib: Move utilities to new directory common/utils.