diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-12-02 07:40:11 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-04-02 06:29:52 -0400 |
commit | 87bc730c07a0884d14d6af5c9d49f4669c0a0589 (patch) | |
tree | aae3f3b6286526e16ee9614923d227612affe51e /fs/udf/udf_sb.h | |
parent | e650b94addfbf072952df762e6f1c6c9e26c4f9c (diff) |
udf: fix default mode and dmode options handling
On x86 (and several other archs) mode_t is defined as "unsigned short"
and comparing unsigned shorts to negative ints is broken (because short
is promoted to int and then compared). Fix it.
Reported-and-tested-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udf_sb.h')
-rw-r--r-- | fs/udf/udf_sb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h index 5d32c609fceb..158221ecdc42 100644 --- a/fs/udf/udf_sb.h +++ b/fs/udf/udf_sb.h | |||
@@ -48,6 +48,8 @@ | |||
48 | #define UDF_SPARABLE_MAP15 0x1522U | 48 | #define UDF_SPARABLE_MAP15 0x1522U |
49 | #define UDF_METADATA_MAP25 0x2511U | 49 | #define UDF_METADATA_MAP25 0x2511U |
50 | 50 | ||
51 | #define UDF_INVALID_MODE ((mode_t)-1) | ||
52 | |||
51 | #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */ | 53 | #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */ |
52 | 54 | ||
53 | struct udf_meta_data { | 55 | struct udf_meta_data { |