/* @key_state: receives the state of the shift, alt, control, and logo keys  */
static int analyze_modifiers(struct efi_key_state *key_state)
/* @key_state: receives the state of the shift, alt, control, and logo keys  */
static int analyze_modifiers(struct efi_key_state *key_state)
{
	int c, mod = 0, ret = 0;
	c = getc();
	if (c != ';') {
		ret = c;
		if (c == '~')
			goto out;
		c = getc();
	}
	for (;;) {
		switch (c) {
		case '0'...'9':
			mod *= 10;
			mod += c - '0';
		case ';':
			c = getc();
			break;
		default:
			goto out;
		}
	}
out:
	set_shift_mask(mod, key_state);
	if (!ret)
		ret = c;
	return ret;
}