summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-08-12 20:02:32 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-08-12 20:02:32 +0000
commit7ad2e38bf5c0d417288d458b1fbcd69dab5c4a07 (patch)
tree5aab90fc0f2e37d62ecc7face3b38cb52be1bcb9
parent9473830ad612dcb674f6048a9a17e372ff9d9ec3 (diff)
downloads6-rc-7ad2e38bf5c0d417288d458b1fbcd69dab5c4a07.tar.xz
Would be better if git commit -a actually picked up the new files...
-rw-r--r--examples/source/devd-log/consumer-for1
-rw-r--r--examples/source/devd/pipeline-name1
-rw-r--r--examples/source/devd/producer-for1
-rw-r--r--examples/source/dns-cache-log/consumer-for1
-rw-r--r--examples/source/dns-cache/pipeline-name1
-rw-r--r--examples/source/dns-cache/producer-for1
-rw-r--r--examples/source/dns-server-tcp-4-log/consumer-for1
-rw-r--r--examples/source/dns-server-tcp-4/pipeline-name1
-rw-r--r--examples/source/dns-server-tcp-4/producer-for1
-rw-r--r--examples/source/dns-server-udp-log/consumer-for1
-rw-r--r--examples/source/dns-server-udp/pipeline-name1
-rw-r--r--examples/source/dns-server-udp/producer-for1
-rw-r--r--examples/source/fdholder-log/consumer-for1
-rw-r--r--examples/source/fdholder/pipeline-name1
-rw-r--r--examples/source/fdholder/producer-for1
-rw-r--r--examples/source/hostapd-log/consumer-for1
-rw-r--r--examples/source/hostapd/pipeline-name1
-rw-r--r--examples/source/hostapd/producer-for1
-rw-r--r--examples/source/httpd-4-log/consumer-for1
-rw-r--r--examples/source/httpd-4/pipeline-name1
-rw-r--r--examples/source/httpd-4/producer-for1
-rw-r--r--examples/source/identd-4-log/consumer-for1
-rw-r--r--examples/source/identd-4/pipeline-name1
-rw-r--r--examples/source/identd-4/producer-for1
-rw-r--r--examples/source/klogd-log/consumer-for1
-rw-r--r--examples/source/klogd-srv/pipeline-name1
-rw-r--r--examples/source/klogd-srv/producer-for1
-rw-r--r--examples/source/ntpclient-log/consumer-for1
-rw-r--r--examples/source/ntpclient/pipeline-name1
-rw-r--r--examples/source/ntpclient/producer-for1
-rw-r--r--examples/source/qmail-log/consumer-for1
-rw-r--r--examples/source/qmail/pipeline-name1
-rw-r--r--examples/source/qmail/producer-for1
-rw-r--r--examples/source/qmtpd-4-log/consumer-for1
-rw-r--r--examples/source/qmtpd-4/pipeline-name1
-rw-r--r--examples/source/qmtpd-4/producer-for1
-rw-r--r--examples/source/smtpd-4-log/consumer-for1
-rw-r--r--examples/source/smtpd-4/pipeline-name1
-rw-r--r--examples/source/smtpd-4/producer-for1
-rw-r--r--examples/source/sshd-4-log/consumer-for1
-rw-r--r--examples/source/sshd-4/pipeline-name1
-rw-r--r--examples/source/sshd-4/producer-for1
-rw-r--r--examples/source/syslogd-log/consumer-for1
-rw-r--r--examples/source/syslogd-srv/pipeline-name1
-rw-r--r--examples/source/syslogd-srv/producer-for1
-rw-r--r--examples/source/taiclockd-4-log/consumer-for1
-rw-r--r--examples/source/taiclockd-4/pipeline-name1
-rw-r--r--examples/source/taiclockd-4/producer-for1
-rw-r--r--examples/source/udhcpc-eth3-log/consumer-for1
-rw-r--r--examples/source/udhcpc-eth3/pipeline-name1
-rw-r--r--examples/source/udhcpc-eth3/producer-for1
-rw-r--r--examples/source/udhcpd-wlan0-log/consumer-for1
-rw-r--r--examples/source/udhcpd-wlan0/pipeline-name1
-rw-r--r--examples/source/udhcpd-wlan0/producer-for1
-rw-r--r--src/libs6rc/s6rc_db_check_pipelines.c48
55 files changed, 102 insertions, 0 deletions
diff --git a/examples/source/devd-log/consumer-for b/examples/source/devd-log/consumer-for
new file mode 100644
index 0000000..0b3e805
--- /dev/null
+++ b/examples/source/devd-log/consumer-for
@@ -0,0 +1 @@
+devd
diff --git a/examples/source/devd/pipeline-name b/examples/source/devd/pipeline-name
new file mode 100644
index 0000000..a40db1b
--- /dev/null
+++ b/examples/source/devd/pipeline-name
@@ -0,0 +1 @@
+devd-pipeline
diff --git a/examples/source/devd/producer-for b/examples/source/devd/producer-for
new file mode 100644
index 0000000..09c60aa
--- /dev/null
+++ b/examples/source/devd/producer-for
@@ -0,0 +1 @@
+devd-log
diff --git a/examples/source/dns-cache-log/consumer-for b/examples/source/dns-cache-log/consumer-for
new file mode 100644
index 0000000..d51d8a1
--- /dev/null
+++ b/examples/source/dns-cache-log/consumer-for
@@ -0,0 +1 @@
+dns-cache
diff --git a/examples/source/dns-cache/pipeline-name b/examples/source/dns-cache/pipeline-name
new file mode 100644
index 0000000..f7a296f
--- /dev/null
+++ b/examples/source/dns-cache/pipeline-name
@@ -0,0 +1 @@
+dns-cache-pipeline
diff --git a/examples/source/dns-cache/producer-for b/examples/source/dns-cache/producer-for
new file mode 100644
index 0000000..54ef42e
--- /dev/null
+++ b/examples/source/dns-cache/producer-for
@@ -0,0 +1 @@
+dns-cache-log
diff --git a/examples/source/dns-server-tcp-4-log/consumer-for b/examples/source/dns-server-tcp-4-log/consumer-for
new file mode 100644
index 0000000..eed0fe9
--- /dev/null
+++ b/examples/source/dns-server-tcp-4-log/consumer-for
@@ -0,0 +1 @@
+dns-server-tcp-4
diff --git a/examples/source/dns-server-tcp-4/pipeline-name b/examples/source/dns-server-tcp-4/pipeline-name
new file mode 100644
index 0000000..b07d2e6
--- /dev/null
+++ b/examples/source/dns-server-tcp-4/pipeline-name
@@ -0,0 +1 @@
+dns-server-tcp-4-pipeline
diff --git a/examples/source/dns-server-tcp-4/producer-for b/examples/source/dns-server-tcp-4/producer-for
new file mode 100644
index 0000000..d437be5
--- /dev/null
+++ b/examples/source/dns-server-tcp-4/producer-for
@@ -0,0 +1 @@
+dns-server-tcp-4-log
diff --git a/examples/source/dns-server-udp-log/consumer-for b/examples/source/dns-server-udp-log/consumer-for
new file mode 100644
index 0000000..6517ecf
--- /dev/null
+++ b/examples/source/dns-server-udp-log/consumer-for
@@ -0,0 +1 @@
+dns-server-udp
diff --git a/examples/source/dns-server-udp/pipeline-name b/examples/source/dns-server-udp/pipeline-name
new file mode 100644
index 0000000..e843883
--- /dev/null
+++ b/examples/source/dns-server-udp/pipeline-name
@@ -0,0 +1 @@
+dns-server-udp-pipeline
diff --git a/examples/source/dns-server-udp/producer-for b/examples/source/dns-server-udp/producer-for
new file mode 100644
index 0000000..81fc8f4
--- /dev/null
+++ b/examples/source/dns-server-udp/producer-for
@@ -0,0 +1 @@
+dns-server-udp-log
diff --git a/examples/source/fdholder-log/consumer-for b/examples/source/fdholder-log/consumer-for
new file mode 100644
index 0000000..c9e44ab
--- /dev/null
+++ b/examples/source/fdholder-log/consumer-for
@@ -0,0 +1 @@
+fdholder
diff --git a/examples/source/fdholder/pipeline-name b/examples/source/fdholder/pipeline-name
new file mode 100644
index 0000000..44be5e2
--- /dev/null
+++ b/examples/source/fdholder/pipeline-name
@@ -0,0 +1 @@
+fdholder-pipeline
diff --git a/examples/source/fdholder/producer-for b/examples/source/fdholder/producer-for
new file mode 100644
index 0000000..11f1ac2
--- /dev/null
+++ b/examples/source/fdholder/producer-for
@@ -0,0 +1 @@
+fdholder-log
diff --git a/examples/source/hostapd-log/consumer-for b/examples/source/hostapd-log/consumer-for
new file mode 100644
index 0000000..f86cc31
--- /dev/null
+++ b/examples/source/hostapd-log/consumer-for
@@ -0,0 +1 @@
+hostapd
diff --git a/examples/source/hostapd/pipeline-name b/examples/source/hostapd/pipeline-name
new file mode 100644
index 0000000..ce1e711
--- /dev/null
+++ b/examples/source/hostapd/pipeline-name
@@ -0,0 +1 @@
+hostapd-pipeline
diff --git a/examples/source/hostapd/producer-for b/examples/source/hostapd/producer-for
new file mode 100644
index 0000000..b6e1e02
--- /dev/null
+++ b/examples/source/hostapd/producer-for
@@ -0,0 +1 @@
+hostapd-log
diff --git a/examples/source/httpd-4-log/consumer-for b/examples/source/httpd-4-log/consumer-for
new file mode 100644
index 0000000..3dfc041
--- /dev/null
+++ b/examples/source/httpd-4-log/consumer-for
@@ -0,0 +1 @@
+httpd-4
diff --git a/examples/source/httpd-4/pipeline-name b/examples/source/httpd-4/pipeline-name
new file mode 100644
index 0000000..291f119
--- /dev/null
+++ b/examples/source/httpd-4/pipeline-name
@@ -0,0 +1 @@
+httpd-4-pipeline
diff --git a/examples/source/httpd-4/producer-for b/examples/source/httpd-4/producer-for
new file mode 100644
index 0000000..9835bc1
--- /dev/null
+++ b/examples/source/httpd-4/producer-for
@@ -0,0 +1 @@
+httpd-4-log
diff --git a/examples/source/identd-4-log/consumer-for b/examples/source/identd-4-log/consumer-for
new file mode 100644
index 0000000..f3a2772
--- /dev/null
+++ b/examples/source/identd-4-log/consumer-for
@@ -0,0 +1 @@
+identd-4
diff --git a/examples/source/identd-4/pipeline-name b/examples/source/identd-4/pipeline-name
new file mode 100644
index 0000000..72bb98e
--- /dev/null
+++ b/examples/source/identd-4/pipeline-name
@@ -0,0 +1 @@
+identd-4-pipeline
diff --git a/examples/source/identd-4/producer-for b/examples/source/identd-4/producer-for
new file mode 100644
index 0000000..7b1014d
--- /dev/null
+++ b/examples/source/identd-4/producer-for
@@ -0,0 +1 @@
+identd-4-log
diff --git a/examples/source/klogd-log/consumer-for b/examples/source/klogd-log/consumer-for
new file mode 100644
index 0000000..3a77aac
--- /dev/null
+++ b/examples/source/klogd-log/consumer-for
@@ -0,0 +1 @@
+klogd-srv
diff --git a/examples/source/klogd-srv/pipeline-name b/examples/source/klogd-srv/pipeline-name
new file mode 100644
index 0000000..6634002
--- /dev/null
+++ b/examples/source/klogd-srv/pipeline-name
@@ -0,0 +1 @@
+klogd-srv-pipeline
diff --git a/examples/source/klogd-srv/producer-for b/examples/source/klogd-srv/producer-for
new file mode 100644
index 0000000..2f21a8f
--- /dev/null
+++ b/examples/source/klogd-srv/producer-for
@@ -0,0 +1 @@
+klogd-log
diff --git a/examples/source/ntpclient-log/consumer-for b/examples/source/ntpclient-log/consumer-for
new file mode 100644
index 0000000..a0f3ade
--- /dev/null
+++ b/examples/source/ntpclient-log/consumer-for
@@ -0,0 +1 @@
+ntpclient
diff --git a/examples/source/ntpclient/pipeline-name b/examples/source/ntpclient/pipeline-name
new file mode 100644
index 0000000..f9615f1
--- /dev/null
+++ b/examples/source/ntpclient/pipeline-name
@@ -0,0 +1 @@
+ntpclient-pipeline
diff --git a/examples/source/ntpclient/producer-for b/examples/source/ntpclient/producer-for
new file mode 100644
index 0000000..c51cd0b
--- /dev/null
+++ b/examples/source/ntpclient/producer-for
@@ -0,0 +1 @@
+ntpclient-log
diff --git a/examples/source/qmail-log/consumer-for b/examples/source/qmail-log/consumer-for
new file mode 100644
index 0000000..e9c4b1e
--- /dev/null
+++ b/examples/source/qmail-log/consumer-for
@@ -0,0 +1 @@
+qmail
diff --git a/examples/source/qmail/pipeline-name b/examples/source/qmail/pipeline-name
new file mode 100644
index 0000000..2d4eee2
--- /dev/null
+++ b/examples/source/qmail/pipeline-name
@@ -0,0 +1 @@
+qmail-pipeline
diff --git a/examples/source/qmail/producer-for b/examples/source/qmail/producer-for
new file mode 100644
index 0000000..db09b5f
--- /dev/null
+++ b/examples/source/qmail/producer-for
@@ -0,0 +1 @@
+qmail-log
diff --git a/examples/source/qmtpd-4-log/consumer-for b/examples/source/qmtpd-4-log/consumer-for
new file mode 100644
index 0000000..bf4ce61
--- /dev/null
+++ b/examples/source/qmtpd-4-log/consumer-for
@@ -0,0 +1 @@
+qmtpd-4
diff --git a/examples/source/qmtpd-4/pipeline-name b/examples/source/qmtpd-4/pipeline-name
new file mode 100644
index 0000000..9bd7810
--- /dev/null
+++ b/examples/source/qmtpd-4/pipeline-name
@@ -0,0 +1 @@
+qmtpd-4-pipeline
diff --git a/examples/source/qmtpd-4/producer-for b/examples/source/qmtpd-4/producer-for
new file mode 100644
index 0000000..fbc3153
--- /dev/null
+++ b/examples/source/qmtpd-4/producer-for
@@ -0,0 +1 @@
+qmtpd-4-log
diff --git a/examples/source/smtpd-4-log/consumer-for b/examples/source/smtpd-4-log/consumer-for
new file mode 100644
index 0000000..bff8ca4
--- /dev/null
+++ b/examples/source/smtpd-4-log/consumer-for
@@ -0,0 +1 @@
+smtpd-4
diff --git a/examples/source/smtpd-4/pipeline-name b/examples/source/smtpd-4/pipeline-name
new file mode 100644
index 0000000..8cf1070
--- /dev/null
+++ b/examples/source/smtpd-4/pipeline-name
@@ -0,0 +1 @@
+smtpd-4-pipeline
diff --git a/examples/source/smtpd-4/producer-for b/examples/source/smtpd-4/producer-for
new file mode 100644
index 0000000..c6fa24d
--- /dev/null
+++ b/examples/source/smtpd-4/producer-for
@@ -0,0 +1 @@
+smtpd-4-log
diff --git a/examples/source/sshd-4-log/consumer-for b/examples/source/sshd-4-log/consumer-for
new file mode 100644
index 0000000..7d1730e
--- /dev/null
+++ b/examples/source/sshd-4-log/consumer-for
@@ -0,0 +1 @@
+sshd-4
diff --git a/examples/source/sshd-4/pipeline-name b/examples/source/sshd-4/pipeline-name
new file mode 100644
index 0000000..d46bed2
--- /dev/null
+++ b/examples/source/sshd-4/pipeline-name
@@ -0,0 +1 @@
+sshd-4-pipeline
diff --git a/examples/source/sshd-4/producer-for b/examples/source/sshd-4/producer-for
new file mode 100644
index 0000000..f103f82
--- /dev/null
+++ b/examples/source/sshd-4/producer-for
@@ -0,0 +1 @@
+sshd-4-log
diff --git a/examples/source/syslogd-log/consumer-for b/examples/source/syslogd-log/consumer-for
new file mode 100644
index 0000000..93c1661
--- /dev/null
+++ b/examples/source/syslogd-log/consumer-for
@@ -0,0 +1 @@
+syslogd-srv
diff --git a/examples/source/syslogd-srv/pipeline-name b/examples/source/syslogd-srv/pipeline-name
new file mode 100644
index 0000000..73b2e49
--- /dev/null
+++ b/examples/source/syslogd-srv/pipeline-name
@@ -0,0 +1 @@
+syslogd-srv-pipeline
diff --git a/examples/source/syslogd-srv/producer-for b/examples/source/syslogd-srv/producer-for
new file mode 100644
index 0000000..75d14f5
--- /dev/null
+++ b/examples/source/syslogd-srv/producer-for
@@ -0,0 +1 @@
+syslogd-log
diff --git a/examples/source/taiclockd-4-log/consumer-for b/examples/source/taiclockd-4-log/consumer-for
new file mode 100644
index 0000000..7684875
--- /dev/null
+++ b/examples/source/taiclockd-4-log/consumer-for
@@ -0,0 +1 @@
+taiclockd-4
diff --git a/examples/source/taiclockd-4/pipeline-name b/examples/source/taiclockd-4/pipeline-name
new file mode 100644
index 0000000..b8ef1d0
--- /dev/null
+++ b/examples/source/taiclockd-4/pipeline-name
@@ -0,0 +1 @@
+taiclockd-4-pipeline
diff --git a/examples/source/taiclockd-4/producer-for b/examples/source/taiclockd-4/producer-for
new file mode 100644
index 0000000..04d85c4
--- /dev/null
+++ b/examples/source/taiclockd-4/producer-for
@@ -0,0 +1 @@
+taiclockd-4-log
diff --git a/examples/source/udhcpc-eth3-log/consumer-for b/examples/source/udhcpc-eth3-log/consumer-for
new file mode 100644
index 0000000..6904444
--- /dev/null
+++ b/examples/source/udhcpc-eth3-log/consumer-for
@@ -0,0 +1 @@
+udhcpc-eth3
diff --git a/examples/source/udhcpc-eth3/pipeline-name b/examples/source/udhcpc-eth3/pipeline-name
new file mode 100644
index 0000000..f8bcba7
--- /dev/null
+++ b/examples/source/udhcpc-eth3/pipeline-name
@@ -0,0 +1 @@
+udhcpc-eth3-pipeline
diff --git a/examples/source/udhcpc-eth3/producer-for b/examples/source/udhcpc-eth3/producer-for
new file mode 100644
index 0000000..018297b
--- /dev/null
+++ b/examples/source/udhcpc-eth3/producer-for
@@ -0,0 +1 @@
+udhcpc-eth3-log
diff --git a/examples/source/udhcpd-wlan0-log/consumer-for b/examples/source/udhcpd-wlan0-log/consumer-for
new file mode 100644
index 0000000..d336700
--- /dev/null
+++ b/examples/source/udhcpd-wlan0-log/consumer-for
@@ -0,0 +1 @@
+udhcpd-wlan0
diff --git a/examples/source/udhcpd-wlan0/pipeline-name b/examples/source/udhcpd-wlan0/pipeline-name
new file mode 100644
index 0000000..bf20ff6
--- /dev/null
+++ b/examples/source/udhcpd-wlan0/pipeline-name
@@ -0,0 +1 @@
+udhcpd-wlan0-pipeline
diff --git a/examples/source/udhcpd-wlan0/producer-for b/examples/source/udhcpd-wlan0/producer-for
new file mode 100644
index 0000000..f5ac32a
--- /dev/null
+++ b/examples/source/udhcpd-wlan0/producer-for
@@ -0,0 +1 @@
+udhcpd-wlan0-log
diff --git a/src/libs6rc/s6rc_db_check_pipelines.c b/src/libs6rc/s6rc_db_check_pipelines.c
new file mode 100644
index 0000000..19dc141
--- /dev/null
+++ b/src/libs6rc/s6rc_db_check_pipelines.c
@@ -0,0 +1,48 @@
+/* ISC license. */
+
+#include <skalibs/uint32.h>
+#include <skalibs/diuint32.h>
+#include <skalibs/bytestr.h>
+#include <skalibs/bitarray.h>
+#include <s6-rc/s6rc-db.h>
+
+int s6rc_db_check_pipelines (s6rc_db_t const *db, diuint32 *problem)
+{
+ uint32 i = db->nlong ;
+ unsigned char black[bitarray_div8(db->nlong)] ;
+ byte_zero(black, bitarray_div8(db->nlong)) ;
+ while (i--) if (!bitarray_peek(black, i))
+ {
+ uint32 j = i ;
+ uint32 start ;
+ for (;;)
+ {
+ register uint32 k = db->services[j].x.longrun.pipeline[0] ;
+ if (k >= db->nlong) break ;
+ if (k == i || bitarray_peek(black, k))
+ {
+ problem->left = i ;
+ problem->right = k ;
+ return 1 + (k == i) ;
+ }
+ j = k ;
+ }
+ start = j ;
+ j = i ;
+ for (;;)
+ {
+ register unsigned int k = db->services[j].x.longrun.pipeline[1] ;
+ if (k >= db->nlong) break ;
+ if (k == i || bitarray_peek(black, k))
+ {
+ problem->left = i ;
+ problem->right = k ;
+ return 1 + (k == i) ;
+ }
+ j = k ;
+ }
+ for (j = start ; j > db->nlong ; j = db->services[j].x.longrun.pipeline[1])
+ bitarray_set(black, j) ;
+ }
+ return 0 ;
+}