Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 290172 Details for
Bug 426385
build error - openvz_driver.c
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to fix broken build stage and to fix libvirtd-virsh behaviour
libvirt.0.4.0.alt.patch (text/plain), 3.22 KB, created by
Mikhail A Pokidko
on 2007-12-20 17:22:04 UTC
(
hide
)
Description:
patch to fix broken build stage and to fix libvirtd-virsh behaviour
Filename:
MIME Type:
Creator:
Mikhail A Pokidko
Created:
2007-12-20 17:22:04 UTC
Size:
3.22 KB
patch
obsolete
>--- libvirt-0.4.0/src/openvz_driver.c.orig 2007-12-06 01:01:07 +0300 >+++ libvirt-0.4.0/src/openvz_driver.c 2007-12-20 17:02:20 +0300 >@@ -72,9 +72,10 @@ static int openvzDomainGetInfo(virDomain > static int openvzDomainShutdown(virDomainPtr dom); > static int openvzDomainReboot(virDomainPtr dom, unsigned int flags); > static int openvzDomainCreate(virDomainPtr dom); >-static virDrvOpenStatus openvzOpen(virConnectPtr conn, const char *name, >- int flags ATTRIBUTE_UNUSED); >- >+static virDrvOpenStatus openvzOpen(virConnectPtr conn, >+ xmlURIPtr uri, >+ virConnectAuthPtr auth ATTRIBUTE_UNUSED, >+ int flags ATTRIBUTE_UNUSED); > static int openvzClose(virConnectPtr conn); > static const char *openvzGetType(virConnectPtr conn ATTRIBUTE_UNUSED); > static int openvzListDomains(virConnectPtr conn, int *ids, int nids); >@@ -554,35 +555,37 @@ bail_out5: > } > > static virDrvOpenStatus openvzOpen(virConnectPtr conn, >- const char *name, >- int *credtype ATTRIBUTE_UNUSED, >- int ncredtype ATTRIBUTE_UNUSED, >- virConnectAuthCallbackPtr cb ATTRIBUTE_UNUSED, >- void *cbdata ATTRIBUTE_UNUSED, >- int flags ATTRIBUTE_UNUSED) { >- struct openvz_vm *vms; >- >- /* Just check if the guy is root. Nothing really to open for OpenVZ */ >- if (getuid()) { // OpenVZ tools can only be used by r00t >- return VIR_DRV_OPEN_DECLINED; >- } else { >- if (strcmp(name, "openvz:///system")) >- return VIR_DRV_OPEN_DECLINED; >- } >- /* See if we are running an OpenVZ enabled kernel */ >- if(access("/proc/vz/veinfo", F_OK) == -1 || >- access("/proc/user_beancounters", F_OK) == -1) { >- return VIR_DRV_OPEN_DECLINED; >- } >- >- conn->privateData = &ovz_driver; >+ xmlURIPtr uri, >+ virConnectAuthPtr auth ATTRIBUTE_UNUSED, >+ int flags ATTRIBUTE_UNUSED) >+{ >+ struct openvz_vm *vms; > >- virStateInitialize(); >- vms = openvzGetVPSInfo(conn); >- ovz_driver.vms = vms; >+ /*Just check if the user is root. Nothing really to open for OpenVZ */ >+ if (getuid()) { // OpenVZ tools can only be used by r00t >+ return VIR_DRV_OPEN_DECLINED; >+ } else { >+ if (uri == NULL || uri->scheme == NULL || uri->path == NULL) >+ return VIR_DRV_OPEN_DECLINED; >+ if (STRNEQ (uri->scheme, "openvz")) >+ return VIR_DRV_OPEN_DECLINED; >+ if (STRNEQ (uri->path, "/system")) >+ return VIR_DRV_OPEN_DECLINED; >+ } >+ /* See if we are running an OpenVZ enabled kernel */ >+ if(access("/proc/vz/veinfo", F_OK) == -1 || >+ access("/proc/user_beancounters", F_OK) == -1) { >+ return VIR_DRV_OPEN_DECLINED; >+ } >+ >+ conn->privateData = &ovz_driver; >+ >+ virStateInitialize(); >+ vms = openvzGetVPSInfo(conn); >+ ovz_driver.vms = vms; > >- return VIR_DRV_OPEN_SUCCESS; >-} >+ return VIR_DRV_OPEN_SUCCESS; >+}; > > static int openvzClose(virConnectPtr conn) { >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 426385
: 290172