mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
mount(): properly handle type
. (forgotten to commit with binfmt mounting)
This commit is contained in:
parent
7f2df127d1
commit
482744feb2
1 changed files with 4 additions and 6 deletions
10
utils.py
10
utils.py
|
@ -23,18 +23,16 @@ def umount(dest):
|
|||
)
|
||||
|
||||
|
||||
def mount(src: str, dest: str, options=['bind'], type=None) -> subprocess.CompletedProcess:
|
||||
def mount(src: str, dest: str, options=['bind'], fs_type=None) -> subprocess.CompletedProcess:
|
||||
opts = []
|
||||
type = []
|
||||
|
||||
for opt in options:
|
||||
opts += ['-o', opt]
|
||||
|
||||
if type:
|
||||
type = ['-t', type]
|
||||
if fs_type:
|
||||
opts += ['-t', fs_type]
|
||||
|
||||
result = subprocess.run(
|
||||
['mount'] + type + opts + [
|
||||
['mount'] + opts + [
|
||||
src,
|
||||
dest,
|
||||
],
|
||||
|
|
Loading…
Add table
Reference in a new issue