summaryrefslogtreecommitdiffstats
path: root/tools/fs_config
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2015-07-09 09:54:55 -0700
committerThierry Strudel <tstrudel@google.com>2015-07-10 10:55:54 -0700
commit74a81e6633276d92337749a5ee9d921207814dd4 (patch)
tree5076db7d8d014819a8a0a97de80359693ef7e050 /tools/fs_config
parent26b3ec5a689f187b3174d1f774d40d879730b729 (diff)
downloadbuild-74a81e6633276d92337749a5ee9d921207814dd4.tar.gz
build-74a81e6633276d92337749a5ee9d921207814dd4.tar.bz2
build-74a81e6633276d92337749a5ee9d921207814dd4.zip
fix device specific fs_config on build server
fs_config function from libcutils, in order to properly set the xattr FS used to define device specific uid, gid, permissions and capabilities, now needs TARGET_OUT make variable to be passed explicitly to all tools using it: fs_config fs_get_stats used by mktarball.sh make_ext4fs used by mkuserimg.sh mksquashfs used by mksquashfsimage.sh Bug: 21989305 Bug: 22048934 Change-Id: I6caf9cf870882fce2ead93027767092c29b75ded Signed-off-by: Thierry Strudel <tstrudel@google.com>
Diffstat (limited to 'tools/fs_config')
-rw-r--r--tools/fs_config/fs_config.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/fs_config/fs_config.c b/tools/fs_config/fs_config.c
index f594c1e93..b9a14e172 100644
--- a/tools/fs_config/fs_config.c
+++ b/tools/fs_config/fs_config.c
@@ -68,16 +68,17 @@ static struct selabel_handle* get_sehnd(const char* context_file) {
}
static void usage() {
- fprintf(stderr, "Usage: fs_config [-S context_file] [-C]\n");
+ fprintf(stderr, "Usage: fs_config [-D product_out_path] [-S context_file] [-C]\n");
}
int main(int argc, char** argv) {
char buffer[1024];
const char* context_file = NULL;
+ const char* product_out_path = NULL;
struct selabel_handle* sehnd = NULL;
int print_capabilities = 0;
int opt;
- while((opt = getopt(argc, argv, "CS:")) != -1) {
+ while((opt = getopt(argc, argv, "CS:D:")) != -1) {
switch(opt) {
case 'C':
print_capabilities = 1;
@@ -85,6 +86,9 @@ int main(int argc, char** argv) {
case 'S':
context_file = optarg;
break;
+ case 'D':
+ product_out_path = optarg;
+ break;
default:
usage();
exit(EXIT_FAILURE);
@@ -115,7 +119,7 @@ int main(int argc, char** argv) {
unsigned uid = 0, gid = 0, mode = 0;
uint64_t capabilities;
- fs_config(buffer, is_dir, &uid, &gid, &mode, &capabilities);
+ fs_config(buffer, is_dir, product_out_path, &uid, &gid, &mode, &capabilities);
printf("%s %d %d %o", buffer, uid, gid, mode);
if (sehnd != NULL) {