Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155284
b: refs/heads/master
c: 8108881
h: refs/heads/master
v: v3
  • Loading branch information
Frank Munzert authored and Martin Schwidefsky committed Jul 7, 2009
1 parent 22f1a5e commit 6970a14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aeec92ca3a1d5ca96efe76988fd4df943a90300d
refs/heads/master: 81088819d588ba4d2dce3bf083fafc91974b14e0
15 changes: 9 additions & 6 deletions trunk/arch/s390/kernel/ipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ struct shutdown_action {
char *name;
void (*fn) (struct shutdown_trigger *trigger);
int (*init) (void);
int init_rc;
};

static char *ipl_type_str(enum ipl_type type)
Expand Down Expand Up @@ -1486,11 +1487,13 @@ static int set_trigger(const char *buf, struct shutdown_trigger *trigger,
int i;

for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) {
if (!shutdown_actions_list[i])
continue;
if (sysfs_streq(buf, shutdown_actions_list[i]->name)) {
trigger->action = shutdown_actions_list[i];
return len;
if (shutdown_actions_list[i]->init_rc) {
return shutdown_actions_list[i]->init_rc;
} else {
trigger->action = shutdown_actions_list[i];
return len;
}
}
}
return -EINVAL;
Expand Down Expand Up @@ -1640,8 +1643,8 @@ static void __init shutdown_actions_init(void)
for (i = 0; i < SHUTDOWN_ACTIONS_COUNT; i++) {
if (!shutdown_actions_list[i]->init)
continue;
if (shutdown_actions_list[i]->init())
shutdown_actions_list[i] = NULL;
shutdown_actions_list[i]->init_rc =
shutdown_actions_list[i]->init();
}
}

Expand Down

0 comments on commit 6970a14

Please sign in to comment.