Subject: re: CVS commit: src/sys/compat/linux/common
To: Christos Zoulas <christos@zoulas.com>
From: matthew green <mrg@eterna.com.au>
List: source-changes
Date: 05/10/2007 07:32:28
#if 0
#ifndef LINUX_UNAME_ARCH
#define LINUX_UNAME_ARCH machine
#endif
strlcpy(linux_machine, LINUX_UNAME_ARCH, sizeof(linux_machine));
sysctl_createv(clog, 0, &node, NULL,
CTLFLAG_PERMANENT,
CTLTYPE_STRING, "machine", NULL,
NULL, 0, linux_machine, sizeof(linux_machine),
LINUX_KERN_VERSION, CTL_EOL);
^^^^^^^^^^^^^^^^^^
#endif
The second sysctl_createv (which I commented out) always fails with EEXIST
so I don't see how it could be making a difference. The minimal fix is
right; it's currently broken. that isn't being questioned.
to change LINUX_KERN_VERSION on the second create call to something else
(or allocate it dynamically). I did not see a "machine" sysctl in my linux
box.
note how there is a compile-time option in the quoted code to set
this? LINUX_UNAME_ARCH. what i tried to do was make this sysctlable
but the code i commited is broken (it worked on my test, but i'm not
sure exactly what i did when transferring it somewhere i could run
cvs ci from), and the attempt i made so far to make it use a
dynamically allocated value failed...
i need to set this (to "i686") for a system that expects it (since
that is what "uname -m" says under linux.)
.mrg.