From 3485d16586bf0ccbe786680ab11863bad9438b5e Mon Sep 17 00:00:00 2001
From: Danny Auble <da@schedmd.com>
Date: Mon, 24 Feb 2014 14:07:28 -0800
Subject: [PATCH] Change errno value

---
 slurm/slurm_errno.h                                      | 2 +-
 src/common/slurm_errno.c                                 | 4 ++--
 src/plugins/accounting_storage/mysql/as_mysql_resource.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/slurm/slurm_errno.h b/slurm/slurm_errno.h
index a59399d269e..883c04c4445 100644
--- a/slurm/slurm_errno.h
+++ b/slurm/slurm_errno.h
@@ -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
diff --git a/src/common/slurm_errno.c b/src/common/slurm_errno.c
index 94e44f465bc..f8551ae1258 100644
--- a/src/common/slurm_errno.c
+++ b/src/common/slurm_errno.c
@@ -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,
diff --git a/src/plugins/accounting_storage/mysql/as_mysql_resource.c b/src/plugins/accounting_storage/mysql/as_mysql_resource.c
index 2dd46d87b20..fcbe7bc8160 100644
--- a/src/plugins/accounting_storage/mysql/as_mysql_resource.c
+++ b/src/plugins/accounting_storage/mysql/as_mysql_resource.c
@@ -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;
 			}
-- 
GitLab