diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 06:03:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 06:03:02 +0000 |
commit | 4897093455a2bf08f3db3a1132cc2f6f5484d77c (patch) | |
tree | 9e6373544263f003139431fb4b08f9766e1ed530 /support/include/misc.h | |
parent | Initial commit. (diff) | |
download | nfs-utils-upstream.tar.xz nfs-utils-upstream.zip |
Adding upstream version 1:2.6.4.upstream/1%2.6.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | support/include/misc.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/support/include/misc.h b/support/include/misc.h new file mode 100644 index 0000000..2b0fef2 --- /dev/null +++ b/support/include/misc.h @@ -0,0 +1,31 @@ +/* + * misc.h All that didn't fit elsewhere. + * + * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de> + */ + +#ifndef MISC_H +#define MISC_H + +/* + * Generate random key, returning the length of the result. Currently, + * weakrandomkey generates a maximum of 20 bytes are generated, but this + * may change with future implementations. + */ +int randomkey(unsigned char *keyout, int len); +int weakrandomkey(unsigned char *keyout, int len); + +char *generic_make_pathname(const char *, const char *); +_Bool generic_setup_basedir(const char *, const char *, char *, const size_t); + +struct stat; + +extern int check_is_mountpoint(const char *path, + int (mystat)(const char *, struct stat *)); +#define is_mountpoint(path) \ + check_is_mountpoint(path, NULL) + +/* size of the file pointer buffers for rpc procfs files */ +#define RPC_CHAN_BUF_SIZE 32768 + +#endif /* MISC_H */ |