204 |
return -ENOSYS() unless open($fh,'+<',$pending->{$file}->{path}); |
return -ENOSYS() unless open($fh,'+<',$pending->{$file}->{path}); |
205 |
if($rv = seek( $fh ,$off,SEEK_SET)) { |
if($rv = seek( $fh ,$off,SEEK_SET)) { |
206 |
$rv = print( $fh $buf ); |
$rv = print( $fh $buf ); |
207 |
warn "## ", $pending->{$file}->{path}, " $off ",length( $buf ), "\n" if $debug; |
warn "## write ", $pending->{$file}->{path}, " $off ",length( $buf ), "\n" if $debug; |
208 |
} |
} |
209 |
$rv = -ENOSYS() unless $rv; |
$rv = -ENOSYS() unless $rv; |
210 |
close($fh); |
close($fh); |
255 |
rename $path, $no_gz || confess "can't rename $path -> $no_gz: $!"; |
rename $path, $no_gz || confess "can't rename $path -> $no_gz: $!"; |
256 |
} |
} |
257 |
warn "## truncate( $file $size ) $path [", -s $path, "]\n"; |
warn "## truncate( $file $size ) $path [", -s $path, "]\n"; |
258 |
|
$pending->{$file}->{write}++; |
259 |
return $rv; |
return $rv; |
260 |
} |
} |
261 |
sub x_utime { return utime($_[1],$_[2],fixup($_[0])) ? 0:-$!; } |
sub x_utime { return utime($_[1],$_[2],fixup($_[0])) ? 0:-$!; } |