Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libperfuse make the env stuff visible.



details:   https://anonhg.NetBSD.org/src/rev/0d650cef8de6
branches:  trunk
changeset: 348451:0d650cef8de6
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 19 01:30:35 2016 +0000

description:
make the env stuff visible.

diffstat:

 lib/libperfuse/perfuse.c    |  14 +++++++-------
 lib/libperfuse/perfuse_if.h |   3 ++-
 2 files changed, 9 insertions(+), 8 deletions(-)

diffs (65 lines):

diff -r d04761c7f5df -r 0d650cef8de6 lib/libperfuse/perfuse.c
--- a/lib/libperfuse/perfuse.c  Wed Oct 19 01:13:01 2016 +0000
+++ b/lib/libperfuse/perfuse.c  Wed Oct 19 01:30:35 2016 +0000
@@ -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 @@
 
 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 @@
 
 }
 
-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 @@
         * 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 @@
         * 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);
diff -r d04761c7f5df -r 0d650cef8de6 lib/libperfuse/perfuse_if.h
--- a/lib/libperfuse/perfuse_if.h       Wed Oct 19 01:13:01 2016 +0000
+++ b/lib/libperfuse/perfuse_if.h       Wed Oct 19 01:30:35 2016 +0000
@@ -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_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 */



Home | Main Index | Thread Index | Old Index