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

Issue 1593021: Add a safe_unmount function and use it in enter_chroot. (Closed)

Created:
10 years, 8 months ago by robotboy
Modified:
9 years, 7 months ago
Reviewers:
Bill Richardson, adlr, djmm
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

Add a safe_unmount function and use it in enter_chroot. The safe_unmount function first tries a regular unmount, If that fails it warns and tries a lazy unmount. If the lazy unmount fails it dies. Both unmounts take the -d option in case the mount is a loop device. BUG=None TEST=Entered and exited multiple chroots

Patch Set 1 #

Total comments: 2

Patch Set 2 : Don't rely on $? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -1 line) Patch
M src/scripts/common.sh View 1 1 chunk +15 lines, -0 lines 0 comments Download
M src/scripts/enter_chroot.sh View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
robotboy
10 years, 8 months ago (2010-04-12 20:43:01 UTC) #1
adlr
http://codereview.chromium.org/1593021/diff/1/2 File src/scripts/common.sh (right): http://codereview.chromium.org/1593021/diff/1/2#newcode348 src/scripts/common.sh:348: sudo umount -d "${path}" how does this play w/ ...
10 years, 8 months ago (2010-04-12 20:46:20 UTC) #2
robotboy
I think the "set -e" doesn't make it to sourced scripts because my tests worked. ...
10 years, 8 months ago (2010-04-12 20:59:10 UTC) #3
adlr
10 years, 8 months ago (2010-04-12 21:02:00 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld 408576698