Files
s390-tools/CODINGSTYLE.md
Jens Remus 5ae3ec72b2 CODINGSTYLE: Add links to the Linux kernel coding style and checkpatch
Add link to the Linux kernel coding style on https://www.kernel.org/ and
convert link to the checkpatch tool into a proper Markdown link.

Signed-off-by: Jens Remus <jremus@linux.vnet.ibm.com>
Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2017-11-27 16:58:18 +01:00

2.6 KiB

Coding guidelines for s390-tools

For s390-tools the preferred language is C. We provide libraries, e.g. libutil that should be used by all tools if possible.

The coding style is based on the Linux kernel guidelines. Therefore, use the checkpatch tool for verification before you submit a patch.

Below we describe some additional things that we want you to consider when writing new code for s390-tools.

This package started in 2001 and has a long "tradition" - therefore, older tools might not follow all recommendations. Note that when changing existing code, consistency could have priority over applying rules.

Standard abbreviations

The abbreviations below are recommended to be used in the source code.

Short Name Long Name
attr Attribute
blk Block
buf Buffer
col Column
count Count
desc Description
dir Directory
fd File descriptor (open)
fp File pointer (fopen)
len Length
lib Library
mod Module
nr Number
parm Parameter
path File path
ptr Pointer
rc Return code
size Size
src Source
str String
sym Symbol