<feed xmlns='http://www.w3.org/2005/Atom'>
<title>system_core/base/include/android-base, branch replicant-10</title>
<subtitle>Fork of system/core
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/'/>
<entry>
<title>libbase: add ConsumePrefix/ConsumeSuffix.</title>
<updated>2020-03-13T22:30:46+00:00</updated>
<author>
<name>Elliott Hughes</name>
<email>enh@google.com</email>
</author>
<published>2019-05-03T16:02:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=124e1a0ea611be51c8b514e663c4528f10e032bc'/>
<id>124e1a0ea611be51c8b514e663c4528f10e032bc</id>
<content type='text'>
adb was already using ConsumePrefix, and now we have another would-be
user in cutils. (There appears to be one place in adb that should use
ConsumeSuffix, so I'm assuming we'll want that sooner or later.)

I've kept these inline because adb and google3's versions both were, and
I'm easily led.

Test: treehugger
Change-Id: I29d99032f6f6ccbfaefece59725db8afb02a4c87
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
adb was already using ConsumePrefix, and now we have another would-be
user in cutils. (There appears to be one place in adb that should use
ConsumeSuffix, so I'm assuming we'll want that sooner or later.)

I've kept these inline because adb and google3's versions both were, and
I'm easily led.

Test: treehugger
Change-Id: I29d99032f6f6ccbfaefece59725db8afb02a4c87
</pre>
</div>
</content>
</entry>
<entry>
<title>Disallow operator!() on unique_fd</title>
<updated>2019-03-28T06:56:07+00:00</updated>
<author>
<name>Bernie Innocenti</name>
<email>codewiz@google.com</email>
</author>
<published>2019-03-28T06:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=7cb72c96b4d5ede1b5526a526ccb7dae0490bb0e'/>
<id>7cb72c96b4d5ede1b5526a526ccb7dae0490bb0e</id>
<content type='text'>
This catches a common mistake where client code checks for errors using
the common idiom that works for std::iostream and other file-like
classes:

  unique_fd fd = open(...);
  if (!fd) {
  }

Test: atest libbase_test
Test: m droid
Change-Id: I9629a7795537ecb3b57be9c741c06f80967e4cc2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This catches a common mistake where client code checks for errors using
the common idiom that works for std::iostream and other file-like
classes:

  unique_fd fd = open(...);
  if (!fd) {
  }

Test: atest libbase_test
Test: m droid
Change-Id: I9629a7795537ecb3b57be9c741c06f80967e4cc2
</pre>
</div>
</content>
</entry>
<entry>
<title>[base] Convert Starts/Ends/Equals string functions to string_view</title>
<updated>2019-03-21T16:29:46+00:00</updated>
<author>
<name>Yurii Zubrytskyi</name>
<email>zyy@google.com</email>
</author>
<published>2019-03-20T00:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=59d876c7a2468c189edebf451cbc0debd2aced47'/>
<id>59d876c7a2468c189edebf451cbc0debd2aced47</id>
<content type='text'>
Test: UTs

Change-Id: I3751656d44e7a814488169c53d3e8af0da44f262
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test: UTs

Change-Id: I3751656d44e7a814488169c53d3e8af0da44f262
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge changes from topic "base_cmsg"</title>
<updated>2019-02-19T20:53:01+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2019-02-19T20:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=8954d0bc9876b6fbe15f480ad0eae359f317a076'/>
<id>8954d0bc9876b6fbe15f480ad0eae359f317a076</id>
<content type='text'>
* changes:
  adb: switch to base::{Send,Receive}FileDescriptors.
  debuggerd: switch to base::{Send,Receive}FileDescriptors.
  base: add helpers for sending/receiving file descriptors.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* changes:
  adb: switch to base::{Send,Receive}FileDescriptors.
  debuggerd: switch to base::{Send,Receive}FileDescriptors.
  base: add helpers for sending/receiving file descriptors.
</pre>
</div>
</content>
</entry>
<entry>
<title>base: add helpers for sending/receiving file descriptors.</title>
<updated>2019-02-13T21:21:54+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2019-01-08T03:16:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=14f9500a35390e2e0252ccc1c03c9c850444e2b6'/>
<id>14f9500a35390e2e0252ccc1c03c9c850444e2b6</id>
<content type='text'>
Almost all of the uses of cmsg(3) in our source tree are wrong in at
least one of the following ways:

  - not aligning the cmsg buffer
  - leaking fds if more fds are received than expected
  - blindly dereferencing CMSG_DATA without checking the header
  - using CMSG_SPACE instead of CMSG_LEN for .cmsg_len
  - using CMSG_LEN instead of CMSG_SPACE for .msg_controllen
  - using a length specified in number of fds instead of bytes

Implement wrapper functions that implement this dumpster fire of an
API correctly.

