2013-06-07 18:03:56 +00:00
|
|
|
From 62bded903da0a8a30155a757f0a89c3e39b7238c Mon Sep 17 00:00:00 2001
|
2013-05-02 20:54:52 +00:00
|
|
|
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
|
|
Date: Mon, 10 Dec 2012 11:12:38 +0100
|
2013-06-07 18:03:56 +00:00
|
|
|
Subject: [PATCH 060/471] * util/getroot.c
|
2013-05-02 20:54:52 +00:00
|
|
|
(convert_system_partition_to_system_disk): Support nbd disks.
|
|
|
|
|
|
|
|
---
|
|
|
|
ChangeLog | 5 +++++
|
|
|
|
util/getroot.c | 12 ++++++++++++
|
|
|
|
2 files changed, 17 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
|
|
index 0b1596a..547f739 100644
|
|
|
|
--- a/ChangeLog
|
|
|
|
+++ b/ChangeLog
|
|
|
|
@@ -1,5 +1,10 @@
|
|
|
|
2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
|
|
|
|
|
+ * util/getroot.c (convert_system_partition_to_system_disk): Support
|
|
|
|
+ nbd disks.
|
|
|
|
+
|
|
|
|
+2012-12-10 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
|
+
|
|
|
|
* grub-core/fs/ufs.c (grub_ufs_dir): Stop if direntlen is 0 to avoid
|
|
|
|
infinite loop on corrupted FS.
|
|
|
|
|
|
|
|
diff --git a/util/getroot.c b/util/getroot.c
|
|
|
|
index c2a25c9..24ce6aa 100644
|
|
|
|
--- a/util/getroot.c
|
|
|
|
+++ b/util/getroot.c
|
|
|
|
@@ -1796,6 +1796,18 @@ convert_system_partition_to_system_disk (const char *os_dev, struct stat *st,
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ if (strncmp ("nbd", p, 3) == 0
|
|
|
|
+ && p[3] >= '0' && p[3] <= '9')
|
|
|
|
+ {
|
|
|
|
+ char *ptr = p + 3;
|
|
|
|
+ while (*ptr >= '0' && *ptr <= '9')
|
|
|
|
+ ptr++;
|
|
|
|
+ if (*ptr)
|
|
|
|
+ *is_part = 1;
|
|
|
|
+ *ptr = 0;
|
|
|
|
+ return path;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
/* If this is an IDE, SCSI or Virtio disk. */
|
|
|
|
if (strncmp ("vdisk", p, 5) == 0
|
|
|
|
&& p[5] >= 'a' && p[5] <= 'z')
|
|
|
|
--
|
2013-06-07 18:03:56 +00:00
|
|
|
1.8.2.1
|
2013-05-02 20:54:52 +00:00
|
|
|
|