Re: Partition information as text file?
- Date: Thu, 31 Jan 2019 15:54:57 +0100
- From: "Thomas Schmitt" <scdbackup@xxxxxxx>
- Subject: Re: Partition information as text file?
Richard Owlett wrote:
> Though I not a C programmer, their organization leads to answers for my
> questions [even a few I hadn't asked].
It's C++ in this case. (bleh ...)
But what i meant is that Gparted runs external programs, which a simple
shell script could do too.
dumpe2fs -h ...partition.path...
and if the partition is not mounted
resize2fs -P ...partition.path...
fsck.fat -n -v ...partition.path...
or if that is not present
dosfsck -n -v ...partition.path...
The Gparted C++ code then looks for particular text snippets in the
output of the programs in order to read the numbers which follow.
One may suck more hints from the programmers' comments in the lines
which begin by "//".
Have a nice day :)