From e4e05f78be131db9b43987c72b93a5836d7b468f Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 24 Oct 2021 17:49:20 +0000 Subject: #define open O_* flags in libsa/stand.h, so that bootblocks can use O_RDONLY rather using 0 ok beck --- sys/arch/amd64/stand/efi32/exec_i386.c | 4 ++-- sys/arch/amd64/stand/efi64/exec_i386.c | 4 ++-- sys/arch/amd64/stand/efiboot/exec_i386.c | 4 ++-- sys/arch/amd64/stand/libsa/exec_i386.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/stand/efi32/exec_i386.c b/sys/arch/amd64/stand/efi32/exec_i386.c index 7e7aa4aee14..8349d97fefb 100644 --- a/sys/arch/amd64/stand/efi32/exec_i386.c +++ b/sys/arch/amd64/stand/efi32/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.2 2019/05/11 19:14:41 mlarkin Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.3 2021/10/24 17:49:19 deraadt Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -180,7 +180,7 @@ ucode_load(void) snprintf(path, sizeof(path), "%s:/etc/firmware/intel/%02x-%02x-%02x", cmd.bootdev, family, model, stepping); - fd = open(path, 0); + fd = open(path, O_RDONLY); if (fd == -1) return; diff --git a/sys/arch/amd64/stand/efi64/exec_i386.c b/sys/arch/amd64/stand/efi64/exec_i386.c index e8e1d60e6ad..48e460cb040 100644 --- a/sys/arch/amd64/stand/efi64/exec_i386.c +++ b/sys/arch/amd64/stand/efi64/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.2 2019/05/11 19:14:41 mlarkin Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.3 2021/10/24 17:49:19 deraadt Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -179,7 +179,7 @@ ucode_load(void) snprintf(path, sizeof(path), "%s:/etc/firmware/intel/%02x-%02x-%02x", cmd.bootdev, family, model, stepping); - fd = open(path, 0); + fd = open(path, O_RDONLY); if (fd == -1) return; diff --git a/sys/arch/amd64/stand/efiboot/exec_i386.c b/sys/arch/amd64/stand/efiboot/exec_i386.c index 56afe729c82..ea8fa67820b 100644 --- a/sys/arch/amd64/stand/efiboot/exec_i386.c +++ b/sys/arch/amd64/stand/efiboot/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.6 2021/06/07 00:04:20 krw Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.7 2021/10/24 17:49:19 deraadt Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -203,7 +203,7 @@ ucode_load(void) snprintf(path, sizeof(path), "%s:/etc/firmware/intel/%02x-%02x-%02x", cmd.bootdev, family, model, stepping); - fd = open(path, 0); + fd = open(path, O_RDONLY); if (fd == -1) return; diff --git a/sys/arch/amd64/stand/libsa/exec_i386.c b/sys/arch/amd64/stand/libsa/exec_i386.c index 6f66392ffe0..22067931829 100644 --- a/sys/arch/amd64/stand/libsa/exec_i386.c +++ b/sys/arch/amd64/stand/libsa/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.34 2021/06/05 13:32:52 deraadt Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.35 2021/10/24 17:49:19 deraadt Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -217,7 +217,7 @@ ucode_load(void) snprintf(path, sizeof(path), "%s:/etc/firmware/intel/%02x-%02x-%02x", cmd.bootdev, family, model, stepping); - fd = open(path, 0); + fd = open(path, O_RDONLY); if (fd == -1) return; -- cgit v1.2.3