Skip to content

Commit

Permalink
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Browse files Browse the repository at this point in the history
# By Jan Krupa (4) and others
# Via Michael Tokarev
* mjt/trivial-patches:
  hw/i386/Makefile.obj: use $(PYTHON) to run .py scripts consistently
  configure: Use -B switch only for Python versions which support it
  qga: Fix shutdown command of guest agent to work with SysV
  console: Remove unused debug code
  qga: Fix compilation for old versions of MinGW
  .travis.yml: basic compile and check recipes
  pci-assign: Fix error_report of pci-stub message
  qapi: Fix comment for create-type to match code.
  vl: fix build when configured with no graphic support
  usb: drop unused USBNetState.inpkt field
  qemu-char: add missing characters used in keymaps
  qemu-char: add support for U-prefixed symbols
  qemu-char: add Czech keymap file
  qemu-char: add Czech characters to VNC keysyms

Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
  • Loading branch information
Anthony Liguori committed Nov 19, 2013
2 parents 7af3151 + 0478f37 commit 38dc749
Show file tree
Hide file tree
Showing 13 changed files with 573 additions and 58 deletions.
71 changes: 71 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
language: c
python:
- "2.4"
compiler:
- gcc
- clang
env:
global:
- TEST_CMD="make check"
- EXTRA_CONFIG=""
# Development packages, EXTRA_PKGS saved for additional builds
- CORE_PKGS="libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev"
- NET_PKGS="libseccomp-dev libgnutls-dev libssh2-1-dev libspice-server-dev libspice-protocol-dev libnss3-dev"
- GUI_PKGS="libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev"
- EXTRA_PKGS=""
matrix:
- TARGETS=alpha-softmmu,alpha-linux-user
- TARGETS=arm-softmmu,arm-linux-user
- TARGETS=cris-softmmu
- TARGETS=i386-softmmu,x86_64-softmmu
- TARGETS=lm32-softmmu
- TARGETS=m68k-softmmu
- TARGETS=microblaze-softmmu,microblazeel-softmmu
- TARGETS=mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu
- TARGETS=moxie-softmmu
- TARGETS=or32-softmmu,
- TARGETS=ppc-softmmu,ppc64-softmmu,ppcemb-softmmu
- TARGETS=s390x-softmmu
- TARGETS=sh4-softmmu,sh4eb-softmmu
- TARGETS=sparc-softmmu,sparc64-softmmu
- TARGETS=unicore32-softmmu
- TARGETS=xtensa-softmmu,xtensaeb-softmmu
before_install:
- git submodule update --init --recursive
- sudo apt-get update -qq
- sudo apt-get install -qq ${CORE_PKGS} ${NET_PKGS} ${GUI_PKGS} ${EXTRA_PKGS}
script: "./configure --target-list=${TARGETS} ${EXTRA_CONFIG} && make && ${TEST_CMD}"
matrix:
# We manually include a number of additional build for non-standard bits
include:
# Debug related options
- env: TARGETS=i386-softmmu,x86_64-softmmu
EXTRA_CONFIG="--enable-debug"
compiler: gcc
- env: TARGETS=i386-softmmu,x86_64-softmmu
EXTRA_CONFIG="--enable-debug --enable-tcg-interpreter"
compiler: gcc
# Currently configure doesn't force --disable-pie
- env: TARGETS=i386-softmmu,x86_64-softmmu
EXTRA_CONFIG="--enable-gprof --enable-gcov --disable-pie"
compiler: gcc
- env: TARGETS=i386-softmmu,x86_64-softmmu
EXTRA_PKGS="sparse"
EXTRA_CONFIG="--enable-sparse"
compiler: gcc
# All the trace backends (apart from dtrace)
- env: TARGETS=i386-softmmu,x86_64-softmmu
EXTRA_CONFIG="--enable-trace-backend=stderr"
compiler: gcc
- env: TARGETS=i386-softmmu,x86_64-softmmu
EXTRA_CONFIG="--enable-trace-backend=simple"
compiler: gcc
- env: TARGETS=i386-softmmu,x86_64-softmmu
EXTRA_CONFIG="--enable-trace-backend=ftrace"
TEST_CMD=""
compiler: gcc
# This disabled make check for the ftrace backend which needs more setting up
# Currently broken on 12.04 due to mis-packaged liburcu and changed API, will be pulled.
#- env: TARGETS=i386-softmmu,x86_64-softmmu
# EXTRA_PKGS="liblttng-ust-dev liburcu-dev"
# EXTRA_CONFIG="--enable-trace-backend=ust"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ distclean: clean
KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
ar de en-us fi fr-be hr it lv nl pl ru th \
common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \
bepo
bepo cz

