]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - db/hash.c
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
15 static int hash_f(int argc
, char **argv
);
16 static void hash_help(void);
18 static const cmdinfo_t hash_cmd
=
19 { "hash", NULL
, hash_f
, 1, 1, 0, N_("string"),
20 N_("calculate hash value"), hash_help
};
27 " 'hash' prints out the calculated hash value for a string using the\n"
28 "directory/attribute code hash function.\n"
30 " Usage: \"hash <string>\"\n"
44 hashval
= libxfs_da_hashname((unsigned char *)argv
[1], (int)strlen(argv
[1]));
45 dbprintf("0x%x\n", hashval
);
52 add_command(&hash_cmd
);