Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/ntfstools
In directory usw-pr-cvs1:/tmp/cvs-serv23064/ntfstools
Modified Files:
mkntfs.c
Log Message:
Enable automatic determination of file size of non-block devices instead of
crashing out. A user specified size stil overrides the actual size, we assume the file size will be adjusted automatically by the seek to the last sector and
write of the backup boot sector.
Index: mkntfs.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/ntfstools/mkntfs.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -U2 -r1.24 -r1.25
--- mkntfs.c 2001/06/11 20:31:29 1.24
+++ mkntfs.c 2001/06/12 20:02:50 1.25
@@ -2621,8 +2621,10 @@
if (!opt.force)
err_exit("Refusing to make a filesystem here!\n");
- if (!opt.nr_sectors)
- err_exit("You must specify the number of sectors if "
- "you want to force creation on non-"
- "block device.\n");
+ if (!opt.nr_sectors) {
+ if (!sbuf.st_blocks)
+ err_exit("You must specify the number of "
+ "sectors.\n");
+ opt.nr_sectors = sbuf.st_blocks;
+ }
fprintf(stderr, "mkntfs forced anyway.\n");
}
|