summaryrefslogtreecommitdiff
path: root/src/libs6/s6_svstatus_pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6/s6_svstatus_pack.c')
-rw-r--r--src/libs6/s6_svstatus_pack.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libs6/s6_svstatus_pack.c b/src/libs6/s6_svstatus_pack.c
index 2b1f102..cc92621 100644
--- a/src/libs6/s6_svstatus_pack.c
+++ b/src/libs6/s6_svstatus_pack.c
@@ -1,6 +1,6 @@
/* ISC license. */
-#include <skalibs/uint32.h>
+#include <skalibs/uint16.h>
#include <skalibs/uint64.h>
#include <skalibs/tai.h>
#include <s6/s6-supervise.h>
@@ -8,8 +8,13 @@
void s6_svstatus_pack (char *pack, s6_svstatus_t const *sv)
{
tain_pack(pack, &sv->stamp) ;
- uint32_pack(pack + 12, (uint32)sv->pid) ;
- pack[16] = sv->flagpaused | (sv->flagfinishing << 1) ;
- pack[17] = sv->flagwant ? sv->flagwantup ? 'u' : 'd' : 0 ;
- uint64_pack(pack + 18, (uint64)sv->wstat) ;
+ tain_pack(pack + 12, &sv->readystamp) ;
+ uint64_pack_big(pack + 24, (uint64)sv->pid) ;
+ uint16_pack_big(pack + 32, (uint16)sv->wstat) ;
+ pack[34] =
+ sv->flagpaused |
+ (sv->flagfinishing << 1) |
+ (sv->flagwant << 2) |
+ (sv->flagwantup << 3) |
+ (sv->flagready << 4) ;
}