Lines Matching refs:device
21 static char *libxl__device_frontend_path(libxl__gc *gc, libxl__device *device) in libxl__device_frontend_path() argument
23 char *dom_path = libxl__xs_get_dompath(gc, device->domid); in libxl__device_frontend_path()
26 if (device->kind == LIBXL__DEVICE_KIND_CONSOLE && device->devid == 0) in libxl__device_frontend_path()
28 libxl__device_kind_to_string(device->kind)); in libxl__device_frontend_path()
30 if (device->kind == LIBXL__DEVICE_KIND_VUART) in libxl__device_frontend_path()
32 libxl__device_kind_to_string(device->kind), in libxl__device_frontend_path()
33 device->devid); in libxl__device_frontend_path()
36 libxl__device_kind_to_string(device->kind), in libxl__device_frontend_path()
37 device->devid); in libxl__device_frontend_path()
49 char *libxl__device_backend_path(libxl__gc *gc, libxl__device *device) in libxl__device_backend_path() argument
51 char *dom_path = libxl__xs_get_dompath(gc, device->backend_domid); in libxl__device_backend_path()
54 libxl__device_kind_to_string(device->backend_kind), in libxl__device_backend_path()
55 device->domid, device->devid); in libxl__device_backend_path()
69 char *libxl__device_libxl_path(libxl__gc *gc, libxl__device *device) in libxl__device_libxl_path() argument
71 char *libxl_dom_path = libxl__xs_libxl_path(gc, device->domid); in libxl__device_libxl_path()
74 libxl__device_kind_to_string(device->kind), in libxl__device_libxl_path()
75 device->devid); in libxl__device_libxl_path()
89 libxl__device *device) in libxl__device_exists() argument
92 char *be_path = libxl__device_libxl_path(gc, device); in libxl__device_exists()
149 libxl__device *device, char **bents, char **fents, char **ro_fents) in libxl__device_generic_add() argument
157 int libxl_only = device->backend_kind == LIBXL__DEVICE_KIND_NONE; in libxl__device_generic_add()
164 frontend_path = libxl__device_frontend_path(gc, device); in libxl__device_generic_add()
165 backend_path = libxl__device_backend_path(gc, device); in libxl__device_generic_add()
167 libxl_path = libxl__device_libxl_path(gc, device); in libxl__device_generic_add()
169 frontend_perms[0].id = device->domid; in libxl__device_generic_add()
171 frontend_perms[1].id = device->backend_domid; in libxl__device_generic_add()
174 ro_frontend_perms[0].id = backend_perms[0].id = device->backend_domid; in libxl__device_generic_add()
176 ro_frontend_perms[1].id = backend_perms[1].id = device->domid; in libxl__device_generic_add()
208 if ((device->kind == LIBXL__DEVICE_KIND_CONSOLE && device->devid == 0) || in libxl__device_generic_add()
209 (device->kind == LIBXL__DEVICE_KIND_VUART)) in libxl__device_generic_add()
270 LOGED(ERROR, device->domid, "xs transaction failed"); in libxl__device_generic_add()
1420 libxl__device_kind device) in libxl__device_nextid() argument
1431 libxl__device_kind_to_string(device)), &nb); in libxl__device_nextid()
1849 libxl__device *device; in libxl__device_add_async() local
1876 GCNEW(device); in libxl__device_add_async()
1877 rc = dt->to_device(gc, domid, type, device); in libxl__device_add_async()
1906 GCSPRINTF("%d", device->backend_domid)); in libxl__device_add_async()
1917 rc = libxl__device_exists(gc, t, device); in libxl__device_add_async()
1931 libxl__device_generic_add(gc, t, device, in libxl__device_add_async()
1941 aodev->dev = device; in libxl__device_add_async()
1962 libxl__device *device; in libxl__device_add() local
1975 GCNEW(device); in libxl__device_add()
1976 rc = dt->to_device(gc, domid, type, device); in libxl__device_add()
1988 libxl__sprintf(gc, "%d", device->backend_domid)); in libxl__device_add()
1995 rc = libxl__device_generic_add(gc, XBT_NULL, device, in libxl__device_add()