diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-14 18:23:52 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-14 18:23:52 +0000 |
| commit | cf5708957b8dab8d273dec4cf5de4797f9bc3879 (patch) | |
| tree | 1719ff114a74b15bd42d843e7d7bec478568de99 | |
| parent | a80c1890118ee07334fedc6567e6e229bf747970 (diff) | |
util/nvmutil: warn about gbe.bin hard links
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index ed5eef08..a10758c7 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -937,6 +937,11 @@ open_gbe_file(void) gbe_dev = gbe_st.st_dev; gbe_ino = gbe_st.st_ino; + if (gbe_st.st_nlink > 1) + fprintf(stderr, + "%s: warning: file has %lu hard links\n", + fname, (ulong)gbe_st.st_nlink); + if (gbe_st.st_nlink == 0) err(EIO, "%s: file unlinked while open", fname); |
