Skip to content

Commit

Permalink
Merge pull request #80 from mysterywolf/typo
Browse files Browse the repository at this point in the history
Fix typo in sfud error messages RT-Thread/rt-thread#6927
  • Loading branch information
armink authored Feb 13, 2023
2 parents 04e2f46 + 7073eda commit e1411bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions sfud/src/sfud.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ sfud_err sfud_device_init(sfud_flash *flash) {
}
if (result == SFUD_SUCCESS) {
flash->init_ok = true;
SFUD_INFO("%s flash device is initialize success.", flash->name);
SFUD_INFO("%s flash device initialized successfully.", flash->name);
} else {
flash->init_ok = false;
SFUD_INFO("Error: %s flash device is initialize fail.", flash->name);
SFUD_INFO("Error: %s flash device initialization failed.", flash->name);
}

return result;
Expand Down Expand Up @@ -325,7 +325,7 @@ static sfud_err hardware_init(sfud_flash *flash) {

if (flash->chip.capacity == 0 || flash->chip.write_mode == 0 || flash->chip.erase_gran == 0
|| flash->chip.erase_gran_cmd == 0) {
SFUD_INFO("Warning: This flash device is not found or not support.");
SFUD_INFO("Warning: This flash device is not found or not supported.");
return SFUD_ERR_NOT_FOUND;
} else {
const char *flash_mf_name = NULL;
Expand All @@ -338,12 +338,12 @@ static sfud_err hardware_init(sfud_flash *flash) {
}
/* print manufacturer and flash chip name */
if (flash_mf_name && flash->chip.name) {
SFUD_INFO("Find a %s %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.name,
SFUD_INFO("Found a %s %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.name,
flash->chip.capacity);
} else if (flash_mf_name) {
SFUD_INFO("Find a %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.capacity);
SFUD_INFO("Found a %s flash chip. Size is %ld bytes.", flash_mf_name, flash->chip.capacity);
} else {
SFUD_INFO("Find a flash chip. Size is %ld bytes.", flash->chip.capacity);
SFUD_INFO("Found a flash chip. Size is %ld bytes.", flash->chip.capacity);
}
}

Expand Down
6 changes: 3 additions & 3 deletions sfud/src/sfud_sfdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ bool sfud_read_sfdp(sfud_flash *flash) {
if (read_sfdp_header(flash) && read_basic_header(flash, &basic_header)) {
return read_basic_table(flash, &basic_header);
} else {
SFUD_INFO("Warning: Read SFDP parameter header information failed. The %s is not support JEDEC SFDP.", flash->name);
SFUD_INFO("Warning: Read SFDP parameter header information failed. The %s does not support JEDEC SFDP.", flash->name);
return false;
}
}
Expand Down Expand Up @@ -125,7 +125,7 @@ static bool read_sfdp_header(sfud_flash *flash) {
sfdp->minor_rev = header[4];
sfdp->major_rev = header[5];
if (sfdp->major_rev > SUPPORT_MAX_SFDP_MAJOR_REV) {
SFUD_INFO("Error: This reversion(V%d.%d) SFDP is not supported.", sfdp->major_rev, sfdp->minor_rev);
SFUD_INFO("Error: This reversion(V%d.%d) of SFDP is not supported.", sfdp->major_rev, sfdp->minor_rev);
return false;
}
SFUD_DEBUG("Check SFDP header is OK. The reversion is V%d.%d, NPN is %d.", sfdp->major_rev, sfdp->minor_rev,
Expand Down Expand Up @@ -162,7 +162,7 @@ static bool read_basic_header(const sfud_flash *flash, sfdp_para_header *basic_h
basic_header->ptp = (long)header[4] | (long)header[5] << 8 | (long)header[6] << 16;
/* check JEDEC basic flash parameter header */
if (basic_header->major_rev > SUPPORT_MAX_SFDP_MAJOR_REV) {
SFUD_INFO("Error: This reversion(V%d.%d) JEDEC basic flash parameter header is not supported.",
SFUD_INFO("Error: This reversion(V%d.%d) of JEDEC basic flash parameter header is not supported.",
basic_header->major_rev, basic_header->minor_rev);
return false;
}
Expand Down

0 comments on commit e1411bb

Please sign in to comment.