lscpu: s/Y/Yes/ s/N/No/

However I'd like to see one change if you don't object: printing just "N" or
"Y" instead of "No" and "Yes" in the human readable output looks a bit ugly to
me.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
Heiko Carstens 2011-09-10 12:25:04 +02:00 committed by Karel Zak
parent 4e9b3bfda2
commit e43fc13e76
1 changed files with 14 additions and 3 deletions

View File

@ -995,13 +995,24 @@ get_cell_data(struct lscpu_desc *desc, int cpu, int col,
snprintf(buf, bufsz, "%d", desc->addresses[cpu]);
break;
case COL_CONFIGURED:
if (desc->configured)
if (!desc->configured)
break;
if (mod->mode == OUTPUT_PARSABLE)
snprintf(buf, bufsz,
desc->configured[cpu] ? _("Y") : _("N"));
else
snprintf(buf, bufsz,
desc->configured[cpu] ? _("Yes") : _("No"));
break;
case COL_ONLINE:
if (desc->online)
snprintf(buf, bufsz, is_cpu_online(desc, cpu) ? _("Y") : _("N"));
if (!desc->online)
break;
if (mod->mode == OUTPUT_PARSABLE)
snprintf(buf, bufsz,
is_cpu_online(desc, cpu) ? _("Y") : _("N"));
else
snprintf(buf, bufsz,
is_cpu_online(desc, cpu) ? _("Yes") : _("No"));
break;
}
return buf;