Displaying 20 results from an estimated 59 matches for "write_file".
2003 Apr 27
4
Bogus rsync "Success" message when out of disk space
Patches welcome, eh, Paul?
Upon further (belated) investigation, there are 2 affected places
in receiver.c with this error message. Both call write_file().
And write_file is called only in those two places. So that is the
appropriate location to patch. Especially since the obvious fix is
to use the rewrite code already there for the sparse file writes.
-------------------------------------8<-------------------------------------
--- fileio.c.o...
2012 Mar 16
2
plotting border over map
...ap
library(sp)
library(rgdal)
library(maps)
library(gplots)
library(clim.pact)
library(fields)
source("/R/PlotGridded2DMap.R")
source("/R/image.plot.fix.R")
source("/R/image.plot.plt.fix.r")
seasonal_plot<-function(input,lonll=-180,latll=-90,lonres=5.,latres=3.75,write_file=TRUE,The_title=NULL){
if(is.null(The_title)){
for (ki in 1:length(input)){
The_title[[ki]]<-sprintf("XCH4 CH4 (ppb)",ki)
}
}
if(!is.list(input)){input=list(input)}
lon.ll <- lonll #lower left corner of grid
lat.ll <- latll...
2008 Nov 13
3
Creating a file and saving in public directory
...have a model called Report and I''m trying to create a text file that
is saved in a /public/report directory.
I''ve had a look at the ruby api but I can''t seem to get this working.
The current code I have is:
#report.rb
class Report < ActiveRecord::Base
after_save :write_file
def write_file
if @file_data
File.makedirs("#{RAILS_ROOT}/report")
File.open("#{RAILS_ROOT}/report/waiting.adc", "w") { |file|
file.write("hello world") }
end
end
end
#report_controller.rb
def new
@report = File.new
end
def cr...
2017 Mar 02
1
[PATCH] generator: Move some deprecated functions to actions_core_deprecated.ml.
...29, 17);
style = RInt64 "ptr", [], [];
fish_output = Some FishOutputHexadecimal;
@@ -2259,28 +2227,6 @@ This creates an LVM logical volume called C<logvol>
on the volume group C<volgroup>, with C<size> megabytes." };
{ defaults with
- name = "write_file"; added = (0, 0, 8);
- style = RErr, [Pathname "path"; String "content"; Int "size"], [];
- protocol_limit_warning = true; deprecated_by = Some "write";
- (* Regression test for RHBZ#597135. *)
- tests = [
- InitScratchFS, Always, TestLa...
2006 Aug 15
8
AGAIN: file object treated as string
......
<%= end_form_tag %>
CONTROLLER:
def save_image
@image = Image.new(params[:image])
# attempt to save entry in the db
if @image.save
# info saved in db OK. Save file on the server
write_file(params[:image])
redirect_to(:controller => ''shto'', :action =>
''index'')
else
render(:action => :get)
end
end
def write_file(uploaded_file)...
2003 May 23
1
PATCH: better handling for write failures (disk full)
...generate a useful error message.
rsync.c: if using -T but not --partial, remove a partial result
when a write error occurs
Perhaps the changes in receive_data() could specifically just target
ENOSPC, on the assumption that any other write error is fatal.
I'm also using John Van Essen's write_file() patch from:
http://lists.samba.org/pipermail/rsync/2003-April/010511.html
John
diff -Nru a/rsync/receiver.c b/rsync/receiver.c
--- a/rsync/receiver.c Tue May 20 08:56:43 2003
+++ b/rsync/receiver.c Tue May 20 08:56:43 2003
@@ -214,6 +214,7 @@
static char file_sum1[MD4_SUM_LENGTH];
static...
2003 May 20
0
patch for better handling of write failures (disk full)
...scard the rest of the
current file transfer and keep working.
rsync.c: if using -T and not --partial, remove partial result
Perhaps the changes in receive_data() could specifically just target
ENOSPC, on the assumption that any other write error is fatal.
I'm also using John Van Essen's write_file() patch from:
http://lists.samba.org/pipermail/rsync/2003-April/010511.html
diff -Nru a/rsync/receiver.c b/rsync/receiver.c
--- a/rsync/receiver.c Tue May 20 08:56:43 2003
+++ b/rsync/receiver.c Tue May 20 08:56:43 2003
@@ -214,6 +214,7 @@
static char file_sum1[MD4_SUM_LENGTH];
static char fi...
2002 Dec 09
2
Rsync performance increase through buffering
...te payload).
Since the source and dest files are the same, the send test only
wrote 1,738,797 bytes and read 2,139,848 bytes.
These results are similar to rsync 2.5.5.
Below is a patch to a few files that adds read and write buffering in
the places where the I/O was unbuffered, adds buffering to write_file()
and removes the unneeded gettimeofday() system call in show_progress().
The results with the patch are:
- Send test: 46,835 system calls, versus 2,488,775.
- Receive test: 138,367 system calls, versus 1,615,931.
- Send test from another machine: 5,255 ethernet packets, versus 701,111....
2006 Aug 15
0
file object treated as a string
...n in the controller. Controller looks like this:
def save_image
@image = Image.new(params[:image])
# attempt to save entry in the db
if @image.save
# info saved in db OK. Save file on the server
write_file(params[:image])
redirect_to(:controller => ''shto'', :action => ''index'')
else
render(:action => :get)
end
end
def write_file(uploaded_file)...
2011 Jan 23
0
Samba files_struct: "bool modified" and "bool update_write_time_on_close"
...rious elements in the structure "files_struct",
which samba uses.
I find the following two elements of particular interest here:
bool modified;
bool update_write_time_on_close;
I see that "modified" is set to true whenever something is written into the
file. (in the function: write_file() of fileio.c)
I further see that right after "modified" is set to true (in the function:
write_file() of fileio.c), "trigger_write_time_update()" is called where
"update_write_time_on_close" is set to true.
Isnt it that whenever a files is written into, i.e. "mo...
2003 May 12
1
AW: samba ldap and pam without -with-ldapsam option
Hi,
pam's auth section are always ignored, when using
"encrypt passwords = Yes". But you can still use
the account and session sections when you set
"obey pam restrictions = Yes"
J?rgen
> -----Urspr?ngliche Nachricht-----
> Von: samba-bounces+hoetzel=cyperfection.de@lists.samba.org
> [mailto:samba-bounces+hoetzel=cyperfection.de@lists.samba.org]
> Im
2006 Jan 06
4
Upload Progress Bar Problems
I''m writing an application where the user will be uploading many images
and user feedback is essential.
I''ve been trying to get the upload progress bar plug-in to work, but
thus far have not had any success.
I''ve downloaded Sean Treadway''s application code from his site
http://sean.treadway.info/demo/upload/ and I followed the steps in his
Upload
2011 May 23
5
Integration branch pushed out to btrfs-unstable
Hi everyone,
I''ve pushed out my current kernel git tree to a new branch called
integration-test. This is meant for integration testing only and should
not be run by anyone who doesn''t love crashes.
I''ve pulled together a lot of important work from a lot of different
people. It includes:
The new inode number allocator
Delayed inode and directory item updates
Scrub,
2002 Feb 01
0
rsync Warning: unexpected read size of 0 in map_ptr
...+247,7 @@
i = -(i+1);
offset2 = i*(OFF_T)n;
len = n;
- if (i == count-1 && remainder != 0)
+ if (i == (int)(count-1) && remainder != 0)
len = remainder;
stats.matched_data += len;
@@ -263,7 +263,7 @@
sum_update(map,len);
}
- if (fd != -1 && write_file(fd,map,len) != len) {
+ if (fd != -1 && write_file(fd,map,len) != (int)len) {
rprintf(FERROR,"write failed on %s : %s\n",
fname,strerror(errno));
exit_cleanup(RERR_FILEIO);
diff -ru rsync-2.4.6/sender.c rsync-2.4.6-fixed/sender.c
--- rsync-2.4.6/sender.c Tue Sep 5 2...
2003 Jan 03
0
[Fwd: Re: rsync windows -> unix still hanging :(]
...static size_t writeBufSize;
> static size_t writeBufCnt;
>
> if ( !writeBuf ) {
> writeBufSize = MAX_MAP_SIZE;
> writeBufCnt = 0;
> writeBuf = (char*)malloc(MAX_MAP_SIZE);
> if (!writeBuf) out_of_memory("write_file");
> }
> ret = len;
> do {
> if ( buf && writeBufCnt < writeBufSize ) {
> size_t copyLen = len;
> if ( copyLen > writeBufSize - writeBufCnt ) {
> copyLen = writeBufSize - writeBufCnt;...
2005 Jun 10
1
problem syncing files on RAM in embedded device
Hi all,
i am working on an networking product which has a 32 MB flash memory
and a 64MB RAM.
i need to sync a file named appl.gz which is of size 3.1MB from a unit
with ip 192.168.10.1 to a unit with ip 192.168.10.2.
the rsync is called from a C code which does a fork-execve operation.
the command line options being passed to rsync is as below:
command: rsync --stats -aI --temp-dir=/tmp/
2009 Aug 13
7
[PATCHx7] Misc patches
...;device>, with the root directory being C<root>.");
- ("cp", (RErr, [String "src"; String "dest"]), 87, [],
+ ("cp", (RErr, [Pathname "src"; Pathname "dest"]), 87, [],
[InitBasicFS, Always, TestOutput (
[["write_file"; "/old"; "file content"; "0"];
["cp"; "/old"; "/new"];
@@ -2189,7 +2189,7 @@ C<device>, with the root directory being C<root>.");
This copies a file from C<src> to C<dest> where C<dest> is...
2004 Apr 27
1
[PATCH] Inplace option for rsync
..._fname(fname), strerror(errno));
exit_cleanup(RERR_FILEIO);
}
+
offset += i;
continue;
}
@@ -249,16 +251,28 @@
sum_update(map,len);
}
- if (fd != -1 && write_file(fd,map,len) != (int) len) {
- rprintf(FERROR, "write failed on %s: %s\n",
- full_fname(fname), strerror(errno));
- exit_cleanup(RERR_FILEIO);
+ if (!inplace || (offset != offset2)) {
+ if (fd != -1 &&...
2010 Oct 13
1
[PATCH] Use augeas to update securetty
...t; || $line eq "hvc0") {
- $line = "ttyS0";
+ if($tty eq "xvc0" || $tty eq "hvc0") {
+ $g->aug_set($augpath, 'ttyS0');
}
-
- $size += length($line) + 1;
- push(@lines, $line);
}
- $g->write_file('/etc/securetty', join("\n", @lines)."\n", $size);
-
# Update any kernel console lines
foreach my $augpath
($g->aug_match("/files/boot/grub/menu.lst/title/kernel/console"))
--
1.7.2.3
2002 Nov 07
0
Bogus rsync "Success" message when out of disk space
...at receiver.c(243)
rsync: connection unexpectedly closed (152112 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)
"Success", eh? I don't think so. :)
In receiver.c there are three places with code similar to:
if (fd != -1 && write_file(fd,data,i) != i) {
rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno));
exit_cleanup(RERR_FILEIO);
}
A partial write due to running out of room (as opposed to a write
that fails to write any data at all) apparently does not set an
error code (errno stays...