The Storage Info for Linux provides information about storage devices and disks on the system in a convenient way.
The client turned to QArea with a task to finish with an idea of creating his Storage Info for Linux. Initially, there was a sound idea to implement the tool involving Java API and native C-implementation to provide the detailed information about any storage devices and volumes that are available on the system. Yet, the implementation of functionality needed some improvements.
After reassessing the source the following was finally implemented.
API provided the following functionality, but not limited to:
- get a list of all storage devices, volumes
- create, format a volume
- get names of all devices and volumes
- get amount of free, used, and total space on the device, volume
- get device, volume attributes
The tool was intended as a cross-platform solution. The main challenge was to develop it for a variety of devices under Linux which was successfully implemented. Another challenge was in using standard Java SDK APIs which only provided information about volumes and even this was very limited. Besides low-level information retrieval and modification actions were pre-implemented with native code in C.
The existent native C code was ported from MS DevStudio/Windows platform to GCC/Linux environment. Also low-level platform-specific code fragments were replaced by their Linux analogues. Some Windows library calls were implemented to keep existing code consistent.
The available source code of system utilities was used with same functionality (due to certain lack of detailed documentation) in order to find out the effective methods of implementation.