Re: [PATCH 2/2] android: Android version of log.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

On Sat, Sep 21, 2013 at 12:20:52PM -0500, Marcel Holtmann wrote:
> Hi Fred,
> > +
> > +static void android_log(int pri, const char *fmt, va_list ap)
> > +{
> > +	char *msg;
> > +	struct iovec vec[3];
> > +
> > +	msg = g_strdup_vprintf(fmt, ap);
> > +
> > +	if (!detached) {
> > +		vec[0].iov_base = (void *) msg;
> > +		vec[0].iov_len = strlen(msg) + 1;
> > +		vec[1].iov_base = "\n";
> > +		vec[1].iov_len = 1;
> > +		writev(STDERR_FILENO, vec, 2);
> > +	}
> 
> Lets not worry about logging to stderr at all.

Then I believe this might be simplified a lot. We might use
__android_log_print - like functions in this case.

Best regards 
Andrei Emeltchenko 

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux