aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-01-28 08:23:22 (GMT)
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-01-28 08:23:22 (GMT)
commit0a2c8096fe6d13e69c7c9ce5bef2e6490757559f (patch)
treefef59256674c677e0018b90edf6eca86cb1daabc
parent3790963956000aa5057a5b2232cf72fd73b16725 (diff)
parente110708ca21eea63c6d0651c7f9cdc3ed830cb78 (diff)
downloadandroid_external_toybox-0a2c8096fe6d13e69c7c9ce5bef2e6490757559f.zip
android_external_toybox-0a2c8096fe6d13e69c7c9ce5bef2e6490757559f.tar.gz
android_external_toybox-0a2c8096fe6d13e69c7c9ce5bef2e6490757559f.tar.bz2
Snap for 4571561 from e110708ca21eea63c6d0651c7f9cdc3ed830cb78 to pi-release
Change-Id: Ide1bc572a0ccef98e985dc4b9c56e944d3aef4e9
-rwxr-xr-xtests/losetup.test4
-rw-r--r--toys/posix/ps.c7
2 files changed, 4 insertions, 7 deletions
diff --git a/tests/losetup.test b/tests/losetup.test
index 651c693..c929250 100755
--- a/tests/losetup.test
+++ b/tests/losetup.test
@@ -13,8 +13,8 @@ fi
truncate -s 1M blah.img &&
FILE="$(readlink -f blah.img)"
-DEV="$(printf '%04d' $(stat -t blah.img | awk '{print $7}'))"
-NODE="$(awk '{print $7}')"
+DEV="$(printf '%04s' $(stat -t blah.img | awk '{print $7}'))"
+NODE="$(stat -t blah.img | awk '{print $8}')"
losetup -f
losetup -f -s
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 7741dcd..fd9b54b 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -680,11 +680,8 @@ static int get_ps(struct dirtree *new)
memset(slot, 0, sizeof(tb->slot));
tb->slot[SLOT_tid] = *slot = atol(new->name);
- if (TT.threadparent && TT.threadparent->extra) {
- *slot = *(((struct carveup *)TT.threadparent->extra)->slot);
- // Parent also shows up as a thread, discard duplicate
- if (*slot == tb->slot[SLOT_tid]) return 0;
- }
+ if (TT.threadparent && TT.threadparent->extra)
+ if (*slot == *(((struct carveup *)TT.threadparent->extra)->slot)) return 0;
fd = dirtree_parentfd(new);
len = 2048;