aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2022-03-17 14:14:17 +0000
committerWarner Losh <imp@FreeBSD.org>2023-01-24 21:49:20 +0000
commit60674a0843826151cfc71b9a22ada77a6fd51d9f (patch)
tree1f91ff928e3554cb4c8731a80e46662531da863e
parent6a930269fc7667c931bafe889807c003f182dd73 (diff)
downloadsrc-60674a0843826151cfc71b9a22ada77a6fd51d9f.tar.gz
src-60674a0843826151cfc71b9a22ada77a6fd51d9f.zip
stand/usb: Fix build by declaring missing functions and types.
MFC after: 1 week Sponsored by: NVIDIA Networking (cherry picked from commit a85ff2114ccb751546f81ceb6b6d3244235363a1)
-rw-r--r--stand/kshim/bsd_kernel.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/stand/kshim/bsd_kernel.h b/stand/kshim/bsd_kernel.h
index 808b1b078db5..a5653667da53 100644
--- a/stand/kshim/bsd_kernel.h
+++ b/stand/kshim/bsd_kernel.h
@@ -366,6 +366,7 @@ struct devclass;
struct device;
struct module;
struct module_data;
+struct sbuf;
typedef struct driver driver_t;
typedef struct devclass *devclass_t;
@@ -387,6 +388,12 @@ typedef int gpio_pin_setflags_t (device_t dev, uint32_t, uint32_t);
typedef int bus_child_location_str_t (device_t parent, device_t child, char *buf, size_t buflen);
typedef int bus_child_pnpinfo_str_t (device_t parent, device_t child, char *buf, size_t buflen);
+typedef int bus_child_location_t (device_t parent, device_t child, struct sbuf *);
+typedef int bus_child_pnpinfo_t (device_t parent, device_t child, struct sbuf *);
+typedef int bus_get_device_path_t (device_t bus, device_t child, const char *locator, struct sbuf *sb);
+
+#define bus_generic_get_device_path(...) EOPNOTSUPP
+
typedef void bus_driver_added_t (device_t dev, driver_t *driver);
struct device_method {
@@ -472,7 +479,10 @@ int devclass_get_maxunit(devclass_t dc);
device_t devclass_get_device(devclass_t dc, int unit);
devclass_t devclass_find(const char *classname);
+#define BUS_LOCATOR_UEFI "UEFI"
#define bus_get_dma_tag(...) (NULL)
+#define bus_topo_lock(...) mtx_lock(&Giant)
+#define bus_topo_unlock(...) mtx_unlock(&Giant)
int bus_generic_detach(device_t dev);
int bus_generic_resume(device_t dev);
int bus_generic_shutdown(device_t dev);
@@ -517,6 +527,7 @@ int memcmp(const void *, const void *, size_t len);
int printf(const char *,...) __printflike(1, 2);
int snprintf(char *restrict str, size_t size, const char *restrict format,...) __printflike(3, 4);
size_t strlen(const char *s);
+int strcmp(const char *, const char *);
/* MALLOC API */
@@ -701,4 +712,7 @@ int bus_dmamap_load(bus_dma_tag_t, bus_dmamap_t, void *buf,
void bus_dmamap_unload(bus_dma_tag_t, bus_dmamap_t);
void bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, int flags);
+/* SBUF */
+#define sbuf_printf(...) do { } while (0)
+
#endif /* _BSD_KERNEL_H_ */