diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2024-08-08 13:59:12 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2024-08-08 13:59:12 +0000 |
commit | 709fe4964704234d5e52a692d628fad98a8f4fbb (patch) | |
tree | 321ea44ba1f0f281dd7a9fca6438a1062c343dc2 /sys/arch/powerpc64 | |
parent | d41f694d687d4b9b9ab427da44d99c19d0ba5d4e (diff) |
Prevent spurious "/bsd.upgrade is not u+x" message when the file is missing.
ok kn@
Diffstat (limited to 'sys/arch/powerpc64')
-rw-r--r-- | sys/arch/powerpc64/stand/rdboot/cmd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/powerpc64/stand/rdboot/cmd.c b/sys/arch/powerpc64/stand/rdboot/cmd.c index 21f326a2dde..1172a1446b2 100644 --- a/sys/arch/powerpc64/stand/rdboot/cmd.c +++ b/sys/arch/powerpc64/stand/rdboot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.2 2023/10/20 19:58:16 kn Exp $ */ +/* $OpenBSD: cmd.c,v 1.3 2024/08/08 13:59:11 miod Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -499,11 +499,12 @@ upgrade(void) path = disk_open(qualify("/bsd.upgrade")); if (path == NULL) return 0; - if (stat(path, &sb) == 0 && S_ISREG(sb.st_mode)) + if (stat(path, &sb) == 0 && S_ISREG(sb.st_mode)) { ret = 1; - if ((sb.st_mode & S_IXUSR) == 0) { - printf("/bsd.upgrade is not u+x\n"); - ret = 0; + if ((sb.st_mode & S_IXUSR) == 0) { + printf("/bsd.upgrade is not u+x\n"); + ret = 0; + } } disk_close(); |