aboutsummaryrefslogtreecommitdiff
blob: 01e65da8bac073ba99dcd93dd2f6136a005fc772 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""
This function makes sure the user enters a valid block device in /etc/fstab
"""

import os
import re
import os.path as osp

def validate(userIn):
    devices = os.listdir('/dev')
    if osp.split(userIn)[1] in devices:
        return True
    return False