Index: c/src/exec/libnetworking/rtems/rtems_glue.c
===================================================================
--- c/src/exec/libnetworking/rtems/rtems_glue.c	(revision c941a980ccbd8def1d925fc5c69a22f40e1e5060)
+++ c/src/exec/libnetworking/rtems/rtems_glue.c	(revision 4a9b8973040d4d77ad2caff4781042a231b70c27)
@@ -124,6 +124,6 @@
  * Do the initializations required by the BSD code
  */
-static void
-bsd_init ()
+static int
+bsd_init (void)
 {
 	int i;
@@ -135,6 +135,8 @@
 	p = malloc ((nmbclusters*MCLBYTES)+MCLBYTES-1);
 	p = (char *)(((unsigned long)p + (MCLBYTES-1)) & ~(MCLBYTES-1));
-	if (p == NULL)
-		rtems_panic ("Can't get network cluster memory.");
+	if (p == NULL) {
+		printf ("Can't get network cluster memory.\n");
+		return -1;
+	}
 	mbutl = (struct mbuf *)p;
 	for (i = 0; i < nmbclusters; i++) {
@@ -146,6 +148,8 @@
 	mbstat.m_clusters = nmbclusters;
 	mclrefcnt = malloc (nmbclusters);
-	if (mclrefcnt == NULL)
-		rtems_panic ("Can't get mbuf cluster reference counts memory.");
+	if (mclrefcnt == NULL) {
+		printf ("Can't get mbuf cluster reference counts memory.\n");
+		return -1;
+	}
 	memset (mclrefcnt, '\0', nmbclusters);
 
@@ -156,6 +160,8 @@
 	p = malloc(nmbuf * MSIZE + MSIZE - 1);
 	p = (char *)(((unsigned int)p + MSIZE - 1) & ~(MSIZE - 1));
-	if (p == NULL)
-		rtems_panic ("Can't get network memory.");
+	if (p == NULL) {
+		printf ("Can't get network memory.\n");
+		return -1;
+	}
 	for (i = 0; i < nmbuf; i++) {
 		((struct mbuf *)p)->m_next = mmbfree;
@@ -184,4 +190,5 @@
 	 */
 	ifinit (NULL);
+	return 0;
 }
 
@@ -189,5 +196,5 @@
  * Initialize and start network operations
  */
-static void
+static int
 rtems_bsdnet_initialize (void)
 {
@@ -222,6 +229,8 @@
 					0,
 					&networkSemaphore);
-	if (sc != RTEMS_SUCCESSFUL)
-		rtems_panic ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
+		return -1;
+	}
 
 	/*
@@ -241,5 +250,6 @@
 	 * Set up BSD-style sockets
 	 */
-	bsd_init ();
+	if (bsd_init () < 0)
+		return -1;
 
 	/*
@@ -252,7 +262,7 @@
 	 */
 	rtems_bsdnet_semaphore_release ();
-}
-
-rtems_id TaskWithSemaphore;
+	return 0;
+}
+
 /*
  * Obtain network mutex
@@ -264,5 +274,4 @@
 
 	sc = rtems_semaphore_obtain (networkSemaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-rtems_task_ident (RTEMS_SELF, 0, &TaskWithSemaphore);
 	if (sc != RTEMS_SUCCESSFUL)
 		rtems_panic ("Can't obtain network semaphore: `%s'\n", rtems_status_text (sc));
@@ -277,5 +286,4 @@
 	rtems_status_code sc;
 
-TaskWithSemaphore = 0;
 	sc = rtems_semaphore_release (networkSemaphore);
 	if (sc != RTEMS_SUCCESSFUL)
@@ -727,5 +735,5 @@
 }
 
-static void
+static int
 rtems_bsdnet_setup (void)
 {
@@ -771,6 +779,8 @@
 	 */
 	s = socket (AF_INET, SOCK_DGRAM, 0);
