diff options
author | Tom Cherry <tomcherry@google.com> | 2018-03-01 11:00:57 -0800 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2018-03-01 11:14:02 -0800 |
commit | 69d47aa829fa5a48baeadeff0e04d03e58f147b7 (patch) | |
tree | 1a0a12df0d8c8f9cd49cf418b65464dc90bab7bd /init/host_init_stubs.cpp | |
parent | 45ee43b1acadc9635a547e41dcaf734f66678890 (diff) | |
download | system_core-69d47aa829fa5a48baeadeff0e04d03e58f147b7.tar.gz system_core-69d47aa829fa5a48baeadeff0e04d03e58f147b7.tar.bz2 system_core-69d47aa829fa5a48baeadeff0e04d03e58f147b7.zip |
Clean up property set error handling
Currently we only report why a property set call has failed but drop
the context of what was trying to set the property. This change
adds information about why a property was trying to be set when it
fails.
It also unifies property_set() within init to go through the same
HandlePropertySet() function as normal processes do, removing unneeded
special cases.
Test: boot bullhead
Test: attempt to set invalid properties and see better error messages
Change-Id: I5cd3a40086fd3b226e9c8a5e3a84cb3b31399c0d
Diffstat (limited to 'init/host_init_stubs.cpp')
-rw-r--r-- | init/host_init_stubs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/host_init_stubs.cpp b/init/host_init_stubs.cpp index cde747de0..e6cc08a9a 100644 --- a/init/host_init_stubs.cpp +++ b/init/host_init_stubs.cpp @@ -43,8 +43,8 @@ std::string default_console = "/dev/console"; // property_service.h uint32_t (*property_set)(const std::string& name, const std::string& value) = nullptr; -uint32_t HandlePropertySet(const std::string&, const std::string&, const std::string&, - const ucred&) { +uint32_t HandlePropertySet(const std::string&, const std::string&, const std::string&, const ucred&, + std::string*) { return 0; } |