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