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

Side by Side Diff: client/common_lib/boottool.py

Issue 4823005: Merge remote branch 'cros/upstream' into tempbranch (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: patch Created 10 years, 1 month 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 | « client/common_lib/base_packages.py ('k') | client/common_lib/control_data_unittest.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 2009 Google Inc. Released under the GPL v2 1 # Copyright 2009 Google Inc. Released under the GPL v2
2 2
3 import re 3 import re
4 4
5 5
6 class boottool(object): 6 class boottool(object):
7 """ 7 """
8 Common class for the client and server side boottool wrappers. 8 Common class for the client and server side boottool wrappers.
9 """ 9 """
10 10
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 """ 257 """
258 Removes a specific entry from the bootloader configuration. 258 Removes a specific entry from the bootloader configuration.
259 259
260 @param kernel: can be 'start', 'end', entry position or entry title. 260 @param kernel: can be 'start', 'end', entry position or entry title.
261 """ 261 """
262 self._run_boottool('--remove-kernel=%s' % kernel) 262 self._run_boottool('--remove-kernel=%s' % kernel)
263 263
264 264
265 def boot_once(self, title=None): 265 def boot_once(self, title=None):
266 """ 266 """
267 Sets a specific entry for the next boot Then falls back to the 267 Sets a specific entry for the next boot, then falls back to the
268 default kernel. 268 default kernel.
269 269
270 @param kernel: title that identifies the entry to set for booting. If 270 @param kernel: title that identifies the entry to set for booting. If
271 evaluates to false it will use the default entry title. 271 evaluates to false, this becomes a no-op.
272 (FIXME: that does not make much sense, if an entry is default
273 by definition that means it boots next anyways so maybe it
274 should be a NOP for title evaluating to False)
275 """ 272 """
276 if not title: 273 if title:
277 title = self.get_default_title() 274 self._run_boottool('--boot-once', '--title=%s' % title)
278 self._run_boottool('--boot-once', '--title=%s' % title)
279 275
280 276
281 def enable_xen_mode(self): 277 def enable_xen_mode(self):
282 """ 278 """
283 Enables xen mode. Future operations will assume xen is being used. 279 Enables xen mode. Future operations will assume xen is being used.
284 """ 280 """
285 self._xen_mode = True 281 self._xen_mode = True
286 282
287 283
288 def disable_xen_mode(self): 284 def disable_xen_mode(self):
289 """ 285 """
290 Disables xen mode. 286 Disables xen mode.
291 """ 287 """
292 self._xen_mode = False 288 self._xen_mode = False
293 289
294 290
295 def get_xen_mode(self): 291 def get_xen_mode(self):
296 """ 292 """
297 Returns a boolean with the current status of xen mode. 293 Returns a boolean with the current status of xen mode.
298 """ 294 """
299 return self._xen_mode 295 return self._xen_mode
OLDNEW
« no previous file with comments | « client/common_lib/base_packages.py ('k') | client/common_lib/control_data_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698