FreeBSD/usr.sbin/jail/jail.c
/*
 * Print a message including an optional jail name.
 */
Print a message including an optional jail name.
Print a message including an optional jail name .
void
jail_note(const struct cfjail *j, const char *fmt, ...)
{
	va_list ap, tap;
	char *cs;
	size_t len;
	va_start(ap, fmt);
	va_copy(tap, ap);
	len = vsnprintf(NULL, 0, fmt, tap);
	va_end(tap);
	cs = alloca(len + 1);
	(void)vsnprintf(cs, len + 1, fmt, ap);
	va_end(ap);
	if (j->name)
		printf("%s: %s", j->name, cs);
	else
		printf("%s", cs);
}
void jail_note ( const struct cfjail * j , const char * fmt , ... ) { va_list ap , tap ; char * cs ; size_t len ; va_start ( ap , fmt ) ; va_copy ( tap , ap ) ; len = vsnprintf ( NULL , 0 , fmt , tap ) ; va_end ( tap ) ; cs = alloca ( len + 1 ) ; ( void ) vsnprintf ( cs , len + 1 , fmt , ap ) ; va_end ( ap ) ; if ( j -> name ) printf ( " " , j -> name , cs ) ; else printf ( " " , cs ) ; }
Print a message including an optional jail name.
Print a message including an optional jail name .