0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::fs: Make support infolog dump uniform with similar msgs.

This commit is contained in:
Jason Volk 2020-10-10 05:17:26 -07:00
parent 019010336b
commit 159fa7bd0f
2 changed files with 29 additions and 14 deletions

View file

@ -244,19 +244,34 @@ ircd::fs::support::dump_info()
const bool support_async {false}; const bool support_async {false};
#endif #endif
char support[128] {0};
const auto _append{[&support]
(const string_view &name, const bool &avail, const int &enable)
{
strlcat(support, fmt::bsprintf<64>
{
"%s:%c%s ",
name,
avail == true? 'y': 'n',
enable == true? "y": enable == false? "n": "",
});
}};
_append("async", support_async, -1);
_append("preadv2", preadv2, -1);
_append("pwritev2", pwritev2, -1);
_append("SYNC", sync, -1);
_append("DSYNC", dsync, -1);
_append("HIPRI", hipri, -1);
_append("NOWAIT", nowait, -1);
_append("APPEND", append, -1);
_append("RWH", rwh_write_life, -1);
_append("RWF", rwf_write_life, -1);
log::info log::info
{ {
log, "Support: async:%b preadv2:%b pwritev2:%b SYNC:%b DSYNC:%b HIPRI:%b NOWAIT:%b APPEND:%b RWH:%b WLH:%b", log, "VFS %s",
support_async, support
preadv2,
pwritev2,
sync,
dsync,
hipri,
nowait,
append,
rwh_write_life,
rwf_write_life,
}; };
#ifdef RB_DEBUG #ifdef RB_DEBUG

View file

@ -258,10 +258,10 @@ ircd::info::dump_cpu_info_x86()
{ {
strlcat(support, fmt::bsprintf<64> strlcat(support, fmt::bsprintf<64>
{ {
" %s[%c%c]", " %s:%c%s",
name, name,
avail == true? 'Y': 'N', avail == true? 'y': 'n',
enable == true? 'Y': enable == false? 'N': '-', enable == true? "y": enable == false? "n": "",
}); });
}}; }};