Module Name: src Committed By: christos Date: Wed Oct 19 01:30:35 UTC 2016
Modified Files: src/lib/libperfuse: perfuse.c perfuse_if.h Log Message: make the env stuff visible. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/lib/libperfuse/perfuse.c cvs rdiff -u -r1.21 -r1.22 src/lib/libperfuse/perfuse_if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libperfuse/perfuse.c diff -u src/lib/libperfuse/perfuse.c:1.39 src/lib/libperfuse/perfuse.c:1.40 --- src/lib/libperfuse/perfuse.c:1.39 Tue Oct 18 13:56:31 2016 +++ src/lib/libperfuse/perfuse.c Tue Oct 18 21:30:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: perfuse.c,v 1.39 2016/10/18 17:56:31 christos Exp $ */ +/* $NetBSD: perfuse.c,v 1.40 2016/10/19 01:30:35 christos Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -52,8 +52,6 @@ extern char **environ; static struct perfuse_state *init_state(void); static int get_fd(const char *); -static uint32_t bufvar_from_env(const char *, uint32_t); - static struct perfuse_state * init_state(void) @@ -148,8 +146,8 @@ get_fd(const char *data) } -static uint32_t -bufvar_from_env(const char *name, uint32_t defval) +uint32_t +perfuse_bufvar_from_env(const char *name, uint32_t defval) { char valstr[1024]; int e; @@ -204,7 +202,8 @@ perfuse_open(const char *path, int flags * Set a buffer lentgh large enough so that enough FUSE packets * will fit. */ - opt = bufvar_from_env("PERFUSE_BUFSIZE", (uint32_t)(16 * FUSE_BUFSIZE)); + opt = perfuse_bufvar_from_env("PERFUSE_BUFSIZE", + (uint32_t)(16 * FUSE_BUFSIZE)); optlen = sizeof(opt); if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &opt, optlen) != 0) DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt); @@ -235,7 +234,8 @@ perfuse_open(const char *path, int flags * Set a buffer lentgh large enough so that enough FUSE packets * will fit. */ - opt = bufvar_from_env("PERFUSE_BUFSIZE", (uint32_t)(16 * FUSE_BUFSIZE)); + opt = perfuse_bufvar_from_env("PERFUSE_BUFSIZE", + (uint32_t)(16 * FUSE_BUFSIZE)); optlen = sizeof(opt); if (setsockopt(sv[0], SOL_SOCKET, SO_SNDBUF, &opt, optlen) != 0) DWARN("%s: setsockopt SO_SNDBUF to %d failed", __func__, opt); Index: src/lib/libperfuse/perfuse_if.h diff -u src/lib/libperfuse/perfuse_if.h:1.21 src/lib/libperfuse/perfuse_if.h:1.22 --- src/lib/libperfuse/perfuse_if.h:1.21 Tue Oct 18 13:56:31 2016 +++ src/lib/libperfuse/perfuse_if.h Tue Oct 18 21:30:35 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: perfuse_if.h,v 1.21 2016/10/18 17:56:31 christos Exp $ */ +/* $NetBSD: perfuse_if.h,v 1.22 2016/10/19 01:30:35 christos Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -219,5 +219,6 @@ int perfuse_mainloop(struct puffs_usermo int perfuse_unmount(struct puffs_usermount *); void perfuse_trace_dump(struct puffs_usermount *, FILE *); void perfuse_fsreq(struct puffs_usermount *, perfuse_msg_t *); +uint32_t perfuse_bufvar_from_env(const char *, uint32_t); #endif /* _PERFUSE_IF_H */