depot/third_party/nixpkgs/pkgs/by-name/li/libnvidia-container/modprobe.patch
Default email 24fdeddc0a Project import generated by Copybara.
GitOrigin-RevId: 2768c7d042a37de65bb1b5b3268fc987e534c49d
2024-10-23 09:41:50 +03:00

30 lines
1.8 KiB
Diff

diff -ruN nvidia-modprobe-@modprobeVersion@/modprobe-utils/nvidia-modprobe-utils.c nvidia-modprobe-@modprobeVersion@/modprobe-utils/nvidia-modprobe-utils.c
--- nvidia-modprobe-@modprobeVersion@/modprobe-utils/nvidia-modprobe-utils.c 2021-11-13 14:36:58.096684602 +0000
+++ nvidia-modprobe-@modprobeVersion@-patched/modprobe-utils/nvidia-modprobe-utils.c 2021-11-13 14:43:40.965146390 +0000
@@ -959,10 +959,10 @@
return mknod_helper(major, minor_num, vgpu_dev_name, NV_PROC_REGISTRY_PATH);
}
-static int nvidia_cap_get_device_file_attrs(const char* cap_file_path,
- int *major,
- int *minor,
- char *name)
+int nvidia_cap_get_device_file_attrs(const char* cap_file_path,
+ int *major,
+ int *minor,
+ char *name)
{
char field[32];
FILE *fp;
diff -ruN nvidia-modprobe-@modprobeVersion@/modprobe-utils/nvidia-modprobe-utils.h nvidia-modprobe-@modprobeVersion@/modprobe-utils/nvidia-modprobe-utils.h
--- nvidia-modprobe-@modprobeVersion@/modprobe-utils/nvidia-modprobe-utils.h 2021-11-13 14:36:58.096684602 +0000
+++ nvidia-modprobe-@modprobeVersion@-patched/modprobe-utils/nvidia-modprobe-utils.h 2021-11-13 14:38:34.078700961 +0000
@@ -87,6 +87,7 @@
int nvidia_nvswitch_get_file_state(int minor);
int nvidia_cap_mknod(const char* cap_file_path, int *minor);
int nvidia_cap_get_file_state(const char* cap_file_path);
+int nvidia_cap_get_device_file_attrs(const char* cap_file_path, int *major, int *minor, char *name);
int nvidia_cap_imex_channel_mknod(int minor);
int nvidia_cap_imex_channel_file_state(int minor);
int nvidia_get_chardev_major(const char *name);
int nvidia_msr_modprobe(void);