Whamcloud - gitweb
LU-19098 hsm: don't print progname twice with lhsmtool
[fs/lustre-release.git] / lustre / obdclass / llog_swab.c
index 1c9d0be..a064ffe 100644 (file)
@@ -1,35 +1,15 @@
-/*
- * GPL HEADER START
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 only,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License version 2 for more details (a copy is included
- * in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
- * http://www.gnu.org/licenses/gpl-2.0.html
- *
- * GPL HEADER END
- */
+// SPDX-License-Identifier: GPL-2.0
+
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
  * Copyright (c) 2012, 2017, Intel Corporation.
  */
+
 /*
  * This file is part of Lustre, http://www.lustre.org/
  *
- * lustre/obdclass/llog_swab.c
- *
  * Swabbing of llog datatypes (from disk or over the wire).
  *
  * Author: jacob berkman  <jacob@clusterfs.com>
 
 #define DEBUG_SUBSYSTEM S_LOG
 
-
 #include <lustre_log.h>
 #include <lustre_update.h>
+#include <llog_swab.h>
+
+#ifdef HAVE_SERVER_SUPPORT
+#define SERVER_ONLY_EXPORT_SYMBOL(symbol)      EXPORT_SYMBOL(symbol)
+#define SERVER_ONLY
+#else
+#define SERVER_ONLY static
+#define SERVER_ONLY_EXPORT_SYMBOL(symbol)
+#endif
 
 static void print_llogd_body(struct llogd_body *d)
 {
@@ -123,7 +111,8 @@ void lustre_swab_lu_seq_range(struct lu_seq_range *range)
 }
 EXPORT_SYMBOL(lustre_swab_lu_seq_range);
 
-void lustre_swab_update_ops(struct update_ops *uops, unsigned int op_count)
+SERVER_ONLY void lustre_swab_update_ops(struct update_ops *uops,
+                                       unsigned int op_count)
 {
        unsigned int i;
        unsigned int j;
@@ -136,7 +125,7 @@ void lustre_swab_update_ops(struct update_ops *uops, unsigned int op_count)
                        __swab16s(&uops->uops_op[i].uop_params_off[j]);
        }
 }
-EXPORT_SYMBOL(lustre_swab_update_ops);
+SERVER_ONLY_EXPORT_SYMBOL(lustre_swab_update_ops);
 
 void lustre_swab_llog_rec(struct llog_rec_hdr *rec)
 {
@@ -241,7 +230,7 @@ void lustre_swab_llog_rec(struct llog_rec_hdr *rec)
                __swab64s(&arr->arr_hai.hai_gid);
                /*
                 * no swabing for opaque data
-                * hai_data[0];
+                * hai_data[];
                 */
                break;
        }