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
ff51fd71
Commit
ff51fd71
authored
Oct 13, 2016
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not report sd[a-z] if there are sd[a-z][1-9]
parent
7b745b4b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
camogm_interface.php
src/camogmgui/camogm_interface.php
+15
-0
No files found.
src/camogmgui/camogm_interface.php
View file @
ff51fd71
...
@@ -678,6 +678,8 @@ function get_partitions()
...
@@ -678,6 +678,8 @@ function get_partitions()
function
get_mnt_dev
()
function
get_mnt_dev
()
{
{
$partitions
=
get_partitions
();
$partitions
=
get_partitions
();
$devices
=
array
();
$fs_types
=
array
();
foreach
(
$partitions
as
$partition
=>
$size
)
{
foreach
(
$partitions
as
$partition
=>
$size
)
{
$res
=
array
();
$res
=
array
();
$dev
=
"/dev/"
.
$partition
;
$dev
=
"/dev/"
.
$partition
;
...
@@ -708,6 +710,8 @@ function get_raw_dev()
...
@@ -708,6 +710,8 @@ function get_raw_dev()
// filter out partitions with file system
// filter out partitions with file system
$i
=
0
;
$i
=
0
;
$raw_devices
=
array
();
$raw_devices
=
array
();
print_r
(
$names
);
print_r
(
$devices
);
foreach
(
$names
as
$name
=>
$size
)
{
foreach
(
$names
as
$name
=>
$size
)
{
$found
=
false
;
$found
=
false
;
foreach
(
$devices
as
$device
)
{
foreach
(
$devices
as
$device
)
{
...
@@ -721,6 +725,17 @@ function get_raw_dev()
...
@@ -721,6 +725,17 @@ function get_raw_dev()
}
}
}
}
//special case
if
(
count
(
$raw_devices
)
>
1
)
{
foreach
(
$raw_devices
as
$k
=>
$v
){
if
(
preg_match
(
'/sd[a-z][0-9]/'
,
$k
)
==
0
)
{
unset
(
$raw_devices
[
$k
]);
}
}
}
print_r
(
$raw_devices
);
return
$raw_devices
;
return
$raw_devices
;
}
}
...
...
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