mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-12-01 00:48:18 +00:00
f74b50e380
Signed-off-by: Peter Jones <pjones@redhat.com>
52 lines
1.4 KiB
Diff
52 lines
1.4 KiB
Diff
From 62bded903da0a8a30155a757f0a89c3e39b7238c Mon Sep 17 00:00:00 2001
|
|
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
Date: Mon, 10 Dec 2012 11:12:38 +0100
|
|
Subject: [PATCH 060/482] * util/getroot.c
|
|
(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')
|
|
--
|
|
1.8.2.1
|
|
|