mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
qemud/qemud.c (qemudInitPaths): Remove unused code.
This commit is contained in:
parent
efd495d667
commit
7ff9eebeba
@ -1,3 +1,7 @@
|
|||||||
|
Thu Dec 6 12:41:18 CET 2007 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
|
* qemud/qemud.c (qemudInitPaths): Remove unused code.
|
||||||
|
|
||||||
Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
|
Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
|
||||||
|
|
||||||
* src/virsh.c: The prompt should depend on readonly status,
|
* src/virsh.c: The prompt should depend on readonly status,
|
||||||
|
@ -659,10 +659,8 @@ static int qemudInitPaths(struct qemud_server *server,
|
|||||||
char *sockname,
|
char *sockname,
|
||||||
char *roSockname,
|
char *roSockname,
|
||||||
int maxlen) {
|
int maxlen) {
|
||||||
char *base = 0;
|
|
||||||
uid_t uid = geteuid();
|
uid_t uid = geteuid();
|
||||||
|
|
||||||
|
|
||||||
if (!uid) {
|
if (!uid) {
|
||||||
if (snprintf (sockname, maxlen, "%s/run/libvirt/libvirt-sock",
|
if (snprintf (sockname, maxlen, "%s/run/libvirt/libvirt-sock",
|
||||||
LOCAL_STATE_DIR) >= maxlen)
|
LOCAL_STATE_DIR) >= maxlen)
|
||||||
@ -693,15 +691,8 @@ static int qemudInitPaths(struct qemud_server *server,
|
|||||||
if (snprintf(server->logDir, PATH_MAX, "%s/.libvirt/log", pw->pw_dir) >= PATH_MAX)
|
if (snprintf(server->logDir, PATH_MAX, "%s/.libvirt/log", pw->pw_dir) >= PATH_MAX)
|
||||||
goto snprintf_error;
|
goto snprintf_error;
|
||||||
|
|
||||||
if (asprintf (&base, "%s/.libvirt", pw->pw_dir) == -1) {
|
|
||||||
qemudLog (QEMUD_ERR, "out of memory in asprintf");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} /* !remote */
|
} /* !remote */
|
||||||
|
|
||||||
if (base) free (base);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
snprintf_error:
|
snprintf_error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user