patch: Synchronous write

Aragorn aragorn at spinningkids.org
Sun Apr 6 13:23:29 UTC 2003


Hi all,

  The attached patch adds a checkbox to the file operations dialog. When
activated, the O_SYNC bit is set on open(2) calls when used for writing.
This way, the kernel buffer-cache  machinery doesn't take effect and you
get ``real''  progress/eta/speed values.  I use it  when writing  to low
speed media (such as  usb memory cards) in order to  have MC display the
real transfer speed and so not to sit back waiting minutes in front of a
silent ``sync'' or ``umount''.

  Dunno  the  audience that  such  a  functionality  may have,  but  I'm
submitting the patch anyway...

thanks,
-- 
Aragorn/sPINNING kIDS

#!/usr/bin/perl
$i=$j=$r=$b=-16.0;while((print"\n"),$b++<15){foreach$a(0..78){print
+(split //,' .:-;!/>)|&IH%*#')[$k&15];for($i=$k=$r=0;$j=$r*$r-$i*$i
-2+$a/25,$i=2*$r*$i+$b/10,$j*$j+$i*$i<11&&$k++<111;$r=$j){}}}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-4.6.0-synchronous_write.diff.gz
Type: application/x-gzip
Size: 1948 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20030406/c499473f/attachment.bin>


More information about the mc-devel mailing list