(validate_file_name): Give a more descriptive
authorJim Meyering <jim@meyering.net>
Mon, 18 Oct 2004 08:19:26 +0000 (08:19 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 18 Oct 2004 08:19:26 +0000 (08:19 +0000)
diagnostic when pathconf fails.  This also avoids an unwarranted
warning from gcc-3.3.5 about a format not being a string literal.

src/pathchk.c

index 3d6cc56289de45b694f4a1af46d2ddeaa1f5df29..f9c2d2cc3d8754f115e33a2773270ec888842635 100644 (file)
@@ -240,7 +240,9 @@ validate_file_name (char *file, bool portability)
          size = pathconf (dir, _PC_PATH_MAX);
          if (size < 0 && errno != 0)
            {
-             error (0, errno, dir);
+             error (0, errno,
+                    _("%s: unable to determine maximum file name length"),
+                    dir);
              return false;
            }
          maxsize = MIN (size, SIZE_MAX);