summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-04 01:29:04 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-04 01:29:30 +0000
commitca98d418d5d75d82721193178e11d1edfa166649 (patch)
treef65ebaeb7ecd3b59d145dec296bf5221387c5ffd
parente28409d80b65da73cd9fa4d5564bdb8cf3b2d991 (diff)
util/nvmutil: don't usleep on file reads
i don't care. it's only 30 tries. usleep can fail, setting errno, and it can actually take longer, depending on the environment. it poisons errno, and makes debugging harder. just remove it. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/nvmutil/nvmutil.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 6cb11d55..71fe7123 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -448,9 +448,6 @@ check_read_or_die(const char *rpath, ssize_t rval, size_t rsize,
err(EINTR, "%s: max retries exceeded on file: %s",
readtype, rpath);
- /* Prevent CPU hog when on spin-locked reads. */
- usleep(1);
-
/*
* Bad read, with errno EINTR (syscall interrupted).
* Reset the error state and try again.