Fix many mistakes & inconsistencies in header file layout

This introduces a syntax-check script that validates header files use a
common layout:

  /*
   ...copyright header...
   */
  <one blank line>
  #ifndef SYMBOL
  # define SYMBOL
  ....content....
  #endif /* SYMBOL */

For any file ending priv.h, before the #ifndef, we will require a
guard to prevent bogus imports:

  #ifndef SYMBOL_ALLOW
  # error ....
  #endif /* SYMBOL_ALLOW */
  <one blank line>

The many mistakes this script identifies are then fixed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé
2018-12-13 13:32:06 +00:00
parent 76ddd01ecd
commit 4cfd709021
146 changed files with 496 additions and 169 deletions

View File

@@ -27,6 +27,7 @@
#include "internal.h"
#include "testutils.h"
#define __VIR_STORAGE_BACKEND_SHEEPDOG_PRIV_ALLOW_H__
#include "storage/storage_backend_sheepdog_priv.h"
#include "virstring.h"