[lvm-devel] [PATCH 04/23] Export outsz() and outhnt() for modules

Alasdair G Kergon agk at redhat.com
Thu Dec 3 01:25:22 UTC 2009


On Mon, Nov 30, 2009 at 12:37:04PM +0100, Zdenek Kabelac wrote:
> Adding macro outsz() for out_size() and outhnt() for out_hint()
> that checks for error in a similar way as outf() does for out_text()

> +#define outsz(args...) do {if (!out_size(args)) return_0;} while (0)
> +#define outhnt(args...) do {if (!out_hint(args)) return_0;} while (0)
>  #define outf(args...) do {if (!out_text(args)) return_0;} while (0)
>  #define outnl(f) do {if (!out_newline(f)) return_0;} while (0)
  
But outsz and outhnt are ugly, so if we can't think of better names,
let's at least add another patch to swap over all 4 names so the
exported versions are the 'nice' ones.

 #define out_newline(f) do {if (!outnl(f)) return_0;} while (0)

Alasdair




More information about the lvm-devel mailing list