Changeset 419 for trunk/tools/bootloader_tsar/boot_fat32.c
- Timestamp:
- Jan 18, 2018, 6:29:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bootloader_tsar/boot_fat32.c
r23 r419 539 539 uint32_t buffer_offset; /* Index used to write to the buffer. */ 540 540 541 /* Initializing the variables. */542 541 entry_offset = 0; 543 542 buffer_offset = 0; 544 543 545 / * Getting the file name. */544 // get the file name without suffix 546 545 while ((entry_offset < 8) && (entry[entry_offset] != ' ')) 546 { 547 547 buffer[buffer_offset++] = boot_to_lower(entry[entry_offset++]); 548 } 549 550 // set entry to first suffix character 551 entry_offset = 8; 552 553 if( entry[entry_offset] == ' ' ) // no suffix in name 554 { 555 // append the trailing NUL in buffer 556 buffer[buffer_offset] = '\0'; 557 } 558 else // there is a suffix 559 { 560 // append the '.' in buffer 561 buffer[buffer_offset++] = '.'; 562 563 // get the file extension 564 while ((entry_offset < 11) && (entry[entry_offset] != ' ')) 565 { 566 buffer[buffer_offset++] = boot_to_lower(entry[entry_offset++]); 567 } 548 568 549 /* Appending the dot to the name buffer. */ 550 buffer[buffer_offset++] = '.'; 551 552 /* Getting the file extension. */ 553 while ((entry_offset < 11) && (entry[entry_offset] != ' ')) 554 buffer[buffer_offset++] = boot_to_lower(entry[entry_offset++]); 555 556 /* Appending the trailing NUL to the buffer. */ 557 buffer[buffer_offset++] = '\0'; 569 // append the trailing NUL in buffer 570 buffer[buffer_offset] = '\0'; 571 } 558 572 559 573 } // get_name_from_short() … … 674 688 if (lfn_seq_elem_nr == 0) get_name_from_short(entry, name); 675 689 690 691 #if DEBUG_BOOT_FAT32 692 boot_printf("\n[BOOT INFO] in %s : name = %s / entry = %s \n", 693 __FUNCTION__ , name , entry ); 694 #endif 695 696 697 676 698 // check if the full name is what we are looking for. 677 699 if (boot_strcmp(name, path_comp) == 0)
Note: See TracChangeset
for help on using the changeset viewer.