summaryrefslogtreecommitdiff
path: root/sal/osl/unx/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'sal/osl/unx/util.c')
-rw-r--r--sal/osl/unx/util.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c
index 9949e36f8..fe68c480d 100644
--- a/sal/osl/unx/util.c
+++ b/sal/osl/unx/util.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,7 +40,7 @@
#endif
#include "osl/util.h"
-
+#include "osl/diagnose.h"
/*****************************************************************************/
@@ -56,17 +57,16 @@ static int osl_checkAddr(const char* addr);
sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
{
+#ifdef SOLARIS
+ /** algorithm doesn't work on solaris */
+ return sal_False;
+#else
char buff[1024];
char hard_addr[64];
struct ifconf ifc;
struct ifreq *ifr;
int i;
int so;
-
-#ifdef SOLARIS
- /** algorithm doesn't work on solaris */
- return sal_False;
-#else
if ( pAddr == 0 )
{
@@ -91,7 +91,7 @@ sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
ifc.ifc_buf = buff;
if ( ioctl(so, SIOCGIFCONF, &ifc) < 0 )
{
-/* fprintf(stderr, "SIOCGIFCONF: %s\n", strerror(errno));*/
+ OSL_TRACE( "SIOCGIFCONF: %s\n", strerror(errno) );
close(so);
return sal_False;
}
@@ -140,7 +140,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
if ( ret < 0 )
{
-/* fprintf(stderr, "SIOCGIFFLAGS: %s\n", strerror(errno)); */
+ OSL_TRACE( "SIOCGIFFLAGS: %s\n", strerror(errno) );
close(so);
return ret;
}
@@ -152,7 +152,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
if (ifr.ifr_flags & IFF_LOOPBACK)
{
-/* fprintf(stderr, "SIOCGIFFLAGS : is LOOPBACK : %s\n", strerror(errno));*/
+ OSL_TRACE( "SIOCGIFFLAGS : is LOOPBACK : %s\n", strerror(errno) );
close(so);
return 0;
}
@@ -169,7 +169,7 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
#endif
if (ret < 0) {
-/* fprintf(stderr, "SIOCGIFADDR: %s\n", strerror(errno));*/
+ OSL_TRACE( "SIOCGIFADDR: %s\n", strerror(errno) );
memset(hard_addr, 0, 32);
close(so);
return ret;
@@ -192,12 +192,9 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
ret=osl_checkAddr(hard_addr);
if (ret < 0) {
-/* fprintf(stderr, "SIOCGIFADDR got '00:00:00:00:00:00'\n"); */
+ OSL_TRACE( "SIOCGIFADDR got '00:00:00:00:00:00'\n" );
return ret;
}
-
-/* fprintf(stderr,"interface : %s -- ",ifname);*/
-/* fprintf(stderr,"HWaddr : %s\n", print_ether(hard_addr));*/
return 1;
}
@@ -348,3 +345,5 @@ void osl_interlockedCountCheckForSingleCPU(void)
}
#endif /* defined(_SC_NPROCESSORS_CONF) */
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */