Re: [PATCH] Make sure DASD info is available (#729910)

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

 



There's already a function to do this. Take a look at iutil.notify_kernel and perhaps some of the usage of it.

----- Original Message -----
From: "Jesse Keating" <jkeating@xxxxxxxxxx>
To: anaconda-devel-list@xxxxxxxxxx
Cc: "Jesse Keating" <jkeating@xxxxxxxxxx>
Sent: Tuesday, April 24, 2012 5:57:32 PM
Subject: [PATCH] Make sure DASD info is available (#729910)

This is a bit heavy handed, but is safer than a kernel change at this
point.

Resolves: rhbz#729910
---
 storage/dasd.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/storage/dasd.py b/storage/dasd.py
index 2b95b19..3bec53e 100644
--- a/storage/dasd.py
+++ b/storage/dasd.py
@@ -78,6 +78,13 @@ class DASD:
             statusfile = "/sys/block/%s/device/status" % (device,)
             if not os.path.isfile(statusfile):
                 continue
+            else:
+                # This works around what I believe to be a kernel bug and
+                # forces udev to notice all the information about these
+                # devices (#729910)
+                f = open("/sys/block/%s/uevent" % (device,), 'w')
+                f.write("change")
+                f.close()
 
             f = open(statusfile, "r")
             status = f.read().strip()
-- 
1.7.7.6

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

_______________________________________________
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