* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.noredist.c%
* @(#)ls.c 7.1 (Berkeley) %G%
if ((i
= open(line
, 0)) < 0)
printf("Cant open directory %s\n", line
);
register struct direct
*dp
;
while (read(io
, buf
, DIRBLKSIZ
) > 0) {
for (off
= 0 ; off
< DIRBLKSIZ
; off
+= dp
->d_reclen
) {
dp
= (struct direct
*)(off
+ (int) buf
);
printf("%d\t", dp
->d_ino
);
printf("%s\n", dp
->d_name
);