[libgtop] Skip loop and rom
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgtop] Skip loop and rom
- Date: Mon, 28 Mar 2022 05:22:57 +0000 (UTC)
commit e68d20f739e6e3ea9ec601831f55d2b51fd81d85
Author: James Dominic P. Guana <guana histark gmail com>
Date: Wed Sep 15 16:27:46 2021 +0000
Skip loop and rom
sysdeps/linux/disk.c | 32 ++++----------------------------
1 file 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]