summaryrefslogtreecommitdiffstats
path: root/toolbox/lsof.c
Commit message (Collapse)AuthorAgeFilesLines
* toolbox: turn on -WerrorMark Salyzyn2014-05-141-3/+0
| | | | | | | | | - Deal with some signedness issues - Deal with some size issues - Deal with NULL pointer issues - Deal with some -Wunused issues Change-Id: I1479dd90d690084491bae3475f2c547833519a57
* fix: making lsof show devies and loaded .so file names correctlyDmitriy Ivanov2014-03-041-1/+1
| | | | Change-Id: I4b6f2e0015f8cfa18400fa4bd08460a07e29a51b
* fix strncat misuseNick Kralevich2013-06-031-9/+9
| | | | | | | | | | | | | | | | The third argument of strncat() tells how much data to append from src, not the total size of the buffer. Change uses of strncat() to strlcat(), which has the buffer overflow protection behavior intended by the original author. This fixes the following compiler warning: In function 'strncat', inlined from 'print_type' at system/core/toolbox/lsof.c:76:12: bionic/libc/include/string.h:142:5: warning: call to __builtin___strncat_chk might overflow destination buffer [enabled by default] Change-Id: Id69edc641de3cb87d1867a409cd57b04b12f90a7
* Use strlcpy instead of strncpyKenny Root2011-12-011-8/+9
| | | | | | Also make sure the read cmdline is terminated with a null byte. Change-Id: I6b4aa197ce9bc072a912b7163e8616a03b39c3fe
* lsof: Print process user name.Jeff Brown2011-06-291-7/+29
| | | | Change-Id: I6e96faba894ad8c2eeb06e514d332c8ab2ec52f0
* lsof: Add support for printing open files for a single processMike Lockwood2010-12-221-16/+25
| | | | | Change-Id: If2afa0937064dffca6df2a8642ca75009dc6e70e Signed-off-by: Mike Lockwood <lockwood@android.com>
* Add basic lsof commandKenny Root2010-07-271-0/+223
Basic "list open files" command. Supports reading all processes for their "exe", "cwd", "root", and "fd" entries. Change-Id: I2e2f0911dd65a1993aa1ce9f51222bf264a9d68d