diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-03-20 16:56:05 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-03-20 16:56:05 +0000 |
commit | ef89a6c26546bb38a3af7c784a364ebefdecbf54 (patch) | |
tree | 3131f9ce89af6c950bfe9b44e44df90ddaee2829 /morphlib/fsutils.py | |
parent | b585c5bdc2d9da874618f60a5fe8e3f16160be15 (diff) | |
parent | 69e48f2cca2e70224562efc75a946dde70a4cfc8 (diff) | |
download | morph-ef89a6c26546bb38a3af7c784a364ebefdecbf54.tar.gz |
Merge branch 'baserock/pedroalvarez/system-integration5'
Reviewed-by: Richard Maw
Diffstat (limited to 'morphlib/fsutils.py')
-rw-r--r-- | morphlib/fsutils.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/morphlib/fsutils.py b/morphlib/fsutils.py index 0212b987..751f73f6 100644 --- a/morphlib/fsutils.py +++ b/morphlib/fsutils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,10 +47,14 @@ def create_fs(runcmd, partition): # pragma: no cover runcmd(['mkfs.btrfs', '-L', 'baserock', partition]) -def mount(runcmd, partition, mount_point): # pragma: no cover +def mount(runcmd, partition, mount_point, fstype=None): # pragma: no cover if not os.path.exists(mount_point): os.mkdir(mount_point) - runcmd(['mount', partition, mount_point]) + if not fstype: + fstype = [] + else: + fstype = ['-t', fstype] + runcmd(['mount', partition, mount_point] + fstype) def unmount(runcmd, mount_point): # pragma: no cover |