Re: [Patch 1/1] CLD: Introduce the "New CLD" API

Jeff Garzik <[email protected]>
Newsgroups org.kernel.vger.hail-devel
Message-ID <[email protected]>
On 02/07/2010 02:15 PM, Pete Zaitcev wrote:
> The "traditional" CLD API is too difficult to program. In particular,
> switching from a rigid "Group" policy to arbitrary paths in existing
> clients in Chunk and tabled turned out to be next to impossible.
> The issue is due to the fundamental nature of the API as based on very
> fine-grained events.
>
> So, in the interests of clients, introduce the "new" API. Its basic
> definition is in<ncld.h>. It presents a filesystem-like interface,
> extended with event callbacks for coarse events, such as an end of
> CLD session.
>
> The patch converts all in-tree clients from cldc_xxx to ncld_xxx and
> discards some of code that became unused (test/util.c).
>
> Signed-Off-By: Pete Zaitcev<[email protected]>
>
> ---
>   include/Makefile.am    |    2
>   include/ncld.h         |   88 ++
>   lib/cldc-dns.c         |   92 +-
>   lib/cldc.c             |  856 ++++++++++++++++++++++++++
>   test/Makefile.am       |    5
>   test/it-works.c        |  125 ---
>   test/load-file-event.c |  244 +------
>   test/lock-file-event.c |  269 +-------
>   test/save-file-event.c |  245 -------
>   test/test.h            |    5
>   test/util.c            |   79 --
>   tools/cldcli.c         | 1249 ++++++++++-----------------------------
>   12 files changed, 1433 insertions(+), 1826 deletions(-)

applied, with changes:

- some cosmetic reformatting, to match existing code

- log param in cldc-dns should not be made conditional as an 
undocumented side effect of ncld
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.