svn commit: trunk/uClibc/ldso/ldso

carmelo at uclibc.org carmelo at uclibc.org
Mon Sep 29 11:56:04 UTC 2008


Author: carmelo
Date: 2008-09-29 04:56:03 -0700 (Mon, 29 Sep 2008)
New Revision: 23551

Log:
ldso: do not use hard-coded fd in _dl_dprintf. Use dl_debug_file consinstently.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>


Modified:
   trunk/uClibc/ldso/ldso/ldso.c


Changeset:
Modified: trunk/uClibc/ldso/ldso/ldso.c
===================================================================
--- trunk/uClibc/ldso/ldso/ldso.c	2008-09-29 11:36:48 UTC (rev 23550)
+++ trunk/uClibc/ldso/ldso/ldso.c	2008-09-29 11:56:03 UTC (rev 23551)
@@ -462,7 +462,7 @@
 					else
 #endif
 					{
-						_dl_dprintf(2, "%s: can't load " "library '%s'\n", _dl_progname, str);
+						_dl_dprintf(_dl_debug_file, "%s: can't load " "library '%s'\n", _dl_progname, str);
 						_dl_exit(15);
 					}
 				} else {
@@ -505,7 +505,7 @@
 		}
 
 		if ((fd = _dl_open(LDSO_PRELOAD, O_RDONLY, 0)) < 0) {
-			_dl_dprintf(2, "%s: can't open file '%s'\n",
+			_dl_dprintf(_dl_debug_file, "%s: can't open file '%s'\n",
 				    _dl_progname, LDSO_PRELOAD);
 			break;
 		}
@@ -514,7 +514,7 @@
 					     PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
 		_dl_close(fd);
 		if (preload == (caddr_t) -1) {
-			_dl_dprintf(2, "%s:%i: can't map '%s'\n",
+			_dl_dprintf(_dl_debug_file, "%s:%i: can't map '%s'\n",
 				    _dl_progname, __LINE__, LDSO_PRELOAD);
 			break;
 		}
@@ -553,7 +553,7 @@
 				else
 #endif
 				{
-					_dl_dprintf(2, "%s: can't load library '%s'\n", _dl_progname, cp2);
+					_dl_dprintf(_dl_debug_file, "%s: can't load library '%s'\n", _dl_progname, cp2);
 					_dl_exit(15);
 				}
 			} else {
@@ -606,7 +606,7 @@
 					} else
 #endif
 					{
-						_dl_dprintf(2, "%s: can't load library '%s'\n", _dl_progname, lpntstr);
+						_dl_dprintf(_dl_debug_file, "%s: can't load library '%s'\n", _dl_progname, lpntstr);
 						_dl_exit(16);
 					}
 				}
@@ -922,7 +922,7 @@
 		_dl_mmap_zero = _dl_malloc_addr = _dl_mmap((void *) 0, rounded_size,
 				PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 		if (_dl_mmap_check_error(_dl_mmap_zero)) {
-			_dl_dprintf(2, "%s: mmap of a spare page failed!\n", _dl_progname);
+			_dl_dprintf(_dl_debug_file, "%s: mmap of a spare page failed!\n", _dl_progname);
 			_dl_exit(20);
 		}
 	}




More information about the uClibc-cvs mailing list