Index:
[thread]
[date]
[subject]
[author]
From: Marcus Sundberg <e94_msu@elixir.e.kth.se>
To : ggi-develop@eskimo.com
Date: Sat, 22 Aug 1998 14:14:51 +0200
Re: Kgicon & the sysctl stuff
> Ok solved it: DO NOT DO THE FOLLOWING:
>
> struct ctl_table tmp_ctl
> = {idx+1, name, NULL, 0, 0555};
>
> as a local variable in a function. Gcc appears to save
> the space on the stack and make it zero with memset.
ARGH!
How in the world can that retard compiler assume there's a
"memset" symbol defined in every piece of code in the world???
> Instead do:
>
> struct ctl_table tmp_ctl;
> tmp_ctl.name = idx+1;
> tmp_ctl.procname = name;
> tmp_ctl.data = NULL;
> tmp_ctl.maxlen = 0555;
>
> It does not try to clean the rest up to zeroes if you do it
> like this. I assume having bogus values is ok for the other
> fields since you're not setting them up right anyway... right?
No. Some of them needs to be zero, but this is easily solved
my making an explicit memset (memset is a macro in linux/string.h
that's why using it explicit work)
> Other than that, the mediaGx driver seems to insert
> without problem on a 5510/ICS 5543 machine, but I have
> no cursor. Also I'm not sure whether I'm running it or
> something else -- how can I be sure?
Often you need to switch VC and then switch back to get a
display. Did you do that?
//Marcus
Index:
[thread]
[date]
[subject]
[author]