[libvirt] [PATCH] util: reduce syscalls for virGetDeviceID
by Eric Blake
There's no need to do lots of readlink() calls to canonicalize
a name if we're only going to use stat() on it, since stat()
already chases symlinks.
* src/util/virutil.c (virGetDeviceID): Let stat() do the symlink
chasing.
---
src/util/virutil.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index 47ab17f..7c54bea 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -1,7 +1,7 @@
/*
* virutil.c: common, generic utility functions
*
- * Copyright (C) 2006-2012 Red Hat, Inc.
+ * Copyright (C) 2006-2013 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
* Copyright (C) 2006, 2007 Binary Karma
* Copyright (C) 2006 Shuveb Hussain
@@ -3135,27 +3135,18 @@ int
virGetDeviceID(const char *path, int *maj, int *min)
{
struct stat sb;
- char *canonical_path = NULL;
- if (virFileResolveLink(path, &canonical_path) < 0)
+ if (stat(path, &sb) < 0)
return -errno;
- if (stat(canonical_path, &sb) < 0) {
- VIR_FREE(canonical_path);
- return -errno;
- }
-
- if (!S_ISBLK(sb.st_mode)) {
- VIR_FREE(canonical_path);
+ if (!S_ISBLK(sb.st_mode))
return -EINVAL;
- }
if (maj)
*maj = major(sb.st_rdev);
if (min)
*min = minor(sb.st_rdev);
- VIR_FREE(canonical_path);
return 0;
}
#else
--
1.8.0.2
11 years, 10 months
[libvirt] [PATCH] pass stub driver name instead of pciFindStubDriver
by Chunyan Liu
Pass stub driver name directly to pciDettachDevice and pciReAttachDevice to fit
for different libvirt drivers. For example, qemu driver prefers pci-stub, but
Xen prefers pciback.
Signed-off-by: Chunyan Liu <cyliu(a)suse.com>
---
src/qemu/qemu_driver.c | 4 +-
src/qemu/qemu_hostdev.c | 6 ++--
src/util/virpci.c | 62 +++++++++++++++-------------------------------
src/util/virpci.h | 6 +++-
src/xen/xen_driver.c | 4 +-
5 files changed, 31 insertions(+), 51 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 06b0d28..3427d3f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10022,7 +10022,7 @@ qemuNodeDeviceDettach(virNodeDevicePtr dev)
in_inactive_list = pciDeviceListFind(driver->inactivePciHostdevs, pci);
if (pciDettachDevice(pci, driver->activePciHostdevs,
- driver->inactivePciHostdevs) < 0)
+ driver->inactivePciHostdevs, "pci-stub") < 0)
goto out;
ret = 0;
@@ -10067,7 +10067,7 @@ qemuNodeDeviceReAttach(virNodeDevicePtr dev)
qemuDriverLock(driver);
if (pciReAttachDevice(pci, driver->activePciHostdevs,
- driver->inactivePciHostdevs) < 0)
+ driver->inactivePciHostdevs, "pci-stub") < 0)
goto out;
ret = 0;
diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c
index 174d125..896ad9b 100644
--- a/src/qemu/qemu_hostdev.c
+++ b/src/qemu/qemu_hostdev.c
@@ -458,7 +458,7 @@ int qemuPrepareHostdevPCIDevices(virQEMUDriverPtr driver,
for (i = 0; i < pciDeviceListCount(pcidevs); i++) {
pciDevice *dev = pciDeviceListGet(pcidevs, i);
if (pciDeviceGetManaged(dev) &&
- pciDettachDevice(dev, driver->activePciHostdevs, NULL) < 0)
+ pciDettachDevice(dev, driver->activePciHostdevs, NULL, "pci-stub") < 0)
goto reattachdevs;
}
@@ -574,7 +574,7 @@ resetvfnetconfig:
reattachdevs:
for (i = 0; i < pciDeviceListCount(pcidevs); i++) {
pciDevice *dev = pciDeviceListGet(pcidevs, i);
- pciReAttachDevice(dev, driver->activePciHostdevs, NULL);
+ pciReAttachDevice(dev, driver->activePciHostdevs, NULL, "pci-stub");
}
cleanup:
@@ -830,7 +830,7 @@ void qemuReattachPciDevice(pciDevice *dev, virQEMUDriverPtr driver)
}
if (pciReAttachDevice(dev, driver->activePciHostdevs,
- driver->inactivePciHostdevs) < 0) {
+ driver->inactivePciHostdevs, "pci-stub") < 0) {
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to re-attach PCI device: %s"),
err ? err->message : _("unknown error"));
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 4b26452..fb305e2 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -855,57 +855,35 @@ pciDeviceFile(char **buffer, const char *device, const char *file)
return 0;
}
-
-static const char *
-pciFindStubDriver(void)
+static int
+pciProbeStubDriver(const char *driver)
{
char *drvpath = NULL;
int probed = 0;
recheck:
- if (pciDriverDir(&drvpath, "pci-stub") < 0) {
- return NULL;
- }
-
- if (virFileExists(drvpath)) {
- VIR_FREE(drvpath);
- return "pci-stub";
- }
-
- if (pciDriverDir(&drvpath, "pciback") < 0) {
- return NULL;
- }
-
- if (virFileExists(drvpath)) {
+ if (pciDriverDir(&drvpath, driver) == 0 && virFileExists(drvpath)) {
+ /* driver already loaded, return */
VIR_FREE(drvpath);
- return "pciback";
+ return 0;
}
VIR_FREE(drvpath);
if (!probed) {
- const char *const stubprobe[] = { MODPROBE, "pci-stub", NULL };
- const char *const backprobe[] = { MODPROBE, "pciback", NULL };
-
+ const char *const probecmd[] = { MODPROBE, driver, NULL };
probed = 1;
- /*
- * Probing for pci-stub will succeed regardless of whether
- * on native or Xen kernels.
- * On Xen though, we want to prefer pciback, so probe
- * for that first, because that will only work on Xen
- */
- if (virRun(backprobe, NULL) < 0 &&
- virRun(stubprobe, NULL) < 0) {
+ if (virRun(probecmd, NULL) < 0 ) {
char ebuf[1024];
- VIR_WARN("failed to load pci-stub or pciback drivers: %s",
+ VIR_WARN("failed to load driver %s: %s", driver,
virStrerror(errno, ebuf, sizeof(ebuf)));
- return NULL;
+ return -1;
}
goto recheck;
}
- return NULL;
+ return -1;
}
static int
@@ -1149,12 +1127,12 @@ cleanup:
int
pciDettachDevice(pciDevice *dev,
pciDeviceList *activeDevs,
- pciDeviceList *inactiveDevs)
+ pciDeviceList *inactiveDevs,
+ const char *driver)
{
- const char *driver = pciFindStubDriver();
- if (!driver) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("cannot find any PCI stub module"));
+ if (pciProbeStubDriver(driver) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Failed to load PCI stub module %s"), driver);
return -1;
}
@@ -1179,12 +1157,12 @@ pciDettachDevice(pciDevice *dev,
int
pciReAttachDevice(pciDevice *dev,
pciDeviceList *activeDevs,
- pciDeviceList *inactiveDevs)
+ pciDeviceList *inactiveDevs,
+ const char *driver)
{
- const char *driver = pciFindStubDriver();
- if (!driver) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("cannot find any PCI stub module"));
+ if (pciProbeStubDriver(driver) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Failed to load PCI stub module %s"), driver);
return -1;
}
diff --git a/src/util/virpci.h b/src/util/virpci.h
index 115da4e..bf7da01 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -44,10 +44,12 @@ void pciFreeDevice (pciDevice *dev);
const char *pciDeviceGetName (pciDevice *dev);
int pciDettachDevice (pciDevice *dev,
pciDeviceList *activeDevs,
- pciDeviceList *inactiveDevs);
+ pciDeviceList *inactiveDevs,
+ const char *driver);
int pciReAttachDevice (pciDevice *dev,
pciDeviceList *activeDevs,
- pciDeviceList *inactiveDevs);
+ pciDeviceList *inactiveDevs,
+ const char *driver);
int pciResetDevice (pciDevice *dev,
pciDeviceList *activeDevs,
pciDeviceList *inactiveDevs);
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 559025e..2795ebc 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2113,7 +2113,7 @@ xenUnifiedNodeDeviceDettach(virNodeDevicePtr dev)
if (!pci)
return -1;
- if (pciDettachDevice(pci, NULL, NULL) < 0)
+ if (pciDettachDevice(pci, NULL, NULL, "pciback") < 0)
goto out;
ret = 0;
@@ -2203,7 +2203,7 @@ xenUnifiedNodeDeviceReAttach(virNodeDevicePtr dev)
goto out;
}
- if (pciReAttachDevice(pci, NULL, NULL) < 0)
+ if (pciReAttachDevice(pci, NULL, NULL, "pciback") < 0)
goto out;
ret = 0;
--
1.7.3.4
11 years, 10 months
[libvirt] Attaching an "Internal Address"
by Varun Bhatnagar
Hi,
I am trying to attach an internal address to my domain. So for that I am
defining the following syntax in my xml file:
but it is giving the following error:
Tried giving interface type as network but that is adding Host-only type
interface.
Can anyone please suggest what can be the possible solution. I think it is
some problem with the source network. Do I have to define any internal
network before in any interface?
If yes then how?
Any help will be appreciated.
Thanks in advance.
Regards,
Varun
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
11 years, 10 months
[libvirt] [PATCH] build: move file deleting action from %files list to %install
by Yufang Zhang
When building libvirt rpms on rhel5, I got the following error:
File must begin with "/": rm
File must begin with "/": -f
File must begin with "/": $RPM_BUILD_ROOT/etc/sysctl.d/libvirtd
Installed (but unpackaged) file(s) found:
/etc/sysctl.d/libvirtd
It is triggerd by the %files list of libvirt daemon:
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf
%else
rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
%endif
After checking document of rpm spec file, I think it would be better
to move the file deleting line from %files list to %install script.
---
libvirt.spec.in | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 52da4f4..4872c07 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1420,6 +1420,10 @@ mv $RPM_BUILD_ROOT%{_datadir}/systemtap/tapset/libvirt_qemu_probes.stp \
%endif
%endif
+%if 0%{?fedora} < 14 || 0%{?rhel} == 5
+rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
+%endif
+
%clean
rm -fr %{buildroot}
@@ -1679,8 +1683,6 @@ fi
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 6
%config(noreplace) %{_prefix}/lib/sysctl.d/libvirtd.conf
-%else
-rm -f $RPM_BUILD_ROOT%{_prefix}/lib/sysctl.d/libvirtd.conf
%endif
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/lxc/
--
1.7.4.1
11 years, 10 months
[libvirt] Slow libvirtd startup
by Zeeshan Ali (Khattak)
Hi,
Too lazy to explain again so I'll just c&p conversation I had about
the issue with Eric on IRC:
<zeenix> is timeouts on session libvirt (or in general) something new?
<zeenix> libvirtd startup seems to now take a few seconds so Boxes UI
is all empty for that amount of time
<eblake> it's been around for a while; qemu.conf has settings to
control how long it should take
<zeenix> unless Boxes is launched before libvirtd timesout
<eblake> but there is a relatively new patch that makes the libvirtd
-t actually be useful for qemu:///session
<zeenix> don't think i ever changed that, at least not recently
<zeenix> that could be it
<zeenix> i only saw it happening after i update libvirtd (after a month)
<eblake> if you're seeing some delays in starting libvirtd, those are
probably worth fixing
<zeenix> s/update/recently updated/
<zeenix> yeah
<zeenix> i'll try to write a test app
<zeenix> no need, i can reproduce with virsh :)
[zeenix@z-laptop virt]$ time virsh list
Id Name State
----------------------------------------------------
real 0m6.349s
user 0m0.016s
sys 0m0.010s
[zeenix@z-laptop virt]$ time virsh list
Id Name State
----------------------------------------------------
real 0m0.024s
user 0m0.010s
sys 0m0.011s
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
11 years, 10 months
[libvirt] [PATCH 0/3]add usb-net support for qemu
by Guannan Ren
The set of patches fixed some typo in network docs and codes and
is trying to support usb-net qemu virtual device.
The following is an example for use.
Libvirt XML sample:
<devices>
<interface type='user'>
<mac address='52:54:00:32:6a:91'/>
<model type='usb-net'/>
<alias name='net1'/>
<address type='usb' bus='0' port='1'/>
</interface>
</devices>
qemu commandline:
qemu ${other_vm_args}
-netdev user,id=hostnet1 \
-device usb-net,netdev=hostnet1,id=net1,\
mac=52:54:00:32:6a:91,bus=usb.0,port=1
Guannan Ren(3)
[PATCH 1/3] network: fix typos and docs
[PATCH 2/3] qemu: add usb-net caps flag
[PATCH 3/3] qemu: add usb-net support
docs/formatdomain.html.in | 13 +++++++++----
src/conf/domain_conf.c | 22 +++++++++++++++-------
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 8 +++++++-
tests/qemuhelptest.c | 21 ++++++++++++++-------
6 files changed, 48 insertions(+), 19 deletions(-)
11 years, 10 months
[libvirt] API to upgrade read-only connection
by Zeeshan Ali (Khattak)
Hi,
Once again, I'll be lazy and just copy&paste an IRC conversation but
please don't hesitate to ask if something needs clarification:
<zeenix> am i missing something or there is no way to 'upgrade' a
read-only connection to a normal one?
<eblake_out> zeenix: looks like you have to create a new connection if
you want new privileges
<eblake_out> although you may want to float it by the list to see if a
new API for upgrading an existing connection makes sense
<eblake_out> especially in light of danpb's work-in-progress on adding
fine-grained ACLs
<zeenix> ah ok
<zeenix> eblake_out: we'd like to connect to system libvirt as well by
default in boxes
<zeenix> but would be nice to avoid the polkit dialog until we really
need full-access
--
Regards,
Zeeshan Ali (Khattak)
FSF member#5124
11 years, 10 months
[libvirt] [PATCH 0/2]add usb-serial virtual device support for qemu
by Guannan Ren
This two patches are trying to add support for qemu virtual device
usb-serial.
Add an optional 'type' attribute to <target> element of serial port
device. There are two choices for its value, 'isa-serial' and
'usb-serial'. For backward compatibility, when attribute 'type' is
missing the 'isa-serial' will be chose as before.
Libvirt XML sample
<serial type='pty'>
<target type='usb-serial' port='0'/>
<address type='usb' bus='0' port='1'/>
</serial>
qemu commandline:
qemu ${other_vm_args} \
-chardev pty,id=charserial0 \
-device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1
Guannan Ren(2)
[PATCH 1/2] qemu: add usb-serial caps flag
[PATCH 2/2] qemu: add usb-serial support
docs/formatdomain.html.in | 9 ++++++++-
docs/schemas/domaincommon.rng | 20 +++++++++++++++++---
src/conf/domain_conf.c | 42 +++++++++++++++++++++++++++++++++++++++---
src/conf/domain_conf.h | 10 ++++++++++
src/libvirt_private.syms | 2 ++
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 24 ++++++++++++++++++++++--
tests/qemuhelptest.c | 21 ++++++++++++++-------
9 files changed, 115 insertions(+), 16 deletions(-)
11 years, 10 months
[libvirt] [PATCH] Fix wrong indentation for virDomainState
by Claudio Bley
Signed-off-by: Claudio Bley <cbley(a)av-test.de>
---
Pushing under the trivial rule.
include/libvirt/libvirt.h.in | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 09c89c5..d2640e1 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -116,14 +116,14 @@ typedef virDomain *virDomainPtr;
* A domain may be in different states at a given point in time
*/
typedef enum {
- VIR_DOMAIN_NOSTATE = 0, /* no state */
- VIR_DOMAIN_RUNNING = 1, /* the domain is running */
- VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
- VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
- VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
- VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
- VIR_DOMAIN_CRASHED = 6, /* the domain is crashed */
- VIR_DOMAIN_PMSUSPENDED = 7, /* the domain is suspended by guest
+ VIR_DOMAIN_NOSTATE = 0, /* no state */
+ VIR_DOMAIN_RUNNING = 1, /* the domain is running */
+ VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
+ VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
+ VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
+ VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
+ VIR_DOMAIN_CRASHED = 6, /* the domain is crashed */
+ VIR_DOMAIN_PMSUSPENDED = 7, /* the domain is suspended by guest
power management */
#ifdef VIR_ENUM_SENTINELS
@@ -132,7 +132,7 @@ typedef enum {
* added to the libvirt API. It reflects the last state supported
* by this version of the libvirt API.
*/
- VIR_DOMAIN_LAST
+ VIR_DOMAIN_LAST
#endif
} virDomainState;
--
1.7.9.5
11 years, 10 months
[libvirt] [PATCH] libvirt.h.in: Fix indentation
by Michal Privoznik
With the most recent patch from Claudio, I realized how many
indentation flaws we have in the libvirt.h.in file. Even though
they are harmless, it's still worth fixing them.
---
Pushed under trivial rule.
include/libvirt/libvirt.h.in | 58 ++++++++++++++++++++++----------------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index d2640e1..c1233f6 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -124,7 +124,7 @@ typedef enum {
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
VIR_DOMAIN_CRASHED = 6, /* the domain is crashed */
VIR_DOMAIN_PMSUSPENDED = 7, /* the domain is suspended by guest
- power management */
+ power management */
#ifdef VIR_ENUM_SENTINELS
/*
@@ -1380,7 +1380,7 @@ virDomainPtr virDomainLookupByID (virConnectPtr conn,
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char *uuid);
virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn,
- const char *uuid);
+ const char *uuid);
typedef enum {
VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, /* hypervisor choice */
@@ -1479,9 +1479,9 @@ int virDomainSaveImageDefineXML (virConnectPtr conn,
int virDomainManagedSave (virDomainPtr dom,
unsigned int flags);
int virDomainHasManagedSaveImage(virDomainPtr dom,
- unsigned int flags);
+ unsigned int flags);
int virDomainManagedSaveRemove(virDomainPtr dom,
- unsigned int flags);
+ unsigned int flags);
/*
* Domain core dump
@@ -1550,7 +1550,7 @@ int virDomainGetControlInfo (virDomainPtr domain,
* Return scheduler type in effect 'sedf', 'credit', 'linux'
*/
char * virDomainGetSchedulerType(virDomainPtr domain,
- int *nparams);
+ int *nparams);
/* Manage blkio parameters. */
@@ -1698,7 +1698,7 @@ unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
int virDomainGetUUIDString (virDomainPtr domain,
- char *buf);
+ char *buf);
char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
int virDomainSetMaxMemory (virDomainPtr domain,
@@ -1828,13 +1828,13 @@ int virDomainInterfaceStats (virDomainPtr dom,
#define VIR_DOMAIN_BANDWIDTH_OUT_BURST "outbound.burst"
int virDomainSetInterfaceParameters (virDomainPtr dom,
- const char *device,
- virTypedParameterPtr params,
- int nparams, unsigned int flags);
+ const char *device,
+ virTypedParameterPtr params,
+ int nparams, unsigned int flags);
int virDomainGetInterfaceParameters (virDomainPtr dom,
- const char *device,
- virTypedParameterPtr params,
- int *nparams, unsigned int flags);
+ const char *device,
+ virTypedParameterPtr params,
+ int *nparams, unsigned int flags);
/* Management of domain block devices */
@@ -1972,7 +1972,7 @@ int virConnectListAllDomains (virConnectPtr conn,
unsigned int flags);
int virDomainCreate (virDomainPtr domain);
int virDomainCreateWithFlags (virDomainPtr domain,
- unsigned int flags);
+ unsigned int flags);
int virDomainGetAutostart (virDomainPtr domain,
int *autostart);
@@ -2515,7 +2515,7 @@ typedef enum {
config if it's not active */
VIR_NETWORK_UPDATE_AFFECT_LIVE = 1 << 0, /* affect live state of network only */
VIR_NETWORK_UPDATE_AFFECT_CONFIG = 1 << 1, /* affect persistent config only */
- } virNetworkUpdateFlags;
+} virNetworkUpdateFlags;
/*
* Update an existing network definition
@@ -2725,16 +2725,16 @@ typedef enum {
typedef enum {
VIR_STORAGE_VOL_WIPE_ALG_ZERO = 0, /* 1-pass, all zeroes */
VIR_STORAGE_VOL_WIPE_ALG_NNSA = 1, /* 4-pass NNSA Policy Letter
- NAP-14.1-C (XVI-8) */
+ NAP-14.1-C (XVI-8) */
VIR_STORAGE_VOL_WIPE_ALG_DOD = 2, /* 4-pass DoD 5220.22-M section
- 8-306 procedure */
+ 8-306 procedure */
VIR_STORAGE_VOL_WIPE_ALG_BSI = 3, /* 9-pass method recommended by the
- German Center of Security in
- Information Technologies */
+ German Center of Security in
+ Information Technologies */
VIR_STORAGE_VOL_WIPE_ALG_GUTMANN = 4, /* The canonical 35-pass sequence */
VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER = 5, /* 7-pass method described by
- Bruce Schneier in "Applied
- Cryptography" (1996) */
+ Bruce Schneier in "Applied
+ Cryptography" (1996) */
VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 = 6, /* 7-pass random */
VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 = 7, /* 33-pass random */
@@ -3556,12 +3556,12 @@ int virConnectListSecrets (virConnectPtr conn,
*/
typedef enum {
VIR_CONNECT_LIST_SECRETS_EPHEMERAL = 1 << 0, /* kept in memory, never
- stored persistently */
+ stored persistently */
VIR_CONNECT_LIST_SECRETS_NO_EPHEMERAL = 1 << 1,
VIR_CONNECT_LIST_SECRETS_PRIVATE = 1 << 2, /* not revealed to any caller
- of libvirt, nor to any other
- node */
+ of libvirt, nor to any other
+ node */
VIR_CONNECT_LIST_SECRETS_NO_PRIVATE = 1 << 3,
} virConnectListAllSecretsFlags;
@@ -4305,12 +4305,12 @@ typedef enum {
* VIR_DOMAIN_EVENT_ID_DISK_CHANGE with virConnectDomainEventRegisterAny()
*/
typedef void (*virConnectDomainEventDiskChangeCallback)(virConnectPtr conn,
- virDomainPtr dom,
- const char *oldSrcPath,
- const char *newSrcPath,
- const char *devAlias,
- int reason,
- void *opaque);
+ virDomainPtr dom,
+ const char *oldSrcPath,
+ const char *newSrcPath,
+ const char *devAlias,
+ int reason,
+ void *opaque);
/**
* virConnectDomainEventTrayChangeReason:
--
1.8.0.2
11 years, 10 months