NVIDIA / libnvidia-container

NVIDIA container runtime library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何修改drv->devs->path的路径

linjianshu opened this issue · comments

I can see how ‘drv‘ is initialized in configure. c, but I am not aware of the specific implementation details. May I ask if this structure dynamically allocates memory?

在configure.c中 我可以看到drv如何初始化 但具体实现细节我并不知晓 请问该结构体是动态分配内存吗?
/* Query the driver and device information. */
if (perm_set_capabilities(&err, CAP_EFFECTIVE, ecaps[NVC_INFO], ecaps_size(NVC_INFO)) < 0) {
warnx("permission error: %s", err.msg);
goto fail;
}
if ((drv = libnvc.driver_info_new(nvc, NULL)) == NULL ||
(dev = libnvc.device_info_new(nvc, NULL)) == NULL) {
warnx("detection error: %s", libnvc.error(nvc));
goto fail;
}

I would like to try modifying the path parameters of drv ->dev ->path
我想尝试修改drv->devs->path的路径参数

thanks!!!
十分感谢!!!

@linjianshu may I ask what the end goal is in this case? There may be alternatives such as using the Container Device Interface (CDI) to do achieve these.