if(!strcmp(str, "mmap")){ CHOOSE_MODE(printk("mmap not supported by the ubd " "driver in tt mode\n"), ubd_do_mmap = 1); return(0); }  
static int ubd_setup_common(char *str, int *index_out){	struct ubd *dev;	struct openflags flags = global_openflags;	char *backing_file;	int n, err, i;	if(index_out) *index_out = -1;	n = *str;	if(n == '='){		char *end;		int major;		str++;		if(!strcmp(str, "mmap")){			CHOOSE_MODE(printk("mmap not supported by the ubd "					   "driver in tt mode\n"),				    ubd_do_mmap = 1);			return(0);		}		if(!strcmp(str, "sync")){			global_openflags = of_sync(global_openflags);			return(0);		}		major = simple_strtoul(str, &end, 0);		if((*end != '\0') || (end == str)){			printk(KERN_ERR 			       "ubd_setup : didn't parse major number\n");			return(1);		}		err = 1; 		spin_lock(&ubd_lock); 		if(fake_major != MAJOR_NR){ 			printk(KERN_ERR "Can't assign a fake major twice\n"); 			goto out1; 		}  		fake_major = major;		printk(KERN_INFO "Setting extra ubd major number to %d\n",		       major); 		err = 0; 	out1: 		spin_unlock(&ubd_lock);		return(err);	}	n = parse_unit(&str);	if(n < 0){		printk(KERN_ERR "ubd_setup : couldn't parse unit number "		       "'%s'\n", str);		return(1);	}	if(n >= MAX_DEV){		printk(KERN_ERR "ubd_setup : index %d out of range "		       "(%d devices, from 0 to %d)\n", n, MAX_DEV, MAX_DEV - 1);		return(1);	}	err = 1;	spin_lock(&ubd_lock);	dev = &ubd_dev[n];	if(dev->file != NULL){		printk(KERN_ERR "ubd_setup : device already configured\n");		goto out;	}	if (index_out)		*index_out = n;	for (i = 0; i < 4; i++) {		switch (*str) {		case 'r':			flags.w = 0;			break;		case 's':			flags.s = 1;			break;		case 'd':			dev->no_cow = 1;			break;		case '=':			str++;			goto break_loop;		default:			printk(KERN_ERR "ubd_setup : Expected '=' or flag letter (r,s or d)\n");			goto out;		}		str++;	}        if (*str == '=')		printk(KERN_ERR "ubd_setup : Too many flags specified\n");        else		printk(KERN_ERR "ubd_setup : Expected '='\n");	goto out;break_loop:	err = 0;	backing_file = strchr(str, ',');	if (!backing_file) {		backing_file = strchr(str, ':');	}	if(backing_file){		if(dev->no_cow)			printk(KERN_ERR "Can't specify both 'd' and a "			       "cow file\n");		else {			*backing_file = '\0';			backing_file++;		}	}	dev->file = str;	dev->cow.file = backing_file;	dev->boot_openflags = flags;out:	spin_unlock(&ubd_lock);	return(err);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7b9014c1da380384efe7752db38a0253a74d0238/ubd_kern.c/buggy/arch/um/drivers/ubd_kern.c