diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2019-12-09 19:53:47 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-01-23 16:41:36 +0000 |
commit | 7387863d033e8028aa09a815736617a7c4490827 (patch) | |
tree | 82a8c5dc4298c99fb950bef908ccda357e5aa2a8 /tools/virtiofsd/fuse_log.h | |
parent | a3e23f325439a290c504d6bbc48c2e742149ecab (diff) |
virtiofsd: Format imported files to qemu style
Mostly using a set like:
indent -nut -i 4 -nlp -br -cs -ce --no-space-after-function-call-names file
clang-format -style=file -i -- file
clang-tidy -fix-errors -checks=readability-braces-around-statements file
clang-format -style=file -i -- file
With manual cleanups.
The .clang-format used is below.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed by: Aleksandar Markovic <amarkovic@wavecomp.com>
Language: Cpp
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false # although we like it, it creates churn
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: false # churn
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None # AlwaysBreakAfterDefinitionReturnType is taken into account
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterControlStatement: false
AfterEnum: false
AfterFunction: true
AfterStruct: false
AfterUnion: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: false
BreakStringLiterals: true
ColumnLimit: 80
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: [
'CPU_FOREACH',
'CPU_FOREACH_REVERSE',
'CPU_FOREACH_SAFE',
'IOMMU_NOTIFIER_FOREACH',
'QLIST_FOREACH',
'QLIST_FOREACH_ENTRY',
'QLIST_FOREACH_RCU',
'QLIST_FOREACH_SAFE',
'QLIST_FOREACH_SAFE_RCU',
'QSIMPLEQ_FOREACH',
'QSIMPLEQ_FOREACH_SAFE',
'QSLIST_FOREACH',
'QSLIST_FOREACH_SAFE',
'QTAILQ_FOREACH',
'QTAILQ_FOREACH_REVERSE',
'QTAILQ_FOREACH_SAFE',
'QTAILQ_RAW_FOREACH',
'RAMBLOCK_FOREACH'
]
IncludeCategories:
- Regex: '^"qemu/osdep.h'
Priority: -3
- Regex: '^"(block|chardev|crypto|disas|exec|fpu|hw|io|libdecnumber|migration|monitor|net|qapi|qemu|qom|standard-headers|sysemu|ui)/'
Priority: -2
- Regex: '^"(elf.h|qemu-common.h|glib-compat.h|qemu-io.h|trace-tcg.h)'
Priority: -1
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: '.*_BEGIN$' # only PREC_BEGIN ?
MacroBlockEnd: '.*_END$'
MaxEmptyLinesToKeep: 2
PointerAlignment: Right
ReflowComments: true
SortIncludes: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInContainerLiterals: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
UseTab: Never
...
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/fuse_log.h')
-rw-r--r-- | tools/virtiofsd/fuse_log.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/virtiofsd/fuse_log.h b/tools/virtiofsd/fuse_log.h index 0af700da6b..bf6c11ff11 100644 --- a/tools/virtiofsd/fuse_log.h +++ b/tools/virtiofsd/fuse_log.h @@ -1,10 +1,10 @@ /* - FUSE: Filesystem in Userspace - Copyright (C) 2019 Red Hat, Inc. - - This program can be distributed under the terms of the GNU LGPLv2. - See the file COPYING.LIB. -*/ + * FUSE: Filesystem in Userspace + * Copyright (C) 2019 Red Hat, Inc. + * + * This program can be distributed under the terms of the GNU LGPLv2. + * See the file COPYING.LIB. + */ #ifndef FUSE_LOG_H_ #define FUSE_LOG_H_ @@ -22,14 +22,14 @@ * These levels correspond to syslog(2) log levels since they are widely used. */ enum fuse_log_level { - FUSE_LOG_EMERG, - FUSE_LOG_ALERT, - FUSE_LOG_CRIT, - FUSE_LOG_ERR, - FUSE_LOG_WARNING, - FUSE_LOG_NOTICE, - FUSE_LOG_INFO, - FUSE_LOG_DEBUG + FUSE_LOG_EMERG, + FUSE_LOG_ALERT, + FUSE_LOG_CRIT, + FUSE_LOG_ERR, + FUSE_LOG_WARNING, + FUSE_LOG_NOTICE, + FUSE_LOG_INFO, + FUSE_LOG_DEBUG }; /** @@ -45,8 +45,8 @@ enum fuse_log_level { * @param fmt sprintf-style format string including newline * @param ap format string arguments */ -typedef void (*fuse_log_func_t)(enum fuse_log_level level, - const char *fmt, va_list ap); +typedef void (*fuse_log_func_t)(enum fuse_log_level level, const char *fmt, + va_list ap); /** * Install a custom log handler function. |