udf: Fix meaning of ENTITYID_FLAGS_* macros to be really bitwise-or flags

Currently ENTITYID_FLAGS_* macros definitions are written as hex numbers
but their meaning is not bitwise-or flags. But rather bit position. This is
unusual and could be misleading. So change meaning of ENTITYID_FLAGS_*
macros definitions to be really bitwise-or flags.

Link: https://lore.kernel.org/r/20200112221353.29711-1-pali.rohar@gmail.com
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
Pali Rohár 2020-01-12 23:13:53 +01:00 committed by Jan Kara
parent a4a8b99ec8
commit 49be68c493
2 changed files with 3 additions and 3 deletions

View File

@ -95,8 +95,8 @@ struct regid {
} __packed; } __packed;
/* Flags (ECMA 167r3 1/7.4.1) */ /* Flags (ECMA 167r3 1/7.4.1) */
#define ENTITYID_FLAGS_DIRTY 0x00 #define ENTITYID_FLAGS_DIRTY 0x01
#define ENTITYID_FLAGS_PROTECTED 0x01 #define ENTITYID_FLAGS_PROTECTED 0x02
/* Volume Structure Descriptor (ECMA 167r3 2/9.1) */ /* Volume Structure Descriptor (ECMA 167r3 2/9.1) */
#define VSD_STD_ID_LEN 5 #define VSD_STD_ID_LEN 5

View File

@ -773,7 +773,7 @@ static int udf_verify_domain_identifier(struct super_block *sb,
udf_warn(sb, "Not OSTA UDF compliant %s descriptor.\n", dname); udf_warn(sb, "Not OSTA UDF compliant %s descriptor.\n", dname);
goto force_ro; goto force_ro;
} }
if (ident->flags & (1 << ENTITYID_FLAGS_DIRTY)) { if (ident->flags & ENTITYID_FLAGS_DIRTY) {
udf_warn(sb, "Possibly not OSTA UDF compliant %s descriptor.\n", udf_warn(sb, "Possibly not OSTA UDF compliant %s descriptor.\n",
dname); dname);
goto force_ro; goto force_ro;