summaryrefslogtreecommitdiff
path: root/sysdeps/linux/glibtop_private.c
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@gnome.org>2020-11-06 09:52:00 -0600
committerMichael Catanzaro <mcatanzaro@gnome.org>2020-11-06 09:52:00 -0600
commit30bf8d04183c26ca48c6cd4efe4c24058a082783 (patch)
treea2d4e2598e52ba8863182d76515caaed1dce65ab /sysdeps/linux/glibtop_private.c
parentea08151ae6582a438db76b738293a0194c964b88 (diff)
downloadlibgtop-30bf8d04183c26ca48c6cd4efe4c24058a082783.tar.gz
Revert "Handle LVM and RAID"
This reverts commit 9cbb3b91f11ad0c4944a1428d609201c054cffab.
Diffstat (limited to 'sysdeps/linux/glibtop_private.c')
-rw-r--r--sysdeps/linux/glibtop_private.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/sysdeps/linux/glibtop_private.c b/sysdeps/linux/glibtop_private.c
index 7bca42a5..7b36561c 100644
--- a/sysdeps/linux/glibtop_private.c
+++ b/sysdeps/linux/glibtop_private.c
@@ -57,20 +57,21 @@ skip_token (const char *p)
}
-void
-get_from_pipe (char *buffer, const char *cmd)
+int
+check_alphanumeric_word (const char *p)
{
- FILE* fp;
- long psize;
-
- fp = popen (cmd, "r");
-
- fseek (fp, 0, SEEK_END);
- psize = ftell (fp);
- fseek (fp, 0, SEEK_SET);
- fread(buffer,1,psize,fp);
-
- pclose (fp);
+ int test = 0;
+ p = next_token(p);
+ while (*p && !g_ascii_isspace(*p)) {
+ if(g_ascii_isalpha(*p)){
+ test = 0;
+ }else if(g_ascii_isdigit(*p)){
+ test = 1;
+ }
+ p++;
+ };
+ p = next_token(p);
+ return test;
}