 memset(variable_name, 0, variable_name_size); 
efivars_init(void){	efi_status_t status = EFI_NOT_FOUND;	efi_guid_t vendor_guid;	efi_char16_t *variable_name;	struct subsys_attribute *attr;	unsigned long variable_name_size = 1024;	int i, error = 0;	if (!efi_enabled)		return -ENODEV;	variable_name = kmalloc(variable_name_size, GFP_KERNEL);	if (!variable_name) {		printk(KERN_ERR "efivars: Memory allocation failed.\n");		return -ENOMEM;	}	memset(variable_name, 0, variable_name_size);	printk(KERN_INFO "EFI Variables Facility v%s %s\n", EFIVARS_VERSION,	       EFIVARS_DATE);	/*	 * For now we'll register the efi subsys within this driver	 */	error = firmware_register(&efi_subsys);	if (error) {		printk(KERN_ERR "efivars: Firmware registration failed with error %d.\n", error);		goto out_free;	}	kset_set_kset_s(&vars_subsys, efi_subsys);	error = subsystem_register(&vars_subsys);	if (error) {		printk(KERN_ERR "efivars: Subsystem registration failed with error %d.\n", error);		goto out_firmware_unregister;	}	/*	 * Per EFI spec, the maximum storage allocated for both	 * the variable name and variable data is 1024 bytes.	 */	do {		variable_name_size = 1024;		status = efi.get_next_variable(&variable_name_size,						variable_name,						&vendor_guid);		switch (status) {		case EFI_SUCCESS:			efivar_create_sysfs_entry(variable_name_size,							variable_name,							&vendor_guid);			break;		case EFI_NOT_FOUND:			break;		default:			printk(KERN_WARNING "efivars: get_next_variable: status=%lx\n",				status);			status = EFI_NOT_FOUND;			break;		}	} while (status != EFI_NOT_FOUND);	/*	 * Now add attributes to allow creation of new vars	 * and deletion of existing ones...	 */	for (i = 0; (attr = var_subsys_attrs[i]) && !error; i++) {		if (attr->show && attr->store)			error = subsys_create_file(&vars_subsys, attr);	}	/* Don't forget the systab entry */	for (i = 0; (attr = efi_subsys_attrs[i]) && !error; i++) {		if (attr->show)			error = subsys_create_file(&efi_subsys, attr);	}	if (error)		printk(KERN_ERR "efivars: Sysfs attribute export failed with error %d.\n", error);	else		goto out_free;	subsystem_unregister(&vars_subsys);out_firmware_unregister:	firmware_unregister(&efi_subsys);out_free:	kfree(variable_name);	return error;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9c2153844d72ac92b6da0ee42f7f81fb0aa91f8a/efivars.c/clean/drivers/firmware/efivars.c