Displaying 20 results from an estimated 719 matches for "bitmask".
2017 Feb 15
1
[PATCH v2] copy-out: new optional arguments
...+ const struct guestfs_copy_out_opts_argv *optargs)
{
struct stat statbuf;
int r;
@@ -170,6 +171,7 @@ guestfs_impl_copy_out (guestfs_h *g,
struct copy_out_child_data data;
char fdbuf[64];
int fd;
+ struct guestfs_tar_out_opts_argv tar_optargs = { .bitmask = 0 };
r = guestfs_is_dir (g, remotepath);
if (r == -1)
@@ -210,7 +212,28 @@ guestfs_impl_copy_out (guestfs_h *g,
snprintf (fdbuf, sizeof fdbuf, "/dev/fd/%d", fd);
- r = guestfs_tar_out (g, remotepath, fdbuf);
+ if (optargs->bitmask & GUESTFS_COPY_OUT_OPT...
2014 Dec 10
2
[PATCH v1 0/2] Implement guestfs_add_libvirt_dom.
This is only lightly tested at the moment.
For context see:
https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40
https://bugzilla.redhat.com/show_bug.cgi?id=1075143
https://bugzilla.redhat.com/show_bug.cgi?id=1075164
Note this is not a complete fix. At least one more libguestfs patch
is required (to implement virDomainPtr in the python bindings). Plus
a virt-manager patch.
Rich.
2020 Feb 24
3
[PATCH commit] options: Compile blocksize code conditionally.
...tions/options.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/options/options.c b/options/options.c
index 63221ea..abdcbae 100644
--- a/options/options.c
+++ b/options/options.c
@@ -140,10 +140,12 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index)
ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_DISCARD_BITMASK;
ad_optargs.discard = drv->a.discard;
}
+#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK
if (drv->a.blocksize) {
ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK;
ad_optargs.blocksize = drv->a....
2014 Dec 10
3
[PATCH v2 0/3] Implement guestfs_add_libvirt_dom.
This completes the implementation on the libguestfs side, allowing
python-libvirt dom pointers to be passed to guestfs_add_libvirt_dom.
For context see:
https://bugzilla.redhat.com/show_bug.cgi?id=1138203#c40
https://bugzilla.redhat.com/show_bug.cgi?id=1075143
https://bugzilla.redhat.com/show_bug.cgi?id=1075164
Rich.
2014 Dec 11
4
[PATCH v3 0/4] Implement guestfs_add_libvirt_dom.
A hopefully cleaner implementation this time. It doesn't
require any special insights into how libvirt-python is
implemented. Instead, it requires a change to libvirt-python
to add a .c_pointer() method:
https://www.redhat.com/archives/libvir-list/2014-December/msg00615.html
Rich.
2014 Dec 11
6
[PATCH v4 0/6] Implement guestfs_add_libvirt_dom.
Since v3:
- Fix labelling over overlays (see 6/6)
- Tested it with a test program which simulates what virt-manager
will do. See the attachment here:
https://bugzilla.redhat.com/show_bug.cgi?id=1075164#c7
Rich.
2019 Apr 04
2
[RFC] Proposed update to convert two 64-bit attribute bitmasks to std::bitset
There are two 64-bit bitmasks maintained in AttributeImpl.h<https://sdocc.itg.ti.com/ui#file:review=11893/version=393846>:
- AvailableFunctionAttrs is part of the AttributeListImpl class, and
- AvailableAttrs is part of the AttributeSetNode class
Both of these assume that the number of available enum attributes is limi...
2012 May 30
2
[LLVMdev] Legalizing truncating store using atomic load.
...mantics as
ISD::ATOMIC_LOAD_AND and ATOMIC_LOAD_OR, respectively). I run into a
problem during the legalization process, where the legalizer complains
that ISD::STORE and ISD::ATOMIC_LOAD_OR (generated at step 3 in the
following list) has different types.
Here is the lowering steps:
1. Calculate a bitmask (e.g. 0xFFFF0000 for i16) indicating where to
write the data;
2. Using atomic_load_and and the negated bitmask to clear the bits to
be written;
3. Using atomic_load_or and the bitmask writing the result into the
corresponding position.
I'm not sure whether this could be done using custom lower...
2015 Jun 28
3
[PATCH] Take shift in crtc positions for ZaphodHeads configs into account.
...of those masks allows use of the kernels i'th crtc for
the given kencoder. The X-Servers dix code checks those bit masks
for valid xf86Output -> xf86Crtc assignments, assuming that the i'th
slot xf86CrtcConfigPtr config->crtc[i] corresponds to bit i in the
xf86Output->possibe_crtcs bitmask, and bails if the bitmask doesn't
allow the specified assignment of crtc to output. If ZaphodHeads
breaks the assumption of bit i <-> crtc slot i this ends in failure.
Take this shift of crtc index positions wrt. encoder bitmask bit
positions into account by bit-shifting positions accord...
2011 Sep 07
0
[PATCH] libxl: vcpu_avail is a bitmask, use it as such
vcpu_avail is a bitmask of available cpus but we are currently using it
as the number of cpus available. This patch fixes it.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
diff -r 6580ff415189 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c Wed Sep 07 13:29:15 2011 +0000
+++ b/tools/libx...
2015 Jan 13
0
[PATCH] format, make-fs: specify the label on mkfs
...rmat/format.c
index 4e6069f..cc371ab 100644
--- a/format/format.c
+++ b/format/format.c
@@ -434,13 +434,15 @@ do_format (void)
}
if (filesystem) {
- if (guestfs_mkfs_opts (g, filesystem, dev, -1) == -1)
- exit (EXIT_FAILURE);
+ struct guestfs_mkfs_opts_argv optargs = { .bitmask = 0 };
if (label) {
- if (guestfs_set_label (g, dev, label) == -1)
- exit (EXIT_FAILURE);
+ optargs.label = label;
+ optargs.bitmask |= GUESTFS_MKFS_OPTS_LABEL_BITMASK;
}
+
+ if (guestfs_mkfs_opts_argv (g, filesystem, dev, &optargs) == -1)
+...
2011 Nov 09
6
[PATCH] Add tune2fs support to libguestfs.
At the moment OpenStack uses kpartx and nbd to resize filesystems and
inject files to guests. I sincerely hope they don't allow untrusted
users to upload guest images / AMIs :-(
To fix this I'm looking into adding libguestfs support as an optional
backend in OpenStack.
The only missing feature in libguestfs is the ability to call tune2fs
on a filesystem. This patch series adds tune2fs
2014 Aug 11
3
[PATCH] python: fix possible free on uninit memory with OStringList optargs
...k for a non-PyNone PyObject for that argument.
If before that optional argument there are other arguments which can
cause an earlier error return from that binding function, the free'ing
code will then act on garbage values.
Enhance the check by also checking whether the optargs struct has the
bitmask with the element for that argument, meaning that the
corresponding struct member was initialized.
---
generator/python.ml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/generator/python.ml b/generator/python.ml
index 72bc8a0..a763104 100644
--- a/generator/python.ml
+++ b/g...
2012 May 31
0
[LLVMdev] Legalizing truncating store using atomic load.
...ND and ATOMIC_LOAD_OR, respectively). I run into a
> problem during the legalization process, where the legalizer complains
> that ISD::STORE and ISD::ATOMIC_LOAD_OR (generated at step 3 in the
> following list) has different types.
>
> Here is the lowering steps:
> 1. Calculate a bitmask (e.g. 0xFFFF0000 for i16) indicating where to
> write the data;
> 2. Using atomic_load_and and the negated bitmask to clear the bits to
> be written;
> 3. Using atomic_load_or and the bitmask writing the result into the
> corresponding position.
>
> I'm not sure whether thi...
2016 Apr 14
3
builder: posix_fadvise fixes.
The way we used posix_fadvise was wrong, and yet right!
Rich.
2016 Apr 14
0
[PATCH 1/2] utils, builder: Add wrappers for posix_fadvise.
Add wrappers around posix_fadvise and use them in places we were
calling posix_fadvise directly before.
Also in virt-builder we were doing this (and ignoring the result):
posix_fadvise (fd, 0, 0, POSIX_FADV_RANDOM|POSIX_FADV_DONTNEED);
However the POSIX_FADV_* flags are _not_ bitmasks! In fact
POSIX_FADV_RANDOM|POSIX_FADV_DONTNEED == POSIX_FADV_NOREUSE so we were
giving a completely different hint from what we thought we were
giving.
---
builder/pxzcat-c.c | 5 +--
src/guestfs-internal-frontend.h | 5 +++
src/proto.c | 17 +-------
src/utils...
2012 May 31
1
[LLVMdev] Legalizing truncating store using atomic load.
...espectively). I run into a
>> problem during the legalization process, where the legalizer complains
>> that ISD::STORE and ISD::ATOMIC_LOAD_OR (generated at step 3 in the
>> following list) has different types.
>>
>> Here is the lowering steps:
>> 1. Calculate a bitmask (e.g. 0xFFFF0000 for i16) indicating where to
>> write the data;
>> 2. Using atomic_load_and and the negated bitmask to clear the bits to
>> be written;
>> 3. Using atomic_load_or and the bitmask writing the result into the
>> corresponding position.
>>
>>...
2019 Aug 21
2
[PATCH v2] drm: Bump encoder limit from 32 to 64
...ach DP++/USB-C port
along with 4 MST encoders for each DP port. This comes out to 35
different encoders. Unfortunately, this can't really be optimized to
make less encoders either.
So, what if we bumped the limit to 64? Unfortunately this has one very
awkward drawback: we already expose 32-bit bitmasks for encoders to
userspace in drm_encoder->possible_clones. Yikes. While cloning is still
(rarely) used in certain modern video hardware, it's mostly used in
situations where memory bandwidth is so limited that it's not possible
to scan out from 2 CRTCs at once.
So, let's try to com...
2020 Feb 25
0
Re: [PATCH commit] options: Compile blocksize code conditionally.
...hanged, 4 insertions(+)
>
> diff --git a/options/options.c b/options/options.c
> index 63221ea..abdcbae 100644
> --- a/options/options.c
> +++ b/options/options.c
> @@ -140,10 +140,12 @@ add_drives_handle (guestfs_h *g, struct drv *drv, size_t drive_index)
> ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_DISCARD_BITMASK;
> ad_optargs.discard = drv->a.discard;
> }
> +#ifdef GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK
> if (drv->a.blocksize) {
> ad_optargs.bitmask |= GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK;
> ad_...
2007 Apr 24
1
bitmask(bitwise operation) support in Ferret
Hi,
in my person model,
I have a enumeration field "role" that take bits like 1, 2, 4, 8, 16,
.....
they represent person roles(eg: admin(1), QA(2), manager(4) .... ).
Each person can take on multiple roles.
say there''s person A that''s both a admin and QA(the role value is "3")
so if I search like "Person.find_by_content(''role:(1))", I