diff options
Diffstat (limited to 'sys/kern/kern_rctl.c')
-rw-r--r-- | sys/kern/kern_rctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index 3d0a478..5fddbbb 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -907,7 +907,7 @@ rctl_string_to_rule(char *rulestr, struct rctl_rule **rulep) error = str2int64(amountstr, &rule->rr_amount); if (error != 0) goto out; - if (racct_is_in_thousands(rule->rr_resource)) + if (RACCT_IS_IN_THOUSANDS(rule->rr_resource)) rule->rr_amount *= 1000; } @@ -947,7 +947,7 @@ rctl_rule_add(struct rctl_rule *rule) /* * Some rules just don't make sense. Note that the one below - * cannot be rewritten using racct_is_deniable(); the RACCT_PCTCPU, + * cannot be rewritten using RACCT_IS_DENIABLE(); the RACCT_PCTCPU, * for example, is not deniable in the racct sense, but the * limit is enforced in a different way, so "deny" rules for %CPU * do make sense. @@ -958,7 +958,7 @@ rctl_rule_add(struct rctl_rule *rule) return (EOPNOTSUPP); if (rule->rr_per == RCTL_SUBJECT_TYPE_PROCESS && - racct_is_sloppy(rule->rr_resource)) + RACCT_IS_SLOPPY(rule->rr_resource)) return (EOPNOTSUPP); /* @@ -1152,7 +1152,7 @@ rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule) amount = rule->rr_amount; if (amount != RCTL_AMOUNT_UNDEFINED && - racct_is_in_thousands(rule->rr_resource)) + RACCT_IS_IN_THOUSANDS(rule->rr_resource)) amount /= 1000; sbuf_printf(sb, "%s:%s=%jd", @@ -1219,10 +1219,10 @@ rctl_racct_to_sbuf(struct racct *racct, int sloppy) sb = sbuf_new_auto(); for (i = 0; i <= RACCT_MAX; i++) { - if (sloppy == 0 && racct_is_sloppy(i)) + if (sloppy == 0 && RACCT_IS_SLOPPY(i)) continue; amount = racct->r_resources[i]; - if (racct_is_in_thousands(i)) + if (RACCT_IS_IN_THOUSANDS(i)) amount /= 1000; sbuf_printf(sb, "%s=%jd,", rctl_resource_name(i), amount); } |