Web lists-archives.com

Re: Partition information as text file?




On 01/29/2019 10:16 AM, Thomas Schmitt wrote:
Hi,

Richard Owlett wrote:
Gparted displays the desired data in the GUI, but I see no way to get that
information as a text stream.

Well, it seems to inquire the info by filesystem specific means.
The method is obviously named set_used_sectors(). See e.g.

   https://github.com/GNOME/gparted/blob/master/src/ext2.cc#L147
   https://github.com/GNOME/gparted/blob/master/src/fat16.cc#L129
   https://github.com/GNOME/gparted/blob/master/src/xfs.cc#L89

There are several source files from btrfs.cc to xfs.cc. One could harvest
hints about which man pages to read in order to create some program which
knows the inquiry commands for all filesystems which Gparted knows.
(I dimly remember to have seen such inquiry/management program names
in replies to this thread.)


Though I not a C programmer, their organization leads to answers for my questions [even a few I hadn't asked].

They create an interesting homework assignment.
"If retirement isn't for learning, what use is it?"
Thank you.