summaryrefslogtreecommitdiff
path: root/ifpps.c
diff options
context:
space:
mode:
Diffstat (limited to 'ifpps.c')
-rw-r--r--ifpps.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/ifpps.c b/ifpps.c
index 0852276..1a68c23 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -23,6 +23,7 @@
#include "die.h"
#include "dev.h"
#include "sig.h"
+#include "str.h"
#include "link.h"
#include "xmalloc.h"
#include "ioops.h"
@@ -672,7 +673,7 @@ static void screen_header(WINDOW *screen, const char *ifname, int *voff,
uint64_t ms_interval, unsigned int top_cpus)
{
size_t len = 0;
- char buff[64];
+ char buff[64], machine[64];
struct ethtool_drvinfo drvinf;
u32 rate = device_bitrate(ifname);
int link = ethtool_link(ifname);
@@ -682,15 +683,20 @@ static void screen_header(WINDOW *screen, const char *ifname, int *voff,
ethtool_drvinf(ifname, &drvinf);
memset(buff, 0, sizeof(buff));
+ memset(machine, 0, sizeof(machine));
+
if (rate)
len += snprintf(buff + len, sizeof(buff) - len, " %uMbit/s", rate);
if (link >= 0)
len += snprintf(buff + len, sizeof(buff) - len, " link:%s",
link == 0 ? "no" : "yes");
+ if (!strstr(uts.release, uts.machine))
+ slprintf(machine, sizeof(machine), " %s,", uts.machine);
+
mvwprintw(screen, (*voff)++, 2,
- "%s, %s, %s (%s%s), t=%lums, cpus=%u%s/%u"
- " ", uts.release, uts.machine,
+ "%s,%s %s (%s%s), t=%lums, cpus=%u%s/%u"
+ " ", uts.release, machine,
ifname, drvinf.driver, buff, ms_interval, top_cpus,
top_cpus > 0 && top_cpus < cpus ? "+1" : "", cpus);
}
ve non-existing entries docs: 00-INDEX: add missing entries for documentation files/dirs docs: 00-INDEX: consolidate process/ and admin-guide/ description scripts: add a script to check if Documentation/00-INDEX is sane Docs: change sh -> awk in REPORTING-BUGS Documentation/core-api/device_link: Add initial documentation core-api: remove an unexpected unident ppc/idle: Add documentation for powersave=off Doc: Correct typo, "Introdution" => "Introduction" Documentation/atomic_ops.txt: convert to ReST markup Documentation/local_ops.txt: convert to ReST markup Documentation/assoc_array.txt: convert to ReST markup docs-rst: parse-headers.pl: cleanup the documentation docs-rst: fix media cleandocs target docs-rst: media/Makefile: reorganize the rules docs-rst: media: build SVG from graphviz files docs-rst: replace bayer.png by a SVG image ...
Diffstat (limited to 'drivers/hid/hid-roccat-savu.c')