Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-camogm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-camogm
Commits
b2b27ca4
Commit
b2b27ca4
authored
Mar 08, 2017
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix 'invalid blocks on device' error during disk formatting
parent
4d24f0a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
format_disk.py
src/format_disk/format_disk.py
+3
-3
No files found.
src/format_disk/format_disk.py
View file @
b2b27ca4
...
@@ -207,7 +207,7 @@ def partition_disk(dev_path, sys_size, disk_size, dry_run = True, force = False)
...
@@ -207,7 +207,7 @@ def partition_disk(dev_path, sys_size, disk_size, dry_run = True, force = False)
time
.
sleep
(
2
)
time
.
sleep
(
2
)
partition
=
dev_path
+
'1'
partition
=
dev_path
+
'1'
if
force
:
if
force
:
f_param
=
'-FF'
cmd_str
=
[
'mkfs.ext4'
,
'-FF'
,
partition
]
# if system partition contained a file system then it will be mounted right after partitioning
# if system partition contained a file system then it will be mounted right after partitioning
# check this situation and unmount partition
# check this situation and unmount partition
mounted
=
subprocess
.
check_output
([
'mount'
])
mounted
=
subprocess
.
check_output
([
'mount'
])
...
@@ -216,8 +216,8 @@ def partition_disk(dev_path, sys_size, disk_size, dry_run = True, force = False)
...
@@ -216,8 +216,8 @@ def partition_disk(dev_path, sys_size, disk_size, dry_run = True, force = False)
if
mount_point
:
if
mount_point
:
subprocess
.
check_output
([
'umount'
,
partition
])
subprocess
.
check_output
([
'umount'
,
partition
])
else
:
else
:
f_param
=
''
cmd_str
=
[
'mkfs.ext4'
,
partition
]
subprocess
.
check_output
(
[
'mkfs.ext4'
,
f_param
,
partition
]
,
stderr
=
subprocess
.
STDOUT
)
subprocess
.
check_output
(
cmd_str
,
stderr
=
subprocess
.
STDOUT
)
ret_str
=
""
ret_str
=
""
except
subprocess
.
CalledProcessError
as
e
:
except
subprocess
.
CalledProcessError
as
e
:
ret_str
=
e
.
output
ret_str
=
e
.
output
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment