Source-Changes-HG archive

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

[src/trunk]: src/lib/librefuse Revert my previous change to struct fuse_opt



details:   https://anonhg.NetBSD.org/src/rev/1d3007c2a6e5
branches:  trunk
changeset: 1026592:1d3007c2a6e5
user:      pho <pho%NetBSD.org@localhost>
date:      Wed Dec 01 14:17:50 2021 +0000

description:
Revert my previous change to struct fuse_opt

I should have thought twice before commiting it. Of course changing
the layout of a struct breaks ABI compatibility. Change the offset
back to fixed 32 bits.

diffstat:

 lib/librefuse/fuse_opt.h   |  8 ++++----
 lib/librefuse/refuse_opt.c |  4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r ebba60daa524 -r 1d3007c2a6e5 lib/librefuse/fuse_opt.h
--- a/lib/librefuse/fuse_opt.h  Wed Dec 01 13:51:33 2021 +0000
+++ b/lib/librefuse/fuse_opt.h  Wed Dec 01 14:17:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fuse_opt.h,v 1.8 2021/12/01 13:51:33 pho Exp $ */
+/*     $NetBSD: fuse_opt.h,v 1.9 2021/12/01 14:17:50 pho Exp $ */
 
 /*
  * Copyright (c) 2007 Alistair Crooks.  All rights reserved.
@@ -46,11 +46,11 @@
 
 struct fuse_opt {
        const char      *templ;
-       unsigned long   offset;
-       int             value;
+       int32_t         offset;
+       int32_t         value;
 };
 
-#define FUSE_OPT_KEY(templ, key) { templ, -1U, key }
+#define FUSE_OPT_KEY(templ, key) { templ, -1, key }
 #define FUSE_OPT_END { .templ = NULL }
 
 typedef int (*fuse_opt_proc_t)(void *, const char *, int, struct fuse_args *);
diff -r ebba60daa524 -r 1d3007c2a6e5 lib/librefuse/refuse_opt.c
--- a/lib/librefuse/refuse_opt.c        Wed Dec 01 13:51:33 2021 +0000
+++ b/lib/librefuse/refuse_opt.c        Wed Dec 01 14:17:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: refuse_opt.c,v 1.20 2021/12/01 13:51:33 pho Exp $      */
+/*     $NetBSD: refuse_opt.c,v 1.21 2021/12/01 14:17:50 pho Exp $      */
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -286,7 +286,7 @@
                const struct fuse_opt* opt, int sep_idx, void* data,
                fuse_opt_proc_t proc, bool is_opt)
 {
-       if (opt->offset == -1U) {
+       if (opt->offset == -1) {
                /* The option description does not want any variables to be
                 * updated.*/
                if (call_proc(proc, data, arg, opt->value, outargs, is_opt) == -1)



Home | Main Index | Thread Index | Old Index