X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdbus-execute.c;h=9322cdfd86e8c7568a12381af64f14e243ce6bbe;hb=e06c73cc91e02a1a3dffdb0976fef754f1109e74;hp=1fd2b2133674f1cace4887fade645d16472085b7;hpb=b30e2f4c18ad81b04e4314fd191a5d458553773c;p=elogind.git diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 1fd2b2133..9322cdfd8 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -6,16 +6,16 @@ Copyright 2010 Lennart Poettering systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. systemd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with systemd; If not, see . ***/ @@ -83,14 +83,6 @@ int bus_execute_append_oom_score_adjust(DBusMessageIter *i, const char *property if (read_one_line_file("/proc/self/oom_score_adj", &t) >= 0) { safe_atoi(t, &n); free(t); - } else if (read_one_line_file("/proc/self/oom_adj", &t) >= 0) { - safe_atoi(t, &n); - free(t); - - if (n == OOM_ADJUST_MAX) - n = OOM_SCORE_ADJ_MAX; - else - n = (n * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE; } } @@ -216,7 +208,7 @@ int bus_execute_append_timer_slack_nsec(DBusMessageIter *i, const char *property assert(property); assert(c); - if (c->timer_slack_nsec_set) + if (c->timer_slack_nsec != (nsec_t) -1) u = (uint64_t) c->timer_slack_nsec; else u = (uint64_t) prctl(PR_GET_TIMERSLACK);