winebus.sys: Add initial udev stub driver.
[wine.git] / dlls / winebus.sys / bus_udev.c
blobf040e60e3e18753bfd3d221d6a5d77a7e8c42396
1 /*
2 * Plug and Play support for hid devices found through udev
4 * Copyright 2016 CodeWeavers, Aric Stewart
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "config.h"
22 #include <stdarg.h>
24 #define NONAMELESSUNION
26 #include "ntstatus.h"
27 #define WIN32_NO_STATUS
28 #include "windef.h"
29 #include "winbase.h"
30 #include "winternl.h"
31 #include "ddk/wdm.h"
32 #include "wine/debug.h"
34 #include "bus.h"
36 WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
38 #ifdef HAVE_UDEV
40 static DRIVER_OBJECT *udev_driver_obj = NULL;
42 NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path)
44 TRACE("(%p, %s)\n", driver, debugstr_w(registry_path->Buffer));
46 udev_driver_obj = driver;
47 driver->MajorFunction[IRP_MJ_PNP] = common_pnp_dispatch;
49 return STATUS_SUCCESS;
52 #else
54 NTSTATUS WINAPI udev_driver_init(DRIVER_OBJECT *driver, UNICODE_STRING *registry_path)
56 WARN("Wine was compiled without UDEV support\n");
57 return STATUS_NOT_IMPLEMENTED;
60 #endif /* HAVE_UDEV */