Skip to content

Commit beff608

Browse files
committed
config: bin: Add prefix for windows specific functuionality
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 7c0b614 commit beff608

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
@@ -271,7 +271,7 @@ struct flb_config {
271271

272272
#ifdef FLB_SYSTEM_WINDOWS
273273
/* maxstdio (Windows) */
274-
int maxstdio;
274+
int win_maxstdio;
275275
#endif
276276

277277
/* 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,
@@ -294,7 +294,7 @@ struct flb_config *flb_config_init()
294294
config->hot_reloading = FLB_FALSE;
295295

296296
#ifdef FLB_SYSTEM_WINDOWS
297-
config->maxstdio = 512;
297+
config->win_maxstdio = 512;
298298
#endif
299299

300300
#ifdef FLB_HAVE_SQLDB

src/fluent-bit.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ int flb_main(int argc, char **argv)
10371037
#endif
10381038
{ "enable-hot-reload", no_argument, NULL, 'Y' },
10391039
#ifdef FLB_SYSTEM_WINDOWS
1040-
{ "maxstdio", required_argument, NULL, 'M' },
1040+
{ "windows_maxstdio", required_argument, NULL, 'M' },
10411041
#endif
10421042
#ifdef FLB_HAVE_CHUNK_TRACE
10431043
{ "enable-chunk-trace", no_argument, NULL, 'Z' },
@@ -1134,7 +1134,7 @@ int flb_main(int argc, char **argv)
11341134
#ifdef FLB_SYSTEM_WINDOWS
11351135
case 'M':
11361136
flb_cf_section_property_add(cf_opts, service->properties,
1137-
"max_stdio", 0, optarg, 0);
1137+
"windows.maxstdio", 0, optarg, 0);
11381138
break;
11391139
#endif
11401140
case 'o':
@@ -1360,13 +1360,13 @@ int flb_main(int argc, char **argv)
13601360

13611361
#ifdef FLB_SYSTEM_WINDOWS
13621362
/* Validate specified maxstdio */
1363-
if (config->maxstdio >= 512 && config->maxstdio <= 2048) {
1364-
_setmaxstdio(config->maxstdio);
1363+
if (config->win_maxstdio >= 512 && config->win_maxstdio <= 2048) {
1364+
_setmaxstdio(config->win_maxstdio);
13651365
}
13661366
else {
13671367
fprintf(stderr,
1368-
"maxstdio is invalid. From 512 to 2048 is vaild but got %d\n",
1369-
config->maxstdio);
1368+
"windows.maxstdio is invalid. From 512 to 2048 is vaild but got %d\n",
1369+
config->win_maxstdio);
13701370
flb_free(cfg_file);
13711371
flb_cf_destroy(cf_opts);
13721372
exit(EXIT_FAILURE);

0 commit comments

Comments
 (0)