mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Moved qemu sockets/configs
This commit is contained in:
parent
a1432a5215
commit
f9b263118f
@ -1,3 +1,9 @@
|
|||||||
|
Tue Feb 14 12:19:24 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* src/qemu_internal.c, qemud/qemud.c: Move configs into
|
||||||
|
/etc/libvirt/qemu or $HOME/.libvirt/qemu and the socket into
|
||||||
|
$HOME/.libvirt/qemud-sock or /var/run/libvirt/qemud-sock
|
||||||
|
|
||||||
Tue Feb 14 12:19:24 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
Tue Feb 14 12:19:24 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* python/generator.py: blacklist vshRunConsole method from
|
* python/generator.py: blacklist vshRunConsole method from
|
||||||
|
@ -201,7 +201,7 @@ static int qemudListen(struct qemud_server *server, int sys) {
|
|||||||
char sockname[PATH_MAX];
|
char sockname[PATH_MAX];
|
||||||
|
|
||||||
if (sys) {
|
if (sys) {
|
||||||
if (snprintf(sockname, sizeof(sockname), "%s/run/qemud/sock", LOCAL_STATE_DIR) >= (int)sizeof(sockname)) {
|
if (snprintf(sockname, sizeof(sockname), "%s/run/libvirt/qemud-sock", LOCAL_STATE_DIR) >= (int)sizeof(sockname)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
unlink(sockname);
|
unlink(sockname);
|
||||||
@ -209,7 +209,7 @@ static int qemudListen(struct qemud_server *server, int sys) {
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
||||||
if (snprintf(sockname, sizeof(sockname), "%s/run/qemud/sock-ro", LOCAL_STATE_DIR) >= (int)sizeof(sockname)) {
|
if (snprintf(sockname, sizeof(sockname), "%s/run/libvirt/qemud-sock-ro", LOCAL_STATE_DIR) >= (int)sizeof(sockname)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
unlink(sockname);
|
unlink(sockname);
|
||||||
@ -226,7 +226,7 @@ static int qemudListen(struct qemud_server *server, int sys) {
|
|||||||
if (!(pw = getpwuid(uid)))
|
if (!(pw = getpwuid(uid)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (snprintf(sockname, sizeof(sockname), "@%s/.qemud/sock", pw->pw_dir) >= (int)sizeof(sockname)) {
|
if (snprintf(sockname, sizeof(sockname), "@%s/.libvirt/qemud-sock", pw->pw_dir) >= (int)sizeof(sockname)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,10 +249,10 @@ static struct qemud_server *qemudInitialize(int sys) {
|
|||||||
server->nextvmid = 1;
|
server->nextvmid = 1;
|
||||||
|
|
||||||
if (sys) {
|
if (sys) {
|
||||||
if (snprintf(server->configDir, sizeof(server->configDir), "%s/qemud", SYSCONF_DIR) >= (int)sizeof(server->configDir)) {
|
if (snprintf(server->configDir, sizeof(server->configDir), "%s/libvirt/qemu", SYSCONF_DIR) >= (int)sizeof(server->configDir)) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (snprintf(server->networkConfigDir, sizeof(server->networkConfigDir), "%s/qemud/networks", SYSCONF_DIR) >= (int)sizeof(server->networkConfigDir)) {
|
if (snprintf(server->networkConfigDir, sizeof(server->networkConfigDir), "%s/libvirt/qemu/networks", SYSCONF_DIR) >= (int)sizeof(server->networkConfigDir)) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -265,11 +265,11 @@ static struct qemud_server *qemudInitialize(int sys) {
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (snprintf(server->configDir, sizeof(server->configDir), "%s/.qemud", pw->pw_dir) >= (int)sizeof(server->configDir)) {
|
if (snprintf(server->configDir, sizeof(server->configDir), "%s/.libvirt/qemu", pw->pw_dir) >= (int)sizeof(server->configDir)) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (snprintf(server->networkConfigDir, sizeof(server->networkConfigDir), "%s/.qemud.d/networks", pw->pw_dir) >= (int)sizeof(server->networkConfigDir)) {
|
if (snprintf(server->networkConfigDir, sizeof(server->networkConfigDir), "%s/.libvirt/qemu/networks", pw->pw_dir) >= (int)sizeof(server->networkConfigDir)) {
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -336,11 +336,11 @@ static int qemuOpenConnection(virConnectPtr conn, xmlURIPtr uri, int readonly AT
|
|||||||
|
|
||||||
if (!strcmp(uri->path, "/system")) {
|
if (!strcmp(uri->path, "/system")) {
|
||||||
if (readonly) {
|
if (readonly) {
|
||||||
if (snprintf(path, sizeof(path), "%s/run/qemud/sock-ro", LOCAL_STATE_DIR) >= (int)sizeof(path)) {
|
if (snprintf(path, sizeof(path), "%s/run/libvirt/qemud-sock-ro", LOCAL_STATE_DIR) >= (int)sizeof(path)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (snprintf(path, sizeof(path), "%s/run/qemud/sock", LOCAL_STATE_DIR) >= (int)sizeof(path)) {
|
if (snprintf(path, sizeof(path), "%s/run/libvirt/qemud-sock", LOCAL_STATE_DIR) >= (int)sizeof(path)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ static int qemuOpenConnection(virConnectPtr conn, xmlURIPtr uri, int readonly AT
|
|||||||
if (!(pw = getpwuid(uid)))
|
if (!(pw = getpwuid(uid)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (snprintf(path, sizeof(path), "@%s/.qemud/sock", pw->pw_dir) == sizeof(path)) {
|
if (snprintf(path, sizeof(path), "@%s/.libvirt/qemud-sock", pw->pw_dir) == sizeof(path)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user