diff options
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/directory.c | 86 | ||||
-rw-r--r-- | fs/udf/lowlevel.c | 4 |
2 files changed, 0 insertions, 90 deletions
diff --git a/fs/udf/directory.c b/fs/udf/directory.c index 1d2c570704c8..2ffdb6733af1 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c | |||
@@ -18,59 +18,6 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/buffer_head.h> | 19 | #include <linux/buffer_head.h> |
20 | 20 | ||
21 | #if 0 | ||
22 | static uint8_t *udf_filead_read(struct inode *dir, uint8_t *tmpad, | ||
23 | uint8_t ad_size, struct kernel_lb_addr fe_loc, | ||
24 | int *pos, int *offset, struct buffer_head **bh, | ||
25 | int *error) | ||
26 | { | ||
27 | int loffset = *offset; | ||
28 | int block; | ||
29 | uint8_t *ad; | ||
30 | int remainder; | ||
31 | |||
32 | *error = 0; | ||
33 | |||
34 | ad = (uint8_t *)(*bh)->b_data + *offset; | ||
35 | *offset += ad_size; | ||
36 | |||
37 | if (!ad) { | ||
38 | brelse(*bh); | ||
39 | *error = 1; | ||
40 | return NULL; | ||
41 | } | ||
42 | |||
43 | if (*offset == dir->i_sb->s_blocksize) { | ||
44 | brelse(*bh); | ||
45 | block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); | ||
46 | if (!block) | ||
47 | return NULL; | ||
48 | *bh = udf_tread(dir->i_sb, block); | ||
49 | if (!*bh) | ||
50 | return NULL; | ||
51 | } else if (*offset > dir->i_sb->s_blocksize) { | ||
52 | ad = tmpad; | ||
53 | |||
54 | remainder = dir->i_sb->s_blocksize - loffset; | ||
55 | memcpy((uint8_t *)ad, (*bh)->b_data + loffset, remainder); | ||
56 | |||
57 | brelse(*bh); | ||
58 | block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); | ||
59 | if (!block) | ||
60 | return NULL; | ||
61 | (*bh) = udf_tread(dir->i_sb, block); | ||
62 | if (!*bh) | ||
63 | return NULL; | ||
64 | |||
65 | memcpy((uint8_t *)ad + remainder, (*bh)->b_data, | ||
66 | ad_size - remainder); | ||
67 | *offset = ad_size - remainder; | ||
68 | } | ||
69 | |||
70 | return ad; | ||
71 | } | ||
72 | #endif | ||
73 | |||
74 | struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, | 21 | struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, |
75 | struct udf_fileident_bh *fibh, | 22 | struct udf_fileident_bh *fibh, |
76 | struct fileIdentDesc *cfi, | 23 | struct fileIdentDesc *cfi, |
@@ -248,39 +195,6 @@ struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, int *offset) | |||
248 | return fi; | 195 | return fi; |
249 | } | 196 | } |
250 | 197 | ||
251 | #if 0 | ||
252 | static struct extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset) | ||
253 | { | ||
254 | struct extent_ad *ext; | ||
255 | struct fileEntry *fe; | ||
256 | uint8_t *ptr; | ||
257 | |||
258 | if ((!buffer) || (!offset)) { | ||
259 | printk(KERN_ERR "udf: udf_get_fileextent() invalidparms\n"); | ||
260 | return NULL; | ||
261 | } | ||
262 | |||
263 | fe = (struct fileEntry *)buffer; | ||
264 | |||
265 | if (fe->descTag.tagIdent != cpu_to_le16(TAG_IDENT_FE)) { | ||
266 | udf_debug("0x%x != TAG_IDENT_FE\n", | ||
267 | le16_to_cpu(fe->descTag.tagIdent)); | ||
268 | return NULL; | ||
269 | } | ||
270 | |||
271 | ptr = (uint8_t *)(fe->extendedAttr) + | ||
272 | le32_to_cpu(fe->lengthExtendedAttr); | ||
273 | |||
274 | if ((*offset > 0) && (*offset < le32_to_cpu(fe->lengthAllocDescs))) | ||
275 | ptr += *offset; | ||
276 | |||
277 | ext = (struct extent_ad *)ptr; | ||
278 | |||
279 | *offset = *offset + sizeof(struct extent_ad); | ||
280 | return ext; | ||
281 | } | ||
282 | #endif | ||
283 | |||
284 | struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset, | 198 | struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset, |
285 | int inc) | 199 | int inc) |
286 | { | 200 | { |
diff --git a/fs/udf/lowlevel.c b/fs/udf/lowlevel.c index 1b88fd5df05d..43e24a3b8e10 100644 --- a/fs/udf/lowlevel.c +++ b/fs/udf/lowlevel.c | |||
@@ -36,14 +36,10 @@ unsigned int udf_get_last_session(struct super_block *sb) | |||
36 | ms_info.addr_format = CDROM_LBA; | 36 | ms_info.addr_format = CDROM_LBA; |
37 | i = ioctl_by_bdev(bdev, CDROMMULTISESSION, (unsigned long)&ms_info); | 37 | i = ioctl_by_bdev(bdev, CDROMMULTISESSION, (unsigned long)&ms_info); |
38 | 38 | ||
39 | #define WE_OBEY_THE_WRITTEN_STANDARDS 1 | ||
40 | |||
41 | if (i == 0) { | 39 | if (i == 0) { |
42 | udf_debug("XA disk: %s, vol_desc_start=%d\n", | 40 | udf_debug("XA disk: %s, vol_desc_start=%d\n", |
43 | (ms_info.xa_flag ? "yes" : "no"), ms_info.addr.lba); | 41 | (ms_info.xa_flag ? "yes" : "no"), ms_info.addr.lba); |
44 | #if WE_OBEY_THE_WRITTEN_STANDARDS | ||
45 | if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */ | 42 | if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */ |
46 | #endif | ||
47 | vol_desc_start = ms_info.addr.lba; | 43 | vol_desc_start = ms_info.addr.lba; |
48 | } else { | 44 | } else { |
49 | udf_debug("CDROMMULTISESSION not supported: rc=%d\n", i); | 45 | udf_debug("CDROMMULTISESSION not supported: rc=%d\n", i); |