Swapon cannot get it right, when swap device does not exist.
Dennis Olsson
doss at thor.UUCP
Tue Jul 23 11:11:46 AEST 1985
Index: /usr/src/etc/swapon.c
/etc/swapon
Description:
When adding a non existing device (or the default swap
device), swapon gives a wrong message.
Repeat-By:
Try: /etc/swapon -a
Your swapon is *not* okay, if it reports something like:
Adding /dev/ra0b as swap device
No such device: \c
but it's okay, if the answer is something like:
Adding /dev/ra0b as swap device
/dev/ra0b: No such device
Fix:
The bug is due to a little omission of an argument in the
printf-statement, reporting the non existing file/device.
*** swapon.c Fri Dec 7 17:09:16 1984
--- swapon.c-orig Wed Jun 9 05:10:51 1982
***************
*** 27,33
if (syscall(VSWAPON, fsp->fs_spec) == -1) {
extern errno;
extern char *sys_errlist[];
! printf("%s: %s\n", fsp->fs_spec,
sys_errlist[errno]);
stat = 1;
}
--- 27,33 -----
if (syscall(VSWAPON, fsp->fs_spec) == -1) {
extern errno;
extern char *sys_errlist[];
! printf("%s: %s\n",
sys_errlist[errno]);
stat = 1;
}
---------
Snail: Dennis Olsson, DIKU, Sigurdsgade 41, DK-2200 Copenhagen N, Denmark.
UUCP: ..mcvax!diku!doss +45 1 83 62 57 ext. 13.
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list