* [Qemu-devel] [PULL 0/3] Trivial patches for 21 April to 1 May 2012
@ 2012-05-01 9:35 Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 1/3] configure: Fix creation of symbolic links for MinGW toolchain Stefan Hajnoczi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-05-01 9:35 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, Stefan Hajnoczi
The following changes since commit 42fe1c245f0239ebcdc084740a1777ac3699d071:
main-loop: Fix build for w32 and w64 (2012-04-28 09:25:54 +0000)
are available in the git repository at:
git://github.com/stefanha/qemu.git trivial-patches
for you to fetch changes up to c97feed13cded953b11465829f66b9323a47a0f9:
iohandler: Use bool for boolean struct member and remove holes (2012-05-01 10:13:33 +0100)
----------------------------------------------------------------
Stefan Weil (3):
configure: Fix creation of symbolic links for MinGW toolchain
async: Use bool for boolean struct members and remove a hole
iohandler: Use bool for boolean struct member and remove holes
async.c | 6 +++---
configure | 21 ++++++++++-----------
iohandler.c | 4 ++--
3 files changed, 15 insertions(+), 16 deletions(-)
--
1.7.10
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/3] configure: Fix creation of symbolic links for MinGW toolchain
2012-05-01 9:35 [Qemu-devel] [PULL 0/3] Trivial patches for 21 April to 1 May 2012 Stefan Hajnoczi
@ 2012-05-01 9:35 ` Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 2/3] async: Use bool for boolean struct members and remove a hole Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 3/3] iohandler: Use bool for boolean struct member and remove holes Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-05-01 9:35 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
The MinGW toolchain on w32/w64 hosts does not create symbolic links,
but implements 'ln -s' similar to 'cp -r'.
In incremental out of tree builds, this resulted in files which
were not updated when their counterparts in the QEMU source tree
changed. Especially for Makefile* this happened very often.
With this patch, the 'symlinked' files are now always updated for
out of tree builds. Similar code was already used for the symbolic
link of libcacard/Makefile.
The symlink macro always removes the target before it is created
again, therefore the rm command for libcacard/Makefile was redundant
and is removed now.
Macro symlink is also used with directories. To remove them on w32
hosts, a recursive rm is needed.
v2:
Quote arguments in shell function symlink, and also quote any argument
which is passed to symlink and which contains macros. This should reduce
the chance of accidents caused by rm -rf.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
configure | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/configure b/configure
index 25697bb..9d21302 100755
--- a/configure
+++ b/configure
@@ -41,8 +41,8 @@ compile_prog() {
# symbolically link $1 to $2. Portable version of "ln -sf".
symlink() {
- rm -f $2
- ln -s $1 $2
+ rm -rf "$2"
+ ln -s "$1" "$2"
}
# check whether a command is available to this shell (may be either an
@@ -3435,7 +3435,7 @@ fi
for d in libdis libdis-user; do
mkdir -p $d
- symlink $source_path/Makefile.dis $d/Makefile
+ symlink "$source_path/Makefile.dis" "$d/Makefile"
echo > $d/config.mak
done
@@ -3444,13 +3444,13 @@ if test "$linux" = "yes" ; then
mkdir -p linux-headers
case "$cpu" in
i386|x86_64)
- symlink $source_path/linux-headers/asm-x86 linux-headers/asm
+ symlink "$source_path/linux-headers/asm-x86" linux-headers/asm
;;
ppcemb|ppc|ppc64)
- symlink $source_path/linux-headers/asm-powerpc linux-headers/asm
+ symlink "$source_path/linux-headers/asm-powerpc" linux-headers/asm
;;
s390x)
- symlink $source_path/linux-headers/asm-s390 linux-headers/asm
+ symlink "$source_path/linux-headers/asm-s390" linux-headers/asm
;;
esac
fi
@@ -3515,7 +3515,7 @@ mkdir -p $target_dir/kvm
if test "$target" = "arm-linux-user" -o "$target" = "armeb-linux-user" -o "$target" = "arm-bsd-user" -o "$target" = "armeb-bsd-user" ; then
mkdir -p $target_dir/nwfpe
fi
-symlink $source_path/Makefile.target $target_dir/Makefile
+symlink "$source_path/Makefile.target" "$target_dir/Makefile"
echo "# Automatically generated by configure - do not modify" > $config_target_mak
@@ -3958,7 +3958,7 @@ do
done
mkdir -p $DIRS
for f in $FILES ; do
- if [ -e "$source_path/$f" ] && ! [ -e "$f" ]; then
+ if [ -e "$source_path/$f" ] && [ "$source_path" != `pwd` ]; then
symlink "$source_path/$f" "$f"
fi
done
@@ -3981,7 +3981,7 @@ for hwlib in 32 64; do
mkdir -p $d
mkdir -p $d/ide
mkdir -p $d/usb
- symlink $source_path/Makefile.hw $d/Makefile
+ symlink "$source_path/Makefile.hw" "$d/Makefile"
mkdir -p $d/9pfs
echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" > $d/config.mak
done
@@ -3989,7 +3989,6 @@ done
if [ "$source_path" != `pwd` ]; then
# out of tree build
mkdir -p libcacard
- rm -f libcacard/Makefile
symlink "$source_path/libcacard/Makefile" libcacard/Makefile
fi
@@ -3997,7 +3996,7 @@ d=libuser
mkdir -p $d
mkdir -p $d/trace
mkdir -p $d/qom
-symlink $source_path/Makefile.user $d/Makefile
+symlink "$source_path/Makefile.user" "$d/Makefile"
if test "$docs" = "yes" ; then
mkdir -p QMP
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/3] async: Use bool for boolean struct members and remove a hole
2012-05-01 9:35 [Qemu-devel] [PULL 0/3] Trivial patches for 21 April to 1 May 2012 Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 1/3] configure: Fix creation of symbolic links for MinGW toolchain Stefan Hajnoczi
@ 2012-05-01 9:35 ` Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 3/3] iohandler: Use bool for boolean struct member and remove holes Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-05-01 9:35 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
Using bool reduces the size of the structure and improves readability.
A hole in the structure was removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
async.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/async.c b/async.c
index ecdaf15..85cc641 100644
--- a/async.c
+++ b/async.c
@@ -35,10 +35,10 @@ static struct QEMUBH *first_bh;
struct QEMUBH {
QEMUBHFunc *cb;
void *opaque;
- int scheduled;
- int idle;
- int deleted;
QEMUBH *next;
+ bool scheduled;
+ bool idle;
+ bool deleted;
};
QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 3/3] iohandler: Use bool for boolean struct member and remove holes
2012-05-01 9:35 [Qemu-devel] [PULL 0/3] Trivial patches for 21 April to 1 May 2012 Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 1/3] configure: Fix creation of symbolic links for MinGW toolchain Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 2/3] async: Use bool for boolean struct members and remove a hole Stefan Hajnoczi
@ 2012-05-01 9:35 ` Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-05-01 9:35 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Stefan Weil, qemu-devel, Stefan Hajnoczi
From: Stefan Weil <sw@weilnetz.de>
Using bool reduces the size of the structure and improves readability.
Two holes in the structure were removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
iohandler.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/iohandler.c b/iohandler.c
index 5640d49..3c74de6 100644
--- a/iohandler.c
+++ b/iohandler.c
@@ -33,13 +33,13 @@
#endif
typedef struct IOHandlerRecord {
- int fd;
IOCanReadHandler *fd_read_poll;
IOHandler *fd_read;
IOHandler *fd_write;
- int deleted;
void *opaque;
QLIST_ENTRY(IOHandlerRecord) next;
+ int fd;
+ bool deleted;
} IOHandlerRecord;
static QLIST_HEAD(, IOHandlerRecord) io_handlers =
--
1.7.10
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-01 9:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-01 9:35 [Qemu-devel] [PULL 0/3] Trivial patches for 21 April to 1 May 2012 Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 1/3] configure: Fix creation of symbolic links for MinGW toolchain Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 2/3] async: Use bool for boolean struct members and remove a hole Stefan Hajnoczi
2012-05-01 9:35 ` [Qemu-devel] [PATCH 3/3] iohandler: Use bool for boolean struct member and remove holes Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).