search for: elem

Displaying 20 results from an estimated 569 matches for "elem".

2013 Jan 22
5
[QEMU PATCH v5 0/3] virtio-net: fix of ctrl commands
Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout assumptions, trivial rename V5: fix
2013 Jan 22
5
[QEMU PATCH v5 0/3] virtio-net: fix of ctrl commands
Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout assumptions, trivial rename V5: fix
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
..._async_read_fn(QIOChannel *ioc, GIOCondition condition, > + gpointer data) > +{ > + struct pstore_read_arg *rarg = data; > + struct virtio_pstore_fileinfo *info = &rarg->info; > + VirtIOPstore *vps = rarg->vps; > + VirtQueueElement *elem = rarg->elem; > + struct virtio_pstore_res res; > + size_t offset = sizeof(res) + sizeof(*info); > + struct iovec *sg = elem->in_sg; > + unsigned int sg_num = elem->in_num; > + Error *err = NULL; > + ssize_t len; > + int ret; > + > +...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
..._async_read_fn(QIOChannel *ioc, GIOCondition condition, > + gpointer data) > +{ > + struct pstore_read_arg *rarg = data; > + struct virtio_pstore_fileinfo *info = &rarg->info; > + VirtIOPstore *vps = rarg->vps; > + VirtQueueElement *elem = rarg->elem; > + struct virtio_pstore_res res; > + size_t offset = sizeof(res) + sizeof(*info); > + struct iovec *sg = elem->in_sg; > + unsigned int sg_num = elem->in_num; > + Error *err = NULL; > + ssize_t len; > + int ret; > + > +...
2013 Jan 19
8
[QEMU PATCH v4 0/3] virtio-net: fix of ctrl commands
From: Amos Kong <akong at redhat.com> Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout
2013 Jan 19
8
[QEMU PATCH v4 0/3] virtio-net: fix of ctrl commands
From: Amos Kong <akong at redhat.com> Currently virtio-net code relys on the layout of descriptor, this patchset removed the assumptions and introduced a control command to set mac address. Last patch is a trivial renaming. V2: check guest's iov_len V3: fix of migration compatibility make mac field in config space read-only when new feature is acked V4: add fix of descriptor layout
2012 Mar 25
2
string substitution for argument in function
hello, I want to iterate through a list of names and use each element as an argument in a function. For instance: > a = c('one','two','three') > data= c() > for(elem in a){data=cbind(elem = 2,data)} > data elem elem elem [1,] 2 2 2 instead I want 'elem' to be substituted by the string in the list. Doing i...
2006 Mar 17
1
Autocompleter.Local problem/desparate plea for help...
...#39;','',''\n''), /* start selector */ selector: function(instance) { var ret = []; // Beginning matches var entry = instance.getToken (); var firstMatch= -1; for (var i = 0; i < instance.options.array.length; i++) { var wasMatch = false; var elem = instance.options.array[i]; var foundPos = instance.options.ignoreCase ? elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry); while (foundPos != -1) { if (foundPos == 0 && elem.length != entry.length) { wasMatch = true; if (firstMatch...
2016 Jul 19
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...n, Jul 18, 2016 at 11:03:53AM +0100, Stefan Hajnoczi wrote: > On Mon, Jul 18, 2016 at 01:37:40PM +0900, Namhyung Kim wrote: > > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > + VirtIOPstore *s = VIRTIO_PSTORE(vdev); > > + VirtQueueElement *elem; > > + struct virtio_pstore_hdr *hdr; > > + ssize_t len; > > + > > + for (;;) { > > + elem = virtqueue_pop(vq, sizeof(VirtQueueElement)); > > + if (!elem) { > > + return; > > + } > > + > >...
2016 Jul 19
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...n, Jul 18, 2016 at 11:03:53AM +0100, Stefan Hajnoczi wrote: > On Mon, Jul 18, 2016 at 01:37:40PM +0900, Namhyung Kim wrote: > > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQueue *vq) > > +{ > > + VirtIOPstore *s = VIRTIO_PSTORE(vdev); > > + VirtQueueElement *elem; > > + struct virtio_pstore_hdr *hdr; > > + ssize_t len; > > + > > + for (;;) { > > + elem = virtqueue_pop(vq, sizeof(VirtQueueElement)); > > + if (!elem) { > > + return; > > + } > > + > >...
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
..., GIOCondition condition, > > + gpointer data) > > +{ > > + struct pstore_read_arg *rarg = data; > > + struct virtio_pstore_fileinfo *info = &rarg->info; > > + VirtIOPstore *vps = rarg->vps; > > + VirtQueueElement *elem = rarg->elem; > > + struct virtio_pstore_res res; > > + size_t offset = sizeof(res) + sizeof(*info); > > + struct iovec *sg = elem->in_sg; > > + unsigned int sg_num = elem->in_num; > > + Error *err = NULL; > > + ssize_t len; &g...
2014 May 30
2
Bug in FLAC or in GCC or somewhere else?
I noticed that 32-bit flac (from git) compiled with GCC 4.8.3 or 4.9.0 calculates incorrect ReplayGain values. The most common value it produces is -55.17 dB. It is possible to avoid this bug by compiling src/share/replaygain_analysis/replaygain_analysis.c a) either without -msse2 option b) or with -O2 instead of -O3 c) another solution is to add -mfpmath=sse option along with -msse2. For GCC
2015 Mar 09
0
virtio fixes pull for 4.0?
...should get back tomorrow I hope). Thanks, Rusty. diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 882a31b..98e99b8 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -243,16 +243,21 @@ int virtio_queue_empty(VirtQueue *vq) } void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem, - unsigned int len, unsigned int idx) + unsigned int len_written, unsigned int idx) { - unsigned int offset; + unsigned int offset, tot_wlen; int i; - trace_virtqueue_fill(vq, elem, len, idx); + trace_virtqueue_fill(vq, elem, len_w...
2015 Mar 09
0
virtio fixes pull for 4.0?
...should get back tomorrow I hope). Thanks, Rusty. diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 882a31b..98e99b8 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -243,16 +243,21 @@ int virtio_queue_empty(VirtQueue *vq) } void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem, - unsigned int len, unsigned int idx) + unsigned int len_written, unsigned int idx) { - unsigned int offset; + unsigned int offset, tot_wlen; int i; - trace_virtqueue_fill(vq, elem, len, idx); + trace_virtqueue_fill(vq, elem, len_w...
2017 Mar 22
1
[PATCH v2] inspect: improve detection of Mageia install discs
...https://wiki.mageia.org/en/Product_id + * - http://wiki.mandriva.com/en/Product_id (old URL, defunct) + */ +static int +check_product_id_installer_root (guestfs_h *g, struct inspect_fs *fs, + const char *filename) +{ + CLEANUP_FREE char *line = NULL; + const char *elem; + char *saveptr; + + fs->type = OS_TYPE_LINUX; + + line = guestfs_int_first_line_of_file (g, filename); + if (line == NULL) + return -1; + + elem = strtok_r (line, ",", &saveptr); + while (elem) { + const char *equal = strchr (elem, '='); + if (equal == NULL...
2015 Jun 23
2
[PATCH] daemon: Rewrite prog_exists so it uses the actual PATH, not hard-coded list.
...ot; }; - size_t i; - char buf[1024]; - - for (i = 0; i < sizeof dirs / sizeof dirs[0]; ++i) { - snprintf (buf, sizeof buf, "%s/%s", dirs[i], prog); - if (access (buf, X_OK) == 0) + const char *pathc = getenv ("PATH"); + + if (!pathc) + return 0; + + const char *elem; + char *saveptr; + size_t len = strlen (pathc) + 1; + char path[len]; + strcpy (path, pathc); + + elem = strtok_r (path, ":", &saveptr); + while (elem) { + size_t n = strlen (elem) + strlen (prog) + 2; + char testprog[n]; + + snprintf (testprog, n, "%s/%s", e...
2014 Oct 07
0
[PATCH RFC 07/11] dataplane: allow virtio-1 devices
...irtio/virtio-blk.h" @@ -75,7 +76,7 @@ static void complete_request_vring(VirtIOBlockReq *req, unsigned char status) VirtIOBlockDataPlane *s = req->dev->dataplane; stb_p(&req->in->status, status); - vring_push(&req->dev->dataplane->vring, &req->elem, + vring_push(s->vdev, &req->dev->dataplane->vring, &req->elem, req->qiov.size + sizeof(*req->in)); /* Suppress notification to guest by BH and its scheduled diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c index b...
2014 Oct 07
0
[PATCH RFC 07/11] dataplane: allow virtio-1 devices
...irtio/virtio-blk.h" @@ -75,7 +76,7 @@ static void complete_request_vring(VirtIOBlockReq *req, unsigned char status) VirtIOBlockDataPlane *s = req->dev->dataplane; stb_p(&req->in->status, status); - vring_push(&req->dev->dataplane->vring, &req->elem, + vring_push(s->vdev, &req->dev->dataplane->vring, &req->elem, req->qiov.size + sizeof(*req->in)); /* Suppress notification to guest by BH and its scheduled diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c index b...
2016 Mar 03
0
[RFC qemu 2/4] virtio-balloon: Add a new feature to balloon device
...nst VirtIOBalloon *s) > { > return s->stats_poll_interval > 0; > @@ -293,6 +299,37 @@ out: > } > } > > +static void virtio_balloon_get_free_pages(VirtIODevice *vdev, VirtQueue *vq) > +{ > + VirtIOBalloon *s = VIRTIO_BALLOON(vdev); > + VirtQueueElement *elem; > + size_t offset = 0; > + uint64_t bitmap_bytes = 0, free_pages_count = 0; > + > + elem = virtqueue_pop(vq, sizeof(VirtQueueElement)); > + if (!elem) { > + return; > + } > + s->free_pages_vq_elem = elem; > + > + if (!elem->o...
2014 Nov 25
0
[PATCH RFC v2 07/12] dataplane: allow virtio-1 devices
...> @@ -75,7 +76,7 @@ static void complete_request_vring(VirtIOBlockReq *req, unsigned char status) > VirtIOBlockDataPlane *s = req->dev->dataplane; > stb_p(&req->in->status, status); > > - vring_push(&req->dev->dataplane->vring, &req->elem, > + vring_push(s->vdev, &req->dev->dataplane->vring, &req->elem, > req->qiov.size + sizeof(*req->in)); > > /* Suppress notification to guest by BH and its scheduled > diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-...