From 56bb5dd51856d6984afc3b4438098cfe97072369 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Thu, 3 May 2012 22:59:16 +0200 Subject: [PATCH] * util/getroot.c (convert_system_partition_to_system_disk); Add etherd names. Reported by: Bastian Blank. --- ChangeLog | 6 ++++++ util/getroot.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index c379e47fe..0c0270188 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-05-03 Vladimir Serbinenko + + * util/getroot.c (convert_system_partition_to_system_disk); Add etherd + names. + Reported by: Bastian Blank. + 2012-05-03 Vladimir Serbinenko * grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Fix offset when diff --git a/util/getroot.c b/util/getroot.c index 3955f0037..4a7e57648 100644 --- a/util/getroot.c +++ b/util/getroot.c @@ -1740,6 +1740,20 @@ convert_system_partition_to_system_disk (const char *os_dev, struct stat *st, return path; } + /* If this is an AOE disk. */ + if (strncmp ("etherd/e", p, sizeof ("etherd/e") - 1) == 0) + { + /* /dev/etherd/e[0-9]+\.[0-9]+(p[0-9]+)? */ + p = strchr (p, 'p'); + if (p) + { + *is_part = 1; + *p = '\0'; + } + + return path; + } + /* If this is a Compaq Intelligent Drive Array. */ if (strncmp ("ida/c", p, sizeof ("ida/c") - 1) == 0) {