Johannes Hirte wrote:
Am Freitag 25 September 2009 00:06:40 schrieb Edward Shishkin:
Hi Edward,
I was pointed to a problem with this patch.
+static u64 scan_grub_devices(struct btrfs_device *dev,
+ int (*discerner)(struct btrfs_device **, int),
+ int lookup)
+{
...
+#ifdef SUPPORT_NETBOOT
+ errnum = ERR_NONE;
+ if (network_ready &&
+ !get_diskinfo(NETWORK_DRIVE, &geom)) {
+ dev->drive = NETWORK_DRIVE;
+ dev->part = 0;
+ dev->length = geom.total_sectors;
+ if (discerner(&dev, lookup)) {
+ count++;
+ if (lookup)
+ goto exit;
+ }
+ }
+#endif /* SUPPORT_NETBOOT */
+ exit:
+ return count;
+}
This won't compile since network_ready is undeclared.
Yup, indeed..
Why is the btrfs code
dealing with network devices at all?
Why not? :)
Well, would you please disable it for now with the attached patch?
Thanks,
Edward.
Disable booting from network devices.
Signed-off-by: Edward Shishkin <edward@xxxxxxxxxx>
---
stage2/fsys_btrfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- grub-0.97.orig/stage2/fsys_btrfs.c
+++ grub-0.97/stage2/fsys_btrfs.c
@@ -452,7 +452,7 @@ static u64 scan_grub_devices(struct btrf
goto exit;
}
}
-#ifdef SUPPORT_NETBOOT
+#if 0
errnum = ERR_NONE;
if (network_ready &&
!get_diskinfo(NETWORK_DRIVE, &geom)) {
@@ -465,7 +465,7 @@ static u64 scan_grub_devices(struct btrf
goto exit;
}
}
-#endif /* SUPPORT_NETBOOT */
+#endif /* 0 */
exit:
return count;
}