diff options
author | Neil Brown <neilb@suse.de> | 2006-05-19 06:56:06 +0000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2006-05-19 06:56:06 +0000 |
commit | 05697ec1e26eadc2f814d9f84f8c783fff5b98b5 (patch) | |
tree | fed33270814c73af6757e0959f46e3ffafba7905 /SHA1.c | |
parent | 997aed5deeabc74eefcf37a0f042ac8707dfe227 (diff) | |
download | mdadm-05697ec1e26eadc2f814d9f84f8c783fff5b98b5.tar.gz mdadm-05697ec1e26eadc2f814d9f84f8c783fff5b98b5.tar.xz mdadm-05697ec1e26eadc2f814d9f84f8c783fff5b98b5.zip |
Make homehost information appear in superblock.
When an array is created, if the homehost is know,
the superblock gets it, either in the uuid, (via sha1)
or in the name field.
Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'SHA1.c')
-rw-r--r-- | SHA1.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ + +/* Simple wrapper for code in sha1.c, to + * provide SHA1() interface as provided by opensll. + * I do this because I cannot get SHA1 when staticly linking. + * + * sha1.c sha1.h md5.h all copied from coreutils-5.94 + */ + +#include "sha1.h" + +unsigned char *SHA1(unsigned char *buf, int len, unsigned char *dest) +{ + static unsigned char defdest[20]; + if (dest == NULL) dest = defdest; + + return (unsigned char *)sha1_buffer((const char*)buf, + len, + (void*)dest); +} |