/* Copyright (c) 1982 Regents of the University of California */
static char sccsid
[] = "@(#)opendir.c 4.2 %G%";
dirp
= (DIR *)malloc(sizeof(DIR));
dirp
->dd_fd
= open(name
, 0);
fstat(dirp
->dd_fd
, &sbuf
);
if ((sbuf
.st_mode
& S_IFDIR
) == 0) {