[PATCH 6/6] improve functions for Modprobe overrides

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

 



---
 loader/driverdisk.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/loader/driverdisk.c b/loader/driverdisk.c
index d439b1c..ce3f8ac 100644
--- a/loader/driverdisk.c
+++ b/loader/driverdisk.c
@@ -64,7 +64,7 @@
 extern uint64_t flags;
 
 /* modprobe DD mode */
-int modprobeDDmode()
+int modprobeDDmode(void)
 {
     FILE *f = fopen("/etc/depmod.d/ddmode.conf", "w");
     if (f) {
@@ -78,9 +78,13 @@ int modprobeDDmode()
     return f==NULL;
 }
 
-int modprobeNormalmode()
+int modprobeNormalmode(void)
 {
-    unlink("/etc/depmod.d/ddmode.conf");
+    /* remove depmod overrides */
+    if (unlink("/etc/depmod.d/ddmode.conf")) {
+        logMessage(ERROR, "removing ddmode.conf failed");
+        return -1;
+    }
 
     /* run depmod to refresh modules db */
     if (system("depmod -a")) {
-- 
1.6.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux