mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-09 19:00:08 +00:00
Update.
* elf/ldconfig.c (parse_conf): Print full name of config dir including chroot() path. (main): Remove trailing / from opt_chroot string.
This commit is contained in:
parent
77586df3f9
commit
f0189a5443
@ -1,5 +1,9 @@
|
||||
2000-09-28 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/ldconfig.c (parse_conf): Print full name of config dir
|
||||
including chroot() path.
|
||||
(main): Remove trailing / from opt_chroot string.
|
||||
|
||||
* include/features.h: Correct description of what happens if no
|
||||
*_SOURCE macro is defined.
|
||||
|
||||
|
@ -734,7 +734,8 @@ parse_conf (const char *filename)
|
||||
|
||||
if (file == NULL)
|
||||
{
|
||||
error (0, errno, _("Can't open configuration file %s"), filename);
|
||||
error (0, errno, _("Can't open configuration file %s%s%s"),
|
||||
opt_chroot ?: "", opt_chroot ? "/" : "", filename);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -791,6 +792,12 @@ main (int argc, char **argv)
|
||||
/* Chroot first. */
|
||||
if (opt_chroot)
|
||||
{
|
||||
/* Normalize the path a bit, we might need it for printing later. */
|
||||
char *endp = strchr (opt_chroot, '\0');
|
||||
while (endp > opt_chroot + 1 && endp[-1] == '/')
|
||||
--endp;
|
||||
*endp = '\0';
|
||||
|
||||
if (chroot (opt_chroot))
|
||||
/* Report failure and exit program. */
|
||||
error (EXIT_FAILURE, errno, _("Can't chroot to %s"), opt_chroot);
|
||||
|
Loading…
Reference in New Issue
Block a user