From: Vladimir 'phcoder' Serbinenko Date: Thu, 3 May 2012 18:20:28 +0000 (+0200) Subject: * util/grub-fstest.c (cmd_cmp): Avoid comparing devices, pipes X-Git-Tag: 2.00~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=570060354901e8fe402e93688ab9742e73d5b044;p=thirdparty%2Fgrub.git * util/grub-fstest.c (cmd_cmp): Avoid comparing devices, pipes and so on. --- diff --git a/ChangeLog b/ChangeLog index b6fe1935b..030df5fc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-05-03 Vladimir Serbinenko + + * util/grub-fstest.c (cmd_cmp): Avoid comparing devices, pipes + and so on. + 2012-05-03 Matthew Garrett 2012-05-03 Vladimir Serbinenko diff --git a/util/grub-fstest.c b/util/grub-fstest.c index b36c165aa..10fb61c30 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -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);