aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/lsof.c
AgeCommit message (Collapse)Author
2019-08-09lsof: simplify octal mode display.Elliott Hughes
Since this masks, it doesn't actually have the same bug as e5942a8c90c2f52550496fdf08efddb564d8e5a3, but we may as well fix the other example of that questionable idiom while we're thinking about it...
2017-08-17lsof cleanup.Rob Landley
2016-06-12Finish switching to dev_major/dev_minor.Elliott Hughes
7ca5dc4232b9ac5ee5cd25c8b5b33a58904cd251 didn't switch all callers over to the new functions.
2016-03-19Make lsof 10x faster by caching /proc/net socket info.Elliott Hughes
I deliberately didn't do this first time round because for me our lsof is already 10x faster than traditional lsof, and caching means we potentially give less information about a socket that's created while we're running. It turns out that traditional lsof caches anyway, so I guess nobody cares. This also fixes a mistake where lsof used CFG_FREE instead of CFG_TOYBOX_FREE.
2016-03-02More minor cleanup (inline a function, simplify name of another).Rob Landley
2016-02-21lsof cleanupRob Landley
Accept multiple -p, inline filter_matches, convert misleading "char* a, b" to "char *a, b", use readfile() to read a file, use DIRTREE_SHUTUP, don't need { } around a single line, don't modify command line environment space (which changes what ps/pgrep sees).
2015-11-02Add ps -Z.Elliott Hughes
As with ls, it doesn't seem like -Z should be guarded behind LSM availability. On a non-SELinux system, the label is always "unconfined".
2015-10-06Decode netlink sockets in lsof.Elliott Hughes
Refactor the /proc/net parsing so this only adds 7 lines overall. Also clear the DEVICE field for sockets and fix alignment for long usernames (until someone implements the two-pass output that measures columns).
2015-09-08i already did -l and -t, the positive side of -p, plus name filtering...Elliott Hughes
2015-09-03Implement lsof.Elliott Hughes
This is a superset of the current AOSP lsof (which is itself a superset of the lsof in Android M). It fixes several bugs/misfeatures and adds support for decoding IPv4/IPv6 tcp/udp/raw sockets and Unix domain sockets.