From owner-p4-projects@FreeBSD.ORG Sun Feb 20 18:05:14 2011 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5EBAF106566C; Sun, 20 Feb 2011 18:05:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07C79106564A for ; Sun, 20 Feb 2011 18:05:14 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id AE2398FC12 for ; Sun, 20 Feb 2011 18:05:13 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id p1KI5DUI050853 for ; Sun, 20 Feb 2011 18:05:13 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id p1KI5DAL050850 for perforce@freebsd.org; Sun, 20 Feb 2011 18:05:13 GMT (envelope-from trasz@freebsd.org) Date: Sun, 20 Feb 2011 18:05:13 GMT Message-Id: <201102201805.p1KI5DAL050850@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 188979 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2011 18:05:14 -0000 http://p4web.freebsd.org/@@188979?ac=10 Change 188979 by trasz@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 */