<commit_before>/******************************************************************************
*******************************************************************************
**
**  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
**  Copyright (C) 2004 Red Hat, Inc.  All rights reserved.
**
**  This copyrighted material is made available to anyone wishing to use,
**  modify, copy, or redistribute it subject to the terms and conditions
**  of the GNU General Public License v.2.
**
*******************************************************************************
******************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <limits.h>
#include <errno.h>
#include <linux/types.h>

#include "copyright.cf"

#include "gfs2_tool.h"
#include "libgfs2.h"

char *prog_name;
char *action = NULL;
int override = FALSE;
int expert = FALSE;
int debug = FALSE;
int continuous = FALSE;
int interval = 1;

static const char *usage[] = {
	"Clear a flag on a inode\n",
	"  gfs2_tool clearflag flag <filenames>\n",
	"\n",
	"Do a GFS2 specific \"df\":\n",
	"  gfs2_tool df <mountpoint>\n",
	"\n",
	"Freeze a GFS2 cluster:\n",
	"  gfs2_tool freeze <mountpoint>\n",
	"\n",
	"Print the current mount arguments of a mounted filesystem:\n",
	"  gfs2_tool getargs <mountpoint>\n",
	"\n",
	"Get tuneable parameters for a filesystem\n",
	"  gfs2_tool gettune <mountpoint>\n",
	"\n",
	"List the file system's journals:\n",
	"  gfs2_tool journals <mountpoint>\n",
	"\n",
	"List filesystems:\n",
	"  gfs2_tool list\n",
	"\n",
	"Have GFS2 dump its lock state:\n",
	"  gfs2_tool lockdump <mountpoint> [buffersize]\n",
	"\n",
	"Provide arguments for next mount:\n",
	"  gfs2_tool margs <mountarguments>\n",
	"\n",
	"Tune a GFS2 superblock\n",
	"  gfs2_tool sb <device> proto [newval]\n",
	"  gfs2_tool sb <device> table [newval]\n",
	"  gfs2_tool sb <device> ondisk [newval]\n",
	"  gfs2_tool sb <device> multihost [newval]\n",
	"  gfs2_tool sb <device> all\n",
	"\n",
	"Set a flag on a inode\n",
	"  gfs2_tool setflag flag <filenames>\n",
	"\n",
	"Tune a running filesystem\n",
	"  gfs2_tool settune <mountpoint> <parameter> <value>\n",
	"\n",
	"Shrink a filesystem's inode cache:\n",
	"  gfs2_tool shrink <mountpoint>\n",
	"\n",
	"Unfreeze a GFS2 cluster:\n",
	"  gfs2_tool unfreeze <mountpoint>\n",
	"\n",
	"Print tool version information\n",
	"  gfs2_tool version\n",
	"\n",
	"Withdraw this machine from participating in a filesystem:\n",
	"  gfs2_tool withdraw <mountpoint>\n",
#if GFS2_TOOL_FEATURE_IMPLEMENTED
	"\n",
	"Force files from a machine's cache\n",
	"  gfs2_tool flush <filenames>\n",
	"\n",
	"Print the superblock of a mounted filesystem:\n",
	"  gfs2_tool getsb <mountpoint>\n",
	"\n",
	"Print the journal index of a mounted filesystem:\n",
	"  gfs2_tool jindex <mountpoint>\n",
	"\n",
	"Print out the ondisk layout for a file:\n",
	"  gfs2_tool layout <filename> [buffersize]\n",
	"\n",
	"Print the quota file of a mounted filesystem:\n",
	"  gfs2_tool quota <mountpoint>\n",
	"\n",
	"Print the resource group index of a mounted filesystem:\n",
	"  gfs2_tool rindex <mountpoint>\n",
	"\n",
	"Print file stat data:\n",
	"  gfs2_tool stat <filename>\n",
	"\n",
#endif /* GFS2_TOOL_FEATURE_IMPLEMENTED */
	"",
};

/**
 * print_usage - print out usage information
 *
 */

void
print_usage(void)
{
	int x;

	for (x = 0; usage[x][0]; x++)
		printf(usage[x]);
}

/**
 * print_version -
 *
 */

