Prefer using the character device over the proc file if the character device exists.
CC: Mukesh Rathor <mukesh.rat...@oracle.com> CC: Ian Jackson <ian.jack...@eu.citrix.com> CC: Stefano Stabellini <stefano.stabell...@eu.citrix.com> CC: Ian Campbell <ian.campb...@citrix.com> CC: Wei Liu <wei.l...@citrix.com> Signed-off-by: Doug Goldstein <car...@cardoe.com> --- tools/debugger/gdbsx/xg/xg_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/debugger/gdbsx/xg/xg_main.c b/tools/debugger/gdbsx/xg/xg_main.c index 8c8a402..9364aee 100644 --- a/tools/debugger/gdbsx/xg/xg_main.c +++ b/tools/debugger/gdbsx/xg/xg_main.c @@ -127,9 +127,11 @@ xg_init() int flags, saved_errno; XGTRC("E\n"); - if ((_dom0_fd=open("/proc/xen/privcmd", O_RDWR)) == -1) { - perror("Failed to open /proc/xen/privcmd\n"); - return -1; + if ((_dom0_fd=open("/dev/xen/privcmd", O_RDWR)) == -1) { + if ((_dom0_fd=open("/proc/xen/privcmd", O_RDWR)) == -1) { + perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd\n"); + return -1; + } } /* Although we return the file handle as the 'xc handle' the API * does not specify / guarentee that this integer is in fact -- 2.4.10 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel