summaryrefslogtreecommitdiffstats
path: root/tools/fs_get_stats
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_get_stats
parent26b3ec5a689f187b3174d1f774d40d879730b729 (diff)
downloadbuild-74a81e6633276d92337749a5ee9d921207814dd4.zip
build-74a81e6633276d92337749a5ee9d921207814dd4.tar.gz
build-74a81e6633276d92337749a5ee9d921207814dd4.tar.bz2
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_get_stats')
-rw-r--r--tools/fs_get_stats/fs_get_stats.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/fs_get_stats/fs_get_stats.c b/tools/fs_get_stats/fs_get_stats.c
index a9814b9..159e2aa 100644
--- a/tools/fs_get_stats/fs_get_stats.c
+++ b/tools/fs_get_stats/fs_get_stats.c
@@ -25,11 +25,12 @@ print_help(void)
{
fprintf(stderr, "fs_get_stats: retrieve the target file stats "
"for the specified file\n");
- fprintf(stderr, "usage: fs_get_stats cur_perms is_dir filename\n");
+ fprintf(stderr, "usage: fs_get_stats cur_perms is_dir filename targetout\n");
fprintf(stderr, "\tcur_perms - The current permissions of "
"the file\n");
fprintf(stderr, "\tis_dir - Is filename is a dir, 1. Otherwise, 0.\n");
fprintf(stderr, "\tfilename - The filename to lookup\n");
+ fprintf(stderr, "\ttargetout - The target out path to query device specific FS configs\n");
fprintf(stderr, "\n");
}
@@ -42,7 +43,7 @@ main(int argc, const char *argv[])
unsigned uid = (unsigned)-1;
unsigned gid = (unsigned)-1;
- if (argc < 4) {
+ if (argc < 5) {
ERROR("Invalid arguments\n");
print_help();
exit(-1);
@@ -58,7 +59,7 @@ main(int argc, const char *argv[])
is_dir = 1;
uint64_t capabilities;
- fs_config(argv[3], is_dir, &uid, &gid, &perms, &capabilities);
+ fs_config(argv[3], is_dir, argv[4], &uid, &gid, &perms, &capabilities);
fprintf(stdout, "%d %d 0%o\n", uid, gid, perms);
return 0;