]>
Commit | Line | Data |
---|---|---|
d7bc7226 | 1 | diff -Nur partclone-0.2.24_/configure.ac partclone-0.2.24/configure.ac |
2 | --- partclone-0.2.24_/configure.ac 2011-05-24 02:47:18.000000000 +0000 | |
3 | +++ partclone-0.2.24/configure.ac 2011-07-24 14:47:27.028818054 +0000 | |
4 | @@ -250,40 +250,6 @@ | |
5 | AM_CONDITIONAL(ENABLE_NTFS, test "$enable_ntfs" = yes) | |
6 | ||
7 | if test "$enable_ntfs" = "yes"; then | |
8 | -#check library of some filesystems | |
9 | - | |
10 | -dnl Check for NTFS | |
11 | -AC_CHECKING([ for NTFS Library and Header files ... ]) | |
12 | -AC_CHECK_HEADERS([ntfs/version.h], , | |
13 | - AC_MSG_ERROR([*** NTFS(ntfsprog) header not found])) | |
14 | -AC_CHECK_LIB([ntfs], [ntfs_mount], true, | |
15 | - AC_MSG_ERROR([*** ntfs depend library (libntfs) not found])) | |
16 | -AC_MSG_CHECKING(version of libntfs) | |
17 | -ntfs_version=`gcc -static $srcdir/src/deplib_version.c -o $srcdir/get_lib_version -lntfs -DNTFS` | |
18 | -ntfs_version=`$srcdir/get_lib_version ntfs | cut -d':' -f1` | |
19 | -ntfs_version_major=`$srcdir/get_lib_version ntfs | cut -d':' -f2` | |
20 | -ntfs_version_minor=`$srcdir/get_lib_version ntfs | cut -d':' -f3` | |
21 | -if test -z "$ntfs_version"; then | |
22 | - ntfs_version="?" | |
23 | - ntfs_version_major="?" | |
24 | - ntfs_version_minor="?" | |
25 | - ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; bad" | |
26 | - AC_MSG_RESULT($ntfs_version) | |
27 | - AC_MSG_ERROR(Please check your libntfs!) | |
28 | -fi | |
29 | - | |
30 | -if test $ntfs_version -lt 9 ; then | |
31 | -ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; bad" | |
32 | -AC_MSG_RESULT($ntfs_version) | |
33 | -AC_MSG_ERROR(Please upgrade your libntfs to 9:0:0 or newer version!) | |
34 | -elif test $ntfs_version -eq 9 ; then | |
35 | -ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; suggest you upgrade the library!" | |
36 | -AC_MSG_RESULT($ntfs_version) | |
37 | -else | |
38 | -ntfs_version="$ntfs_version:$ntfs_version_major:$ntfs_version_minor; ok!" | |
39 | -AC_MSG_RESULT($ntfs_version) | |
40 | -fi | |
41 | - | |
42 | supported_fs=$supported_fs" ntfs" | |
43 | fi | |
44 | #end of check ntfs | |
45 | diff -Nur partclone-0.2.24_/src/Makefile.am partclone-0.2.24/src/Makefile.am | |
46 | --- partclone-0.2.24_/src/Makefile.am 2011-05-24 02:47:18.000000000 +0000 | |
47 | +++ partclone-0.2.24/src/Makefile.am 2011-07-24 14:47:27.038818053 +0000 | |
48 | @@ -63,7 +63,7 @@ | |
49 | sbin_PROGRAMS += partclone.ntfs | |
50 | partclone_ntfs_SOURCES=main.c partclone.c progress.c ntfsclone-ng.c ntfsclone-ng.h partclone.h progress.h gettext.h | |
51 | partclone_ntfs_CFLAGS=-DNTFS | |
52 | -partclone_ntfs_LDADD=-lntfs | |
53 | +partclone_ntfs_LDADD=-lntfs-3g | |
54 | sbin_PROGRAMS += partclone.ntfsfixboot | |
55 | partclone_ntfsfixboot_SOURCES=ntfsfixboot.c | |
56 | endif | |
57 | diff -Nur partclone-0.2.24_/src/ntfsclone-ng.c partclone-0.2.24/src/ntfsclone-ng.c | |
58 | --- partclone-0.2.24_/src/ntfsclone-ng.c 2011-05-24 02:47:18.000000000 +0000 | |
59 | +++ partclone-0.2.24/src/ntfsclone-ng.c 2011-07-24 14:47:27.038818053 +0000 | |
60 | @@ -28,9 +28,9 @@ | |
61 | #define NTFS_DO_NOT_CHECK_ENDIANS | |
62 | #define NTFS_MAX_CLUSTER_SIZE 65536 | |
63 | ||
64 | -#include <ntfs/device.h> | |
65 | -#include <ntfs/volume.h> | |
66 | -#include <ntfs/bitmap.h> | |
67 | +#include <ntfs-3g/device.h> | |
68 | +#include <ntfs-3g/volume.h> | |
69 | +#include <ntfs-3g/bitmap.h> | |
70 | ||
71 | #include "partclone.h" | |
72 | #include "ntfsclone-ng.h" | |
73 | @@ -79,7 +79,7 @@ | |
74 | return lut; | |
75 | } | |
76 | ||
77 | -static s64 ntfs_attr_get_free_bits(ntfs_attr *na) | |
78 | +static s64 ntfs_attr_get_free_bits0(ntfs_attr *na) | |
79 | { | |
80 | u8 *buf, *lut; | |
81 | s64 br = 0; | |
82 | @@ -162,11 +162,11 @@ | |
83 | } | |
84 | ||
85 | // Initialize free clusters metric | |
86 | - ntfs->nr_free_clusters = ntfs_attr_get_free_bits(ntfs->lcnbmp_na); | |
87 | + ntfs->free_clusters = ntfs_attr_get_free_bits0(ntfs->lcnbmp_na); | |
88 | ||
89 | - if ( ntfs->nr_free_clusters < 0 || ntfs->nr_free_clusters >= ntfs->nr_clusters) { | |
90 | + if ( ntfs->free_clusters < 0 || ntfs->free_clusters >= ntfs->nr_clusters) { | |
91 | log_mesg(0, 1, 1, fs_opt.debug, "%s: Bad number of free (%lld) or total (%lld) clusters!\n", __FILE__, | |
92 | - ntfs->nr_free_clusters, ntfs->nr_clusters); | |
93 | + ntfs->free_clusters, ntfs->nr_clusters); | |
94 | } | |
95 | ||
96 | device_size = ntfs_device_size_get(ntfs->dev, 1); | |
97 | @@ -283,12 +283,12 @@ | |
98 | strncpy(image_hdr->fs, ntfs_MAGIC, FS_MAGIC_SIZE); | |
99 | image_hdr->block_size = (int)ntfs->cluster_size; | |
100 | image_hdr->totalblock = (unsigned long long)ntfs->nr_clusters; | |
101 | - image_hdr->usedblocks = (unsigned long long)(ntfs->nr_clusters - ntfs->nr_free_clusters); | |
102 | + image_hdr->usedblocks = (unsigned long long)(ntfs->nr_clusters - ntfs->free_clusters); | |
103 | image_hdr->device_size = (unsigned long long)ntfs_device_size_get(ntfs->dev, 1); | |
104 | fs_close(); | |
105 | ||
106 | log_mesg(3, 0, 0, fs_opt.debug, "%s: hdr - usedblocks:\t: %llu\n", __FILE__, image_hdr->usedblocks); | |
107 | log_mesg(3, 0, 0, fs_opt.debug, "%s: hdr - totalblocks:\t: %llu\n", __FILE__, image_hdr->totalblock); | |
108 | - log_mesg(3, 0, 0, fs_opt.debug, "%s: ntfs - nr_free:\t: %lld\n", __FILE__, ntfs->nr_free_clusters); | |
109 | + log_mesg(3, 0, 0, fs_opt.debug, "%s: ntfs - nr_free:\t: %lld\n", __FILE__, ntfs->free_clusters); | |
110 | } | |
111 | ||
112 | diff -Nur partclone-0.2.24_/src/progress.h partclone-0.2.24/src/progress.h | |
113 | --- partclone-0.2.24_/src/progress.h 2011-05-24 02:47:18.000000000 +0000 | |
114 | +++ partclone-0.2.24/src/progress.h 2011-07-24 14:47:27.038818053 +0000 | |
115 | @@ -12,7 +12,6 @@ | |
116 | */ | |
117 | ||
118 | #include <stdio.h> | |
119 | -#include <time.h> | |
120 | ||
121 | // progress display mode | |
122 | #define TEXT 0 |