/* setup_fault_attr() is a helper function for various __setup handlers, so it returns 0 on error, because that is what __setup handlers do.  */
int __init setup_fault_attr(struct fault_attr *attr, char *str)
/* setup_fault_attr() is a helper function for various __setup handlers, so it returns 0 on error, because that is what __setup handlers do.  */
int __init setup_fault_attr(struct fault_attr *attr, char *str)
{
	unsigned long probability;
	unsigned long interval;
	int times;
	int space;
	if (sscanf(str, "%lu,%lu,%d,%d",
			&interval, &probability, &space, &times) < 4) {
		printk(KERN_WARNING
			"FAULT_INJECTION: failed to parse arguments\n");
		return 0;
	}
	attr->probability = probability;
	attr->interval = interval;
	atomic_set(&attr->times, times);
	atomic_set(&attr->space, space);
	return 1;
}