Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Remove struct typedefs from fs/udf/ecma_167.h et al.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Pekka Enberg and committed by
Jan Kara
5ca4e4be 833bb304

+444 -442
+19 -19
fs/udf/balloc.c
··· 87 87 { 88 88 struct buffer_head *bh = NULL; 89 89 int retval = 0; 90 - kernel_lb_addr loc; 90 + struct kernel_lb_addr loc; 91 91 92 92 loc.logicalBlockNum = bitmap->s_extPosition; 93 93 loc.partitionReferenceNum = UDF_SB(sb)->s_partition; ··· 156 156 static void udf_bitmap_free_blocks(struct super_block *sb, 157 157 struct inode *inode, 158 158 struct udf_bitmap *bitmap, 159 - kernel_lb_addr bloc, uint32_t offset, 159 + struct kernel_lb_addr bloc, uint32_t offset, 160 160 uint32_t count) 161 161 { 162 162 struct udf_sb_info *sbi = UDF_SB(sb); ··· 425 425 static void udf_table_free_blocks(struct super_block *sb, 426 426 struct inode *inode, 427 427 struct inode *table, 428 - kernel_lb_addr bloc, uint32_t offset, 428 + struct kernel_lb_addr bloc, uint32_t offset, 429 429 uint32_t count) 430 430 { 431 431 struct udf_sb_info *sbi = UDF_SB(sb); 432 432 uint32_t start, end; 433 433 uint32_t elen; 434 - kernel_lb_addr eloc; 434 + struct kernel_lb_addr eloc; 435 435 struct extent_position oepos, epos; 436 436 int8_t etype; 437 437 int i; ··· 532 532 */ 533 533 534 534 int adsize; 535 - short_ad *sad = NULL; 536 - long_ad *lad = NULL; 535 + struct short_ad *sad = NULL; 536 + struct long_ad *lad = NULL; 537 537 struct allocExtDesc *aed; 538 538 539 539 eloc.logicalBlockNum = start; ··· 541 541 (count << sb->s_blocksize_bits); 542 542 543 543 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 544 - adsize = sizeof(short_ad); 544 + adsize = sizeof(struct short_ad); 545 545 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 546 - adsize = sizeof(long_ad); 546 + adsize = sizeof(struct long_ad); 547 547 else { 548 548 brelse(oepos.bh); 549 549 brelse(epos.bh); ··· 601 601 if (sbi->s_udfrev >= 0x0200) 602 602 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED, 603 603 3, 1, epos.block.logicalBlockNum, 604 - sizeof(tag)); 604 + sizeof(struct tag)); 605 605 else 606 606 udf_new_tag(epos.bh->b_data, TAG_IDENT_AED, 607 607 2, 1, epos.block.logicalBlockNum, 608 - sizeof(tag)); 608 + sizeof(struct tag)); 609 609 610 610 switch (iinfo->i_alloc_type) { 611 611 case ICBTAG_FLAG_AD_SHORT: 612 - sad = (short_ad *)sptr; 612 + sad = (struct short_ad *)sptr; 613 613 sad->extLength = cpu_to_le32( 614 614 EXT_NEXT_EXTENT_ALLOCDECS | 615 615 sb->s_blocksize); ··· 617 617 cpu_to_le32(epos.block.logicalBlockNum); 618 618 break; 619 619 case ICBTAG_FLAG_AD_LONG: 620 - lad = (long_ad *)sptr; 620 + lad = (struct long_ad *)sptr; 621 621 lad->extLength = cpu_to_le32( 622 622 EXT_NEXT_EXTENT_ALLOCDECS | 623 623 sb->s_blocksize); ··· 666 666 struct udf_sb_info *sbi = UDF_SB(sb); 667 667 int alloc_count = 0; 668 668 uint32_t elen, adsize; 669 - kernel_lb_addr eloc; 669 + struct kernel_lb_addr eloc; 670 670 struct extent_position epos; 671 671 int8_t etype = -1; 672 672 struct udf_inode_info *iinfo; ··· 677 677 678 678 iinfo = UDF_I(table); 679 679 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 680 - adsize = sizeof(short_ad); 680 + adsize = sizeof(struct short_ad); 681 681 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 682 - adsize = sizeof(long_ad); 682 + adsize = sizeof(struct long_ad); 683 683 else 684 684 return 0; 685 685 ··· 735 735 uint32_t spread = 0xFFFFFFFF, nspread = 0xFFFFFFFF; 736 736 uint32_t newblock = 0, adsize; 737 737 uint32_t elen, goal_elen = 0; 738 - kernel_lb_addr eloc, uninitialized_var(goal_eloc); 738 + struct kernel_lb_addr eloc, uninitialized_var(goal_eloc); 739 739 struct extent_position epos, goal_epos; 740 740 int8_t etype; 741 741 struct udf_inode_info *iinfo = UDF_I(table); ··· 743 743 *err = -ENOSPC; 744 744 745 745 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 746 - adsize = sizeof(short_ad); 746 + adsize = sizeof(struct short_ad); 747 747 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 748 - adsize = sizeof(long_ad); 748 + adsize = sizeof(struct long_ad); 749 749 else 750 750 return newblock; 751 751 ··· 830 830 831 831 inline void udf_free_blocks(struct super_block *sb, 832 832 struct inode *inode, 833 - kernel_lb_addr bloc, uint32_t offset, 833 + struct kernel_lb_addr bloc, uint32_t offset, 834 834 uint32_t count) 835 835 { 836 836 uint16_t partition = bloc.partitionReferenceNum;
+4 -4
fs/udf/dir.c
··· 51 51 uint8_t lfi; 52 52 loff_t size = udf_ext0_offset(dir) + dir->i_size; 53 53 struct buffer_head *tmp, *bha[16]; 54 - kernel_lb_addr eloc; 54 + struct kernel_lb_addr eloc; 55 55 uint32_t elen; 56 56 sector_t offset; 57 57 int i, num, ret = 0; ··· 83 83 block = udf_get_lb_pblock(dir->i_sb, eloc, offset); 84 84 if ((++offset << dir->i_sb->s_blocksize_bits) < elen) { 85 85 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 86 - epos.offset -= sizeof(short_ad); 86 + epos.offset -= sizeof(struct short_ad); 87 87 else if (iinfo->i_alloc_type == 88 88 ICBTAG_FLAG_AD_LONG) 89 - epos.offset -= sizeof(long_ad); 89 + epos.offset -= sizeof(struct long_ad); 90 90 } else { 91 91 offset = 0; 92 92 } ··· 161 161 memcpy(fname, "..", flen); 162 162 dt_type = DT_DIR; 163 163 } else { 164 - kernel_lb_addr tloc = lelb_to_cpu(cfi.icb.extLocation); 164 + struct kernel_lb_addr tloc = lelb_to_cpu(cfi.icb.extLocation); 165 165 166 166 iblock = udf_get_lb_pblock(dir->i_sb, tloc, 0); 167 167 flen = udf_get_filename(dir->i_sb, nameptr, fname, lfi);
+16 -16
fs/udf/directory.c
··· 20 20 21 21 #if 0 22 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 24 int *pos, int *offset, struct buffer_head **bh, 25 25 int *error) 26 26 { ··· 75 75 struct udf_fileident_bh *fibh, 76 76 struct fileIdentDesc *cfi, 77 77 struct extent_position *epos, 78 - kernel_lb_addr *eloc, uint32_t *elen, 78 + struct kernel_lb_addr *eloc, uint32_t *elen, 79 79 sector_t *offset) 80 80 { 81 81 struct fileIdentDesc *fi; ··· 249 249 } 250 250 251 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 255 struct fileEntry *fe; 256 256 uint8_t *ptr; 257 257 ··· 274 274 if ((*offset > 0) && (*offset < le32_to_cpu(fe->lengthAllocDescs))) 275 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 280 return ext; 281 281 } 282 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 285 int inc) 286 286 { 287 - short_ad *sa; 287 + struct short_ad *sa; 288 288 289 289 if ((!ptr) || (!offset)) { 290 290 printk(KERN_ERR "udf: udf_get_fileshortad() invalidparms\n"); 291 291 return NULL; 292 292 } 293 293 294 - if ((*offset + sizeof(short_ad)) > maxoffset) 294 + if ((*offset + sizeof(struct short_ad)) > maxoffset) 295 295 return NULL; 296 296 else { 297 - sa = (short_ad *)ptr; 297 + sa = (struct short_ad *)ptr; 298 298 if (sa->extLength == 0) 299 299 return NULL; 300 300 } 301 301 302 302 if (inc) 303 - *offset += sizeof(short_ad); 303 + *offset += sizeof(struct short_ad); 304 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 311 if ((!ptr) || (!offset)) { 312 312 printk(KERN_ERR "udf: udf_get_filelongad() invalidparms\n"); 313 313 return NULL; 314 314 } 315 315 316 - if ((*offset + sizeof(long_ad)) > maxoffset) 316 + if ((*offset + sizeof(struct long_ad)) > maxoffset) 317 317 return NULL; 318 318 else { 319 - la = (long_ad *)ptr; 319 + la = (struct long_ad *)ptr; 320 320 if (la->extLength == 0) 321 321 return NULL; 322 322 } 323 323 324 324 if (inc) 325 - *offset += sizeof(long_ad); 325 + *offset += sizeof(struct long_ad); 326 326 return la; 327 327 }
+208 -208
fs/udf/ecma_167.h
··· 38 38 #define _ECMA_167_H 1 39 39 40 40 /* Character set specification (ECMA 167r3 1/7.2.1) */ 41 - typedef struct { 41 + struct charspec { 42 42 uint8_t charSetType; 43 43 uint8_t charSetInfo[63]; 44 - } __attribute__ ((packed)) charspec; 44 + } __attribute__ ((packed)); 45 45 46 46 /* Character Set Type (ECMA 167r3 1/7.2.1.1) */ 47 47 #define CHARSPEC_TYPE_CS0 0x00 /* (1/7.2.2) */ ··· 57 57 typedef uint8_t dstring; 58 58 59 59 /* Timestamp (ECMA 167r3 1/7.3) */ 60 - typedef struct { 60 + struct timestamp { 61 61 __le16 typeAndTimezone; 62 62 __le16 year; 63 63 uint8_t month; ··· 68 68 uint8_t centiseconds; 69 69 uint8_t hundredsOfMicroseconds; 70 70 uint8_t microseconds; 71 - } __attribute__ ((packed)) timestamp; 71 + } __attribute__ ((packed)); 72 72 73 73 /* Type and Time Zone (ECMA 167r3 1/7.3.1) */ 74 74 #define TIMESTAMP_TYPE_MASK 0xF000 ··· 78 78 #define TIMESTAMP_TIMEZONE_MASK 0x0FFF 79 79 80 80 /* Entity identifier (ECMA 167r3 1/7.4) */ 81 - typedef struct { 81 + struct regid { 82 82 uint8_t flags; 83 83 uint8_t ident[23]; 84 84 uint8_t identSuffix[8]; 85 - } __attribute__ ((packed)) regid; 85 + } __attribute__ ((packed)); 86 86 87 87 /* Flags (ECMA 167r3 1/7.4.1) */ 88 88 #define ENTITYID_FLAGS_DIRTY 0x00 ··· 126 126 127 127 /* Boot Descriptor (ECMA 167r3 2/9.4) */ 128 128 struct bootDesc { 129 - uint8_t structType; 130 - uint8_t stdIdent[VSD_STD_ID_LEN]; 131 - uint8_t structVersion; 132 - uint8_t reserved1; 133 - regid archType; 134 - regid bootIdent; 135 - __le32 bootExtLocation; 136 - __le32 bootExtLength; 137 - __le64 loadAddress; 138 - __le64 startAddress; 139 - timestamp descCreationDateAndTime; 140 - __le16 flags; 141 - uint8_t reserved2[32]; 142 - uint8_t bootUse[1906]; 129 + uint8_t structType; 130 + uint8_t stdIdent[VSD_STD_ID_LEN]; 131 + uint8_t structVersion; 132 + uint8_t reserved1; 133 + struct regid archType; 134 + struct regid bootIdent; 135 + __le32 bootExtLocation; 136 + __le32 bootExtLength; 137 + __le64 loadAddress; 138 + __le64 startAddress; 139 + struct timestamp descCreationDateAndTime; 140 + __le16 flags; 141 + uint8_t reserved2[32]; 142 + uint8_t bootUse[1906]; 143 143 } __attribute__ ((packed)); 144 144 145 145 /* Flags (ECMA 167r3 2/9.4.12) */ 146 146 #define BOOT_FLAGS_ERASE 0x01 147 147 148 148 /* Extent Descriptor (ECMA 167r3 3/7.1) */ 149 - typedef struct { 149 + struct extent_ad { 150 150 __le32 extLength; 151 151 __le32 extLocation; 152 - } __attribute__ ((packed)) extent_ad; 152 + } __attribute__ ((packed)); 153 153 154 - typedef struct { 154 + struct kernel_extent_ad { 155 155 uint32_t extLength; 156 156 uint32_t extLocation; 157 - } kernel_extent_ad; 157 + }; 158 158 159 159 /* Descriptor Tag (ECMA 167r3 3/7.2) */ 160 - typedef struct { 160 + struct tag { 161 161 __le16 tagIdent; 162 162 __le16 descVersion; 163 163 uint8_t tagChecksum; ··· 166 166 __le16 descCRC; 167 167 __le16 descCRCLength; 168 168 __le32 tagLocation; 169 - } __attribute__ ((packed)) tag; 169 + } __attribute__ ((packed)); 170 170 171 171 /* Tag Identifier (ECMA 167r3 3/7.2.1) */ 172 172 #define TAG_IDENT_PVD 0x0001 ··· 190 190 191 191 /* Primary Volume Descriptor (ECMA 167r3 3/10.1) */ 192 192 struct primaryVolDesc { 193 - tag descTag; 194 - __le32 volDescSeqNum; 195 - __le32 primaryVolDescNum; 196 - dstring volIdent[32]; 197 - __le16 volSeqNum; 198 - __le16 maxVolSeqNum; 199 - __le16 interchangeLvl; 200 - __le16 maxInterchangeLvl; 201 - __le32 charSetList; 202 - __le32 maxCharSetList; 203 - dstring volSetIdent[128]; 204 - charspec descCharSet; 205 - charspec explanatoryCharSet; 206 - extent_ad volAbstract; 207 - extent_ad volCopyright; 208 - regid appIdent; 209 - timestamp recordingDateAndTime; 210 - regid impIdent; 211 - uint8_t impUse[64]; 212 - __le32 predecessorVolDescSeqLocation; 213 - __le16 flags; 214 - uint8_t reserved[22]; 193 + struct tag descTag; 194 + __le32 volDescSeqNum; 195 + __le32 primaryVolDescNum; 196 + dstring volIdent[32]; 197 + __le16 volSeqNum; 198 + __le16 maxVolSeqNum; 199 + __le16 interchangeLvl; 200 + __le16 maxInterchangeLvl; 201 + __le32 charSetList; 202 + __le32 maxCharSetList; 203 + dstring volSetIdent[128]; 204 + struct charspec descCharSet; 205 + struct charspec explanatoryCharSet; 206 + struct extent_ad volAbstract; 207 + struct extent_ad volCopyright; 208 + struct regid appIdent; 209 + struct timestamp recordingDateAndTime; 210 + struct regid impIdent; 211 + uint8_t impUse[64]; 212 + __le32 predecessorVolDescSeqLocation; 213 + __le16 flags; 214 + uint8_t reserved[22]; 215 215 } __attribute__ ((packed)); 216 216 217 217 /* Flags (ECMA 167r3 3/10.1.21) */ ··· 219 219 220 220 /* Anchor Volume Descriptor Pointer (ECMA 167r3 3/10.2) */ 221 221 struct anchorVolDescPtr { 222 - tag descTag; 223 - extent_ad mainVolDescSeqExt; 224 - extent_ad reserveVolDescSeqExt; 225 - uint8_t reserved[480]; 222 + struct tag descTag; 223 + struct extent_ad mainVolDescSeqExt; 224 + struct extent_ad reserveVolDescSeqExt; 225 + uint8_t reserved[480]; 226 226 } __attribute__ ((packed)); 227 227 228 228 /* Volume Descriptor Pointer (ECMA 167r3 3/10.3) */ 229 229 struct volDescPtr { 230 - tag descTag; 231 - __le32 volDescSeqNum; 232 - extent_ad nextVolDescSeqExt; 233 - uint8_t reserved[484]; 230 + struct tag descTag; 231 + __le32 volDescSeqNum; 232 + struct extent_ad nextVolDescSeqExt; 233 + uint8_t reserved[484]; 234 234 } __attribute__ ((packed)); 235 235 236 236 /* Implementation Use Volume Descriptor (ECMA 167r3 3/10.4) */ 237 237 struct impUseVolDesc { 238 - tag descTag; 238 + struct tag descTag; 239 239 __le32 volDescSeqNum; 240 - regid impIdent; 240 + struct regid impIdent; 241 241 uint8_t impUse[460]; 242 242 } __attribute__ ((packed)); 243 243 244 244 /* Partition Descriptor (ECMA 167r3 3/10.5) */ 245 245 struct partitionDesc { 246 - tag descTag; 246 + struct tag descTag; 247 247 __le32 volDescSeqNum; 248 248 __le16 partitionFlags; 249 249 __le16 partitionNumber; 250 - regid partitionContents; 250 + struct regid partitionContents; 251 251 uint8_t partitionContentsUse[128]; 252 252 __le32 accessType; 253 253 __le32 partitionStartingLocation; 254 254 __le32 partitionLength; 255 - regid impIdent; 255 + struct regid impIdent; 256 256 uint8_t impUse[128]; 257 257 uint8_t reserved[156]; 258 258 } __attribute__ ((packed)); ··· 278 278 279 279 /* Logical Volume Descriptor (ECMA 167r3 3/10.6) */ 280 280 struct logicalVolDesc { 281 - tag descTag; 282 - __le32 volDescSeqNum; 283 - charspec descCharSet; 284 - dstring logicalVolIdent[128]; 285 - __le32 logicalBlockSize; 286 - regid domainIdent; 287 - uint8_t logicalVolContentsUse[16]; 288 - __le32 mapTableLength; 289 - __le32 numPartitionMaps; 290 - regid impIdent; 291 - uint8_t impUse[128]; 292 - extent_ad integritySeqExt; 293 - uint8_t partitionMaps[0]; 281 + struct tag descTag; 282 + __le32 volDescSeqNum; 283 + struct charspec descCharSet; 284 + dstring logicalVolIdent[128]; 285 + __le32 logicalBlockSize; 286 + struct regid domainIdent; 287 + uint8_t logicalVolContentsUse[16]; 288 + __le32 mapTableLength; 289 + __le32 numPartitionMaps; 290 + struct regid impIdent; 291 + uint8_t impUse[128]; 292 + struct extent_ad integritySeqExt; 293 + uint8_t partitionMaps[0]; 294 294 } __attribute__ ((packed)); 295 295 296 296 /* Generic Partition Map (ECMA 167r3 3/10.7.1) */ ··· 322 322 323 323 /* Unallocated Space Descriptor (ECMA 167r3 3/10.8) */ 324 324 struct unallocSpaceDesc { 325 - tag descTag; 326 - __le32 volDescSeqNum; 327 - __le32 numAllocDescs; 328 - extent_ad allocDescs[0]; 325 + struct tag descTag; 326 + __le32 volDescSeqNum; 327 + __le32 numAllocDescs; 328 + struct extent_ad allocDescs[0]; 329 329 } __attribute__ ((packed)); 330 330 331 331 /* Terminating Descriptor (ECMA 167r3 3/10.9) */ 332 332 struct terminatingDesc { 333 - tag descTag; 333 + struct tag descTag; 334 334 uint8_t reserved[496]; 335 335 } __attribute__ ((packed)); 336 336 337 337 /* Logical Volume Integrity Descriptor (ECMA 167r3 3/10.10) */ 338 338 struct logicalVolIntegrityDesc { 339 - tag descTag; 340 - timestamp recordingDateAndTime; 341 - __le32 integrityType; 342 - extent_ad nextIntegrityExt; 343 - uint8_t logicalVolContentsUse[32]; 344 - __le32 numOfPartitions; 345 - __le32 lengthOfImpUse; 346 - __le32 freeSpaceTable[0]; 347 - __le32 sizeTable[0]; 348 - uint8_t impUse[0]; 339 + struct tag descTag; 340 + struct timestamp recordingDateAndTime; 341 + __le32 integrityType; 342 + struct extent_ad nextIntegrityExt; 343 + uint8_t logicalVolContentsUse[32]; 344 + __le32 numOfPartitions; 345 + __le32 lengthOfImpUse; 346 + __le32 freeSpaceTable[0]; 347 + __le32 sizeTable[0]; 348 + uint8_t impUse[0]; 349 349 } __attribute__ ((packed)); 350 350 351 351 /* Integrity Type (ECMA 167r3 3/10.10.3) */ ··· 353 353 #define LVID_INTEGRITY_TYPE_CLOSE 0x00000001 354 354 355 355 /* Recorded Address (ECMA 167r3 4/7.1) */ 356 - typedef struct { 356 + struct lb_addr { 357 357 __le32 logicalBlockNum; 358 358 __le16 partitionReferenceNum; 359 - } __attribute__ ((packed)) lb_addr; 359 + } __attribute__ ((packed)); 360 360 361 361 /* ... and its in-core analog */ 362 - typedef struct { 362 + struct kernel_lb_addr { 363 363 uint32_t logicalBlockNum; 364 364 uint16_t partitionReferenceNum; 365 - } kernel_lb_addr; 365 + }; 366 366 367 367 /* Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ 368 - typedef struct { 368 + struct short_ad { 369 369 __le32 extLength; 370 370 __le32 extPosition; 371 - } __attribute__ ((packed)) short_ad; 371 + } __attribute__ ((packed)); 372 372 373 373 /* Long Allocation Descriptor (ECMA 167r3 4/14.14.2) */ 374 - typedef struct { 374 + struct long_ad { 375 375 __le32 extLength; 376 - lb_addr extLocation; 376 + struct lb_addr extLocation; 377 377 uint8_t impUse[6]; 378 - } __attribute__ ((packed)) long_ad; 378 + } __attribute__ ((packed)); 379 379 380 - typedef struct { 381 - uint32_t extLength; 382 - kernel_lb_addr extLocation; 383 - uint8_t impUse[6]; 384 - } kernel_long_ad; 380 + struct kernel_long_ad { 381 + uint32_t extLength; 382 + struct kernel_lb_addr extLocation; 383 + uint8_t impUse[6]; 384 + }; 385 385 386 386 /* Extended Allocation Descriptor (ECMA 167r3 4/14.14.3) */ 387 - typedef struct { 387 + struct ext_ad { 388 388 __le32 extLength; 389 389 __le32 recordedLength; 390 390 __le32 informationLength; 391 - lb_addr extLocation; 392 - } __attribute__ ((packed)) ext_ad; 391 + struct lb_addr extLocation; 392 + } __attribute__ ((packed)); 393 393 394 - typedef struct { 395 - uint32_t extLength; 396 - uint32_t recordedLength; 397 - uint32_t informationLength; 398 - kernel_lb_addr extLocation; 399 - } kernel_ext_ad; 394 + struct kernel_ext_ad { 395 + uint32_t extLength; 396 + uint32_t recordedLength; 397 + uint32_t informationLength; 398 + struct kernel_lb_addr extLocation; 399 + }; 400 400 401 401 /* Descriptor Tag (ECMA 167r3 4/7.2 - See 3/7.2) */ 402 402 ··· 415 415 416 416 /* File Set Descriptor (ECMA 167r3 4/14.1) */ 417 417 struct fileSetDesc { 418 - tag descTag; 419 - timestamp recordingDateAndTime; 420 - __le16 interchangeLvl; 421 - __le16 maxInterchangeLvl; 422 - __le32 charSetList; 423 - __le32 maxCharSetList; 424 - __le32 fileSetNum; 425 - __le32 fileSetDescNum; 426 - charspec logicalVolIdentCharSet; 427 - dstring logicalVolIdent[128]; 428 - charspec fileSetCharSet; 429 - dstring fileSetIdent[32]; 430 - dstring copyrightFileIdent[32]; 431 - dstring abstractFileIdent[32]; 432 - long_ad rootDirectoryICB; 433 - regid domainIdent; 434 - long_ad nextExt; 435 - long_ad streamDirectoryICB; 436 - uint8_t reserved[32]; 418 + struct tag descTag; 419 + struct timestamp recordingDateAndTime; 420 + __le16 interchangeLvl; 421 + __le16 maxInterchangeLvl; 422 + __le32 charSetList; 423 + __le32 maxCharSetList; 424 + __le32 fileSetNum; 425 + __le32 fileSetDescNum; 426 + struct charspec logicalVolIdentCharSet; 427 + dstring logicalVolIdent[128]; 428 + struct charspec fileSetCharSet; 429 + dstring fileSetIdent[32]; 430 + dstring copyrightFileIdent[32]; 431 + dstring abstractFileIdent[32]; 432 + struct long_ad rootDirectoryICB; 433 + struct regid domainIdent; 434 + struct long_ad nextExt; 435 + struct long_ad streamDirectoryICB; 436 + uint8_t reserved[32]; 437 437 } __attribute__ ((packed)); 438 438 439 439 /* Partition Header Descriptor (ECMA 167r3 4/14.3) */ 440 440 struct partitionHeaderDesc { 441 - short_ad unallocSpaceTable; 442 - short_ad unallocSpaceBitmap; 443 - short_ad partitionIntegrityTable; 444 - short_ad freedSpaceTable; 445 - short_ad freedSpaceBitmap; 441 + struct short_ad unallocSpaceTable; 442 + struct short_ad unallocSpaceBitmap; 443 + struct short_ad partitionIntegrityTable; 444 + struct short_ad freedSpaceTable; 445 + struct short_ad freedSpaceBitmap; 446 446 uint8_t reserved[88]; 447 447 } __attribute__ ((packed)); 448 448 449 449 /* File Identifier Descriptor (ECMA 167r3 4/14.4) */ 450 450 struct fileIdentDesc { 451 - tag descTag; 451 + struct tag descTag; 452 452 __le16 fileVersionNum; 453 453 uint8_t fileCharacteristics; 454 454 uint8_t lengthFileIdent; 455 - long_ad icb; 455 + struct long_ad icb; 456 456 __le16 lengthOfImpUse; 457 457 uint8_t impUse[0]; 458 458 uint8_t fileIdent[0]; ··· 468 468 469 469 /* Allocation Ext Descriptor (ECMA 167r3 4/14.5) */ 470 470 struct allocExtDesc { 471 - tag descTag; 471 + struct tag descTag; 472 472 __le32 previousAllocExtLocation; 473 473 __le32 lengthAllocDescs; 474 474 } __attribute__ ((packed)); 475 475 476 476 /* ICB Tag (ECMA 167r3 4/14.6) */ 477 - typedef struct { 477 + struct icbtag { 478 478 __le32 priorRecordedNumDirectEntries; 479 479 __le16 strategyType; 480 480 __le16 strategyParameter; 481 481 __le16 numEntries; 482 482 uint8_t reserved; 483 483 uint8_t fileType; 484 - lb_addr parentICBLocation; 484 + struct lb_addr parentICBLocation; 485 485 __le16 flags; 486 - } __attribute__ ((packed)) icbtag; 486 + } __attribute__ ((packed)); 487 487 488 488 /* Strategy Type (ECMA 167r3 4/14.6.2) */ 489 489 #define ICBTAG_STRATEGY_TYPE_UNDEF 0x0000 ··· 528 528 529 529 /* Indirect Entry (ECMA 167r3 4/14.7) */ 530 530 struct indirectEntry { 531 - tag descTag; 532 - icbtag icbTag; 533 - long_ad indirectICB; 531 + struct tag descTag; 532 + struct icbtag icbTag; 533 + struct long_ad indirectICB; 534 534 } __attribute__ ((packed)); 535 535 536 536 /* Terminal Entry (ECMA 167r3 4/14.8) */ 537 537 struct terminalEntry { 538 - tag descTag; 539 - icbtag icbTag; 538 + struct tag descTag; 539 + struct icbtag icbTag; 540 540 } __attribute__ ((packed)); 541 541 542 542 /* File Entry (ECMA 167r3 4/14.9) */ 543 543 struct fileEntry { 544 - tag descTag; 545 - icbtag icbTag; 546 - __le32 uid; 547 - __le32 gid; 548 - __le32 permissions; 549 - __le16 fileLinkCount; 550 - uint8_t recordFormat; 551 - uint8_t recordDisplayAttr; 552 - __le32 recordLength; 553 - __le64 informationLength; 554 - __le64 logicalBlocksRecorded; 555 - timestamp accessTime; 556 - timestamp modificationTime; 557 - timestamp attrTime; 558 - __le32 checkpoint; 559 - long_ad extendedAttrICB; 560 - regid impIdent; 561 - __le64 uniqueID; 562 - __le32 lengthExtendedAttr; 563 - __le32 lengthAllocDescs; 564 - uint8_t extendedAttr[0]; 565 - uint8_t allocDescs[0]; 544 + struct tag descTag; 545 + struct icbtag icbTag; 546 + __le32 uid; 547 + __le32 gid; 548 + __le32 permissions; 549 + __le16 fileLinkCount; 550 + uint8_t recordFormat; 551 + uint8_t recordDisplayAttr; 552 + __le32 recordLength; 553 + __le64 informationLength; 554 + __le64 logicalBlocksRecorded; 555 + struct timestamp accessTime; 556 + struct timestamp modificationTime; 557 + struct timestamp attrTime; 558 + __le32 checkpoint; 559 + struct long_ad extendedAttrICB; 560 + struct regid impIdent; 561 + __le64 uniqueID; 562 + __le32 lengthExtendedAttr; 563 + __le32 lengthAllocDescs; 564 + uint8_t extendedAttr[0]; 565 + uint8_t allocDescs[0]; 566 566 } __attribute__ ((packed)); 567 567 568 568 /* Permissions (ECMA 167r3 4/14.9.5) */ ··· 604 604 605 605 /* Extended Attribute Header Descriptor (ECMA 167r3 4/14.10.1) */ 606 606 struct extendedAttrHeaderDesc { 607 - tag descTag; 607 + struct tag descTag; 608 608 __le32 impAttrLocation; 609 609 __le32 appAttrLocation; 610 610 } __attribute__ ((packed)); ··· 687 687 uint8_t reserved[3]; 688 688 __le32 attrLength; 689 689 __le32 impUseLength; 690 - regid impIdent; 690 + struct regid impIdent; 691 691 uint8_t impUse[0]; 692 692 } __attribute__ ((packed)); 693 693 ··· 698 698 uint8_t reserved[3]; 699 699 __le32 attrLength; 700 700 __le32 appUseLength; 701 - regid appIdent; 701 + struct regid appIdent; 702 702 uint8_t appUse[0]; 703 703 } __attribute__ ((packed)); 704 704 ··· 712 712 713 713 /* Unallocated Space Entry (ECMA 167r3 4/14.11) */ 714 714 struct unallocSpaceEntry { 715 - tag descTag; 716 - icbtag icbTag; 715 + struct tag descTag; 716 + struct icbtag icbTag; 717 717 __le32 lengthAllocDescs; 718 718 uint8_t allocDescs[0]; 719 719 } __attribute__ ((packed)); 720 720 721 721 /* Space Bitmap Descriptor (ECMA 167r3 4/14.12) */ 722 722 struct spaceBitmapDesc { 723 - tag descTag; 723 + struct tag descTag; 724 724 __le32 numOfBits; 725 725 __le32 numOfBytes; 726 726 uint8_t bitmap[0]; ··· 728 728 729 729 /* Partition Integrity Entry (ECMA 167r3 4/14.13) */ 730 730 struct partitionIntegrityEntry { 731 - tag descTag; 732 - icbtag icbTag; 733 - timestamp recordingDateAndTime; 734 - uint8_t integrityType; 735 - uint8_t reserved[175]; 736 - regid impIdent; 737 - uint8_t impUse[256]; 731 + struct tag descTag; 732 + struct icbtag icbTag; 733 + struct timestamp recordingDateAndTime; 734 + uint8_t integrityType; 735 + uint8_t reserved[175]; 736 + struct regid impIdent; 737 + uint8_t impUse[256]; 738 738 } __attribute__ ((packed)); 739 739 740 740 /* Short Allocation Descriptor (ECMA 167r3 4/14.14.1) */ ··· 765 765 766 766 /* File Entry (ECMA 167r3 4/14.17) */ 767 767 struct extendedFileEntry { 768 - tag descTag; 769 - icbtag icbTag; 770 - __le32 uid; 771 - __le32 gid; 772 - __le32 permissions; 773 - __le16 fileLinkCount; 774 - uint8_t recordFormat; 775 - uint8_t recordDisplayAttr; 776 - __le32 recordLength; 777 - __le64 informationLength; 778 - __le64 objectSize; 779 - __le64 logicalBlocksRecorded; 780 - timestamp accessTime; 781 - timestamp modificationTime; 782 - timestamp createTime; 783 - timestamp attrTime; 784 - __le32 checkpoint; 785 - __le32 reserved; 786 - long_ad extendedAttrICB; 787 - long_ad streamDirectoryICB; 788 - regid impIdent; 789 - __le64 uniqueID; 790 - __le32 lengthExtendedAttr; 791 - __le32 lengthAllocDescs; 792 - uint8_t extendedAttr[0]; 793 - uint8_t allocDescs[0]; 768 + struct tag descTag; 769 + struct icbtag icbTag; 770 + __le32 uid; 771 + __le32 gid; 772 + __le32 permissions; 773 + __le16 fileLinkCount; 774 + uint8_t recordFormat; 775 + uint8_t recordDisplayAttr; 776 + __le32 recordLength; 777 + __le64 informationLength; 778 + __le64 objectSize; 779 + __le64 logicalBlocksRecorded; 780 + struct timestamp accessTime; 781 + struct timestamp modificationTime; 782 + struct timestamp createTime; 783 + struct timestamp attrTime; 784 + __le32 checkpoint; 785 + __le32 reserved; 786 + struct long_ad extendedAttrICB; 787 + struct long_ad streamDirectoryICB; 788 + struct regid impIdent; 789 + __le64 uniqueID; 790 + __le32 lengthExtendedAttr; 791 + __le32 lengthAllocDescs; 792 + uint8_t extendedAttr[0]; 793 + uint8_t allocDescs[0]; 794 794 } __attribute__ ((packed)); 795 795 796 796 #endif /* _ECMA_167_H */
+70 -70
fs/udf/inode.c
··· 55 55 static struct buffer_head *inode_getblk(struct inode *, sector_t, int *, 56 56 sector_t *, int *); 57 57 static int8_t udf_insert_aext(struct inode *, struct extent_position, 58 - kernel_lb_addr, uint32_t); 58 + struct kernel_lb_addr, uint32_t); 59 59 static void udf_split_extents(struct inode *, int *, int, int, 60 - kernel_long_ad[EXTENT_MERGE_SIZE], int *); 60 + struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); 61 61 static void udf_prealloc_extents(struct inode *, int, int, 62 - kernel_long_ad[EXTENT_MERGE_SIZE], int *); 62 + struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); 63 63 static void udf_merge_extents(struct inode *, 64 - kernel_long_ad[EXTENT_MERGE_SIZE], int *); 64 + struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); 65 65 static void udf_update_extents(struct inode *, 66 - kernel_long_ad[EXTENT_MERGE_SIZE], int, int, 66 + struct kernel_long_ad[EXTENT_MERGE_SIZE], int, int, 67 67 struct extent_position *); 68 68 static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int); 69 69 ··· 200 200 { 201 201 int newblock; 202 202 struct buffer_head *dbh = NULL; 203 - kernel_lb_addr eloc; 203 + struct kernel_lb_addr eloc; 204 204 uint32_t elen; 205 205 uint8_t alloctype; 206 206 struct extent_position epos; ··· 359 359 360 360 /* Extend the file by 'blocks' blocks, return the number of extents added */ 361 361 int udf_extend_file(struct inode *inode, struct extent_position *last_pos, 362 - kernel_long_ad *last_ext, sector_t blocks) 362 + struct kernel_long_ad *last_ext, sector_t blocks) 363 363 { 364 364 sector_t add; 365 365 int count = 0, fake = !(last_ext->extLength & UDF_EXTENT_LENGTH_MASK); 366 366 struct super_block *sb = inode->i_sb; 367 - kernel_lb_addr prealloc_loc = {}; 367 + struct kernel_lb_addr prealloc_loc = {}; 368 368 int prealloc_len = 0; 369 369 struct udf_inode_info *iinfo; 370 370 ··· 459 459 460 460 /* last_pos should point to the last written extent... */ 461 461 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 462 - last_pos->offset -= sizeof(short_ad); 462 + last_pos->offset -= sizeof(struct short_ad); 463 463 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 464 - last_pos->offset -= sizeof(long_ad); 464 + last_pos->offset -= sizeof(struct long_ad); 465 465 else 466 466 return -1; 467 467 ··· 473 473 { 474 474 static sector_t last_block; 475 475 struct buffer_head *result = NULL; 476 - kernel_long_ad laarr[EXTENT_MERGE_SIZE]; 476 + struct kernel_long_ad laarr[EXTENT_MERGE_SIZE]; 477 477 struct extent_position prev_epos, cur_epos, next_epos; 478 478 int count = 0, startnum = 0, endnum = 0; 479 479 uint32_t elen = 0, tmpelen; 480 - kernel_lb_addr eloc, tmpeloc; 480 + struct kernel_lb_addr eloc, tmpeloc; 481 481 int c = 1; 482 482 loff_t lbcount = 0, b_off = 0; 483 483 uint32_t newblocknum, newblock; ··· 572 572 } else { 573 573 /* Create a fake extent when there's not one */ 574 574 memset(&laarr[0].extLocation, 0x00, 575 - sizeof(kernel_lb_addr)); 575 + sizeof(struct kernel_lb_addr)); 576 576 laarr[0].extLength = EXT_NOT_RECORDED_NOT_ALLOCATED; 577 577 /* Will udf_extend_file() create real extent from 578 578 a fake one? */ ··· 602 602 laarr[c].extLength = EXT_NOT_RECORDED_NOT_ALLOCATED | 603 603 inode->i_sb->s_blocksize; 604 604 memset(&laarr[c].extLocation, 0x00, 605 - sizeof(kernel_lb_addr)); 605 + sizeof(struct kernel_lb_addr)); 606 606 count++; 607 607 endnum++; 608 608 } ··· 699 699 700 700 static void udf_split_extents(struct inode *inode, int *c, int offset, 701 701 int newblocknum, 702 - kernel_long_ad laarr[EXTENT_MERGE_SIZE], 702 + struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], 703 703 int *endnum) 704 704 { 705 705 unsigned long blocksize = inode->i_sb->s_blocksize; ··· 763 763 } 764 764 765 765 static void udf_prealloc_extents(struct inode *inode, int c, int lastblock, 766 - kernel_long_ad laarr[EXTENT_MERGE_SIZE], 766 + struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], 767 767 int *endnum) 768 768 { 769 769 int start, length = 0, currlength = 0, i; ··· 817 817 inode->i_sb->s_blocksize_bits); 818 818 else { 819 819 memmove(&laarr[c + 2], &laarr[c + 1], 820 - sizeof(long_ad) * (*endnum - (c + 1))); 820 + sizeof(struct long_ad) * (*endnum - (c + 1))); 821 821 (*endnum)++; 822 822 laarr[c + 1].extLocation.logicalBlockNum = next; 823 823 laarr[c + 1].extLocation.partitionReferenceNum = ··· 846 846 if (*endnum > (i + 1)) 847 847 memmove(&laarr[i], 848 848 &laarr[i + 1], 849 - sizeof(long_ad) * 849 + sizeof(struct long_ad) * 850 850 (*endnum - (i + 1))); 851 851 i--; 852 852 (*endnum)--; ··· 859 859 } 860 860 861 861 static void udf_merge_extents(struct inode *inode, 862 - kernel_long_ad laarr[EXTENT_MERGE_SIZE], 862 + struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], 863 863 int *endnum) 864 864 { 865 865 int i; ··· 867 867 unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; 868 868 869 869 for (i = 0; i < (*endnum - 1); i++) { 870 - kernel_long_ad *li /*l[i]*/ = &laarr[i]; 871 - kernel_long_ad *lip1 /*l[i plus 1]*/ = &laarr[i + 1]; 870 + struct kernel_long_ad *li /*l[i]*/ = &laarr[i]; 871 + struct kernel_long_ad *lip1 /*l[i plus 1]*/ = &laarr[i + 1]; 872 872 873 873 if (((li->extLength >> 30) == (lip1->extLength >> 30)) && 874 874 (((li->extLength >> 30) == ··· 902 902 blocksize - 1) & ~(blocksize - 1)); 903 903 if (*endnum > (i + 2)) 904 904 memmove(&laarr[i + 1], &laarr[i + 2], 905 - sizeof(long_ad) * 905 + sizeof(struct long_ad) * 906 906 (*endnum - (i + 2))); 907 907 i--; 908 908 (*endnum)--; ··· 937 937 blocksize - 1) & ~(blocksize - 1)); 938 938 if (*endnum > (i + 2)) 939 939 memmove(&laarr[i + 1], &laarr[i + 2], 940 - sizeof(long_ad) * 940 + sizeof(struct long_ad) * 941 941 (*endnum - (i + 2))); 942 942 i--; 943 943 (*endnum)--; ··· 959 959 } 960 960 961 961 static void udf_update_extents(struct inode *inode, 962 - kernel_long_ad laarr[EXTENT_MERGE_SIZE], 962 + struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], 963 963 int startnum, int endnum, 964 964 struct extent_position *epos) 965 965 { 966 966 int start = 0, i; 967 - kernel_lb_addr tmploc; 967 + struct kernel_lb_addr tmploc; 968 968 uint32_t tmplen; 969 969 970 970 if (startnum > endnum) { ··· 1102 1102 &ident); 1103 1103 if (ident == TAG_IDENT_IE && ibh) { 1104 1104 struct buffer_head *nbh = NULL; 1105 - kernel_lb_addr loc; 1105 + struct kernel_lb_addr loc; 1106 1106 struct indirectEntry *ie; 1107 1107 1108 1108 ie = (struct indirectEntry *)ibh->b_data; ··· 1115 1115 ident == TAG_IDENT_EFE) { 1116 1116 memcpy(&iinfo->i_location, 1117 1117 &loc, 1118 - sizeof(kernel_lb_addr)); 1118 + sizeof(struct kernel_lb_addr)); 1119 1119 brelse(bh); 1120 1120 brelse(ibh); 1121 1121 brelse(nbh); ··· 1416 1416 iinfo->i_ext.i_data, inode->i_sb->s_blocksize - 1417 1417 sizeof(struct unallocSpaceEntry)); 1418 1418 crclen = sizeof(struct unallocSpaceEntry) + 1419 - iinfo->i_lenAlloc - sizeof(tag); 1419 + iinfo->i_lenAlloc - sizeof(struct tag); 1420 1420 use->descTag.tagLocation = cpu_to_le32( 1421 1421 iinfo->i_location. 1422 1422 logicalBlockNum); 1423 1423 use->descTag.descCRCLength = cpu_to_le16(crclen); 1424 1424 use->descTag.descCRC = cpu_to_le16(crc_itu_t(0, (char *)use + 1425 - sizeof(tag), 1425 + sizeof(struct tag), 1426 1426 crclen)); 1427 1427 use->descTag.tagChecksum = udf_tag_checksum(&use->descTag); 1428 1428 ··· 1459 1459 fe->informationLength = cpu_to_le64(inode->i_size); 1460 1460 1461 1461 if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode)) { 1462 - regid *eid; 1462 + struct regid *eid; 1463 1463 struct deviceSpec *dsea = 1464 1464 (struct deviceSpec *)udf_get_extendedattr(inode, 12, 1); 1465 1465 if (!dsea) { 1466 1466 dsea = (struct deviceSpec *) 1467 1467 udf_add_extendedattr(inode, 1468 1468 sizeof(struct deviceSpec) + 1469 - sizeof(regid), 12, 0x3); 1469 + sizeof(struct regid), 12, 0x3); 1470 1470 dsea->attrType = cpu_to_le32(12); 1471 1471 dsea->attrSubtype = 1; 1472 1472 dsea->attrLength = cpu_to_le32( 1473 1473 sizeof(struct deviceSpec) + 1474 - sizeof(regid)); 1475 - dsea->impUseLength = cpu_to_le32(sizeof(regid)); 1474 + sizeof(struct regid)); 1475 + dsea->impUseLength = cpu_to_le32(sizeof(struct regid)); 1476 1476 } 1477 - eid = (regid *)dsea->impUse; 1478 - memset(eid, 0, sizeof(regid)); 1477 + eid = (struct regid *)dsea->impUse; 1478 + memset(eid, 0, sizeof(struct regid)); 1479 1479 strcpy(eid->ident, UDF_ID_DEVELOPER); 1480 1480 eid->identSuffix[0] = UDF_OS_CLASS_UNIX; 1481 1481 eid->identSuffix[1] = UDF_OS_ID_LINUX; ··· 1494 1494 udf_time_to_disk_stamp(&fe->accessTime, inode->i_atime); 1495 1495 udf_time_to_disk_stamp(&fe->modificationTime, inode->i_mtime); 1496 1496 udf_time_to_disk_stamp(&fe->attrTime, inode->i_ctime); 1497 - memset(&(fe->impIdent), 0, sizeof(regid)); 1497 + memset(&(fe->impIdent), 0, sizeof(struct regid)); 1498 1498 strcpy(fe->impIdent.ident, UDF_ID_DEVELOPER); 1499 1499 fe->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; 1500 1500 fe->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; ··· 1533 1533 udf_time_to_disk_stamp(&efe->createTime, iinfo->i_crtime); 1534 1534 udf_time_to_disk_stamp(&efe->attrTime, inode->i_ctime); 1535 1535 1536 - memset(&(efe->impIdent), 0, sizeof(regid)); 1536 + memset(&(efe->impIdent), 0, sizeof(struct regid)); 1537 1537 strcpy(efe->impIdent.ident, UDF_ID_DEVELOPER); 1538 1538 efe->impIdent.identSuffix[0] = UDF_OS_CLASS_UNIX; 1539 1539 efe->impIdent.identSuffix[1] = UDF_OS_ID_LINUX; ··· 1584 1584 fe->descTag.tagLocation = cpu_to_le32( 1585 1585 iinfo->i_location.logicalBlockNum); 1586 1586 crclen += iinfo->i_lenEAttr + iinfo->i_lenAlloc - 1587 - sizeof(tag); 1587 + sizeof(struct tag); 1588 1588 fe->descTag.descCRCLength = cpu_to_le16(crclen); 1589 - fe->descTag.descCRC = cpu_to_le16(crc_itu_t(0, (char *)fe + sizeof(tag), 1589 + fe->descTag.descCRC = cpu_to_le16(crc_itu_t(0, (char *)fe + sizeof(struct tag), 1590 1590 crclen)); 1591 1591 fe->descTag.tagChecksum = udf_tag_checksum(&fe->descTag); 1592 1592 ··· 1606 1606 return err; 1607 1607 } 1608 1608 1609 - struct inode *udf_iget(struct super_block *sb, kernel_lb_addr ino) 1609 + struct inode *udf_iget(struct super_block *sb, struct kernel_lb_addr ino) 1610 1610 { 1611 1611 unsigned long block = udf_get_lb_pblock(sb, ino, 0); 1612 1612 struct inode *inode = iget_locked(sb, block); ··· 1615 1615 return NULL; 1616 1616 1617 1617 if (inode->i_state & I_NEW) { 1618 - memcpy(&UDF_I(inode)->i_location, &ino, sizeof(kernel_lb_addr)); 1618 + memcpy(&UDF_I(inode)->i_location, &ino, sizeof(struct kernel_lb_addr)); 1619 1619 __udf_read_inode(inode); 1620 1620 unlock_new_inode(inode); 1621 1621 } ··· 1639 1639 } 1640 1640 1641 1641 int8_t udf_add_aext(struct inode *inode, struct extent_position *epos, 1642 - kernel_lb_addr eloc, uint32_t elen, int inc) 1642 + struct kernel_lb_addr eloc, uint32_t elen, int inc) 1643 1643 { 1644 1644 int adsize; 1645 - short_ad *sad = NULL; 1646 - long_ad *lad = NULL; 1645 + struct short_ad *sad = NULL; 1646 + struct long_ad *lad = NULL; 1647 1647 struct allocExtDesc *aed; 1648 1648 int8_t etype; 1649 1649 uint8_t *ptr; ··· 1657 1657 ptr = epos->bh->b_data + epos->offset; 1658 1658 1659 1659 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 1660 - adsize = sizeof(short_ad); 1660 + adsize = sizeof(struct short_ad); 1661 1661 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 1662 - adsize = sizeof(long_ad); 1662 + adsize = sizeof(struct long_ad); 1663 1663 else 1664 1664 return -1; 1665 1665 ··· 1667 1667 char *sptr, *dptr; 1668 1668 struct buffer_head *nbh; 1669 1669 int err, loffset; 1670 - kernel_lb_addr obloc = epos->block; 1670 + struct kernel_lb_addr obloc = epos->block; 1671 1671 1672 1672 epos->block.logicalBlockNum = udf_new_block(inode->i_sb, NULL, 1673 1673 obloc.partitionReferenceNum, ··· 1712 1712 } 1713 1713 if (UDF_SB(inode->i_sb)->s_udfrev >= 0x0200) 1714 1714 udf_new_tag(nbh->b_data, TAG_IDENT_AED, 3, 1, 1715 - epos->block.logicalBlockNum, sizeof(tag)); 1715 + epos->block.logicalBlockNum, sizeof(struct tag)); 1716 1716 else 1717 1717 udf_new_tag(nbh->b_data, TAG_IDENT_AED, 2, 1, 1718 - epos->block.logicalBlockNum, sizeof(tag)); 1718 + epos->block.logicalBlockNum, sizeof(struct tag)); 1719 1719 switch (iinfo->i_alloc_type) { 1720 1720 case ICBTAG_FLAG_AD_SHORT: 1721 - sad = (short_ad *)sptr; 1721 + sad = (struct short_ad *)sptr; 1722 1722 sad->extLength = cpu_to_le32(EXT_NEXT_EXTENT_ALLOCDECS | 1723 1723 inode->i_sb->s_blocksize); 1724 1724 sad->extPosition = 1725 1725 cpu_to_le32(epos->block.logicalBlockNum); 1726 1726 break; 1727 1727 case ICBTAG_FLAG_AD_LONG: 1728 - lad = (long_ad *)sptr; 1728 + lad = (struct long_ad *)sptr; 1729 1729 lad->extLength = cpu_to_le32(EXT_NEXT_EXTENT_ALLOCDECS | 1730 1730 inode->i_sb->s_blocksize); 1731 1731 lad->extLocation = cpu_to_lelb(epos->block); ··· 1769 1769 } 1770 1770 1771 1771 int8_t udf_write_aext(struct inode *inode, struct extent_position *epos, 1772 - kernel_lb_addr eloc, uint32_t elen, int inc) 1772 + struct kernel_lb_addr eloc, uint32_t elen, int inc) 1773 1773 { 1774 1774 int adsize; 1775 1775 uint8_t *ptr; 1776 - short_ad *sad; 1777 - long_ad *lad; 1776 + struct short_ad *sad; 1777 + struct long_ad *lad; 1778 1778 struct udf_inode_info *iinfo = UDF_I(inode); 1779 1779 1780 1780 if (!epos->bh) ··· 1786 1786 1787 1787 switch (iinfo->i_alloc_type) { 1788 1788 case ICBTAG_FLAG_AD_SHORT: 1789 - sad = (short_ad *)ptr; 1789 + sad = (struct short_ad *)ptr; 1790 1790 sad->extLength = cpu_to_le32(elen); 1791 1791 sad->extPosition = cpu_to_le32(eloc.logicalBlockNum); 1792 - adsize = sizeof(short_ad); 1792 + adsize = sizeof(struct short_ad); 1793 1793 break; 1794 1794 case ICBTAG_FLAG_AD_LONG: 1795 - lad = (long_ad *)ptr; 1795 + lad = (struct long_ad *)ptr; 1796 1796 lad->extLength = cpu_to_le32(elen); 1797 1797 lad->extLocation = cpu_to_lelb(eloc); 1798 1798 memset(lad->impUse, 0x00, sizeof(lad->impUse)); 1799 - adsize = sizeof(long_ad); 1799 + adsize = sizeof(struct long_ad); 1800 1800 break; 1801 1801 default: 1802 1802 return -1; ··· 1823 1823 } 1824 1824 1825 1825 int8_t udf_next_aext(struct inode *inode, struct extent_position *epos, 1826 - kernel_lb_addr *eloc, uint32_t *elen, int inc) 1826 + struct kernel_lb_addr *eloc, uint32_t *elen, int inc) 1827 1827 { 1828 1828 int8_t etype; 1829 1829 ··· 1845 1845 } 1846 1846 1847 1847 int8_t udf_current_aext(struct inode *inode, struct extent_position *epos, 1848 - kernel_lb_addr *eloc, uint32_t *elen, int inc) 1848 + struct kernel_lb_addr *eloc, uint32_t *elen, int inc) 1849 1849 { 1850 1850 int alen; 1851 1851 int8_t etype; 1852 1852 uint8_t *ptr; 1853 - short_ad *sad; 1854 - long_ad *lad; 1853 + struct short_ad *sad; 1854 + struct long_ad *lad; 1855 1855 struct udf_inode_info *iinfo = UDF_I(inode); 1856 1856 1857 1857 if (!epos->bh) { ··· 1900 1900 } 1901 1901 1902 1902 static int8_t udf_insert_aext(struct inode *inode, struct extent_position epos, 1903 - kernel_lb_addr neloc, uint32_t nelen) 1903 + struct kernel_lb_addr neloc, uint32_t nelen) 1904 1904 { 1905 - kernel_lb_addr oeloc; 1905 + struct kernel_lb_addr oeloc; 1906 1906 uint32_t oelen; 1907 1907 int8_t etype; 1908 1908 ··· 1921 1921 } 1922 1922 1923 1923 int8_t udf_delete_aext(struct inode *inode, struct extent_position epos, 1924 - kernel_lb_addr eloc, uint32_t elen) 1924 + struct kernel_lb_addr eloc, uint32_t elen) 1925 1925 { 1926 1926 struct extent_position oepos; 1927 1927 int adsize; ··· 1936 1936 1937 1937 iinfo = UDF_I(inode); 1938 1938 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 1939 - adsize = sizeof(short_ad); 1939 + adsize = sizeof(struct short_ad); 1940 1940 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 1941 - adsize = sizeof(long_ad); 1941 + adsize = sizeof(struct long_ad); 1942 1942 else 1943 1943 adsize = 0; 1944 1944 ··· 1956 1956 oepos.offset = epos.offset - adsize; 1957 1957 } 1958 1958 } 1959 - memset(&eloc, 0x00, sizeof(kernel_lb_addr)); 1959 + memset(&eloc, 0x00, sizeof(struct kernel_lb_addr)); 1960 1960 elen = 0; 1961 1961 1962 1962 if (epos.bh != oepos.bh) { ··· 2004 2004 } 2005 2005 2006 2006 int8_t inode_bmap(struct inode *inode, sector_t block, 2007 - struct extent_position *pos, kernel_lb_addr *eloc, 2007 + struct extent_position *pos, struct kernel_lb_addr *eloc, 2008 2008 uint32_t *elen, sector_t *offset) 2009 2009 { 2010 2010 unsigned char blocksize_bits = inode->i_sb->s_blocksize_bits; ··· 2036 2036 2037 2037 long udf_block_map(struct inode *inode, sector_t block) 2038 2038 { 2039 - kernel_lb_addr eloc; 2039 + struct kernel_lb_addr eloc; 2040 2040 uint32_t elen; 2041 2041 sector_t offset; 2042 2042 struct extent_position epos = {};
+13 -13
fs/udf/misc.c
··· 134 134 } 135 135 } 136 136 /* rewrite CRC + checksum of eahd */ 137 - crclen = sizeof(struct extendedAttrHeaderDesc) - sizeof(tag); 137 + crclen = sizeof(struct extendedAttrHeaderDesc) - sizeof(struct tag); 138 138 eahd->descTag.descCRCLength = cpu_to_le16(crclen); 139 139 eahd->descTag.descCRC = cpu_to_le16(crc_itu_t(0, (char *)eahd + 140 - sizeof(tag), crclen)); 140 + sizeof(struct tag), crclen)); 141 141 eahd->descTag.tagChecksum = udf_tag_checksum(&eahd->descTag); 142 142 iinfo->i_lenEAttr += size; 143 143 return (struct genericFormat *)&ea[offset]; ··· 202 202 struct buffer_head *udf_read_tagged(struct super_block *sb, uint32_t block, 203 203 uint32_t location, uint16_t *ident) 204 204 { 205 - tag *tag_p; 205 + struct tag *tag_p; 206 206 struct buffer_head *bh = NULL; 207 207 208 208 /* Read the block */ ··· 216 216 return NULL; 217 217 } 218 218 219 - tag_p = (tag *)(bh->b_data); 219 + tag_p = (struct tag *)(bh->b_data); 220 220 221 221 *ident = le16_to_cpu(tag_p->tagIdent); 222 222 ··· 241 241 } 242 242 243 243 /* Verify the descriptor CRC */ 244 - if (le16_to_cpu(tag_p->descCRCLength) + sizeof(tag) > sb->s_blocksize || 244 + if (le16_to_cpu(tag_p->descCRCLength) + sizeof(struct tag) > sb->s_blocksize || 245 245 le16_to_cpu(tag_p->descCRC) == crc_itu_t(0, 246 - bh->b_data + sizeof(tag), 246 + bh->b_data + sizeof(struct tag), 247 247 le16_to_cpu(tag_p->descCRCLength))) 248 248 return bh; 249 249 ··· 255 255 return NULL; 256 256 } 257 257 258 - struct buffer_head *udf_read_ptagged(struct super_block *sb, kernel_lb_addr loc, 258 + struct buffer_head *udf_read_ptagged(struct super_block *sb, struct kernel_lb_addr loc, 259 259 uint32_t offset, uint16_t *ident) 260 260 { 261 261 return udf_read_tagged(sb, udf_get_lb_pblock(sb, loc, offset), ··· 264 264 265 265 void udf_update_tag(char *data, int length) 266 266 { 267 - tag *tptr = (tag *)data; 268 - length -= sizeof(tag); 267 + struct tag *tptr = (struct tag *)data; 268 + length -= sizeof(struct tag); 269 269 270 270 tptr->descCRCLength = cpu_to_le16(length); 271 - tptr->descCRC = cpu_to_le16(crc_itu_t(0, data + sizeof(tag), length)); 271 + tptr->descCRC = cpu_to_le16(crc_itu_t(0, data + sizeof(struct tag), length)); 272 272 tptr->tagChecksum = udf_tag_checksum(tptr); 273 273 } 274 274 275 275 void udf_new_tag(char *data, uint16_t ident, uint16_t version, uint16_t snum, 276 276 uint32_t loc, int length) 277 277 { 278 - tag *tptr = (tag *)data; 278 + struct tag *tptr = (struct tag *)data; 279 279 tptr->tagIdent = cpu_to_le16(ident); 280 280 tptr->descVersion = cpu_to_le16(version); 281 281 tptr->tagSerialNum = cpu_to_le16(snum); ··· 283 283 udf_update_tag(data, length); 284 284 } 285 285 286 - u8 udf_tag_checksum(const tag *t) 286 + u8 udf_tag_checksum(const struct tag *t) 287 287 { 288 288 u8 *data = (u8 *)t; 289 289 u8 checksum = 0; 290 290 int i; 291 - for (i = 0; i < sizeof(tag); ++i) 291 + for (i = 0; i < sizeof(struct tag); ++i) 292 292 if (i != 4) /* position of checksum */ 293 293 checksum += data[i]; 294 294 return checksum;
+27 -27
fs/udf/namei.c
··· 47 47 struct fileIdentDesc *sfi, struct udf_fileident_bh *fibh, 48 48 uint8_t *impuse, uint8_t *fileident) 49 49 { 50 - uint16_t crclen = fibh->eoffset - fibh->soffset - sizeof(tag); 50 + uint16_t crclen = fibh->eoffset - fibh->soffset - sizeof(struct tag); 51 51 uint16_t crc; 52 52 int offset; 53 53 uint16_t liu = le16_to_cpu(cfi->lengthOfImpUse); ··· 99 99 memset(fibh->ebh->b_data, 0x00, padlen + offset); 100 100 } 101 101 102 - crc = crc_itu_t(0, (uint8_t *)cfi + sizeof(tag), 103 - sizeof(struct fileIdentDesc) - sizeof(tag)); 102 + crc = crc_itu_t(0, (uint8_t *)cfi + sizeof(struct tag), 103 + sizeof(struct fileIdentDesc) - sizeof(struct tag)); 104 104 105 105 if (fibh->sbh == fibh->ebh) { 106 106 crc = crc_itu_t(crc, (uint8_t *)sfi->impUse, 107 - crclen + sizeof(tag) - 107 + crclen + sizeof(struct tag) - 108 108 sizeof(struct fileIdentDesc)); 109 109 } else if (sizeof(struct fileIdentDesc) >= -fibh->soffset) { 110 110 crc = crc_itu_t(crc, fibh->ebh->b_data + 111 111 sizeof(struct fileIdentDesc) + 112 112 fibh->soffset, 113 - crclen + sizeof(tag) - 113 + crclen + sizeof(struct tag) - 114 114 sizeof(struct fileIdentDesc)); 115 115 } else { 116 116 crc = crc_itu_t(crc, (uint8_t *)sfi->impUse, ··· 154 154 uint8_t lfi; 155 155 uint16_t liu; 156 156 loff_t size; 157 - kernel_lb_addr eloc; 157 + struct kernel_lb_addr eloc; 158 158 uint32_t elen; 159 159 sector_t offset; 160 160 struct extent_position epos = {}; ··· 174 174 block = udf_get_lb_pblock(dir->i_sb, eloc, offset); 175 175 if ((++offset << dir->i_sb->s_blocksize_bits) < elen) { 176 176 if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 177 - epos.offset -= sizeof(short_ad); 177 + epos.offset -= sizeof(struct short_ad); 178 178 else if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 179 - epos.offset -= sizeof(long_ad); 179 + epos.offset -= sizeof(struct long_ad); 180 180 } else 181 181 offset = 0; 182 182 ··· 268 268 #ifdef UDF_RECOVERY 269 269 /* temporary shorthand for specifying files by inode number */ 270 270 if (!strncmp(dentry->d_name.name, ".B=", 3)) { 271 - kernel_lb_addr lb = { 271 + struct kernel_lb_addr lb = { 272 272 .logicalBlockNum = 0, 273 273 .partitionReferenceNum = 274 274 simple_strtoul(dentry->d_name.name + 3, ··· 313 313 uint8_t lfi; 314 314 uint16_t liu; 315 315 int block; 316 - kernel_lb_addr eloc; 316 + struct kernel_lb_addr eloc; 317 317 uint32_t elen = 0; 318 318 sector_t offset; 319 319 struct extent_position epos = {}; ··· 358 358 block = udf_get_lb_pblock(dir->i_sb, eloc, offset); 359 359 if ((++offset << dir->i_sb->s_blocksize_bits) < elen) { 360 360 if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 361 - epos.offset -= sizeof(short_ad); 361 + epos.offset -= sizeof(struct short_ad); 362 362 else if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 363 - epos.offset -= sizeof(long_ad); 363 + epos.offset -= sizeof(struct long_ad); 364 364 } else 365 365 offset = 0; 366 366 ··· 409 409 if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB && elen) { 410 410 elen = (elen + sb->s_blocksize - 1) & ~(sb->s_blocksize - 1); 411 411 if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 412 - epos.offset -= sizeof(short_ad); 412 + epos.offset -= sizeof(struct short_ad); 413 413 else if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 414 - epos.offset -= sizeof(long_ad); 414 + epos.offset -= sizeof(struct long_ad); 415 415 udf_write_aext(dir, &epos, eloc, elen, 1); 416 416 } 417 417 f_pos += nfidlen; ··· 494 494 memset(cfi, 0, sizeof(struct fileIdentDesc)); 495 495 if (UDF_SB(sb)->s_udfrev >= 0x0200) 496 496 udf_new_tag((char *)cfi, TAG_IDENT_FID, 3, 1, block, 497 - sizeof(tag)); 497 + sizeof(struct tag)); 498 498 else 499 499 udf_new_tag((char *)cfi, TAG_IDENT_FID, 2, 1, block, 500 - sizeof(tag)); 500 + sizeof(struct tag)); 501 501 cfi->fileVersionNum = cpu_to_le16(1); 502 502 cfi->lengthFileIdent = namelen; 503 503 cfi->lengthOfImpUse = cpu_to_le16(0); ··· 530 530 cfi->fileCharacteristics |= FID_FILE_CHAR_DELETED; 531 531 532 532 if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_STRICT)) 533 - memset(&(cfi->icb), 0x00, sizeof(long_ad)); 533 + memset(&(cfi->icb), 0x00, sizeof(struct long_ad)); 534 534 535 535 return udf_write_fi(inode, cfi, fi, fibh, NULL, NULL); 536 536 } ··· 710 710 loff_t f_pos; 711 711 loff_t size = udf_ext0_offset(dir) + dir->i_size; 712 712 int block; 713 - kernel_lb_addr eloc; 713 + struct kernel_lb_addr eloc; 714 714 uint32_t elen; 715 715 sector_t offset; 716 716 struct extent_position epos = {}; ··· 727 727 block = udf_get_lb_pblock(dir->i_sb, eloc, offset); 728 728 if ((++offset << dir->i_sb->s_blocksize_bits) < elen) { 729 729 if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 730 - epos.offset -= sizeof(short_ad); 730 + epos.offset -= sizeof(struct short_ad); 731 731 else if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 732 - epos.offset -= sizeof(long_ad); 732 + epos.offset -= sizeof(struct long_ad); 733 733 } else 734 734 offset = 0; 735 735 ··· 778 778 struct inode *inode = dentry->d_inode; 779 779 struct udf_fileident_bh fibh; 780 780 struct fileIdentDesc *fi, cfi; 781 - kernel_lb_addr tloc; 781 + struct kernel_lb_addr tloc; 782 782 783 783 retval = -ENOENT; 784 784 lock_kernel(); ··· 824 824 struct udf_fileident_bh fibh; 825 825 struct fileIdentDesc *fi; 826 826 struct fileIdentDesc cfi; 827 - kernel_lb_addr tloc; 827 + struct kernel_lb_addr tloc; 828 828 829 829 retval = -ENOENT; 830 830 lock_kernel(); ··· 897 897 inode->i_op = &page_symlink_inode_operations; 898 898 899 899 if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { 900 - kernel_lb_addr eloc; 900 + struct kernel_lb_addr eloc; 901 901 uint32_t bsize; 902 902 903 903 block = udf_new_block(inode->i_sb, inode, ··· 1108 1108 struct fileIdentDesc ocfi, ncfi; 1109 1109 struct buffer_head *dir_bh = NULL; 1110 1110 int retval = -ENOENT; 1111 - kernel_lb_addr tloc; 1111 + struct kernel_lb_addr tloc; 1112 1112 struct udf_inode_info *old_iinfo = UDF_I(old_inode); 1113 1113 1114 1114 lock_kernel(); ··· 1187 1187 */ 1188 1188 ncfi.fileVersionNum = ocfi.fileVersionNum; 1189 1189 ncfi.fileCharacteristics = ocfi.fileCharacteristics; 1190 - memcpy(&(ncfi.icb), &(ocfi.icb), sizeof(long_ad)); 1190 + memcpy(&(ncfi.icb), &(ocfi.icb), sizeof(struct long_ad)); 1191 1191 udf_write_fi(new_dir, &ncfi, nfi, &nfibh, NULL, NULL); 1192 1192 1193 1193 /* The old fid may have moved - find it again */ ··· 1272 1272 u16 partref, __u32 generation) 1273 1273 { 1274 1274 struct inode *inode; 1275 - kernel_lb_addr loc; 1275 + struct kernel_lb_addr loc; 1276 1276 1277 1277 if (block == 0) 1278 1278 return ERR_PTR(-ESTALE); ··· 1318 1318 { 1319 1319 int len = *lenp; 1320 1320 struct inode *inode = de->d_inode; 1321 - kernel_lb_addr location = UDF_I(inode)->i_location; 1321 + struct kernel_lb_addr location = UDF_I(inode)->i_location; 1322 1322 struct fid *fid = (struct fid *)fh; 1323 1323 int type = FILEID_UDF_WITHOUT_PARENT; 1324 1324
+11 -11
fs/udf/osta_udf.h
··· 85 85 /* Logical Volume Integrity Descriptor (UDF 2.50 2.2.6) */ 86 86 /* Implementation Use (UDF 2.50 2.2.6.4) */ 87 87 struct logicalVolIntegrityDescImpUse { 88 - regid impIdent; 88 + struct regid impIdent; 89 89 __le32 numFiles; 90 90 __le32 numDirs; 91 91 __le16 minUDFReadRev; ··· 97 97 /* Implementation Use Volume Descriptor (UDF 2.50 2.2.7) */ 98 98 /* Implementation Use (UDF 2.50 2.2.7.2) */ 99 99 struct impUseVolDescImpUse { 100 - charspec LVICharset; 100 + struct charspec LVICharset; 101 101 dstring logicalVolIdent[128]; 102 102 dstring LVInfo1[36]; 103 103 dstring LVInfo2[36]; 104 104 dstring LVInfo3[36]; 105 - regid impIdent; 105 + struct regid impIdent; 106 106 uint8_t impUse[128]; 107 107 } __attribute__ ((packed)); 108 108 ··· 110 110 uint8_t partitionMapType; 111 111 uint8_t partitionMapLength; 112 112 uint8_t reserved1[2]; 113 - regid partIdent; 113 + struct regid partIdent; 114 114 __le16 volSeqNum; 115 115 __le16 partitionNum; 116 116 } __attribute__ ((packed)); ··· 120 120 uint8_t partitionMapType; 121 121 uint8_t partitionMapLength; 122 122 uint8_t reserved1[2]; 123 - regid partIdent; 123 + struct regid partIdent; 124 124 __le16 volSeqNum; 125 125 __le16 partitionNum; 126 126 uint8_t reserved2[24]; ··· 131 131 uint8_t partitionMapType; 132 132 uint8_t partitionMapLength; 133 133 uint8_t reserved1[2]; 134 - regid partIdent; 134 + struct regid partIdent; 135 135 __le16 volSeqNum; 136 136 __le16 partitionNum; 137 137 __le16 packetLength; ··· 146 146 uint8_t partitionMapType; 147 147 uint8_t partitionMapLength; 148 148 uint8_t reserved1[2]; 149 - regid partIdent; 149 + struct regid partIdent; 150 150 __le16 volSeqNum; 151 151 __le16 partitionNum; 152 152 __le32 metadataFileLoc; ··· 161 161 /* Virtual Allocation Table (UDF 1.5 2.2.10) */ 162 162 struct virtualAllocationTable15 { 163 163 __le32 VirtualSector[0]; 164 - regid vatIdent; 164 + struct regid vatIdent; 165 165 __le32 previousVATICBLoc; 166 166 } __attribute__ ((packed)); 167 167 ··· 192 192 } __attribute__ ((packed)); 193 193 194 194 struct sparingTable { 195 - tag descTag; 196 - regid sparingIdent; 195 + struct tag descTag; 196 + struct regid sparingIdent; 197 197 __le16 reallocationTableLen; 198 198 __le16 reserved; 199 199 __le32 sequenceNum; ··· 206 206 #define ICBTAG_FILE_TYPE_MIRROR 0xFB 207 207 #define ICBTAG_FILE_TYPE_BITMAP 0xFC 208 208 209 - /* struct long_ad ICB - ADImpUse (UDF 2.50 2.2.4.3) */ 209 + /* struct struct long_ad ICB - ADImpUse (UDF 2.50 2.2.4.3) */ 210 210 struct allocDescImpUse { 211 211 __le16 flags; 212 212 uint8_t impUse[4];
+1 -1
fs/udf/partition.c
··· 273 273 { 274 274 struct super_block *sb = inode->i_sb; 275 275 struct udf_part_map *map; 276 - kernel_lb_addr eloc; 276 + struct kernel_lb_addr eloc; 277 277 uint32_t elen; 278 278 sector_t ext_offset; 279 279 struct extent_position epos = {};
+24 -24
fs/udf/super.c
··· 85 85 static int udf_remount_fs(struct super_block *, int *, char *); 86 86 static int udf_check_valid(struct super_block *, int, int); 87 87 static int udf_vrs(struct super_block *sb, int silent); 88 - static void udf_load_logicalvolint(struct super_block *, kernel_extent_ad); 88 + static void udf_load_logicalvolint(struct super_block *, struct kernel_extent_ad); 89 89 static void udf_find_anchor(struct super_block *); 90 - static int udf_find_fileset(struct super_block *, kernel_lb_addr *, 91 - kernel_lb_addr *); 90 + static int udf_find_fileset(struct super_block *, struct kernel_lb_addr *, 91 + struct kernel_lb_addr *); 92 92 static void udf_load_fileset(struct super_block *, struct buffer_head *, 93 - kernel_lb_addr *); 93 + struct kernel_lb_addr *); 94 94 static void udf_open_lvid(struct super_block *); 95 95 static void udf_close_lvid(struct super_block *); 96 96 static unsigned int udf_count_free(struct super_block *); ··· 810 810 } 811 811 812 812 static int udf_find_fileset(struct super_block *sb, 813 - kernel_lb_addr *fileset, 814 - kernel_lb_addr *root) 813 + struct kernel_lb_addr *fileset, 814 + struct kernel_lb_addr *root) 815 815 { 816 816 struct buffer_head *bh = NULL; 817 817 long lastblock; ··· 834 834 sbi = UDF_SB(sb); 835 835 if (!bh) { 836 836 /* Search backwards through the partitions */ 837 - kernel_lb_addr newfileset; 837 + struct kernel_lb_addr newfileset; 838 838 839 839 /* --> cvg: FIXME - is it reasonable? */ 840 840 return 1; ··· 917 917 if (udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time, 918 918 pvoldesc->recordingDateAndTime)) { 919 919 #ifdef UDFFS_DEBUG 920 - timestamp *ts = &pvoldesc->recordingDateAndTime; 920 + struct timestamp *ts = &pvoldesc->recordingDateAndTime; 921 921 udf_debug("recording time %04u/%02u/%02u" 922 922 " %02u:%02u (%x)\n", 923 923 le16_to_cpu(ts->year), ts->month, ts->day, ts->hour, ··· 946 946 struct udf_sb_info *sbi = UDF_SB(sb); 947 947 struct udf_part_map *map; 948 948 struct udf_meta_data *mdata; 949 - kernel_lb_addr addr; 949 + struct kernel_lb_addr addr; 950 950 int fe_error = 0; 951 951 952 952 map = &sbi->s_partmaps[partition]; ··· 1037 1037 } 1038 1038 1039 1039 static void udf_load_fileset(struct super_block *sb, struct buffer_head *bh, 1040 - kernel_lb_addr *root) 1040 + struct kernel_lb_addr *root) 1041 1041 { 1042 1042 struct fileSetDesc *fset; 1043 1043 ··· 1119 1119 1120 1120 phd = (struct partitionHeaderDesc *)p->partitionContentsUse; 1121 1121 if (phd->unallocSpaceTable.extLength) { 1122 - kernel_lb_addr loc = { 1122 + struct kernel_lb_addr loc = { 1123 1123 .logicalBlockNum = le32_to_cpu( 1124 1124 phd->unallocSpaceTable.extPosition), 1125 1125 .partitionReferenceNum = p_index, ··· 1154 1154 udf_debug("partitionIntegrityTable (part %d)\n", p_index); 1155 1155 1156 1156 if (phd->freedSpaceTable.extLength) { 1157 - kernel_lb_addr loc = { 1157 + struct kernel_lb_addr loc = { 1158 1158 .logicalBlockNum = le32_to_cpu( 1159 1159 phd->freedSpaceTable.extPosition), 1160 1160 .partitionReferenceNum = p_index, ··· 1192 1192 { 1193 1193 struct udf_sb_info *sbi = UDF_SB(sb); 1194 1194 struct udf_part_map *map = &sbi->s_partmaps[p_index]; 1195 - kernel_lb_addr ino; 1195 + struct kernel_lb_addr ino; 1196 1196 struct buffer_head *bh = NULL; 1197 1197 struct udf_inode_info *vati; 1198 1198 uint32_t pos; ··· 1322 1322 } 1323 1323 1324 1324 static int udf_load_logicalvol(struct super_block *sb, sector_t block, 1325 - kernel_lb_addr *fileset) 1325 + struct kernel_lb_addr *fileset) 1326 1326 { 1327 1327 struct logicalVolDesc *lvd; 1328 1328 int i, j, offset; ··· 1471 1471 } 1472 1472 1473 1473 if (fileset) { 1474 - long_ad *la = (long_ad *)&(lvd->logicalVolContentsUse[0]); 1474 + struct long_ad *la = (struct long_ad *)&(lvd->logicalVolContentsUse[0]); 1475 1475 1476 1476 *fileset = lelb_to_cpu(la->extLocation); 1477 1477 udf_debug("FileSet found in LogicalVolDesc at block=%d, " ··· 1490 1490 * udf_load_logicalvolint 1491 1491 * 1492 1492 */ 1493 - static void udf_load_logicalvolint(struct super_block *sb, kernel_extent_ad loc) 1493 + static void udf_load_logicalvolint(struct super_block *sb, struct kernel_extent_ad loc) 1494 1494 { 1495 1495 struct buffer_head *bh = NULL; 1496 1496 uint16_t ident; ··· 1533 1533 * Written, tested, and released. 1534 1534 */ 1535 1535 static noinline int udf_process_sequence(struct super_block *sb, long block, 1536 - long lastblock, kernel_lb_addr *fileset) 1536 + long lastblock, struct kernel_lb_addr *fileset) 1537 1537 { 1538 1538 struct buffer_head *bh = NULL; 1539 1539 struct udf_vds_record vds[VDS_POS_LENGTH]; ··· 1678 1678 return !block; 1679 1679 } 1680 1680 1681 - static int udf_load_sequence(struct super_block *sb, kernel_lb_addr *fileset) 1681 + static int udf_load_sequence(struct super_block *sb, struct kernel_lb_addr *fileset) 1682 1682 { 1683 1683 struct anchorVolDescPtr *anchor; 1684 1684 uint16_t ident; ··· 1755 1755 lvid->integrityType = LVID_INTEGRITY_TYPE_OPEN; 1756 1756 1757 1757 lvid->descTag.descCRC = cpu_to_le16( 1758 - crc_itu_t(0, (char *)lvid + sizeof(tag), 1758 + crc_itu_t(0, (char *)lvid + sizeof(struct tag), 1759 1759 le16_to_cpu(lvid->descTag.descCRCLength))); 1760 1760 1761 1761 lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag); ··· 1790 1790 lvid->integrityType = cpu_to_le32(LVID_INTEGRITY_TYPE_CLOSE); 1791 1791 1792 1792 lvid->descTag.descCRC = cpu_to_le16( 1793 - crc_itu_t(0, (char *)lvid + sizeof(tag), 1793 + crc_itu_t(0, (char *)lvid + sizeof(struct tag), 1794 1794 le16_to_cpu(lvid->descTag.descCRCLength))); 1795 1795 1796 1796 lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag); ··· 1848 1848 int i; 1849 1849 struct inode *inode = NULL; 1850 1850 struct udf_options uopt; 1851 - kernel_lb_addr rootdir, fileset; 1851 + struct kernel_lb_addr rootdir, fileset; 1852 1852 struct udf_sb_info *sbi; 1853 1853 1854 1854 uopt.flags = (1 << UDF_FLAG_USE_AD_IN_ICB) | (1 << UDF_FLAG_STRICT); ··· 1978 1978 } 1979 1979 1980 1980 if (!silent) { 1981 - timestamp ts; 1981 + struct timestamp ts; 1982 1982 udf_time_to_disk_stamp(&ts, sbi->s_record_time); 1983 1983 udf_info("UDF: Mounting volume '%s', " 1984 1984 "timestamp %04u/%02u/%02u %02u:%02u (%x)\n", ··· 2114 2114 unsigned int accum = 0; 2115 2115 int index; 2116 2116 int block = 0, newblock; 2117 - kernel_lb_addr loc; 2117 + struct kernel_lb_addr loc; 2118 2118 uint32_t bytes; 2119 2119 uint8_t *ptr; 2120 2120 uint16_t ident; ··· 2170 2170 { 2171 2171 unsigned int accum = 0; 2172 2172 uint32_t elen; 2173 - kernel_lb_addr eloc; 2173 + struct kernel_lb_addr eloc; 2174 2174 int8_t etype; 2175 2175 struct extent_position epos; 2176 2176
+12 -12
fs/udf/truncate.c
··· 28 28 #include "udf_sb.h" 29 29 30 30 static void extent_trunc(struct inode *inode, struct extent_position *epos, 31 - kernel_lb_addr eloc, int8_t etype, uint32_t elen, 31 + struct kernel_lb_addr eloc, int8_t etype, uint32_t elen, 32 32 uint32_t nelen) 33 33 { 34 - kernel_lb_addr neloc = {}; 34 + struct kernel_lb_addr neloc = {}; 35 35 int last_block = (elen + inode->i_sb->s_blocksize - 1) >> 36 36 inode->i_sb->s_blocksize_bits; 37 37 int first_block = (nelen + inode->i_sb->s_blocksize - 1) >> ··· 68 68 void udf_truncate_tail_extent(struct inode *inode) 69 69 { 70 70 struct extent_position epos = {}; 71 - kernel_lb_addr eloc; 71 + struct kernel_lb_addr eloc; 72 72 uint32_t elen, nelen; 73 73 uint64_t lbcount = 0; 74 74 int8_t etype = -1, netype; ··· 83 83 return; 84 84 85 85 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 86 - adsize = sizeof(short_ad); 86 + adsize = sizeof(struct short_ad); 87 87 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 88 - adsize = sizeof(long_ad); 88 + adsize = sizeof(struct long_ad); 89 89 else 90 90 BUG(); 91 91 ··· 124 124 void udf_discard_prealloc(struct inode *inode) 125 125 { 126 126 struct extent_position epos = { NULL, 0, {0, 0} }; 127 - kernel_lb_addr eloc; 127 + struct kernel_lb_addr eloc; 128 128 uint32_t elen; 129 129 uint64_t lbcount = 0; 130 130 int8_t etype = -1, netype; ··· 136 136 return; 137 137 138 138 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 139 - adsize = sizeof(short_ad); 139 + adsize = sizeof(struct short_ad); 140 140 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 141 - adsize = sizeof(long_ad); 141 + adsize = sizeof(struct long_ad); 142 142 else 143 143 adsize = 0; 144 144 ··· 200 200 void udf_truncate_extents(struct inode *inode) 201 201 { 202 202 struct extent_position epos; 203 - kernel_lb_addr eloc, neloc = {}; 203 + struct kernel_lb_addr eloc, neloc = {}; 204 204 uint32_t elen, nelen = 0, indirect_ext_len = 0, lenalloc; 205 205 int8_t etype; 206 206 struct super_block *sb = inode->i_sb; ··· 210 210 struct udf_inode_info *iinfo = UDF_I(inode); 211 211 212 212 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) 213 - adsize = sizeof(short_ad); 213 + adsize = sizeof(struct short_ad); 214 214 else if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_LONG) 215 - adsize = sizeof(long_ad); 215 + adsize = sizeof(struct long_ad); 216 216 else 217 217 BUG(); 218 218 ··· 278 278 udf_update_alloc_ext_desc(inode, &epos, lenalloc); 279 279 } else if (inode->i_size) { 280 280 if (byte_offset) { 281 - kernel_long_ad extent; 281 + struct kernel_long_ad extent; 282 282 283 283 /* 284 284 * OK, there is not extent covering inode->i_size and
+3 -3
fs/udf/udf_i.h
··· 4 4 struct udf_inode_info { 5 5 struct timespec i_crtime; 6 6 /* Physical address of inode */ 7 - kernel_lb_addr i_location; 7 + struct kernel_lb_addr i_location; 8 8 __u64 i_unique; 9 9 __u32 i_lenEAttr; 10 10 __u32 i_lenAlloc; ··· 17 17 unsigned i_strat4096 : 1; 18 18 unsigned reserved : 26; 19 19 union { 20 - short_ad *i_sad; 21 - long_ad *i_lad; 20 + struct short_ad *i_sad; 21 + struct long_ad *i_lad; 22 22 __u8 *i_data; 23 23 } i_ext; 24 24 struct inode vfs_inode;
+18 -18
fs/udf/udfdecl.h
··· 65 65 #define udf_get_lb_pblock(sb,loc,offset) udf_get_pblock((sb), (loc).logicalBlockNum, (loc).partitionReferenceNum, (offset)) 66 66 67 67 /* computes tag checksum */ 68 - u8 udf_tag_checksum(const tag *t); 68 + u8 udf_tag_checksum(const struct tag *t); 69 69 70 70 struct dentry; 71 71 struct inode; ··· 95 95 }; 96 96 97 97 struct generic_desc { 98 - tag descTag; 98 + struct tag descTag; 99 99 __le32 volDescSeqNum; 100 100 }; 101 101 ··· 108 108 struct extent_position { 109 109 struct buffer_head *bh; 110 110 uint32_t offset; 111 - kernel_lb_addr block; 111 + struct kernel_lb_addr block; 112 112 }; 113 113 114 114 /* super.c */ ··· 124 124 unsigned long); 125 125 126 126 /* inode.c */ 127 - extern struct inode *udf_iget(struct super_block *, kernel_lb_addr); 127 + extern struct inode *udf_iget(struct super_block *, struct kernel_lb_addr); 128 128 extern int udf_sync_inode(struct inode *); 129 129 extern void udf_expand_file_adinicb(struct inode *, int, int *); 130 130 extern struct buffer_head *udf_expand_dir_adinicb(struct inode *, int *, int *); ··· 136 136 extern int udf_write_inode(struct inode *, int); 137 137 extern long udf_block_map(struct inode *, sector_t); 138 138 extern int udf_extend_file(struct inode *, struct extent_position *, 139 - kernel_long_ad *, sector_t); 139 + struct kernel_long_ad *, sector_t); 140 140 extern int8_t inode_bmap(struct inode *, sector_t, struct extent_position *, 141 - kernel_lb_addr *, uint32_t *, sector_t *); 141 + struct kernel_lb_addr *, uint32_t *, sector_t *); 142 142 extern int8_t udf_add_aext(struct inode *, struct extent_position *, 143 - kernel_lb_addr, uint32_t, int); 143 + struct kernel_lb_addr, uint32_t, int); 144 144 extern int8_t udf_write_aext(struct inode *, struct extent_position *, 145 - kernel_lb_addr, uint32_t, int); 145 + struct kernel_lb_addr, uint32_t, int); 146 146 extern int8_t udf_delete_aext(struct inode *, struct extent_position, 147 - kernel_lb_addr, uint32_t); 147 + struct kernel_lb_addr, uint32_t); 148 148 extern int8_t udf_next_aext(struct inode *, struct extent_position *, 149 - kernel_lb_addr *, uint32_t *, int); 149 + struct kernel_lb_addr *, uint32_t *, int); 150 150 extern int8_t udf_current_aext(struct inode *, struct extent_position *, 151 - kernel_lb_addr *, uint32_t *, int); 151 + struct kernel_lb_addr *, uint32_t *, int); 152 152 153 153 /* misc.c */ 154 154 extern struct buffer_head *udf_tgetblk(struct super_block *, int); ··· 160 160 extern struct buffer_head *udf_read_tagged(struct super_block *, uint32_t, 161 161 uint32_t, uint16_t *); 162 162 extern struct buffer_head *udf_read_ptagged(struct super_block *, 163 - kernel_lb_addr, uint32_t, 163 + struct kernel_lb_addr, uint32_t, 164 164 uint16_t *); 165 165 extern void udf_update_tag(char *, int); 166 166 extern void udf_new_tag(char *, uint16_t, uint16_t, uint16_t, uint32_t, int); ··· 200 200 201 201 /* balloc.c */ 202 202 extern void udf_free_blocks(struct super_block *, struct inode *, 203 - kernel_lb_addr, uint32_t, uint32_t); 203 + struct kernel_lb_addr, uint32_t, uint32_t); 204 204 extern int udf_prealloc_blocks(struct super_block *, struct inode *, uint16_t, 205 205 uint32_t, uint32_t); 206 206 extern int udf_new_block(struct super_block *, struct inode *, uint16_t, ··· 214 214 struct udf_fileident_bh *, 215 215 struct fileIdentDesc *, 216 216 struct extent_position *, 217 - kernel_lb_addr *, uint32_t *, 217 + struct kernel_lb_addr *, uint32_t *, 218 218 sector_t *); 219 219 extern struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, 220 220 int *offset); 221 - extern long_ad *udf_get_filelongad(uint8_t *, int, uint32_t *, int); 222 - extern short_ad *udf_get_fileshortad(uint8_t *, int, uint32_t *, int); 221 + extern struct long_ad *udf_get_filelongad(uint8_t *, int, uint32_t *, int); 222 + extern struct short_ad *udf_get_fileshortad(uint8_t *, int, uint32_t *, int); 223 223 224 224 /* udftime.c */ 225 225 extern struct timespec *udf_disk_stamp_to_time(struct timespec *dest, 226 - timestamp src); 227 - extern timestamp *udf_time_to_disk_stamp(timestamp *dest, struct timespec src); 226 + struct timestamp src); 227 + extern struct timestamp *udf_time_to_disk_stamp(struct timestamp *dest, struct timespec src); 228 228 229 229 #endif /* __UDF_DECL_H */
+14 -14
fs/udf/udfend.h
··· 4 4 #include <asm/byteorder.h> 5 5 #include <linux/string.h> 6 6 7 - static inline kernel_lb_addr lelb_to_cpu(lb_addr in) 7 + static inline struct kernel_lb_addr lelb_to_cpu(struct lb_addr in) 8 8 { 9 - kernel_lb_addr out; 9 + struct kernel_lb_addr out; 10 10 11 11 out.logicalBlockNum = le32_to_cpu(in.logicalBlockNum); 12 12 out.partitionReferenceNum = le16_to_cpu(in.partitionReferenceNum); ··· 14 14 return out; 15 15 } 16 16 17 - static inline lb_addr cpu_to_lelb(kernel_lb_addr in) 17 + static inline struct lb_addr cpu_to_lelb(struct kernel_lb_addr in) 18 18 { 19 - lb_addr out; 19 + struct lb_addr out; 20 20 21 21 out.logicalBlockNum = cpu_to_le32(in.logicalBlockNum); 22 22 out.partitionReferenceNum = cpu_to_le16(in.partitionReferenceNum); ··· 24 24 return out; 25 25 } 26 26 27 - static inline short_ad lesa_to_cpu(short_ad in) 27 + static inline struct short_ad lesa_to_cpu(struct short_ad in) 28 28 { 29 - short_ad out; 29 + struct short_ad out; 30 30 31 31 out.extLength = le32_to_cpu(in.extLength); 32 32 out.extPosition = le32_to_cpu(in.extPosition); ··· 34 34 return out; 35 35 } 36 36 37 - static inline short_ad cpu_to_lesa(short_ad in) 37 + static inline struct short_ad cpu_to_lesa(struct short_ad in) 38 38 { 39 - short_ad out; 39 + struct short_ad out; 40 40 41 41 out.extLength = cpu_to_le32(in.extLength); 42 42 out.extPosition = cpu_to_le32(in.extPosition); ··· 44 44 return out; 45 45 } 46 46 47 - static inline kernel_long_ad lela_to_cpu(long_ad in) 47 + static inline struct kernel_long_ad lela_to_cpu(struct long_ad in) 48 48 { 49 - kernel_long_ad out; 49 + struct kernel_long_ad out; 50 50 51 51 out.extLength = le32_to_cpu(in.extLength); 52 52 out.extLocation = lelb_to_cpu(in.extLocation); ··· 54 54 return out; 55 55 } 56 56 57 - static inline long_ad cpu_to_lela(kernel_long_ad in) 57 + static inline struct long_ad cpu_to_lela(struct kernel_long_ad in) 58 58 { 59 - long_ad out; 59 + struct long_ad out; 60 60 61 61 out.extLength = cpu_to_le32(in.extLength); 62 62 out.extLocation = cpu_to_lelb(in.extLocation); ··· 64 64 return out; 65 65 } 66 66 67 - static inline kernel_extent_ad leea_to_cpu(extent_ad in) 67 + static inline struct kernel_extent_ad leea_to_cpu(struct extent_ad in) 68 68 { 69 - kernel_extent_ad out; 69 + struct kernel_extent_ad out; 70 70 71 71 out.extLength = le32_to_cpu(in.extLength); 72 72 out.extLocation = le32_to_cpu(in.extLocation);
+4 -2
fs/udf/udftime.c
··· 85 85 #define SECS_PER_HOUR (60 * 60) 86 86 #define SECS_PER_DAY (SECS_PER_HOUR * 24) 87 87 88 - struct timespec *udf_disk_stamp_to_time(struct timespec *dest, timestamp src) 88 + struct timespec * 89 + udf_disk_stamp_to_time(struct timespec *dest, struct timestamp src) 89 90 { 90 91 int yday; 91 92 u16 typeAndTimezone = le16_to_cpu(src.typeAndTimezone); ··· 117 116 return dest; 118 117 } 119 118 120 - timestamp *udf_time_to_disk_stamp(timestamp *dest, struct timespec ts) 119 + struct timestamp * 120 + udf_time_to_disk_stamp(struct timestamp *dest, struct timespec ts) 121 121 { 122 122 long int days, rem, y; 123 123 const unsigned short int *ip;