-
Notifications
You must be signed in to change notification settings - Fork 85
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
Reduce dependeny of hdparm #567
Comments
It's always been my preference to use ioctl and we do for some things like retrieval of HPA/DSO data which was necessary due to a bug in certain versions of hdparm, however currently nwipe uses multiple methods to obtain temperature including the kernels hwmon driver and separate code for SAS drives. Adding or replacing hdparm should be done in such a way that doesn't break any other method. It's also not only about obtaining the actual temperature but also the temperature limits of which there maybe be a further four temperature values that need to be retrieved. Depending on the drive not all these values are available. To make any change to temperature you need to understand how temperature limit values are used within the GUI too. It was also be good to understand hdparms code to makesure there aren't edge cases in obtaining temperature that we know nothing about and so end up with less temperatures being reported. |
Can you maybe make a breakdown of which functions are using |
Hey! |
Why do you think it's suspicious? these are all very powerful tools designed to operate with root privileges. Without that level of privilege they would be unable to do the job they are designed to do. I do agree though in regards to bringing the code into nwipe in the form of low level functions. It makes for a cleaner solution and less dependencies that could break nwipe when their text output changes. I see you code. we're always open to pull requests should you want to have a go at this. hdparm would be the easiest to remove as I've already written the low level function for accessing HPA/DCO status which can be used as an example. |
I agree that reducing dependencies should be a goal. I would put it on the roadmap as long-term goal. I think updating BuildRoot and getting the nwipe Debian package out are more important. Updating BuildRoot would also address security concerns of using outdated packages. |
Ahoy, i hope you are doing fine :)
As i see, hdparm is not really a library, it's a command line tool. So we are executing command line operations, and parsing the output.
Isn't it more appropriate to use
ioctl
commands instead, utilizing theioctl.h
libary?Just a consideration :)
e.g.
Temperature could be read this way.
The text was updated successfully, but these errors were encountered: