aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-01-25 15:50:37 (GMT)
committerandroid-build-merger <android-build-merger@google.com>2018-01-25 15:50:37 (GMT)
commitba229b4bff5f4a9ebef4a35539911f01706c0b13 (patch)
treefef59256674c677e0018b90edf6eca86cb1daabc
parent8060e56a63acc7667cc131868ef668792569216f (diff)
parente77711bf8041a58e15ab2ec89c98bff02d81597e (diff)
downloadandroid_external_toybox-ba229b4bff5f4a9ebef4a35539911f01706c0b13.zip
android_external_toybox-ba229b4bff5f4a9ebef4a35539911f01706c0b13.tar.gz
android_external_toybox-ba229b4bff5f4a9ebef4a35539911f01706c0b13.tar.bz2
Merge remote-tracking branch 'toybox/master' into HEAD
am: e77711bf80 Change-Id: Ia7b278c6f96e2a75cbbadd21366f6732e802c2cf
-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;