PERFORCE change 188979 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Sun Feb 20 18:05:14 UTC 2011
http://p4web.freebsd.org/@@188979?ac=10
Change 188979 by trasz at trasz_victim on 2011/02/20 18:04:39
Improve errno usage.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#35 edit
Differences ...
==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_rctl.c#35 (text+ko) ====
@@ -937,11 +937,11 @@
if (rule->rr_action == RCTL_ACTION_DENY &&
(rule->rr_resource == RUSAGE_CPU ||
rule->rr_resource == RUSAGE_WALLCLOCK))
- return (EINVAL);
+ return (EOPNOTSUPP);
if (rule->rr_per == RCTL_SUBJECT_TYPE_PROCESS &&
rusage_is_sloppy(rule->rr_resource))
- return (EINVAL);
+ return (EOPNOTSUPP);
/*
* Make sure there are no duplicated rules. Also, for the "deny"
@@ -963,7 +963,7 @@
* No resource limits for system processes.
*/
if (p->p_flag & P_SYSTEM)
- return (EINVAL);
+ return (EPERM);
rctl_container_add_rule(p->p_container, rule);
/*
@@ -1783,35 +1783,35 @@
rctl_get_usage(struct thread *td, struct rctl_get_usage_args *uap)
{
- return (EOPNOTSUPP);
+ return (ENOSYS);
}
int
rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap)
{
- return (EOPNOTSUPP);
+ return (ENOSYS);
}
int
rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap)
{
- return (EOPNOTSUPP);
+ return (ENOSYS);
}
int
rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap)
{
- return (EOPNOTSUPP);
+ return (ENOSYS);
}
int
rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap)
{
- return (EOPNOTSUPP);
+ return (ENOSYS);
}
#endif /* !RCTL */
More information about the p4-projects
mailing list