// This file is part of BOINC. // http://boinc.berkeley.edu // Copyright (C) 2012 University of California // // BOINC is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any later version. // // BOINC 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 Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see . // adjust_user_priority [--no_update] --user userid --flops N --app app_name // // adjust user priority (i.e. logical start time) // to reflect a certain amount of computing // and write the new value to stdout. // For use by multi-user projects quotas. // // --no_update: don't update DB #include #include #include "util.h" #include "backend_lib.h" void usage(const char* msg="") { fprintf(stderr, "%susage: adjust_user_priority [--no_update] --user userid --flops flop_count --app app_name\n", msg ); exit(1); } int main(int argc, char** argv) { char buf[256]; bool no_update = false; int userid=0; char* app_name = NULL; double flop_count = 0; for (int i=1; i