a bug in u386mon & what is sys3b(2) ???????

Heiko Blume src at scuzzy.uucp
Tue Jul 17 09:14:29 AEST 1990


this is under interactive 2.0.2:
i have discovered sort of a bug in the recently posted u386mon program
(version 1.2). if you have more than one device 'in' /dev/swap, then you'll
get funny numbers in the 'swap free' percentage, i.e. -278%. this is caused
by the kernel variable nswap. it is initialized after the root partition is
mounted to the *then* available swap space. however if there is more swap
space added later (with /etc/swap) nswap will *not* be updated. the funny part
is that the swap free variable (don't know it's name now) *does* contain the
correct data. so you get 5MB total swap space an 19MB free swap space, which
of course yields the funny percentage.
now for the weird part. i grep'ed around and found <sys/swap.h> which says:


/*	The following struct is used by the sys3b system call.
                                            ^^^^^^^^^^^^^^^^^
 *	If the first argument to the sys3b system call is 3,
 *	then the call pertains to the swap file.  In this case,
 *	the second argument is a pointer to a structure of the
 *	following format which contains the parameters for the
 *	operation to be performed.
 */
[........]

huh?! what system call ? of course that call isn't in any manuals i have
and, needless to say, of course i wrote a little program saying
sys3b(3,&swapinfo), which gave me 'unresolved external' on linking.
it's also isn't in any library. well, i could lseek in the kernel
to find the table where the info for all the swap files is (swaptab[MSFILES])
but i'd prefer a clean way of course. also i can't image /etc/swap to munge
around in the kernel to add swap space (it's much too fast for that, and that
would be *dirty* as it could be).

in this context i'd like to know: how can i find which system calls a given
kernel has ???
-- 
Heiko Blume c/o Diakite   blume at scuzzy.mbx.sub.org    FAX   (+49 30) 882 50 65
Kottbusser Damm 28        blume at netmbx.UUCP           VOICE (+49 30) 691 88 93
D-1000 Berlin 61          blume at netmbx.de             TELEX 184174 intro d
                    "Have you bugged your source today?"



More information about the Comp.unix.i386 mailing list