From 871b9b14c673d862b2f24478ed3583a40906ea66 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Tue, 7 Jan 2020 22:29:03 +0100 Subject: udf: Move OSTA Identifier Suffix macros from ecma_167.h to osta_udf.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename structure name and its members to match naming convention and fix endianity type for UDFRevision member. Also remove duplicate definition of UDF_ID_COMPLIANT which is already in osta_udf.h. Link: https://lore.kernel.org/r/20200107212904.30471-2-pali.rohar@gmail.com Signed-off-by: Pali Rohár Signed-off-by: Jan Kara --- fs/udf/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fs/udf/super.c') diff --git a/fs/udf/super.c b/fs/udf/super.c index 8c28e93e9b73..2d0b90800519 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -767,7 +767,7 @@ static int udf_check_vsd(struct super_block *sb) static int udf_verify_domain_identifier(struct super_block *sb, struct regid *ident, char *dname) { - struct domainEntityIDSuffix *suffix; + struct domainIdentSuffix *suffix; if (memcmp(ident->ident, UDF_ID_COMPLIANT, strlen(UDF_ID_COMPLIANT))) { udf_warn(sb, "Not OSTA UDF compliant %s descriptor.\n", dname); @@ -778,9 +778,9 @@ static int udf_verify_domain_identifier(struct super_block *sb, dname); goto force_ro; } - suffix = (struct domainEntityIDSuffix *)ident->identSuffix; - if (suffix->flags & (1 << ENTITYIDSUFFIX_FLAGS_HARDWRITEPROTECT) || - suffix->flags & (1 << ENTITYIDSUFFIX_FLAGS_SOFTWRITEPROTECT)) { + suffix = (struct domainIdentSuffix *)ident->identSuffix; + if ((suffix->domainFlags & DOMAIN_FLAGS_HARD_WRITE_PROTECT) || + (suffix->domainFlags & DOMAIN_FLAGS_SOFT_WRITE_PROTECT)) { if (!sb_rdonly(sb)) { udf_warn(sb, "Descriptor for %s marked write protected." " Forcing read only mount.\n", dname); -- cgit v1.2.3