]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-fstest.c (cmd_cmp): Avoid comparing devices, pipes
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 3 May 2012 18:20:28 +0000 (20:20 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 3 May 2012 18:20:28 +0000 (20:20 +0200)
and so on.

ChangeLog
util/grub-fstest.c

index b6fe1935bf7843b39601046cb75a8d07064e3665..030df5fc5bcd8d1f5e8d1a267c5f7ed005b028cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * util/grub-fstest.c (cmd_cmp): Avoid comparing devices, pipes
+       and so on.
+
 2012-05-03  Matthew Garrett  <mjg@redhat.com>
 2012-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
 
index b36c165aad1dae99b1db9ce0c3d8b3ed8b9fe031..10fb61c30012a85e131e2aaf9fc162c5b89fa6a5 100644 (file)
@@ -284,7 +284,8 @@ cmd_cmp (char *src, char *dest)
          *ptr++ = '/';
          strcpy (ptr, entry->d_name);
 
-         if (lstat (dest, &st) == -1 || S_ISLNK (st.st_mode))
+         if (lstat (dest, &st) == -1 || (!S_ISREG (st.st_mode)
+                                         && !S_ISDIR (st.st_mode)))
            continue;
 
          cmd_cmp (srcnew, destnew);