[448] in testers
Re: Attach has fatal bug
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Mon Dec 11 12:26:10 1989
Date: Mon, 11 Dec 89 12:25:46 -0500
From: Theodore Ts'o <tytso@ATHENA.MIT.EDU>
To: epeisach@ATHENA.MIT.EDU
Cc: testers@ATHENA.MIT.EDU
In-Reply-To: Ezra Peisach's message of Mon, 11 Dec 89 09:54:39 -0500,
Reply-To: tytso@ATHENA.MIT.EDU
From: epeisach@ATHENA.MIT.EDU
Date: Mon, 11 Dec 89 09:54:39 -0500
smash% attach -m /mnt2 bldg66-vssys-63b
bldg66-vssys-63b: Can't mount ZPPPYPYXU zQYhBYPYoZ on /mnt2 - No such
file or directory
This is a fatal bug.
This is because I didn't have a chance to test out attach linked against
the new libc, which apparently has an int sprintf() instead of a char
*sprintf(). Unfortunately, the cruft-ridden rvd code had a dependency
on what sprintf returns...
If it hasn't been done yet, it may be a wise idea to send out a warning
to developers in case they have code that depends on what sprintf
returns.
- Ted
P.S. Note the notation in the old stdio.h:
char *sprintf(); /* too painful to do right */
Patch follows:
RCS file: RCS/rvdlib.h,v
retrieving revision 2.0
diff -c -r2.0 rvdlib.h
*** /tmp/,RCSt1015748 Mon Dec 11 12:10:40 1989
--- rvdlib.h Mon Dec 11 12:07:12 1989
***************
*** 37,45 ****
#define RVD_GETM "/etc/athena/rvdgetm","rvdgetm"
#define RVD_GETMOTD "operation=get_message\n"
! #define vdnam(_d_,_n_) ((char *)sprintf((_d_),"/dev/vd%da",(_n_)))
! #define rvdnam(_d_,_n_) ((char *)sprintf((_d_),"/dev/rvd%da",(_n_)))
#define VDCONTROL "/dev/rvdcontrol"
#endif
--- 37,45 ----
#define RVD_GETM "/etc/athena/rvdgetm","rvdgetm"
#define RVD_GETMOTD "operation=get_message\n"
! #define vdnam(_d_,_n_) (((void)sprintf((_d_),"/dev/vd%da",(_n_))),_d_)
! #define rvdnam(_d_,_n_) (((void)sprintf((_d_),"/dev/rvd%da",(_n_))),_d_)
#define VDCONTROL "/dev/rvdcontrol"
#endif