From e7e19cd9d8cc0f54ca463c4aebf7c4ef5e4f84f8 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 16:36:32 +0800 Subject: ubifs-utils: Split common source files from mkfs.ubifs Split common source files into common dir from mkfs.ubifs, this is a preparation for importing libubifs(from linux kernel) to replace current UBIFS libs. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/mkfs.ubifs/crc16.h | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 ubifs-utils/mkfs.ubifs/crc16.h (limited to 'ubifs-utils/mkfs.ubifs/crc16.h') diff --git a/ubifs-utils/mkfs.ubifs/crc16.h b/ubifs-utils/mkfs.ubifs/crc16.h deleted file mode 100644 index 539d21a..0000000 --- a/ubifs-utils/mkfs.ubifs/crc16.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Implements the standard CRC-16: - * Width 16 - * Poly 0x8005 (x^16 + x^15 + x^2 + 1) - * Init 0 - * - * Copyright (c) 2005 Ben Gardner - * - * This code was taken from the linux kernel. The license is GPL Version 2. - */ - -#ifndef __CRC16_H__ -#define __CRC16_H__ - -#include -#include - -extern uint16_t const crc16_table[256]; - -extern uint16_t crc16(uint16_t crc, const uint8_t *buffer, size_t len); - -static inline uint16_t crc16_byte(uint16_t crc, const uint8_t data) -{ - return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff]; -} - -#endif /* __CRC16_H__ */ -- cgit v1.2.3