-	if (s < 0)
-		rtems_panic ("Can't create initial socket: %s", strerror (errno));
+	if (s < 0) {
+		printf ("Can't create initial socket: %s\n", strerror (errno));
+		return -1;
+	}
 	for (ifp = rtems_bsdnet_config.ifconfig ; ifp ; ifp = ifp->next) {
 		if (ifp->ip_address == NULL)
@@ -781,6 +791,8 @@
 		 */
 		strcpy (ifreq.ifr_name, ifp->name);
-		if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0)
-			rtems_panic ("Can't get %s flags: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0) {
+			printf ("Can't get %s flags: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -788,6 +800,8 @@
 		 */
 		ifreq.ifr_flags |= IFF_UP;
-		if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0)
-			rtems_panic ("Can't bring %s up: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0) {
+			printf ("Can't bring %s up: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -799,6 +813,8 @@
 		netmask.sin_addr.s_addr = inet_addr (ifp->ip_netmask);
 		memcpy (&ifreq.ifr_addr, &netmask, sizeof netmask);
-		if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0)
-			rtems_panic ("Can't set %s netmask: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0) {
+			printf ("Can't set %s netmask: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -810,6 +826,8 @@
 		address.sin_addr.s_addr = inet_addr (ifp->ip_address);
 		memcpy (&ifreq.ifr_addr, &address, sizeof address);
-		if (ioctl (s, SIOCSIFADDR, &ifreq) < 0)
-			rtems_panic ("Can't set %s address: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFADDR, &ifreq) < 0) {
+			printf ("Can't set %s address: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -845,7 +863,10 @@
 				(struct sockaddr *)&gateway,
 				(struct sockaddr *)&netmask,
-				(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0)
-			rtems_panic ("Can't set default route: %s", strerror (errno));
-	}
+				(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0) {
+			printf ("Can't set default route: %s\n", strerror (errno));
+			return -1;
+		}
+	}
+	return 0;
 }
 
@@ -862,5 +883,6 @@
 	 * Initialize BSD network data structures.
 	 */
-	rtems_bsdnet_initialize ();
+	if (rtems_bsdnet_initialize () < 0)
+		return -1;
 
 	/*
@@ -876,5 +898,6 @@
 	 * Bring up the network
 	 */
-	rtems_bsdnet_setup ();
+	if (rtems_bsdnet_setup () < 0)
+		return -1;
 	if (rtems_bsdnet_config.bootp)
 		(*rtems_bsdnet_config.bootp)();
@@ -893,5 +916,5 @@
 
 	if (cp == NULL) {
-		printf ("No network driver name");
+		printf ("No network driver name.\n");
 		return -1;
 	}
@@ -907,5 +930,5 @@
 					char *unitName = malloc (len);
 					if (unitName == NULL) {
-						printf ("No memory");
+						printf ("No memory.\n");
 						return -1;
 					}
@@ -921,5 +944,5 @@
 		}
 	}
-	printf ("Bad network driver name `%s'", config->name);
+	printf ("Bad network driver name `%s'.\n", config->name);
 	return -1;
 }
Index: c/src/libnetworking/rtems/rtems_glue.c
===================================================================
--- c/src/libnetworking/rtems/rtems_glue.c	(revision c941a980ccbd8def1d925fc5c69a22f40e1e5060)
+++ c/src/libnetworking/rtems/rtems_glue.c	(revision 4a9b8973040d4d77ad2caff4781042a231b70c27)
@@ -124,6 +124,6 @@
  * Do the initializations required by the BSD code
  */
