search for: buf2

Displaying 20 results from an estimated 112 matches for "buf2".

Did you mean: buf
2005 Jun 27
5
adding a new log-format escape
...I test it. Note that I've applied the md5 patch beforehand. diff -Naur rsync-2.6.5-md5/log.c rsync-2.6.5/log.c --- rsync-2.6.5-md5/log.c 2005-06-26 22:34:17.000000000 -0600 +++ rsync-2.6.5/log.c 2005-06-26 22:38:57.000000000 -0600 @@ -371,7 +371,7 @@ char buf[MAXPATHLEN+1024], buf2[MAXPATHLEN], fmt[32]; char *p, *s, *n; size_t len, total; - int64 b; + int64 b, j; *fmt = '%'; @@ -483,6 +483,13 @@ snprintf(buf2, sizeof buf2, fmt, (double)b); n = buf2; break; +...
2015 Sep 21
5
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
...=10000)), collapse="") writeLines(dcf, "test.dcf") nchar(read.dcf("test.dcf")) # aa # [1,] 8186 The culprit being line 53 in src/main/dcf.c where the author of the Rconn_getline2() function only copies 'nbuf' chars from 'buf' to 'buf2' when in fact 'nbuf + 1' chars have been stored in 'buf' so far. Quickest fix: Index: src/main/dcf.c =================================================================== --- src/main/dcf.c (revision 69404) +++ src/main/dcf.c (working copy) @@ -50,7 +50,7 @@ if(nbuf+2 >= b...
2008 May 29
0
Again, teach me speex AEC please!
...!= TYPE_DECODE) { return; } speex_bits_destroy(&pCodec->bits); speex_decoder_destroy(pCodec->pSt); free(pCodec); } /** * Encode a byte array. */ JNIEXPORT jint JNICALL Java_com_peterhi_Speex_encode(JNIEnv* env, jclass c, jint p, jbyteArray buf1, jbyteArray buf2) { jbyte* bytes1 = (*env)->GetByteArrayElements(env, buf1, JNI_FALSE); jbyte* bytes2 = (*env)->GetByteArrayElements(env, buf2, JNI_FALSE); int len1 = (*env)->GetArrayLength(env, buf1); int len2 = (*env)->GetArrayLength(env, buf2); jint ret = 0; Codec* pCodec =...
2004 Aug 05
1
LocalForward and RemoteForward bind patch
...L ? NULL : xstrdup(listen_host); fwd->port = port; fwd->host = xstrdup(host); fwd->host_port = host_port; @@ -281,11 +283,12 @@ char *line, const char *filename, int linenum, int *activep) { - char buf[256], *s, **charptr, *endofnumber, *keyword, *arg; + char buf[256], buf2[256], *s, **charptr, *endofnumber, *keyword, *arg; int opcode, *intptr, value; size_t len; u_short fwd_port, fwd_host_port; char sfwd_host_port[6]; + char sfwd_port[6]; /* Strip trailing whitespace */ for(len = strlen(line) - 1; len > 0; len--) { @@ -645,13 +648,32 @@ case oLoc...
2015 Sep 21
0
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
...at in R 3.2.2 on OSX or 3.2.2 patched on Windows: > nchar(read.dcf("test.dcf")) aa [1,] 10000 Duncan Murdoch > The culprit being line 53 in src/main/dcf.c where the author of the > Rconn_getline2() function only copies 'nbuf' chars from 'buf' to 'buf2' > when in fact 'nbuf + 1' chars have been stored in 'buf' so far. > > Quickest fix: > > Index: src/main/dcf.c > =================================================================== > --- src/main/dcf.c (revision 69404) > +++ src/main/dcf.c (working copy...
2012 Jun 12
5
[PATCH 0/5] Assorted patches to add virtio-scsi support.
These assorted patches end up with adding virtio-scsi support to libguestfs. It passes libguestfs-test-tool, but I haven't yet tried to run the full set of tests. In theory > 26 devices can be added, but it's likely that certain parts of the daemon will break if you actually try this. This of course needs to be fixed. Thanks Paolo Bonzini for invaluable help. Rich.
2020 Aug 14
6
Intel AMX programming model discussion.
...ond, short row, short col) { 52 __tile a = {row, col}; 53 __tile b = {row, col}; 54 __tile c = {row, col}; 55 56 if(cond) { 57 __tile_loadd(&a, buf, STRIDE); 58 __tile_loadd(&b, buf, STRIDE); 59 __tile_loadd(&c, buf, STRIDE); 60 } else { 61 __tile_loadd(&a, buf2, STRIDE); 62 __tile_loadd(&b, buf2, STRIDE); 63 __tile_loadd(&c, buf2, STRIDE); 64 } 65 __tile_dpbsud(&c, a, b); 66 __tile_stored(buf, STRIDE, c); 67 } 5. LLVM IR The LLVM intrinsics IR take the row and column information as the input parameter, so that compiler can...
2012 Jun 12
9
[PATCH v2 0/9]
More comprehensive support for virtio-scsi. Passes all the tests. Rich.
2017 Aug 20
2
RFC: Resolving TBAA issues
...e many ways to prove no-alias, and TBAA is one of them. > > The reason i stare at dump files and debug info is precisely to > > separate the TBAA portion from the rest. > > Makes sense to me. However, for a translation unit like this: > > struct BUF1 { ... }; > struct BUF2 { ... }; > > int foo(int n, struct BUF1* p, struct BUF2* q) { > for (int i = 0; i < n; i++) > p->b1 += q->b2; > return 0; > } > > I think we can be sure there are no ways for the compiler to know that > these two accesses do not overlap, ex...
2000 Aug 30
0
/etc/nologin.allow
...err); fclose(f); +#ifdef NOLOGINALLOW + if (nologin_allow(pw->pw_name) != 1) +#endif /* NOLOGINALLOW */ exit(254); } } @@ -1858,4 +1861,29 @@ server_loop2(); if (xauthfile) xauthfile_cleanup_proc(NULL); +} + +int +nologin_allow(char *username) +{ + char buf[256], buf2[256]; + FILE *f = NULL; + + /* Appending an "\n" to the username since that's what it'll read like + * in the file. + */ + strcpy(buf2, username); + strcat(buf2, "\n"); + + f = fopen("/etc/nologin.allow", "r"); + if (f) { + while (fgets(b...
1998 Apr 22
0
Patch for print_svid.c
...t; struct printer *next; } printer_t; static printer_t *printers = NULL; @@ -49,27 +49,42 @@ { FILE *fp; - if ((fp = popen("/usr/bin/lpstat -v", "r")) != NULL) { + if ((fp = popen("/usr/bin/lpstat -p -D", "r")) != NULL) { char buf[BUFSIZ]; + char buf2[BUFSIZ]; while (fgets(buf, sizeof (buf), fp) != NULL) { printer_t *ptmp; - char *name, *tmp; + char *name, *comment, *tmp; - /* eat "system/device for " */ - if (((tmp = strchr(buf, ' ')) == NULL) || - ((tmp = strchr(++tmp, ' ')) == NULL)) - con...
2015 Sep 21
2
segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
Here's an update: I checked the ChangeLog for R, and it seems like readDCF was changed in 3.0.2. I went on a whim and copied src/main/dcf.c from R 2.15.3 over to 3.2.2, and R compiled fine and install.packages now work for me. This is probably not ideal, but it at least makes R usable on AIX for me. Would definitely like to help figure out what's wrong with the new dcf.c on AIX.
2017 Aug 20
2
RFC: Resolving TBAA issues
On Sun, Aug 20, 2017 at 2:47 AM, Ivan A. Kosarev via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hello Daniel, > > >>>> the type of (*x) is not compatible with the type of (*b) or, > >>>> recursively, type of b->i. Similarly, the type of (*b) is > >>>> not compatible with (*x) or, recursively, x->i. > >> ... >
2006 Dec 21
3
log file with unexpected output on deleted files (bug?)
Hi there, I am using rsync to synchronize two folders. I have configured the log-format to my personal needs like this: --log-format="%f %t %o %l %P" I am also using the --delete flag to log deleted files as well. I have upgraded my rsync version to 2.6.9 when I figured out that starting with version 2.6.4 the log format had been enhanced to also include the "del."
2020 Aug 14
3
Intel AMX programming model discussion.
...ond, short row, short col) { 52 __tile a = {row, col}; 53 __tile b = {row, col}; 54 __tile c = {row, col}; 55 56 if(cond) { 57 __tile_loadd(&a, buf, STRIDE); 58 __tile_loadd(&b, buf, STRIDE); 59 __tile_loadd(&c, buf, STRIDE); 60 } else { 61 __tile_loadd(&a, buf2, STRIDE); 62 __tile_loadd(&b, buf2, STRIDE); 63 __tile_loadd(&c, buf2, STRIDE); 64 } 65 __tile_dpbsud(&c, a, b); 66 __tile_stored(buf, STRIDE, c); 67 } 5. LLVM IR The LLVM intrinsics IR take the row and column information as the input parameter, so that compiler can...
2007 Oct 04
0
Prototyping the Dir class
...uf.length, buf) == 0 raise ArgumentError, get_last_error else # MSDN says the drive letter could be dropped, # and that GetFullPathName should be called just in case. current = buf.unpack("Z*")[0] buf2 = 0.chr * MAX_PATH if GetFullPathName(current, buf2.length, buf2, 0) == 0 raise ArgumentError, get_last_error end current = buf2.unpack("Z*")[0] end unless SetCurrentDirectory(dir)...
2004 Aug 06
0
and and in stats.log
...%lu hours, %lu minutes", days, hours, remains); ! else if (hours > 0) ! snprintf(buf, BUFSIZE, "%lu hours, %lu minutes", hours, remains); else { snprintf(buf, BUFSIZE, "%lu minutes", remains); return buf; } - if (remains > 0) - { - snprintf(buf2, BUFSIZE, " and %lu minutes", remains); - strncat(buf, buf2, BUFSIZE - strlen(buf2)); - } - return buf; } --- 475,489 ---- remains = remains % 60; if (days > 0) ! snprintf(buf, BUFSIZE, "%lu days, %lu hours and %lu minutes", days, hours, remains); ! el...
2004 Aug 06
0
and and in stats.log
...%lu hours, %lu minutes", days, hours, remains); ! else if (hours > 0) ! snprintf(buf, BUFSIZE, "%lu hours, %lu minutes", hours, remains); else { snprintf(buf, BUFSIZE, "%lu minutes", remains); return buf; } - if (remains > 0) - { - snprintf(buf2, BUFSIZE, " and %lu minutes", remains); - strncat(buf, buf2, BUFSIZE - strlen(buf2)); - } - return buf; } --- 475,489 ---- remains = remains % 60; if (days > 0) ! snprintf(buf, BUFSIZE, "%lu days, %lu hours and %lu minutes", days, hours, remains); ! el...
2019 May 28
0
[PATCH] api: Add a special type for the flags argument.
...811f233 100644 --- a/python/t/410-pwrite.py +++ b/python/t/410-pwrite.py @@ -33,7 +33,7 @@ h = nbd.NBD () h.connect_command (["nbdkit", "-s", "--exit-with-parent", "-v", "file", datafile]) h.pwrite (buf1, 0, nbd.CMD_FLAG_FUA) -buf2 = h.pread (512, 0, 0) +buf2 = h.pread (512, 0) assert buf1 == buf2 diff --git a/python/t/460-block-status.py b/python/t/460-block-status.py index f511091..eeaa7b2 100644 --- a/python/t/460-block-status.py +++ b/python/t/460-block-status.py @@ -34,14 +34,14 @@ def f (data, metacontext, offset,...
2019 Aug 10
0
[PATCH libnbd 1/5] python: Change aio_buffer into nbd.Buffer class.
...uot;--exit-with-parent", "-v", "file", datafile]) -buf1 = nbd.aio_buffer_from_bytearray (buf) +buf1 = nbd.Buffer.from_bytearray (buf) cookie = h.aio_pwrite (buf1, 0, nbd.CMD_FLAG_FUA) while not (h.aio_command_completed (cookie)): h.poll (-1) -buf2 = nbd.aio_buffer (512) +buf2 = nbd.Buffer (512) cookie = h.aio_pread (buf2, 0) while not (h.aio_command_completed (cookie)): h.poll (-1) -assert buf == nbd.aio_buffer_to_bytearray (buf2) +assert buf == buf2.to_bytearray () with open (datafile, "rb") as f: content = f.read...