Am Freitag, 9. Februar 2007 23:12 schrieb Alan Stern:
> +static ssize_t
> +set_suspended(struct device *dev, struct device_attribute *attr,
> +               const char *buf, size_t count)
> +{
> +       struct usb_device *udev = to_usb_device(dev);
> +       unsigned value;
> +       int rc;
> +
> +       if (sscanf(buf, "%u", &value) != 1 || value > 1)
> +               return -EINVAL;
> +       usb_lock_device(udev);
> +       if (value)
> +               rc = usb_bus_type.suspend(dev, PMSG_SUSPEND);

Thirdly, doesn't this have security implications? You can shut down
network interfaces and swap spaces this way.

> +       else {
> +               rc = usb_autoresume_device(udev);

This seems asymmetric. Here you use an autosuspend function, while
the opposite value does a "hard" suspend.

        Regards
                Oliver

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to