-static void
-bsd_init ()
+static int
+bsd_init (void)
 {
 	int i;
@@ -135,6 +135,8 @@
 	p = malloc ((nmbclusters*MCLBYTES)+MCLBYTES-1);
 	p = (char *)(((unsigned long)p + (MCLBYTES-1)) & ~(MCLBYTES-1));
-	if (p == NULL)
-		rtems_panic ("Can't get network cluster memory.");
+	if (p == NULL) {
+		printf ("Can't get network cluster memory.\n");
+		return -1;
+	}
 	mbutl = (struct mbuf *)p;
 	for (i = 0; i < nmbclusters; i++) {
@@ -146,6 +148,8 @@
 	mbstat.m_clusters = nmbclusters;
 	mclrefcnt = malloc (nmbclusters);
-	if (mclrefcnt == NULL)
-		rtems_panic ("Can't get mbuf cluster reference counts memory.");
+	if (mclrefcnt == NULL) {
+		printf ("Can't get mbuf cluster reference counts memory.\n");
+		return -1;
+	}
 	memset (mclrefcnt, '\0', nmbclusters);
 
@@ -156,6 +160,8 @@
 	p = malloc(nmbuf * MSIZE + MSIZE - 1);
 	p = (char *)(((unsigned int)p + MSIZE - 1) & ~(MSIZE - 1));
-	if (p == NULL)
-		rtems_panic ("Can't get network memory.");
+	if (p == NULL) {
+		printf ("Can't get network memory.\n");
+		return -1;
+	}
 	for (i = 0; i < nmbuf; i++) {
 		((struct mbuf *)p)->m_next = mmbfree;
@@ -184,4 +190,5 @@
 	 */
 	ifinit (NULL);
+	return 0;
 }
 
@@ -189,5 +196,5 @@
  * Initialize and start network operations
  */
-static void
+static int
 rtems_bsdnet_initialize (void)
 {
@@ -222,6 +229,8 @@
 					0,
 					&networkSemaphore);
-	if (sc != RTEMS_SUCCESSFUL)
-		rtems_panic ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
+		return -1;
+	}
 
 	/*
@@ -241,5 +250,6 @@
 	 * Set up BSD-style sockets
 	 */
-	bsd_init ();
+	if (bsd_init () < 0)
+		return -1;
 
 	/*
@@ -252,7 +262,7 @@
 	 */
 	rtems_bsdnet_semaphore_release ();
-}
-
-rtems_id TaskWithSemaphore;
+	return 0;
+}
+
 /*
  * Obtain network mutex
@@ -264,5 +274,4 @@
 
 	sc = rtems_semaphore_obtain (networkSemaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-rtems_task_ident (RTEMS_SELF, 0, &TaskWithSemaphore);
 	if (sc != RTEMS_SUCCESSFUL)
 		rtems_panic ("Can't obtain network semaphore: `%s'\n", rtems_status_text (sc));
@@ -277,5 +286,4 @@
 	rtems_status_code sc;
 
-TaskWithSemaphore = 0;
 	sc = rtems_semaphore_release (networkSemaphore);
 	if (sc != RTEMS_SUCCESSFUL)
@@ -727,5 +735,5 @@
 }
 
-static void
+static int
 rtems_bsdnet_setup (void)
 {
@@ -771,6 +779,8 @@
 	 */
 	s = socket (AF_INET, SOCK_DGRAM, 0);
-	if (s < 0)
-		rtems_panic ("Can't create initial socket: %s", strerror (errno));
+	if (s < 0) {
+		printf ("Can't create initial socket: %s\n", strerror (errno));
+		return -1;
+	}
 	for (ifp = rtems_bsdnet_config.ifconfig ; ifp ; ifp = ifp->next) {
 		if (ifp->ip_address == NULL)
@@ -781,6 +791,8 @@
 		 */
 		strcpy (ifreq.ifr_name, ifp->name);
-		if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0)
-			rtems_panic ("Can't get %s flags: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0) {
+			printf ("Can't get %s flags: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -788,6 +800,8 @@
 		 */
 		ifreq.ifr_flags |= IFF_UP;
-		if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0)
-			rtems_panic ("Can't bring %s up: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0) {
+			printf ("Can't bring %s up: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -799,6 +813,8 @@
 		netmask.sin_addr.s_addr = inet_addr (ifp->ip_netmask);
 		memcpy (&ifreq.ifr_addr, &netmask, sizeof netmask);
-		if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0)
-			rtems_panic ("Can't set %s netmask: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0) {
+			printf ("Can't set %s netmask: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -810,6 +826,8 @@
 		address.sin_addr.s_addr = inet_addr (ifp->ip_address);
 		memcpy (&ifreq.ifr_addr, &address, sizeof address);
-		if (ioctl (s, SIOCSIFADDR, &ifreq) < 0)
-			rtems_panic ("Can't set %s address: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFADDR, &ifreq) < 0) {
+			printf ("Can't set %s address: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -845,7 +863,10 @@
 				(struct sockaddr *)&gateway,
 				(struct sockaddr *)&netmask,
-				(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0)
-			rtems_panic ("Can't set default route: %s", strerror (errno));
-	}
+				(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0) {
+			printf ("Can't set default route: %s\n", strerror (errno));
+			return -1;
+		}
+	}
+	return 0;
 }
 
@@ -862,5 +883,6 @@
 	 * Initialize BSD network data structures.
 	 */
-	rtems_bsdnet_initialize ();
+	if (rtems_bsdnet_initialize () < 0)
+		return -1;
 
 	/*
@@ -876,5 +898,6 @@
 	 * Bring up the network
 	 */
-	rtems_bsdnet_setup ();
+	if (rtems_bsdnet_setup () < 0)
+		return -1;
 	if (rtems_bsdnet_config.bootp)
 		(*rtems_bsdnet_config.bootp)();
@@ -893,5 +916,5 @@
 
 	if (cp == NULL) {
-		printf ("No network driver name");
+		printf ("No network driver name.\n");
 		return -1;
 	}
@@ -907,5 +930,5 @@
 					char *unitName = malloc (len);
 					if (unitName == NULL) {
-						printf ("No memory");
+						printf ("No memory.\n");
 						return -1;
 					}
@@ -921,5 +944,5 @@
 		}
 	}
-	printf ("Bad network driver name `%s'", config->name);
+	printf ("Bad network driver name `%s'.\n", config->name);
 	return -1;
 }
