Skip to content

Commit 77dbf4a

Browse files
cosmo0920edsiper
authored andcommitted
config: bin: Add prefix for windows specific functuionality
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 9ef627e commit 77dbf4a

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

include/fluent-bit/flb_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ struct flb_config {
289289
uint64_t *route_empty_mask;
290290
#ifdef FLB_SYSTEM_WINDOWS
291291
/* maxstdio (Windows) */
292-
int maxstdio;
292+
int win_maxstdio;
293293
#endif
294294

295295
/* Co-routines */

src/flb_config.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ struct flb_service_config service_configs[] = {
186186
#ifdef FLB_SYSTEM_WINDOWS
187187
{FLB_CONF_STR_WINDOWS_MAX_STDIO,
188188
FLB_CONF_TYPE_INT,
189-
offsetof(struct flb_config, maxstdio)},
189+
offsetof(struct flb_config, win_maxstdio)},
190190
#endif
191191
{FLB_CONF_STR_HOT_RELOAD,
192192
FLB_CONF_TYPE_BOOL,
@@ -297,7 +297,7 @@ struct flb_config *flb_config_init()
297297
config->hot_reloading = FLB_FALSE;
298298

299299
#ifdef FLB_SYSTEM_WINDOWS
300-
config->maxstdio = 512;
300+
config->win_maxstdio = 512;
301301
#endif
302302

303303
#ifdef FLB_HAVE_SQLDB

src/fluent-bit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@ int flb_main(int argc, char **argv)
10681068
#endif
10691069
{ "enable-hot-reload", no_argument, NULL, 'Y' },
10701070
#ifdef FLB_SYSTEM_WINDOWS
1071-
{ "maxstdio", required_argument, NULL, 'M' },
1071+
{ "windows_maxstdio", required_argument, NULL, 'M' },
10721072
#endif
10731073
#ifdef FLB_HAVE_CHUNK_TRACE
10741074
{ "enable-chunk-trace", no_argument, NULL, 'Z' },
@@ -1165,7 +1165,7 @@ int flb_main(int argc, char **argv)
11651165
#ifdef FLB_SYSTEM_WINDOWS
11661166
case 'M':
11671167
flb_cf_section_property_add(cf_opts, service->properties,
1168-
"max_stdio", 0, optarg, 0);
1168+
"windows.maxstdio", 0, optarg, 0);
11691169
break;
11701170
#endif
11711171
case 'o':
@@ -1401,13 +1401,13 @@ int flb_main(int argc, char **argv)
14011401

14021402
#ifdef FLB_SYSTEM_WINDOWS
14031403
/* Validate specified maxstdio */
1404-
if (config->maxstdio >= 512 && config->maxstdio <= 2048) {
1405-
_setmaxstdio(config->maxstdio);
1404+
if (config->win_maxstdio >= 512 && config->win_maxstdio <= 2048) {
1405+
_setmaxstdio(config->win_maxstdio);
14061406
}
14071407
else {
14081408
fprintf(stderr,
1409-
"maxstdio is invalid. From 512 to 2048 is vaild but got %d\n",
1410-
config->maxstdio);
1409+
"windows.maxstdio is invalid. From 512 to 2048 is vaild but got %d\n",
1410+
config->win_maxstdio);
14111411
flb_free(cfg_file);
14121412
flb_cf_destroy(cf_opts);
14131413
exit(EXIT_FAILURE);

0 commit comments

Comments
 (0)