mirror of
https://github.com/nilfs-dev/nilfs-utils.git
synced 2026-01-26 13:43:15 +00:00
treewide: embed git revision into binaries
Apply the NILFS_UTILS_GITID() macro to all major executables and libraries to enable git revision tracking. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
This commit is contained in:
parent
90fd5171f8
commit
dc7e116ddf
@ -76,6 +76,8 @@ static const struct option long_option[] = {
|
||||
#endif /* _GNU_SOURCE */
|
||||
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct nilfs *nilfs;
|
||||
|
||||
@ -70,6 +70,8 @@ static const struct option long_option[] = {
|
||||
#define DUMPSEG_BASE 10
|
||||
#define DUMPSEG_BUFSIZE 128
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static void dumpseg_print_psegment_error(const struct nilfs_psegment *pseg,
|
||||
const char *errstr)
|
||||
{
|
||||
|
||||
@ -98,6 +98,8 @@ static struct nilfs_cpinfo cpinfos[LSCP_NCPINFO];
|
||||
static int show_block_count = 1;
|
||||
static int show_all;
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static void lscp_print_header(void)
|
||||
{
|
||||
printf(" CNO DATE TIME MODE FLG %s ICNT\n",
|
||||
|
||||
@ -120,6 +120,8 @@ static uint64_t param_lines;
|
||||
static size_t blocks_per_segment;
|
||||
static struct nilfs_suinfo suinfos[LSSU_NSEGS];
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static void lssu_print_header(void)
|
||||
{
|
||||
puts(lssu_format[disp_mode].header);
|
||||
|
||||
@ -69,6 +69,8 @@ static const struct option long_option[] = {
|
||||
#endif /* _GNU_SOURCE */
|
||||
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
struct nilfs *nilfs;
|
||||
|
||||
@ -87,6 +87,8 @@ static const struct option long_options[] = {
|
||||
static int force;
|
||||
static int interactive;
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static int rmcp_confirm(const char *arg)
|
||||
{
|
||||
char ans[MAX_INPUT];
|
||||
|
||||
2
lib/gc.c
2
lib/gc.c
@ -47,6 +47,8 @@
|
||||
#define NILFS_GC_NCPINFO 512
|
||||
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static void default_logger(int priority, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
@ -122,6 +122,8 @@ enum {
|
||||
#define LINE_MAX 2048
|
||||
#endif /* LINE_MAX */
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static int nilfs_find_fs(struct nilfs *nilfs, const char *dev, const char *dir,
|
||||
const char *opt)
|
||||
{
|
||||
|
||||
@ -218,6 +218,8 @@ static const char *nilfs_cleaner_cmd_name[] = {
|
||||
"stop", "shutdown"
|
||||
};
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static void nilfs_cleanerd_version(void)
|
||||
{
|
||||
printf("%s (%s %s)\n", getprogname(), PACKAGE, PACKAGE_VERSION);
|
||||
|
||||
@ -84,6 +84,8 @@
|
||||
|
||||
static const char badblocks[] = BADBLOCKSDIR "/" BADBLOCKS_NAME;
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
/* Options */
|
||||
static int quiet;
|
||||
static int cflag;
|
||||
|
||||
@ -87,6 +87,7 @@
|
||||
#include "mount_attrs.h"
|
||||
#include "cleaner_exec.h"
|
||||
#include "nls.h"
|
||||
#include "util.h" /* NILFS_UTILS_GITID() */
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#include <getopt.h>
|
||||
@ -101,6 +102,8 @@ static char *mount_fstype;
|
||||
/* global variables */
|
||||
static const char fstype[] = NILFS2_FS_NAME;
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
/* mount info */
|
||||
struct nilfs_mount_info {
|
||||
struct libmnt_context *cxt;
|
||||
|
||||
@ -75,6 +75,7 @@
|
||||
#include "mount_attrs.h"
|
||||
#include "cleaner_exec.h"
|
||||
#include "nls.h"
|
||||
#include "util.h" /* NILFS_UTILS_GITID() */
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#include <getopt.h>
|
||||
@ -89,6 +90,8 @@ static int suid; /* reserved for non-root user mount/umount
|
||||
/* global variables */
|
||||
static const char fstype[] = NILFS2_FS_NAME;
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
/* umount info */
|
||||
struct nilfs_umount_info {
|
||||
struct libmnt_context *cxt;
|
||||
|
||||
@ -150,7 +150,8 @@ static unsigned char min_reclaimable_blocks_unit = NILFS_CLEANER_ARG_UNIT_NONE;
|
||||
static sigjmp_buf nilfs_clean_env;
|
||||
static struct nilfs_cleaner *nilfs_cleaner;
|
||||
|
||||
/* cleaner parameter */
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static void nilfs_clean_logger(int priority, const char *fmt, ...)
|
||||
{
|
||||
|
||||
@ -141,6 +141,8 @@ static int pm_in_progress; /* 0: off, 1: on, -1: interrupted */
|
||||
static const char *pm_label;
|
||||
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
/**
|
||||
* nilfs_resize_logger - logger function to pass to libraries used
|
||||
* @priority: log level
|
||||
|
||||
@ -71,6 +71,7 @@
|
||||
#include "nilfs.h"
|
||||
#include "nilfs_feature.h"
|
||||
#include "check_mount.h"
|
||||
#include "util.h" /* NILFS_UTILS_GITID() */
|
||||
|
||||
|
||||
struct nilfs_tune_options {
|
||||
@ -85,6 +86,8 @@ struct nilfs_tune_options {
|
||||
char *fs_features;
|
||||
};
|
||||
|
||||
NILFS_UTILS_GITID();
|
||||
|
||||
static void nilfs_tune_usage(FILE *stream)
|
||||
{
|
||||
fprintf(stream,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user