Chris Masone | 5e06f18 | 2010-03-23 08:29:52 -0700 | [diff] [blame] | 1 | # 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 | |
| 5 | import logging, os, utils, time |
Chris Masone | e7dd016 | 2010-03-23 13:50:58 -0700 | [diff] [blame^] | 6 | from autotest_lib.client.bin import chromeos_constants, test |
Chris Masone | 5e06f18 | 2010-03-23 08:29:52 -0700 | [diff] [blame] | 7 | from autotest_lib.client.common_lib import error |
| 8 | |
Chris Masone | e7dd016 | 2010-03-23 13:50:58 -0700 | [diff] [blame^] | 9 | def is_mounted(device = chromeos_constants.CRYPTOHOME_DEVICE, |
| 10 | expected_mountpt = chromeos_constants.CRYPTOHOME_MOUNT_PT, |
Chris Masone | 6027ecc | 2010-03-23 10:19:49 -0700 | [diff] [blame] | 11 | 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 |