No functional change. We are going to reuse and improve this.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
}
cl=i->data.closure;
if (cl->type!=type) {
- cfgfatal(loc,desc,"\"%s\" is the wrong type of closure\n",name);
+ cfgfatal_cl_type(loc,desc,cl,type,name);
}
return cl->interface;
}
va_end(args);
}
+void cfgfatal_cl_type(struct cloc loc, const char *facility,
+ closure_t *cl, uint32_t exp_type, const char *name)
+{
+ assert(cl->type != exp_type);
+ cfgfatal(loc,facility,"\"%s\" is the wrong type of closure\n",name);
+}
+
void cfgfatal(struct cloc loc, cstring_t facility, const char *message, ...)
{
va_list args;
const char *message, ...))
FORMAT(printf,4,5);
+extern NORETURN(cfgfatal_cl_type(struct cloc loc, const char *facility,
+ closure_t *cl, uint32_t exp_type,
+ const char *name));
+
extern void Message(uint32_t class, const char *message, ...)
FORMAT(printf,2,3);
extern void log_from_fd(int fd, cstring_t prefix, struct log_if *log);