@@ -422,6 +422,12 @@ s_no_extra_traits! {
422422 pub ivlen: u32 ,
423423 pub iv: [ :: c_uchar; 0 ] ,
424424 }
425+
426+ pub struct prop_info {
427+ __name: [ :: c_char; 32 ] ,
428+ __serial: :: c_uint,
429+ __value: [ [ :: c_char; 4 ] ; 23 ] ,
430+ }
425431}
426432
427433cfg_if ! {
@@ -740,6 +746,24 @@ cfg_if! {
740746 self . as_slice( ) . hash( state) ;
741747 }
742748 }
749+
750+ impl PartialEq for prop_info {
751+ fn eq( & self , other: & prop_info) -> bool {
752+ self . __name == other. __name &&
753+ self . __serial == other. __serial &&
754+ self . __value == other. __value
755+ }
756+ }
757+ impl Eq for prop_info { }
758+ impl :: fmt:: Debug for prop_info {
759+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
760+ f. debug_struct( "prop_info" )
761+ . field( "__name" , & self . __name)
762+ . field( "__serial" , & self . __serial)
763+ . field( "__value" , & self . __value)
764+ . finish( )
765+ }
766+ }
743767 }
744768}
745769
@@ -2412,6 +2436,7 @@ pub const PF_VSOCK: ::c_int = AF_VSOCK;
24122436
24132437// sys/system_properties.h
24142438pub const PROP_VALUE_MAX : :: c_int = 92 ;
2439+ pub const PROP_NAME_MAX : :: c_int = 32 ;
24152440
24162441f ! {
24172442 pub fn CMSG_NXTHDR ( mhdr: * const msghdr,
@@ -2864,6 +2889,12 @@ extern "C" {
28642889
28652890 pub fn __system_property_set ( __name : * const :: c_char , __value : * const :: c_char ) -> :: c_int ;
28662891 pub fn __system_property_get ( __name : * const :: c_char , __value : * mut :: c_char ) -> :: c_int ;
2892+ pub fn __system_property_find ( __name : * const :: c_char ) -> * const prop_info ;
2893+ pub fn __system_property_find_nth ( __n : :: c_uint ) -> * const prop_info ;
2894+ pub fn __system_property_foreach (
2895+ __callback : unsafe extern "C" fn ( __pi : * const prop_info , __cookie : * mut :: c_void ) ,
2896+ __cookie : * mut :: c_void ,
2897+ ) -> :: c_int ;
28672898
28682899 // #include <link.h>
28692900 /// Only available in API Version 21+
0 commit comments