Skip to content

Commit 25cb5ea

Browse files
committed
fixed broken build and additional cleanup for CS-619
1 parent b817b65 commit 25cb5ea

File tree

2 files changed

+40
-40
lines changed

2 files changed

+40
-40
lines changed

source/daemons/execd/execd.cc

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
/*___INFO__MARK_BEGIN__*/
22
/*************************************************************************
3-
*
3+
*
44
* The Contents of this file are made available subject to the terms of
55
* the Sun Industry Standards Source License Version 1.2
6-
*
6+
*
77
* Sun Microsystems Inc., March, 2001
8-
*
9-
*
8+
*
9+
*
1010
* Sun Industry Standards Source License Version 1.2
1111
* =================================================
1212
* The contents of this file are subject to the Sun Industry Standards
1313
* Source License Version 1.2 (the "License"); You may not use this file
1414
* except in compliance with the License. You may obtain a copy of the
1515
* License at http://gridengine.sunsource.net/Gridengine_SISSL_license.html
16-
*
16+
*
1717
* Software provided under this License is provided on an "AS IS" basis,
1818
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
1919
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
2020
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
2121
* See the License for the specific provisions governing your rights and
2222
* obligations concerning the Software.
23-
*
23+
*
2424
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
25-
*
25+
*
2626
* Copyright: 2001 by Sun Microsystems, Inc.
27-
*
27+
*
2828
* All Rights Reserved.
29-
*
29+
*
3030
* Portions of this software are Copyright (c) 2023-2024 HPC-Gridware GmbH
3131
*
3232
************************************************************************/
@@ -115,7 +115,7 @@ u_long64 get_last_qmaster_register_time() {
115115
* sge_execd_application_status() -- commlib status callback function
116116
*
117117
* SYNOPSIS
118-
* unsigned long sge_execd_application_status(char** info_message)
118+
* unsigned long sge_execd_application_status(char** info_message)
119119
*
120120
* FUNCTION
121121
* This is the implementation of the commlib application status callback
@@ -138,14 +138,14 @@ u_long64 get_last_qmaster_register_time() {
138138
* INPUTS
139139
* char** info_message - pointer to an char* inside commlib.
140140
* info message must be malloced, commlib will
141-
* free this memory.
141+
* free this memory.
142142
* RESULT
143143
* unsigned long status - status of application
144144
*
145145
* NOTES
146146
* This function is MT save
147147
*******************************************************************************/
148-
unsigned long sge_execd_application_status(char** info_message)
148+
unsigned long sge_execd_application_status(char** info_message)
149149
{
150150
return sge_monitor_status(info_message, 0);
151151
}
@@ -177,7 +177,7 @@ int main(int argc, char **argv)
177177
prof_set_level_name(SGE_PROF_CUSTOM1, "Execd Thread", nullptr);
178178
prof_set_level_name(SGE_PROF_CUSTOM2, "Execd Dispatch", nullptr);
179179

180-
#ifdef __SGE_COMPILE_WITH_GETTEXT__
180+
#ifdef __SGE_COMPILE_WITH_GETTEXT__
181181
/* init language output for gettext() , it will use the right language */
182182
sge_init_language_func((gettext_func_type) gettext,
183183
(setlocale_func_type) setlocale,
@@ -188,7 +188,7 @@ int main(int argc, char **argv)
188188

189189
/* This needs a better solution */
190190
umask(022);
191-
191+
192192
/* Initialize path for temporary logging until we chdir to spool */
193193
my_pid = getpid();
194194
snprintf(tmp_err_file_name, sizeof(tmp_err_file_name), "%s." pid_t_fmt, TMP_ERR_FILE_EXECD, my_pid);
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
230230
}
231231

232232
parse_cmdline_execd(argv);
233-
233+
234234
/* exit if we can't get communication handle (bind port) */
235235
max_enroll_tries = 30;
236236
while (cl_com_get_handle(prognames[EXECD],1) == nullptr) {
@@ -261,8 +261,8 @@ int main(int argc, char **argv)
261261
}
262262

263263
/*
264-
* now the commlib up and running. Set execd application status function
265-
* ( commlib callback function for qping status information response
264+
* now the commlib up and running. Set execd application status function
265+
* ( commlib callback function for qping status information response
266266
* messages (SIRM) )
267267
*/
268268
ret_val = cl_com_set_status_func(sge_execd_application_status);
@@ -282,27 +282,27 @@ int main(int argc, char **argv)
282282
}
283283
cl_com_free_sirm_message(&status);
284284
}
285-
285+
286286
/* finalize daemonize */
287287
if (!getenv("SGE_ND")) {
288288
sge_daemonize_finalize();
289289
}
290290

