/* Returns 1 if successful, -EINVAL if m is NULL, or -ENOENT if no item with a key matching item_key is found.  */
int menu_default_set(struct menu *m, char *item_key)
/* Returns 1 if successful, -EINVAL if m is NULL, or -ENOENT if no item with a key matching item_key is found.  */
int menu_default_set(struct menu *m, char *item_key)
{
	struct menu_item *item;
	if (!m)
		return -EINVAL;
	item = menu_item_by_key(m, item_key);
	if (!item)
		return -ENOENT;
	m->default_item = item;
	return 1;
}