From 08de8d98e90ce25e2e525cd8462ab420d82b26dc Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 8 Mar 2026 15:10:38 +0000 Subject: util/nvmutil: additional flag check on write gbe_write already checks this, but we should also check inside the caller. Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 9d2c50c9..7095246a 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -295,7 +295,7 @@ main(int argc, char *argv[]) if (errno) err(errno, "Unhandled error: will not write file: %s", fname); - else + else if (gbe_flags != O_RDONLY) write_gbe_file(); if (close(gbe_fd) == -1) -- cgit v1.2.1