Skip to content
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
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

MrSmoer
Copy link

@MrSmoer MrSmoer commented Jan 25, 2023

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!

@MrSmoer
Copy link
Author

MrSmoer commented Feb 3, 2023

Does it has to pass the workflow fist? Do I need to bump a Version number somewhere? Do you maybe have feedback on this?

@lurch
Copy link
Contributor

lurch commented Feb 10, 2023

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 MrSmoer force-pushed the master branch 5 times, most recently from 70d8af2 to dc823ae Compare August 27, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants