From owner-freebsd-current Fri May 29 04:33:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA19455 for freebsd-current-outgoing; Fri, 29 May 1998 04:33:51 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from hda.hda.com (hda-bicnet.bicnet.net [208.220.66.37]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA19348 for ; Fri, 29 May 1998 04:33:44 -0700 (PDT) (envelope-from dufault@hda.hda.com) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id HAA23356; Fri, 29 May 1998 07:09:31 -0400 (EDT) From: Peter Dufault Message-Id: <199805291109.HAA23356@hda.hda.com> Subject: Re: cdrecord trouble on currnet In-Reply-To: <199805290119.LAA20313@godzilla.zeta.org.au> from Bruce Evans at "May 29, 98 11:19:43 am" To: bde@zeta.org.au (Bruce Evans) Date: Fri, 29 May 1998 07:09:30 -0400 (EDT) Cc: dufault@hda.com, mike@smith.net.au, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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. Peter -- Peter Dufault (dufault@hda.com) Realtime development, Machine control, HD Associates, Inc. Safety critical systems, Agency approval To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message