Deleted Added
full compact
libusb10.c (208020) libusb10.c (213848)
1/* $FreeBSD: head/lib/libusb/libusb10.c 208020 2010-05-13 00:25:30Z thompsa $ */
1/* $FreeBSD: head/lib/libusb/libusb10.c 213848 2010-10-14 20:04:36Z hselasky $ */
2/*-
3 * Copyright (c) 2009 Sylvestre Gallon. All rights reserved.
4 * Copyright (c) 2009 Hans Petter Selasky. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

--- 648 unchanged lines hidden (view full) ---

658 libusb10_add_pollfd(dev->ctx, &dev->dev_poll,
659 pdev, libusb20_dev_get_fd(pdev),
660 POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM);
661
662 return (err ? LIBUSB_ERROR_OTHER : 0);
663}
664
665int
2/*-
3 * Copyright (c) 2009 Sylvestre Gallon. All rights reserved.
4 * Copyright (c) 2009 Hans Petter Selasky. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

--- 648 unchanged lines hidden (view full) ---

658 libusb10_add_pollfd(dev->ctx, &dev->dev_poll,
659 pdev, libusb20_dev_get_fd(pdev),
660 POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM);
661
662 return (err ? LIBUSB_ERROR_OTHER : 0);
663}
664
665int
666libusb_check_connected(struct libusb20_device *pdev)
667{
668 libusb_device *dev;
669 int err;
670
671 dev = libusb_get_device(pdev);
672 if (dev == NULL)
673 return (LIBUSB_ERROR_INVALID_PARAM);
674
675 err = libusb20_dev_check_connected(pdev);
676
677 return (err ? LIBUSB_ERROR_NO_DEVICE : 0);
678}
679
680int
666libusb_kernel_driver_active(struct libusb20_device *pdev, int interface)
667{
668 if (pdev == NULL)
669 return (LIBUSB_ERROR_INVALID_PARAM);
670
671 return (libusb20_dev_kernel_driver_active(
672 pdev, interface));
673}

--- 691 unchanged lines hidden ---
681libusb_kernel_driver_active(struct libusb20_device *pdev, int interface)
682{
683 if (pdev == NULL)
684 return (LIBUSB_ERROR_INVALID_PARAM);
685
686 return (libusb20_dev_kernel_driver_active(
687 pdev, interface));
688}

--- 691 unchanged lines hidden ---