Commit Graph

5 Commits

Author SHA1 Message Date
Mike Fleetwood c82883d6a7 Add and set read-only mount flag in the Partition object (#10)
Set the partition read-only mount flag at the same time as setting the
file system mount points.

Closes #10 - Gparted fails to resize btrfs partition that is mounted
             read-only
2018-09-20 16:30:15 +00:00
Mike Fleetwood 441b39347a Add parsing of read-only mount option into mount maps (#10)
Parse file system mount options string from file and mount command
output, extracting the setting for the read-only flag and storing in the
mount maps.  Read-only flag for swap space gets the struct MountEntry
constructor default of false.

Closes #10 - Gparted fails to resize btrfs partition that is mounted
             read-only
2018-09-20 16:30:15 +00:00
Mike Fleetwood f4994a2b63 Add read-only flag to mounted file system entries (#10)
Just updates the 2 maps in the Mount_Info module so that they also have
a read-only flag for each mount.  Ensure that when a struct MountEntry
is created the readonly bool POD (Plain Old Data) type is initialised by
the constructor.  Nothing yet sets or uses the flag.

Closes #10 - Gparted fails to resize btrfs partition that is mounted
             read-only
2018-09-20 16:30:15 +00:00
Mike Fleetwood 8979913a3f Remove "../include/" from GParted header #includes
It made the code look a little messy, is easily resolved in the build
system and made the dependencies more complicated than needed.  Each
GParted header was tracked via multiple different names (different
numbers of "../include/" prefixes).  For example just looking at how
DialogFeatures.o depends on Utils.h:

    $ cd src
    $ make DialogFeatures.o
    $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po
     ../include/DialogFeatures.h ../include/../include/Utils.h \
     ../include/../include/../include/../include/../include/../include/Utils.h \
     ../include/../include/../include/Utils.h \

After removing "../include/" from the GParted header #includes, just
need to add "-I../include" to the compile command via the AM_CPPFLAGS in
src/Makefile.am.  Now the dependencies on GParted header files are
tracked under a single name (with a single "../include/" prefix).  Now
DialogFeatures.o only depends on a single name to Utils.h:

    $ make DialogFeatures.o
    $ egrep ' [^ ]*Utils.h' .deps/DialogFeatures.Po
     ../include/DialogFeatures.h ../include/Utils.h ../include/i18n.h \
2016-12-12 13:15:34 -07:00
Mike Fleetwood 63ec73dfda Split mount_info and fstab_info maps into separate Mount_Info module
The GParted_Core::mount_info and GParted_Core::fstab_info maps and the
methods that manipulate them are self-contained.  Therefore move them to
a separate Mount_Info module and reduce the size of the monster
GParted_Core slightly.
2016-08-06 09:47:58 -06:00