static void
print_version(void)
{
	printf("gfs2_tool %s (built %s %s)\n",
	       RELEASE_VERSION,
	       __DATE__, __TIME__);
	printf("%s\n",
	       REDHAT_COPYRIGHT);<commit_msg>[GFS2] Fix build warning<commit_after>/******************************************************************************
*******************************************************************************
**
**  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
**  Copyright (C) 2004 Red Hat, Inc.  All rights reserved.
**
**  This copyrighted material is made available to anyone wishing to use,
**  modify, copy, or redistribute it subject to the terms and conditions
**  of the GNU General Public License v.2.
**
*******************************************************************************
******************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <limits.h>
#include <errno.h>
#include <linux/types.h>

#include "copyright.cf"

#include "gfs2_tool.h"
#include "libgfs2.h"

char *prog_name;
char *action = NULL;
int override = FALSE;
int expert = FALSE;
int debug = FALSE;
int continuous = FALSE;
int interval = 1;

static const char *usage[] = {
	"Clear a flag on a inode\n",
	"  gfs2_tool clearflag flag <filenames>\n",
	"\n",
	"Do a GFS2 specific \"df\":\n",
	"  gfs2_tool df <mountpoint>\n",
	"\n",
	"Freeze a GFS2 cluster:\n",
	"  gfs2_tool freeze <mountpoint>\n",
	"\n",
	"Print the current mount arguments of a mounted filesystem:\n",
	"  gfs2_tool getargs <mountpoint>\n",
	"\n",
	"Get tuneable parameters for a filesystem\n",
	"  gfs2_tool gettune <mountpoint>\n",
	"\n",
	"List the file system's journals:\n",
	"  gfs2_tool journals <mountpoint>\n",
	"\n",
	"List filesystems:\n",
	"  gfs2_tool list\n",
	"\n",
	"Have GFS2 dump its lock state:\n",
	"  gfs2_tool lockdump <mountpoint> [buffersize]\n",
	"\n",
	"Provide arguments for next mount:\n",
	"  gfs2_tool margs <mountarguments>\n",
	"\n",
	"Tune a GFS2 superblock\n",
	"  gfs2_tool sb <device> proto [newval]\n",
	"  gfs2_tool sb <device> table [newval]\n",
	"  gfs2_tool sb <device> ondisk [newval]\n",
	"  gfs2_tool sb <device> multihost [newval]\n",
	"  gfs2_tool sb <device> all\n",
	"\n",
	"Set a flag on a inode\n",
	"  gfs2_tool setflag flag <filenames>\n",
	"\n",
	"Tune a running filesystem\n",
	"  gfs2_tool settune <mountpoint> <parameter> <value>\n",
	"\n",
	"Shrink a filesystem's inode cache:\n",
	"  gfs2_tool shrink <mountpoint>\n",
	"\n",
	"Unfreeze a GFS2 cluster:\n",
	"  gfs2_tool unfreeze <mountpoint>\n",
	"\n",
	"Print tool version information\n",
	"  gfs2_tool version\n",
	"\n",
	"Withdraw this machine from participating in a filesystem:\n",
	"  gfs2_tool withdraw <mountpoint>\n",
#if GFS2_TOOL_FEATURE_IMPLEMENTED
	"\n",
	"Force files from a machine's cache\n",
	"  gfs2_tool flush <filenames>\n",
	"\n",
	"Print the superblock of a mounted filesystem:\n",
	"  gfs2_tool getsb <mountpoint>\n",
	"\n",
	"Print the journal index of a mounted filesystem:\n",
	"  gfs2_tool jindex <mountpoint>\n",
	"\n",
	"Print out the ondisk layout for a file:\n",
	"  gfs2_tool layout <filename> [buffersize]\n",
	"\n",
	"Print the quota file of a mounted filesystem:\n",
	"  gfs2_tool quota <mountpoint>\n",
	"\n",
	"Print the resource group index of a mounted filesystem:\n",
	"  gfs2_tool rindex <mountpoint>\n",
	"\n",
	"Print file stat data:\n",
	"  gfs2_tool stat <filename>\n",
	"\n",
#endif /* GFS2_TOOL_FEATURE_IMPLEMENTED */
	"",
};

/**
 * print_usage - print out usage information
 *
 */

void
print_usage(void)
{
	int x;

	for (x = 0; usage[x][0]; x++)
		printf("%s", usage[x]);
}

/**
 * print_version -
 *
 */

static void
print_version(void)
{
	printf("gfs2_tool %s (built %s %s)\n",
	       RELEASE_VERSION,
	       __DATE__, __TIME__);
	printf("%s\n",
	       REDHAT_COPYRIGHT);
{'fraction_non_alphanumeric': 0.2342177493138152, 'fraction_numerical': 0.013985099986929813, 'mean_word_length': 4.302841302841303, 'pattern_counts': {'":': 2, '<': 83, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '606379', 'n_tokens_mistral': 2894, 'n_tokens_neox': 2788, 'n_words': 777}