platform_system_core/toolbox
Ken Sumrall e3aeeb4de3 Try to unmount writable filesystems when rebooting
Ext4 filesystems like to be unmounted before rebooting.  The Android system
doesn't have a traditional Linux init setup, and shutting down the system
was not much more than calling sync(2) and reboot(2).  This adds a new
function to libcutils called android_reboot().  By default, it calls sync()
and then remounts all writable filesystems as read-only and marks them clean.
There is a flag parameter in which the caller can ask for sync() not to be
called, or to not remount the filesystems as read-only.  Then it will call
reboot(2) as directed by the other parameters.  This change also updates
adb, init and toolbox to call the new android_reboot() function.
Fixes bugs 3350709 and 3495575.

Change-Id: I16d71ffce3134310d7a260f61ec6f4dd204124a7
2011-03-10 18:11:46 -08:00
..
alarm.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
Android.mk toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
cat.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
chmod.c Add -R to chmod 2010-07-14 13:30:11 -05:00
chown.c Allow numeric uid & gid in chown 2010-02-12 13:46:58 -08:00
cmp.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
date.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
dd.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
dd.h Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
df.c make df more readable 2010-09-11 18:19:35 -07:00
dmesg.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
dynarray.c toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
dynarray.h toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
exists.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
getevent.c Improvements to get events: -p, better output. 2009-04-08 15:43:31 -07:00
getprop.c Fix getprop Format 2011-02-14 17:17:21 -08:00
hd.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
id.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
ifconfig.c toolbox: ifconfig: Implement mtu setting, plus setting interface addr should 2009-05-14 07:28:52 -07:00
iftop.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
insmod.c fix insmod reading more than one module parameter 2010-04-20 09:53:12 +05:30
ioctl.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
ionice.c system: Add support for getting/setting i/o priorities and include a userspace tool 2010-02-25 14:02:55 -08:00
kill.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
ln.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
log.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
ls.c toolbox: make getprop print a sorted list of properties 2011-01-08 12:22:08 +01:00
lsmod.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
lsof.c lsof: Add support for printing open files for a single process 2010-12-22 16:39:12 -05:00
lsusb.c toolbox: add verbose option for lsusb 2010-12-09 17:14:27 -08:00
mkdir.c Add -p support to mkdir 2010-07-14 13:29:42 -05:00
MODULE_LICENSE_BSD auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
mount.c mount: Add support for remounting without specifying device 2010-05-07 12:09:19 -07:00
mv.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
nandread.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
netstat.c netstat should include /proc/net/tcp6 and /proc/net/udp6 data 2010-09-28 22:22:02 -07:00
newfs_msdos.c newfs_msdos: Allow -s option to work by itself 2010-03-03 12:40:21 -08:00
NOTICE Correct copyright header for uptime and NOTICE 2010-07-27 11:26:06 -07:00
notify.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
powerd.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
printenv.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
ps.c ps: Add -c flag to show CPU number last executed on 2010-08-18 17:26:26 -07:00
r.c Accept address ranges in r 2011-01-19 17:23:40 -08:00
readtty.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
reboot.c Try to unmount writable filesystems when rebooting 2011-03-10 18:11:46 -08:00
renice.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
rm.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
rmdir.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
rmmod.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
rotatefb.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
route.c Userland support for VM interconnection 2010-07-15 13:19:37 +02:00
schedtop.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
sendevent.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setconsole.c Add missing headers for compilation on x86 targets 2010-11-17 11:47:23 -08:00
setkey.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
setprop.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
sleep.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
smd.c Automated import from //branches/master/...@142981,142981 2009-03-26 14:14:15 -07:00
start.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
stop.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
sync.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
syren.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
toolbox.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
top.c toolbox: top: Add processor field 2010-08-30 16:39:14 -07:00
umount.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
uptime.c uptime: Use clock_gettime to get monotonic time 2011-01-05 15:22:09 -08:00
vmstat.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
watchprops.c auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
wipe.c Try to unmount writable filesystems when rebooting 2011-03-10 18:11:46 -08:00