Blame 0028-Fix-get_maj_min-to-follow-symlink.patch

Harald Hoyer 3957aa
From 426b68b20ada687327d464c3822c8e84e43e5672 Mon Sep 17 00:00:00 2001
Harald Hoyer 3957aa
From: Cong Wang <xiyou.wangcong@gmail.com>
Harald Hoyer 3957aa
Date: Tue, 20 Dec 2011 14:09:58 +0800
Harald Hoyer 3957aa
Subject: [PATCH] Fix get_maj_min() to follow symlink
Harald Hoyer 3957aa
Harald Hoyer 3957aa
Otherwise get_maj_min /dev/mapper/vg_cr0-lv_home will return 0:0.
Harald Hoyer 3957aa
Harald Hoyer 3957aa
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Harald Hoyer 3957aa
---
Harald Hoyer 3957aa
 dracut-functions |    2 +-
Harald Hoyer 3957aa
 1 files changed, 1 insertions(+), 1 deletions(-)
Harald Hoyer 3957aa
Harald Hoyer 3957aa
diff --git a/dracut-functions b/dracut-functions
Harald Hoyer 3957aa
index 2f9e713..a77a002 100755
Harald Hoyer 3957aa
--- a/dracut-functions
Harald Hoyer 3957aa
+++ b/dracut-functions
Harald Hoyer 3957aa
@@ -180,7 +180,7 @@ get_fs_uuid() (
Harald Hoyer 3957aa
 
Harald Hoyer 3957aa
 get_maj_min() {
Harald Hoyer 3957aa
     local _dev
Harald Hoyer 3957aa
-    _dev=$(stat -c '$((0x%T)):$((0x%t))' "$1" 2>/dev/null)
Harald Hoyer 3957aa
+    _dev=$(stat -L -c '$((0x%T)):$((0x%t))' "$1" 2>/dev/null)
Harald Hoyer 3957aa
     _dev=$(eval "echo $_dev")
Harald Hoyer 3957aa
     echo $_dev
Harald Hoyer 3957aa
 }