Index: cpukit/libnetworking/rtems/rtems_glue.c
===================================================================
--- cpukit/libnetworking/rtems/rtems_glue.c	(revision c941a980ccbd8def1d925fc5c69a22f40e1e5060)
+++ cpukit/libnetworking/rtems/rtems_glue.c	(revision 4a9b8973040d4d77ad2caff4781042a231b70c27)
@@ -124,6 +124,6 @@
  * Do the initializations required by the BSD code
  */
-static void
-bsd_init ()
+static int
+bsd_init (void)
 {
 	int i;
@@ -135,6 +135,8 @@
 	p = malloc ((nmbclusters*MCLBYTES)+MCLBYTES-1);
 	p = (char *)(((unsigned long)p + (MCLBYTES-1)) & ~(MCLBYTES-1));
-	if (p == NULL)
-		rtems_panic ("Can't get network cluster memory.");
+	if (p == NULL) {
+		printf ("Can't get network cluster memory.\n");
+		return -1;
+	}
 	mbutl = (struct mbuf *)p;
 	for (i = 0; i < nmbclusters; i++) {
@@ -146,6 +148,8 @@
 	mbstat.m_clusters = nmbclusters;
 	mclrefcnt = malloc (nmbclusters);
-	if (mclrefcnt == NULL)
-		rtems_panic ("Can't get mbuf cluster reference counts memory.");
+	if (mclrefcnt == NULL) {
+		printf ("Can't get mbuf cluster reference counts memory.\n");
+		return -1;
+	}
 	memset (mclrefcnt, '\0', nmbclusters);
 
@@ -156,6 +160,8 @@
 	p = malloc(nmbuf * MSIZE + MSIZE - 1);
 	p = (char *)(((unsigned int)p + MSIZE - 1) & ~(MSIZE - 1));
-	if (p == NULL)
-		rtems_panic ("Can't get network memory.");
+	if (p == NULL) {
+		printf ("Can't get network memory.\n");
+		return -1;
+	}
 	for (i = 0; i < nmbuf; i++) {
 		((struct mbuf *)p)->m_next = mmbfree;
@@ -184,4 +190,5 @@
 	 */
 	ifinit (NULL);
+	return 0;
 }
 
@@ -189,5 +196,5 @@
  * Initialize and start network operations
  */
-static void
+static int
 rtems_bsdnet_initialize (void)
 {
@@ -222,6 +229,8 @@
 					0,
 					&networkSemaphore);
-	if (sc != RTEMS_SUCCESSFUL)
-		rtems_panic ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't create network seamphore: `%s'\n", rtems_status_text (sc));
+		return -1;
+	}
 
 	/*
@@ -241,5 +250,6 @@
 	 * Set up BSD-style sockets
 	 */
-	bsd_init ();
+	if (bsd_init () < 0)
+		return -1;
 
 	/*
@@ -252,7 +262,7 @@
 	 */
 	rtems_bsdnet_semaphore_release ();
-}
-
-rtems_id TaskWithSemaphore;
+	return 0;
+}
+
 /*
  * Obtain network mutex
@@ -264,5 +274,4 @@
 
 	sc = rtems_semaphore_obtain (networkSemaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
-rtems_task_ident (RTEMS_SELF, 0, &TaskWithSemaphore);
 	if (sc != RTEMS_SUCCESSFUL)
 		rtems_panic ("Can't obtain network semaphore: `%s'\n", rtems_status_text (sc));
@@ -277,5 +286,4 @@
 	rtems_status_code sc;
 
-TaskWithSemaphore = 0;
 	sc = rtems_semaphore_release (networkSemaphore);
 	if (sc != RTEMS_SUCCESSFUL)
@@ -727,5 +735,5 @@
 }
 
-static void
+static int
 rtems_bsdnet_setup (void)
 {
@@ -771,6 +779,8 @@
 	 */
 	s = socket (AF_INET, SOCK_DGRAM, 0);
