OpenZFS 6328 - Fix cstyle errors in zfs codebase

Authored by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>

OpenZFS-issue: https://www.illumos.org/issues/6328
OpenZFS-commit: https://github.com/illumos/illumos-gate/commit/9a686fb
Closes #5579
This commit is contained in:
George Melikov 2017-01-12 20:42:11 +03:00 committed by Brian Behlendorf
parent 42b64e50c0
commit e9aa730c49
16 changed files with 40 additions and 45 deletions

View File

@ -279,7 +279,8 @@ static boolean_t log_history = B_TRUE;
static uint_t timestamp_fmt = NODATE;
static const char *
get_usage(zpool_help_t idx) {
get_usage(zpool_help_t idx)
{
switch (idx) {
case HELP_ADD:
return (gettext("\tadd [-fgLnP] [-o property=value] "

View File

@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015 by Delphix. All rights reserved.
*/
#ifndef _SYS_ZRLOCK_H
@ -44,12 +45,8 @@ typedef struct zrlock {
extern void zrl_init(zrlock_t *);
extern void zrl_destroy(zrlock_t *);
#ifdef ZFS_DEBUG
#define zrl_add(_z) zrl_add_debug((_z), __func__)
extern void zrl_add_debug(zrlock_t *, const char *);
#else
extern void zrl_add(zrlock_t *);
#endif
#define zrl_add(_z) zrl_add_impl((_z), __func__)
extern void zrl_add_impl(zrlock_t *, const char *);
extern void zrl_remove(zrlock_t *);
extern int zrl_tryenter(zrlock_t *);
extern void zrl_exit(zrlock_t *);

View File

@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
@ -309,7 +309,8 @@ typedef struct {
} snapspec_arg_t;
static int
snapspec_cb(zfs_handle_t *zhp, void *arg) {
snapspec_cb(zfs_handle_t *zhp, void *arg)
{
snapspec_arg_t *ssa = arg;
char *shortsnapname;
int err = 0;

View File

@ -23,7 +23,7 @@
* Use is subject to license terms.
*/
/*
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>

View File

@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
*/
/*

View File

@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
*/
/*

View File

@ -277,7 +277,8 @@ feature_get_refcount_from_disk(spa_t *spa, zfeature_info_t *feature,
static int
feature_get_enabled_txg(spa_t *spa, zfeature_info_t *feature, uint64_t *res) {
feature_get_enabled_txg(spa_t *spa, zfeature_info_t *feature, uint64_t *res)
{
ASSERTV(uint64_t enabled_txg_obj = spa->spa_feat_enabled_txg_obj);
ASSERT(zfeature_depends_on(feature->fi_feature,
@ -500,7 +501,8 @@ spa_feature_is_active(spa_t *spa, spa_feature_t fid)
* Returns B_FALSE otherwise (i.e. if the feature is not enabled).
*/
boolean_t
spa_feature_enabled_txg(spa_t *spa, spa_feature_t fid, uint64_t *txg) {
spa_feature_enabled_txg(spa_t *spa, spa_feature_t fid, uint64_t *txg)
{
int err;
ASSERT(VALID_FEATURE_FID(fid));

View File

@ -122,7 +122,8 @@ zfeature_lookup_name(const char *name, spa_feature_t *res)
}
boolean_t
zfeature_depends_on(spa_feature_t fid, spa_feature_t check) {
zfeature_depends_on(spa_feature_t fid, spa_feature_t check)
{
zfeature_info_t *feature = &spa_feature_table[fid];
int i;

View File

@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
*/

View File

@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015 by Delphix. All rights reserved.
*/

View File

@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 Cyril Plisko. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
*/
#include <sys/types.h>

View File

@ -70,11 +70,7 @@ zrl_destroy(zrlock_t *zrl)
}
void
#ifdef ZFS_DEBUG
zrl_add_debug(zrlock_t *zrl, const char *zc)
#else
zrl_add(zrlock_t *zrl)
#endif
zrl_add_impl(zrlock_t *zrl, const char *zc)
{
uint32_t n = (uint32_t)zrl->zr_refcount;
@ -199,11 +195,7 @@ zrl_owner(zrlock_t *zrl)
#if defined(_KERNEL) && defined(HAVE_SPL)
#ifdef ZFS_DEBUG
EXPORT_SYMBOL(zrl_add_debug);
#else
EXPORT_SYMBOL(zrl_add);
#endif
EXPORT_SYMBOL(zrl_add_impl);
EXPORT_SYMBOL(zrl_remove);
#endif