#ifdef CONFIG_PROC_FS file = create_proc_entry("poweroff_control", 0, proc_ipmi_root); if (!file) { printk(KERN_ERR PFX "Unable to create proc power control\n"); } else { file->nlink = 1; file->read_proc = proc_read_chassctrl; file->write_proc = proc_write_chassctrl; file->owner = THIS_MODULE; } #endif  
static int ipmi_poweroff_init (void){	int                   rv;	struct proc_dir_entry *file;	printk ("Copyright (C) 2004 MontaVista Software -"		" IPMI Powerdown via sys_reboot.\n");	switch (poweroff_control) {		case IPMI_CHASSIS_POWER_CYCLE:			printk(KERN_INFO PFX "Power cycle is enabled.\n");			break;		case IPMI_CHASSIS_POWER_DOWN:		default:			poweroff_control = IPMI_CHASSIS_POWER_DOWN;			break;	}	rv = ipmi_smi_watcher_register(&smi_watcher);	if (rv) {		printk(KERN_ERR PFX "Unable to register SMI watcher: %d\n", rv);		goto out_err;	}#ifdef CONFIG_PROC_FS	file = create_proc_entry("poweroff_control", 0, proc_ipmi_root);	if (!file) {		printk(KERN_ERR PFX "Unable to create proc power control\n");	} else {		file->nlink = 1;		file->read_proc = proc_read_chassctrl;		file->write_proc = proc_write_chassctrl;		file->owner = THIS_MODULE;	}#endif out_err:	return rv;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8c702e16207c70119d03df924de35f8c3629a5c4/ipmi_poweroff.c/clean/drivers/char/ipmi/ipmi_poweroff.c