Skip to content

Commit fb28861

Browse files
committed
Refactor: daemons: Clean up header files in schedulerd.
Going back and redoing the header files one commit at a time is more work than it's worth, as far as I'm concerned. Thus the previous commits will just be left alone with their incorrect (but compilable) includes. This started out as just correcting the headers in the files I touched as part of the IPC cleanup, but schedulerd is small enough that I might as well correct the other files while I'm in the area.
1 parent 7be3732 commit fb28861

File tree

3 files changed

+43
-30
lines changed

3 files changed

+43
-30
lines changed

daemons/schedulerd/pacemaker-schedulerd.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99

1010
#include <crm_internal.h>
1111

12-
#include <crm/crm.h>
13-
#include <stdio.h>
14-
#include <stdbool.h>
15-
16-
#include <stdlib.h>
17-
#include <errno.h>
18-
19-
#include <crm/common/cmdline_internal.h>
20-
#include <crm/common/ipc_internal.h>
21-
#include <crm/common/mainloop.h>
22-
#include <crm/pengine/internal.h>
23-
#include <pacemaker-internal.h>
12+
#include <signal.h> // SIGTERM
13+
#include <stdbool.h> // true
14+
#include <stddef.h> // NULL
15+
16+
#include <glib.h> // g_set_error, FALSE, G_OPTION_*
17+
#include <qb/qblog.h> // LOG_INFO, LOG_TRACE
18+
19+
#include <crm_config.h> // PCMK_SCHEDULER_INPUT_DIR
20+
#include <crm/common/mainloop.h> // mainloop_add_signal
21+
#include <crm/common/results.h> // crm_exit_e, pcmk_rc_*
22+
#include <crm/pengine/internal.h> // pe__register_messages
23+
#include <pacemaker-internal.h> // pcmk__register_lib_messages
2424

2525
#include "pacemaker-schedulerd.h"
2626

daemons/schedulerd/schedulerd_ipc.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@
99

1010
#include <crm_internal.h>
1111

12-
#include <crm/crm.h>
13-
#include <crm/common/xml.h>
14-
#include <pacemaker-internal.h>
12+
#include <errno.h> // ENOMEM
13+
#include <stddef.h> // NULL, size_t
14+
#include <stdint.h> // int32_t, uint32_t
15+
#include <sys/types.h> // gid_t, uid_t
1516

16-
#include <stdbool.h>
17-
#include <sys/stat.h>
18-
#include <sys/types.h>
19-
#include <unistd.h>
17+
#include <glib.h> // g_byte_array_free, TRUE
18+
#include <libxml/tree.h> // xmlNode
19+
#include <qb/qbipcs.h> // qb_ipcs_connection_t
2020

21-
#include "pacemaker-schedulerd.h"
21+
#include <crm/crm.h> // CRM_SYSTEM_PENGINE
22+
#include <crm/common/results.h> // crm_exit_e, pcmk_rc_*
23+
24+
#include "pacemaker-schedulerd.h" // schedulerd_handle_request
2225

2326
static qb_ipcs_service_t *ipcs = NULL;
2427

daemons/schedulerd/schedulerd_messages.c

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@
99

1010
#include <crm_internal.h>
1111

12-
#include <crm/crm.h>
13-
#include <crm/common/xml.h>
14-
#include <pacemaker-internal.h>
15-
16-
#include <stdbool.h>
17-
#include <sys/stat.h>
18-
#include <sys/types.h>
19-
#include <unistd.h>
20-
21-
#include "pacemaker-schedulerd.h"
12+
#include <stdbool.h> // true, false, bool
13+
#include <stdlib.h> // NULL, free
14+
#include <sys/types.h> // time_t
15+
#include <time.h> // time
16+
#include <unistd.h> // unlink
17+
18+
#include <glib.h> // g_hash_table_destroy
19+
#include <libxml/tree.h> // xmlNode
20+
21+
#include <crm_config.h> // PCMK_SCHEDULER_INPUT_DIR
22+
#include <crm/crm.h> // CRM_OP_HELLO, CRM_OP_PECALC
23+
#include <crm/common/ipc.h> // crm_ipc_flags
24+
#include <crm/common/options.h> // PCMK_OPT_CLUSTER_DELAY
25+
#include <crm/common/results.h> // crm_exit_e, pcmk_exec_status_str, pcmk_rc_*
26+
#include <crm/common/scheduler.h> // pcmk__scheduler, pcmk_free_scheduler
27+
#include <crm/common/scheduler_types.h> // pcmk_scheduler_t
28+
#include <crm/common/xml_names.h> // PCMK_XA_EXECUTION_DATE
29+
#include <pacemaker-internal.h> // pcmk__schedule_actions
30+
31+
#include "pacemaker-schedulerd.h" // logger_out, schedulerd_*
2232

2333
static GHashTable *schedulerd_handlers = NULL;
2434

0 commit comments

Comments
 (0)