Beispiel #1
0
static int fip_info_write_proc(struct file *file, const char __user *buffer, unsigned long count, void *data)
{
	int i;
	unsigned long cnt;
	const char *ptr = buffer, *end = buffer + count;

	memset(fip_keys, 0, INPUT_TABLE_SIZE);
	fip_key_cnt = 0;

	/* Parse the values */
	for (cnt = i = 0; (i < INPUT_TABLE_SIZE/sizeof(unsigned long)) && (cnt < count); i++) {
		for (; (!isdigit(*ptr)) && (ptr < end); ptr++);  /* skip leading unwanted stuff */
		if (ptr >= end)
			break; /* no more */
		else if ((*ptr == '0') && (__toupper(*(ptr + 1)) == 'X')) 
			ptr = hex2string(&fip_keys[i], ptr + 2);
		else
			ptr = dec2string(&fip_keys[i], ptr);
	}
	fip_key_cnt = i;
	return(count);
}
Beispiel #2
0
void exception_handler(unsigned int code)
{
	puts("\n"); puts(dec2string(code)); puts(exceptions[code]);
	hlt();
}