projects
/
vuplus_dvbapp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
91948ed
)
fix bug : hdd initialization.
author
kos
<kos@dev3>
Thu, 15 Dec 2011 09:13:08 +0000
(18:13 +0900)
committer
kos
<kos@dev3>
Thu, 15 Dec 2011 09:13:08 +0000
(18:13 +0900)
lib/python/Components/Harddisk.py
patch
|
blob
|
history
diff --git
a/lib/python/Components/Harddisk.py
b/lib/python/Components/Harddisk.py
index
b13639e
..
838e83f
100644
(file)
--- a/
lib/python/Components/Harddisk.py
+++ b/
lib/python/Components/Harddisk.py
@@
-203,9
+203,20
@@
class Harddisk:
res = system(cmd)
return (res >> 8)
res = system(cmd)
return (res >> 8)
+ def checkPartionPath(self, path):
+ import time, os
+ for i in range(1,10):
+ if os.path.exists(path):
+ return True
+ time.sleep(1)
+ return False
+
def createPartition(self):
cmd = 'printf "8,\n;0,0\n;0,0\n;0,0\ny\n" | sfdisk -f -uS ' + self.disk_path
res = system(cmd)
def createPartition(self):
cmd = 'printf "8,\n;0,0\n;0,0\n;0,0\ny\n" | sfdisk -f -uS ' + self.disk_path
res = system(cmd)
+ if not self.checkPartionPath(self.partitionPath("1")):
+ print "no exist : ", self.partitionPath("1")
+ return 1
return (res >> 8)
def mkfs(self):
return (res >> 8)
def mkfs(self):