Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site thor.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!diku!thor!doss From: doss@thor.UUCP (Dennis Olsson) Newsgroups: net.bugs.4bsd Subject: Swapon cannot get it right, when swap device does not exist. Message-ID: <667@thor.UUCP> Date: Mon, 22-Jul-85 21:11:46 EDT Article-I.D.: thor.667 Posted: Mon Jul 22 21:11:46 1985 Date-Received: Fri, 26-Jul-85 00:45:02 EDT Organization: DIKU, U of Copenhagen, DK Lines: 47 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.