2 * crc16.h - CRC-16 routine
4 * Implements the standard CRC-16:
6 * Poly 0x8005 (x16 + x15 + x2 + 1)
9 * Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com>
11 * This source code is licensed under the GNU General Public License,
12 * Version 2. See the file COPYING for more details.
18 /* for an unknown reason, PPC treats __u16 as signed and keeps doing sign
19 * extension on the value. Instead, use only the low 16 bits of an
20 * unsigned int for holding the CRC value to avoid this.
22 typedef unsigned int crc16_t;
24 extern crc16_t ext2fs_crc16(crc16_t crc, const void *buffer, unsigned int len);
26 #endif /* __CRC16_H */