mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
Change some perror() calls to log_error() so they'll appear in
syslog when we're a daemon.
This commit is contained in:
parent
e5011ba8bf
commit
8d81a737a4
@ -75,7 +75,7 @@ int init_cluster()
|
|||||||
/* Open the cluster communication socket */
|
/* Open the cluster communication socket */
|
||||||
cluster_sock = socket(AF_CLUSTER, SOCK_DGRAM, CLPROTO_CLIENT);
|
cluster_sock = socket(AF_CLUSTER, SOCK_DGRAM, CLPROTO_CLIENT);
|
||||||
if (cluster_sock == -1) {
|
if (cluster_sock == -1) {
|
||||||
perror("Can't open cluster socket");
|
log_error("Can't open cluster socket");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ static void get_members()
|
|||||||
|
|
||||||
num_nodes = ioctl(cluster_sock, SIOCCLUSTER_GETMEMBERS, 0);
|
num_nodes = ioctl(cluster_sock, SIOCCLUSTER_GETMEMBERS, 0);
|
||||||
if (num_nodes == -1) {
|
if (num_nodes == -1) {
|
||||||
perror("get nodes");
|
log_error("Unable to get node count");
|
||||||
} else {
|
} else {
|
||||||
/* Not enough room for new nodes list ? */
|
/* Not enough room for new nodes list ? */
|
||||||
if (num_nodes > count_nodes && nodes) {
|
if (num_nodes > count_nodes && nodes) {
|
||||||
@ -332,7 +332,7 @@ static void get_members()
|
|||||||
count_nodes = num_nodes + 10; /* Overallocate a little */
|
count_nodes = num_nodes + 10; /* Overallocate a little */
|
||||||
nodes = malloc(count_nodes * sizeof(struct cl_cluster_node));
|
nodes = malloc(count_nodes * sizeof(struct cl_cluster_node));
|
||||||
if (!nodes) {
|
if (!nodes) {
|
||||||
perror("Unable to allocate nodes array\n");
|
log_error("Unable to allocate nodes array\n");
|
||||||
exit(5);
|
exit(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -341,7 +341,7 @@ static void get_members()
|
|||||||
|
|
||||||
num_nodes = ioctl(cluster_sock, SIOCCLUSTER_GETMEMBERS, &nodelist);
|
num_nodes = ioctl(cluster_sock, SIOCCLUSTER_GETMEMBERS, &nodelist);
|
||||||
if (num_nodes <= 0) {
|
if (num_nodes <= 0) {
|
||||||
perror("get node details");
|
log_error("Unable to get node details");
|
||||||
exit(6);
|
exit(6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user