search for: is_linux

Displaying 4 results from an estimated 4 matches for "is_linux".

2014 Jan 30
0
[PATCH 03/05] utils/mkdiskimage.in: Replaced the partly linux-specific file size determination by a sysseek() experiment
...:Handle; # For flush() @@ -116,15 +117,8 @@ if ( $c == 0 && $file ne '' ) { $len = 0; if ( sysopen(OUTPUT, $file, O_RDWR, 0666) ) { $is_open = 1; - - if ( (@filestat = stat(OUTPUT)) && S_ISREG($filestat[2]) ) { - $len = $filestat[7] >> 9; - } elsif ( $is_linux && S_ISBLK($filestat[2]) ) { - $blksize = pack("L!", 0); - if ( ioctl(OUTPUT, $BLKGETSIZE, $blksize) == 0 ) { - $len = unpack("L!", $blksize); # In 512-byte sectors! - } - } + $len = sysseek(OUTPUT, 0, SEEK_END) >> 9; + sysseek(OUTPUT, 0, SEEK_SET);...
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 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
...$s); } $is_open = 0; @@ -116,15 +120,8 @@ if ( $c == 0 && $file ne '' ) { $len = 0; if ( sysopen(OUTPUT, $file, O_RDWR, 0666) ) { $is_open = 1; - - if ( (@filestat = stat(OUTPUT)) && S_ISREG($filestat[2]) ) { - $len = $filestat[7] >> 9; - } elsif ( $is_linux && S_ISBLK($filestat[2]) ) { - $blksize = pack("L!", 0); - if ( ioctl(OUTPUT, $BLKGETSIZE, $blksize) == 0 ) { - $len = unpack("L!", $blksize); # In 512-byte sectors! - } - } + $len = sysseek(OUTPUT, 0, SEEK_END) >> 9; + sysseek(OUTPUT, 0, SEEK_SET);...