search for: do_stat

Displaying 20 results from an estimated 54 matches for "do_stat".

2023 Jan 13
0
[klibc:master] ls: Handle relative directory names correctly
.../utils/ls.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/usr/utils/ls.c b/usr/utils/ls.c index 9677bc0f..50af4349 100644 --- a/usr/utils/ls.c +++ b/usr/utils/ls.c @@ -50,7 +50,7 @@ static void do_preformat(const struct stat *st) return; } -static void do_stat(const struct stat *st, const char *path) +static void do_stat(const struct stat *st, int dir_fd, const char *path) { char *fmt, *link_name; int rc; @@ -138,7 +138,7 @@ static void do_stat(const struct stat *st, const char *path) perror("malloc"); exit(1); } - rc = readlin...
2008 Nov 24
5
[Bug 1541] New: sftp: the do_stat() failure is ignored for chown, chgrp ops. in parse_dispatch_command()
https://bugzilla.mindrot.org/show_bug.cgi?id=1541 Summary: sftp: the do_stat() failure is ignored for chown, chgrp ops. in parse_dispatch_command() Product: Portable OpenSSH Version: -current Platform: All OS/Version: All Status: NEW Severity: trivial Priority: P5 Component:...
2006 Jun 28
2
APPEND bug in dovecot-20060628
Hi. I'm running maildir quotas with rc1 (dovecot-20060628) and get the following when trying to APPEND: "NO Unknown error" System logs show: Quota: Couldn't get new message's size .... and the file isn't there (unknown if Dovecot removed it, or if the lack of the file is the cause of the error). I reverted back to dovecot-20060621 and APPEND is now working again.
2007 Feb 07
3
Redirect --stats to STDERR.
.../--- rsync-2.6.9/main.c 2006-10-14 01:46:32.000000000 +0200/ /+++ rsync-2.6.9.new/main.c 2007-02-06 19:28:08.000000000 +0100/ /@@ -227,39 +227,39 @@/ / {/ / if (do_stats) {/ / rprintf(FCLIENT, "\n");/ /- rprintf(FINFO,"Number of files: %d\n", stats.num_files);/ /- rprintf(FINFO,"Number of files tran...
2002 May 16
1
[patch] suggestions for -v option
...return verbose > 1 && recurse && !am_server; } static void start_filelist_progress(char *kind) --- rsync-2.5.5/main.c.orig Wed Mar 27 06:10:44 2002 +++ rsync-2.5.5/main.c Tue May 14 16:38:06 2002 @@ -118,7 +118,7 @@ (double)stats.total_read); } - if (verbose || do_stats) { + if (verbose > 1 || do_stats) { rprintf(FINFO,"wrote %.0f bytes read %.0f bytes %.2f bytes/sec\n", (double)stats.total_written, (double)stats.total_read, --- rsync-2.5.5/generator.c.orig Mon Mar 25 06:54:31 2002 +++ rsync-2.5.5/generator.c Tue May 14 16:40...
2002 Jul 31
1
rsync: omit summary with a single -v
...lelist_progress(char *kind) diff -r -X /home/roderick/.diff-exclude -u rsync-2.5.5.debian/main.c rsync-2.5.5/main.c --- rsync-2.5.5.debian/main.c Wed Mar 27 00:10:44 2002 +++ rsync-2.5.5/main.c Wed Jul 31 09:13:10 2002 @@ -118,7 +118,7 @@ (double)stats.total_read); } - if (verbose || do_stats) { + if (verbose > 1 || do_stats) { rprintf(FINFO,"wrote %.0f bytes read %.0f bytes %.2f bytes/sec\n", (double)stats.total_written, (double)stats.total_read, diff -r -X /home/roderick/.diff-exclude -u rsync-2.5.5.debian/rsync.1 rsync-2.5.5/rsync.1 --- rsync-2....
2003 Apr 08
2
[Patch] Require extra --stats to emit heap statistics
...t;, 'z', POPT_ARG_NONE, &do_compression , 0, 0, 0 }, {"daemon", 0, POPT_ARG_NONE, &am_daemon , 0, 0, 0 }, {"no-detach", 0, POPT_ARG_NONE, &no_detach , 0, 0, 0 }, - {"stats", 0, POPT_ARG_NONE, &do_stats , 0, 0, 0 }, + {"stats", 0, POPT_ARG_NONE, 0, OPT_STATS, 0, 0 }, {"progress", 0, POPT_ARG_NONE, &do_progress , 0, 0, 0 }, {"partial", 0, POPT_ARG_NONE, &keep_partial , 0, 0, 0 }, {"ignore-errors...
2011 Mar 30
2
[PATCH] xenstore-stat v2
...S_PERM_WRITE: + return "-w"; + case XS_PERM_READ: + return "r-"; + case XS_PERM_READ|XS_PERM_WRITE: + return "rw"; + case XS_PERM_NONE: + return "--"; + default: + return "uu"; + } +} + +static void +do_stat(struct xs_handle *xsh, xs_transaction_t xth, char *path) +{ + unsigned int i, nperms; + struct xs_permissions *perms; + + perms = xs_get_permissions(xsh, xth, path, &nperms); + if (!perms) + errx(1, "Unable to get permission on %s\n", path); + + if (!nperms) { +...
2004 Jan 06
2
[patch] making rsync less verbose
...32,7 @@ extern int am_daemon; extern int verbose; extern int protocol_version; +extern int show_speedup; /* there's probably never more than at most 2 outstanding child processes, * but set it higher just in case. @@ -146,7 +147,7 @@ (double)stats.total_read); } - if (verbose || do_stats) { + if (show_speedup || do_stats) { rprintf(FINFO,"\nwrote %.0f bytes read %.0f bytes %.2f bytes/sec\n", (double)stats.total_written, (double)stats.total_read, --- rsync-2.6.0/options.c.orig 2003-12-30 19:16:25.000000000 +0100 +++ rsync-2.6.0/options.c 2004-01-06 17:10:19.0...
2003 May 16
4
[RFC] report options
...through this option so "--report=file,dir,stats,progress" would be the near equivalent of "-v --stats --progress". For backward compatability and because -v is intuitive the existing options would be preserved and mapped into the bitmasks. INTERNAL USAGE The use of verbose, do_stats and do_progress are replaced with two bitmasks: report_flags and debug_flags. Two bitmasks were chosen because debugging and verbosity should be considered separate issues. To facilitate using these two macros are created. Everywhere you have something like "if (verbose)" or "if...
2011 Jul 07
5
[PATCH 0/5] checkpatch cleanups
It seems checkpatch errors krept in, this is a first go. Next run will go into usr/kinit directory. No code changes, just codingstyle fixes (verified with size(3)). maximilian attems (5): [klibc] sleep: have argument on next line [klibc] readklink: remove unneeded braces [klibc] mount: whitespace policy [klibc] ls: fix various checkpatch complaints [klibc] tests: checkpatch fixlets
2009 May 29
1
[PATCH v2] klibc-utils: add simple ls
...tes = snprintf(NULL, 0, "%u", minor(st->st_rdev))) > max_min) + max_min = bytes; + + max_size = max_maj + max_min + 1; + } + else { + if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_size)) > max_size) + max_size = bytes; + } + return; +} + +static void do_stat(const struct stat *st, const char *path) +{ + char *fmt, *link_name; + int rc; + + switch (st->st_mode & S_IFMT) { + case S_IFBLK: putchar('b'); break; + case S_IFCHR: putchar('c'); break; + case S_IFDIR: putchar('d'); break; + case S_IFIFO: putchar('p'...
2009 May 28
1
[PATCH] klibc-utils: add minils
...tes = snprintf(NULL, 0, "%u", minor(st->st_rdev))) > max_min) + max_min = bytes; + + max_size = max_maj + max_min + 1; + } + else { + if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_size)) > max_size) + max_size = bytes; + } + return; +} + +static void do_stat(const struct stat *st, const char *path) +{ + size_t max_siz = 128; + size_t sz; + char *fmt, *link_name; + + switch (st->st_mode & S_IFMT) { + case S_IFBLK: printf("b"); break; + case S_IFCHR: printf("c"); break; + case S_IFDIR: printf("d"); break; + cas...
2014 Mar 10
5
[Bug 10494] New: remove-source-files fails with symlinks
https://bugzilla.samba.org/show_bug.cgi?id=10494 Summary: remove-source-files fails with symlinks Product: rsync Version: 3.1.0 Platform: x64 OS/Version: Linux Status: NEW Severity: major Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: afried at deteque.com
2008 Mar 19
0
[PATCH] Unsnarl missing_below/dry_run logic.
...int ndx, statret = -1; stat_errno = ENOENT; } else { + dry_missing_dir = NULL; const char *dn = file->dirname ? file->dirname : "."; if (parent_dirname != dn && strcmp(parent_dirname, dn) != 0) { if (relative_paths && !implied_dirs - && do_stat(dn, &sx.st) < 0 - && create_directory_path(fname) < 0) { - rsyserr(FERROR_XFER, errno, - "recv_generator: mkdir %s failed", - full_fname(dn)); + && do_stat(dn, &sx.st) < 0) { + if (dry_run) + goto parent_is_dry_missing; + if (cre...
2004 Feb 09
1
[patch] Add `--link-by-hash' option.
...e we need to store + * a new file. */ + this_fnbr = atol(di->d_name); + if (this_fnbr > *fnbr) + *fnbr = this_fnbr; + + hashfile = (struct hashfile_struct*)malloc(sizeof(struct hashfile_struct)); + asprintf(&hashfile->name,"%s/%s",hashname, + di->d_name); + if (do_stat(hashfile->name,&st) == -1) { + rprintf(FERROR,"%s: %s", hashfile->name, + strerror(errno)); + kill_hashfile(hashfile); + continue; + } + if (st.st_size != size) { + kill_hashfile(hashfile); + continue; + } + hashfile->fd = open(hashfile->name,O_RDONLY|O_BI...
2007 Aug 20
5
DO NOT REPLY [Bug 4899] New: When a mounted dir cannot be visited, rsync will halt there and the shell is halted, even "ctrl -c" can't quit it.
...Root cause: related brief process of rsync: 1 client_run(), called once the connection has been negotiated. 2 read the filter. 3 send_file_list(). 4 send_files(). In step 3, rsync will examine the file one by one, to decide whether it is a symblic, whether it is filtered, and so on. It revokes do_stat to check the file status. int do_stat(const char *fname, STRUCT_STAT *st) { #if HAVE_OFF64_T return stat64(fname, st); #else return stat(fname, st); #endif } It revokes system function "stat", which will halt when the mounted dir is crashed. The "stat" issue is not due to rs...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 4).
...e we need to store + * a new file. */ + this_fnbr = atol(di->d_name); + if (this_fnbr > *fnbr) + *fnbr = this_fnbr; + + hashfile = (struct hashfile_struct*)malloc(sizeof(struct hashfile_struct)); + asprintf(&hashfile->name,"%s/%s",hashname, + di->d_name); + if (do_stat(hashfile->name,&st) == -1) { + rprintf(FERROR,"%s: %s", hashfile->name, + strerror(errno)); + kill_hashfile(hashfile); + continue; + } + if (st.st_size != size) { + kill_hashfile(hashfile); + continue; + } + hashfile->nlink = st.st_nlink; + hashfile->fd =...
2004 Feb 17
0
[patch] Add `--link-by-hash' option (rev 3).
...e we need to store + * a new file. */ + this_fnbr = atol(di->d_name); + if (this_fnbr > *fnbr) + *fnbr = this_fnbr; + + hashfile = (struct hashfile_struct*)malloc(sizeof(struct hashfile_struct)); + asprintf(&hashfile->name,"%s/%s",hashname, + di->d_name); + if (do_stat(hashfile->name,&st) == -1) { + rprintf(FERROR,"%s: %s", hashfile->name, + strerror(errno)); + kill_hashfile(hashfile); + continue; + } + if (st.st_size != size) { + kill_hashfile(hashfile); + continue; + } + hashfile->nlink = st.st_nlink; + hashfile->fd =...
2004 Feb 23
0
[patch] Add `--link-by-hash' option (rev 5).
...e we need to store + * a new file. */ + this_fnbr = atol(di->d_name); + if (this_fnbr > *fnbr) + *fnbr = this_fnbr; + + hashfile = (struct hashfile_struct*)malloc(sizeof(struct hashfile_struct)); + asprintf(&hashfile->name,"%s/%s",hashname, + di->d_name); + if (do_stat(hashfile->name,&st) == -1) { + rprintf(FERROR,"%s: %s", hashfile->name, + strerror(errno)); + kill_hashfile(hashfile); + continue; + } + if (st.st_size != size) { + kill_hashfile(hashfile); + continue; + } + hashfile->nlink = st.st_nlink; + hashfile->fd =...