aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c')
-rw-r--r--Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
index a1febf204..200c81ad4 100644
--- a/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
+++ b/Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
@@ -223,18 +223,9 @@ void MassStorage_Task(void)
ShowDiskReadError(PSTR("Inquiry"), (SCSICommandStatus.Status != Command_Pass), ErrorCode);
break;
}
-
- /* VendorID and ProductID are fixed-length non-null terminated strings - need to terminate them before displaying */
- char VendorID[9];
- char ProductID[17];
-
- memcpy(&VendorID, &InquiryData.VendorID, 8);
- memcpy(&ProductID, &InquiryData.ProductID, 16);
- VendorID[8] = 0x00;
- ProductID[16] = 0x00;
/* Print vendor and product names of attached device */
- printf_P(PSTR("Vendor \"%s\", Product \"%s\"\r\n"), VendorID, ProductID);
+ printf_P(PSTR("Vendor \"%.8s\", Product \"%.16s\"\r\n"), InquiryData.VendorID, InquiryData.ProductID);
/* Wait until disk ready */
puts_P(PSTR("Waiting until ready.."));