support limit

This commit is contained in:
Rongsong Shen 2026-01-12 15:20:51 +08:00
parent bef32ace38
commit ecf1916d78
33 changed files with 3036 additions and 243 deletions

View file

@ -94,10 +94,15 @@ static int add_res_preason(xce_job_preason_t* reasons, int code, char* host,
int count;
xce_res_reason_t* p1;
if ((reasons == NULL) || (host == NULL) || (res == NULL)) {
if ((reasons == NULL) || (res == NULL)) {
return -EINVAL;
}
/* FIXME: global resource reason */
if (host == NULL) {
host = "";
}
h = strdup(host);
r = strdup(res);
p1 = (xce_res_reason_t*)calloc(1, sizeof(*p1));