summaryrefslogtreecommitdiffstats
path: root/src/utils/cache.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2023-05-02 17:16:52 +0200
committerJose M. Guisado <jguisado@soleta.eu>2023-05-09 13:09:02 +0200
commit803ba74510df3400da4d5d02351f3858460cffda (patch)
treeed28d5ca7811b1e7abbc5b6e8b89307a1e8f58e9 /src/utils/cache.py
parentdd999bfe34e7f812d4ce61828f262ee06b5d4fa4 (diff)
utils: rewrite ogExtendFs
Drop subprocess call to bash function ogExtendFs. Use a native python solution with subprocess calls to the required underlying tools. Use get_filesystem_type to get the present filesystem from a partition and call the corresponding filesystem grow function. Filesystem specific functions are declared "_extend_{filesystem}" and should not be imported elsewhere. Each filesystem specific function wraps a subprocess call to the required underlying program: - NTFS filesystems: "ntfsresize -f [partition]" - ext4 filesystems: "resize2fs -f [partition]" Set NTFS related subprocess stdin to 'y' because human input cannot be unset with other ntfsresize parameters.
Diffstat (limited to 'src/utils/cache.py')
0 files changed, 0 insertions, 0 deletions