[prev in list] [next in list] [prev in thread] [next in thread]
List: grid-engine-cvs
Subject: CVS update: MODIFIED: classic, read_write_queue.c
From: ernst () sunsource ! net
Date: 2003-08-25 13:16:04
Message-ID: 20030825131604.27845.qmail () s005 ! sfo ! collab ! net
[Download RAW message or body]
User: ernst
Date: 03/08/25 06:16:04
Modified: source/libs/spool/classic read_write_cqueue.c
read_write_queue.c
Log:
EB-2003-08-25-0: Enhancem.: Added CQ parameter
Revision Changes Path
1.1050 +2 -0 gridengine/Changelog
http://gridengine.sunsource.net/source/browse/gridengine/Changelog.diff?r1=1.1049&r2=1.1050
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Changelog
===================================================================
RCS file: /cvs/gridengine/Changelog,v
retrieving revision 1.1049
retrieving revision 1.1050
diff -u -b -r1.1049 -r1.1050
--- Changelog 2003/08/20 09:02:40 1.1049
+++ Changelog 2003/08/25 13:16:00 1.1050
@@ -1,3 +1,5 @@
+EB-2003-08-25-0: Enhancem.: Added CQ parameter
+
SG-2003-08-20-0: Bugfix: fixed the build
EB-2003-08-19-0: Enhancem.: Added CQ parameter
1.3 +77 -0 gridengine/source/daemons/qmaster/sge_cqueue_qmaster.c
http://gridengine.sunsource.net/source/browse/gridengine/source/daemons/qmaster/sge_cqueue_qmaster.c.diff?r1=1.2&r2=1.3
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_cqueue_qmaster.c
===================================================================
RCS file: /cvs/gridengine/source/daemons/qmaster/sge_cqueue_qmaster.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- sge_cqueue_qmaster.c 2003/08/19 17:21:58 1.2
+++ sge_cqueue_qmaster.c 2003/08/25 13:16:00 1.3
@@ -389,6 +389,83 @@
}
}
+ if (ret) {
+ DTRACE;
+ pos = lGetPosViaElem(reduced_elem, CQ_pe_list);
+
+ if (pos >= 0) {
+ lList *list = lGetPosList(reduced_elem, pos);
+
+ lSetList(cqueue, CQ_pe_list, lCopyList("", list));
+ }
+ }
+
+ if (ret) {
+ DTRACE;
+ pos = lGetPosViaElem(reduced_elem, CQ_ckpt_list);
+
+ if (pos >= 0) {
+ lList *list = lGetPosList(reduced_elem, pos);
+
+ lSetList(cqueue, CQ_ckpt_list, lCopyList("", list));
+ }
+ }
+
+ if (ret) {
+ DTRACE;
+ pos = lGetPosViaElem(reduced_elem, CQ_owner_list);
+
+ if (pos >= 0) {
+ lList *list = lGetPosList(reduced_elem, pos);
+
+ lSetList(cqueue, CQ_owner_list, lCopyList("", list));
+ }
+ }
+
+ if (ret) {
+ DTRACE;
+ pos = lGetPosViaElem(reduced_elem, CQ_acl);
+
+ if (pos >= 0) {
+ lList *list = lGetPosList(reduced_elem, pos);
+
+ lSetList(cqueue, CQ_acl, lCopyList("", list));
+ }
+ }
+
+ if (ret) {
+ DTRACE;
+ pos = lGetPosViaElem(reduced_elem, CQ_xacl);
+
+ if (pos >= 0) {
+ lList *list = lGetPosList(reduced_elem, pos);
+
+ lSetList(cqueue, CQ_xacl, lCopyList("", list));
+ }
+ }
+
+ if (ret) {
+ DTRACE;
+ pos = lGetPosViaElem(reduced_elem, CQ_projects);
+
+ if (pos >= 0) {
+ lList *list = lGetPosList(reduced_elem, pos);
+
+ lSetList(cqueue, CQ_projects, lCopyList("", list));
+ }
+ }
+
+ if (ret) {
+ DTRACE;
+ pos = lGetPosViaElem(reduced_elem, CQ_xprojects);
+
+ if (pos >= 0) {
+ lList *list = lGetPosList(reduced_elem, pos);
+
+ lSetList(cqueue, CQ_xprojects, lCopyList("", list));
+ }
+ }
+
DEXIT;
if (ret) {
return 0;
1.12 +136 -1 gridengine/source/libs/sgeobj/config.c
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/config.c.diff?r1=1.11&r2=1.12
(In the diff below, changes in quantity of whitespace are not shown.)
Index: config.c
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/config.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- config.c 2003/07/25 07:27:26 1.11
+++ config.c 2003/08/25 13:16:01 1.12
@@ -963,7 +963,7 @@
const char *str;
lList *lanswer_list = NULL;
- DENTER(TOP_LAYER, "set_conf_list");
+ DENTER(TOP_LAYER, "set_conf_str_attr_list");
if(!(str=get_conf_value(fields?NULL:alpp, *clpp, CF_name, CF_value, key))) {
DEXIT;
@@ -971,6 +971,141 @@
}
ret = str_attr_list_parse_from_string(&tmplp, &lanswer_list, str,
HOSTATTR_ALLOW_AMBIGUITY);
+ if (!ret) {
+ const char *text = lGetString(lFirst(lanswer_list), AN_text);
+
+ sprintf(SGE_EVENT, "%s - %s", key, text);
+ answer_list_add(alpp, SGE_EVENT, STATUS_ESEMANTIC, ANSWER_QUALITY_ERROR);
+ return ret;
+ }
+ lDelElemStr(clpp, CF_name, key);
+ add_nm_to_set(fields, name_nm);
+
+ if (tmplp != NULL) {
+ lSetList(ep, name_nm, tmplp);
+ DEXIT;
+ return true;
+ }
+
+ DEXIT;
+ return true;
+#ifdef __INSIGHT__
+_Insight_set_option("unsuppress", "PARM_NULL");
+#endif
+}
+
+bool set_conf_strlist_attr_list(lList **alpp, lList **clpp, int fields[],
+ const char *key, lListElem *ep, int name_nm,
+ lDescr *descr, int sub_name_nm)
+{
+#ifdef __INSIGHT__
+/* JG: NULL is OK for fields */
+_Insight_set_option("suppress", "PARM_NULL");
+#endif
+ bool ret;
+ lList *tmplp = NULL;
+ const char *str;
+ lList *lanswer_list = NULL;
+
+ DENTER(TOP_LAYER, "set_conf_strlist_attr_list");
+
+ if(!(str=get_conf_value(fields?NULL:alpp, *clpp, CF_name, CF_value, key))) {
+ DEXIT;
+ return fields?true:false;
+ }
+
+ ret = strlist_attr_list_parse_from_string(&tmplp, &lanswer_list, str,
+ HOSTATTR_ALLOW_AMBIGUITY);
+ if (!ret) {
+ const char *text = lGetString(lFirst(lanswer_list), AN_text);
+
+ sprintf(SGE_EVENT, "%s - %s", key, text);
+ answer_list_add(alpp, SGE_EVENT, STATUS_ESEMANTIC, ANSWER_QUALITY_ERROR);
+ return ret;
+ }
+ lDelElemStr(clpp, CF_name, key);
+ add_nm_to_set(fields, name_nm);
+
+ if (tmplp != NULL) {
+ lSetList(ep, name_nm, tmplp);
+ DEXIT;
+ return true;
+ }
+
+ DEXIT;
+ return true;
+#ifdef __INSIGHT__
+_Insight_set_option("unsuppress", "PARM_NULL");
+#endif
+}
+
+bool set_conf_usrlist_attr_list(lList **alpp, lList **clpp, int fields[],
+ const char *key, lListElem *ep, int name_nm,
+ lDescr *descr, int sub_name_nm)
+{
+#ifdef __INSIGHT__
+/* JG: NULL is OK for fields */
+_Insight_set_option("suppress", "PARM_NULL");
+#endif
+ bool ret;
+ lList *tmplp = NULL;
+ const char *str;
+ lList *lanswer_list = NULL;
+
+ DENTER(TOP_LAYER, "set_conf_usrlist_attr_list");
+
+ if(!(str=get_conf_value(fields?NULL:alpp, *clpp, CF_name, CF_value, key))) {
+ DEXIT;
+ return fields?true:false;
+ }
+
+ ret = usrlist_attr_list_parse_from_string(&tmplp, &lanswer_list, str,
+ HOSTATTR_ALLOW_AMBIGUITY);
+ if (!ret) {
+ const char *text = lGetString(lFirst(lanswer_list), AN_text);
+
+ sprintf(SGE_EVENT, "%s - %s", key, text);
+ answer_list_add(alpp, SGE_EVENT, STATUS_ESEMANTIC, ANSWER_QUALITY_ERROR);
+ return ret;
+ }
+ lDelElemStr(clpp, CF_name, key);
+ add_nm_to_set(fields, name_nm);
+
+ if (tmplp != NULL) {
+ lSetList(ep, name_nm, tmplp);
+ DEXIT;
+ return true;
+ }
+
+ DEXIT;
+ return true;
+#ifdef __INSIGHT__
+_Insight_set_option("unsuppress", "PARM_NULL");
+#endif
+}
+
+bool set_conf_prjlist_attr_list(lList **alpp, lList **clpp, int fields[],
+ const char *key, lListElem *ep, int name_nm,
+ lDescr *descr, int sub_name_nm)
+{
+#ifdef __INSIGHT__
+/* JG: NULL is OK for fields */
+_Insight_set_option("suppress", "PARM_NULL");
+#endif
+ bool ret;
+ lList *tmplp = NULL;
+ const char *str;
+ lList *lanswer_list = NULL;
+
+ DENTER(TOP_LAYER, "set_conf_prjlist_attr_list");
+
+ if(!(str=get_conf_value(fields?NULL:alpp, *clpp, CF_name, CF_value, key))) {
+ DEXIT;
+ return fields?true:false;
+ }
+
+ ret = prjlist_attr_list_parse_from_string(&tmplp, &lanswer_list, str,
+ HOSTATTR_ALLOW_AMBIGUITY);
if (!ret) {
const char *text = lGetString(lFirst(lanswer_list), AN_text);
1.9 +12 -0 gridengine/source/libs/sgeobj/config.h
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/config.h.diff?r1=1.8&r2=1.9
(In the diff below, changes in quantity of whitespace are not shown.)
Index: config.h
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/config.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- config.h 2003/07/25 07:27:26 1.8
+++ config.h 2003/08/25 13:16:01 1.9
@@ -103,6 +103,18 @@
const char *key, lListElem *ep, int name_nm,
lDescr *descr, int sub_name_nm);
+bool set_conf_strlist_attr_list(lList **alpp, lList **clpp, int fields[],
+ const char *key, lListElem *ep, int name_nm,
+ lDescr *descr, int sub_name_nm);
+
+bool set_conf_usrlist_attr_list(lList **alpp, lList **clpp, int fields[],
+ const char *key, lListElem *ep, int name_nm,
+ lDescr *descr, int sub_name_nm);
+
+bool set_conf_prjlist_attr_list(lList **alpp, lList **clpp, int fields[],
+ const char *key, lListElem *ep, int name_nm,
+ lDescr *descr, int sub_name_nm);
+
bool set_conf_centry_type(lList **alpp, lList **clpp, int fields[],
const char *key, lListElem *ep, int name_nm);
1.15 +3 -0 gridengine/source/libs/sgeobj/sge_all_listsL.h
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_all_listsL.h.diff?r1=1.14&r2=1.15
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_all_listsL.h
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_all_listsL.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- sge_all_listsL.h 2003/08/19 17:21:59 1.14
+++ sge_all_listsL.h 2003/08/25 13:16:01 1.15
@@ -214,6 +214,9 @@
{AMEM_LOWERBOUND, AMEMS, AMEMN}, /* CQ memory limit sublist */
{AINTER_LOWERBOUND, AINTERS, AINTERN}, /* CQ interval sublist */
{ASTRING_LOWERBOUND, ASTRINGS, ASTRINGN}, /* CQ string sublist */
+ {ASTRLIST_LOWERBOUND, ASTRLISTS, ASTRLISTN}, /* CQ ST_Type-list sublist */
+ {AUSRLIST_LOWERBOUND, AUSRLISTS, AUSRLISTN}, /* CQ US_Type-list sublist */
+ {APRJLIST_LOWERBOUND, APRJLISTS, APRJLISTN}, /* CQ UP_Type-list sublist */
{CQ_LOWERBOUND, CQS, CQN}, /* Cluster Queue list */
{FCAT_LOWERBOUND, FCATS, FCATN}, /* Functional category */
1.8 +8 -1 gridengine/source/libs/sgeobj/sge_attr.c
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_attr.c.diff?r1=1.7&r2=1.8
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_attr.c
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_attr.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- sge_attr.c 2003/07/29 14:52:41 1.7
+++ sge_attr.c 2003/08/25 13:16:01 1.8
@@ -547,7 +547,9 @@
}
/* remove all blanks from token */
+#if 0 /* EB: space separated list will not be possible then */
sge_strip_blanks(token);
+#endif
length = strlen(token);
if (length >= 1) {
char *href_name = NULL;
@@ -806,8 +808,13 @@
TEMPLATE_ATTR_IMPL(bool_attr, bool, ABOOL_Type, ABOOL_href, ABOOL_value)
TEMPLATE_ATTR_IMPL(time_attr, const char *, ATIME_Type, ATIME_href, ATIME_value)
-
TEMPLATE_ATTR_IMPL(mem_attr, const char *, AMEM_Type, AMEM_href, AMEM_value)
TEMPLATE_ATTR_IMPL(inter_attr, const char *, AINTER_Type, AINTER_href, \
AINTER_value) +
+TEMPLATE_ATTR_IMPL(strlist_attr, const char *, ASTRLIST_Type, ASTRLIST_href, \
ASTRLIST_value) +
+TEMPLATE_ATTR_IMPL(usrlist_attr, const char *, AUSRLIST_Type, AUSRLIST_href, \
AUSRLIST_value) +
+TEMPLATE_ATTR_IMPL(prjlist_attr, const char *, APRJLIST_Type, APRJLIST_href, \
APRJLIST_value)
1.6 +6 -0 gridengine/source/libs/sgeobj/sge_attr.h
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_attr.h.diff?r1=1.5&r2=1.6
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_attr.h
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_attr.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- sge_attr.h 2003/07/25 07:27:26 1.5
+++ sge_attr.h 2003/08/25 13:16:02 1.6
@@ -88,6 +88,12 @@
TEMPLATE_ATTR_PROTO(inter_attr, const char *)
+TEMPLATE_ATTR_PROTO(strlist_attr, const char *)
+
+TEMPLATE_ATTR_PROTO(usrlist_attr, const char *)
+
+TEMPLATE_ATTR_PROTO(prjlist_attr, const char *)
+
#undef ATTR_TYPE_PROTOTYPES
#endif /* __SGE_ATTR_H__ */
1.8 +52 -1 gridengine/source/libs/sgeobj/sge_attrL.h
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_attrL.h.diff?r1=1.7&r2=1.8
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_attrL.h
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_attrL.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- sge_attrL.h 2003/08/19 17:21:59 1.7
+++ sge_attrL.h 2003/08/25 13:16:02 1.8
@@ -145,7 +145,7 @@
#define AINTERS sizeof(AINTERN)/sizeof(char*)
enum {
- ASTRING_href = AINTER_LOWERBOUND,
+ ASTRING_href = ASTRING_LOWERBOUND,
ASTRING_value
};
@@ -160,6 +160,57 @@
NAMEEND
#define ASTRINGS sizeof(ASTRINGN)/sizeof(char*)
+
+enum {
+ ASTRLIST_href = ASTRLIST_LOWERBOUND,
+ ASTRLIST_value
+};
+
+LISTDEF(ASTRLIST_Type)
+ SGE_HOST(ASTRLIST_href, CULL_HASH | CULL_UNIQUE)
+ SGE_LIST(ASTRLIST_value, ST_Type, CULL_DEFAULT)
+LISTEND
+
+NAMEDEF(ASTRLISTN)
+ NAME("ASTRLIST_href")
+ NAME("ASTRLIST_value")
+NAMEEND
+
+#define ASTRLISTS sizeof(ASTRLISTN)/sizeof(char*)
+
+enum {
+ AUSRLIST_href = AUSRLIST_LOWERBOUND,
+ AUSRLIST_value
+};
+
+LISTDEF(AUSRLIST_Type)
+ SGE_HOST(AUSRLIST_href, CULL_HASH | CULL_UNIQUE)
+ SGE_LIST(AUSRLIST_value, US_Type, CULL_DEFAULT)
+LISTEND
+
+NAMEDEF(AUSRLISTN)
+ NAME("AUSRLIST_href")
+ NAME("AUSRLIST_value")
+NAMEEND
+
+#define AUSRLISTS sizeof(AUSRLISTN)/sizeof(char*)
+
+enum {
+ APRJLIST_href = APRJLIST_LOWERBOUND,
+ APRJLIST_value
+};
+
+LISTDEF(APRJLIST_Type)
+ SGE_HOST(APRJLIST_href, CULL_HASH | CULL_UNIQUE)
+ SGE_LIST(APRJLIST_value, UP_Type, CULL_DEFAULT)
+LISTEND
+
+NAMEDEF(APRJLISTN)
+ NAME("APRJLIST_href")
+ NAME("APRJLIST_value")
+NAMEEND
+
+#define APRJLISTS sizeof(APRJLISTN)/sizeof(char*)
/* *INDENT-ON* */
1.14 +10 -1 gridengine/source/libs/sgeobj/sge_boundaries.h
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_boundaries.h.diff?r1=1.13&r2=1.14
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_boundaries.h
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_boundaries.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- sge_boundaries.h 2003/08/19 17:21:59 1.13
+++ sge_boundaries.h 2003/08/25 13:16:02 1.14
@@ -451,7 +451,16 @@
ASTRING_LOWERBOUND = AINTER_UPPERBOUND + 1,
ASTRING_UPPERBOUND = ASTRING_LOWERBOUND + 1 * BASIC_UNIT -1,
- CQ_LOWERBOUND = ASTRING_UPPERBOUND + 1,
+ ASTRLIST_LOWERBOUND = ASTRING_UPPERBOUND + 1,
+ ASTRLIST_UPPERBOUND = ASTRLIST_LOWERBOUND + 1 * BASIC_UNIT -1,
+
+ AUSRLIST_LOWERBOUND = ASTRLIST_UPPERBOUND + 1,
+ AUSRLIST_UPPERBOUND = AUSRLIST_LOWERBOUND + 1 * BASIC_UNIT -1,
+
+ APRJLIST_LOWERBOUND = AUSRLIST_UPPERBOUND + 1,
+ APRJLIST_UPPERBOUND = APRJLIST_LOWERBOUND + 1 * BASIC_UNIT -1,
+
+ CQ_LOWERBOUND = APRJLIST_UPPERBOUND + 1,
CQ_UPPERBOUND = CQ_LOWERBOUND + 4 * BASIC_UNIT -1,
FCAT_LOWERBOUND = CQ_UPPERBOUND + 1,
1.3 +11 -9 gridengine/source/libs/sgeobj/sge_cqueueL.h
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_cqueueL.h.diff?r1=1.2&r2=1.3
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_cqueueL.h
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_cqueueL.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- sge_cqueueL.h 2003/08/19 17:21:59 1.2
+++ sge_cqueueL.h 2003/08/25 13:16:02 1.3
@@ -155,19 +155,21 @@
SGE_STRING(CQ_resume_method, CULL_SPOOL | CULL_CONFIGURE)
SGE_STRING(CQ_terminate_method, CULL_SPOOL | CULL_CONFIGURE)
- SGE_ULONG(CQ_qtype, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_pe_list, ASTRLIST_Type, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_ckpt_list, ASTRLIST_Type, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_owner_list, AUSRLIST_Type, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_acl, AUSRLIST_Type, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_xacl, AUSRLIST_Type, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_projects, APRJLIST_Type, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_xprojects, APRJLIST_Type, CULL_SPOOL | CULL_CONFIGURE)
+
SGE_LIST(CQ_load_thresholds, CE_Type, CULL_SPOOL | CULL_CONFIGURE)
SGE_LIST(CQ_suspend_thresholds, CE_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_acl, US_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_xacl, US_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_owner_list, US_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_subordinate_list, SO_Type, CULL_SPOOL | CULL_CONFIGURE)
SGE_LIST(CQ_consumable_config_list, CE_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_projects, UP_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_xprojects, UP_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_pe_list, ST_Type, CULL_SPOOL | CULL_CONFIGURE)
- SGE_LIST(CQ_ckpt_list, ST_Type, CULL_SPOOL | CULL_CONFIGURE)
+
+ SGE_ULONG(CQ_qtype, CULL_SPOOL | CULL_CONFIGURE)
+ SGE_LIST(CQ_subordinate_list, SO_Type, CULL_SPOOL | CULL_CONFIGURE)
LISTEND
NAMEDEF(CQN)
1.23 +94 -0 gridengine/source/libs/sgeobj/sge_object.c
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_object.c.diff?r1=1.22&r2=1.23
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_object.c
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_object.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- sge_object.c 2003/07/30 10:57:56 1.22
+++ sge_object.c 2003/08/25 13:16:02 1.23
@@ -416,6 +416,48 @@
result = userset_get_type_string(object, answer_list, &tmp_dstring);
quote_special_case = true;
break;
+ case ASTRLIST_value:
+ {
+ lList *list = lGetList(object, nm);
+ lListElem *elem = NULL;
+
+ for_each(elem, list) {
+ sge_dstring_sprintf_append(&tmp_dstring, "%s", lGetString(elem, \
ST_name)); + if (lNext(elem)) {
+ sge_dstring_sprintf_append(&tmp_dstring, " ");
+ }
+ }
+ result = sge_dstring_get_string(&tmp_dstring);
+ }
+ break;
+ case AUSRLIST_value:
+ {
+ lList *list = lGetList(object, nm);
+ lListElem *elem = NULL;
+
+ for_each(elem, list) {
+ sge_dstring_sprintf_append(&tmp_dstring, "%s", lGetString(elem, \
US_name)); + if (lNext(elem)) {
+ sge_dstring_sprintf_append(&tmp_dstring, " ");
+ }
+ }
+ result = sge_dstring_get_string(&tmp_dstring);
+ }
+ break;
+ case APRJLIST_value:
+ {
+ lList *list = lGetList(object, nm);
+ lListElem *elem = NULL;
+
+ for_each(elem, list) {
+ sge_dstring_sprintf_append(&tmp_dstring, "%s", lGetString(elem, \
UP_name)); + if (lNext(elem)) {
+ sge_dstring_sprintf_append(&tmp_dstring, " ");
+ }
+ }
+ result = sge_dstring_get_string(&tmp_dstring);
+ }
+ break;
}
/* we had a special case - append to result dstring */
@@ -697,6 +739,18 @@
case AINTER_value:
ret = object_parse_inter_from_string(object, answer_list, nm, value);
break;
+ case ASTRLIST_value:
+ ret = object_parse_list_from_string(object, answer_list, nm, value,
+ ST_Type, ST_name);
+ break;
+ case AUSRLIST_value:
+ ret = object_parse_list_from_string(object, answer_list, nm, value,
+ US_Type, US_name);
+ break;
+ case APRJLIST_value:
+ ret = object_parse_list_from_string(object, answer_list, nm, value,
+ UP_Type, UP_name);
+ break;
default:
ret = object_parse_raw_field_from_string(object, answer_list, nm,
value);
@@ -1187,6 +1241,46 @@
if (parse_ulong_val(NULL, NULL, TYPE_TIM, string, NULL, 0)) {
lSetPosString(this_elem, pos, string);
+ } else {
+ answer_list_add_sprintf(answer_list, STATUS_EUNKNOWN,
+ ANSWER_QUALITY_ERROR,
+ MSG_ERRORPARSINGVALUEFORNM_SS,
+ string, lNm2Str(name));
+ ret = false;
+ }
+ } else {
+ answer_list_add_sprintf(answer_list, STATUS_EUNKNOWN,
+ ANSWER_QUALITY_ERROR,
+ MSG_ERRORPARSINGVALUEFORNM_SS,
+ "<null>", lNm2Str(name));
+ ret = false;
+ }
+ DEXIT;
+ return ret;
+}
+
+bool
+object_parse_list_from_string(lListElem *this_elem, lList **answer_list,
+ int name, const char *string,
+ const lDescr *descr, int nm)
+{
+ bool ret = true;
+
+ DENTER(OBJECT_LAYER, "object_parse_strlist_from_string");
+ if (this_elem != NULL && string != NULL) {
+ lList *tmp_list = NULL;
+ int pos = lGetPosViaElem(this_elem, name);
+
+ lString2List(string, &tmp_list, descr, nm, "\t \v\r,");
+ if (tmp_list != NULL) {
+ lListElem *first_elem = lFirst(tmp_list);
+ const char *first_string = lGetString(first_elem, nm);
+
+ if (strcasecmp("NONE", first_string)) {
+ lSetPosList(this_elem, pos, tmp_list);
+ } else {
+ tmp_list = lFreeList(tmp_list);
+ }
} else {
answer_list_add_sprintf(answer_list, STATUS_EUNKNOWN,
ANSWER_QUALITY_ERROR,
1.17 +5 -0 gridengine/source/libs/sgeobj/sge_object.h
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/sgeobj/sge_object.h.diff?r1=1.16&r2=1.17
(In the diff below, changes in quantity of whitespace are not shown.)
Index: sge_object.h
===================================================================
RCS file: /cvs/gridengine/source/libs/sgeobj/sge_object.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- sge_object.h 2003/07/30 10:57:56 1.16
+++ sge_object.h 2003/08/25 13:16:02 1.17
@@ -246,6 +246,11 @@
int name, const char *string);
bool
+object_parse_list_from_string(lListElem *this_elem, lList **answer_list,
+ int name, const char *string,
+ const lDescr *descr, int nm);
+
+bool
object_set_any_type(lListElem *this_elem, int name, void *value);
void
1.3 +148 -1 gridengine/source/libs/spool/classic/read_write_cqueue.c
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/spool/classic/read_write_cqueue.c.diff?r1=1.2&r2=1.3
(In the diff below, changes in quantity of whitespace are not shown.)
Index: read_write_cqueue.c
===================================================================
RCS file: /cvs/gridengine/source/libs/spool/classic/read_write_cqueue.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- read_write_cqueue.c 2003/08/19 17:22:00 1.2
+++ read_write_cqueue.c 2003/08/25 13:16:03 1.3
@@ -1,4 +1,4 @@
-/*___INFO__MARK_BEGIN__*/
+
/*************************************************************************
*
* The Contents of this file are made available subject to the terms of
@@ -280,6 +280,55 @@
AINTER_href)) ? -1 : 0;
}
+ /* --------- CQ_pe_list */
+ if (ret == 0) {
+ ret = (!set_conf_strlist_attr_list(alpp, clpp, fields, "pe_list", ep,
+ CQ_pe_list, ASTRLIST_Type,
+ ASTRLIST_href)) ? -1 : 0;
+ }
+
+ /* --------- CQ_ckpt_list */
+ if (ret == 0) {
+ ret = (!set_conf_strlist_attr_list(alpp, clpp, fields, "ckpt_list", ep,
+ CQ_ckpt_list, ASTRLIST_Type,
+ ASTRLIST_href)) ? -1 : 0;
+ }
+
+ /* --------- CQ_owner_list */
+ if (ret == 0) {
+ ret = (!set_conf_usrlist_attr_list(alpp, clpp, fields, "owner_list", ep,
+ CQ_owner_list, AUSRLIST_Type,
+ AUSRLIST_href)) ? -1 : 0;
+ }
+
+ /* --------- CQ_acl */
+ if (ret == 0) {
+ ret = (!set_conf_usrlist_attr_list(alpp, clpp, fields, "user_lists", ep,
+ CQ_acl, AUSRLIST_Type,
+ AUSRLIST_href)) ? -1 : 0;
+ }
+
+ /* --------- CQ_xacl */
+ if (ret == 0) {
+ ret = (!set_conf_usrlist_attr_list(alpp, clpp, fields, "xuser_lists", ep,
+ CQ_xacl, AUSRLIST_Type,
+ AUSRLIST_href)) ? -1 : 0;
+ }
+
+ /* --------- CQ_projects */
+ if (ret == 0) {
+ ret = (!set_conf_prjlist_attr_list(alpp, clpp, fields, "projects", ep,
+ CQ_projects, APRJLIST_Type,
+ APRJLIST_href)) ? -1 : 0;
+ }
+
+ /* --------- CQ_xprojects */
+ if (ret == 0) {
+ ret = (!set_conf_prjlist_attr_list(alpp, clpp, fields, "xprojects", ep,
+ CQ_xprojects, APRJLIST_Type,
+ APRJLIST_href)) ? -1 : 0;
+ }
+
#if 0 /* EB: TODO: APIBASE */
/* --------- CU_ruser_list */
if (ret == 0) {
@@ -747,6 +796,104 @@
FPRINTF((fp, "NONE\n"));
}
+ }
+ {
+ const lList *str_attr_list = lGetList(ep, CQ_pe_list);
+
+ FPRINTF((fp, "pe_list "));
+ if (str_attr_list != NULL) {
+ dstring string = DSTRING_INIT;
+
+ strlist_attr_list_append_to_dstring(str_attr_list, &string);
+ FPRINTF((fp, "%s\n", sge_dstring_get_string(&string)));
+ sge_dstring_free(&string);
+ } else {
+ FPRINTF((fp, "NONE\n"));
+ }
+ }
+ {
+ const lList *str_attr_list = lGetList(ep, CQ_ckpt_list);
+
+ FPRINTF((fp, "ckpt_list "));
+ if (str_attr_list != NULL) {
+ dstring string = DSTRING_INIT;
+
+ strlist_attr_list_append_to_dstring(str_attr_list, &string);
+ FPRINTF((fp, "%s\n", sge_dstring_get_string(&string)));
+ sge_dstring_free(&string);
+ } else {
+ FPRINTF((fp, "NONE\n"));
+ }
+ }
+ {
+ const lList *str_attr_list = lGetList(ep, CQ_owner_list);
+
+ FPRINTF((fp, "owner_list "));
+ if (str_attr_list != NULL) {
+ dstring string = DSTRING_INIT;
+
+ usrlist_attr_list_append_to_dstring(str_attr_list, &string);
+ FPRINTF((fp, "%s\n", sge_dstring_get_string(&string)));
+ sge_dstring_free(&string);
+ } else {
+ FPRINTF((fp, "NONE\n"));
+ }
+ }
+ {
+ const lList *str_attr_list = lGetList(ep, CQ_acl);
+
+ FPRINTF((fp, "user_lists "));
+ if (str_attr_list != NULL) {
+ dstring string = DSTRING_INIT;
+
+ usrlist_attr_list_append_to_dstring(str_attr_list, &string);
+ FPRINTF((fp, "%s\n", sge_dstring_get_string(&string)));
+ sge_dstring_free(&string);
+ } else {
+ FPRINTF((fp, "NONE\n"));
+ }
+ }
+ {
+ const lList *str_attr_list = lGetList(ep, CQ_xacl);
+
+ FPRINTF((fp, "xuser_lists "));
+ if (str_attr_list != NULL) {
+ dstring string = DSTRING_INIT;
+
+ usrlist_attr_list_append_to_dstring(str_attr_list, &string);
+ FPRINTF((fp, "%s\n", sge_dstring_get_string(&string)));
+ sge_dstring_free(&string);
+ } else {
+ FPRINTF((fp, "NONE\n"));
+ }
+ }
+ {
+ const lList *str_attr_list = lGetList(ep, CQ_projects);
+
+ FPRINTF((fp, "projects "));
+ if (str_attr_list != NULL) {
+ dstring string = DSTRING_INIT;
+
+ prjlist_attr_list_append_to_dstring(str_attr_list, &string);
+ FPRINTF((fp, "%s\n", sge_dstring_get_string(&string)));
+ sge_dstring_free(&string);
+ } else {
+ FPRINTF((fp, "NONE\n"));
+ }
+ }
+ {
+ const lList *str_attr_list = lGetList(ep, CQ_xprojects);
+
+ FPRINTF((fp, "xprojects "));
+ if (str_attr_list != NULL) {
+ dstring string = DSTRING_INIT;
+
+ prjlist_attr_list_append_to_dstring(str_attr_list, &string);
+ FPRINTF((fp, "%s\n", sge_dstring_get_string(&string)));
+ sge_dstring_free(&string);
+ } else {
+ FPRINTF((fp, "NONE\n"));
+ }
}
#if 0 /* EB: TODO: APIBASE */
{
1.9 +1 -1 gridengine/source/libs/spool/classic/read_write_queue.c
http://gridengine.sunsource.net/source/browse/gridengine/source/libs/spool/classic/read_write_queue.c.diff?r1=1.8&r2=1.9
(In the diff below, changes in quantity of whitespace are not shown.)
Index: read_write_queue.c
===================================================================
RCS file: /cvs/gridengine/source/libs/spool/classic/read_write_queue.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- read_write_queue.c 2003/07/09 12:48:00 1.8
+++ read_write_queue.c 2003/08/25 13:16:04 1.9
@@ -233,7 +233,7 @@
return -1;
}
- /* --------- QU_pe_list */
+ /* --------- QU_ckpt_list */
if (!set_conf_list(alpp, clpp, fields, "ckpt_list", ep,
QU_ckpt_list, ST_Type, ST_name)) {
DEXIT;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic