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
5e46288d
Commit
5e46288d
authored
Jan 17, 2017
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show partitions in a list
parent
8a3d9375
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
format_disk.php
src/format_disk/format_disk.php
+3
-2
No files found.
src/format_disk/format_disk.php
View file @
5e46288d
...
...
@@ -59,13 +59,14 @@ function table_body($disks)
}
else
if
(
$ret_val
==
0
&&
$num
==
0
)
{
exec
(
$parted_script
.
" --partitions"
,
$output
,
$ret
);
if
(
$ret
==
0
)
{
$msg
=
"Disk is already partitioned: "
;
$msg
=
"Disk is already partitioned:
<ul>
"
;
foreach
(
$output
as
$line
)
{
$plist
=
explode
(
':'
,
$line
);
foreach
(
$plist
as
$p
)
{
$msg
=
$msg
.
$p
.
"
"
;
$msg
=
$msg
.
"<li>"
.
$p
.
"</li>
"
;
}
}
$msg
=
$msg
.
"</ul>"
;
$partition
=
substr
(
$plist
[
0
],
0
,
strpos
(
$plist
[
0
],
'('
)
-
1
);
$disk
=
substr
(
$partition
,
0
,
-
1
);
table_row
(
0
,
$disk
,
""
,
""
,
$msg
);
...
...
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