[PATCH] s6-rc-compile: Fix setting of flag-essential

From: Christian Hohnstaedt <christian_at_hohnstaedt.de>
Date: Thu, 3 Jun 2021 23:08:35 +0200

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
_at__at_ -368,7 +368,7 _at__at_ 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
Received on Thu Jun 03 2021 - 23:08:35 CEST

This archive was generated by hypermail 2.4.0 : Thu Jun 03 2021 - 23:10:58 CEST