blob: 72d859da626ef4cdc98bcbed5e9d787a432964e8 [file] [log] [blame]
Chris Masone5e06f182010-03-23 08:29:52 -07001# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import logging, os, utils, time
Chris Masonee7dd0162010-03-23 13:50:58 -07006from autotest_lib.client.bin import chromeos_constants, test
Chris Masone5e06f182010-03-23 08:29:52 -07007from autotest_lib.client.common_lib import error
8
Chris Masonee7dd0162010-03-23 13:50:58 -07009def is_mounted(device = chromeos_constants.CRYPTOHOME_DEVICE,
10 expected_mountpt = chromeos_constants.CRYPTOHOME_MOUNT_PT,
Chris Masone6027ecc2010-03-23 10:19:49 -070011 allow_fail = False):
12 mount_line = utils.system_output('/bin/mount | grep %s' % expected_mountpt,
13 ignore_status = allow_fail)
14 dev = (mount_line.split())[0]
15 return device == dev