Skip to content

Commit

Permalink
qemu-nbd tool (Anthony Liguori)
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4596 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
bellard committed May 27, 2008
1 parent e00c1e7 commit 7a5ca86
Show file tree
Hide file tree
Showing 7 changed files with 881 additions and 2 deletions.
14 changes: 13 additions & 1 deletion Makefile
Expand Up @@ -17,7 +17,7 @@ ifdef CONFIG_STATIC
LDFLAGS += -static
endif
ifdef BUILD_DOCS
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1
DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8
else
DOCS=
endif
Expand Down Expand Up @@ -159,6 +159,10 @@ qemu-img-%.o: %.c
%.o: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

qemu-nbd$(EXESUF): qemu-nbd.o nbd.o qemu-img-block.o \
$(QEMU_IMG_BLOCK_OBJS)
$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)

# dyngen host tool
dyngen$(EXESUF): dyngen.c
$(HOST_CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^
Expand Down Expand Up @@ -191,6 +195,8 @@ install-doc: $(DOCS)
ifndef CONFIG_WIN32
mkdir -p "$(DESTDIR)$(mandir)/man1"
$(INSTALL) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
mkdir -p "$(DESTDIR)$(mandir)/man8"
$(INSTALL) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
endif

install: all $(if $(BUILD_DOCS),install-doc)
Expand Down Expand Up @@ -244,6 +250,10 @@ qemu-img.1: qemu-img.texi
$(SRC_PATH)/texi2pod.pl $< qemu-img.pod
pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@

qemu-nbd.8: qemu-nbd.texi
$(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod
pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@

info: qemu-doc.info qemu-tech.info

dvi: qemu-doc.dvi qemu-tech.dvi
Expand Down Expand Up @@ -296,6 +306,7 @@ tarbin:
$(bindir)/qemu-sh4eb \
$(bindir)/qemu-cris \
$(bindir)/qemu-img \
$(bindir)/qemu-nbd \
$(datadir)/bios.bin \
$(datadir)/vgabios.bin \
$(datadir)/vgabios-cirrus.bin \
Expand All @@ -309,6 +320,7 @@ tarbin:
$(docdir)/qemu-doc.html \
$(docdir)/qemu-tech.html \
$(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1
$(mandir)/man8/qemu-nbd.8

# Include automatically generated dependency files
-include $(wildcard *.d audio/*.d slirp/*.d)
3 changes: 3 additions & 0 deletions configure
Expand Up @@ -1105,6 +1105,9 @@ echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
tools=
if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
tools="qemu-img\$(EXESUF) $tools"
if [ "$linux" = "yes" ] ; then
tools="qemu-nbd\$(EXESUF) $tools"
fi
fi
echo "TOOLS=$tools" >> $config_mak

Expand Down
2 changes: 1 addition & 1 deletion exec-all.h
Expand Up @@ -126,7 +126,7 @@ static inline int tlb_set_page(CPUState *env1, target_ulong vaddr,
#define CODE_GEN_BUFFER_SIZE (6 * 1024 * 1024)
#else
/* XXX: make it dynamic on x86 */
#define CODE_GEN_BUFFER_SIZE (16 * 1024 * 1024)
#define CODE_GEN_BUFFER_SIZE (64 * 1024 * 1024)
#endif

//#define CODE_GEN_BUFFER_SIZE (128 * 1024)
Expand Down

0 comments on commit 7a5ca86

Please sign in to comment.