]> mj.ucw.cz Git - pciutils.git/commit
libpci: windows: Handle long paths generated by GetModuleFileName()
authorPali Rohár <pali@kernel.org>
Fri, 18 Nov 2022 22:40:39 +0000 (23:40 +0100)
committerPali Rohár <pali@kernel.org>
Fri, 18 Nov 2022 22:40:39 +0000 (23:40 +0100)
commit64d7bab6f27418199d244481664255b24c7ffc20
treeb73faf65e3e8bebdd8a8e411d43a3972d56387ee
parent6cf9052e88e23902a6fd1e6dcb8f07145383501c
libpci: windows: Handle long paths generated by GetModuleFileName()

C function fopen() implemented by msvcrt.dll requires special prefix
"\\\\?\\" for paths longer than 260 bytes. Because GetModuleFileName()
returns absolute path, it may be longer than 260 bytes. Add fixup to handle
long paths.
lib/init.c