[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gdbsx: use right path for privcmd


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Manuel Bouyer <bouyer@xxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 18 Jan 2021 18:45:42 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RY5Tux6K6OmR16Unwf+Ela/uhSG9dwPc5lRZQsb5Gs0=; b=l6URtP2g3krDhmZwGNIbca2WX0QB8Z4k0W1qWXktRqJ/hV/rVUsM22CbERnhcBH406XnWbcZ/xPKZ3DUba+BfMEkOiHh7uqp0Qet8MTGpTHTBBksYhn4amO8J2d5d0XwpaAlbDlbBCHSffVtbeFcetu68pEtQUaDzi2B+CY7l8IGqJr9F25K77wUR1Vg3/TMc7P/PapYuPY+eMIGSAMYtzVcjKH4jCGUzr5BN55Yu29SqZqxHD1yCcb6aDl6PhspP5BWMnV1v/Q3sT2bZbS+E0R9Vj0hauGm3zBIi9kBWg8Sa606lMvf/Uiuc6WRqT2ZBIhcSEOtrVRhBc3pRzF/KA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JL2KKMjyKiLpwYi4lqv/3phZDVoD/ChK/TFtqcHfJK3ChYgmIBRyDXwhZv0tlfUyCN7kZyUFyu/GCuibGAqpUH66ROILgCk3kCTEtX7Dp7bxjdPDy9m/2GYlQuEuR9QgmP/yjtTsoFT4FAqwgufmb6pNH5mAz6RT6rPgocuuvHeMwDtv3aJBnqBh7An3SW0qPbTxqWkCQcl5Sj33fQ481mh4CKdBNcrNtQnL5YTXHdG5v9OAr6Z+Wicr1nGMEH07jvRYCmqJT0j60BwA+7Ed3fWnrEwDFXoAbZBDyXdaRRTkY4DtysXbQAohhU+w4A6CwSAXK+tSDYJ+xBRC20B0zg==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Manuel Bouyer <bouyer@xxxxxxxxxx>, Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 18 Jan 2021 18:45:58 +0000
  • Ironport-sdr: pvvHy5domP2czZ5Ls1ndCeC/S+ASiZFGRiC/x0OqQOBj56z/JzL0jb4LPFJuUs4qJrG6IUdnil 1AunZyUiAtalaub7querI6hZc8onXD8LEn1wi0yTozwNRmG38s5D1amFct7/pW89RROSxSqgMZ 9y7dQd+YcHk67az8zuAQ08+F/ORmDBPlTG4GIcRGnyMT+qMMYQnbvkl64c+8Gd4tX+w18sWNO6 O2arUFGA5yDgqlJ8Ak5FHs03DeGn7bENVA1RR1qelROhxA2ZG3jWknPVA4HJ2ro/5Nj9MtRxlR AeQ=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18/01/2021 18:03, Roger Pau Monné wrote:
> On Tue, Jan 12, 2021 at 07:12:28PM +0100, Manuel Bouyer wrote:
>> From: Manuel Bouyer <bouyer@xxxxxxxxxx>
>>
>> On NetBSD the privcmd interface node is /kern/xen/privcmd
>>
>> Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx>
>> ---
>>  tools/debugger/gdbsx/xg/xg_main.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/tools/debugger/gdbsx/xg/xg_main.c 
>> b/tools/debugger/gdbsx/xg/xg_main.c
>> index ce95648e7e..83a009c195 100644
>> --- a/tools/debugger/gdbsx/xg/xg_main.c
>> +++ b/tools/debugger/gdbsx/xg/xg_main.c
>> @@ -130,11 +130,11 @@ xg_init()
>>      int flags, saved_errno;
>>  
>>      XGTRC("E\n");
>> -    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;
>> -        }
>> +    if ((_dom0_fd=open("/dev/xen/privcmd", O_RDWR)) == -1 &&
>> +        (_dom0_fd=open("/proc/xen/privcmd", O_RDWR)) == -1 &&
>> +    (_dom0_fd=open("/kern/xen/privcmd", O_RDWR)) == -1) {
> Nit: hard tab instead of spaces.
>
>> +        perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd or 
>> /kern/xen/privcmd\n");
> I would have split the line, so:
>
>         perror("Failed to open /dev/xen/privcmd or /proc/xen/privcmd or "
>              "/kern/xen/privcmd\n");
>
> If you can resend with those fixed please add:
>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

I'd shorten it to just "Failed to open privcmd".  I can fix on commit if
you're happy.

~Andrew

P.S. Part of me doesn't want to know why we're opencoding libxencall here...



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.