cdio_follow_symlink -> cdio_realpath which is really POSIX realpath. (Suggestion via Thomas Schmitt.) gnu_linux.c: report errors when they occur.
This commit is contained in:
@@ -18,8 +18,8 @@ INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS) $(LIBISO9660_CFLAGS)
|
||||
freebsd_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
freebsd_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
|
||||
follow_symlink_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
follow_symlink_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
realpath_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
realpath_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
|
||||
gnu_linux_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
gnu_linux_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
@@ -36,7 +36,7 @@ solaris_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
win32_LDADD = $(LIBCDIO_LIBS) $(LTLIBICONV)
|
||||
win32_CFLAGS = -DTEST_DIR=\"$(srcdir)\"
|
||||
|
||||
check_PROGRAMS = follow_symlink freebsd gnu_linux mmc osx solaris win32
|
||||
check_PROGRAMS = freebsd gnu_linux mmc osx realpath solaris win32
|
||||
|
||||
TESTS = $(check_PROGRAMS)
|
||||
|
||||
|
||||
@@ -121,9 +121,9 @@ main(int argc, const char *argv[])
|
||||
if (0 == rc) {
|
||||
/* Just when you thought we'd forgotten, here is our first
|
||||
test! */
|
||||
cdio_follow_symlink(psz_symlink_file, psz_file_check);
|
||||
cdio_realpath(psz_symlink_file, psz_file_check);
|
||||
if (0 != strncmp(psz_file_check, psz_orig_file, PATH_MAX)) {
|
||||
fprintf(stderr, "simple cdio_follow_symlink failed. %s vs %s\n",
|
||||
fprintf(stderr, "simple cdio_realpath failed: %s vs %s\n",
|
||||
psz_file_check, psz_orig_file);
|
||||
exit(1);
|
||||
}
|
||||
@@ -134,9 +134,9 @@ main(int argc, const char *argv[])
|
||||
rc = check_rc(symlink(psz_symlink_file, psz_symlink_file),
|
||||
"symlink", psz_symlink_file);
|
||||
if (0 == rc) {
|
||||
cdio_follow_symlink(psz_symlink_file, psz_file_check);
|
||||
cdio_realpath(psz_symlink_file, psz_file_check);
|
||||
if (0 != strncmp(psz_file_check, psz_symlink_file, PATH_MAX)) {
|
||||
fprintf(stderr, "direct cdio_follow_symlink cycle test failed. %s vs %s\n",
|
||||
fprintf(stderr, "direct cdio_realpath cycle test failed. %s vs %s\n",
|
||||
psz_file_check, psz_orig_file);
|
||||
exit(2);
|
||||
}
|
||||
Reference in New Issue
Block a user