search for: ferror

Displaying 20 results from an estimated 489 matches for "ferror".

Did you mean: error
2007 Feb 07
3
Redirect --stats to STDERR.
...n");/ /- rprintf(FINFO,"Number of files: %d\n", stats.num_files);/ /- rprintf(FINFO,"Number of files transferred: %d\n",/ /+ rprintf(FERROR,"Number of files: %d\n", stats.num_files);/ /+ rprintf(FERROR,"Number of files transferred: %d\n",/ / stats.num_transferred_files);/ /-...
2002 Oct 13
1
rsync 2.5.5 core dump
...sr/lib/libc.so.4 #1 0x28102b0e in abort () from /usr/lib/libc.so.4 #2 0x8052897 in log_exit (code=13, file=0x80693f9 "log.c", line=279) at log.c:555 #3 0x804c662 in _exit_cleanup (code=13, file=0x80693f9 "log.c", line=279) at cleanup.c:87 #4 0x8052248 in rwrite (code=FERROR, buf=0xbfbfa86c "rsync error: errors with program diagnostics (code 13) at log.c(279)\n", len=69) at log.c:279 #5 0x8052302 in rprintf (code=FERROR, format=0x8069580 "rsync error: %s (code %d) at %s(%d)\n") at log.c:324 #6 0x8052924 in log_exit (code=13, file=0x80693...
2002 Sep 25
0
stack overflow
...ation fault. There is excerpt from gdb's bt: #0 0x2810106f in __sfvwrite () from /usr/lib/libc.so.4 #1 0x280fdfe1 in fprintf () from /usr/lib/libc.so.4 #2 0x281002b6 in vfprintf () from /usr/lib/libc.so.4 #3 0x280c98be in vsnprintf () from /usr/lib/libc.so.4 #4 0x80522f5 in rprintf (code=FERROR, format=0x8069920 "rsync error: %s (code %d) at %s(% d)\n") at log.c:295 #5 0x8052944 in log_exit (code=13, file=0x8069799 "log.c", line=279) at log.c:564 #6 0x804c655 in _exit_cleanup (code=13, file=0x8069799 "log.c", line=279) at cleanup.c:87 #7 0x8...
2004 Jan 26
1
patch for linux capabilities
...*request=NULL; +#ifdef HAVE_LINUX_CAPS + cap_t cp; + cap_value_t newcaps[2] = { CAP_SYS_CHROOT, CAP_DAC_READ_SEARCH }; +#endif extern int am_sender; extern int am_server; extern int am_daemon; @@ -373,12 +389,46 @@ } #endif +#ifdef HAVE_LINUX_CAPS + if (setreuid(uid, 0)) { + rsyserr(FERROR, errno, "setreuid(%d,0) failed", (int) uid); + io_printf(f_out, "@ERROR: setreuid failed\n"); + return -1; + } + if( prctl(PR_SET_KEEPCAPS, 1) < 0 ) { + rsyserr(FERROR, errno, "prctl failed"); + io_printf(f_out, "@ERROR: prctl failed\n"); + ret...
2010 Jun 15
3
about rsyncing of block devices
...e, goto cleanup; } + /* On Linux systems (at least), st_size is typically 0 for devices. + * If so, try to determine the actual device size. */ + if (IS_DEVICE(sx.st.st_mode) && sx.st.st_size == 0) { + int fd; + + fd = open(fname, O_RDONLY); + + if (fd < 0) + rsyserr(FERROR, errno, "failed to open %s to determine size", fname); + else { + OFF_T off = lseek(fd, 0, SEEK_END); + if (off == (OFF_T) -1) + rsyserr(FERROR, errno, "failed to seek to end of %s to determine size", fname); + else { + sx.st.st_size = off; + } + close(fd); + }...
2004 Feb 16
1
[patch] Add `--link-by-hash' option (rev 2).
...char *hashname, int64 size, long *fnbr) +{ + DIR *d; + struct dirent *di; + struct hashfile_struct *hashfiles = NULL, *hashfile; + STRUCT_STAT st; + long this_fnbr; + + *fnbr = 0; + + /* Build a list of potential candidates and open + * them. */ + if ((d = opendir(hashname)) == NULL) { + rprintf(FERROR,"opendir \"%s\": %s\n", + hashname, strerror(errno)); + free(hashname); + return NULL; + } + while ((di = readdir(d)) != NULL) { + if (!strcmp(di->d_name,".") || !strcmp(di->d_name,"..")) { + continue; + } + + /* We need to have the largest fnb...
2003 Nov 17
0
[PATCH] --source-filter && --dest-filter for rsync 2.5.6
...* we need to remember that a suffix was specified @@ -631,6 +651,13 @@ return 0; } + if ((source_filter || dest_filter) && no_whole_file) { + snprintf(err_buf,sizeof(err_buf), + "no-whole-file can not be used with source-filter or dest-filter\n"); + rprintf(FERROR,"ERROR: no-whole-file can not be used with source-filter or dest-filter\n"); + return 0; + } + *argv = poptGetArgs(pc); if (*argv) *argc = count_args(*argv); @@ -784,6 +811,17 @@ if (delete_excluded) args[ac++] = "--delete-excluded";...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...char *hashname, int64 size, long *fnbr) +{ + DIR *d; + struct dirent *di; + struct hashfile_struct *hashfiles = NULL, *hashfile; + STRUCT_STAT st; + long this_fnbr; + + *fnbr = 0; + + /* Build a list of potential candidates and open + * them. */ + if ((d = opendir(hashname)) == NULL) { + rprintf(FERROR,"opendir \"%s\": %s\n", + hashname, strerror(errno)); + free(hashname); + return NULL; + } + while ((di = readdir(d)) != NULL) { + if (!strcmp(di->d_name,".") || !strcmp(di->d_name,"..")) { + continue; + } + + /* We need to have the largest fnb...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...dif + case OPT_LINK_BY_HASH: +#if HAVE_LINK + link_by_hash_dir = (char *)poptGetOptArg(pc); + break; +#else + snprintf(err_buf, sizeof err_buf, + "hard links are not supported on this %s\n", + am_server ? "server" : "client"); + rprintf(FERROR, "ERROR: %s", err_buf); + return 0; +#endif + default: /* FIXME: If --daemon is specified, then errors for later @@ -889,6 +904,11 @@ args[ac++] = compare_dest; } + if (link_by_hash_dir && am_sender) { + args[ac++] = "--link-by-hash"; + args[ac++] = l...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...char *hashname, int64 size, long *fnbr) +{ + DIR *d; + struct dirent *di; + struct hashfile_struct *hashfiles = NULL, *hashfile; + STRUCT_STAT st; + long this_fnbr; + + *fnbr = 0; + + /* Build a list of potential candidates and open + * them. */ + if ((d = opendir(hashname)) == NULL) { + rprintf(FERROR,"opendir \"%s\": %s\n", + hashname, strerror(errno)); + free(hashname); + return NULL; + } + while ((di = readdir(d)) != NULL) { + if (!strcmp(di->d_name,".") || !strcmp(di->d_name,"..")) { + continue; + } + + /* We need to have the largest fnb...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...char *hashname, int64 size, long *fnbr) +{ + DIR *d; + struct dirent *di; + struct hashfile_struct *hashfiles = NULL, *hashfile; + STRUCT_STAT st; + long this_fnbr; + + *fnbr = 0; + + /* Build a list of potential candidates and open + * them. */ + if ((d = opendir(hashname)) == NULL) { + rprintf(FERROR,"opendir \"%s\": %s\n", + hashname, strerror(errno)); + free(hashname); + return NULL; + } + while ((di = readdir(d)) != NULL) { + if (!strcmp(di->d_name,".") || !strcmp(di->d_name,"..")) { + continue; + } + + /* We need to have the largest fnb...
2002 Oct 10
0
core dump from rsync
...ng symbols from /usr/lib/libc.so.4...done. Reading symbols from /usr/libexec/ld-elf.so.1...done. #0 0x280fb10d in vfprintf () from /usr/lib/libc.so.4 (gdb) bt #0 0x280fb10d in vfprintf () from /usr/lib/libc.so.4 #1 0x280cb086 in vsnprintf () from /usr/lib/libc.so.4 #2 0x8052261 in rprintf (code=FERROR, format=0x8069540 "rsync error: %s (code %d) at %s(%d)\n") at log.c:295 #3 0x80528e0 in log_exit (code=13, file=0x80693b9 "log.c", line=279) at log.c:564 #4 0x804c632 in _exit_cleanup (code=13, file=0x80693b9 "log.c", line=279) at cleanup.c:87 #5 0x8052...
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...o.h | 20 ++++++++++++++++++++ usr/klibc/fgets.c | 1 + usr/klibc/fputc.c | 1 + usr/klibc/fputs.c | 1 + usr/klibc/fread2.c | 1 + usr/klibc/fwrite2.c | 2 ++ usr/klibc/stdio/clearerr.c | 1 + usr/klibc/stdio/feof.c | 1 + usr/klibc/stdio/ferror.c | 1 + usr/klibc/stdio/fflush.c | 2 +- usr/klibc/stdio/fgetc.c | 1 + usr/klibc/stdio/fileno.c | 1 + 12 files changed, 32 insertions(+), 1 deletion(-) diff --git a/usr/include/stdio.h b/usr/include/stdio.h index 1d45fe1a..521213df 100644 --- a/usr/include/stdio.h +++ b/usr/include...
2002 Jul 06
1
[PATCH] Infinite recursion in rsync --server
...;s a transfer, rsync will immediately start consuming all available RAM. gdb shows that its recursing while trying to report the failed write: #0 0x420503ac in vfprintf () from /lib/i686/libc.so.6 #1 0x42072f74 in vsnprintf () from /lib/i686/libc.so.6 #2 0x08052ca4 in rprintf (code=FERROR, format=0x8068a00 "rsync error: %s (code %d) at %s(%d)\n") at log.c:295 #3 0x080532b5 in log_exit (code=13, file=0x806878f "log.c", line=279) at log.c:564 #4 0x0804c9ad in _exit_cleanup (code=13, file=0x806878f "log.c", line=279) at c...
2002 Feb 20
2
[PATCH] rsync on cygwin - textmode config files
...Feb 19 14:04:36 2002 @@ -82,13 +82,24 @@ static int get_secret(int module, char * if (!fname || !*fname) return 0; - fd = open(fname,O_RDONLY); + fd = open(fname,O_RDONLY +#ifdef __CYGWIN__ + | O_TEXT +#endif + ); if (fd == -1) return 0; if (do_stat(fname, &st) == -1) { rsyserr(FERROR, errno, "stat(%s)", fname); ok = 0; } else if (lp_strict_modes(module)) { +/* Under CYGWIN, we don't want to force attribute check. It can be made to + work if env var CYGWIN contains "ntea" (nt extended attribute mode), but + frankly, it is a MAJOR pain in the ass...
2004 Feb 17
1
[patch] Make robust_rename() handle EXDEV.
...500 @@ -236,21 +236,8 @@ /* move tmp file over real file */ if (robust_rename(fnametmp,fname) != 0) { - if (errno == EXDEV) { - /* rename failed on cross-filesystem link. - Copy the file instead. */ - if (copy_file(fnametmp,fname, file->mode & INITACCESSPERMS)) { - rprintf(FERROR, "copy %s -> \"%s\": %s\n", - full_fname(fnametmp), fname, - strerror(errno)); - } else { - set_perms(fname,file,NULL,0); - } - } else { - rprintf(FERROR,"rename %s -> \"%s\": %s\n", - full_fname(fnametmp), fname, strerror(errno));...
2001 Nov 20
2
rsync server over SSH [includes code patches]
...int sargc=0; ! char line[MAXPATHLEN]; char *p, *user=NULL; - extern int remote_version; - extern int am_sender; extern struct in_addr socket_address; - - if (argc == 0 && !am_sender) { - extern int list_only; - list_only = 1; - } if (*path == '/') { rprintf(FERROR,"ERROR: The remote path must start with a module name\n"); return -1; --- 29,42 ---- int start_socket_client(char *host, char *path, int argc, char *argv[]) { ! int fd; ! int ret; char *p, *user=NULL; extern struct in_addr socket_address; + /* this is redundant with...
2013 Jan 31
0
File descriptors in pipe.c
...each end for reading and writing. But in the rsync code, two pairs are created as to_child_pipe and from_child_pipe ------------------------------------------------------------ --------------------- if (fd_pair(to_child_pipe) < 0 || fd_pair(from_child_pipe) < 0) { rsyserr(FERROR, errno, "pipe"); exit_cleanup(RERR_IPC); } //to_pipe_child[]={3,4} //from_pipe_child[]={5,6} pid = do_fork(); printf("value of pid is %d",pid); if (pid == -1) { rsyserr(FERROR, errno, "fork...
2014 Jun 24
2
[syslinux:master] isohybrid: Function to write UTF-16LE strings
...100644 > --- a/utils/isohybrid.c > +++ b/utils/isohybrid.c > @@ -593,7 +593,7 @@ read_mbr_template(char *path, uint8_t *mbr) > err(1, "could not open MBR template file `%s'", path); > clearerr(fp); > ret = fread(mbr, 1, MBRSIZE, fp); > - if (ferror(fp)) > + if (ferror(fp) || ret != MBRSIZE) > err(1, "error while reading MBR template file `%s'", path); > fclose(fp); > } Shouldn't that be in a separate commit? > @@ -786,6 +786,21 @@ reverse_uuid(uuid_t uuid) > t = p[6]; p[6] = p[7]; p[7...
2003 Jul 05
2
Unhelpful error message when matching hosts in access list [PATCH]
...an address (by some clever criterion), then this match either should not be done, or the confusing error message should not be printed. 2. The "malformed address" message is written whenever getaddrinfo() fails, ignoring the error code. Suggestion: Instead of rprintf(FERROR,"malformed address %s\n", tok); use gai_strerror(3) to get a more helpful error description: rprintf(FERROR,"error matching address %s: %s\n", tok, gai_strerror(gai)); ---------------------------------------------------------------------- Below is a patch that fixes...