291-
/* daemonizes if qmaster is unreachable */
291+
/* daemonizes if qmaster is unreachable */
292292
sge_setup_sge_execd(tmp_err_file_name);
293293

294294
/* are we using qidle or not */
295295
sge_ls_qidle(mconf_get_use_qidle());
296296
sge_ls_gnu_ls(1);
297-
297+
298298
DPRINTF("use_qidle: %d\n", mconf_get_use_qidle());
299299

300300
/* test load sensor (internal or external) */
301301
{
302302
lList *report_list = sge_build_load_report(component_get_qualified_hostname(), bootstrap_get_binary_path());
303303
lFreeList(&report_list);
304304
}
305-
305+
306306
/* here we have to wait for qmaster registration */
307307
while (sge_execd_register_at_qmaster(false) != 0) {
308308
if (ocs::gdi::ClientBase::sge_get_com_error_flag(EXECD, ocs::gdi::SGE_COM_ACCESS_DENIED, true)) {
@@ -319,7 +319,7 @@ int main(int argc, char **argv)
319319
sleep(30);
320320
}
321321

322-
/*
322+
/*
323323
* Terminate on SIGTERM or hard communication error
324324
*/
325325
if (execd_exit_state != 0 || shut_me_down != 0) {
@@ -345,7 +345,7 @@ int main(int argc, char **argv)
345345
*/
346346
if (!sge_is_start_user_superuser()) {
347347
WARNING(SFNMAX, MSG_SWITCH_USER_NOT_ROOT);
348-
}
348+
}
349349

350350
#ifdef COMPILE_DC
351351
if (ptf_init()) {
@@ -429,12 +429,12 @@ static void execd_exit_func(int i)
429429
#ifdef COMPILE_DC
430430
ptf_stop();
431431
#endif
432-
432+
433433
#if defined(SOLARIS)
434434
if (sge_smf_used() == 1) {
435435
/* We don't do disable on svcadm restart */
436436
if (sge_strnullcmp(sge_smf_get_instance_state(), SCF_STATE_STRING_ONLINE) == 0 &&
437-
sge_strnullcmp(sge_smf_get_instance_next_state(), SCF_STATE_STRING_NONE) == 0) {
437+
sge_strnullcmp(sge_smf_get_instance_next_state(), SCF_STATE_STRING_NONE) == 0) {
438438
sge_smf_temporary_disable_instance();
439439
}
440440
}
@@ -449,7 +449,7 @@ static void execd_exit_func(int i)
449449
* sge_execd_register_at_qmaster() -- modify execd list at qmaster site
450450
*
451451
* SYNOPSIS
452-
* int sge_execd_register_at_qmaster()
452+
* int sge_execd_register_at_qmaster()
453453
*
454454
* FUNCTION
455455
* add local execd name to SGE_EH_LIST in order to register at
@@ -462,17 +462,17 @@ static void execd_exit_func(int i)
462462
* int - 0 = success / 1 = error
463463
*
464464
* NOTES
465-
* MT-NOTE: sge_execd_register_at_qmaster() is not MT safe
465+
* MT-NOTE: sge_execd_register_at_qmaster() is not MT safe
466466
*
467467
*******************************************************************************/
468468
int sge_execd_register_at_qmaster(bool is_restart) {
469469
int return_value = 0;
470470
static int sge_last_register_error_flag = 0;
471471
lList *alp = nullptr;
472472

473-
/*
473+
/*
474474
* If it is a reconnect (is_restart is true) the act_qmaster file must be
475-
* re-read in order to update ctx qmaster cache when master migrates.
475+
* re-read in order to update ctx qmaster cache when master migrates.
476476
*/
477477
const char *master_host = ocs::gdi::ClientBase::gdi_get_act_master_host(is_restart);
478478

@@ -524,7 +524,7 @@ int sge_execd_register_at_qmaster(bool is_restart) {
524524
return_value = 1;
525525
}
526526
}
527-
527+
528528
if (return_value == 0) {
529529
sge_last_register_error_flag = 0;
530530
INFO(MSG_EXECD_REGISTERED_AT_QMASTER_S, master_host?master_host:"");
@@ -545,10 +545,10 @@ static void parse_cmdline_execd(char **argv)
545545
u_long32 help = 0;
546546

547547
DENTER(TOP_LAYER);
548-
548+
549549
alp = sge_parse_cmdline_execd(argv+1, &pcmdline);
550550
if(alp) {
551-
/*
551+
/*
552552
** high level parsing error! show answer list
553553
*/
554554
for_each_ep(aep, alp) {
@@ -591,7 +591,7 @@ static void parse_cmdline_execd(char **argv)
591591
/*-------------------------------------------------------------
592592
* sge_parse_cmdline_execd
593593
*
594-
*-------------------------------------------------------------*/
594+
*-------------------------------------------------------------*/
595595
static lList *sge_parse_cmdline_execd(char **argv, lList **ppcmdline)
596596
{
597597
char **sp;
@@ -629,8 +629,8 @@ lList *alp = nullptr;
629629
* sge_parse_execd
630630
*
631631
*-------------------------------------------------------------*/
632-
static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
633-
u_long32 *help)
632+
static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
633+
u_long32 *help)
634634
{
635635
lList *alp = nullptr;
636636
int usageshowed = 0;
@@ -648,7 +648,7 @@ static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
648648
break;
649649
}
650650
}
651-
651+
652652
if(lGetNumberOfElem(*ppcmdline)) {
653653
if(!usageshowed) {
654654
sge_usage(EXECD, stderr);
@@ -668,7 +668,7 @@ static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
668668
* SYNOPSIS
669669
* bool
670670
* execd_get_job_ja_task(u_long32 job_id, u_long32 ja_task_id,
671-
* lListElem **job, lListElem **ja_task)
671+
* lListElem **job, lListElem **ja_task)
672672
*
673673
* FUNCTION
674674
* Searches the execd master lists for job and ja_task
@@ -684,7 +684,7 @@ static lList *sge_parse_execd(lList **ppcmdline, lList **ppreflist,
684684
* bool - true if both job and ja_task are found, else false
685685
*
686686
* NOTES
687-
* MT-NOTE: execd_get_job_ja_task() is MT safe
687+
* MT-NOTE: execd_get_job_ja_task() is MT safe
688688
*******************************************************************************/
689689
bool execd_get_job_ja_task(u_long32 job_id, u_long32 ja_task_id, lListElem **job, lListElem **ja_task, bool ignore_missing_job_task)
690690
{

source/daemons/qmaster/sge_give_jobs.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ send_slave_jobs(lListElem *jep, lListElem *jatep, monitoring_t *monitor, u_long6
329329
lSetString(gdil_ep, JG_processors, lGetString(src_qep, QU_processors));
330330

331331
// copy the referenced queue instance
332-
qep = lSelectElemDPack(src_qep, nullptr, rdp, what, false, nullptr, nullptr);
332+
qep = lSelectElemDPack(src_qep, nullptr, rdp, what, false, nullptr);
333333
lSetObject(gdil_ep, JG_queue, qep);
334334

335335
// build minimum of job request and queue resource limit
@@ -568,7 +568,7 @@ send_job(const char *rhost, lListElem *jep, lListElem *jatep, lListElem *hep, in
568568
lSetString(gdil_ep, JG_processors, lGetString(src_qep, QU_processors));
569569

570570
// copy the referenced queue instance
571-
qep = lSelectElemDPack(src_qep, nullptr, rdp, what, false, nullptr, nullptr);
571+
qep = lSelectElemDPack(src_qep, nullptr, rdp, what, false, nullptr);
572572
lSetObject(gdil_ep, JG_queue, qep);
573573

574574
// build minimum of job request and queue resource limit

0 commit comments

Comments
 (0)