[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] gdbsx: prefer privcmd character device
commit 9f592d103014e9e63119d52dac19ba20c3574922 Author: Doug Goldstein <cardoe@xxxxxxxxxx> AuthorDate: Tue Oct 31 10:20:11 2017 -0500 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Thu Nov 2 16:42:40 2017 +0000 gdbsx: prefer privcmd character device Prefer using the character device over the proc file if the character device exists. CC: Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx> CC: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CC: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> CC: Wei Liu <wei.liu2@xxxxxxxxxx> Signed-off-by: Doug Goldstein <cardoe@xxxxxxxxxx> Reviewed-by: Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx> Release-acked-by: Julien Grall <julien.grall@xxxxxxxxxx> --- 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 7ebf914..cc640d1 100644 --- a/tools/debugger/gdbsx/xg/xg_main.c +++ b/tools/debugger/gdbsx/xg/xg_main.c @@ -126,9 +126,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 -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |