From 570060354901e8fe402e93688ab9742e73d5b044 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 3 May 2012 20:20:28 +0200 Subject: [PATCH] * util/grub-fstest.c (cmd_cmp): Avoid comparing devices, pipes and so on. --- ChangeLog | 5 +++++ util/grub-fstest.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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);