From 8c0c90112e8f9a289ecc10a07a1042be2f700db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 13 Oct 2018 19:57:24 +0200 Subject: [PATCH] [FASTFAT] Don't mess my debug log when partition SysType is printed! (when invalid chars are printed) --- drivers/filesystems/fastfat/fsctl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/filesystems/fastfat/fsctl.c b/drivers/filesystems/fastfat/fsctl.c index b7e576d2d83..6523487368c 100644 --- a/drivers/filesystems/fastfat/fsctl.c +++ b/drivers/filesystems/fastfat/fsctl.c @@ -280,8 +280,14 @@ VfatHasFileSystem( BootFatX->SysType[2] != 'T' || BootFatX->SysType[3] != 'X') { - DPRINT1("SysType %c%c%c%c\n", BootFatX->SysType[0], BootFatX->SysType[1], BootFatX->SysType[2], BootFatX->SysType[3]); - *RecognizedFS=FALSE; + DPRINT1("SysType %02X%02X%02X%02X (%c%c%c%c)\n", + BootFatX->SysType[0], BootFatX->SysType[1], BootFatX->SysType[2], BootFatX->SysType[3], + isprint(BootFatX->SysType[0]) ? BootFatX->SysType[0] : '.', + isprint(BootFatX->SysType[1]) ? BootFatX->SysType[1] : '.', + isprint(BootFatX->SysType[2]) ? BootFatX->SysType[2] : '.', + isprint(BootFatX->SysType[3]) ? BootFatX->SysType[3] : '.'); + + *RecognizedFS = FALSE; } if (*RecognizedFS &&