From b208926c260105159bdf03bf219966a341e76197 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 30 Nov 2004 16:53:59 +0000 Subject: [PATCH] windows-pioctl-debug-20041130 Output the error number and not just the text string when reporting failures from CreateFile. --- src/sys/pioctl_nt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sys/pioctl_nt.c b/src/sys/pioctl_nt.c index cd2ca487f..17a64b3a9 100644 --- a/src/sys/pioctl_nt.c +++ b/src/sys/pioctl_nt.c @@ -210,7 +210,8 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) (va_list *) NULL ) ) { - fprintf(stderr,"pioctl CreateFile(%s) failed: [%s]\r\n",tbuffer,buf); + fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%8X\r\n\t[%s]\r\n", + tbuffer,gle,buf); } } if (gle != ERROR_DOWNGRADE_DETECTED) @@ -262,7 +263,8 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) (va_list *) NULL ) ) { - fprintf(stderr,"pioctl CreateFile(%s) failed: [%s]\r\n",tbuffer,buf); + fprintf(stderr,"pioctl CreateFile(%s) failed: 0x%8X\r\n\t[%s]\r\n", + tbuffer,gle,buf); } } return -1; -- 2.39.5