~ubuntu-branches/ubuntu/raring/libvirt/raring

« back to all changes in this revision

Viewing changes to debian/patches/virsh-Initialize-library-before-calling-virResetLast.patch

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-11-19 10:41:02 UTC
  • mfrom: (1.2.15) (223.1.2 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121119104102-l6ewdppikysbzztu
Tags: 1.0.0-0ubuntu2
debian/patches/add-armhf-sysinfo-infomration.patch: Disable
to fix FTBFS on arm.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Debian Libvirt Maintainers
2
 
 <pkg-libvirt-maintainers@lists.alioth.debian.org>
3
 
Date: Mon, 11 Apr 2011 23:31:09 +0200
4
 
Subject: virsh: Initialize library before calling virResetLastError
5
 
 
6
 
so the error system gets intialized via virErrorInitialize.
7
 
 
8
 
Otherwise this results in crashes like:
9
 
 
10
 
 #0  0x40567537 in raise () from /lib/libc.so.6
11
 
 (gdb) bt
12
 
 #0  0x40567537 in raise () from /lib/libc.so.6
13
 
 #1  0x4056a922 in abort () from /lib/libc.so.6
14
 
 #2  0x4059dfbd in ?? () from /lib/libc.so.6
15
 
 #3  0x405a80ca in ?? () from /lib/libc.so.6
16
 
 #4  0x405a9918 in ?? () from /lib/libc.so.6
17
 
 #5  0x405aca5d in free () from /lib/libc.so.6
18
 
 #6  0x40057803 in virFree (ptrptr=0x892e048) at util/memory.c:310
19
 
 #7  0x400683cf in virResetError (err=0x892e028) at util/virterror.c:408
20
 
 #8  0x40068673 in virResetLastError () at util/virterror.c:439
21
 
 #9  0x4004bf53 in virEventRegisterDefaultImpl () at util/event.c:150
22
 
 #10 0x08066e78 in vshInit (argc=5, argv=0xbf9c2cd4) at virsh.c:12075
23
 
 #11 main (argc=5, argv=0xbf9c2cd4) at virsh.c:12751
24
 
---
25
 
 tools/virsh.c |    3 +++
26
 
 1 files changed, 3 insertions(+), 0 deletions(-)
27
 
 
28
 
diff --git a/tools/virsh.c b/tools/virsh.c
29
 
index 76deaa9..a8263d6 100644
30
 
--- a/tools/virsh.c
31
 
+++ b/tools/virsh.c
32
 
@@ -17098,6 +17098,9 @@ vshInit(vshControl *ctl)
33
 
     /* set up the signals handlers to catch disconnections */
34
 
     vshSetupSignals();
35
 
 
36
 
+    if (virInitialize() < 0)
37
 
+        return false;
38
 
+
39
 
     if (virEventRegisterDefaultImpl() < 0)
40
 
         return false;
41