helper: Print /modules when verbose >= 2
[febootstrap.git] / helper / ext2initrd.c
index 13e429c..dedc1e8 100644 (file)
@@ -1,5 +1,5 @@
 /* febootstrap-supermin-helper reimplementation in C.
- * Copyright (C) 2009-2010 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -52,20 +52,21 @@ extern char _binary_init_start, _binary_init_end, _binary_init_size;
  * ext2 filesystem on it.
  */
 static const char *kmods[] = {
-  "ext2.ko",
-  "virtio*.ko",
-  "ide*.ko",
-  "libata*.ko",
-  "piix*.ko",
-  "scsi_transport_spi.ko",
-  "scsi_mod.ko",
-  "sd_mod.ko",
-  "sym53c8xx.ko",
-  "ata_piix.ko",
-  "sr_mod.ko",
-  "mbcache.ko",
-  "crc*.ko",
-  "libcrc*.ko",
+  "ext2.ko*",
+  "ext4.ko*", /* CONFIG_EXT4_USE_FOR_EXT23=y option might be set */
+  "virtio*.ko*",
+  "ide*.ko*",
+  "libata*.ko*",
+  "piix*.ko*",
+  "scsi_transport_spi.ko*",
+  "scsi_mod.ko*",
+  "sd_mod.ko*",
+  "sym53c8xx.ko*",
+  "ata_piix.ko*",
+  "sr_mod.ko*",
+  "mbcache.ko*",
+  "crc*.ko*",
+  "libcrc*.ko*",
   NULL
 };
 
@@ -175,7 +176,7 @@ read_module_deps (const char *modpath)
   char *filename = xasprintf ("%s/modules.dep", modpath);
   FILE *fp = fopen (filename, "r");
   if (fp == NULL)
-    error (EXIT_FAILURE, errno, "open: %s", modpath);
+    error (EXIT_FAILURE, errno, "open: %s/modules.dep", modpath);
 
   char *line = NULL;
   size_t llen = 0;
@@ -267,4 +268,7 @@ print_module_load_order (FILE *pipe, FILE *list, struct module *m)
   fputs (basename, list);
   fputc ('\n', list);
   m->visited = 1;
+
+  if (verbose >= 2)
+    fprintf (stderr, "print_module_load_order: %s %s\n", m->name, basename);
 }