search for: obuf

Displaying 20 results from an estimated 141 matches for "obuf".

Did you mean: buf
2020 Mar 19
0
[nbdkit PATCH 1/2] sh, eval: Cache .can_zero and .can_flush
...EE char *s = NULL; size_t slen; int64_t r; @@ -307,9 +323,9 @@ sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset, { const char *method = "pread"; const char *script = get_script (method); - char *h = handle; + struct sh_handle *h = handle; char cbuf[32], obuf[32]; - const char *args[] = { script, method, h, cbuf, obuf, NULL }; + const char *args[] = { script, method, h->h, cbuf, obuf, NULL }; CLEANUP_FREE char *data = NULL; size_t len; @@ -395,9 +411,9 @@ sh_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, { const...
2018 Dec 15
0
[PATCH nbdkit v2 3/4] sh: Switch nbdkit-sh-plugin to use API version 2.
...#include "call.h" @@ -360,7 +363,8 @@ sh_get_size (void *handle) } static int -sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset) +sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset, + uint32_t flags) { char *h = handle; char cbuf[32], obuf[32]; @@ -403,16 +407,53 @@ sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset) } } +/* Convert NBDKIT_FLAG_* to flags string. */ +static void flag_append (const char *str, bool *comma, char **buf, size_t *len); + +static void +flags_string (uint32_t flags, char *buf, size_t le...
2018 Dec 14
0
[PATCH nbdkit 2/3] sh: Switch nbdkit-sh-plugin to use API version 2.
...#include "call.h" @@ -360,7 +362,8 @@ sh_get_size (void *handle) } static int -sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset) +sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset, + uint32_t flags) { char *h = handle; char cbuf[32], obuf[32]; @@ -404,12 +407,14 @@ sh_pread (void *handle, void *buf, uint32_t count, uint64_t offset) } static int -sh_pwrite (void *handle, const void *buf, - uint32_t count, uint64_t offset) +sh_pwrite (void *handle, const void *buf, uint32_t count, uint64_t offset, + uin...
2020 Mar 19
5
[nbdkit PATCH 0/2] More caching of initial setup
When I added .can_FOO caching in 1.16, I missed the case that the sh plugin itself was calling .can_flush twice in some situations (in order to default .can_fua). Then right after, I regressed it to call .can_zero twice (in order to default .can_fast_zero). I also missed that .thread_model could use better caching, because at the time, I did not add testsuite coverage. Fix that now. Eric Blake
2018 Dec 15
5
[PATCH nbdkit v2 0/4] tests: Test export flags (eflags).
v1 was here: https://www.redhat.com/archives/libguestfs/2018-December/thread.html#00123 v2: - Document "-" instead of "script=-" and use it in the test; and verify this also works on FreeBSD; and verify that it doesn't depend on the particular behaviour of our wrapper script and should work with installed nbdkit too. - Fix handling of zero flags parameter. -
2001 May 04
19
SSH connection hanging on logout
I am running OpenSSH 2.9p1 on SunOS 5.7 w/4-24-2001 patch cluster. Like many other users I am seeing the hanging session on logout with background processes. This is a huge problem for me as I centrally manage 50+ machines with rdist across ssh. Instead of just complaining about the problem I thought I would put my CS degree to use and try to track down the problem myself. For starters,
2018 Dec 14
6
[PATCH nbdkit 0/3] tests: Test export flags (eflags).
Some feature additions to the shell script plugin allow us to test the export flags field reasonably easily. Rich.
2019 May 10
0
[nbdkit PATCH 6/9] sh: Implement .cache script callback
...ot;); +} + static int sh_flush (void *handle, uint32_t flags) { @@ -782,6 +788,38 @@ sh_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, } } +static int +sh_cache (void *handle, uint32_t count, uint64_t offset, uint32_t flags) +{ + char *h = handle; + char cbuf[32], obuf[32]; + const char *args[] = { script, "cache", h, cbuf, obuf, NULL }; + + snprintf (cbuf, sizeof cbuf, "%" PRIu32, count); + snprintf (obuf, sizeof obuf, "%" PRIu64, offset); + assert (!flags); + + switch (call (args)) { + case OK: + return 0; + + case MISSIN...
2004 Aug 06
1
ices and VBR mp3s?
...@@ -261,8 +259,8 @@ #ifdef HAVE_LIBLAME for (stream = ices_config.streams; stream; stream = stream->next) - if (stream->reencode && (!source->read || - (source->bitrate != stream->bitrate))) { + if (stream->reencode) +{ len = ices_reencode_flush (stream, obuf, sizeof (obuf)); if (len > 0) rc = shout_send_data (&stream->conn, obuf, len); --- CUT HERE --- --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-req...
2003 Jun 27
1
bug? -z option and large compressed data
...CD-ROM image of "Turbo Linux Installer" and this CD-ROM includes many gzip/bzip2 compressed datas(RPMs). Let's looked at token.c. 280 tx_strm.next_in = (Bytef *) map_ptr(buf, offset, toklen); 281 tx_strm.avail_in = toklen; 282 tx_strm.next_out = (Bytef *) obuf; 283 tx_strm.avail_out = MAX_DATA_COUNT; 284 r = deflate(&tx_strm, Z_INSERT_ONLY); 285 if (r != Z_OK || tx_strm.avail_in != 0) { 286 rprintf(FERROR, "deflate on token returned %d (%d bytes left)\n", 287 r, tx_strm.av...
2019 May 16
0
[nbdkit PATCH v2 07/24] sh: Implement .cache script callback
...+ } +} + static int sh_flush (void *handle, uint32_t flags) { @@ -782,6 +829,38 @@ sh_extents (void *handle, uint32_t count, uint64_t offset, uint32_t flags, } } +static int +sh_cache (void *handle, uint32_t count, uint64_t offset, uint32_t flags) +{ + char *h = handle; + char cbuf[32], obuf[32]; + const char *args[] = { script, "cache", h, cbuf, obuf, NULL }; + + snprintf (cbuf, sizeof cbuf, "%" PRIu32, count); + snprintf (obuf, sizeof obuf, "%" PRIu64, offset); + assert (!flags); + + switch (call (args)) { + case OK: + return 0; + + case MISSIN...
2020 Feb 06
0
[PATCH] Add support for zstd compression
...comp_init_done, flush_pending; + ZSTD_EndDirective flush = ZSTD_e_continue; + int32 n, r; + + /* initialization */ + if (!comp_init_done) { + + zstd_cctx = ZSTD_createCCtx(); + if (!zstd_cctx) { + rprintf(FERROR, "compression init failed\n"); + exit_cleanup(RERR_PROTOCOL); + } + + obuf = new_array(char, MAX_DATA_COUNT + 2); + if (!obuf) + out_of_memory("send_deflated_token"); + + ZSTD_CCtx_setParameter(zstd_cctx, ZSTD_c_compressionLevel, + def_compress_level); + zstd_out_buff.dst = obuf + 2; + + comp_init_done = 1; + } + + if (last_token == -1) { + last...
2010 Sep 10
0
Virtualization Digest, Vol 60, Issue 17
...G_EVB_VSIS, get_arg_vsis, set_arg_vsis }, + { ARG_EVB_RTE, get_arg_rte, set_arg_rte }, + { ARG_TLVTXENABLE, get_arg_tlvtxenable, set_arg_tlvtxenable }, + { NULL } +}; + +static int get_arg_tlvtxenable(struct cmd *cmd, char *arg, char *argvalue, + char *obuf) +{ + int value; + char *s; + char arg_path[EVB_BUF_SIZE]; + + if (cmd->cmd != cmd_gettlv) + return cmd_invalid; + + switch (cmd->tlvid) { + case (LLDP_MOD_EVB << 8) | LLDP_EVB_SUBTYPE: + snprintf(arg_path, sizeof(arg_path)...
2010 Sep 10
0
Virtualization Digest, Vol 60, Issue 17
...G_EVB_VSIS, get_arg_vsis, set_arg_vsis }, + { ARG_EVB_RTE, get_arg_rte, set_arg_rte }, + { ARG_TLVTXENABLE, get_arg_tlvtxenable, set_arg_tlvtxenable }, + { NULL } +}; + +static int get_arg_tlvtxenable(struct cmd *cmd, char *arg, char *argvalue, + char *obuf) +{ + int value; + char *s; + char arg_path[EVB_BUF_SIZE]; + + if (cmd->cmd != cmd_gettlv) + return cmd_invalid; + + switch (cmd->tlvid) { + case (LLDP_MOD_EVB << 8) | LLDP_EVB_SUBTYPE: + snprintf(arg_path, sizeof(arg_path)...
2001 Dec 17
0
SSH hanging
...sed debug1: channel 0: send eof debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: channel 0: rcvd eof debug1: channel 0: output open -> drain debug1: channel 0: rcvd close debug2: channel 0: no data after CLOSE debug2: channel 0: no data after CLOSE debug1: channel 0: obuf empty debug1: channel 0: output drain -> closed debug1: channel 0: close_write debug1: channel 0: send close debug1: channel 0: is dead debug1: channel_free: channel 0: status: The following connections are open: #0 client-session (t4 r0 i8/0 o128/0 fd -1/-1) debug2: !channel_still_open. debug...
2009 Jun 23
4
virtio-serial: A guest <-> host interface for simple communication
Hello, Here are two patches. One implements a virtio-serial device in qemu and the other is the driver for a guest kernel. While working on a vmchannel interface that is needed for communication between guest userspace and host userspace, I saw that most of the interface can be abstracted out as a "serial" device with "ports". Some requirements for a vmchannel are listed at
2009 Jun 23
4
virtio-serial: A guest <-> host interface for simple communication
Hello, Here are two patches. One implements a virtio-serial device in qemu and the other is the driver for a guest kernel. While working on a vmchannel interface that is needed for communication between guest userspace and host userspace, I saw that most of the interface can be abstracted out as a "serial" device with "ports". Some requirements for a vmchannel are listed at
2009 Jul 03
1
[RFC PATCH v3] virito-serial: A guest <-> host interface
Hello, This is a new iteration of the patches that implement virtio-serial. Changes include: * Adding support for port hot-add * Creating ports at specific ids that can be bound to specific apps / usage * Cleanups This code still doesn't get rid of the support for assigning names to ports but it just has to be ripped out. Comments welcome. Thanks, Amit.
2009 Jul 03
1
[RFC PATCH v3] virito-serial: A guest <-> host interface
Hello, This is a new iteration of the patches that implement virtio-serial. Changes include: * Adding support for port hot-add * Creating ports at specific ids that can be bound to specific apps / usage * Cleanups This code still doesn't get rid of the support for assigning names to ports but it just has to be ripped out. Comments welcome. Thanks, Amit.
2001 Jun 13
1
2.9p1 SCO OS 5.0.5 server and Linux client hang on exit when using X11 forwarding and protocol 2
...Entering interactive session. debug1: Sending eof. debug1: Received X11 open request. debug1: fd 4 setting O_NONBLOCK debug1: fd 4 IS O_NONBLOCK debug1: channel 0: new [X11 connection from X.X.X.X port 1482] debug1: channel 0: rcvd ieof debug1: channel 0: output open -> drain debug1: channel 0: obuf empty debug1: channel 0: output drain -> closed debug1: channel 0: send oclose debug1: channel 0: close_write debug1: channel 0: read<=0 rfd 4 len 0 debug1: channel 0: read failed debug1: channel 0: input open -> drain debug1: channel 0: close_read debug1: channel 0: input: no drain shortc...