-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add attachTimestamp field #421
Open
MrSmoer
wants to merge
7
commits into
balena-io-modules:master
Choose a base branch
from
MrSmoer:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revert changes to gitignore
Does it has to pass the workflow fist? Do I need to bump a Version number somewhere? Do you maybe have feedback on this? |
Unfortunately I think that the number of open, unanswered issues https://github.com/balena-io-modules/drivelist/issues shows that this repo isn't very high on Balena's priority list? 🤷 (of course I'd be happy to be proved wrong!) |
MrSmoer
force-pushed
the
master
branch
5 times, most recently
from
August 27, 2023 10:45
70d8af2
to
dc823ae
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 thought it'd be useful to add field which holds the unix Timestamp the drive was attached, to easily allow users to identify the right device they just plugged in.
I am new with C++ and Typescript, so please review my changes.
I don't know how to deal with the y2038 bug in C++ for 32-bit systems, so please look over this.
This is tested on Linux, Windows and MacOS 64-Bit and I tried to run the linter, but I am not shure if cpplint worked properly and ran prettier, which corrected a few typos in some other files as well.
For the general approach it uses the modifcation Timestamp of the device files under /dev on Mac and Linux, and the "Last Arrival Date" Field on Windows. This is poorly documented, but I found this in devpkey.h.
I figured that this is not included in mingw's devpkey.h, because it didn't work without.
Actually I don't know what I'm doing with C++ and based my changes on suggestions from stackoverflow and chatgpt.
I would really appreciate your feedback,
Have a nice Day!