search for: file_len

Displaying 16 results from an estimated 16 matches for "file_len".

2011 Mar 29
0
[PATCH] Implementation for sl_initramfs_add_file() in lua.c32
...int sl_initramfs_load_archive(lua static int sl_initramfs_add_file(lua_State * L) { struct initramfs *initramfs = luaL_checkudata(L, 1, SYSLINUX_FILE); - /* FIXME: This code is doing nothing */ - //const char *filename = luaL_checkstring(L, 2); - void *file_data = NULL; - size_t file_len = 0; - - return initramfs_add_file(initramfs, file_data, file_len, file_len, "/testfile1", 0, 0755); + struct syslinux_file *file = luaL_checkudata(L, 2, SYSLINUX_FILE); + const char *dst_filename = luaL_checkstring(L, 3); + size_t file_len = file->size; + return initram...
2009 Oct 25
0
alternate output for progressmeter
...eporting */ + ?/* units for format_size */ ?static const char unit[] = " KMGT"; ?static int ?can_output(void) ?{ + ? ? ? if (progresstype) return 1; ? ? ? ?return (getpgrp() == tcgetpgrp(STDOUT_FILENO)); ?} @@ -158,9 +161,9 @@ ? ? ? ?/* filename */ ? ? ? ?buf[0] = '\0'; - ? ? ? file_len = win_size - 35; + ? ? ? file_len = (progresstype)?(strlen(file)+11):(win_size - 35); ? ? ? ?if (file_len > 0) { - ? ? ? ? ? ? ? len = snprintf(buf, file_len + 1, "\r%s", file); + ? ? ? ? ? ? ? len = snprintf(buf, file_len + 1, (progresstype)?"progress %s :":"\r%s",...
2007 Nov 09
1
Patch for progressmeter.c
.../* how long we have been stalled */ static int bytes_per_second; /* current speed in bytes per second */ static int win_size; /* terminal window size */ @@ -128,11 +130,16 @@ refresh_progress_meter(void) int hours, minutes, seconds; int i, len; int file_len; + off_t delta_pos; transferred = *counter - cur_pos; cur_pos = *counter; now = time(NULL); bytes_left = end_pos - cur_pos; + + delta_pos = cur_pos - last_pos; + if (delta_pos > max_delta_pos) + max_delta_pos = delta_pos;...
2016 Jan 19
6
FWD: [patch] scp + UTF-8
...f_t b void refresh_progress_meter(void) { - char buf[MAX_WINSIZE + 1]; + char buf[(MAX_WINSIZE * 4) + 1]; time_t now; 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...
2016 Nov 04
4
[PATCH 0/2] improve Lua API for files and initramfs objects
From: Paul Emmerich <p.emmerich at first-colo.net> Hi, the new API for initramfs and files in master lacked the ability to build initramfs objects from files loaded via HTTP/TFTP in Lua. The documentation indicated that it should be possible (and I believe I did that in an older version). I implemented a few new functions to handle files/initramfs objects better. Changes: * NEW:
2017 Mar 24
2
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
...dress of the Primary Volume Descriptor. | | This is the session start LBA + 16. | | 12 - 15 | file_lba | Block address of the start of the boot image file | | content. Block size is 2048. | | 16 - 19 | file_len | Number of bytes in boot image file content. | | 20 - 23 | checksum | The sum of all 32-bit words of the file content | | from byte 64 to file end. | | 24 - 63 | 0 | Reserved ---------- | ---------- | --------------...
2009 Oct 25
0
[fsc]Adding a generic path_lookup function in VFS
...t to break the other fs, I added two union structure in file structure: > struct file { > struct fs_info *fs; > union { > struct inode *inode; > struct open_file_t *open_file; > } u1; > union { > uint32_t offset; > uint32_t file_len; > } u2; > }; > the inode--offset pair is used in the generic path_lookup method, while the open_file--file_len pair is for the old method. And with the inode-offset pair, we don't need a more open_file_t structure in all fs more, and I did remove the open_file_t structure in ext2....
2008 Jun 27
1
Performance of madvise / msync
...-- src/rrd_open.c Wed Jun 25 21:43:54 2008 *************** *** 175,191 **** #endif if (rdwr & RRD_CREAT) goto out_done; - #ifdef USE_MADVISE - if (rdwr & RRD_COPY) { - /* We will read everything in a moment (copying) */ - madvise(data, rrd_file->file_len, MADV_WILLNEED | MADV_SEQUENTIAL); - } else { - /* We do not need to read anything in for the moment */ - madvise(data, rrd_file->file_len, MADV_RANDOM); - /* the stat_head will be needed soonish, so hint accordingly */ - madvise(data, sizeof(stat_head_t), MAD...
2017 Mar 23
6
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, Geert Stappers wrote: > Contact David off-list, he did unsubscribe. Can you tell when he unsubscribed (i.e. which of the messages he got as last one) ? > Martin posted elsewhere in this thread "Thomas, you found the bug" > and provided a patch. Open question is whether the fix helps with David's BIOS. The newest answer from Martin indicates that a failure to read
2023 Feb 06
20
[Bug 3534] New: probable underflow calculating display width of file name
https://bugzilla.mindrot.org/show_bug.cgi?id=3534 Bug ID: 3534 Summary: probable underflow calculating display width of file name Product: Portable OpenSSH Version: -current Hardware: amd64 OS: Linux Status: NEW Severity: normal Priority: P5 Component: scp
2017 Mar 24
0
"isolinux.bin missing or corrupt" when booting USB flash drive in old PC
Hi, correction: i wrote: > "-ls -l" and field "file_len" both say that in total 80 blocks should > be read by the MBR. This is wrong. Only four blocks are to be read by the MBR. The others are supposed to be read by isolinux.bin itself. This takes much of the suspicion away from the MBR code. Have a nice day :) Thomas
2023 Mar 19
3
[libnbd PATCH v4 0/2] lib/utils: introduce async-signal-safe execvpe()
This is version 4 of the following sub-series: [libnbd PATCH v3 09/29] lib/utils: introduce async-signal-safe execvpe() [libnbd PATCH v3 10/29] lib/utils: add unit tests for async-signal-safe execvpe() http://mid.mail-archive.com/20230215141158.2426855-10-lersek at redhat.com http://mid.mail-archive.com/20230215141158.2426855-11-lersek at redhat.com The Notes section on each patch records the
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...4KB blocks. --block-size will override this regardless of what block size is specified. The variable checksum size takes block size into account using an approximation of the formula provided by Donovan Baarda on this list (blocksum_bits includes the 32bit sum1). blocksum_bits = BIAS + 2*log2(file_len) - log2(block_len) This should result in increased efficiency as files grow, reduce the likelihood of file-redo and raise the ceiling on how large a file can be processed by rsync. The one case where efficiency could be decreased would be huge files with many tiny changes scattered throughout....
2015 Jul 23
37
[Bug 2434] New: scp can send arbitrary control characters / escape sequences to the terminal
https://bugzilla.mindrot.org/show_bug.cgi?id=2434 Bug ID: 2434 Summary: scp can send arbitrary control characters / escape sequences to the terminal Product: Portable OpenSSH Version: 6.7p1 Hardware: Other OS: Linux Status: NEW Severity: security Priority: P5
2009 Oct 29
5
[PATCH] gfxboot.c32
Ok, here is the first try to turn the gfxboot wrapper into a com32 module. I had to extend the interface to the gfxboot core a bit to get it working. So it works only with latest gfxboot from git://gitorious.org/gfxboot/gfxboot.git Steffen -------------- next part -------------- A non-text attachment was scrubbed... Name: gfxboot_c32.diff.gz Type: application/x-gzip Size: 7220 bytes Desc: URL:
2010 Jul 14
2
[PATCH] gfxboot: add include and menu include support
...spaces(char *s); char *skip_nonspaces(char *s); void chop_line(char *s); -int read_config_file(void); +int read_config_file(const char *filename); unsigned magic_ok(unsigned char *buf, unsigned *code_size); unsigned find_file(unsigned char *buf, unsigned len, unsigned *gfx_file_start, unsigned *file_len, unsigned *code_size); int gfx_init(char *file); @@ -219,7 +220,7 @@ int main(int argc, char **argv) return 0; } - if(read_config_file()) { + if(read_config_file("~")) { printf("Error reading config file\n"); if(argc > 2) show_message(argv[2]); @@ -31...