* [PATCH] s6-rc-compile: Fix setting of flag-essential
@ 2021-06-03 21:08 Christian Hohnstaedt
2021-06-03 22:10 ` Laurent Bercot
0 siblings, 1 reply; 2+ messages in thread
From: Christian Hohnstaedt @ 2021-06-03 21:08 UTC (permalink / raw)
To: supervision; +Cc: Christian Hohnstaedt
Don't set the bitposition (which is 0 for 'flag-essential')
to the flags, but the bit at the position.
---
src/s6-rc/s6-rc-compile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index 7aa37ea..c233f1a 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -368,7 +368,7 @@ static uint32_t read_flags (int dfd, char const *srcdir, char const *name)
if (errno != ENOENT)
strerr_diefu6sys(111, "read ", srcdir, "/", name, "/", files[i]) ;
}
- else flags |= i ;
+ else flags |= 1 << i ;
}
return flags ;
}
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] s6-rc-compile: Fix setting of flag-essential
2021-06-03 21:08 [PATCH] s6-rc-compile: Fix setting of flag-essential Christian Hohnstaedt
@ 2021-06-03 22:10 ` Laurent Bercot
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Bercot @ 2021-06-03 22:10 UTC (permalink / raw)
To: supervision; +Cc: Christian Hohnstaedt
>Don't set the bitposition (which is 0 for 'flag-essential')
>to the flags, but the bit at the position.
Ha, nice catch. Applied, thanks!
--
Laurent
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-03 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 21:08 [PATCH] s6-rc-compile: Fix setting of flag-essential Christian Hohnstaedt
2021-06-03 22:10 ` Laurent Bercot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).