mtd/util Makefile,1.50,1.51 compr.c,1.1,1.2 compr.h,1.1,1.2

havasi at infradead.org havasi at infradead.org
Tue May 25 07:32:02 EDT 2004


Update of /home/cvs/mtd/util
In directory phoenix.infradead.org:/home/havasi/mtd/util

Modified Files:
	Makefile compr.c compr.h 
Log Message:
2 new compressors:
- lzari
- lzo






Index: Makefile
===================================================================
RCS file: /home/cvs/mtd/util/Makefile,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- Makefile	25 May 2004 11:20:45 -0000	1.50
+++ Makefile	25 May 2004 11:31:59 -0000	1.51
@@ -15,6 +15,8 @@
 	flash_info mtd_debug flashcp nandwrite jffs2dump \
 	nftldump nftl_format #jffs2reader
 
+SYMLINKS = compr_lzari.c compr_lzo.c
+
 %: %.o
 	$(CC) $(LDFLAGS) -g -o $@ $^
 
@@ -28,11 +30,13 @@
 IGNORE=${wildcard .*.c.dep} 
 -include ${IGNORE}
 
-
 clean:
-	rm -f *.o $(TARGETS) .*.c.dep
+	rm -f *.o $(TARGETS) .*.c.dep $(SYMLINKS)
+
+$(SYMLINKS):
+	ln -sf ../fs/jffs2/$@ $@
 
-mkfs.jffs2: crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr.o
+mkfs.jffs2: crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr.o compr_lzari.o compr_lzo.o
 	$(CC) $(LDFLAGS) -o $@ $^ -lz
 
 flash_eraseall: crc32.o flash_eraseall.o

Index: compr.c
===================================================================
RCS file: /home/cvs/mtd/util/compr.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- compr.c	25 May 2004 11:20:45 -0000	1.1
+++ compr.c	25 May 2004 11:31:59 -0000	1.2
@@ -473,11 +473,23 @@
 #ifdef CONFIG_JFFS2_RTIME
         jffs2_rtime_init();
 #endif
+#ifdef CONFIG_JFFS2_LZARI
+        jffs2_lzari_init();
+#endif
+#ifdef CONFIG_JFFS2_LZO
+        jffs2_lzo_init();
+#endif
         return 0;
 }
 
 int jffs2_compressors_exit(void)
 {
+#ifdef CONFIG_JFFS2_LZO
+        jffs2_lzo_exit();
+#endif
+#ifdef CONFIG_JFFS2_LZARI
+        jffs2_lzari_exit();
+#endif
 #ifdef CONFIG_JFFS2_RTIME
         jffs2_rtime_exit();
 #endif

Index: compr.h
===================================================================
RCS file: /home/cvs/mtd/util/compr.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- compr.h	25 May 2004 11:20:45 -0000	1.1
+++ compr.h	25 May 2004 11:31:59 -0000	1.2
@@ -21,9 +21,15 @@
 
 #define CONFIG_JFFS2_ZLIB
 #define CONFIG_JFFS2_RTIME
+#define CONFIG_JFFS2_LZARI
+#define CONFIG_JFFS2_LZO
+#define JFFS2_LZARI_DISABLED
+#define JFFS2_LZO_DISABLED
 
 #define JFFS2_RUBINMIPS_PRIORITY 10
 #define JFFS2_DYNRUBIN_PRIORITY  20
+#define JFFS2_LZARI_PRIORITY     30
+#define JFFS2_LZO_PRIORITY       40
 #define JFFS2_RTIME_PRIORITY     50
 #define JFFS2_ZLIB_PRIORITY      60
 
@@ -86,8 +92,8 @@
 char *jffs2_stats(void);
 
 /* Compressor modules */
-/* These functions will be called by jffs2_compressors_init/exit */
 
+/* These functions will be called by jffs2_compressors_init/exit */
 #ifdef CONFIG_JFFS2_ZLIB
 int jffs2_zlib_init(void);
 void jffs2_zlib_exit(void);
@@ -95,6 +101,14 @@
 #ifdef CONFIG_JFFS2_RTIME
 int jffs2_rtime_init(void);
 void jffs2_rtime_exit(void);
+#endif
+#ifdef CONFIG_JFFS2_LZARI
+int jffs2_lzari_init(void);
+void jffs2_lzari_exit(void);
+#endif
+#ifdef CONFIG_JFFS2_LZO
+int jffs2_lzo_init(void);
+void jffs2_lzo_exit(void);
 #endif
 
 #endif /* __JFFS2_COMPR_H__ */





More information about the linux-mtd-cvs mailing list