Commit graph

44 commits

Author SHA1 Message Date
Sameeh Jubran
5dda7555c5 Installer: Abort installation if the driver fails to start
Currently, in some cases, attempting to start the driver can fail
and cause Usb devices to become non functional. An example of such
case is attemteting to install an unsigned version of UsbDk on Windows
where the driver signature enforcement is enabled. The reason why this
happens is not making sure the driver can start on the system prior to
attaching it to all of the devices.

This patch solves this issue by checking that the driver can start on the
system prior to step 2 in the list below.

UsbDk's installation process:
1) Create and register UsbDk's service
2) Add UsbDk to the registry
3) Reset all Usb host conrollers on the system
4) PNP manager attaches and starts the driver for each Usb device's stack

Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2017-05-29 16:45:38 +03:00
Dmitry Fleytman
51ca12740b UsdDkController: Clarify redirection option in the help screen
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24 18:39:59 +02:00
Dmitry Fleytman
5a05b4669c UsbDkController: Fix stop redirection text message
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-04-30 16:39:46 +03:00
Dmitry Fleytman
ec04c9a874 trivial: cleanup comments
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:38:00 +02:00
Dmitry Fleytman
456334a73f UsbDkHelper/Controller: Update persistent hide rules after modification
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:57 +02:00
Dmitry Fleytman
97cf895463 UsbDkController: Fix return values and beautifications
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:55 +02:00
Dmitry Fleytman
bccf5abebd UsbDkController: Introduce support for persistent hide rules
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:37:54 +02:00
Kirill Moizik
2516f17ed0 UsbDkController: extend -H option to receive all rule parameters
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-23 13:24:06 +02:00
Dmitry Fleytman
861f3e1860 UsbDkController: Make command line switches case sensitive
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:46 +02:00
Dmitry Fleytman
1e498506fa UsbDkController: Make usage text more aligned
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:30 +02:00
Dmitry Fleytman
74c36ae315 UsbDkController: Add -h switch for help/usage
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:30 +02:00
Dmitry Fleytman
0112e50259 UsbDkControoler: Beautify "device hidden" printout
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:29 +02:00
Dmitry Fleytman
f3085100ae UsbDkController: Fix typo in error message
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:28 +02:00
Dmitry Fleytman
f900c16c51 UsbDkController: Change command line switch for hide from -h to -H
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-26 10:04:27 +02:00
Dmitry Fleytman
c664c185ff UsbDkController: Implement hide device logic
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-17 09:13:07 +02:00
Dmitry Fleytman
6a288e3dba UsbDkController: beautify usage text
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-17 09:13:07 +02:00
Dmitry Fleytman
e389fb7924 UsbDkHelper: Introduce hider API
Signed-off-by: Kirill Moizik <kirill@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-02-17 09:13:05 +02:00
Dmitry Fleytman
35bf60e947 UsbDkController: return proper error value on failures
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-11-10 11:04:51 +02:00
Dmitry Fleytman
d0094f66a0 UsbDkController: BZ#1138233 - "UsbDkController.exe -i" fails when not called from current directory
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:52 +03:00
Dmitry Fleytman
ccb28eb69e UsbDkController: Use uniform TCHAR type
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:51 +03:00
Dmitry Fleytman
95ffc41ee8 UsbDkController: Mark internal functions static
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:49 +03:00
Dmitry Fleytman
5a94f3e505 UsbDkHelper/Controller: Beautify error messages
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 09:35:49 +03:00
Pavel Gurvich
6956b7ba35 UsbDkController: Fix message text when reboot is required on install
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-11 13:25:36 +03:00
Dmitry Fleytman
54d062775c UsbDkController: print device speed on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-29 15:47:17 +03:00
Pavel Gurvich
22b2a7d758 UsbDkController: update names of UsbDkHelper API
Prefix UsbDk_ added to API names

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:24 +03:00
Pavel Gurvich
f118d34ac5 UsbDkHelper: Cosmetics: rename ReleaseDeviceList ReleaseDevicesList
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:22 +03:00
Pavel Gurvich
a77d8161e4 UsbDk: Add license-related files and headers
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:20 +03:00
Dmitry Fleytman
527a0b774f UsbDkController: Handle start redirect return value properly
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
59f80a0f90 UsbDk: Introduce API for configuration descriptors retrieval
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
eefbd06435 UsbDk: Supply USB device descriptors on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
ec768841b5 UsbDk: Introduce UsbDkFillIDStruct helper
Just a helper function that fills USB_DK_DEVICE_ID structure
havind DeviceID and InstanceID strings provided.

Available for both user mode and kernel mode.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
b93b71ce45 UsbDk: Add port number to per-device data supplied on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
0a6379435b UsbDk: Add filter ID to per-device data supplied on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
8a0311f624 UsbDk: Make device enumeration return more generic structure
This patch makes device enumeration API return array of
device info structures instead of array of device IDs.

This change is needed to return per-device information
in addition to device ID.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Pavel Gurvich
97fdb05b36 UsbDkController: Update test application with new interface of UsbDkHelper
Update test application with new interface of UsbDkHelper

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:12 +03:00
Pavel Gurvich
cabdf800c4 UsbDk&UsbDkHelper&UsbDkController: Remove separate reset API
Reset should be part of start/stop redirection. No separate API needed

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:12 +03:00
Dmitry Fleytman
0a484ff601 UsbDkController: Commands for start/stop redirection
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
8dab75aecb UsbDkController: Beautifications
1. Debug output removed
2. Better device enumeration format

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
653ce6b4ad UsbDk: Drop ping IOCTL and children dump logic
Debugging code removed.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Pavel Gurvich
2bdf99483e UsbDkController: Add ResetDevice functionality to Controller
Add ResetDevice functionality to Controller

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Pavel Gurvich
9069176985 UsbDkController: add device enumeration to test application
Add device enumeration to UsbDkController

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
32154c09ef UsbDkControl: Introduce ping CLI
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
11503c1ca8 UsbDkController/UsbDkHelper: additional include dirs
.dll/.exe projects include files of each other,
VS projects configured as needed.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:09 +03:00
Pavel Gurvich
7abe649fbf UsbDk: Add .dll and .exe with installer logic
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:09 +03:00