From a3b803747b363b0ececd329583e0412672e7f30b Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Fri, 2 Feb 2024 10:22:53 +0800 Subject: mtd-utils: Extract list implementation to common lib and add list_sort support Current list implementation code is put under jffs utils, extract it into common lib, and add more list operations(eg. list_move, list_splice, etc.). Besides, add list sorting support in new source file lib/list_sort.c. This is a preparation for replacing implementation of UBIFS utils with linux kernel libs. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- jffsX-utils/compr.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'jffsX-utils/compr.h') diff --git a/jffsX-utils/compr.h b/jffsX-utils/compr.h index f1f5975..6969952 100644 --- a/jffsX-utils/compr.h +++ b/jffsX-utils/compr.h @@ -15,6 +15,7 @@ #include #include #include "linux/jffs2.h" +#include "list.h" #define CONFIG_JFFS2_RTIME @@ -49,10 +50,6 @@ #define KERN_INFO #define KERN_DEBUG -struct list_head { - struct list_head *next, *prev; -}; - void jffs2_set_compression_mode(int mode); int jffs2_get_compression_mode(void); int jffs2_set_compression_mode_name(const char *mode_name); -- cgit v1.2.3