- 17 Aug, 2018 20 commits
-
-
Christian Brauner authored
cmd: Fix up checkpatch warnings
-
Christian Brauner authored
Clean up contributing and coding stlye docs
-
Tobin C. Harding authored
checkpatch emits two warnings of type: CHECK: Comparison to NULL could be written "!foo" Prefer `(!foo)` instead of `(foo == NULL)`. Do not use comparison to NULL, use !foo Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch emits warning: WARNING: Statements terminations use 1 semicolon Remove typo'd semicolon. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch emits warning: WARNING: Block comments use a trailing */ on a separate line Put trailing */ on a separate line. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch emits warning: WARNING: unnecessary whitespace before a quoted newline Remove unnecessary whitespace before a quoted newline Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch emits warning: WARNING: static char array declaration should probably be static const char Use 'const' for static string constant (array of chars). Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch warns about a bunch of whitespace issues. Fix the non-controversial ones. Fix whitespace issues found by checkpatch. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch emites warning: WARNING: braces {} are not necessary for single statement blocks Do not use braces for single statement block. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch warns because of function definitions using empty parameter list. We should define these functions with 'void' as the parameter. Use 'void' instead of empty parameter list for function definitions. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch emits error: ERROR: Macros with complex values should be enclosed in parentheses Safeguard macro by use of parenthesis. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Currently for section headings we use fourth level markdown heading level (####). We do not have levels two or three. We can use standard incremental levels for heading adornments i.e 1) ========= 2) ## 3) ### ect. Since this document is likely referenced by maintainers when guiding new contributors it can save maintainer time to be able to quickly reference a section in the coding stlye guide. If we add numbers to each heading (like the kernel stlye guide) then maintainers can say: Nice patch, please see section 3 of the coding style guide and ... So, this patch makes two changes - Use incremental level heading adornments - Add a number to each section heading Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Heading uses only 3 level header (###) but the rest of the file uses four (####). We should be uniform. Use uniform heading level in line with the rest of the file. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
We explicitly state that LXC uses coding style based on Linux kernel style. It is redundant to then document obvious, and well known, kernel style rules. Identifier names certainly fall into this category as does usage of braces. Remove sections implied by 'kernel style'. Naming conventions and brace placement conventions. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Current explanation of rules around usage of 'extern' are overly verbose. It is not necessary to state that functions should be declared in header files, the compiler already enforces this. These rules are simple, they are better described with simple statements. An example is not necessary for such simple rules and serves only to make the document longer. Use two simple statements describing the rules that govern function declaration and the usage of the 'extern' keyword. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Fix minor grammatical issue. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Currently the coding style guide does not mention that we use kernel coding style as a base style for LXC. We have just linked to CODING_STLYE.md from CONTRIBUTING (which mentions use of kernel coding style). We can increase documentation congruence and completeness by mentioning kernel coding style guide in the introduction to our style guide. Add heading and introduction to coding style guide informing readers that we follow kernel coding style as a base before explaining our style additions. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Currently the 'Coding Style' section mentions only the kernel coding style. We have additions on top on this outlined in CODING_STYLE.md. We should direct readers to this document as well as the kernel docs. Direct readers to CODING_STLYE.md in the 'Coding Style' section. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Currently we link to a URL for v4.10 of the kernel docs. Since we already mention the kernel tree we should link to the _latest_ kernel docs online instead of a fixed past version. Link to latest online kernel docs tracking the mainline instead of past fixed version. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Kernel coding style guide filename is stale, this file has been renamed in the kernel tree. While this file still exists we should use the new filename. Update reference to kernel coding style guide to use the new file name. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
- 16 Aug, 2018 14 commits
-
-
Stéphane Graber authored
log: add logging tools for commands; lxc-usernsexec: cleanup and bugfixes
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Add a thread-safe and uniform way to retrieve errno values in programs that are shipped as part of LXC but are not expected to have access to the logging system. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Add a thread-safe and uniform way to retrieve errno values in programs that are shipped as part of LXC but are not expected to have access to the logging system. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Checkpatch
-
Christian Brauner authored
usernsexec: Make err out vebose for unshare error
-
Tobin C. Harding authored
checkpatch.pl emits error ERROR: do not use assignment in if condition Move assignment out of if statement. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch.pl emits a bunch of warnings about various whitespace issues. Fix all these as a single patch since they are all whitespace only changes. Fix whitespace issues found by checkpatch.pl Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch.pl emits error ERROR: do not initialise statics to 0 Do not initialise statics to 0. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
checkpatch.pl emits error ERROR: do not use assignment in if condition Correctly indent switch statement. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Tobin C. Harding authored
Currently if lxc-usernsexec is run on a kernel without user namespaces enabled the error message is unshare: Invalid argument read pipe: Success This error message 'Invalid argument' does not point at the root cause of the error. We can help the user out by giving a more detailed error message and also not using perror() if errno==0. Improve error message by - Printing unshare flags - Printing suggested cause of failure (user namespace not enabled) - Print error message with fprintf() if errno==0 (EOF) Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Christian Brauner authored
doc: Fix minor grammatical errors
-
Tobin C. Harding authored
Current we have a few minor grammatical errors in the documentation for lxc container configuration. Fix minor grammatical errors. Signed-off-by:Tobin C. Harding <me@tobin.cc>
-
Stéphane Graber authored
state: s/sleep()/nanosleep()/
-
- 15 Aug, 2018 4 commits
-
-
Christian Brauner authored
sleep() is not thread-safe but nanosleep() is. Since no resources are allocated in lxc_wait() it is safe to call nanosleep() without cancellation handlers. Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Stéphane Graber authored
lxccontainer: minor fixes
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Stéphane Graber authored
lxccontainer: improve file locking
-
- 14 Aug, 2018 2 commits
-
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-
Christian Brauner authored
Signed-off-by:Christian Brauner <christian.brauner@ubuntu.com>
-