mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
nvmutil: use O_CLOEXEC on gbe files
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -300,6 +300,10 @@ typedef char static_assert_off_t_is_32[(sizeof(off_t) >= 4) ? 1 : -1];
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 0
|
||||
#endif
|
||||
|
||||
#ifndef O_NOFOLLOW
|
||||
#define O_NOFOLLOW 0
|
||||
#endif
|
||||
@@ -979,7 +983,8 @@ open_gbe_file(void)
|
||||
int flags;
|
||||
|
||||
xopen(&gbe_fd, fname,
|
||||
command[cmd_index].flags | O_BINARY | O_NOFOLLOW, &gbe_st);
|
||||
command[cmd_index].flags | O_BINARY |
|
||||
O_NOFOLLOW | O_CLOEXEC, &gbe_st);
|
||||
|
||||
/* inode will be checked later on write */
|
||||
gbe_dev = gbe_st.st_dev;
|
||||
|
||||
Reference in New Issue
Block a user