Re: Partition information as text file?
- Date: Thu, 31 Jan 2019 13:24:01 -0600
- From: David Wright <deblis@xxxxxxxxxxxxxxxxx>
- Subject: Re: Partition information as text file?
On Thu 31 Jan 2019 at 15:54:57 (+0100), Thomas Schmitt wrote:
> 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 "//".
So going back to the OP, is this a sensible approach to choose instead
of letting mount and df figure things out for themselves?