AU: Handle firmware update failure when booted from FW slot B.

The firmware updater will fail if we are booted into FW slot B and we
try to update firmware. We shouldn't treat this like a usual update
failure because trying again won't help until we reboot. Thus, with
this CL, we detect this case and request a reboot from the
user. Technically this request is a lie, b/c we are reusing the reboot
request mechanism which tells the user an update has been applied and
thus must be rebooted. We accept this fib since this situation is very
rare: use would have to have 2 FW update updates in a row w/o any
extra boots between.

Also, fix error code in subprocess.

Also, remove execute permissions on a bunch of source files.

BUG=chromium-os:14343
TEST=unittests, tested updates on machine that success, fail, have FW B failure

Review URL: http://codereview.chromium.org/6880077

Change-Id: I2509c6e1c9c9da3ff1ea27da4861c4850bd4d000
diff --git a/subprocess.cc b/subprocess.cc
old mode 100755
new mode 100644
index 9c19367..f6c1e3d
--- a/subprocess.cc
+++ b/subprocess.cc
@@ -29,14 +29,18 @@
   close(fd);
 
   g_spawn_close_pid(pid);
+  gint use_status = status;
+  if (WIFEXITED(status))
+    use_status = WEXITSTATUS(status);
+
   if (status) {
-    LOG(INFO) << "Subprocess status: " << status;
+    LOG(INFO) << "Subprocess status: " << use_status;
   }
   if (!record->stdout.empty()) {
     LOG(INFO) << "Subprocess output:\n" << record->stdout;
   }
   if (record->callback) {
-    record->callback(status, record->stdout, record->callback_data);
+    record->callback(use_status, record->stdout, record->callback_data);
   }
   Get().subprocess_records_.erase(record->tag);
 }