Re: softdep in .modinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I have updated depmod to generate modules.softdep.
http://github.com/andr345/module-init-tools/commits/modprobe-softdep/

Should modprobe always read modules.softdep or let the user choose
through some command line option?

For now, modprobe does nothing with it. Instead depmod places a
comment in the beginning, asking the user to link or copy the file to
/etc/modprobe.d if needed.

A pair of kernel patches (against 2.6.32-rc6) are also attached. When
you feel they're ready and you can sign off on them, I'll pass them on
to Rusty Russell.

Cheers,
Andreas
From 59e1fdd07207d0ecafbbc90e7ae4cc006b181c35 Mon Sep 17 00:00:00 2001
From: Andreas Robinson <andr345@xxxxxxxxx>
Date: Thu, 5 Nov 2009 14:01:44 +0100
Subject: [PATCH 1/2] modules: add support for soft module dependencies

Additional and optional dependencies not found while building the kernel and
modules, can now be declared explicitly.

Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>
---
 include/linux/module.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/module.h b/include/linux/module.h
index 482efc8..0a97fe2 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -98,6 +98,11 @@ extern struct module __this_module;
 /* For userspace: you can also call me... */
 #define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
 
+/* Soft module dependencies. See man modprobe.d for details.
+ * Example: MODULE_SOFTDEP("pre: module-foo post: module-bar")
+ */
+#define MODULE_SOFTDEP(_softdep) MODULE_INFO(softdep, _softdep)
+
 /*
  * The following license idents are currently accepted as indicating free
  * software modules
-- 
1.6.3.3

From 77e8d5ee18630d9a2faea59447f7382101681778 Mon Sep 17 00:00:00 2001
From: Andreas Robinson <andr345@xxxxxxxxx>
Date: Thu, 5 Nov 2009 16:28:43 +0100
Subject: [PATCH 2/2] libcrc32c: Add crc32c as soft dependency

Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>
---
 lib/libcrc32c.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c
index 244f548..2484a6c 100644
--- a/lib/libcrc32c.c
+++ b/lib/libcrc32c.c
@@ -79,3 +79,4 @@ module_exit(libcrc32c_mod_fini);
 MODULE_AUTHOR("Clay Haapala <chaapala@xxxxxxxxx>");
 MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations");
 MODULE_LICENSE("GPL");
+MODULE_SOFTDEP("pre: crc32c");
-- 
1.6.3.3


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux