Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: client/bin/site_cryptohome.py

Issue 5519008: Create a cros directory under client, and start moving things into it. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | client/bin/site_log_reader.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging, os, re, utils 5 import logging, os, re, utils
6 from autotest_lib.client.bin import chromeos_constants, test 6 from autotest_lib.client.bin import test
7 from autotest_lib.client.common_lib import error 7 from autotest_lib.client.common_lib import error
8 8 from autotest_lib.client.cros import constants as chromeos_constants
9 9
10 CRYPTOHOME_CMD = '/usr/sbin/cryptohome' 10 CRYPTOHOME_CMD = '/usr/sbin/cryptohome'
11 11
12 class ChromiumOSError(error.InstallError): 12 class ChromiumOSError(error.InstallError):
13 """Generic error for ChromiumOS-specific exceptions.""" 13 """Generic error for ChromiumOS-specific exceptions."""
14 pass 14 pass
15 15
16 16
17 def __run_cmd(cmd): 17 def __run_cmd(cmd):
18 return utils.system_output(cmd + ' 2>&1', retain_output=True, 18 return utils.system_output(cmd + ' 2>&1', retain_output=True,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return len(mount_parts) > 0 and re.match(device, mount_parts[0]) 85 return len(mount_parts) > 0 and re.match(device, mount_parts[0])
86 86
87 87
88 def is_mounted_on_tmpfs(device = chromeos_constants.CRYPTOHOME_INCOGNITO, 88 def is_mounted_on_tmpfs(device = chromeos_constants.CRYPTOHOME_INCOGNITO,
89 expected_mountpt = 89 expected_mountpt =
90 chromeos_constants.CRYPTOHOME_MOUNT_PT, 90 chromeos_constants.CRYPTOHOME_MOUNT_PT,
91 allow_fail = False): 91 allow_fail = False):
92 mount_parts = __get_mount_parts(device, allow_fail) 92 mount_parts = __get_mount_parts(device, allow_fail)
93 return (len(mount_parts) > 2 and device == mount_parts[0] and 93 return (len(mount_parts) > 2 and device == mount_parts[0] and
94 'tmpfs' == mount_parts[2]) 94 'tmpfs' == mount_parts[2])
OLDNEW
« no previous file with comments | « no previous file | client/bin/site_log_reader.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698