Date: Sat, 30 May 1998 15:00:56 -0700 (PDT) From: ian@nmsu.edu To: freebsd-gnats-submit@FreeBSD.ORG Subject: bin/6799: problem with open(2) in libc_r and opening tape device Message-ID: <199805302200.PAA11636@hub.freebsd.org>
index | next in thread | raw e-mail
>Number: 6799
>Category: bin
>Synopsis: problem with open(2) in libc_r and opening tape device
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat May 30 15:10:00 PDT 1998
>Last-Modified:
>Originator: Ian Logan
>Organization:
New Mexico State University
>Release: 2.2.6 from the April-98 CDset
>Environment:
FreeBSD kona 2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #0: Wed Mar 25 02:28:49 GMT 1998
jkh@time.cdrom.com:/usr/src/sys/compile/GENERIC i386
>Description:
I am trying to open a tape device for reading(or writting doesn't seem
to matter), if I link with the normal C library everything works great.
If I link with libc_r I get a "inappropriate ioctl for device mesage".
I am using a K6, with 64MB of memory, a Buslogic BT948 SCSI card, and
a Seagate STT8000N tape drive. Everything on the machine is straight off
the CD.
>How-To-Repeat:
The following program demonstrates the bug everytime, here is how I'm
compiling and running it.
% cc -DREENTRANT bug.c
% ./a.out
% cc -DREENTRANT bug.c -lc_r
% ./a.out
Open:: Inappropriate ioctl for device
And here is the source:
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
int main (void){
int handle;
handle=open("/dev/nrst0",O_RDWR);
if(handle == -1){
perror("Open:");
return(1);
}else{
close(handle);
}
}
>Fix:
I don't have a fix for it at this time.
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805302200.PAA11636>
