[Top][All Lists]

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

Re: libusb+librump patch

From: Antti Kantee
Subject: Re: libusb+librump patch
Date: Fri, 16 Oct 2015 17:28:53 +0000

On 16/10/15 16:56, Robert Millan wrote:
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");

The rump kernel ugenhc (= "ugen host controller") driver uses a /dev/ugen backend to emulate a USB host controller to the USB stack. So the idea with ugenhc is that you can run the USB drivers in userspace, e.g. for development purposes, if your host supports /dev/ugen, and don't need to access the actual PCI devices directly. So you can't open /dev/ugenhc, and not only because it doesn't exist.

If you don't have a USB stack on your host (which I assume is why we're having this discussion ;), ugenhc is completely useless.

If you want to do something like rump_sys_open("/dev/ugen"), you probably need the ugen driver as a rump kernel components (as was speculated in this thread a few days ago).

reply via email to

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