Bug: http://b/122047630
Test: libbase_test32
Change-Id: I6ac34d67bbbf1bfa9727ab598248fc178ea19df9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Almost all of the uses of cmsg(3) in our source tree are wrong in at
least one of the following ways:

  - not aligning the cmsg buffer
  - leaking fds if more fds are received than expected
  - blindly dereferencing CMSG_DATA without checking the header
  - using CMSG_SPACE instead of CMSG_LEN for .cmsg_len
  - using CMSG_LEN instead of CMSG_SPACE for .msg_controllen
  - using a length specified in number of fds instead of bytes

Implement wrapper functions that implement this dumpster fire of an
API correctly.

Bug: http://b/122047630
Test: libbase_test32
Change-Id: I6ac34d67bbbf1bfa9727ab598248fc178ea19df9
</pre>
</div>
</content>
</entry>
<entry>
<title>base: add ScopedLockAssertion.</title>
<updated>2019-02-13T00:32:35+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2019-02-12T21:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=982f7bd3459e8b260091eba27051ec62bc00b09d'/>
<id>982f7bd3459e8b260091eba27051ec62bc00b09d</id>
<content type='text'>
This is a useful helper for anyone that's using thread safety
annotations alongside std::condition_variable, extract it from adb and
move it to libbase.

Test: mma
Change-Id: Ic51e2f2a0e6a16628034b29d8ff32bf2155afccd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a useful helper for anyone that's using thread safety
annotations alongside std::condition_variable, extract it from adb and
move it to libbase.

Test: mma
Change-Id: Ic51e2f2a0e6a16628034b29d8ff32bf2155afccd
</pre>
</div>
</content>
</entry>
<entry>
<title>base: don't overwrite errno in unique_fd::~unique_fd.</title>
<updated>2019-01-30T23:18:56+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2019-01-26T00:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=92ee52cc38ca1a06b7b0851643314b0830f0ece9'/>
<id>92ee52cc38ca1a06b7b0851643314b0830f0ece9</id>
<content type='text'>
unique_fd's destructor potentially mangling errno makes it difficult to
use correctly in code that sets errno (or, in reality, it makes it so
that errno values get randomly stomped upon if close actually sets
errno, because no one accounts for this case).

Preserve errno ourselves to avoid this.

Test: treehugger
Change-Id: Ib06e6f65866d86fff4032b2311021eaf9226a1af
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
unique_fd's destructor potentially mangling errno makes it difficult to
use correctly in code that sets errno (or, in reality, it makes it so
that errno values get randomly stomped upon if close actually sets
errno, because no one accounts for this case).

Preserve errno ourselves to avoid this.

Test: treehugger
Change-Id: Ib06e6f65866d86fff4032b2311021eaf9226a1af
</pre>
</div>
</content>
</entry>
<entry>
<title>base: support optional flags in android::base::Pipe.</title>
<updated>2019-01-18T22:25:13+00:00</updated>
<author>
<name>Yabin Cui</name>
<email>yabinc@google.com</email>
</author>
<published>2019-01-18T19:11:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=e2841044a0eba0da363b06b37ee5265a48ef9238'/>
<id>e2841044a0eba0da363b06b37ee5265a48ef9238</id>
<content type='text'>
Bug: none
Test: build and use it manually.
Test: run libbase_tests.

Change-Id: I50b5251e8da23ddce94711807859612bf890406b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug: none
Test: build and use it manually.
Test: run libbase_tests.

Change-Id: I50b5251e8da23ddce94711807859612bf890406b
</pre>
</div>
</content>
</entry>
<entry>
<title>Libbase: NOLINT legacy unique_fd operator int</title>
<updated>2019-01-10T16:54:45+00:00</updated>
<author>
<name>Andreas Gampe</name>
<email>agampe@google.com</email>
</author>
<published>2019-01-10T16:54:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=468ffaeecfc189fe6b5548bffdf4fb6bafa49c6a'/>
<id>468ffaeecfc189fe6b5548bffdf4fb6bafa49c6a</id>
<content type='text'>
The use in implicit conversion is intentional.

Test: m
Change-Id: I6c756e772b274e8a525ba2ad792cc4a8e1fc0176
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The use in implicit conversion is intentional.

Test: m
Change-Id: I6c756e772b274e8a525ba2ad792cc4a8e1fc0176
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "base: add more error-checking overloads for unique_fd."</title>
<updated>2018-12-03T22:41:22+00:00</updated>
<author>
<name>Josh Gao</name>
<email>jmgao@google.com</email>
</author>
<published>2018-12-03T22:41:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/system_core/commit/?id=946f7d44c2df177227b7e90cb61ac1be12145e86'/>
<id>946f7d44c2df177227b7e90cb61ac1be12145e86</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
