Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hints about HDD geometry issues, and spelling n*zi (spelling, typos, improvements) #40

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pleace access http://partclone.org
please refer to http://partclone.org
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Partclone is a project similar to the well-known backup utility "Partition Image

Partclone now supports ext2, ext3, ext4, hfs+, reiserfs, reiser4, btrfs, vmfs3, vmfs5, xfs, jfs, ufs, ntfs, fat(12/16/32), exfat...

We made some utilies:
We made some utilities:

* partclone.ext2, partclone.ext3, partclone.extfs
* partclone.ext4
Expand Down
6 changes: 3 additions & 3 deletions docs/partclone.ntfsfixboot.8
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Force the operation to occur even if device does not look like a valid NTFS part
.PP
\fB \-p \fR
.RS 4
Print debug information (values read, values requested etc\&.
Print debug information (values read, values requested etc\&.)
.RE
.PP
\fB\fIdevice\fR\fR
Expand Down Expand Up @@ -109,7 +109,7 @@ T}
T{
\fB2\fR
T} T{
an error occured
an error occurred
T}
.TE
.\" line length decrease back to previous value
Expand All @@ -120,7 +120,7 @@ T}
Report bugs to thomas@nchc\&.org\&.tw or
\m[blue]\fB\%http://partclone.org\fR\m[]\&.
.PP
Report bugs to upstrem
Report bugs to upstream
\m[blue]\fB\%http://sourceforge.net/projects/ntfsfixboot/\fR\m[]\&.
.SH "SEE ALSO"
.PP
Expand Down
24 changes: 15 additions & 9 deletions docs/partclone.ntfsfixboot.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
</refmeta>
<refnamediv>
<refname>&dhpackage;</refname>
<refpurpose>deals with braindeadness with moving NTFS filesystems. </refpurpose>
<refpurpose>deals with braindeadness with moving NTFS filesystems.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
Expand Down Expand Up @@ -126,8 +126,14 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
</refsect1>
<refsect1 id="options">
<title>OPTIONS</title>
<para>The program follows the usual GNU command line syntax,a summary of
options is included below.</para>
<para>The program follows the usual GNU command line syntax, a summary of
options is included below.
Desirable data sources for Windows-accepted geometry values might be
EDD (BIOS), (s)fdisk, kernel or others, depending on which provide
suitable (correct) values for the required geometry model.
Having defaults applied might turn out to NOT be what you would want
(resulting in boot failure, or perhaps even worse).
</para>
<variablelist>
<!-- Use the variablelist.term.separator and the
variablelist.term.break.after parameters to
Expand Down Expand Up @@ -173,7 +179,7 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
<varlistentry>
<term><option> -p </option></term>
<listitem>
<para>Print debug information (values read, values requested etc.</para>
<para>Print debug information (values read, values requested etc.)</para>
</listitem>
</varlistentry>
<varlistentry>
Expand Down Expand Up @@ -204,15 +210,15 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
</seglistitem>
<seglistitem>
<seg><errorcode>2</errorcode></seg>
<seg>an error occured</seg>
<seg>an error occurred</seg>
</seglistitem>
</segmentedlist>
</refsect1>
<refsect1 id="bugs">
<!-- Or use this section to tell about upstream BTS. -->
<title>BUGS</title>
<para>Report bugs to &dhemail; or <ulink url="http://partclone.org"/>.</para>
<para>Report bugs to upstrem <ulink url="http://sourceforge.net/projects/ntfsfixboot/"/>.</para>
<para>Report bugs to upstream <ulink url="http://sourceforge.net/projects/ntfsfixboot/"/>.</para>

</refsect1>
<refsect1 id="see_also">
Expand All @@ -225,15 +231,15 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
</citerefentry>, <citerefentry>
<refentrytitle>partclone.chkimg</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>partclone.restore</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>partclone.dd</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>partclone.info</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>, <citerefentry>
<refentrytitle>partclone.restore</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>
</para>
</refsect1>
Expand Down
8 changes: 4 additions & 4 deletions src/fatclone.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static unsigned long long get_used_block();
/// get fet type
static void get_fat_type(){

/// fix, 1. make sure fat_sb; 2. the method shoud be check again
/// fix, 1. make sure fat_sb; 2. the method should be checked again
if (fat_sb.u.fat16.ext_signature == 0x29){
if (fat_sb.u.fat16.fat_name[4] == '6'){
FS = FAT_16;
Expand All @@ -49,7 +49,7 @@ static void get_fat_type(){
fat_type = "FAT12";
log_mesg(2, 0, 0, fs_opt.debug, "%s: FAT Type : FAT 12\n", __FILE__);
} else {
log_mesg(2, 1, 1, fs_opt.debug, "%s: FAT Type : unknow\n" __FILE__);
log_mesg(2, 1, 1, fs_opt.debug, "%s: FAT Type : unknown\n" __FILE__);
}
} else if (fat_sb.u.fat32.fat_name[4] == '2'){
FS = FAT_32;
Expand Down Expand Up @@ -388,7 +388,7 @@ void read_bitmap(char* device, file_system_info fs_info, unsigned long* bitmap,
log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__);
}else{
if (fat_stat == 1)
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__);
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. Maybe it is not cleanly unmounted.\n\n", __FILE__);
else if (fat_stat == 2)
log_mesg(0, 1, 1, fs_opt.debug, "%s: I/O error! %X\n", __FILE__);
}
Expand Down Expand Up @@ -447,7 +447,7 @@ static unsigned long long get_used_block()
/// The second fat is used to check FAT status
fat_stat = check_fat_status();
if (fat_stat == 1)
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__);
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. Maybe it is not cleanly unmounted.\n\n", __FILE__);
else if (fat_stat == 2)
log_mesg(0, 1, 1, fs_opt.debug, "%s: I/O error! %X\n", __FILE__);

Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ int main(int argc, char **argv) {
/// close target
if (dfw != -1)
close(dfw);
/// free bitmp
/// free bitmap
free(bitmap);
close_pui(pui);
#ifndef CHKIMG
Expand Down
4 changes: 2 additions & 2 deletions src/ntfsclone-ng.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static void fs_open(char* device){
log_mesg(3, 0, 0, fs_opt.debug, "%s: NTFS volume version: %d.%d\n", __FILE__, ntfs->major_ver, ntfs->minor_ver);

if (!ntfs_version_is_supported(ntfs)) {
log_mesg(3, 0, 0, fs_opt.debug, "%s: libntfs open/mount %s as ntfs successfull\n", __FILE__, device);
log_mesg(3, 0, 0, fs_opt.debug, "%s: libntfs open/mount %s as ntfs successful\n", __FILE__, device);
} else {
log_mesg(0, 1, 1, fs_opt.debug, "%s: Unknown NTFS version\n", __FILE__);
}
Expand Down Expand Up @@ -255,7 +255,7 @@ void read_bitmap(char* device, file_system_info fs_info, unsigned long* bitmap,
log_mesg(0, 1, 1, fs_opt.debug, "%s: read ntfs attr error: %s\n", __FILE__, strerror(errno));
}
if (count != bitmap_size){
log_mesg(0, 1, 1, fs_opt.debug, "%s: the readed size of ntfs_attr not expected: %s\n", __FILE__, strerror(errno));
log_mesg(0, 1, 1, fs_opt.debug, "%s: unexpected size of readout of ntfs_attr: %s\n", __FILE__, strerror(errno));
}

for (current_block = 0; current_block < ntfs->nr_clusters; current_block++)
Expand Down
14 changes: 9 additions & 5 deletions src/ntfsfixboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int flip(void *p, int size) {

int usage(char *progname) {
fprintf(stderr,
"adjust filesystem geometry for a NTFS partition"
"adjust filesystem geometry for an NTFS partition"
"\nUsage: %s [-h # -t #] [-s start] [-b] [-w] [-f] [-p] device"
"\nwhere device points to an NTFS partition"
"\n"
Expand All @@ -82,14 +82,18 @@ int usage(char *progname) {
"\n\t\tlike a valid NTFS partition or values are equal."
"\n-p:\t\tPrint debug information (values read, values requested etc.)"
"\n"
"\nThis utility displays the current starting sector as defined by the"
"\nthe filesystem. No change will actually be made without the -w"
"\nThis utility displays the current starting sector as defined"
"\nby the filesystem. No change will actually be made without the -w"
"\noption."
"\nDesirable data sources for Windows-accepted geometry values"
"\nmight be EDD (BIOS), (s)fdisk, kernel or others,"
"\ndepending on which provide suitable (correct) values."
"\nHaving defaults applied might turn out to NOT be what you would want."
"\n"
"\nExit status:"
"\n* 0 - success (values are correct, or changed successfully)"
"\n* 1 - a change is needed, but -w was not specified"
"\n* 2 - an error occured"
"\n* 2 - an error occurred"
"\n", progname
);
return 0;
Expand Down Expand Up @@ -355,7 +359,7 @@ int main(int argc, char *argv[]) {
&& !memcmp(&set_geom, &bak_geom, geomsize)
&& !optForce
&& !memcmp(br_sector, bak_sector, 512)) {
puts("No changes neccessary.");
puts("No changes necessary.");
return 0;
}

Expand Down
8 changes: 4 additions & 4 deletions src/partclone.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void print_readable_size_str(unsigned long long size_byte, char *new_size_str) {
* options
* usage - print message "how to use this"
* print_version
* parse_options - get parameters from agrc, argv
* parse_options - get parameters from argc, argv
*/
void usage(void) {
fprintf(stderr, "%s v%s http://partclone.org\nUsage: %s [OPTIONS]\n"
Expand Down Expand Up @@ -474,12 +474,12 @@ void parse_options(int argc, char **argv, cmd_opt* opt) {
}

if ((!opt->target) && (!opt->source)) {
fprintf(stderr, "There is no image name. Use --help get more info.\n");
fprintf(stderr, "There is no image name. Use --help to get more info.\n");
exit(0);
}

if (opt->buffer_size < 512) {
fprintf(stderr, "Too small or bad buffer size. Use --help get more info.\n");
fprintf(stderr, "Too small or bad buffer size. Use --help to get more info.\n");
exit(0);
}

Expand Down Expand Up @@ -1483,7 +1483,7 @@ void print_partclone_info(cmd_opt opt) {
else if (opt.domain)
log_mesg(0, 0, 1, debug, _("Starting to map device (%s) to domain log (%s)\n"), opt.source, opt.target);
else
log_mesg(0, 0, 1, debug, "unknow mode\n");
log_mesg(0, 0, 1, debug, "unknown mode\n");
}

/// print image head
Expand Down
2 changes: 1 addition & 1 deletion src/reiser4clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void fs_open(char* device){
log_mesg(3, 0, 0, fs_opt.debug, "%s: REISER4 stat : %i\n", __FILE__, state);

if (state != FS_OK)
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__);
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. Maybe it is not cleanly unmounted.\n\n", __FILE__);

if (extended)
log_mesg(3, 0, 0, fs_opt.debug, "%s: Extended status: %0xllx\n", extended, __FILE__);
Expand Down
2 changes: 1 addition & 1 deletion src/reiserfsclone.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static void fs_open(char* device){
log_mesg(1, 0, 0, fs_opt.debug, "%s: Ignore filesystem check\n", __FILE__);
}else{
if (get_sb_umount_state(fs->super) != FS_CLEAN)
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. May be it is not cleanly unmounted.\n\n", __FILE__);
log_mesg(0, 1, 1, fs_opt.debug, "%s: Filesystem isn't in valid state. Maybe it is not cleanly unmounted.\n\n", __FILE__);
}

}
Expand Down
2 changes: 1 addition & 1 deletion tests/extra_data_test
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

## ex: ./extra_data_test -t /usr/share/base-files/ -s 256 -r data_pool/ -i data_pool/ -l data_pool/ -f ext3
## example: ./extra_data_test -t /usr/share/base-files/ -s 256 -r data_pool/ -i data_pool/ -l data_pool/ -f ext3

##default_value
test_data_path=""
Expand Down