/* Parse the binary flags from a hash table entry into the varaccess enum.  */
enum env_flags_varaccess env_flags_parse_varaccess_from_binflags(int binflags)
/* Parse the binary flags from a hash table entry into the varaccess enum.  */
enum env_flags_varaccess env_flags_parse_varaccess_from_binflags(int binflags)
{
	int i;
	for (i = 0; i < ARRAY_SIZE(env_flags_varaccess_mask); i++)
		if (env_flags_varaccess_mask[i] ==
		    (binflags & ENV_FLAGS_VARACCESS_BIN_MASK))
			return (enum env_flags_varaccess)i;
	printf("Warning: Non-standard access flags. (0x%x)\n",
		binflags & ENV_FLAGS_VARACCESS_BIN_MASK);
	return env_flags_varaccess_any;
}