redigest everything

This commit is contained in:
Mario Fetka
2013-10-29 18:26:14 +01:00
parent 4a38d73a58
commit 8751dafd50
221 changed files with 3778 additions and 3913 deletions

View File

@@ -0,0 +1,59 @@
diff -Naur jfsutils-1.1.12.orig/include/Makefile.am jfsutils-1.1.12.partclone/include/Makefile.am
--- jfsutils-1.1.12.orig/include/Makefile.am 2002-01-30 04:08:11.000000000 +0800
+++ jfsutils-1.1.12.partclone/include/Makefile.am 2010-06-30 11:21:37.000000000 +0800
@@ -1,3 +1,7 @@
+jfsincludedir = $(includedir)/jfs
+jfsinclude_HEADERS = jfs_byteorder.h jfs_btree.h jfs_dinode.h jfs_dmap.h \
+ jfs_dtree.h jfs_filsys.h jfs_imap.h jfs_logmgr.h jfs_superblock.h \
+ jfs_types.h jfs_unicode.h jfs_version.h jfs_xtree.h
EXTRA_DIST = jfs_byteorder.h jfs_btree.h jfs_dinode.h jfs_dmap.h \
jfs_dtree.h jfs_filsys.h jfs_imap.h jfs_logmgr.h jfs_superblock.h \
diff -Naur jfsutils-1.1.12.orig/libfs/log_work.c jfsutils-1.1.12.partclone/libfs/log_work.c
--- jfsutils-1.1.12.orig/libfs/log_work.c 2006-06-05 05:37:29.000000000 +0800
+++ jfsutils-1.1.12.partclone/libfs/log_work.c 2010-06-30 11:14:46.000000000 +0800
@@ -2416,6 +2416,7 @@
int32_t xlen, xlength;
int16_t nword;
int8_t upd_possible = 0;
+ struct dinode dip_local; /* Local copy of dinode data for alignment purposes */
if (ld->length <= 0)
return (0);
@@ -2713,7 +2714,8 @@
*/
if (ino_rem == 0) { /* inode base segment */
- dip = (struct dinode *) data;
+ memcpy(&dip_local, data, size_dinode);
+ dip = &dip_local;
if (ln == 1) {
/* ibase only */
if (db->db_ibase & mask_8)
diff -Naur jfsutils-1.1.12.orig/libfs/Makefile.am jfsutils-1.1.12.partclone/libfs/Makefile.am
--- jfsutils-1.1.12.orig/libfs/Makefile.am 2005-10-04 10:42:59.000000000 +0800
+++ jfsutils-1.1.12.partclone/libfs/Makefile.am 2010-06-30 11:27:52.000000000 +0800
@@ -1,7 +1,10 @@
-
+jfsincludedir = $(includedir)/jfs
INCLUDES = -I$(top_srcdir)/include
+jfsinclude_HEADERS =debug.h fsck_base.h fsck_message.h jfs_endian.h logredo.h unicode_to_utf8.h devices.h fsckcbbl.h fsckwsp.h libjufs.h message.h utilsubs.h diskmap.h fscklog.h inode.h logform.h super.h
+
noinst_LIBRARIES = libfs.a
+lib_LIBRARIES = libjfs.a
libfs_a_SOURCES = fssubs.c unicode_to_utf8.c devices.c utilsubs.c \
super.c inode.c diskmap.c message.c uniupr.c jfs_endian.c \
@@ -10,3 +13,11 @@
debug.h devices.h diskmap.h fsck_base.h fsckcbbl.h fscklog.h \
fsckwsp.h inode.h libjufs.h message.h super.h unicode_to_utf8.h \
utilsubs.h jfs_endian.h logform.h logredo.h fsck_message.h
+
+libjfs_a_SOURCES = fssubs.c unicode_to_utf8.c devices.c utilsubs.c \
+ super.c inode.c diskmap.c message.c uniupr.c jfs_endian.c \
+ open_by_label.c log_dump.c logform.c logredo.c log_work.c log_read.c \
+ log_map.c fsckmsgdef.c \
+ debug.h devices.h diskmap.h fsck_base.h fsckcbbl.h fscklog.h \
+ fsckwsp.h inode.h libjufs.h message.h super.h unicode_to_utf8.h \
+ utilsubs.h jfs_endian.h logform.h logredo.h fsck_message.h

View File

@@ -0,0 +1,12 @@
Index: jfsutils-1.1.15/libfs/devices.h
===================================================================
--- jfsutils-1.1.15.orig/libfs/devices.h
+++ jfsutils-1.1.15/libfs/devices.h
@@ -42,6 +42,7 @@
struct stat;
+#include <stdint.h>
int ujfs_get_dev_size(FILE *, int64_t * size);
int ujfs_rw_diskblocks(FILE *, int64_t, int32_t, void *, int32_t);
int ujfs_flush_dev(FILE *);

View File

@@ -0,0 +1,47 @@
diff -urNp jfsutils-1.1.12.orig/fsck/Makefile.am jfsutils-1.1.12/fsck/Makefile.am
--- jfsutils-1.1.12.orig/fsck/Makefile.am 2005-11-22 21:43:54.000000000 +0100
+++ jfsutils-1.1.12/fsck/Makefile.am 2008-03-03 16:21:58.495981389 +0100
@@ -1,6 +1,6 @@
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libfs
-LDADD = ../libfs/libfs.a -luuid
+LDADD = ../libfs/libfs.a -luuid -lblkid
sbin_PROGRAMS = jfs_fsck
man_MANS = jfs_fsck.8
diff -urNp jfsutils-1.1.12.orig/fsck/Makefile.in jfsutils-1.1.12/fsck/Makefile.in
--- jfsutils-1.1.12.orig/fsck/Makefile.in 2007-08-24 22:25:46.000000000 +0200
+++ jfsutils-1.1.12/fsck/Makefile.in 2008-03-03 16:21:50.765050221 +0100
@@ -157,7 +157,7 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libfs
-LDADD = ../libfs/libfs.a -luuid
+LDADD = ../libfs/libfs.a -luuid -lblkid
man_MANS = jfs_fsck.8
EXTRA_DIST = $(man_MANS)
jfs_fsck_SOURCES = fsckbmap.c fsckconn.c fsckdire.c fsckdtre.c fsckea.c \
diff -urNp jfsutils-1.1.12.orig/fsck/xchkdsk.c jfsutils-1.1.12/fsck/xchkdsk.c
--- jfsutils-1.1.12.orig/fsck/xchkdsk.c 2007-08-23 06:01:40.000000000 +0200
+++ jfsutils-1.1.12/fsck/xchkdsk.c 2008-03-03 16:44:28.499981978 +0100
@@ -24,6 +24,7 @@
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
+#include <blkid/blkid.h>
/* defines and includes common among the jfs_fsck modules */
#include "xfsckint.h"
#include "xchkdsk.h"
@@ -1807,7 +1808,11 @@ void parse_parms(int argc, char **argv)
fsck_usage();
}
- device_name = argv[optind];
+ device_name = blkid_get_devname(NULL, argv[optind], 0);
+ if (!device_name) {
+ printf("\nError: Unable to resolve %s\n", argv[optind]);
+ fsck_usage();
+ }
file_p = fopen(device_name, "r");
if (file_p) {

View File

@@ -0,0 +1,40 @@
diff -up ./fscklog/display.c.tv ./fscklog/display.c
--- ./fscklog/display.c.tv 2011-07-31 23:44:52.113168266 +0200
+++ ./fscklog/display.c 2011-07-31 23:45:24.992319623 +0200
@@ -182,7 +182,7 @@ void dump_service_log()
} else {
/* the record looks ok */
msg_txt = &log_entry[log_entry_pos];
- printf(msg_txt);
+ printf("%s", msg_txt);
/*
* set up for the next record
*/
diff -up ./fscklog/fscklog.c.tv ./fscklog/fscklog.c
--- ./fscklog/fscklog.c.tv 2011-07-31 23:44:35.382005089 +0200
+++ ./fscklog/fscklog.c 2011-07-31 23:45:53.638605854 +0200
@@ -252,8 +252,8 @@ int v_send_msg(int msg_num, const char *
sprintf(debug_detail, " [%s:%d]\n", basename(file_name), line_number);
- printf(msg_string);
- printf(debug_detail);
+ printf("%s", msg_string);
+ printf("%s", debug_detail);
return 0;
}
diff -up ./logdump/helpers.c.tv2 ./logdump/helpers.c
--- ./logdump/helpers.c.tv2 2011-07-31 23:58:42.767444686 +0200
+++ ./logdump/helpers.c 2011-07-31 23:59:24.429874361 +0200
@@ -95,8 +95,8 @@ int v_fsck_send_msg(int msg_num, const c
sprintf(debug_detail, " [%s:%d]\n", file_name, line_number);
- printf(msg_string);
- printf(debug_detail);
+ printf("%s", msg_string);
+ printf("%s", debug_detail);
return 0;
}

View File

@@ -0,0 +1,16 @@
diff -uNr jfsutils-1.1.15.orig/libfs/fssubs.c jfsutils-1.1.15/libfs/fssubs.c
--- jfsutils-1.1.15.orig/libfs/fssubs.c 2013-10-28 13:23:36.823701431 +0100
+++ jfsutils-1.1.15/libfs/fssubs.c 2013-10-28 13:31:48.387556038 +0100
@@ -36,6 +36,12 @@
#include <sys/mount.h>
#endif
+#ifndef _PATH_MNTTAB
+#ifdef MOUNTED
+#define _PATH_MNTTAB MOUNTED
+#endif
+#endif
+
#if HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>