From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,b2fa99a92d87cd3f,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-04-16 14:17:28 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!204.71.34.15!news-out.cwix.com!newsfeed.cwix.com!prairie.attcanada.net!newsfeed.attcanada.net!12.127.17.144!attbt1!attbt2!ip.att.net!inet16.us.oracle.com!not-for-mail Message-ID: <3ADB5F16.983CD91F@us.oracle.com> From: Sundar Matpadi Organization: Product Server Engineering (Oracle Parallel Server) X-Mailer: Mozilla 4.76 [en] (X11; U; AIX 4.3) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Finding out the size of drd's Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 16 Apr 2001 14:07:34 -0700 NNTP-Posting-Host: 130.35.156.112 X-Trace: inet16.us.oracle.com 987456020 130.35.156.112 (Mon, 16 Apr 2001 14:20:20 PDT) NNTP-Posting-Date: Mon, 16 Apr 2001 14:20:20 PDT Xref: supernews.google.com comp.unix.tru64:2138 Hello : How to find out the size of the DRDs and its block size using IOCTL calls ? I tried using DEVGETINFO in ioctl but results seem to be not matching with the size ? Can you point what I am missing here ? Here is the code snippet : #include #include #include #include #include device_info_t mydevice; int fd; struct disklabel *disk; char rawdevice_name[50]; char buffcount[25]; strcpy (rawdevice_name, "/dev/rdrd/drd2"); if ( (fd = open(rawdevice_name, O_RDWR)) == -1) { perror ("Error in opening file "); exit(1); } ioctl (fd, DEVGETINFO, &mydevice); printf("raw device name is %s \n", rawdevice_name); printf("device capacity = %ld \n",mydevice.v1.devinfo.disk.capacity); printf("device blksiz = %ld \n",mydevice.v1.devinfo.disk.blocksz); printf("part num = %d \n",mydevice.v1.devinfo.disk.part_num); printf("ioctl done successfully"); close(fd); regards, sundar.