codeprentice-org / fanotify Goto Github PK
View Code? Open in Web Editor NEWAn idiomatic Rust wrapper for fanotify
License: MIT License
An idiomatic Rust wrapper for fanotify
License: MIT License
If you specify fanotify::init::Flags::REPORT_NAME
, the read results (can?) have a second header that contains the path segment that changed. This triggers a TooShort
error (with a misleading message, since there's extra data), due to a if found != expected
test.
fanotify/src/event/iterator.rs
Lines 156 to 162 in 07703f3
If I change that to if found < expected
, the code works again, but ignores the extra data. Printing it out reveals the first byte is 2, hence fanotify_event_info_fid.hdr.info_type == 2
, FAN_EVENT_INFO_TYPE_DFID_NAME
. And it seems this library can request names, but cannot parse them.
It seems EventIterator
was written to assume there's only one fanotify_event_info_fid
, but as far as I understand that's not guaranteed. I would suggest the code be changed to treat it as a sequence, and silently ignore unrecognized info_type
values. That change didn't up being quite trivial enough for me to program it quickly..
Self explanatory
I'm curious if y'all are planning on publishing this to crates.io.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.