aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/ecma_167.h13
-rw-r--r--fs/udf/super.c9
-rw-r--r--fs/udf/udfend.h22
3 files changed, 5 insertions, 39 deletions
diff --git a/fs/udf/ecma_167.h b/fs/udf/ecma_167.h
index 56387711589b..a0974df82b31 100644
--- a/fs/udf/ecma_167.h
+++ b/fs/udf/ecma_167.h
@@ -70,19 +70,6 @@ typedef struct {
70 uint8_t microseconds; 70 uint8_t microseconds;
71} __attribute__ ((packed)) timestamp; 71} __attribute__ ((packed)) timestamp;
72 72
73typedef struct {
74 uint16_t typeAndTimezone;
75 int16_t year;
76 uint8_t month;
77 uint8_t day;
78 uint8_t hour;
79 uint8_t minute;
80 uint8_t second;
81 uint8_t centiseconds;
82 uint8_t hundredsOfMicroseconds;
83 uint8_t microseconds;
84} __attribute__ ((packed)) kernel_timestamp;
85
86/* Type and Time Zone (ECMA 167r3 1/7.3.1) */ 73/* Type and Time Zone (ECMA 167r3 1/7.3.1) */
87#define TIMESTAMP_TYPE_MASK 0xF000 74#define TIMESTAMP_TYPE_MASK 0xF000
88#define TIMESTAMP_TYPE_CUT 0x0000 75#define TIMESTAMP_TYPE_CUT 0x0000
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 4d2ecee1970b..829ddfa5a148 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -945,12 +945,13 @@ static void udf_load_pvoldesc(struct super_block *sb, struct buffer_head *bh)
945 945
946 if (udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time, 946 if (udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time,
947 pvoldesc->recordingDateAndTime)) { 947 pvoldesc->recordingDateAndTime)) {
948 kernel_timestamp ts; 948#ifdef UDFFS_DEBUG
949 ts = lets_to_cpu(pvoldesc->recordingDateAndTime); 949 timestamp *ts = &pvoldesc->recordingDateAndTime;
950 udf_debug("recording time %04u/%02u/%02u" 950 udf_debug("recording time %04u/%02u/%02u"
951 " %02u:%02u (%x)\n", 951 " %02u:%02u (%x)\n",
952 ts.year, ts.month, ts.day, ts.hour, 952 le16_to_cpu(ts->year), ts->month, ts->day, ts->hour,
953 ts.minute, ts.typeAndTimezone); 953 ts->minute, le16_to_cpu(ts->typeAndTimezone));
954#endif
954 } 955 }
955 956
956 if (!udf_build_ustr(&instr, pvoldesc->volIdent, 32)) 957 if (!udf_build_ustr(&instr, pvoldesc->volIdent, 32))
diff --git a/fs/udf/udfend.h b/fs/udf/udfend.h
index c4bd1203f857..489f52fb428c 100644
--- a/fs/udf/udfend.h
+++ b/fs/udf/udfend.h
@@ -24,17 +24,6 @@ static inline lb_addr cpu_to_lelb(kernel_lb_addr in)
24 return out; 24 return out;
25} 25}
26 26
27static inline kernel_timestamp lets_to_cpu(timestamp in)
28{
29 kernel_timestamp out;
30
31 memcpy(&out, &in, sizeof(timestamp));
32 out.typeAndTimezone = le16_to_cpu(in.typeAndTimezone);
33 out.year = le16_to_cpu(in.year);
34
35 return out;
36}
37
38static inline short_ad lesa_to_cpu(short_ad in) 27static inline short_ad lesa_to_cpu(short_ad in)
39{ 28{
40 short_ad out; 29 short_ad out;
@@ -85,15 +74,4 @@ static inline kernel_extent_ad leea_to_cpu(extent_ad in)
85 return out; 74 return out;
86} 75}
87 76
88static inline timestamp cpu_to_lets(kernel_timestamp in)
89{
90 timestamp out;
91
92 memcpy(&out, &in, sizeof(timestamp));
93 out.typeAndTimezone = cpu_to_le16(in.typeAndTimezone);
94 out.year = cpu_to_le16(in.year);
95
96 return out;
97}
98
99#endif /* __UDF_ENDIAN_H */ 77#endif /* __UDF_ENDIAN_H */