[linux-dvb] [patch 5/6] use -H for human readable output
Ludwig Nussel
ludwig.nussel at suse.de
Thu Sep 7 15:08:22 CEST 2006
like ls -H, df -H, du -H ...
also actually show that percent are displayed
Signed-off-by: lnussel at suse.de
diff -r 450738c4e967 util/femon/femon.c
--- a/util/femon/femon.c Thu Sep 7 13:38:23 2006
+++ b/util/femon/femon.c Thu Sep 7 15:45:04 2006
@@ -41,7 +41,7 @@
static char *usage_str =
"\nusage: femon [options]\n"
- " -r : human readable output\n"
+ " -H : human readable output\n"
" -a number : use given adapter (default 0)\n"
" -f number : use given frontend (default 0)\n\n";
@@ -66,7 +66,7 @@
if (human_readable) {
- printf ("status %c%c%c%c%c | signal %04x | snr %04x | ber %08x | unc %08x | ",
+ printf ("status %c%c%c%c%c | signal %3u%% | snr %3u%% | ber %08x | unc %08x | ",
fe_info.signal ? 'S' : ' ',
fe_info.carrier ? 'C' : ' ',
fe_info.viterbi ? 'V' : ' ',
@@ -145,7 +145,7 @@
int human_readable = 0;
int opt;
- while ((opt = getopt(argc, argv, "hra:f:")) != -1) {
+ while ((opt = getopt(argc, argv, "hHa:f:")) != -1) {
switch (opt)
{
case '?':
@@ -159,7 +159,7 @@
case 'f':
frontend = strtoul(optarg, NULL, 0);
break;
- case 'r':
+ case 'H':
human_readable = 1;
break;
}
--
(o_ Ludwig Nussel
//\ SUSE LINUX Products GmbH, Development
V_/_ http://www.suse.de/
More information about the linux-dvb
mailing list