X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=fio.c;h=212b72e8706ac84b3ebe8c4fbaadc46b58eec688;hb=1f4c0a4f558557d45e6b186033577ec0b16872e5;hp=6e68723132dff9ceff5ca472226b86decb46d0d0;hpb=602d6ff969ae45cd7388d1f4b89032e71f503af6;p=fio.git diff --git a/fio.c b/fio.c index 6e687231..212b72e8 100644 --- a/fio.c +++ b/fio.c @@ -77,6 +77,50 @@ struct io_log *agg_io_log[2]; #define JOB_START_TIMEOUT (5 * 1000) +static const char *fio_os_strings[os_nr] = { + "Invalid", + "Linux", + "AIX", + "FreeBSD", + "HP-UX", + "OSX", + "NetBSD", + "Solaris", + "Windows" +}; + +static const char *fio_arch_strings[arch_nr] = { + "Invalid", + "x86-64", + "x86", + "ppc", + "ia64", + "s390", + "alpha", + "sparc", + "sparc64", + "arm", + "sh", + "hppa", + "generic" +}; + +const char *fio_get_os_string(int nr) +{ + if (nr < os_nr) + return fio_os_strings[nr]; + + return NULL; +} + +const char *fio_get_arch_string(int nr) +{ + if (nr < arch_nr) + return fio_arch_strings[nr]; + + return NULL; +} + void td_set_runstate(struct thread_data *td, int runstate) { if (td->runstate == runstate)