Coder Social home page Coder Social logo

Update open flags from u32 to i32 about fuser HOT 6 CLOSED

cberner avatar cberner commented on September 26, 2024
Update open flags from u32 to i32

from fuser.

Comments (6)

cberner avatar cberner commented on September 26, 2024

Can you provide a reference to the C & Rust interfaces you're referring to for i32? I looked up the definition in the kernel source code, which I believe is definitive, and it's declared uint32_t: https://elixir.bootlin.com/linux/v5.10-rc1/source/include/uapi/linux/fuse.h#L593

from fuser.

siscia avatar siscia commented on September 26, 2024

Aw, that is from where the u32 comes from maybe.

The standard open call use standard int: https://man7.org/linux/man-pages/man2/open.2.html
Similarly Rust: https://doc.rust-lang.org/std/os/unix/fs/trait.OpenOptionsExt.html#tymethod.custom_flags
Also fuse expose them as int: http://libfuse.github.io/doxygen/structfuse__file__info.html

I mean, it would be just more convenient for my use case, but it is not that big of an issue, not at all.

from fuser.

cberner avatar cberner commented on September 26, 2024

Ah yes, I see. I'm going to leave it alone for now, but I have an issue open to review all of the usage of signed vs unsigned, as I know there are other inconsistencies which matter: #65

from fuser.

siscia avatar siscia commented on September 26, 2024

No problem, I just found this (maybe) inconsistency and I waited to point it out!

I close this!

from fuser.

cberner avatar cberner commented on September 26, 2024

Re-opening this. I looked into it more and libfuse treats the value as signed, even though its specified as unsigned in the kernel 🤔

https://github.com/libfuse/libfuse/blob/ba3b225a126ebb3c6d4fe27c9f7c73aa4167001e/include/fuse_common.h#L46

I'll address this as part of #65

from fuser.

siscia avatar siscia commented on September 26, 2024

Thanks for listening to my feedback :)

from fuser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.