Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
char_device.c:131:52: warning: cast from 'uint8_t *'
(aka 'unsigned char *') to 'SpiceCharDeviceMsgToClientItem *'
(aka 'struct SpiceCharDeviceMsgToClientItem *')
increases required alignment from 1 to 8 [-Wcast-align]
SpiceCharDeviceMsgToClientItem *msg_item = SPICE_CONTAINEROF(item,
^~~~~~~~~~~~~~~~~~~~~~~
../spice-common/spice-protocol/spice/macros.h:142:6: note: expanded
from macro 'SPICE_CONTAINEROF'
((struct_type *)((uint8_t *)(ptr) - SPICE_OFFSETOF(struct_type, member)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
So we can avoid using using an attribute not supported for the compiler.
warning:
../spice-common/common/mem.h:91:80: warning: unknown attribute
'__alloc_size__' ignored [-Wunknown-attributes]
void *spice_malloc0_n(size_t n_blocks, size_t n_block_bytes)
SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE2(1,2);
../spice-common/spice-protocol/spice/macros.h:52:52: note: expanded
from macro 'SPICE_GNUC_ALLOC_SIZE2'
#define SPICE_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
^
|
|
GCC 4.4.7 does not define __BYTE_ORDER__ macros so use architecture
macro to attempt to detect endianess.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reported-by: Swapna Krishnan <skrishna@redhat.com>
Tested-by: Swapna Krishnan <skrishna@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
|
|
This should have been squashed in the commit introducing the macro, but
I forgot to commit this before pushing it.
|
|
This macro allow to define magic constants without using weird
memory tweacks.
This remove some possible warning from some compiler and
make code more optimized as compiler is able to compute the
constant.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This allow to define macros based on endianess in public headers
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Files listed as _DATA in Makefile.am are installed without the
executable bit set, files listed as _SCRIPT do get the executable bit
set. As spice_codegen.py is meant to be run by spice-protocol users,
make sure this bit is set.
|
|
Older aclocal version needs to have ACLOCAL_FLAGS defined in Makefile.am
in order to be able to pick up macros stored in m4/ in the source
directory.
|
|
This fixes a build failure on older distros (EL6) which do not have
this macro readily available.
|
|
No need to use an uint8 typed member, we can directly use the
appropriate enum8 type here, which makes everything more explicit.
|
|
Re-using the SPICE_IMAGE_COMPRESS_ prefix in newer spice-protocol
releases is going to cause issues as there will be clashing enum members
in older spice-server releases. Using SPICE_IMAGE_COMPRESSION_ as a
prefix sidesteps these backward compability issues.
|
|
spice-common generate code from these python scripts and the installed
SPICE .proto. This commit installs them during make install, and adds a
codegendir variable to the pkgconfig file so that spice-common can
locate the scripts.
|
|
This flag is only used for git builds, and can usually safely be
disabled.
When it's enabled, configure.ac will check that python-six and pyparsing
are available, and will use these together with the codegen python
scripts in order to automatically regenerate enums.h when the .proto
files change.
|
|
The just added .proto files and python code generation code need to be
added to EXTRA_DIST in order to be distributed in tarballs, and
we need to recurse in the new python_modules directory.
|
|
The history for spice*.proto, spice_codegen.py and python_modules/ was
extracted from spice-common using git filter-branch:
git filter-branch \
--prune-empty \
--index-filter '
git ls-tree -z -r --name-only --full-tree $GIT_COMMIT \
| grep -z -v "^python_modules/" \
| grep -z -v "^spice.proto" \
| grep -z -v "^spice1.proto" \
| grep -z -v "^spice_codegen.py" \
| xargs -0 -r git rm -f --cached -r
' \
-- \
--all
git filter-branch --force \
--prune-empty \
--index-filter '
git rm -f spice-protocol --cached --ignore-unmatch
' \
-- \
--all
|
|
This indicates the client's ability to handle multi-monitor
configurations that are not multi-head.
This commit addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=1248196
https://bugzilla.redhat.com/show_bug.cgi?id=1248189
|
|
This patch changes the type of 'valid_attributes' and
'attributes_with_arguments'.
Both of them are list of different strings and are kept in sets.
This was the intention of the original code, but this patch
use a specific set([ strings ]) format, instead of { strings }.
This fixes the build for me on RHEL-6 (python-2.6.6).
Build error is:
File "/home/ulublin/git/spice/spice-common/python_modules/ptypes.py",
line 67
'end',
^
SyntaxError: invalid syntax
|
|
|
|
|
|
Having these constants use the same name as the ones in spice-server
0.12.5 causes compilation issues for spice-server users when using
spice-server 0.12.5 or older, and spice-protocol 0.12.8.
|
|
This is to prepare to generate the wireshark dissector which uses
glib types instead of the newer C ones (for compatibility with some
compilers).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
This attribute is not used in code.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Verify that the attribute is known. This could help for instance to
avoid some future typo mistakes.
We also now have a list of attributes that we can comment for
documentation purpose.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Blocks were mainly the same, this reduces the amount of code.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
The module is used in the initial try/except so make sure it is
already imported.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Trying to generate enums.h with python3 results in
Traceback (most recent call last):
File "./spice_codegen.py", line 217, in <module>
write_enums(writer, options.generate_dissector)
File "./spice_codegen.py", line 99, in write_enums
write_channel_enums(writer, c, False, False)
File "./spice_codegen.py", line 17, in write_channel_enums
if len(messages) == 0:
TypeError: object of type 'filter' has no len()
filter() returns an enumerator object in python3 while it used to return
a list in python2. Using list(filter()) instead fixes that error.
I've checked that the generated enums.h is identical with python2 and
python3.
|
|
There are 3 lines in spice.proto/spice1.proto which start with spaces
and then contain a tab. This commit removes the spaces and only keep the
tab.
|
|
|
|
|
|
New escape for sending monitor position information from guest to client
|
|
When accessing a virtual desktop from different devices, some may have
different image compression requirements, e.g. slow devices may prefer
the faster LZ4 over GLZ. This message instructs the server to switch the
image compression algorithm. This patch also promotes the
SPICE_IMAGE_COMPRESS_* constants so that they are available from both
the server and the client.
|
|
|
|
|
|
This allows spice-protocol users to depend on the git version.
spice-vdagent.git needs a spice-protocol version newer than the latest
release for the volume synchronization work or it won't build.
|
|
With VD_AGENT_AUDIO_VOLUME_SYNC the client can send volume and mute
values to be set in the guest for input or output devices.
Currently this is done once after the agent send its capabilities.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1012868
|
|
Older versions of python-six (at least 1.3.0) defined six.PY3 but not
six.PY2. six.PY2 is only used twice in straightforward tests so it's
easy to use six.PY3 instead.
|
|
This is a new version of my previous patch that does not include six.py.
It's still kind of big, but at least it's all spice-common changes now.
There are also a few other fixes that Christophe brought to my attention.
Note that six now needs to be installed on the system (python-six on
Fedora and Debian, six on PyPI).
This *should* be enough to make spice_codegen.py work on both Python 2
and Python 3. The major changes are as follows:
* cStringIO.StringIO -> io.StringIO
* str vs. unicode updates (io.StringIO doesn't like str)
* integer division
* foo.has_key(bar) -> bar in foo
* import internal_thing -> from . import internal_thing
* removed from __future__ import with_statement
(might break Python 2.5?)
* changed some lambdas to list comprehensions (done by 2to3)
* cast some_dict.keys() to list where needed (e.g. for sorting)
* use normal type names with isinstance instead of types.WhateverType
Signed-off-by: Alexander Wauck <awauck@codeweavers.com>
|
|
Use autoreconf, allow out of tree autogen.sh run.
|
|
This interface has long been deprecated, and I don't know of any user.
Perhaps the header could even be removed from spice-protocol?
|
|
- Add a new LZ4 image type to spice.proto.
- Add canvas_get_lz4() to common_canvas_base, to get a pixmap from an
lz4 image.
- Add an enable-lz4 switch to the configure script, disabled by default.
|
|
|
|
The return of the get_array_size() is used as a limit in a loop,
being compared with an unsigned index (indexes are always unsigned).
To avoid the -Wsign-compare warning, let's cast the return of the
get_array_size() to unsigned and make GCC happier.
|