Skip to content
Snippets Groups Projects
Commit 3485d165 authored by Danny Auble's avatar Danny Auble
Browse files

Change errno value

parent 9d9011cf
No related branches found
No related tags found
No related merge requests found
......@@ -261,7 +261,7 @@ enum {
ESLURM_CLUSTER_DELETED,
ESLURM_ONE_CHANGE,
ESLURM_BAD_NAME,
ESLURM_OVER_USAGE,
ESLURM_OVER_ALLOCATE,
/* plugin and custom errors */
ESLURM_MISSING_TIME_LIMIT = 8000
......
......@@ -396,8 +396,8 @@ static slurm_errtab_t slurm_errtab[] = {
"Can only change one at a time" },
{ ESLURM_BAD_NAME,
"Unacceptable name given. (No '.' in name allowed)" },
{ ESLURM_OVER_USAGE,
"Request would go over available amount of usage" },
{ ESLURM_OVER_ALLOCATE,
"You can not allocate more than 100% of a resource" },
/* plugin and custom errors */
{ ESLURM_MISSING_TIME_LIMIT,
......
......@@ -520,7 +520,7 @@ static int _add_clus_res(mysql_conn_t *mysql_conn, slurmdb_res_rec_t *res,
while ((object = list_next(itr))) {
res->percent_used += object->percent_allowed;
if (res->percent_used > 100) {
rc = ESLURM_OVER_USAGE;
rc = ESLURM_OVER_ALLOCATE;
debug3("Adding a new cluster with %u%% allowed to "
"resource %s@%s would put the usage at %u%%, "
"(which is over 100%%). Please redo your math "
......@@ -1132,7 +1132,7 @@ extern List as_mysql_modify_res(mysql_conn_t *mysql_conn, uint32_t uid,
xfree(name_char);
xfree(clus_char);
FREE_NULL_LIST(ret_list);
errno = ESLURM_OVER_USAGE;
errno = ESLURM_OVER_ALLOCATE;
return NULL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment