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
7963a1f7
Commit
7963a1f7
authored
Feb 16, 2017
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error with 'mkfs' reporting wrong block device
parent
5e46288d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
format_disk.py
src/format_disk/format_disk.py
+3
-1
No files found.
src/format_disk/format_disk.py
View file @
7963a1f7
...
@@ -43,6 +43,7 @@ import sys
...
@@ -43,6 +43,7 @@ import sys
import
stat
import
stat
import
argparse
import
argparse
import
subprocess
import
subprocess
import
time
# use this % of total disk space for system partition
# use this % of total disk space for system partition
SYS_PARTITION_RATIO
=
5
SYS_PARTITION_RATIO
=
5
...
@@ -202,7 +203,8 @@ def partition_disk(dev_path, sys_size, disk_size, dry_run = True, force = False)
...
@@ -202,7 +203,8 @@ def partition_disk(dev_path, sys_size, disk_size, dry_run = True, force = False)
end
=
disk_size
end
=
disk_size
subprocess
.
check_output
([
'parted'
,
'-s'
,
dev_path
,
'unit'
,
'GB'
,
subprocess
.
check_output
([
'parted'
,
'-s'
,
dev_path
,
'unit'
,
'GB'
,
'mkpart'
,
'primary'
,
str
(
start
),
str
(
end
)],
stderr
=
subprocess
.
STDOUT
)
'mkpart'
,
'primary'
,
str
(
start
),
str
(
end
)],
stderr
=
subprocess
.
STDOUT
)
# make file system on first partition
# make file system on first partition; delay to let the changes propagate to the system
time
.
sleep
(
2
)
partition
=
dev_path
+
'1'
partition
=
dev_path
+
'1'
if
force
:
if
force
:
f_param
=
'-FF'
f_param
=
'-FF'
...
...
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