Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/34848 )
Change subject: linux_spi: Use fgets() to read buffer size
......................................................................
linux_spi: Use fgets() to read buffer size
Since fread() returns the number of bytes read, this currently will only
check for errors if it returns 0 (i.e. the file was empty). However, it
is possible for fread() to encounter an error after reading a few bytes,
which this doesn't catch. Fix this by using fgets() instead, which will
return NULL if EOF or an error is encountered, and is simpler anyway.
Change-Id: I4f37c70e97149b87c6344e63a57d11ddde7638c4
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Found-by: Coverity CID 1403824
---
M linux_spi.c
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/48/34848/1
diff --git a/linux_spi.c b/linux_spi.c
index de09e60..e3d7486 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -137,8 +137,7 @@
}
char buf[10];
- memset(buf, 0, sizeof(buf));
- if (!fread(buf, 1, sizeof(buf) - 1, fp)) {
+ if (!fgets(buf, sizeof(buf), fp)) {
if (feof(fp))
msg_pwarn("Cannot read %s: file is empty.\n", BUF_SIZE_FROM_SYSFS);
else
--
To view, visit https://review.coreboot.org/c/flashrom/+/34848
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4f37c70e97149b87c6344e63a57d11ddde7638c4
Gerrit-Change-Number: 34848
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/34849 )
Change subject: print: Fix vendor string memory leak
......................................................................
print: Fix vendor string memory leak
Freeing this string won't really matter in the incredible case that we
run out of memory, but it keeps Coverity happy.
Change-Id: I962d2f2227850473b70272bc48b3fc0a0fb11342
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Found-by: Coverity CID 1403822
---
M print.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/49/34849/1
diff --git a/print.c b/print.c
index 2901c50..91e5ae5 100644
--- a/print.c
+++ b/print.c
@@ -184,6 +184,7 @@
dev = malloc(strlen(chip->name) + 1);
if (dev == NULL) {
msg_gerr("Out of memory!\n");
+ free(ven);
return 1;
}
strcpy(dev, chip->name);
--
To view, visit https://review.coreboot.org/c/flashrom/+/34849
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I962d2f2227850473b70272bc48b3fc0a0fb11342
Gerrit-Change-Number: 34849
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/34847 )
Change subject: linux_mtd: Fix param memory leak
......................................................................
linux_mtd: Fix param memory leak
extract_programmer_param() stores allocated memory in param, so make
sure it is freed at the end of the function.
Change-Id: I363e66b49c1ed4034ac058b94a938c8bb197e048
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Found-by: Coverity CID 1403823
---
M linux_mtd.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/47/34847/1
diff --git a/linux_mtd.c b/linux_mtd.c
index ae8bef2..d2df95e 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -404,5 +404,6 @@
ret = 0;
linux_mtd_init_exit:
+ free(param);
return ret;
}
--
To view, visit https://review.coreboot.org/c/flashrom/+/34847
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I363e66b49c1ed4034ac058b94a938c8bb197e048
Gerrit-Change-Number: 34847
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Hello David Hendricks,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/flashrom/+/34689
to review the following change.
Change subject: use JEDEC_SE as the default sector erase opcode for ICH southbridge
......................................................................
use JEDEC_SE as the default sector erase opcode for ICH southbridge
Note: We should definitely look into on-the-fly opcode reprogramming
as the comment in ich_spi_send_multicommand() suggests.
Review URL: http://codereview.chromium.org/3239001
Change-Id: I379549e8fa966e75e3d8b7932700df62cf50df64
Signed-off-by: Mayur Panchal <panchalm(a)google.com>
---
M ichspi.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/89/34689/1
diff --git a/ichspi.c b/ichspi.c
index 8b8f0f6..fc61262 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -324,7 +324,7 @@
{
{JEDEC_BYTE_PROGRAM, SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS, 0}, // Write Byte
{JEDEC_READ, SPI_OPCODE_TYPE_READ_WITH_ADDRESS, 0}, // Read Data
- {JEDEC_BE_D8, SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS, 0}, // Erase Sector
+ {JEDEC_SE, SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS, 0}, // Erase Sector
{JEDEC_RDSR, SPI_OPCODE_TYPE_READ_NO_ADDRESS, 0}, // Read Device Status Reg
{JEDEC_REMS, SPI_OPCODE_TYPE_READ_WITH_ADDRESS, 0}, // Read Electronic Manufacturer Signature
{JEDEC_WRSR, SPI_OPCODE_TYPE_WRITE_NO_ADDRESS, 0}, // Write Status Register
--
To view, visit https://review.coreboot.org/c/flashrom/+/34689
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I379549e8fa966e75e3d8b7932700df62cf50df64
Gerrit-Change-Number: 34689
Gerrit-PatchSet: 1
Gerrit-Owner: Mayur Panchal <panchalm(a)google.com>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-MessageType: newchange
Mario Limonciello has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/35559 )
Change subject: meson.build: bump version to 1.2
......................................................................
meson.build: bump version to 1.2
This is so that generated pkg-config will be updated as well and other
projects (such as fwupd) can set a minimum version of the library to work
with.
It should have been updated to 1.1 at 93066002 as well, but oh well.
Change-Id: Ie221d14c84b044a691cfaa012e0cf735590fab9c
Signed-off-by: Mario Limonciello <mario.limonciello(a)dell.com>
---
M meson.build
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/59/35559/1
diff --git a/meson.build b/meson.build
index e1b6c16..6744ab4 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('flashromutils', 'c',
- version : '1.0',
+ version : '1.2',
license : 'GPL-2.0+',
meson_version : '>=0.47.0',
default_options : ['warning_level=2', 'c_std=c99'],
--
To view, visit https://review.coreboot.org/c/flashrom/+/35559
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie221d14c84b044a691cfaa012e0cf735590fab9c
Gerrit-Change-Number: 35559
Gerrit-PatchSet: 1
Gerrit-Owner: Mario Limonciello <superm1(a)gmail.com>
Gerrit-MessageType: newchange
Alan Green has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/35535 )
Change subject: flashchips.c: Mark W25Q40EW as TESTED_PREW
......................................................................
flashchips.c: Mark W25Q40EW as TESTED_PREW
Mark Winbond W25Q40EW as TESTED_PREW.
The Winbond W25Q40EW has been marked TESTED_PREW in the ChromiumOS
repository. ChromiumOS has the same defintion for this chip as this
repo, except that ChromiumOS does not have FEATURE_OTP.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: I4be5b2e1069a3f735f0dc6ec92d5f4c8946fbb02
---
M flashchips.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/35/35535/1
diff --git a/flashchips.c b/flashchips.c
index 0502b86..7635942 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -16231,7 +16231,7 @@
.page_size = 256,
/* OTP: 3*256B total; read 0x48; write 0x42, erase 0x44, read ID 0x4B */
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
- .tested = TEST_UNTESTED,
+ .tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
.block_erasers =
--
To view, visit https://review.coreboot.org/c/flashrom/+/35535
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4be5b2e1069a3f735f0dc6ec92d5f4c8946fbb02
Gerrit-Change-Number: 35535
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-MessageType: newchange
Alan Green has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/35092 )
Change subject: flashchips.c: EN29F002(A)(N)B tested +EW
......................................................................
flashchips.c: EN29F002(A)(N)B tested +EW
Mark EN29F002(A)(N)B as tested for erase and write. This chip was marked
tested in the Chromium (downstream) repo change
98d917cfba55b68516cdf64c754d2f36c8c26722 "Add a bunch of new/tested
stuff and various small changes 8"
TEST=Build and run flashrom -L
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: Idd26187905f389fc858eea5b13915af88e40afe9
---
M flashchips.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/92/35092/1
diff --git a/flashchips.c b/flashchips.c
index f84f1cc..3994c93 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -5398,7 +5398,7 @@
.total_size = 256,
.page_size = 256,
.feature_bits = FEATURE_ADDR_AAA | FEATURE_EITHER_RESET,
- .tested = TEST_OK_PR,
+ .tested = TEST_OK_PREW,
.probe = probe_jedec,
.probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
.block_erasers =
--
To view, visit https://review.coreboot.org/c/flashrom/+/35092
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Idd26187905f389fc858eea5b13915af88e40afe9
Gerrit-Change-Number: 35092
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-MessageType: newchange