DeviceImpl (USB bus, File f, int a)
    throws IOException, SecurityException
    {
	super (null, bus, a);

	usb = bus;
	path = f.getPath ();

	// should only fail if the device unplugged before
	// we opened it, or permissions were bogus, or ...
	if ((fd = openNative (path)) < 0) {
	    String	message;

	    message = "can't open device file r/w, " + path;
	    if (fd == -USBException.EPERM)
		throw new SecurityException (message);
	    else
		throw new USBException (message, -fd);
	}

	// fd's open; NOW we can get the device descriptor
	try {
	    byte buf [];

	    buf = ControlMessage.getStandardDescriptor (this,
		    Descriptor.TYPE_DEVICE, (byte) 0, 0, 18);
	    descriptor = new DeviceDescriptor (this, buf);
	} catch (IOException e) {
	    if (Linux.debug)
		System.err.println ("get dev descr fail:  "
		    + path
		    + ", "
		    + e.getMessage ());
	    throw e;
	}

	// ... and configuration descriptor
	getConfiguration ();

	if (Linux.trace)
	    System.err.println ("new: " + path);
    }