proc를 이용해서 커널 모듈의 정보를 보여 주고자 합니다.
그래서 sprintf를 이용해서 출력을 했는데요. %f가 먹히질 않는 군요.
책에도 부동소수점을 나타내는 형식지정자도 나와 있질 않군요.
먼가 이유가 있는 건가요? 다른 방법은 없는지요...
<term>No floating point or <acronym>MMX</acronym></term>
<listitem>
<para>
The <acronym>FPU</acronym> context is not saved; even in user
context the <acronym>FPU</acronym> state probably won't
correspond with the current process: you would mess with some
user process' <acronym>FPU</acronym> state. If you really want
to do this, you would have to explicitly save/restore the full
<acronym>FPU</acronym> state (and avoid context switches). It
is generally a bad idea; use fixed point arithmetic first.
</para>
</listitem>
사용할 수 있습니다. 그러나 권장하지 않습니다.
커널 소스 잘 보세요. 쓰여진 곳도 있으니.
Re: kernel 에서는 부동 소수점을 출력할 수 없다?
<term>No floating point or <acronym>MMX</acronym></term>
<listitem>
<para>
The <acronym>FPU</acronym> context is not saved; even in user
context the <acronym>FPU</acronym> state probably won't
correspond with the current process: you would mess with some
user process' <acronym>FPU</acronym> state. If you really want
to do this, you would have to explicitly save/restore the full
<acronym>FPU</acronym> state (and avoid context switches). It
is generally a bad idea; use fixed point arithmetic first.
</para>
</listitem>
사용할 수 있습니다. 그러나 권장하지 않습니다.
커널 소스 잘 보세요. 쓰여진 곳도 있으니.
댓글 달기