[Toybox] misleading ls error output

enh enh at google.com
Fri Oct 23 19:50:34 PDT 2015


"ls /some-directory-you-can't-access" claims the problem is a bad file
descriptor...

newfstatat(AT_FDCWD, "/data", {st_mode=S_IFDIR|0771, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/data", O_RDONLY)     = -1 EACCES (Permission denied)
dup(-1)                                 = -1 EBADF (Bad file descriptor)
mprotect(0x7fb3a50000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0x7fb3a50000, 4096, PROT_READ) = 0
write(2, "ls: ", 4ls: )                     = 4
write(2, "No /data", 8No /data)                 = 8
write(2, ": Bad file descriptor", 21: Bad file descriptor)   = 21
write(2, "\n", 1
)                       = 1

-- 
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.

 1445655034.0


More information about the Toybox mailing list