Re: [PARPORT] open on non existing ppdev device

From: Tim Waugh (twaugh@redhat.com)
Date: Fri Oct 03 2003 - 08:26:01 EDT

  • Next message: Matthew Hand: "[PARPORT] parport scanner-- Visioneer PaperPort 3100b"

    On Fri, Oct 03, 2003 at 01:57:23PM +0000, stef wrote:

    > Hello,
    >
    > it is possible to succeesfully open a /dev/parport device which does not
    > have an underlying port. I'd expect to get ENODEV or ENOXIO. We can only notice
    > that the device is invalid when we claim it.
    >
    > Is it the expected behaviour ?

    No, I don't think that's intentional.

    Perhaps pp_open ought to do something like:

            port = parport_find_number (minor);
            if (!port) {
                    printk (KERN_WARNING "%s: no associated port!\n", name);
                    kfree (name);
                    return -ENXIO;
            }

    like register_device does.

    Tim.
    */



    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Fri Oct 03 2003 - 08:28:04 EDT