auto import from //branches/cupcake/...@127101
diff --git a/Android.mk b/Android.mk
index 52986c7..3c3cb61 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,4 +1,3 @@
 ifneq ($(TARGET_SIMULATOR),true)
-## Disabled for now - San
-## include $(call all-subdir-makefiles)
+  include $(call all-subdir-makefiles)
 endif
diff --git a/src/boot.c b/src/boot.c
index 0243c69..432ccdb 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -27,6 +27,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <stdlib.h>
+#include <stdarg.h>
 
 #include "common.h"
 #include "dosfsck.h"
@@ -69,6 +70,17 @@
 #define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f )
 #endif
 
+void die_notfat(char *msg,...)
+{
+    va_list args;
+
+    va_start(args,msg);
+    vfprintf(stderr,msg,args);
+    va_end(args);
+    fprintf(stderr,"\n");
+    exit(4);
+}
+
 
 static char *get_media_descr( unsigned char media )
 {
@@ -299,9 +311,9 @@
 
     fs_read(0,sizeof(b),&b);
     logical_sector_size = GET_UNALIGNED_W(b.sector_size);
-    if (!logical_sector_size) die("Logical sector size is zero.");
+    if (!logical_sector_size) die_notfat("Logical sector size is zero.");
     fs->cluster_size = b.cluster_size*logical_sector_size;
-    if (!fs->cluster_size) die("Cluster size is zero.");
+    if (!fs->cluster_size) die_notfat("Cluster size is zero.");
     if (b.fats != 2 && b.fats != 1)
 	die("Currently, only 1 or 2 FATs are supported, not %d.\n",b.fats);
     fs->nfats = b.fats;
@@ -337,7 +349,7 @@
 	    printf( "Warning: FAT32 root dir not in cluster chain! "
 		    "Compability mode...\n" );
 	else if (!fs->root_cluster && !fs->root_entries)
-	    die("No root directory!");
+	    die_notfat("No root directory!");
 	else if (fs->root_cluster && fs->root_entries)
 	    printf( "Warning: FAT32 root dir is in a cluster chain, but "
 		    "a separate root dir\n"
diff --git a/src/dosfsck.c b/src/dosfsck.c
index 0a57030..7a5ba25 100644
--- a/src/dosfsck.c
+++ b/src/dosfsck.c
@@ -199,7 +199,7 @@
     printf( "%s: %u files, %lu/%lu clusters\n", argv[optind],
 	    n_files, fs.clusters - free_clusters, fs.clusters );
 
-    return fs_close(rw) ? 1 : 0;
+    exit(fs_close(rw) ? 4 : 0);
 }
 
 /* Local Variables: */