diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-09-15 13:18:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-15 13:18:17 +0200 |
commit | 8ef825d85fb4d09c32ca44c545d6eb8d995ddea4 (patch) | |
tree | 5ab7b18797dfd5849dec7827c87ca3bb5fcb0993 /plugins/check_hpjd.c | |
parent | a3cf9041af810770daf5d9b83f1906fa9bb0dd11 (diff) | |
parent | 204cf956f0b3db90d079321ee957b3860da7e33f (diff) | |
download | monitoring-plugins-8ef825d85fb4d09c32ca44c545d6eb8d995ddea4.tar.gz |
Merge pull request #2149 from RincewindsHat/clang-format
Clang format
Diffstat (limited to 'plugins/check_hpjd.c')
-rw-r--r-- | plugins/check_hpjd.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index 62417fd6..9907abc5 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c | |||
@@ -85,13 +85,16 @@ int main(int argc, char **argv) { | |||
85 | char query_string[512]; | 85 | char query_string[512]; |
86 | /* removed ' 2>1' at end of command 10/27/1999 - EG */ | 86 | /* removed ' 2>1' at end of command 10/27/1999 - EG */ |
87 | /* create the query string */ | 87 | /* create the query string */ |
88 | sprintf(query_string, "%s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0", HPJD_LINE_STATUS, HPJD_PAPER_STATUS, | 88 | sprintf(query_string, "%s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0 %s.0", |
89 | HPJD_INTERVENTION_REQUIRED, HPJD_GD_PERIPHERAL_ERROR, HPJD_GD_PAPER_JAM, HPJD_GD_PAPER_OUT, HPJD_GD_TONER_LOW, | 89 | HPJD_LINE_STATUS, HPJD_PAPER_STATUS, HPJD_INTERVENTION_REQUIRED, |
90 | HPJD_GD_PAGE_PUNT, HPJD_GD_MEMORY_OUT, HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY); | 90 | HPJD_GD_PERIPHERAL_ERROR, HPJD_GD_PAPER_JAM, HPJD_GD_PAPER_OUT, HPJD_GD_TONER_LOW, |
91 | HPJD_GD_PAGE_PUNT, HPJD_GD_MEMORY_OUT, HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, | ||
92 | HPJD_GD_STATUS_DISPLAY); | ||
91 | 93 | ||
92 | /* get the command to run */ | 94 | /* get the command to run */ |
93 | char command_line[1024]; | 95 | char command_line[1024]; |
94 | sprintf(command_line, "%s -OQa -m : -v 1 -c %s %s:%u %s", PATH_TO_SNMPGET, config.community, config.address, config.port, query_string); | 96 | sprintf(command_line, "%s -OQa -m : -v 1 -c %s %s:%u %s", PATH_TO_SNMPGET, config.community, |
97 | config.address, config.port, query_string); | ||
95 | 98 | ||
96 | /* run the command */ | 99 | /* run the command */ |
97 | child_process = spopen(command_line); | 100 | child_process = spopen(command_line); |
@@ -177,7 +180,8 @@ int main(int argc, char **argv) { | |||
177 | strcpy(display_message, temp_buffer + 1); | 180 | strcpy(display_message, temp_buffer + 1); |
178 | break; | 181 | break; |
179 | default: /* fold multiline message */ | 182 | default: /* fold multiline message */ |
180 | strncat(display_message, input_buffer, sizeof(display_message) - strlen(display_message) - 1); | 183 | strncat(display_message, input_buffer, |
184 | sizeof(display_message) - strlen(display_message) - 1); | ||
181 | } | 185 | } |
182 | } | 186 | } |
183 | 187 | ||