git://git.onelab.eu
/
bootmanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
aeecdf5
)
filter out partitions from block devices by using device minor number,
author
Aaron Klingaman
<alk@cs.princeton.edu>
Mon, 23 Jan 2006 18:10:57 +0000
(18:10 +0000)
committer
Aaron Klingaman
<alk@cs.princeton.edu>
Mon, 23 Jan 2006 18:10:57 +0000
(18:10 +0000)
not partition name format
source/systeminfo.py
patch
|
blob
|
history
diff --git
a/source/systeminfo.py
b/source/systeminfo.py
index
8170ba2
..
4ade0f1
100755
(executable)
--- a/
source/systeminfo.py
+++ b/
source/systeminfo.py
@@
-222,12
+222,6
@@
class systeminfo:
device= parts[3]
- # if the last char in device is a number, its
- # a partition, and we ignore it
-
- if device[len(device)-1].isdigit():
- continue
-
dev_name= "/dev/%s" % device
try:
@@
-237,6
+231,10
@@
class systeminfo:
except ValueError, err:
continue
+ # skip and ignore any partitions
+ if minor != 0:
+ continue
+
gb_size= blocks/self.BLOCKS_PER_GB
# parse the output of hdparm <disk> to get the readonly flag;