Changeset 5c702a8 in mainline for uspace/srv/fs/udf/udf_cksum.c


Ignore:
Timestamp:
2012-08-27T17:21:38Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d57c3e
Parents:
5d94b16c
Message:

dead and unfinished code elimination

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/udf/udf_cksum.c

    r5d94b16c r5c702a8  
    7373};
    7474
    75 /** Calculate CRC16
    76  *
    77  */
    78 uint16_t udf_cksum(uint8_t *buf, size_t len)
    79 {
    80         uint16_t crc = 0;
    81        
    82         while (len-- > 0)
    83                 crc = crc_table[(crc >> 8 ^ *buf++) & 0xff] ^ (crc << 8);
    84        
    85         return crc;
    86 }
    87 
    8875/** Unicode checksum
    8976 *
     
    10390       
    10491        return crc;
    105 }
    106 
    107 /** EA checksum
    108  *
    109  * Calculate a 16-bit checksum of the Implementation Use
    110  * Extended Attribute header or Application Use Extended Attribute
    111  * header. The fields AttributeType through ImplementationIdentifier
    112  * (or ApplicationIdentifier) inclusively represent the
    113  * data covered by the checksum (48 bytes).
    114  *
    115  */
    116 uint16_t udf_ea_cksum(uint8_t *data)
    117 {
    118         uint16_t checksum = 0;
    119         size_t count;
    120        
    121         for (count = 0; count < 48; count++)
    122                 checksum += *data++;
    123        
    124         return checksum;
    12592}
    12693
Note: See TracChangeset for help on using the changeset viewer.