On Thu, Mar 15, 2018 at 11:55 PM, Yasunori Goto <y-goto(a)jp.fujitsu.com> wrote:
Hi,
> > +static void log_syslog(struct ndctl_ctx *ctx, int priority, const char *file,
> > + int line, const char *fn, const char *format, va_list args)
> > +{
> > + char *buf = (char *)malloc(BUF_SIZE);
> > + vsnprintf(buf, BUF_SIZE, format, args);
> > + syslog(priority, "%s", buf);
> > + free(buf);
> > +}
>
> This seems to be reinventing setting up a log file that I'm sure we
> could borrow or link to...
>
> ndctl borrows heavily from git, and git does logging in it's daemon.c,
> I'd be happier if you copied that.
Maybe silly question...., but is it OK about OSS lisence?
In my understanding, basically the lisence of git is GPL2,
LGPL is used just for use xdiff/ or some libc code in git....
https://github.com/git/git/blob/master/COPYING
https://github.com/git/git/blob/master/LGPL-2.1
However, the lisence of ndctl is LGPL2.1
https://github.com/pmem/ndctl/blob/master/COPYING
If we copied from git to ndctl, then I suppose that ndctl
daemon may have to use GPL2 rather than LGPL2.1, right?
In the ndctl source tree the license of the code in ndctl/ is GPL-2,
the license of the code in ndctl/lib/ is LGPL-2.1. So we can freely
copy GPL-2 code into the utilities, but not the library.