search for: totalbyt

Displaying 15 results from an estimated 15 matches for "totalbyt".

Did you mean: totalbytes
2002 Feb 06
2
SFTP Status Bar..
...amp;ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +int +getttywidth(void) +{ + struct winsize winsize; + + if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1) + return (winsize.ws_col ? winsize.ws_col : 80); + else + return (80); +} + +void +progressmeter(off_t statbytes, off_t totalbytes, char *filename) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static char *progressbar = NULL; + static struct timeval *start = NULL, lastupdate; + static off_t lastsize; + static size_t progre...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...src/usr.bin/ftp/util.c) */ +static int +foregroundproc(void) +{ + static pid_t pgrp = -1; + int ctty_pgrp; + + if (pgrp == -1) + pgrp = getpgrp(); + + return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +void +progressmeter(off_t statbytes, off_t totalbytes, char *filename) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static char *progressbar = NULL, file = NULL; + static struct timeval *start = NULL, lastupdate; + static off_t lastsize; + static...
2002 Jan 30
1
Quick sftp status indicator.
...n/ftp/util.c) */ +static int +foregroundproc(void) +{ + static pid_t pgrp = -1; + int ctty_pgrp; + + if (pgrp == -1) + pgrp = getpgrp(); + + return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 && + ctty_pgrp == pgrp)); +} + +void +progressmeter(int flag, off_t statbytes, off_t totalbytes, char *curfile) +{ +#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */ + static const char prefixes[] = " KMGTP"; + static struct timeval lastupdate; + static off_t lastsize; + static u_char *progressbar = NULL; + static size_t progressbar_size = 0...
2012 Aug 02
0
[PATCH 1/3] ALPHA: make sector size dynamic in extlinux
...vfd, BLKSSZGET, &size)) + return size; + return SECTOR_SIZE; +} + +/* * Get device geometry and partition offset */ struct geometry_table { @@ -145,7 +157,7 @@ static const struct geometry_table standard_geometries[] = { {0, {0, 0, 0, 0}} }; -int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo) +static int get_geometry(int devfd, uint64_t totalbytes, unsigned sector_size, struct hd_geometry *geo) { struct floppy_struct fd_str; struct loop_info li; @@ -179,7 +191,7 @@ int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo) geo...
2002 Jul 13
0
[PATCH]: scp program improved
.../* Get the file size if resume mode used */ + (void) atomicio(read, remin, buf, 20); + buf[20] = '\0'; + statbytes = i = atoll(buf); + lseek(fd, i, SEEK_SET); + if (verbose_mode) + printf("Continuing at: %llu\n", i); + } + if (showprogress) { totalbytes = stb.st_size; progressmeter(-1); } + /* Keep writing after an error so that we stay sync'd up. */ - for (haderr = i = 0; i < stb.st_size; i += bp->cnt) { + for (haderr = bcounter = 0; i < stb.st_size; i += bp->cnt) { amt = bp->cnt; if (i + amt > stb.st_s...
2012 Sep 10
19
Initial support for sector size >512
This set of patches add some support for sector size >512. Currently it fixes extlinux, MBR for GPT and ext partitions. Other code is unaffected. This set of patches has been tested on a read Dell machine running a beta firmware.
2015 Jan 02
13
[PATCH 0/9] linux/syslinux: support ext2/3/4 device
Hello, Happy New Year! These patches make syslinux/linux support ext2/3/4, and it doesn't require the root privilege, I'd like to add a separate e2fs/syslinux, if that is more appropriate, it should be easy to do that. I put these patches on github so that you can easily get them in case you'd like to test them. (The repo's name is sys_tmp, which avoids confusing others, I will
2011 Jul 16
1
crash in extlinux/main
...ted via /dev/mapper in Lunix it crashed on me with a segment fault. The bug is here: if (!ioctl(devfd, HDIO_GETGEO, &geo)) { Since we are already called with geo as a pointer the & is wrong as the pointer itself will be overwritten. This works: int get_geometry(int devfd, uint64_t totalbytes, struct hd_geometry *geo) { struct floppy_struct fd_str; struct loop_info li; struct loop_info64 li64; const struct geometry_table *gp; int rv = 0; memset(geo, 0, sizeof *geo); if (!ioctl(devfd, HDIO_GETGEO, geo)) { goto ok; If someone can incorporate this...
2012 Aug 02
0
[PATCH 2/3] ALPHA: first try to fix adv problem
...sertions(+), 5 deletions(-) diff --git a/extlinux/main.c b/extlinux/main.c index e40b4d7..61eaad1 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -275,7 +275,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) dprintf("subpath = %s\n", subpath); totalbytes = get_size(devfd); - sector_size = get_sector_size(devfd); + /* FIXME support greater sector sizes for BTRFS */ + sector_size = fs_type == BTRFS ? SECTOR_SIZE : get_sector_size(devfd); get_geometry(devfd, totalbytes, sector_size, &geo); if (opt.heads) @@ -318,6 +319,7 @@...
2014 Dec 24
14
[PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem
Hello syslinux, Merry Christmas! These patches will make extlinux work with umounted ext2/3/4 filesystem, for example: $ extlinux -i /dev/sdXN or $ extlinux -i file_block Also it can work with something like: $ extlinux /dev/sdXN --reset-adv or $ extlinux file_block --reset-adv We don't use a new option (I planed to use "-d" but it is already in use), it will check whether the
2001 Apr 13
0
LFS changes...
...es.h" RCSID("$OpenBSD: scp.c,v 1.61 2001/03/15 15:05:59 markus Exp $"); @@ -114,7 +115,7 @@ static struct timeval start; /* Number of bytes of current file transferred so far. */ -volatile u_long statbytes; +volatile off_t statbytes; /* Total size of current file. */ off_t totalbytes = 0; @@ -501,8 +502,8 @@ struct stat stb; static BUF buffer; BUF *bp; - off_t i; - int amt, fd, haderr, indx, result; + off_t i, amt, result; + int fd, haderr, indx; char *last, *name, buf[2048]; for (indx = 0; indx < argc; ++indx) {
2000 Aug 24
0
patch for a few things
...lt;= MAX_BARLENGTH)?barlength:MAX_BARLENGTH; if (barlength > 0) { i = barlength * ratio / 100; *************** *** 1181,1192 **** timersub(&now, &start, &td); elapsed = td.tv_sec + (td.tv_usec / 1000000.0); if (statbytes <= 0 || elapsed <= 0.0 || cursize > totalbytes) { snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ! " --:-- ETA"); } else if (wait.tv_sec >= STALLTIME) { snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ! " - stalled -"); } else { if (flag != 1) remaining = --- 1208,1249 ---...
2011 Jan 26
8
[PATCH 1/8] staging: hv: Convert camel cased variables in connection.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/channel.c | 48 ++++++------ drivers/staging/hv/channel_mgmt.c | 48 ++++++------ drivers/staging/hv/connection.c | 154 ++++++++++++++++++------------------ drivers/staging/hv/vmbus_drv.c | 2 +-
2011 Jan 26
8
[PATCH 1/8] staging: hv: Convert camel cased variables in connection.c to lower cases
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com> Signed-off-by: Hank Janssen <hjanssen at microsoft.com> --- drivers/staging/hv/channel.c | 48 ++++++------ drivers/staging/hv/channel_mgmt.c | 48 ++++++------ drivers/staging/hv/connection.c | 154 ++++++++++++++++++------------------ drivers/staging/hv/vmbus_drv.c | 2 +-
2016 May 03
9
[Bug 95251] New: vdpau decoder capabilities: not supported
https://bugs.freedesktop.org/show_bug.cgi?id=95251 Bug ID: 95251 Summary: vdpau decoder capabilities: not supported Product: Mesa Version: 11.2 Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau Assignee: nouveau at