Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 1998 12:13:12 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Peter Dufault <dufault@hda.com>
Cc:        bde@zeta.org.au (Bruce Evans), mike@smith.net.au, current@FreeBSD.ORG
Subject:   Re: cdrecord trouble on currnet 
Message-ID:  <199805291913.MAA00482@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 29 May 1998 07:09:30 EDT." <199805291109.HAA23356@hda.hda.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> > >    if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) {
> > >        if (errno != 0) {
> > >            /* This isn't valid:
> > >             */
> 
> (...)
> 
> > The "This isn't valid" case isn't valid, since sysconf() doesn't change
> > errno if there is no error.  errno must be set before calling sysconf().
> 
> I needed to cut a few more lines:
> 
> >    /* Is priority scheduling configured?
> >     */
> >    errno = 0;
> >    if (sysconf(_SC_PRIORITY_SCHEDULING) == -1) {
> 
> Remember: Bruce is watching.  Measure twice, cut once.

8)  Thanks again. 

In reality, I can just check the return from sysconf; if 
_SC_PRIORITY_SCHEDULING can't be queried, then it's not a goer anyway.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805291913.MAA00482>