diff options
author | James Dominic P. Guana <guana.histark@gmail.com> | 2021-09-15 16:27:46 +0000 |
---|---|---|
committer | Robert Roth <robert.roth.off@gmail.com> | 2022-03-28 04:55:26 +0000 |
commit | e68d20f739e6e3ea9ec601831f55d2b51fd81d85 (patch) | |
tree | 3e3f7c17b40e5449772df41e8d1745ff7b6f849c | |
parent | 48ad21d3293148034e11c3b85b23733b7cc708c6 (diff) | |
download | libgtop-e68d20f739e6e3ea9ec601831f55d2b51fd81d85.tar.gz |
Skip loop and rom
-rw-r--r-- | sysdeps/linux/disk.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/sysdeps/linux/disk.c b/sysdeps/linux/disk.c index 3a8d9e09..f79c1a06 100644 --- a/sysdeps/linux/disk.c +++ b/sysdeps/linux/disk.c @@ -66,13 +66,7 @@ find_primary_part (partition_info *primary_part, const char *m) if (tlvl == 0) { - if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0) { - - n--; - tlvl = 0; - - } - else if (strcmp (type, "disk") == 0) { + if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0 || strcmp (type, "disk") == 0) { primary_part->max++; @@ -86,13 +80,7 @@ find_primary_part (partition_info *primary_part, const char *m) } else if(tlvl == 1){ - if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0) { - - n--; - tlvl = 0; - - } - else if (strcmp (type, "disk") == 0) { + if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0 || strcmp (type, "disk") == 0) { n--; tlvl = 0; @@ -114,13 +102,7 @@ find_primary_part (partition_info *primary_part, const char *m) } else if( tlvl == 2){ - if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0) { - - n--; - tlvl = 0; - - } - else if (strcmp(type, "disk") == 0) { + if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0 || strcmp(type, "disk") == 0) { n--; tlvl = 0; @@ -150,13 +132,7 @@ find_primary_part (partition_info *primary_part, const char *m) } else if (tlvl == 3) { - if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0) { - - n--; - tlvl = 0; - - } - else if (strcmp (type, "disk") == 0) { + if (strcmp (type, "loop") == 0 || strcmp (type, "rom") == 0 || strcmp (type, "disk") == 0) { n--; tlvl = 0; |