From: Bastian Blank Subject: [PATCH 2/2] libxc: Use privcmd device on Linux Date: Thu, 15 Dec 2011 11:41:58 +0100 Message-ID: <20111215104158.GD18042@wavehammer.waldi.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org libxc: Use privcmd device on Linux diff -r fd8e02fbcbfa -r ecf68e8d92f7 tools/libxc/xc_linux_osdep.c --- a/tools/libxc/xc_linux_osdep.c Sat Dec 10 16:40:31 2011 +0100 +++ b/tools/libxc/xc_linux_osdep.c Sat Dec 10 16:40:51 2011 +0100 @@ -45,7 +45,11 @@ static xc_osdep_handle linux_privcmd_open(xc_interface *xch) { int flags, saved_errno; - int fd = open("/proc/xen/privcmd", O_RDWR); + int fd; + + fd = open("/dev/xen/privcmd", O_RDWR); + if ( fd == -1 && errno == ENOENT ) + fd = open("/proc/xen/privcmd", O_RDWR); if ( fd == -1 ) { -- Murder is contrary to the laws of man and God. -- M-5 Computer, "The Ultimate Computer", stardate 4731.3