ifdef INSTALL_BLOBS
BLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
Expand Down
9 changes: 8 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ fi

: ${make=${MAKE-make}}
: ${install=${INSTALL-install}}
: ${python=${PYTHON-python -B}}
: ${python=${PYTHON-python}}
: ${smbd=${SMBD-/usr/sbin/smbd}}

# Default objcc to clang if available, otherwise use CC
Expand Down Expand Up @@ -1420,6 +1420,13 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_in
"Use --python=/path/to/python to specify a supported Python."
fi

# The -B switch was added in Python 2.6.
# If it is supplied, compiled files are not written.
# Use it for Python versions which support it.
if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
python="$python -B"
fi

if test -z "${target_list+xxx}" ; then
target_list="$default_target_list"
else
Expand Down
2 changes: 1 addition & 1 deletion hw/i386/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ hw/i386/%.hex: $(SRC_PATH)/hw/i386/%.dsl $(SRC_PATH)/scripts/acpi_extract_prepro
$(call quiet-command, cpp -P $< -o $*.dsl.i.orig, " CPP $(TARGET_DIR)$*.dsl.i.orig")
$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract_preprocess.py $*.dsl.i.orig > $*.dsl.i, " ACPI_PREPROCESS $(TARGET_DIR)$*.dsl.i")
$(call quiet-command, $(IASL) $(call iasl-option,$(IASL),-Pn,) -vs -l -tc -p $* $*.dsl.i $(if $(V), , > /dev/null) 2>&1 ," IASL $(TARGET_DIR)$*.dsl.i")
$(call quiet-command, $(SRC_PATH)/scripts/acpi_extract.py $*.lst > $*.off, " ACPI_EXTRACT $(TARGET_DIR)$*.off")
$(call quiet-command, $(PYTHON) $(SRC_PATH)/scripts/acpi_extract.py $*.lst > $*.off, " ACPI_EXTRACT $(TARGET_DIR)$*.off")
$(call quiet-command, cat $*.off > $@, " CAT $(TARGET_DIR)$@")
else
#IASL Not present. Restore pre-generated hex files.
Expand Down
36 changes: 16 additions & 20 deletions hw/i386/kvm/pci-assign.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,26 +791,22 @@ static void assign_failed_examine(AssignedDevice *dev)
goto fail;
}

error_report("*** The driver '%s' is occupying your device "
"%04x:%02x:%02x.%x.",
ns, dev->host.domain, dev->host.bus, dev->host.slot,
dev->host.function);
error_report("***");
error_report("*** You can try the following commands to free it:");
error_report("***");
error_report("*** $ echo \"%04x %04x\" > /sys/bus/pci/drivers/pci-stub/"
"new_id", vendor_id, device_id);
error_report("*** $ echo \"%04x:%02x:%02x.%x\" > /sys/bus/pci/drivers/"
"%s/unbind",
dev->host.domain, dev->host.bus, dev->host.slot,
dev->host.function, ns);
error_report("*** $ echo \"%04x:%02x:%02x.%x\" > /sys/bus/pci/drivers/"
"pci-stub/bind",
dev->host.domain, dev->host.bus, dev->host.slot,
dev->host.function);
error_report("*** $ echo \"%04x %04x\" > /sys/bus/pci/drivers/pci-stub"
"/remove_id", vendor_id, device_id);
error_report("***");
error_printf("*** The driver '%s' is occupying your device "
"%04x:%02x:%02x.%x.\n"
"***\n"
"*** You can try the following commands to free it:\n"
"***\n"
"*** $ echo \"%04x %04x\" > /sys/bus/pci/drivers/pci-stub/new_id\n"
"*** $ echo \"%04x:%02x:%02x.%x\" > /sys/bus/pci/drivers/%s/unbind\n"
"*** $ echo \"%04x:%02x:%02x.%x\" > /sys/bus/pci/drivers/"
"pci-stub/bind\n"
"*** $ echo \"%04x %04x\" > /sys/bus/pci/drivers/pci-stub/remove_id\n"
"***",
ns, dev->host.domain, dev->host.bus, dev->host.slot,
dev->host.function, vendor_id, device_id,
dev->host.domain, dev->host.bus, dev->host.slot, dev->host.function,
ns, dev->host.domain, dev->host.bus, dev->host.slot,
dev->host.function, vendor_id, device_id);

