X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fi386-io-windows.h;h=fd1a54e24b73e2a4664787936d75557d2eb2064d;hb=327b6e8a1660e1c937b7987fa31f972af393521b;hp=1509d7de86803252718d3f70aa11054872b841a6;hpb=de53aa4fd7777a2602882bb7d4304e0b2ad6bc6f;p=pciutils.git diff --git a/lib/i386-io-windows.h b/lib/i386-io-windows.h index 1509d7d..fd1a54e 100644 --- a/lib/i386-io-windows.h +++ b/lib/i386-io-windows.h @@ -5,7 +5,9 @@ * Copyright (c) 2006 Martin Mares * Copyright (c) 2021 Pali Rohár * - * Can be freely distributed and used under the terms of the GNU GPL. + * Can be freely distributed and used under the terms of the GNU GPL v2+ + * + * SPDX-License-Identifier: GPL-2.0-or-later */ #include @@ -1343,7 +1345,8 @@ intel_setup_io(struct pci_access *a) /* On NT-based systems issue ProcessUserModeIOPL syscall which changes IOPL to 3. */ if (!SetProcessUserModeIOPL()) { - a->warning("NT ProcessUserModeIOPL call failed with error: %lu.", (unsigned long int)GetLastError()); + DWORD error = GetLastError(); + a->debug("NT ProcessUserModeIOPL call failed: %s.", error == ERROR_INVALID_FUNCTION ? "Not Implemented" : error == ERROR_PRIVILEGE_NOT_HELD ? "Access Denied" : "Operation Failed"); return 0; }