-	if (s < 0)
-		rtems_panic ("Can't create initial socket: %s", strerror (errno));
+	if (s < 0) {
+		printf ("Can't create initial socket: %s\n", strerror (errno));
+		return -1;
+	}
 	for (ifp = rtems_bsdnet_config.ifconfig ; ifp ; ifp = ifp->next) {
 		if (ifp->ip_address == NULL)
@@ -781,6 +791,8 @@
 		 */
 		strcpy (ifreq.ifr_name, ifp->name);
-		if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0)
-			rtems_panic ("Can't get %s flags: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCGIFFLAGS, &ifreq) < 0) {
+			printf ("Can't get %s flags: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -788,6 +800,8 @@
 		 */
 		ifreq.ifr_flags |= IFF_UP;
-		if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0)
-			rtems_panic ("Can't bring %s up: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFFLAGS, &ifreq) < 0) {
+			printf ("Can't bring %s up: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -799,6 +813,8 @@
 		netmask.sin_addr.s_addr = inet_addr (ifp->ip_netmask);
 		memcpy (&ifreq.ifr_addr, &netmask, sizeof netmask);
-		if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0)
-			rtems_panic ("Can't set %s netmask: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFNETMASK, &ifreq) < 0) {
+			printf ("Can't set %s netmask: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -810,6 +826,8 @@
 		address.sin_addr.s_addr = inet_addr (ifp->ip_address);
 		memcpy (&ifreq.ifr_addr, &address, sizeof address);
-		if (ioctl (s, SIOCSIFADDR, &ifreq) < 0)
-			rtems_panic ("Can't set %s address: %s", ifp->name, strerror (errno));
+		if (ioctl (s, SIOCSIFADDR, &ifreq) < 0) {
+			printf ("Can't set %s address: %s\n", ifp->name, strerror (errno));
+			return -1;
+		}
 
 		/*
@@ -845,7 +863,10 @@
 				(struct sockaddr *)&gateway,
 				(struct sockaddr *)&netmask,
-				(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0)
-			rtems_panic ("Can't set default route: %s", strerror (errno));
-	}
+				(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL) < 0) {
+			printf ("Can't set default route: %s\n", strerror (errno));
+			return -1;
+		}
+	}
+	return 0;
 }
 
@@ -862,5 +883,6 @@
 	 * Initialize BSD network data structures.
 	 */
-	rtems_bsdnet_initialize ();
+	if (rtems_bsdnet_initialize () < 0)
+		return -1;
 
 	/*
@@ -876,5 +898,6 @@
 	 * Bring up the network
 	 */
-	rtems_bsdnet_setup ();
+	if (rtems_bsdnet_setup () < 0)
+		return -1;
 	if (rtems_bsdnet_config.bootp)
 		(*rtems_bsdnet_config.bootp)();
@@ -893,5 +916,5 @@
 
 	if (cp == NULL) {
-		printf ("No network driver name");
+		printf ("No network driver name.\n");
 		return -1;
 	}
@@ -907,5 +930,5 @@
 					char *unitName = malloc (len);
 					if (unitName == NULL) {
-						printf ("No memory");
+						printf ("No memory.\n");
 						return -1;
 					}
@@ -921,5 +944,5 @@
 		}
 	}
-	printf ("Bad network driver name `%s'", config->name);
+	printf ("Bad network driver name `%s'.\n", config->name);
 	return -1;
 }
