lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Sep 2008 14:03:29 +0200
From:	Karel Zak <kzak@...hat.com>
To:	Theodore Tso <tytso@....edu>
Cc:	linux-ext4@...r.kernel.org, Karel Zak <kzak@...hat.com>
Subject: [PATCH] libblki: fix s_feature_compat usage

Note that this patch also fix minor coding still errors.

Signed-off-by: Karel Zak <kzak@...hat.com>
---
 lib/blkid/probe.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
index 10ac803..7bb7470 100644
--- a/lib/blkid/probe.c
+++ b/lib/blkid/probe.c
@@ -150,7 +150,7 @@ static void get_ext2_info(blkid_dev dev, struct blkid_magic *id,
 
 	set_uuid(dev, es->s_uuid, 0);
 
-	if ((es->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+	if ((blkid_le32(es->s_feature_compat) & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
 	    !uuid_is_null(es->s_journal_uuid))
 		set_uuid(dev, es->s_journal_uuid, "EXT_JOURNAL");
 
@@ -171,7 +171,7 @@ static int fs_proc_check(const char *fs_name)
 
 	f = fopen("/proc/filesystems", "r");
 	if (!f)
-		return (0);
+		return 0;
 	while (!feof(f)) {
 		if (!fgets(buf, sizeof(buf), f))
 			break;
@@ -190,11 +190,11 @@ static int fs_proc_check(const char *fs_name)
 			*t = 0;
 		if (!strcmp(fs_name, cp)) {
 			fclose(f);
-			return (1);
+			return 1;
 		}
 	}
 	fclose(f);
-	return (0);
+	return 0;
 }
 
 /*
@@ -209,12 +209,12 @@ static int check_for_modules(const char *fs_name)
 	int		i;
 
 	if (uname(&uts))
-		return (0);
+		return 0;
 	snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release);
 
 	f = fopen(buf, "r");
 	if (!f)
-		return (0);
+		return 0;
 	while (!feof(f)) {
 		if (!fgets(buf, sizeof(buf), f))
 			break;
@@ -231,10 +231,10 @@ static int check_for_modules(const char *fs_name)
 				*t = 0;
 		}
 		if (!strcmp(cp, fs_name))
-			return (1);
+			return 1;
 	}
 	fclose(f);
-	return (0);
+	return 0;
 }
 
 static int system_supports_ext4(void)
@@ -1567,7 +1567,7 @@ int main(int argc, char **argv)
 	dev = blkid_get_dev(cache, argv[1], BLKID_DEV_NORMAL);
 	if (!dev) {
 		printf("%s: %s has an unsupported type\n", argv[0], argv[1]);
-		return (1);
+		return 1;
 	}
 	printf("TYPE='%s'\n", dev->bid_type ? dev->bid_type : "(null)");
 	if (dev->bid_label)
@@ -1576,6 +1576,6 @@ int main(int argc, char **argv)
 		printf("UUID='%s'\n", dev->bid_uuid);
 
 	blkid_free_dev(dev);
-	return (0);
+	return 0;
 }
 #endif
-- 
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