5 |
* |
* |
6 |
* Copyright (C) 2005-2007 NTT DATA CORPORATION |
* Copyright (C) 2005-2007 NTT DATA CORPORATION |
7 |
* |
* |
8 |
* Version: 1.5.0 2007/09/20 |
* Version: 1.5.1-pre 2007/10/16 |
9 |
* |
* |
10 |
* This file is applicable to both 2.4.30 and 2.6.11 and later. |
* This file is applicable to both 2.4.30 and 2.6.11 and later. |
11 |
* See README.ccs for ChangeLog. |
* See README.ccs for ChangeLog. |
140 |
} |
} |
141 |
EXPORT_SYMBOL(CheckSignalACL); |
EXPORT_SYMBOL(CheckSignalACL); |
142 |
|
|
143 |
int AddSignalPolicy(char *data, struct domain_info *domain, const u8 is_delete) |
int AddSignalPolicy(char *data, struct domain_info *domain, const struct condition_list *condition, const u8 is_delete) |
144 |
{ |
{ |
145 |
int sig; |
int sig; |
146 |
char *domainname = strchr(data, ' '); |
char *domainname = strchr(data, ' '); |
147 |
if (sscanf(data, "%d", &sig) == 1 && domainname && IsDomainDef(domainname + 1)) { |
if (sscanf(data, "%d", &sig) == 1 && domainname && IsDomainDef(domainname + 1)) { |
|
const struct condition_list *condition = NULL; |
|
|
const char *cp = FindConditionPart(domainname + 1); |
|
|
if (cp && (condition = FindOrAssignNewCondition(cp)) == NULL) return -EINVAL; |
|
148 |
return AddSignalEntry(sig, domainname + 1, domain, condition, is_delete); |
return AddSignalEntry(sig, domainname + 1, domain, condition, is_delete); |
149 |
} |
} |
150 |
return -EINVAL; |
return -EINVAL; |