Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
4e4c9235
Commit
4e4c9235
authored
Jun 12, 2014
by
Jakub Kramarz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed sector size fact source from hw_sector_size to physical_block_size, fixes issue 5761
parent
aaa74352
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/ansible/module_utils/facts.py
+2
-2
No files found.
lib/ansible/module_utils/facts.py
View file @
4e4c9235
...
...
@@ -739,7 +739,7 @@ class LinuxHardware(Hardware):
part
[
'start'
]
=
get_file_content
(
part_sysdir
+
"/start"
,
0
)
part
[
'sectors'
]
=
get_file_content
(
part_sysdir
+
"/size"
,
0
)
part
[
'sectorsize'
]
=
get_file_content
(
part_sysdir
+
"/queue/
hw_sector
_size"
,
512
)
part
[
'sectorsize'
]
=
get_file_content
(
part_sysdir
+
"/queue/
physical_block
_size"
,
512
)
part
[
'size'
]
=
module
.
pretty_bytes
((
float
(
part
[
'sectors'
])
*
float
(
part
[
'sectorsize'
])))
d
[
'partitions'
][
partname
]
=
part
...
...
@@ -754,7 +754,7 @@ class LinuxHardware(Hardware):
d
[
'sectors'
]
=
get_file_content
(
sysdir
+
"/size"
)
if
not
d
[
'sectors'
]:
d
[
'sectors'
]
=
0
d
[
'sectorsize'
]
=
get_file_content
(
sysdir
+
"/queue/
hw_sector
_size"
)
d
[
'sectorsize'
]
=
get_file_content
(
sysdir
+
"/queue/
physical_block
_size"
)
if
not
d
[
'sectorsize'
]:
d
[
'sectorsize'
]
=
512
d
[
'size'
]
=
module
.
pretty_bytes
(
float
(
d
[
'sectors'
])
*
float
(
d
[
'sectorsize'
]))
...
...
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