[Top][All Lists]

[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

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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]