]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - io/init.c
xfsprogs: make static things static
[thirdparty/xfsprogs-dev.git] / io / init.c
index 0336c9623beb205927c06f8ff3b7aac8afe15d0f..b5eade3901af4509e5fb44a8c545dba830faa028 100644 (file)
--- a/io/init.c
+++ b/io/init.c
@@ -1,19 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2003-2005 Silicon Graphics, Inc.
  * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would 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 for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 #include <pthread.h>
 char   *progname;
 int    exitcode;
 int    expert;
-int    idlethread;
+static int     idlethread;
 size_t pagesize;
 struct timeval stopwatch;
 
-void
+static void
 usage(void)
 {
        fprintf(stderr,
@@ -72,6 +60,7 @@ init_commands(void)
        help_init();
        imap_init();
        inject_init();
+       label_init();
        log_writes_init();
        madvise_init();
        mincore_init();
@@ -84,6 +73,7 @@ init_commands(void)
        quit_init();
        readdir_init();
        reflink_init();
+       repair_init();
        resblks_init();
        scrub_init();
        seek_init();
@@ -134,7 +124,7 @@ init_check_command(
        return 1;
 }
 
-void
+static void
 init(
        int             argc,
        char            **argv)
@@ -154,7 +144,7 @@ init(
        gettimeofday(&stopwatch, NULL);
 
        fs_table_initialise(0, NULL, 0, NULL);
-       while ((c = getopt(argc, argv, "ac:C:dFfim:p:nrRstTVx")) != EOF) {
+       while ((c = getopt(argc, argv, "ac:C:dFfiLm:p:PnrRstTVx")) != EOF) {
                switch (c) {
                case 'a':
                        flags |= IO_APPEND;
@@ -200,6 +190,12 @@ init(
                case 't':
                        flags |= IO_TRUNC;
                        break;
+               case 'P':
+                       flags |= IO_PATH;
+                       break;
+               case 'L':
+                       flags |= IO_NOFOLLOW;
+                       break;
                case 'R':
                        flags |= IO_REALTIME;
                        break;
@@ -239,15 +235,16 @@ init(
  * are not reference counted. Spawning an idle thread can help detecting file
  * struct reference leaks.
  */
-void *
+static void *
 idle_loop(void *arg)
 {
        for (;;)
                pause();
+       return NULL;
 }
 
-void
-start_idle_thread()
+static void
+start_idle_thread(void)
 {
        pthread_t t;