Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
linjianshu opened this issue Sep 13, 2023 · 1 comment
Open

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

linjianshu opened this issue Sep 13, 2023 · 1 comment

Comments

@linjianshu
Copy link

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!!!
十分感谢!!!

@elezar
Copy link
Member

elezar commented Sep 13, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants