libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] OpenBSD vs libcdio vs Audacious
Date: Sun, 24 Feb 2019 15:43:40 -0500

Edd's changes to bsd-logging have now been merged into master.

Haven't had time to test it out fully yet, but I am sure that will happen,
and perhaps others can try it out too.

On Tue, Feb 12, 2019 at 6:26 AM Rocky Bernstein <address@hidden> wrote:

> Thanks Edd for the work and information. I haven't had a chance to look at
> the code yet. Maybe the next weekend I'll be able to get to it and
> hopefully merge it in.
>
> As for a release that's a bigger deal. We need to see if Thomas is okay
> with it.
>
> Also, I had been promising myself to remove the hand-rolled booleans that
> were around pre C99. I think a decade later we can require people to use at
> least C99.
>
> If someone is up for converting this old code I would be grateful.
>
>
>
>
> On Mon, Feb 4, 2019 at 4:20 PM Edd Barrett <address@hidden> wrote:
>
>> On Sun, Jan 27, 2019 at 06:54:02PM +0100, Thomas Schmitt wrote:
>> > I would give set_speed_mmc() a try.
>>
>> Alas, sadly this doesn't help. TBH I can live without it, although I'd
>> like to silence the error message unless logging is turned up.
>>
>> Which brings us to:
>>
>> > > I wonder if the errors should only be shown if an environment variable
>> > > is set or something?
>> >
>> > You could sort the messages of lib/driver/netbsd.c into libcdio's log
>> level
>> > spectrum, rather than using fprintf(stderr) or perror():
>> > cdio_debug(), cdio_info(), cdio_warn(), cdio_error().
>> >
>> > (I dimly remember to have had problems when trying to enable or disable
>> > printing of those in the demo programs. But cdio_log_level_t in
>> > include/cdio/logging.h gives hope that it can be done.)
>>
>> Looking at the linux driver, it seems cdio_info() would be appropriate,
>> but wow, the implementation of the logging functions is scary:
>>
>> ---8<---
>> void cdio_info (const char format[], ...) GNUC_PRINTF(1,2);
>> ---8<---
>>
>> And then:
>>
>> --->8---
>> #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
>> #define GNUC_PRINTF( format_idx, arg_idx )              \
>>   __attribute__((format (printf, format_idx, arg_idx)))
>> ...
>> #else   /* !__GNUC__ */
>> #define GNUC_PRINTF( format_idx, arg_idx )
>> #endif  /* !__GNUC__ */
>> --->8---
>>
>> So if you are not on glibc, then logging is a NOOP, by the look of it.
>>
>> I'm not really sure this logging scheme can work on OpenBSD. I wonder why
>> it
>> was implemented this way.
>>
>> It also looks like there is no way to turn up/down the verbosity of the
>> logging. Or am I mistaken?
>>
>> --
>> Best Regards
>> Edd Barrett
>>
>> http://www.theunixzoo.co.uk
>>
>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]