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

Unified Diff: build_image

Issue 6696095: build_image: silence the "No space left on device" message (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 9 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_image
diff --git a/build_image b/build_image
index c54013bc4e6a58374fea4945e8a67ee4078b0c95..23c462ce40cb6e931f16eba051a9b27d4677bd09 100755
--- a/build_image
+++ b/build_image
@@ -523,7 +523,10 @@ update_base_packages() {
zero_free_space() {
local fs_mount_point=$1
info "Zeroing freespace in ${fs_mount_point}"
- sudo dd if=/dev/zero of="${fs_mount_point}/filler" oflag=sync bs=4096 || true
+ # dd is a silly thing and will produce a "No space left on device" message
+ # that cannot be turned off and is confusing to unsuspecting victims.
+ ( sudo dd if=/dev/zero of="${fs_mount_point}/filler" oflag=sync bs=4096 \
+ || true ) 2>&1 |grep -v "No space left on device"
sudo rm -f "${fs_mount_point}/filler"
sudo sync
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698