/* avc_dump_av - Display an access vector in human-readable form. @tclass: target security class @av: access vector  */
static void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av)
/* avc_dump_av - Display an access vector in human-readable form. @tclass: target security class @av: access vector  */
static void avc_dump_av(struct audit_buffer *ab, u16 tclass, u32 av)
{
	const char **perms;
	int i, perm;
	if (av == 0) {
		audit_log_format(ab, " null");
		return;
	}
	perms = secclass_map[tclass-1].perms;
	audit_log_format(ab, " {");
	i = 0;
	perm = 1;
	while (i < (sizeof(av) * 8)) {
		if ((perm & av) && perms[i]) {
			audit_log_format(ab, " %s", perms[i]);
			av &= ~perm;
		}
		i++;
		perm <<= 1;
	}
	if (av)
		audit_log_format(ab, " 0x%x", av);
	audit_log_format(ab, " }");
}