Displaying 5 results from an estimated 5 matches for "cyl_to_write".
2014 Jan 30
2
[PATCH 02/05] utils/mkdiskimage.in: With option -s: Avoid zeroizing the partition even if truncate() failed
utils/mkdiskimage.in: With option -s: Avoid zeroizing the partition even if truncate() failed.
--- utils/mkdiskimage_patched_01.in 2014-01-30 20:43:02.000000000 +0100
+++ utils/mkdiskimage.in 2014-01-30 20:45:09.000000000 +0100
@@ -217,8 +217,11 @@ print OUTPUT "\x55\xaa";
$totalsize = $c*$h*$s;
$tracks = $c*$h;
-# If -s is given, try to simply use truncate...
-unless
2014 Jan 30
2
[PATCH 04/05] utils/mkdiskimage.in: New option -S to sync zeroizing after each cylinder and to issue pacifier messages
...#39;}) {
} else {
$track = "\0" x (512*$s);
+ $show_pacifier = $opt{'S'};
+
# Print fractional track
print OUTPUT "\0" x (512 * ($s-1));
for ( $i = 1 ; $i < $tracks ; $i++ ) {
+ if ( $show_pacifier && ( $i - 1 ) % $h == 0 ) {
+ $cyl_to_write = ( $i - 1 ) / $h + 1;
+ IO::Handle::sync(OUTPUT);
+ print STDERR " zeroizing cylinder $cyl_to_write of $c\r";
+ }
print OUTPUT $track;
}
+ if ( $show_pacifier ) {
+ IO::Handle::sync(OUTPUT);
+ $zeroized = $totalsize + $zero_tail - 1;
+ print STDERR " $zeroized bloc...
2014 Jul 10
4
[PATCH 1/5] utils/mkdiskimage.in: Option -s caused freshly created image files to be too small by a factor of 512.
---
utils/mkdiskimage.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/mkdiskimage.in b/utils/mkdiskimage.in
index 533193a..a95a077 100644
--- a/utils/mkdiskimage.in
+++ b/utils/mkdiskimage.in
@@ -218,7 +218,7 @@ $totalsize = $c*$h*$s;
$tracks = $c*$h;
# If -s is given, try to simply use truncate...
-unless ($opt{'s'} && truncate(OUTPUT,
2014 Jan 30
1
[PATCH] Mending proposals for mkdiskimage
...* 512);
+} else {
$track = "\0" x (512*$s);
+ $show_pacifier = $opt{'S'};
+
# Print fractional track
print OUTPUT "\0" x (512 * ($s-1));
for ( $i = 1 ; $i < $tracks ; $i++ ) {
+ if ( $show_pacifier && ( $i - 1 ) % $h == 0 ) {
+ $cyl_to_write = ( $i - 1 ) / $h + 1;
+ IO::Handle::sync(OUTPUT);
+ print STDERR " zeroizing cylinder $cyl_to_write of $c\r";
+ }
print OUTPUT $track;
}
+ if ( $zero_tail > 0 ) {
+ if ( $show_pacifier ) {
+ IO::Handle::sync(OUTPUT);
+ print STDERR " zeroizing $zero_tail...
2014 Jan 23
4
[PATCH] Proposal for a pacifier option with mkdiskimage
...PUT, $totalsize)) {
$track = "\0" x (512*$s);
+ $show_pacifier = $opt{'S'};
+
# Print fractional track
print OUTPUT "\0" x (512 * ($s-1));
for ( $i = 1 ; $i < $tracks ; $i++ ) {
+ if ( $show_pacifier && ( $i - 1 ) % $h == 0) {
+ $cyl_to_write = ( $i - 1 ) / $h + 1;
+ IO::Handle::sync(OUTPUT);
+ print STDERR " zeroizing cylinder $cyl_to_write of $c\r";
+ }
print OUTPUT $track;
}
+ if ( $show_pacifier ) {
+ IO::Handle::sync(OUTPUT);
+ print STDERR " $totalsize blocks zeroized. \n";
+ }...