Fixed reversed output in netstat Recv-Q Send-Q columns

Change-Id: I2bc7ac6c886808910212432497f05e34596f5e85
fix bad return value in dhcp_do_request_*

1. bad return status make it return uninitialized prefixLength with a magic
number in android_net_utils_runDhcpCommon()
2. it will make DhcpInfoInternal.makeLinkAddress() to throw
IllegalArgumentException when try to connect a Wifi AP
3. the exception will make system reboot, of cource it random.

Change-Id: Iabc0cd5b69c1316f4eeae0aa1b8a91444dca4562
Signed-off-by: Michael Wu <michaelstay@gmail.com>
init: prevent action being added to the action_queue twice

Property triggers may cause an action to be queued twice, resulting
in a loop in the action queue.  Keep actions that are not on the queue
in the list_empty state (act->qlist->next == act->qlist), and only
add them to the list if they are in that state.

Bug: 8335133
Change-Id: I3a3ec18176cf19cbaa3a45220a03c7560eacfe79
init: switch property_get to use __system_property_get

(cherry picked from commit 2deedfe0b1ac86ebd62d19cf7da9e7dcb508ab09)

Change-Id: If3fba2cc1dd5c167b0924ddfe42dbe2e6387208a
init: verify size of property buffers passed to property_get

Verify that the buffer passed as the value parameter to property_get
is always big enough.

(cherry picked from commit 88ac54a4e8d2a63e4fd9c465e115795ace316776)

Change-Id: Iacc2b42bfe4069e0bfcbb1c48474f30126a93139
init: fix copying boot properties

The previous patch "init: verify size of property buffers passed
to property_get" incorrectly modified one of the callers,
resulting in ro.serialno, ro.bootmode, ro.baseband, and
ro.bootloader always being set to their default values.

Bug: 9469860

(cherry picked from commit 67e3663fc93c65b69b5d121db05b0833b98d97f1)

Change-Id: Ia7b337e1fab6e334729f47ee1269e6c736615177
libcutils: reimplement property_list() using __system_property_foreach()

Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit e7bb159d16f9e60850a3c79cc388587959015a65)

Change-Id: I0f66144eb8a4a48e04e4fcd125ad37f19ad94b8e