summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-04-30 16:20:49 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-05-04 10:43:41 -1000
commit3377747db0de42171fda5dc02228691840ba1429 (patch)
tree0c653144c614b124ff858c33ce9db6e27eba87f0 /isys
parent962d7f9188834d555b9820b1d982be6ce3bf8f39 (diff)
downloadanaconda-3377747db0de42171fda5dc02228691840ba1429.tar.gz
anaconda-3377747db0de42171fda5dc02228691840ba1429.tar.xz
anaconda-3377747db0de42171fda5dc02228691840ba1429.zip
Remove noise from isys/nl.c (#490735)
The perror() statements don't really help, they just dump noise to the console. Users apparently dislike that.
Diffstat (limited to 'isys')
-rw-r--r--isys/nl.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/isys/nl.c b/isys/nl.c
index 6103c31e4..af4928dab 100644
--- a/isys/nl.c
+++ b/isys/nl.c
@@ -36,18 +36,15 @@ struct nl_cache *nl_get_link_cache(struct nl_handle **handle) {
struct nl_cache *cache = NULL;
if ((*handle = nl_handle_alloc()) == NULL) {
- perror("nl_handle_alloc() failure in nl_get_link_cache()");
return NULL;
}
if (nl_connect(*handle, NETLINK_ROUTE)) {
- perror("nl_connect() failure in nl_get_link_cache()");
nl_handle_destroy(*handle);
return NULL;
}
if ((cache = rtnl_link_alloc_cache(*handle)) == NULL) {
- perror("rtnl_link_alloc_cache() failure in nl_get_link_cache()");
nl_close(*handle);
nl_handle_destroy(*handle);
return NULL;
@@ -74,25 +71,21 @@ char *nl_ip2str(char *ifname) {
struct nl_addr *addr = NULL;
if (ifname == NULL) {
- perror("Missing ifname in nl_ip2str()");
return NULL;
}
if ((cache = nl_get_link_cache(&handle)) == NULL) {
- perror("nl_get_link_cache() failure in nl_ip2str()");
return NULL;
}
ifindex = rtnl_link_name2i(cache, ifname);
if ((cache = rtnl_addr_alloc_cache(handle)) == NULL) {
- perror("rtnl_addr_alloc_cache() failure in nl_ip2str()");
goto ip2str_error;
}
/* find the IPv4 and IPv6 addresses for this interface */
if ((obj = nl_cache_get_first(cache)) == NULL) {
- perror("nl_cache_get_first() failure in nl_ip2str()");
goto ip2str_error;
}
@@ -128,7 +121,6 @@ char *nl_ip2str(char *ifname) {
buflen += 1;
if ((buf = malloc(buflen)) == NULL) {
- perror("malloc() failure on buf in nl_ip2str()");
nl_addr_destroy(addr);
goto ip2str_error;
}
@@ -140,7 +132,6 @@ char *nl_ip2str(char *ifname) {
if ((pos = index(buf, '/')) != NULL) {
*pos = '\0';
if ((buf = realloc(buf, strlen(buf) + 1)) == NULL) {
- perror("realloc() failure on buf in nl_ip2str()");
nl_addr_destroy(addr);
goto ip2str_error;
}
@@ -192,27 +183,22 @@ char *nl_mac2str(char *ifname) {
struct nl_addr *addr = NULL;
if (ifname == NULL) {
- perror("Missing ifname in nl_mac2str()");
return NULL;
}
if ((cache = nl_get_link_cache(&handle)) == NULL) {
- perror("nl_get_link_cache() failure in nl_mac2str()");
return NULL;
}
if ((link = rtnl_link_get_by_name(cache, ifname)) == NULL) {
- perror("rtnl_link_get_by_name() failure in nl_mac2str()");
goto mac2str_error2;
}
if ((addr = rtnl_link_get_addr(link)) == NULL) {
- perror("rtnl_link_get_addr() failure in nl_mac2str()");
goto mac2str_error3;
}
if ((buf = malloc(buflen)) == NULL) {
- perror("malloc() failure on buf in nl_mac2str()");
goto mac2str_error4;
}