From owner-freebsd-current Fri Jan 22 01:32:50 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA15305 for freebsd-current-outgoing; Fri, 22 Jan 1999 01:32:50 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from uni-sb.de (uni-sb.de [134.96.252.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA15287 for ; Fri, 22 Jan 1999 01:32:48 -0800 (PST) (envelope-from netchild@wurzelausix.CS.Uni-SB.DE) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.252.31]) by uni-sb.de (8.9.2/1999010400) with ESMTP id JAA04286 for ; Fri, 22 Jan 1999 09:43:14 +0100 (CET) Received: from wurzelausix (wurzelausix.cs.uni-sb.de [134.96.247.1]) by cs.uni-sb.de (8.9.2/1999010400) with ESMTP id JAA00935 for ; Fri, 22 Jan 1999 09:43:14 +0100 (CET) Received: from wurzelausix.cs.uni-sb.de (IDENT:C83DmvzmqOxGkjgZ6E68lmXmnCKJja5b@localhost [127.0.0.1]) by wurzelausix (8.9.1/wjp/19980821) with ESMTP id JAA22269 for ; Fri, 22 Jan 1999 09:43:11 +0100 (CET) Message-Id: <199901220843.JAA22269@wurzelausix> Date: Fri, 22 Jan 1999 09:43:08 +0100 (CET) From: Alexander Leidinger Subject: Re: readdir & cd9660 & direntp->d_type == bug (more) To: current@FreeBSD.ORG In-Reply-To: <199901191951.UAA01392@Vodix.CS.Uni-SB.de> MIME-Version: 1.0 Content-Type: MULTIPART/mixed; BOUNDARY="-559023410-851401618-916994593=:22089" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG ---559023410-851401618-916994593=:22089 Content-Type: TEXT/plain; CHARSET=US-ASCII Hi, attached is the source of a test program. With the CD of my ISDN card it produces: {0} (15) netchild@ttyp1 > ./dirtest /cdrom /cdrom: . (type: unknown) .. (type: unknown) autorun.inf (type: unknown) cardware (type: unknown) doku (type: unknown) fritz.ico (type: unknown) fritz! (type: unknown) intro.hlp (type: unknown) online (type: unknown) tools (type: unknown) winport (type: unknown) {0} (16) netchild@ttyp1 > ls -l /cdrom total 173 -r-xr-xr-x 1 root wheel 54 22 Mai 1998 autorun.inf dr-xr-xr-x 1 root wheel 2048 27 Mai 1998 cardware dr-xr-xr-x 1 root wheel 2048 27 Mai 1998 doku dr-xr-xr-x 1 root wheel 2048 27 Mai 1998 fritz! -r-xr-xr-x 1 root wheel 766 15 Mai 1998 fritz.ico -r-xr-xr-x 1 root wheel 75833 22 Mai 1998 intro.hlp dr-xr-xr-x 1 root wheel 2048 27 Mai 1998 online dr-xr-xr-x 1 root wheel 2048 27 Mai 1998 tools dr-xr-xr-x 1 root wheel 2048 27 Mai 1998 winport Every other CD I tried shows similar results. With ufs or msdos it displays the correct type (dir, reg, ...). FreeBSD 4.0-CURRENT #0: Thu Jan 21 Bye, Alexander. -- http://netchild.home.pages.de A.Leidinger @ wurzelausix.cs.uni-sb.de ---559023410-851401618-916994593=:22089 Content-Type: APPLICATION/octet-stream Content-Description: dirtest.c #define _POSIX_SOURCE #include #include #include char *types[] = { "unknown", "fifo", "chr", "not defined", "dir", "not defined", "blk", "not defined", "reg", "not defined", "lnk", "not defined", "sock", "not defined", "wht" }; int main(int argc, char **argv) { DIR *dir_p; struct dirent *dent_p; if(argc != 2) printf("%s \n", argv[0]); dir_p = opendir(argv[1]); if(!dir_p) exit(1); printf("\n%s:\n", argv[1]); while((dent_p = readdir(dir_p))) { printf("%-40s (type: %s)\n", dent_p->d_name, types[dent_p->d_type]); } if(closedir(dir_p) == -1) perror("Shit happens"); return 0; } ---559023410-851401618-916994593=:22089-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message