You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Example passthrough, fuse_fill_dir_flags and default value in cpp/c #629
Hi hi, I was trying to start a project in c++ using the passthrough example, and I notice something very curious, I'll put the different sections of code for context:
static int fill_dir_plus = 0;
....
if (!strcmp(argv[i], "--plus")) {
fill_dir_plus = FUSE_FILL_DIR_PLUS;
} else {
Now, this type of line is used very common:
fuse_fill_dir_t filler (declared in function)
(filler(buf, de->d_name, &st, 0, fill_dir_plus))
Is mixing types everywhere the example, fill_dir_plus var, should have the type fuse_fill_dir_flags not int, but at the same time, the enum fuse_fill_dir_flags only have one value, so we can't run the first line of the example where is set to 0.
I still don't know very well how fuse works internally, but I think fuse_fill_dir_flags should have one more flag for the 0 value.
In C, enum types are int. This is why "mixing" types this way is fine. Still, if there is a way to change this so that it also compiles without warnings in C++, then I'm happy to accept pull requests.
I do not understand what you mean with "use_fill_dir_flags should have one more flag for the 0 value" - could you elaborate?
Hi, enum estore values as int, but declaring enum fuse_fill_dir_flags flags, even parsing an int can fail, depending of the compiler and the project (I test this with a C++ project), the passthrough example don't store a fuse_fill_dir_flags flags, store int.
The user_full_dir_flags only have one definition, FUSE_FILL_DIR_PLUS, with the value 2 (1<<1), in the passthrough example the value is set to 0, so I can't change the integer type to enum.
So, to pull a request, for the fuse_fill_dir_flags flags, what would means the 0 value? maybe FUSE_READDIR_NOT_PLUS?
I'm closing this issue for now. Please note that this isn't meant to imply that you haven't found a real bug or worthwhile potential improvement - you most likely have and I'm grateful that you took the time to report it.
Unfortunately, this project does not currently have any active, regular contributors. As the maintainer, I try to review pull requests and make regular releases, but unfortunately I have no capacity to do significant development beyond that.
Issue reports that do not come with a pull request or clearly have high impact on a large number of users are therefore likely to languish.
I understand that this is frustrating for users, but I hope you can also understand that any development work that I do on this project has to compete with spending time with my family, doing work that I get paid for, doing something recreational without a computer, or working on features/bugs that affect me personally. Most bugs and ideas - unfortunately including this one - loose out in this competition.
In other words, unless you plan to work on this yourself or can recruit someone who will, it's unlikely that anyone is going to do anything about it anytime soon.
Still, you may wonder why I am closing the issue rather than keeping it open.
In short, I want the issue tracker to show the most important issues that users should be aware of and where prospective contributors could make the biggest difference. I do not think there is much value in using it as an exhaustive database of every idea or glitch that someone has ever encountered - especially if no one is intending to address/implement it.
For this reason, I am closing most issues when it becomes clear that they're unlikely to see any activity in the near future - and this seems to be the case here.
I understand that you have invested time and effort in reporting this, and I am very sorry that currently there is no way to build upon this. I wish the situation was different.
Activity
Nikratio commentedon Nov 7, 2021
In C,
enumtypes areint. This is why "mixing" types this way is fine. Still, if there is a way to change this so that it also compiles without warnings in C++, then I'm happy to accept pull requests.I do not understand what you mean with "use_fill_dir_flags should have one more flag for the 0 value" - could you elaborate?
latot commentedon Nov 7, 2021
Hi, enum estore values as int, but declaring
enum fuse_fill_dir_flags flags, even parsing an int can fail, depending of the compiler and the project (I test this with a C++ project), the passthrough example don't store afuse_fill_dir_flags flags, storeint.The
user_full_dir_flagsonly have one definition,FUSE_FILL_DIR_PLUS, with the value 2 (1<<1), in the passthrough example the value is set to 0, so I can't change the integer type to enum.So, to pull a request, for the
fuse_fill_dir_flags flags, what would means the 0 value? maybeFUSE_READDIR_NOT_PLUS?Nikratio commentedon May 2, 2022
Let's use
FUSE_READDIR_DEFAULTS.Nikratio commentedon Jul 2, 2022
I'm closing this issue for now. Please note that this isn't meant to imply that you haven't found a real bug or worthwhile potential improvement - you most likely have and I'm grateful that you took the time to report it.
Unfortunately, this project does not currently have any active, regular contributors. As the maintainer, I try to review pull requests and make regular releases, but unfortunately I have no capacity to do significant development beyond that.
Issue reports that do not come with a pull request or clearly have high impact on a large number of users are therefore likely to languish.
I understand that this is frustrating for users, but I hope you can also understand that any development work that I do on this project has to compete with spending time with my family, doing work that I get paid for, doing something recreational without a computer, or working on features/bugs that affect me personally. Most bugs and ideas - unfortunately including this one - loose out in this competition.
In other words, unless you plan to work on this yourself or can recruit someone who will, it's unlikely that anyone is going to do anything about it anytime soon.
Still, you may wonder why I am closing the issue rather than keeping it open.
In short, I want the issue tracker to show the most important issues that users should be aware of and where prospective contributors could make the biggest difference. I do not think there is much value in using it as an exhaustive database of every idea or glitch that someone has ever encountered - especially if no one is intending to address/implement it.
For this reason, I am closing most issues when it becomes clear that they're unlikely to see any activity in the near future - and this seems to be the case here.
I understand that you have invested time and effort in reporting this, and I am very sorry that currently there is no way to build upon this. I wish the situation was different.