logoalt Hacker News

JdeBPtoday at 7:28 AM2 repliesview on HN

In Unix Seventh Edition, ls and others read directory entries with fread() and parsed the struct direct themselves in application-mode code. The C library and application mode matter, here.

On the gripping hand, there is no strncpy in the Spinellis 7th Edition source code; 4.2BSD was using strncpy() inside readdir() in 1982, though.


Replies

jibaltoday at 7:48 AM

login used it, but not for directory entries:

https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/lo...

The code, but not the function, occurred in multiple places in the V6 kernel and userland.

show 1 reply