diff options
Diffstat (limited to 'fs/udf/directory.c')
-rw-r--r-- | fs/udf/directory.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/udf/directory.c b/fs/udf/directory.c index 2820f8fcf4cc..1d2c570704c8 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #if 0 | 21 | #if 0 |
22 | static uint8_t *udf_filead_read(struct inode *dir, uint8_t *tmpad, | 22 | static uint8_t *udf_filead_read(struct inode *dir, uint8_t *tmpad, |
23 | uint8_t ad_size, kernel_lb_addr fe_loc, | 23 | uint8_t ad_size, struct kernel_lb_addr fe_loc, |
24 | int *pos, int *offset, struct buffer_head **bh, | 24 | int *pos, int *offset, struct buffer_head **bh, |
25 | int *error) | 25 | int *error) |
26 | { | 26 | { |
@@ -75,7 +75,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, | |||
75 | struct udf_fileident_bh *fibh, | 75 | struct udf_fileident_bh *fibh, |
76 | struct fileIdentDesc *cfi, | 76 | struct fileIdentDesc *cfi, |
77 | struct extent_position *epos, | 77 | struct extent_position *epos, |
78 | kernel_lb_addr *eloc, uint32_t *elen, | 78 | struct kernel_lb_addr *eloc, uint32_t *elen, |
79 | sector_t *offset) | 79 | sector_t *offset) |
80 | { | 80 | { |
81 | struct fileIdentDesc *fi; | 81 | struct fileIdentDesc *fi; |
@@ -111,7 +111,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, | |||
111 | (EXT_RECORDED_ALLOCATED >> 30)) | 111 | (EXT_RECORDED_ALLOCATED >> 30)) |
112 | return NULL; | 112 | return NULL; |
113 | 113 | ||
114 | block = udf_get_lb_pblock(dir->i_sb, *eloc, *offset); | 114 | block = udf_get_lb_pblock(dir->i_sb, eloc, *offset); |
115 | 115 | ||
116 | (*offset)++; | 116 | (*offset)++; |
117 | 117 | ||
@@ -131,7 +131,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, | |||
131 | if (i + *offset > (*elen >> blocksize_bits)) | 131 | if (i + *offset > (*elen >> blocksize_bits)) |
132 | i = (*elen >> blocksize_bits)-*offset; | 132 | i = (*elen >> blocksize_bits)-*offset; |
133 | for (num = 0; i > 0; i--) { | 133 | for (num = 0; i > 0; i--) { |
134 | block = udf_get_lb_pblock(dir->i_sb, *eloc, | 134 | block = udf_get_lb_pblock(dir->i_sb, eloc, |
135 | *offset + i); | 135 | *offset + i); |
136 | tmp = udf_tgetblk(dir->i_sb, block); | 136 | tmp = udf_tgetblk(dir->i_sb, block); |
137 | if (tmp && !buffer_uptodate(tmp) && | 137 | if (tmp && !buffer_uptodate(tmp) && |
@@ -169,7 +169,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, | |||
169 | (EXT_RECORDED_ALLOCATED >> 30)) | 169 | (EXT_RECORDED_ALLOCATED >> 30)) |
170 | return NULL; | 170 | return NULL; |
171 | 171 | ||
172 | block = udf_get_lb_pblock(dir->i_sb, *eloc, *offset); | 172 | block = udf_get_lb_pblock(dir->i_sb, eloc, *offset); |
173 | 173 | ||
174 | (*offset)++; | 174 | (*offset)++; |
175 | 175 | ||
@@ -249,9 +249,9 @@ struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, int *offset) | |||
249 | } | 249 | } |
250 | 250 | ||
251 | #if 0 | 251 | #if 0 |
252 | static extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset) | 252 | static struct extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset) |
253 | { | 253 | { |
254 | extent_ad *ext; | 254 | struct extent_ad *ext; |
255 | struct fileEntry *fe; | 255 | struct fileEntry *fe; |
256 | uint8_t *ptr; | 256 | uint8_t *ptr; |
257 | 257 | ||
@@ -274,54 +274,54 @@ static extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset) | |||
274 | if ((*offset > 0) && (*offset < le32_to_cpu(fe->lengthAllocDescs))) | 274 | if ((*offset > 0) && (*offset < le32_to_cpu(fe->lengthAllocDescs))) |
275 | ptr += *offset; | 275 | ptr += *offset; |
276 | 276 | ||
277 | ext = (extent_ad *)ptr; | 277 | ext = (struct extent_ad *)ptr; |
278 | 278 | ||
279 | *offset = *offset + sizeof(extent_ad); | 279 | *offset = *offset + sizeof(struct extent_ad); |
280 | return ext; | 280 | return ext; |
281 | } | 281 | } |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset, | 284 | struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset, |
285 | int inc) | 285 | int inc) |
286 | { | 286 | { |
287 | short_ad *sa; | 287 | struct short_ad *sa; |
288 | 288 | ||
289 | if ((!ptr) || (!offset)) { | 289 | if ((!ptr) || (!offset)) { |
290 | printk(KERN_ERR "udf: udf_get_fileshortad() invalidparms\n"); | 290 | printk(KERN_ERR "udf: udf_get_fileshortad() invalidparms\n"); |
291 | return NULL; | 291 | return NULL; |
292 | } | 292 | } |
293 | 293 | ||
294 | if ((*offset + sizeof(short_ad)) > maxoffset) | 294 | if ((*offset + sizeof(struct short_ad)) > maxoffset) |
295 | return NULL; | 295 | return NULL; |
296 | else { | 296 | else { |
297 | sa = (short_ad *)ptr; | 297 | sa = (struct short_ad *)ptr; |
298 | if (sa->extLength == 0) | 298 | if (sa->extLength == 0) |
299 | return NULL; | 299 | return NULL; |
300 | } | 300 | } |
301 | 301 | ||
302 | if (inc) | 302 | if (inc) |
303 | *offset += sizeof(short_ad); | 303 | *offset += sizeof(struct short_ad); |
304 | return sa; | 304 | return sa; |
305 | } | 305 | } |
306 | 306 | ||
307 | long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, uint32_t *offset, int inc) | 307 | struct long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, uint32_t *offset, int inc) |
308 | { | 308 | { |
309 | long_ad *la; | 309 | struct long_ad *la; |
310 | 310 | ||
311 | if ((!ptr) || (!offset)) { | 311 | if ((!ptr) || (!offset)) { |
312 | printk(KERN_ERR "udf: udf_get_filelongad() invalidparms\n"); | 312 | printk(KERN_ERR "udf: udf_get_filelongad() invalidparms\n"); |
313 | return NULL; | 313 | return NULL; |
314 | } | 314 | } |
315 | 315 | ||
316 | if ((*offset + sizeof(long_ad)) > maxoffset) | 316 | if ((*offset + sizeof(struct long_ad)) > maxoffset) |
317 | return NULL; | 317 | return NULL; |
318 | else { | 318 | else { |
319 | la = (long_ad *)ptr; | 319 | la = (struct long_ad *)ptr; |
320 | if (la->extLength == 0) | 320 | if (la->extLength == 0) |
321 | return NULL; | 321 | return NULL; |
322 | } | 322 | } |
323 | 323 | ||
324 | if (inc) | 324 | if (inc) |
325 | *offset += sizeof(long_ad); | 325 | *offset += sizeof(struct long_ad); |
326 | return la; | 326 | return la; |
327 | } | 327 | } |