Module Name: src
Committed By: pho
Date: Wed Dec 1 14:17:51 UTC 2021
Modified Files:
src/lib/librefuse: fuse_opt.h refuse_opt.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/lib/librefuse/fuse_opt.h
cvs rdiff -u -r1.20 -r1.21 src/lib/librefuse/refuse_opt.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librefuse/fuse_opt.h
diff -u src/lib/librefuse/fuse_opt.h:1.8 src/lib/librefuse/fuse_opt.h:1.9
--- src/lib/librefuse/fuse_opt.h:1.8 Wed Dec 1 13:51:33 2021
+++ src/lib/librefuse/fuse_opt.h Wed Dec 1 14:17:50 2021
@@ -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 @@ enum {
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 *);
Index: src/lib/librefuse/refuse_opt.c
diff -u src/lib/librefuse/refuse_opt.c:1.20 src/lib/librefuse/refuse_opt.c:1.21
--- src/lib/librefuse/refuse_opt.c:1.20 Wed Dec 1 13:51:33 2021
+++ src/lib/librefuse/refuse_opt.c Wed Dec 1 14:17:50 2021
@@ -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 @@ parse_matched_arg(const char* arg, struc
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)