summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2015-07-09 09:50:31 -0700
committerThierry Strudel <tstrudel@google.com>2015-07-09 21:47:07 -0700
commitdf33ffadd29ed02d87e87515626b673eac67f735 (patch)
tree977968b729fc9fc38859633f12d23dd9f4ba02be /adb
parenteb528dd5a152d66216b9a2793a3619a65411950c (diff)
downloadsystem_core-df33ffadd29ed02d87e87515626b673eac67f735.zip
system_core-df33ffadd29ed02d87e87515626b673eac67f735.tar.gz
system_core-df33ffadd29ed02d87e87515626b673eac67f735.tar.bz2
fs_config: replace getenv('OUT') by new fs_config parameter
Using a getenv('OUT') in such a deep down function is a wrong design choice. Replacing with explicit parameter that may be NULL in case device specific files can be accessed from /. Since TARGET_COPY_OUT_SYSTEM may be defined to something different than system we also ensure that we use a path relative to TARGET_OUT to compute path to fs_config_* files. Bug: 21989305 Bug: 22048934 Change-Id: Id91bc183b29beac7379d1117ad83bd3346e6897b Signed-off-by: Thierry Strudel <tstrudel@google.com>
Diffstat (limited to 'adb')
-rw-r--r--adb/file_sync_service.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/file_sync_service.cpp b/adb/file_sync_service.cpp
index e8e9a0f..5d17335 100644
--- a/adb/file_sync_service.cpp
+++ b/adb/file_sync_service.cpp
@@ -57,7 +57,7 @@ static int mkdirs(char *name)
if(x == 0) return 0;
*x = 0;
if (should_use_fs_config(name)) {
- fs_config(name, 1, &uid, &gid, &mode, &cap);
+ fs_config(name, 1, NULL, &uid, &gid, &mode, &cap);
}
ret = adb_mkdir(name, mode);
if((ret < 0) && (errno != EEXIST)) {
@@ -366,7 +366,7 @@ static int do_send(int s, char *path, char *buffer)
tmp++;
}
if (should_use_fs_config(path)) {
- fs_config(tmp, 0, &uid, &gid, &mode, &cap);
+ fs_config(tmp, 0, NULL, &uid, &gid, &mode, &cap);
}
return handle_send_file(s, path, uid, gid, mode, buffer, do_unlink);
}