Changes by: antona
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10538/ntfsprogs
Modified Files:
Makefile.in mkntfs.c
Log Message:
Update changelog, fox more mkntfs bugs (thanks Timur!) and update build system
to SuSE 9.3 again.
Index: Makefile.in
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/Makefile.in,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -p -r1.75 -r1.76
--- Makefile.in 10 Jul 2005 12:38:50 -0000 1.75
+++ Makefile.in 10 Jul 2005 21:42:44 -0000 1.76
@@ -240,7 +240,6 @@ ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
-ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
all_includes = @all_includes@
all_libraries = @all_libraries@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
Index: mkntfs.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/mkntfs.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -p -r1.60 -r1.61
--- mkntfs.c 9 Jul 2005 21:24:02 -0000 1.60
+++ mkntfs.c 10 Jul 2005 21:42:44 -0000 1.61
@@ -2670,6 +2670,8 @@ static void mkntfs_open_partition(void)
*/
static void mkntfs_override_phys_params(void)
{
+ int i;
+
/* If user didn't specify the sector size, determine it now. */
if (!opts.sector_size) {
#ifdef BLKSSZGET
@@ -2706,8 +2708,15 @@ static void mkntfs_override_phys_params(
}
mkDprintf("number of sectors = %lld (0x%llx)\n", opts.nr_sectors,
opts.nr_sectors);
- /* Reserve the last sector for the backup boot sector. */
- opts.nr_sectors--;
+ /*
+ * Reserve the last sector for the backup boot sector unless the
+ * sector size is less than 512 bytes in which case reserve 512 bytes
+ * worth of secstors.
+ */
+ i = 1;
+ if (opts.sector_size < 512)
+ i = 512 / opts.sector_size;
+ opts.nr_sectors -= i;
/* If user didn't specify the partition start sector, determine it. */
if (opts.part_start_sect < 0) {
opts.part_start_sect = ntfs_device_partition_start_sector_get(
@@ -3264,7 +3273,8 @@ static int create_backup_boot_sector(u8
Vprintf("Creating backup boot sector.\n");
/*
* Write the first max(512, opts.sector_size) bytes from buf to the
- * last sector.
+ * last sector, but limit that to 8192 bytes of written data since that
+ * is how big $Boot is (and how big our buffer is)..
*/
size = 512;
if (size < opts.sector_size)
@@ -3272,11 +3282,11 @@ static int create_backup_boot_sector(u8
if (vol->dev->d_ops->seek(vol->dev, (opts.nr_sectors + 1) *
opts.sector_size - size, SEEK_SET) == (off_t)-1)
goto bb_err;
-
+ if (size > 8192)
+ size = 8192;
bw = mkntfs_write(vol->dev, buff, size);
if (bw == size)
return 0;
-
if (bw == -1LL)
_s = strerror(_e);
else
|