[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libusb+librump patch
From: |
Robert Millan |
Subject: |
Re: libusb+librump patch |
Date: |
Fri, 16 Oct 2015 18:56:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
El 15/10/15 a les 03:03, Bruno Félix Rezende Ribeiro ha escrit:
OTOH I think this part of your patch:
+ #define RUMP_SYS_OPEN
+ #define RUMP_SYS_CLOSE
+ #define RUMP_SYS_IOCTL
+ #define RUMP_SYS_READWRITE
is a bit dangerous. It would break any (current or future) usage of
open() / close() / etc in that file which is not related to USB device
nodes.
I see. What do you recommend? #ifdefs for each occurrence? Anyway,
I'm just playing around with it.
I recommend explicit rump_sys_open(), e.g.
int fd = rump_sys_open("/dev/ugenhc", RUMP_O_RDWR);
if (fd == -1)
error(1, rump_errno2host(errno), "rump_sys_open");
--
Robert Millan
- Re: libusb+librump patch, (continued)
- Re: libusb+librump patch, Bruno Félix Rezende Ribeiro, 2015/10/14
- Re: libusb+librump patch, Antti Kantee, 2015/10/14
- Re: libusb+librump patch, Olaf Buddenhagen, 2015/10/16
- Re: libusb+librump patch, Antti Kantee, 2015/10/17
- Re: libusb+librump patch, Olaf Buddenhagen, 2015/10/19
- Re: libusb+librump patch, Antti Kantee, 2015/10/19
- Re: libusb+librump patch, Olaf Buddenhagen, 2015/10/25
- Re: libusb+librump patch, Antti Kantee, 2015/10/26
Re: libusb+librump patch, Bruno Félix Rezende Ribeiro, 2015/10/14