| 105 | } /* end GetResourceTypeByName */ |
| 106 | |
| 107 | static |
| 108 | bool ValidPriority(char *pResSetting) |
| 109 | { |
| 110 | char *priority_vals[] = {"MAX", |
| 111 | "HIGH", |
| 112 | "MEDIUM", |
| 113 | "LOW", |
| 114 | "MIN", |
| 115 | NULL}; |
| 116 | int ii = 0; |
| 117 | |
| 118 | char *pval = priority_vals[ii]; |
| 119 | |
| 120 | while (pval) |
| 121 | { |
| 122 | if (0 == pg_strcasecmp(pval, pResSetting)) |
| 123 | return true; |
| 124 | pval = priority_vals[++ii]; |
| 125 | } |
| 126 | return false; |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Validate memory limit setting. |
no test coverage detected