if (strcmp(action, "reset") == 0) { action_val = WDOG_TIMEOUT_RESET; } else if (strcmp(action, "none") == 0) { action_val = WDOG_TIMEOUT_NONE; } else if (strcmp(action, "power_cycle") == 0) { action_val = WDOG_TIMEOUT_POWER_CYCLE; } else if (strcmp(action, "power_off") == 0) { action_val = WDOG_TIMEOUT_POWER_DOWN; } else { action_val = WDOG_TIMEOUT_RESET; 
if (action_op(action, NULL)) { action_op("reset", NULL); 
static int __init ipmi_wdog_init(void){	int rv;	if (strcmp(action, "reset") == 0) {		action_val = WDOG_TIMEOUT_RESET;	} else if (strcmp(action, "none") == 0) {		action_val = WDOG_TIMEOUT_NONE;	} else if (strcmp(action, "power_cycle") == 0) {		action_val = WDOG_TIMEOUT_POWER_CYCLE;	} else if (strcmp(action, "power_off") == 0) {		action_val = WDOG_TIMEOUT_POWER_DOWN;	} else {		action_val = WDOG_TIMEOUT_RESET;		printk(KERN_INFO PFX "Unknown action '%s', defaulting to"		       " reset\n", action);	}	if (strcmp(preaction, "pre_none") == 0) {		preaction_val = WDOG_PRETIMEOUT_NONE;	} else if (strcmp(preaction, "pre_smi") == 0) {		preaction_val = WDOG_PRETIMEOUT_SMI;#ifdef HAVE_NMI_HANDLER	} else if (strcmp(preaction, "pre_nmi") == 0) {		preaction_val = WDOG_PRETIMEOUT_NMI;#endif	} else if (strcmp(preaction, "pre_int") == 0) {		preaction_val = WDOG_PRETIMEOUT_MSG_INT;	} else {		preaction_val = WDOG_PRETIMEOUT_NONE;		printk(KERN_INFO PFX "Unknown preaction '%s', defaulting to"		       " none\n", preaction);	}	if (strcmp(preop, "preop_none") == 0) {		preop_val = WDOG_PREOP_NONE;	} else if (strcmp(preop, "preop_panic") == 0) {		preop_val = WDOG_PREOP_PANIC;	} else if (strcmp(preop, "preop_give_data") == 0) {		preop_val = WDOG_PREOP_GIVE_DATA;	} else {		preop_val = WDOG_PREOP_NONE;		printk(KERN_INFO PFX "Unknown preop '%s', defaulting to"		       " none\n", preop);	}#ifdef HAVE_NMI_HANDLER	if (preaction_val == WDOG_PRETIMEOUT_NMI) {		if (preop_val == WDOG_PREOP_GIVE_DATA) {			printk(KERN_WARNING PFX "Pretimeout op is to give data"			       " but NMI pretimeout is enabled, setting"			       " pretimeout op to none\n");			preop_val = WDOG_PREOP_NONE;		}#ifdef CONFIG_X86_LOCAL_APIC		if (nmi_watchdog == NMI_IO_APIC) {			printk(KERN_WARNING PFX "nmi_watchdog is set to IO APIC"			       " mode (value is %d), that is incompatible"			       " with using NMI in the IPMI watchdog."			       " Disabling IPMI nmi pretimeout.\n",			       nmi_watchdog);			preaction_val = WDOG_PRETIMEOUT_NONE;		} else {#endif		rv = request_nmi(&ipmi_nmi_handler);		if (rv) {			printk(KERN_WARNING PFX "Can't register nmi handler\n");			return rv;		}#ifdef CONFIG_X86_LOCAL_APIC		}#endif	}#endif	rv = ipmi_smi_watcher_register(&smi_watcher);	if (rv) {#ifdef HAVE_NMI_HANDLER		if (preaction_val == WDOG_PRETIMEOUT_NMI)			release_nmi(&ipmi_nmi_handler);#endif		printk(KERN_WARNING PFX "can't register smi watcher\n");		return rv;	}	register_reboot_notifier(&wdog_reboot_notifier);	notifier_chain_register(&panic_notifier_list, &wdog_panic_notifier);	printk(KERN_INFO PFX "driver initialized\n");	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/cc4673eecdcc4a918e4d8796295d798b5e98d602/ipmi_watchdog.c/clean/drivers/char/ipmi/ipmi_watchdog.c