summaryrefslogtreecommitdiff
path: root/src/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/block.c')
-rw-r--r--src/block.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/block.c b/src/block.c
index 28a43fd..b80c1d2 100644
--- a/src/block.c
+++ b/src/block.c
@@ -30,7 +30,7 @@
//#include <ext2fs/ext2fs.h>
#include "ext2fsP.h"
#include "block.h"
-
+#include "journal.h"
extern ext2fs_block_bitmap bmap ;
@@ -692,3 +692,17 @@ errout:
return (ret & BLOCK_ERROR) ? ctx.errcode : 0;
}
//___________________________________________________________________________________________________
+
+#include "magic.h"
+//FIXME in work
+int magic_check_block(char* buf,magic_t cookie, __u32 size, blk_t blk){
+ char msg_buf[200];
+ int count = size;
+
+ strncpy(msg_buf,magic_buffer(cookie,buf,size),199);
+ while (*(buf+count) == 0) count-- ;
+ printf("Scan Result : %s %d\n", msg_buf , count+1) ;
+
+ blockhex(stdout,buf,0,(count < (size -5)) ? count + 5 : size );
+ return count+1;
+} \ No newline at end of file