Refactored for use of *at-functions instead of snprintf, removed unnecessary loops and added libnotify option #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I kind of got carried away adding desktop notifications with progress bars to this tool.
The code now uses fstatat, readlinkat and openat to replace worrysome handling of large on-stack buffers with handling of worrysome amounts of fds. Also I removed some unnecessary repeated looping over /proc and an unnecessary intermediate result array. Also, the code is now identifying files by inode number instead of comparing strings. This is simpler and will still work almost always.
If really necessary, I can split this into a proper commit series, however I won't do that before Tuesday.