public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Kefu Chai <k.chai@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH proxmox-fuse-rs] add explicit "C" ABI to all extern function declarations
Date: Mon, 22 Dec 2025 12:24:14 +0100	[thread overview]
Message-ID: <aujr56c6gp7knpqcnk3a2sqnpkrerqaw2szz4s7zatzc5amu4f@kj2i73ubmvf2> (raw)
In-Reply-To: <20251113021401.1587370-1-k.chai@proxmox.com>

applied, thanks

On Thu, Nov 13, 2025 at 10:13:01AM +0800, Kefu Chai wrote:
> This fixes deprecation warnings where extern function declarations
> did not explicitly specify the ABI. All extern fn types in the
> FUSE Operations struct now use `extern "C" fn` instead of `extern fn`.
> 
> The C ABI is required for FUSE callbacks that interface with the
> native libfuse library.
> 
> Signed-off-by: Kefu Chai <k.chai@proxmox.com>
> ---
>  src/sys.rs | 86 +++++++++++++++++++++++++++---------------------------
>  1 file changed, 43 insertions(+), 43 deletions(-)
> 
> diff --git a/src/sys.rs b/src/sys.rs
> index a08eece..17a01de 100644
> --- a/src/sys.rs
> +++ b/src/sys.rs
> @@ -113,49 +113,49 @@ default_to_none! {
>          // The order in which the functions are listed matters, as the offset in the
>          // struct defines what function the fuse driver uses.
>          // It should therefore not be altered!
> -        pub init:            Option<extern fn(userdata: MutPtr)>,
> -        pub destroy:         Option<extern fn(userdata: MutPtr)>,
> -        pub lookup:          Option<extern fn(req: Request, parent: u64, name: StrPtr)>,
> -        pub forget:          Option<extern fn(req: Request, inode: u64, nlookup: u64)>,
> -        pub getattr:         Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> -        pub setattr:         Option<extern fn(req: Request, inode: u64, attr: *const libc::stat, to_set: c_int, file_info: *const FuseFileInfo)>,
> -        pub readlink:        Option<extern fn(req: Request, inode: u64)>,
> -        pub mknod:           Option<extern fn(req: Request, parent: u64, name: StrPtr, mode: libc::mode_t, rdev: libc::dev_t)>,
> -        pub mkdir:           Option<extern fn(req: Request, parent: u64, name: StrPtr, mode: libc::mode_t)>,
> -        pub unlink:          Option<extern fn(req: Request, parent: u64, name: StrPtr)>,
> -        pub rmdir:           Option<extern fn(req: Request, parent: u64, name: StrPtr)>,
> -        pub symlink:         Option<extern fn(req: Request, link: StrPtr, parent: u64, name: StrPtr)>,
> -        pub rename:          Option<extern fn(req: Request, parent: u64, name: StrPtr, newparent: u64, newname: StrPtr, flags: c_int)>,
> -        pub link:            Option<extern fn(req: Request, inode: u64, newparent: u64, newname: StrPtr)>,
> -        pub open:            Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> -        pub read:            Option<extern fn(req: Request, inode: u64, size: size_t, offset: libc::off_t, file_info: *const FuseFileInfo)>,
> -        pub write:           Option<extern fn(req: Request, inode: u64, buffer: *const u8, size: size_t, offset: libc::off_t, file_info: *const FuseFileInfo)>,
> -        pub flush:           Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> -        pub release:         Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> -        pub fsync:           Option<extern fn(req: Request, inode: u64, datasync: c_int, file_info: *const FuseFileInfo)>,
> -        pub opendir:         Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> -        pub readdir:         Option<extern fn(req: Request, inode: u64, size: size_t, offset: off_t, file_info: *const FuseFileInfo)>,
> -        pub releasedir:      Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> -        pub fsyncdir:        Option<extern fn(req: Request, inode: u64, datasync: c_int, file_info: *const FuseFileInfo)>,
> -        pub statfs:          Option<extern fn(req: Request, inode: u64)>,
> -        pub setxattr:        Option<extern fn(req: Request, inode: u64, name: StrPtr, value: StrPtr, size: size_t, flags: c_int)>,
> -        pub getxattr:        Option<extern fn(req: Request, inode: u64, name: StrPtr, size: size_t)>,
> -        pub listxattr:       Option<extern fn(req: Request, inode: u64, size: size_t)>,
> -        pub removexattr:     Option<extern fn(req: Request, inode: u64, name: StrPtr)>,
> -        pub access:          Option<extern fn(req: Request, inode: u64, mask: i32)>,
> -        pub create:          Option<extern fn(req: Request, parent: u64, name: StrPtr, mode: libc::mode_t, file_info: *const FuseFileInfo)>,
> -        pub getlk:           Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo, lock: MutPtr)>,
> -        pub setlk:           Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo, lock: MutPtr, sleep: c_int)>,
> -        pub bmap:            Option<extern fn(req: Request, inode: u64, blocksize: size_t, idx: u64)>,
> -        pub ioctl:           Option<extern fn(req: Request, inode: u64, cmd: c_int, arg: MutPtr, file_info: *const FuseFileInfo, flags: c_int, in_buf: ConstPtr, in_bufsz: size_t, out_bufsz: size_t)>,
> -        pub poll:            Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo, pollhandle: MutPtr)>,
> -        pub write_buf:       Option<extern fn(req: Request, inode: u64, bufv: MutPtr, offset: libc::off_t, file_info: *const FuseFileInfo)>,
> -        pub retrieve_reply:  Option<extern fn(req: Request, cookie: ConstPtr, inode: u64, offset: libc::off_t, bufv: MutPtr)>,
> -        pub forget_multi:    Option<extern fn(req: Request, count: size_t, forgets: MutPtr)>,
> -        pub flock:           Option<extern fn(req: Request, inode: u64, file_info: *const FuseFileInfo, op: c_int)>,
> -        pub fallocate:       Option<extern fn(req: Request, inode: u64, mode: c_int, offset: libc::off_t, length: libc::off_t, file_info: *const FuseFileInfo)>,
> -        pub readdirplus:     Option<extern fn(req: Request, inode: u64, size: size_t, offset: off_t, file_info: *const FuseFileInfo)>,
> -        pub copy_file_range: Option<extern fn(req: Request, ino_in: u64, off_in: libc::off_t, fi_in: *const FuseFileInfo, ino_out: u64, off_out: libc::off_t, fi_out: *const FuseFileInfo, len: size_t, flags: c_int)>,
> +        pub init:            Option<extern "C" fn(userdata: MutPtr)>,
> +        pub destroy:         Option<extern "C" fn(userdata: MutPtr)>,
> +        pub lookup:          Option<extern "C" fn(req: Request, parent: u64, name: StrPtr)>,
> +        pub forget:          Option<extern "C" fn(req: Request, inode: u64, nlookup: u64)>,
> +        pub getattr:         Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> +        pub setattr:         Option<extern "C" fn(req: Request, inode: u64, attr: *const libc::stat, to_set: c_int, file_info: *const FuseFileInfo)>,
> +        pub readlink:        Option<extern "C" fn(req: Request, inode: u64)>,
> +        pub mknod:           Option<extern "C" fn(req: Request, parent: u64, name: StrPtr, mode: libc::mode_t, rdev: libc::dev_t)>,
> +        pub mkdir:           Option<extern "C" fn(req: Request, parent: u64, name: StrPtr, mode: libc::mode_t)>,
> +        pub unlink:          Option<extern "C" fn(req: Request, parent: u64, name: StrPtr)>,
> +        pub rmdir:           Option<extern "C" fn(req: Request, parent: u64, name: StrPtr)>,
> +        pub symlink:         Option<extern "C" fn(req: Request, link: StrPtr, parent: u64, name: StrPtr)>,
> +        pub rename:          Option<extern "C" fn(req: Request, parent: u64, name: StrPtr, newparent: u64, newname: StrPtr, flags: c_int)>,
> +        pub link:            Option<extern "C" fn(req: Request, inode: u64, newparent: u64, newname: StrPtr)>,
> +        pub open:            Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> +        pub read:            Option<extern "C" fn(req: Request, inode: u64, size: size_t, offset: libc::off_t, file_info: *const FuseFileInfo)>,
> +        pub write:           Option<extern "C" fn(req: Request, inode: u64, buffer: *const u8, size: size_t, offset: libc::off_t, file_info: *const FuseFileInfo)>,
> +        pub flush:           Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> +        pub release:         Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> +        pub fsync:           Option<extern "C" fn(req: Request, inode: u64, datasync: c_int, file_info: *const FuseFileInfo)>,
> +        pub opendir:         Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> +        pub readdir:         Option<extern "C" fn(req: Request, inode: u64, size: size_t, offset: off_t, file_info: *const FuseFileInfo)>,
> +        pub releasedir:      Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo)>,
> +        pub fsyncdir:        Option<extern "C" fn(req: Request, inode: u64, datasync: c_int, file_info: *const FuseFileInfo)>,
> +        pub statfs:          Option<extern "C" fn(req: Request, inode: u64)>,
> +        pub setxattr:        Option<extern "C" fn(req: Request, inode: u64, name: StrPtr, value: StrPtr, size: size_t, flags: c_int)>,
> +        pub getxattr:        Option<extern "C" fn(req: Request, inode: u64, name: StrPtr, size: size_t)>,
> +        pub listxattr:       Option<extern "C" fn(req: Request, inode: u64, size: size_t)>,
> +        pub removexattr:     Option<extern "C" fn(req: Request, inode: u64, name: StrPtr)>,
> +        pub access:          Option<extern "C" fn(req: Request, inode: u64, mask: i32)>,
> +        pub create:          Option<extern "C" fn(req: Request, parent: u64, name: StrPtr, mode: libc::mode_t, file_info: *const FuseFileInfo)>,
> +        pub getlk:           Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo, lock: MutPtr)>,
> +        pub setlk:           Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo, lock: MutPtr, sleep: c_int)>,
> +        pub bmap:            Option<extern "C" fn(req: Request, inode: u64, blocksize: size_t, idx: u64)>,
> +        pub ioctl:           Option<extern "C" fn(req: Request, inode: u64, cmd: c_int, arg: MutPtr, file_info: *const FuseFileInfo, flags: c_int, in_buf: ConstPtr, in_bufsz: size_t, out_bufsz: size_t)>,
> +        pub poll:            Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo, pollhandle: MutPtr)>,
> +        pub write_buf:       Option<extern "C" fn(req: Request, inode: u64, bufv: MutPtr, offset: libc::off_t, file_info: *const FuseFileInfo)>,
> +        pub retrieve_reply:  Option<extern "C" fn(req: Request, cookie: ConstPtr, inode: u64, offset: libc::off_t, bufv: MutPtr)>,
> +        pub forget_multi:    Option<extern "C" fn(req: Request, count: size_t, forgets: MutPtr)>,
> +        pub flock:           Option<extern "C" fn(req: Request, inode: u64, file_info: *const FuseFileInfo, op: c_int)>,
> +        pub fallocate:       Option<extern "C" fn(req: Request, inode: u64, mode: c_int, offset: libc::off_t, length: libc::off_t, file_info: *const FuseFileInfo)>,
> +        pub readdirplus:     Option<extern "C" fn(req: Request, inode: u64, size: size_t, offset: off_t, file_info: *const FuseFileInfo)>,
> +        pub copy_file_range: Option<extern "C" fn(req: Request, ino_in: u64, off_in: libc::off_t, fi_in: *const FuseFileInfo, ino_out: u64, off_out: libc::off_t, fi_out: *const FuseFileInfo, len: size_t, flags: c_int)>,
>      }
>  }
>  
> -- 
> 2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


      parent reply	other threads:[~2025-12-22 11:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-13  2:13 [pve-devel] " Kefu Chai
2025-12-15  6:52 ` Kefu Chai
2025-12-22 11:23   ` Wolfgang Bumiller
2025-12-22 11:24 ` Wolfgang Bumiller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aujr56c6gp7knpqcnk3a2sqnpkrerqaw2szz4s7zatzc5amu4f@kj2i73ubmvf2 \
    --to=w.bumiller@proxmox.com \
    --cc=k.chai@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal