Displaying 20 results from an estimated 92 matches for "fd1".
Did you mean:
fd
2001 Nov 13
2
direct write patch
...r.c Thu Mar 30 06:23:03 2000
+++ rsync-2.4.6-direct-write/receiver.c Sun Nov 11 11:14:43 2001
@@ -34,6 +34,7 @@
extern char *tmpdir;
extern char *compare_dest;
extern int make_backups;
+extern int direct_write;
extern char *backup_suffix;
static struct delete_list {
@@ -302,7 +303,8 @@
int fd1,fd2;
STRUCT_STAT st;
char *fname;
- char fnametmp[MAXPATHLEN];
+ char *fnametmp;
+ char fnametmpbuf[MAXPATHLEN];
char *fnamecmp;
char fnamecmpbuf[MAXPATHLEN];
struct map_struct *buf;
@@ -314,6 +316,7 @@
extern int preserve_perms;
extern int delete_after;
struct stats initial_stats;...
2003 Sep 03
1
[patch] replace dir with file error
...r.c
===================================================================
RCS file: /data/cvs/rsync/receiver.c,v
retrieving revision 1.51
diff -u -r1.51 receiver.c
--- receiver.c 21 Aug 2003 23:45:49 -0000 1.51
+++ receiver.c 2 Sep 2003 23:29:13 -0000
@@ -419,11 +419,23 @@
continue;
}
- if (fd1 != -1 && !S_ISREG(st.st_mode)) {
- rprintf(FERROR,"%s : not a regular file (recv_files)\n",fnamecmp);
- receive_data(f_in,NULL,-1,NULL,file->length);
+ if (fd1 != -1 && S_ISDIR(st.st_mode) && fnamecmp == fname) {
+ /* this special handling for directories...
2009 Oct 15
1
PATCH: --write-devices to allow synchronising to a block device
...cate(fd, offset) < 0) {
+ rsyserr(FERROR_XFER, errno, "ftruncate failed on %s",
+ full_fname(fname));
+ }
}
#endif
@@ -668,11 +674,25 @@
continue;
}
- if (fd1 != -1 && !S_ISREG(st.st_mode)) {
+ if (fd1 != -1 && !(S_ISREG(st.st_mode) || (write_devices
&& IS_DEVICE(st.st_mode)))) {
close(fd1);
fd1 = -1;
}
+ /* On Linux systems (at least), s...
2005 Jan 05
1
rsync filename heuristics
...har fnamecmpbuf[MAXPATHLEN];
> struct map_struct *buf;
> int i;
> struct file_struct *file;
> @@ -366,28 +365,24 @@
> if (verbose > 2)
> rprintf(FINFO,"recv_files(%s)\n",fname);
>
> - fnamecmp = fname;
> -
> /* open the file */
> - fd1 = do_open(fnamecmp, O_RDONLY, 0);
> + fd1 = do_open(fname, O_RDONLY, 0);
>
> - if ((fd1 == -1) && (compare_dest != NULL)) {
> - /* try the file at compare_dest instead */
> - snprintf(fnamecmpbuf,MAXPATHLEN,"%s/%s",
> - compare_dest,fname);
> -...
2004 Apr 27
1
[PATCH] Inplace option for rsync
...ftruncate(fd, offset);
+
if (do_progress)
end_progress(total_size);
@@ -410,39 +424,52 @@
} else
mapbuf = NULL;
- if (!get_tmpname(fnametmp,fname)) {
- if (mapbuf) unmap_file(mapbuf);
- if (fd1 != -1) close(fd1);
- continue;
- }
-
- strlcpy(template, fnametmp, sizeof template);
+ /* We now check to see if we are writing file "inplace" */
+ if (inplace) {
+ fd2 = do_open(fnamecmp, O_WRONLY|O_CR...
2010 Jan 15
0
[PATCH] Btrfs: fix regression in orphan cleanup
...o it. This is easily reproduceable by
running this testcase
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
int main(int argc, char **argv)
{
char data[4096];
char newdata[4096];
int fd1, fd2;
memset(data, ''a'', 4096);
memset(newdata, ''b'', 4096);
while (1) {
int i;
fd1 = creat("file1", 0666);
if (fd1 < 0)
break;
for (i = 0; i < 512; i++)
write(fd1, data, 4096);
fsync(fd1);
close(fd1);
fd2 = creat("...
2004 Apr 15
0
Multiple compare-dest args
...tern int make_backups;
extern int do_progress;
extern char *backup_dir;
@@ -295,7 +295,7 @@
char *fnamecmp;
char fnamecmpbuf[MAXPATHLEN];
struct map_struct *mapbuf;
- int i;
+ int i, j;
struct file_struct *file;
int phase=0;
int recv_ok;
@@ -361,12 +361,14 @@
/* open the file */
fd1 = do_open(fnamecmp, O_RDONLY, 0);
- if (fd1 == -1 && compare_dest != NULL) {
+ j = 0;
+ while (fd1 == -1 && compare_dest[j] != NULL) {
/* try the file at compare_dest instead */
pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
- compare_dest, fname);
+ compare_dest[j],...
2010 Jun 15
3
about rsyncing of block devices
...& ftruncate(fd, offset) < 0) {
+ && offset < size_r && ftruncate(fd, offset) < 0) {
rsyserr(FERROR_XFER, errno, "ftruncate failed on %s",
full_fname(fname));
}
@@ -668,11 +669,25 @@ int recv_files(int f_in, char *local_nam
continue;
}
- if (fd1 != -1 && !S_ISREG(st.st_mode)) {
+ if (fd1 != -1 && !(S_ISREG(st.st_mode) || (copy_devices && IS_DEVICE(st.st_mode)))) {
close(fd1);
fd1 = -1;
}
+ /* On Linux systems (at least), st_size is typically 0 for devices.
+ * If so, try to determine the actual devi...
2007 Jun 28
1
Error en assign(mname, def, where)
...I am working with the fda package but when I call the function pca.fd I
obtain a message error, which I cann't identify. The error say That :
error in assihn(mname,def,where), is not possible to add links to a
blockade enviroment.
The orther that I'm writting is:
> cp1 <- pca.fd(ind.fd1,nharm=3)
and before it I can to plot the functional data object ind.fd1.
?Have anybody seen this error or any similar message?,
?Any idea?
Thancks for your help
--
View this message in context: http://www.nabble.com/Error-en-assign%28mname%2C-def%2C-where%29-tf3995432.html#a11346689
Sent from th...
2003 Dec 18
2
ADS and Winbind ... Can't access with Samba host name ...
...kerberos(172)
Failed to verify incoming ticket!
But in the machine log with the hostname, I am getting normal
messages ...
I have tried to make changes in /etc/krb5.conf, but I don't get any
further ...
I have tried a few status checks with net, all hosts work fine ...
[root@fd1-test-01 samba]# net lookup ldap
10.1.1.16:389
10.1.1.17:389
[root@fd1-test-01 samba]# net lookup dc
10.1.1.16
10.1.1.17
But net lookup kdc, master domain don't return any thing, so I don't
know what else to look for ...
Thanks
Mailed
Lee
2008 Apr 08
1
Weibull maximum likelihood estimates for censored data
...2 0
10 8 0
11 12 1
library(stats4)
dur_ind_test = function (CDMatrix) # Matrix with durations and
censores
{
lLnw <- function(b){
D = CDMatrix
NT = nrow(D)
a =((NT-D[1,2]-D[NT,2])/ sum(D[,1]^b))^(1/b)
f = sum(log((a^b)*b*(D[2:(NT-1),1]^(b-1))*exp(-((a*D[2:(NT-1),1])^b))))
fd1 = (a^b)*b*(D[1,1]^(b-1))*exp(-(a*D[1,1])^b)
fdn = (a^b)*b*(D[NT,1]^(b-1))*exp(-(a*D[NT,1])^b)
S1 = exp(-(a*D[1,1])^b)
SN = exp(-(a*D[NT,1])^b)
-(D[1,2]*log(S1)+(1-D[1,2])*log(fd1)+ f + D[NT,2]*log(SN)+
(1-D[NT,2])*log(fdn))
}
lLne <- function(A){
D = CDMatrix
NT = nrow(D)
b=1
f = su...
2002 Jun 07
0
problem related to filename length
...;%s",fname);
+ strncpy(fnametmp + strlen(fnametmp) - 6,"XXXXXX",6);
+ }else
+ snprintf(fnametmp,MAXPATHLEN,".%s.XXXXXX",fname);
}
return 1;
@@ -408,21 +429,33 @@
buf = NULL;
}
- if (!get_tmpname(fnametmp,fname)) {
- if (buf) unmap_file(buf);
- if (fd1 != -1) close(fd1);
- continue;
+ {
+ static const int max_retry = 10;
+ int retry = 0;
+ int flag = 0;
+
+ do {
+ if (!get_tmpname(fnametmp,fname)) {
+ if (buf) unmap_file(buf);
+ if (fd1 != -1) close(fd1);
+ flag = 1;
+ break;
+ }
+
+ strlc...
2003 Jan 18
1
possible typo/bug in receiver.c
...kstemp(fnametmp, file->mode & INITACCESSPERMS);
if (fd2 == -1) {
rprintf(FERROR,"mkstemp %s failed: %s\n",fnametmp,strerror(errno));
receive_data(f_in,buf,-1,NULL,file->length);
if (buf) unmap_file(buf);
if (fd1 != -1) close(fd1);
continue;
}
/* in most cases parent directories will already exist
because their information should have been previously
transferred, but that may not be the case with -R */
if (fd2 == -1 && relative_paths &am...
2003 Oct 06
2
Patch to revive tmpfiles
...ch tries to remedy this situation by reviving the temp file.
Patch (Also to be found at: http://xinit.se/~hes/rsync-2.5.6-revive.patch):
--- receiver.c.orig 2003-01-21 00:32:17.000000000 +0100
+++ receiver.c 2003-10-06 14:30:35.000000000 +0200
@@ -457,13 +457,21 @@
if (fd1 != -1) {
close(fd1);
}
- close(fd2);
+
+ /* Revive temp file if someone removed it during receive */
+ fd1 = do_open(fnametmp, O_RDONLY, 0);
+ if (fd1 == -1) {
+ sprintf(fnametmp, &...
2003 Feb 22
1
rsync ported to BeOS-bone
...2003
+++ rsync-2.5.6/receiver.c Thu Feb 20 20:28:14 2003
@@ -203,7 +203,7 @@
}
-static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
+static int recv_data(int f_in,struct map_struct *buf,int fd,char *fname,
OFF_T total_size)
{
int i;
@@ -383,14 +383,14 @@
if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
rprintf(FERROR,"fstat %s : %s\n",fnamecmp,strerror(errno));
- receive_data(f_in,NULL,-1,NULL,file->length);
+ recv_data(f_in,NULL,-1,NULL,file->length);
close(fd1);
continue;
}
if (fd1 != -1 && !S_ISREG(s...
2010 Jan 24
2
Creating directories & folders
Dear R users,
I would like to create the following 3 folders (FUND1, FUND2, MARINE) within
the 'parent.dir' as defined below.
FUND1 <- "FD1 Q4 2009"
FUND2 <- "FD2 Q4 2009"
MARINE <- "MARINE Q4 2009"
parent.dir <- "D:/....................."
folders <- c("FUND1", "FUND2", "MARINE")
for (i in 1:length(folders)) {
dir.create(do.call("paste", c(pa...
2008 Aug 20
0
Problem with exact moment of issuing transfer log entry for a [recv] action
...s
is used, but for this case syncing of external actions on
[recv] log entries is explicitly meaningless.
--- rsync-3.0.3.orig/receiver.c 2008-08-20 16:28:41.000000000 +0400
+++ rsync-3.0.3/receiver.c 2008-08-20 16:33:06.000000000 +0400
@@ -678,8 +678,6 @@
recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size,
fname, fd2, F_LENGTH(file));
- log_item(log_code, file, &initial_stats, iflags, NULL);
-
if (fd1 != -1)
close(fd1);
if (close(fd2) < 0) {
@@ -719,6 +717,7 @@
if (remove_source_files || inc_recurse
|| (preserve_hard_links && F_IS_HLINKED(...
2003 Oct 18
0
Added functionality --compare-file and --compare-auto
...f the GNU General Public License as published by
@@ -34,6 +35,8 @@
extern int io_error;
extern char *tmpdir;
extern char *compare_dest;
+extern char *compare_file;
+extern int compare_auto;
extern int make_backups;
extern char *backup_suffix;
@@ -373,11 +376,17 @@
/* open the file */
fd1 = do_open(fnamecmp, O_RDONLY, 0);
- if ((fd1 == -1) && (compare_dest != NULL)) {
- /* try the file at compare_dest instead */
+ if ((fd1 == -1) && compare_auto) {
+ compare_file = findcomparename(fname,fnamecmpbuf);
+ } else if ((fd1 == -1) && (compare_dest != NULL)...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...ar*)md4);
+ }
read_buf(f_in,file_sum2,MD4_SUM_LENGTH);
if (verbose > 2) {
@@ -351,6 +361,7 @@
extern int preserve_perms;
extern int delete_after;
extern int orig_umask;
+ extern char *link_by_hash_dir;
struct stats initial_stats;
if (verbose > 2) {
@@ -416,7 +427,7 @@
if (fd1 != -1 && do_fstat(fd1,&st) != 0) {
rprintf(FERROR, "fstat %s failed: %s\n",
full_fname(fnamecmp), strerror(errno));
- receive_data(f_in,NULL,-1,NULL,file->length);
+ receive_data(f_in,NULL,-1,NULL,file->length,NULL);
close(fd1);
continue;
}
@@ -42...
2018 Apr 18
1
Bitrot strange behavior
Hi Sweta,
Thanks, this drive me some more questions:
1. What is the reason of delaying signature creation ?
2. As a same file (replicated or dispersed) having different signature thought bricks is by definition an error, it would be good to triggered it during a scrub, or with a different tool. Is something like this planned ?
Cheers
?
C?dric Lemarchand
> On 18 Apr 2018, at 07:53, Sweta