From: Ian Jackson Subject: Re: [PATCH 1/4] libxc: prefer using privcmd character device Date: Tue, 24 Nov 2015 18:52:19 +0000 Message-ID: <22100.45539.424912.23006@mariner.uk.xensource.com> References: <1448390855-13505-1-git-send-email-cardoe@cardoe.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448390855-13505-1-git-send-email-cardoe@cardoe.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Doug Goldstein Cc: Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Doug Goldstein writes ("[PATCH 1/4] libxc: prefer using privcmd character device"): > Prefer using the character device over the proc file if the character > device exists. This follows similar conversions of xenbus to avoid > issues with FMODE_ATOMIC_POS added in Linux 3.14 and newer. This is a fine change, but > - int fd = open("/proc/xen/privcmd", O_RDWR); > + int fd = open("/dev/xen/privcmd", O_RDWR); /* prefer this newer interface */ > + > + if ( fd == -1 ) > + { I think this should check the errno value. I expect that any of ENOENT, ENXIO and ENODEV should be tolerated - but others should probaby be a fatal error. Ian.