execve("/system/xbin/lsscsi", ["lsscsi"], 0x7fcdeb06c0 /* 24 vars *//data/local/tmp/strace: [ Process PID=32427 runs in 32 bit mode. ]
/data/local/tmp/strace: WARNING: Proper structure decoding for this personality is not supported, please consider building strace with mpers support enabled.
) = 0
set_tid_address(0x1560b0) = 32427
set_tls(0x1562ec) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6f02000
madvise(0xf6f02000, 8192, MADV_MERGEABLE) = -1 EINVAL (Invalid argument)
sigaltstack({ss_sp=0xf6f02000, ss_flags=0x2000 /* SS_??? */, ss_size=18428009392004661248}, NULL) = 0
openat(AT_FDCWD, "/dev/__properties__", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, 0xffbd7030) = 0
mmap2(NULL, 4780, PROT_READ, MAP_SHARED, 3, 0) = -1 ENODEV (No such device)
close(3) = 0
mprotect(0x150000, 16384, PROT_READ) = 0
brk(NULL) = 0x84a000
mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6e02000
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0xf6e02000, 1048576, "libc_malloc") = 0
munmap(0xf6e02000, 1048576) = 0
mmap2(NULL, 2093056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6d03000
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0xf6d03000, 2093056, "libc_malloc") = 0
munmap(0xf6d03000, 1036288) = 0
munmap(0xf6f00000, 8192) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6f01000
mprotect(0xf6f01000, 4096, PROT_READ) = 0
openat(AT_FDCWD, "/proc/stat", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, 0xffbd6e58) = 0
mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6d00000
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0xf6d00000, 1048576, "libc_malloc") = 0
mprotect(0xf6f01000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xf6f01000, 4096, PROT_READ) = 0
read(3, "cpu 14894954 2971036 11984155 1"..., 1024) = 1024
read(3, "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 "..., 1024) = 1024
read(3, " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"..., 1024) = 693
read(3, "", 1024) = 0
close(3) = 0
mprotect(0xf6f01000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xf6f01000, 4096, PROT_READ) = 0
chdir("/sys/bus/scsi/devices") = 0
openat(AT_FDCWD, ".", O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 3
getdents64(3, /* 13 entries */, 4200) = 400
chdir("0:0:0:5") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "0\n", 246) = 2
read(4, "", 244) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 244) = 17
read(4, "", 227) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 228) = 5
read(4, "", 223) = 0
close(4) = 0
fstat64(1, 0xffbd68f0) = 0
mprotect(0xf6f01000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xf6f01000, 4096, PROT_READ) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "[0:0:0:5]\tdisk\tSAMSUNG\tKM8V7001J"..., 44[0:0:0:5] disk SAMSUNG KM8V7001JM-B810 0900
) = 44
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:3") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "0\n", 246) = 2
read(4, "", 244) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 244) = 17
read(4, "", 227) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 228) = 5
read(4, "", 223) = 0
close(4) = 0
write(1, "[0:0:0:3]\tdisk\tSAMSUNG\tKM8V7001J"..., 44[0:0:0:3] disk SAMSUNG KM8V7001JM-B810 0900
) = 44
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:1") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "0\n", 246) = 2
read(4, "", 244) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 244) = 17
read(4, "", 227) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 228) = 5
read(4, "", 223) = 0
close(4) = 0
write(1, "[0:0:0:1]\tdisk\tSAMSUNG\tKM8V7001J"..., 44[0:0:0:1] disk SAMSUNG KM8V7001JM-B810 0900
) = 44
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:49488") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "30\n", 246) = 3
read(4, "", 243) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 243) = 17
read(4, "", 226) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 227) = 5
read(4, "", 222) = 0
close(4) = 0
write(1, "[0:0:0:49488]\twlun\tSAMSUNG\tKM8V7"..., 48[0:0:0:49488] wlun SAMSUNG KM8V7001JM-B810 0900
) = 48
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:49476") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "30\n", 246) = 3
read(4, "", 243) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 243) = 17
read(4, "", 226) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 227) = 5
read(4, "", 222) = 0
close(4) = 0
write(1, "[0:0:0:49476]\twlun\tSAMSUNG\tKM8V7"..., 48[0:0:0:49476] wlun SAMSUNG KM8V7001JM-B810 0900
) = 48
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:49456") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "30\n", 246) = 3
read(4, "", 243) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 243) = 17
read(4, "", 226) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 227) = 5
read(4, "", 222) = 0
close(4) = 0
write(1, "[0:0:0:49456]\twlun\tSAMSUNG\tKM8V7"..., 48[0:0:0:49456] wlun SAMSUNG KM8V7001JM-B810 0900
) = 48
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:4") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "0\n", 246) = 2
read(4, "", 244) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 244) = 17
read(4, "", 227) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 228) = 5
read(4, "", 223) = 0
close(4) = 0
write(1, "[0:0:0:4]\tdisk\tSAMSUNG\tKM8V7001J"..., 44[0:0:0:4] disk SAMSUNG KM8V7001JM-B810 0900
) = 44
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:2") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "0\n", 246) = 2
read(4, "", 244) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 244) = 17
read(4, "", 227) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 228) = 5
read(4, "", 223) = 0
close(4) = 0
write(1, "[0:0:0:2]\tdisk\tSAMSUNG\tKM8V7001J"..., 44[0:0:0:2] disk SAMSUNG KM8V7001JM-B810 0900
) = 44
chdir("/sys/bus/scsi/devices") = 0
chdir("0:0:0:0") = 0
openat(AT_FDCWD, "vendor", O_RDONLY|O_LARGEFILE) = 4
read(4, "SAMSUNG \n", 254) = 9
read(4, "", 245) = 0
close(4) = 0
openat(AT_FDCWD, "type", O_RDONLY|O_LARGEFILE) = 4
read(4, "0\n", 246) = 2
read(4, "", 244) = 0
close(4) = 0
openat(AT_FDCWD, "model", O_RDONLY|O_LARGEFILE) = 4
read(4, "KM8V7001JM-B810 \n", 244) = 17
read(4, "", 227) = 0
close(4) = 0
openat(AT_FDCWD, "rev", O_RDONLY|O_LARGEFILE) = 4
read(4, "0900\n", 228) = 5
read(4, "", 223) = 0
close(4) = 0
write(1, "[0:0:0:0]\tdisk\tSAMSUNG\tKM8V7001J"..., 44[0:0:0:0] disk SAMSUNG KM8V7001JM-B810 0900
) = 44
chdir("/sys/bus/scsi/devices") = 0
getdents64(3, /* 0 entries */, 4200) = 0
mprotect(0xf6f01000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xf6f01000, 4096, PROT_READ) = 0
mprotect(0xf6f01000, 4096, PROT_READ|PROT_WRITE) = 0
mprotect(0xf6f01000, 4096, PROT_READ) = 0
munmap(0xf6f01000, 4096) = 0
exit_group(0) = ?
+++ exited with 0 +++
:/ # lsscsi
[0:0:0:5] disk SAMSUNG KM8V7001JM-B810 0900
[0:0:0:3] disk SAMSUNG KM8V7001JM-B810 0900
[0:0:0:1] disk SAMSUNG KM8V7001JM-B810 0900
[0:0:0:49488] wlun SAMSUNG KM8V7001JM-B810 0900
[0:0:0:49476] wlun SAMSUNG KM8V7001JM-B810 0900
[0:0:0:49456] wlun SAMSUNG KM8V7001JM-B810 0900
[0:0:0:4] disk SAMSUNG KM8V7001JM-B810 0900
[0:0:0:2] disk SAMSUNG KM8V7001JM-B810 0900
[0:0:0:0] disk SAMSUNG KM8V7001JM-B810 0900
没有列出最后一列主设备节点名称,不过可以通过/sys/bus/scsi/devices目录里的信息看到
标签:busybox,4read,strace,0close,LARGEFILE,RDONLY,0openat,FDCWD,lsscsi From: https://www.cnblogs.com/hhdom/p/18019972