Matthew Booth
2009-Jul-31 13:32 UTC
[Libguestfs] [PATCH] Update incorrect comment in Lib.pm
Related: change the name of the function the comment describes to be more
accurate.
---
perl/lib/Sys/Guestfs/Lib.pm | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index be17a30..bbc583f 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1342,7 +1342,7 @@ sub inspect_in_detail
_check_for_applications ($g, $os);
_check_for_kernels ($g, $os);
if ($os->{os} eq "linux") {
- _check_for_modprobe_aliases ($g, $os);
+ _find_modprobe_aliases ($g, $os);
_check_for_initrd ($g, $os);
}
}
@@ -1436,16 +1436,14 @@ sub _check_for_kernels
$os->{kernels} = \@kernels;
}
-# Check /etc/modprobe.conf to see if there are any specified
-# drivers associated with network (ethX) or hard drives. Normally
-# one might find something like:
-#
-# alias eth0 xennet
-# alias scsi_hostadapter xenblk
-#
-# XXX This doesn't look beyond /etc/modprobe.conf, eg. in /etc/modprobe.d/
+# Find all modprobe aliases. Specifically, this looks in the following
+# locations:
+# * /etc/conf.modules
+# * /etc/modules.conf
+# * /etc/modprobe.conf
+# * /etc/modprobe.d/*
-sub _check_for_modprobe_aliases
+sub _find_modprobe_aliases
{
local $_;
my $g = shift;
--
1.6.2.5
Richard W.M. Jones
2009-Jul-31 15:02 UTC
[Libguestfs] [PATCH] Update incorrect comment in Lib.pm
On Fri, Jul 31, 2009 at 02:32:11PM +0100, Matthew Booth wrote: [...] ACK, although I would have kept this in the comment because I think it nicely explains by illustration what the function does:> -# alias eth0 xennet > -# alias scsi_hostadapter xenblkRich. -- Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://et.redhat.com/~rjones/libguestfs/ See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html