Readlink bug in Sun OS 3.2
Fred Fish
fnf at mcdsun.UUCP
Sun Nov 16 06:22:49 AEST 1986
[Is there a sun specific newsgroup under the new usenet organization, other
than mod.computers.sun?]
/*
* DESCRIPTION
*
* The readlink() call may return garbage when its first argument
* is one of the special files in /dev.
*
* SUN OS REVISION
*
* 3.2 SUNBIN DOMESTIC 68020
* Part Number: 700-1255-04 Rev. A
*
* EXAMPLES
*
* readlink("/dev/MAKEDEV",buf,256) = -1 (this one OK)
* readlink("/dev/drum",buf,256) = -251657448
* readlink("/dev/eeprom",buf,256) = -251657444
* readlink("/dev/ptyr8",buf,256) = 1800920064
* readlink("/dev/ttypa",buf,256) = 256
* readlink("/dev/ttyq9",buf,256) = -251954472
* readlink("/dev/vme32d32",buf,256) = -251657444
* readlink("/dev/win24",buf,256) = 1552145408
* readlink("/dev/win45",buf,256) = -252289660
*
* COMMENTS
*
* Running it a second time with the same arguments may return
* a different value.
*
*/
#define BUFSZ 256
main (argc,argv)
int argc;
char *argv[];
{
int rtnval;
char buf[BUFSZ];
rtnval = readlink (argv[1], buf, BUFSZ);
printf ("readlink(\"%s\",buf,%d) = %d\n", argv[1], BUFSZ, rtnval);
}
--
===========================================================================
Fred Fish Motorola Computer Division, 3013 S 52nd St, Tempe, Az 85282 USA
{mcdsun,well}!fnf (602) 438-5976
===========================================================================
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list