Displaying 7 results from an estimated 7 matches for "cur_pos".
2007 Nov 09
1
Patch for progressmeter.c
...39:40.000000000 -0400
+++ progressmeter.c 2007-10-22 13:19:11.000000000 -0400
@@ -68,7 +68,9 @@ static time_t last_update; /* last progr
static char *file; /* name of the file being transferred */
static off_t end_pos; /* ending position of transfer */
static off_t cur_pos; /* transfer position as of last refresh */
-static volatile off_t *counter; /* progress counter */
+static off_t last_pos;
+static off_t max_delta_pos = 0;
+static volatile off_t *counter; /* progress counter */
static long stalled; /* how long we have been stalled */...
2012 Nov 04
1
hexdump.c32 for Syslinux 5.00-pre9
...cts */
+static const char *prog_name;
+static int opt_page;
+static int opt_no_buffer;
+static int opt_extended_ascii;
+
+int main(int argc, char **argv)
+{
+ int rc;
+ const char *filename;
+ int i;
+ void *file_data;
+ size_t file_sz;
+ FILE *f;
+ size_t len;
+ const char *cur_pos;
+
+ /* Assume failure */
+ rc = EXIT_FAILURE;
+
+ /* Determine the program name, as invoked */
+ if (argc < 1 || !argv || !argv[0]) {
+ fprintf(stderr, "argc or argv failure!\n");
+ goto err_prog_name;
+ }
+ prog_name = argv[0];
+
+ /* Process arguments */
+ fi...
2016 Jan 19
6
FWD: [patch] scp + UTF-8
...;
off_t transferred;
double elapsed;
@@ -125,8 +127,10 @@ refresh_progress_meter(void)
off_t bytes_left;
int cur_speed;
int hours, minutes, seconds;
- int i, len;
- int file_len;
+ int width, size, buf_width, buf_size;
+ int i;
+ int file_width;
+ wchar_t wc;
transferred = *counter - (cur_pos ? cur_pos : start_pos);
cur_pos = *counter;
@@ -157,16 +161,33 @@ refresh_progress_meter(void)
/* filename */
buf[0] = '\0';
- file_len = win_size - 35;
- if (file_len > 0) {
- len = snprintf(buf, file_len + 1, "\r%s", file);
- if (len < 0)
- len = 0;
- if (len...
2013 Aug 01
5
[Bug 2137] New: progress meter shows wrong speed during resume
https://bugzilla.mindrot.org/show_bug.cgi?id=2137
Bug ID: 2137
Summary: progress meter shows wrong speed during resume
Product: Portable OpenSSH
Version: -current
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P5
Component: sftp
Assignee: unassigned-bugs at
2009 Oct 25
0
alternate output for progressmeter
...? ? ? ? ? setscreensize();
+ ? ? ? ? ? ? ? signal(SIGWINCH, sig_winch);
+ ? ? ? }
? ? ? ?if (can_output())
? ? ? ? ? ? ? ?refresh_progress_meter();
? ? ? ?signal(SIGALRM, update_progress_meter);
- ? ? ? signal(SIGWINCH, sig_winch);
? ? ? ?alarm(UPDATE_INTERVAL);
?}
@@ -278,7 +289,8 @@
? ? ? ?if (cur_pos != end_pos)
? ? ? ? ? ? ? ?refresh_progress_meter();
- ? ? ? atomicio(vwrite, STDOUT_FILENO, "\n", 1);
+ ? ? ? if (progresstype==0)
+ ? ? ? ? ? ? ? atomicio(vwrite, STDOUT_FILENO, "\n", 1);
?}
?/*ARGSUSED*/
2011 Mar 23
0
[PATCH] Btrfs: cleanup some BUG_ON()
...urn -ENOMEM;
+ }
btrfs_assert_tree_locked(parent);
parent_level = btrfs_header_level(parent);
@@ -6899,7 +6904,11 @@ static noinline int get_new_locations(st
}
path = btrfs_alloc_path();
- BUG_ON(!path);
+ if (!path) {
+ if (exts != *extents)
+ kfree(exts);
+ return -ENOMEM;
+ }
cur_pos = extent_key->objectid - offset;
last_byte = extent_key->objectid + extent_key->offset;
@@ -7423,7 +7432,8 @@ static noinline int replace_extents_in_l
int ret;
new_extent = kmalloc(sizeof(*new_extent), GFP_NOFS);
- BUG_ON(!new_extent);
+ if (!new_extent)
+ return -ENOMEM;
ref...
2015 Aug 26
2
Proposal: arbitrary relocations in constant global initializers
On Wed, Aug 26, 2015 at 11:49:46AM -0400, Rafael EspĂndola wrote:
> This is pr10368.
>
> Do we really need to support hard coded relocation numbers? Looks like
> the examples above have a representation as constant expressions:
>
> (sub (add (ptrtoint @foo) 0xeafffffe) cur_pos)
>
> no?
I'm not sure if this would be sufficient. The R_ARM_JUMP24 relocation
on ARM has specific semantics to implement ARM/Thumb interworking; see
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044e/IHI0044E_aaelf.pdf
Note that R_ARM_CALL has the same operation but different se...