summaryrefslogtreecommitdiffstats
path: root/sbin/hastd/hastd.h
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-01-28 21:56:47 +0000
committerpjd <pjd@FreeBSD.org>2011-01-28 21:56:47 +0000
commitece917399958b2153172f12dcb1b8c61f505ee4e (patch)
tree0bad2f6bf9ffc59ae6125b421c7aca5d5a33cf25 /sbin/hastd/hastd.h
parent16ad1c7c691ec891024c06a2b8ef60eef1c297d8 (diff)
downloadFreeBSD-src-ece917399958b2153172f12dcb1b8c61f505ee4e.zip
FreeBSD-src-ece917399958b2153172f12dcb1b8c61f505ee4e.tar.gz
Add function to assert that the only descriptors we have open are the ones
we expect to be open. Also assert that they point at expected type. Because openlog(3) API is unable to tell us descriptor number it is using, we have to close syslog socket, remember assert message in local buffer and if we fail on assertion, reopen syslog socket and log the message. MFC after: 1 week
Diffstat (limited to 'sbin/hastd/hastd.h')
-rw-r--r--sbin/hastd/hastd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/hastd/hastd.h b/sbin/hastd/hastd.h
index b0a4037..d23e855 100644
--- a/sbin/hastd/hastd.h
+++ b/sbin/hastd/hastd.h
@@ -44,6 +44,7 @@ extern bool sigexit_received;
extern struct pidfh *pfh;
void descriptors_cleanup(struct hast_resource *res);
+void descriptors_assert(const struct hast_resource *res, int pjdlogmode);
void hastd_primary(struct hast_resource *res);
void hastd_secondary(struct hast_resource *res, struct nv *nvin);
OpenPOWER on IntegriCloud