aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-07-05 13:39:42 -0700
committerRob Landley <rob@landley.net>2016-07-05 17:29:06 -0500
commit8a34cbb5666a80153ea06ba8d59f7406f311bb7a (patch)
treefa6a291e5ba652cf8f94c2aaf6531e6a9d8f89d1 /toys
parentfd78cb48e9ac3913c451599b2a86330dcd8e3167 (diff)
downloadtoybox-8a34cbb5666a80153ea06ba8d59f7406f311bb7a.tar.gz
Don't try to guess the build id type in file(1).
They're really just arbitrary byte sequences of arbitrary length. Sure, a 20-byte sequence is _probably_ a SHA-1, but there's no way to know, so let's stop pretending...
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/file.c b/toys/posix/file.c
index d3e80f4e..0cd9047c 100644
--- a/toys/posix/file.c
+++ b/toys/posix/file.c
@@ -136,7 +136,7 @@ static void do_elf_file(int fd, struct stat *sb)
if (n_namesz==4 && !memcmp(note+12, "GNU", 4)) {
if (n_type == 3 /*NT_GNU_BUILD_ID*/) {
- printf(", BuildID[%s]=", (n_descsz==20)?"sha1":"md5");
+ printf(", BuildID=");
for (j = 0; j < n_descsz; ++j) printf("%02x", note[16 + j]);
}
} else if (n_namesz==8 && !memcmp(note+12, "Android", 8)) {