Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
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
Chen Yisong
lxc
Commits
6d276edc
Unverified
Commit
6d276edc
authored
May 11, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utils: fix parse_byte_size_string() coding style
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
39ebeb72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
lxc.container.conf.sgml.in
doc/lxc.container.conf.sgml.in
+4
-2
utils.c
src/lxc/utils.c
+3
-3
No files found.
doc/lxc.container.conf.sgml.in
View file @
6d276edc
...
@@ -828,7 +828,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -828,7 +828,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
be a power of 2 when converted to bytes. Valid size prefixes are
be a power of 2 when converted to bytes. Valid size prefixes are
'KB', 'MB', 'GB'. (Note that all conversions are based on multiples
'KB', 'MB', 'GB'. (Note that all conversions are based on multiples
of 1024. That means 'KB' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.
of 1024. That means 'KB' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.
And ignored case, for example 'kB', 'KB' and 'Kb' is same.)
Additionally, the case of the suffix is ignored, i.e. 'kB', 'KB' and
'Kb' are treated equally.)
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
@@ -853,7 +854,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -853,7 +854,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
be a power of 2 when converted to bytes. Valid size prefixes are
be a power of 2 when converted to bytes. Valid size prefixes are
'KB', 'MB', 'GB'. (Note that all conversions are based on multiples
'KB', 'MB', 'GB'. (Note that all conversions are based on multiples
of 1024. That means 'KB' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.
of 1024. That means 'KB' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.
And ignored case, for example 'kB', 'KB' and 'Kb' is same.)
Additionally, the case of the suffix is ignored, i.e. 'kB', 'KB' and
'Kb' are treated equally.)
If users want to mirror the console ringbuffer on disk they should set
If users want to mirror the console ringbuffer on disk they should set
<option>lxc.console.size</option> equal to
<option>lxc.console.size</option> equal to
...
...
src/lxc/utils.c
View file @
6d276edc
...
@@ -2450,11 +2450,11 @@ int parse_byte_size_string(const char *s, int64_t *converted)
...
@@ -2450,11 +2450,11 @@ int parse_byte_size_string(const char *s, int64_t *converted)
return
0
;
return
0
;
}
}
if
(
!
strcasecmp
(
suffix
,
"KB"
)
)
if
(
strcasecmp
(
suffix
,
"KB"
)
==
0
)
mltpl
=
1024
;
mltpl
=
1024
;
else
if
(
!
strcasecmp
(
suffix
,
"MB"
)
)
else
if
(
strcasecmp
(
suffix
,
"MB"
)
==
0
)
mltpl
=
1024
*
1024
;
mltpl
=
1024
*
1024
;
else
if
(
!
strcasecmp
(
suffix
,
"GB"
)
)
else
if
(
strcasecmp
(
suffix
,
"GB"
)
==
0
)
mltpl
=
1024
*
1024
*
1024
;
mltpl
=
1024
*
1024
*
1024
;
else
else
return
-
EINVAL
;
return
-
EINVAL
;
...
...
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