return;

Expand Down
1 change: 0 additions & 1 deletion hw/usb/dev-network.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ typedef struct USBNetState {
unsigned int out_ptr;
uint8_t out_buf[2048];

USBPacket *inpkt;
unsigned int in_ptr, in_len;
uint8_t in_buf[2048];

Expand Down
94 changes: 94 additions & 0 deletions pc-bios/keymaps/cz
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
include common

# Czech qwertz layout
# comments are czech descriptions of the characters

# -----------
# First row
# -----------

# strednik, kolecko
semicolon 0x29
dead_abovering 0x29 shift

# numbers
plus 0x2
1 0x2 shift
ecaron 0x3
2 0x3 shift
scaron 0x4
3 0x4 shift
ccaron 0x5
4 0x5 shift
rcaron 0x6
5 0x6 shift
zcaron 0x7
6 0x7 shift
yacute 0x8
7 0x8 shift
aacute 0x9
8 0x9 shift
iacute 0xa
9 0xa shift
eacute 0xb
0 0xb shift

# rovnitko
equal 0x0c
percent 0x0c shift

# carka, hacek
dead_acute 0x0d
dead_caron 0x0d shift

# ------------
# Second row
# ------------

z 0x15 addupper

# u s carkou, zpetne lomitko
uacute 0x1a
slash 0x1a shift

# prava zavorka, leva zavorka
parenright 0x1b
parenleft 0x1b shift

# -----------
# Third row
# -----------

# u s krouzkem, uvozovky
uring 0x27
quotedbl 0x27 shift

# paragraf, vykricnik
section 0x28
exclam 0x28 shift

# vodorovna dvojtecka, apostrof
dead_diaeresis 0x2b
apostrophe 0x2b shift

# ------------
# Fourth row
# ------------

# zpetne lomitko, roura
backslash 0x2b
bar 0x2b shift

y 0x2c addupper

# carka, otaznik
comma 0x33
question 0x33 shift

# tecka, dvojtecka
period 0x34
colon 0x34 shift

# minus, podtrzitko
minus 0x35
underscore 0x35 shift
2 changes: 1 addition & 1 deletion qga/commands-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **err)
reopen_fd_to_null(1);
reopen_fd_to_null(2);

execle("/sbin/shutdown", "shutdown", shutdown_flag, "+0",
execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
"hypervisor initiated shutdown", (char*)NULL, environ);
_exit(EXIT_FAILURE);
} else if (pid < 0) {
Expand Down
1 change: 1 addition & 0 deletions qga/vss-win32/requester.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#ifndef VSS_WIN32_REQUESTER_H
#define VSS_WIN32_REQUESTER_H

#include <basetyps.h> /* STDAPI */
#include "qemu/compiler.h"

#ifdef __cplusplus
Expand Down
33 changes: 0 additions & 33 deletions ui/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,39 +409,6 @@ static const pixman_color_t color_table_rgb[2][8] = {
}
};

#ifdef DEBUG_CONSOLE
static void console_print_text_attributes(TextAttributes *t_attrib, char ch)
{
if (t_attrib->bold) {
printf("b");
} else {
printf(" ");
}
if (t_attrib->uline) {
printf("u");
} else {
printf(" ");
}
if (t_attrib->blink) {
printf("l");
} else {
printf(" ");
}
if (t_attrib->invers) {
printf("i");
} else {
printf(" ");
}
if (t_attrib->unvisible) {
printf("n");
} else {
printf(" ");
}

printf(" fg: %d bg: %d ch:'%2X' '%c'\n", t_attrib->fgcol, t_attrib->bgcol, ch, ch);
}
#endif

static void vga_putcharxy(QemuConsole *s, int x, int y, int ch,
TextAttributes *t_attrib)
{
Expand Down
6 changes: 6 additions & 0 deletions ui/keymaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ static int get_keysym(const name2keysym_t *table,
if (!strcmp(p->name, name))
return p->keysym;
}
if (name[0] == 'U' && strlen(name) == 5) { /* try unicode Uxxxx */
char *end;
int ret = (int)strtoul(name + 1, &end, 16);
if (*end == '\0' && ret > 0)
return ret;
}
return 0;
}

Expand Down
Loading

0 comments on commit 38dc749

Please sign in to comment.