Linux-Development-Sys Digest #418, Volume #8 Mon, 15 Jan 01 14:13:14 EST
Contents:
2.4.0 loop device ([EMAIL PROTECTED])
Re: Pb : printk ignores %f format string ("Guennadi V. Liakhovetski")
Re: Pb : printk ignores %f format string (Basile STARYNKEVITCH)
Re: 2.2.18 & USB Does It or Doesn't It ("Jerry Segers, Jr.")
Re: double to byte stream convert (Grant Edwards)
Re: 2.4.0 loop device (Kasper Dupont)
Re: What causes these parse errors when compiling kernel module? ("Brian Wagener")
Re: 2.4.0 loop device (ratz)
Re: newbie question: mapping heap to shared memory (adwait)
Simple way to display an animation? (Michael Wimmer)
glibc upgrade - any help would be appreicated (Spyros Tsiolis)
Small probleme of programming system under Linux ("Thierry Hadey - YZIACT")
LVM 0.9.1-beta1 compile error (David Vidal Rodriguez)
Re: glibc upgrade - any help would be appreicated ("Guennadi V. Liakhovetski")
Re: 2.2.18 & USB Does It or Doesn't It (Clifford Kite)
How to set r/w error conditions in a device driver? ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: [EMAIL PROTECTED]
Subject: 2.4.0 loop device
Date: Mon, 15 Jan 2001 14:10:00 GMT
Hi Everybody!
I have a problem with the loop device under 2.4.0.
Specifically, I can't write to it:
dd if=/dev/zero of=/tmp/t bs=1M count=100 # ok
losetup /dev/loop0 /tmp/t # ok
dd if=/dev/zero of=/dev/loop0 bs=1M count=100 # uninterruptible sleep
on wakeup_bdflush
(If you have a lot of memory, then run a dd if=/dev/hda of=/dev/null or
similar in parallel, so that the loop driver has to wake bdflush)
WARNING: After the test nothing can write to the disk anymore, not even
SysRq emergency sync! Only reboot helps.
I have tested it with 2.4.0test10 - 2.4.0pre.
If a couple of people could confirm that this is indeed a kernel bug,
then it should be reported to the developers. (The first kernel version
with the bug should also be determined)
As always, I might be doing something wrong, so feel free to point it
out :)
Greets,
Csaba Hal�sz
Sent via Deja.com
http://www.deja.com/
------------------------------
From: "Guennadi V. Liakhovetski" <[EMAIL PROTECTED]>
Subject: Re: Pb : printk ignores %f format string
Date: Mon, 15 Jan 2001 14:38:32 +0000
On Mon, 15 Jan 2001 [EMAIL PROTECTED] wrote:
> We also manipulate float and double variables which can't be displayed
> with printk.
Correct. printk CANNOT print floats / doubles (see man
printk: BUGS). However, I am not quite sure about the note in
man: "doubles and floats do not belong to kernel", what does it actually
mean?
> Any idea to log messages including float or double numbers with printk ?
Use some sort of conversion, say, if you know the order of magnitude of
your number, that you need to print out, multiply it by a power of 10 to
get suitable for you precision and print out as an integer, or convert to
a string elsehow.
___
Dr. Guennadi V. Liakhovetski
Department of Applied Mathematics
University of Sheffield, U.K.
email: [EMAIL PROTECTED]
------------------------------
From: Basile STARYNKEVITCH <[EMAIL PROTECTED]>
Subject: Re: Pb : printk ignores %f format string
Date: 15 Jan 2001 15:58:38 +0100
>>>>> "Guennadi" == Guennadi V Liakhovetski <[EMAIL PROTECTED]> writes:
Guennadi> On Mon, 15 Jan 2001 [EMAIL PROTECTED] wrote:
>> We also manipulate float and double variables which can't be
>> displayed with printk.
Guennadi> Correct. printk CANNOT print floats / doubles (see man
Guennadi> printk: BUGS). However, I am not quite sure about the
Guennadi> note in man: "doubles and floats do not belong to
Guennadi> kernel", what does it actually mean?
The kernel does not maintain floating point coprocessor state in
kernel mode. This means that doing any floating point operation (even
a load, or a compare, or an addition) in any interruptible kernel code
is not possible. If you need to do floating point in the kernel you'll
have to hack an important part of it (in particular, change the Linux
kernel scheduler to save and restore kernel floating point state) -
much more than adding floating point support to printk!
This is probably explained in a Kernel-HOWTO on www.linuxdoc.org
Regards
PS. beware of my antispam device in reply address
N.B. Any opinions expressed here are only mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.
=====================================================================
Basile STARYNKEVITCH ---- Commissariat � l Energie Atomique
DTA/LETI/DEIN/SLA * CEA/Saclay b.528 (p111f) * 91191 GIF/YVETTE CEDEX * France
phone: 1,69.08.60.55; fax: 1.69.08.83.95 home: 1,46.65.45.53
email: Basile point Starynkevitch at cea point fr
web perso: http://perso.wanadoo.fr/starynkevitch/basile/
------------------------------
From: "Jerry Segers, Jr." <[EMAIL PROTECTED]>
Subject: Re: 2.2.18 & USB Does It or Doesn't It
Date: Mon, 15 Jan 2001 10:03:41 -0500
In article <[EMAIL PROTECTED]>, "Clifford Kite"
<[EMAIL PROTECTED]> wrote:
> mpierce <[EMAIL PROTECTED]> wrote:
>
>> Does it support USB?
>
>> I've got a USB Zip250 configured as:
>> /dev/sda4 /mnt/zip vfat noauto,user,rw 0 0
>
>> I do:
>> [root@localhost mpierce]# insmod ide-scsi
>> Using /lib/modules/2.2.18/scsi/ide-scsi.o
>> [root@localhost mpierce]# cd /dev
>> [root@localhost /dev]# mount /mnt/zip
>> mount: the kernel does not recognize /dev/sda4 as a block device
>> (maybe `insmod driver'?)
>> [root@localhost /dev]#
>
>> If 2.2.18 supports USB then, I'm probably something minor that is not
>> allowing 2.2.18 to recognise the device correctly.
>
>> Anyone have suggestion as to how to fix this problem?
>
> You can try inserting the usbcore and usb-storage modules, and the scsi
> drive module sd_mod. Also make sure that /dev/sda4 is correct, I'd
> expect it to use /dev/sdx1 where x is the first unused SCSI device.
>
> This didn't work for me to support a HP315 camera under 2.2.18 though. I
> had to go to the new 2.4.0 kernel and then it worked.
>
>
This is because, as I understand it, USB was developed for 2.4 kernels
and back ported to 2.2.x in 2.4, they rewrote the scsi bits so the usb
backport talks with a texas accent which offends the 2.2.18 scsi driver.
all joking aside, usb is supported, usb filesystems are not. if you want
to use your zip, either take it out of it's case and hook it in with an
ide cable or upgrade to 2.4 (I'd chose the former if you're interested.)
------------------------------
From: [EMAIL PROTECTED] (Grant Edwards)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: double to byte stream convert
Date: Mon, 15 Jan 2001 15:31:37 GMT
In article <[EMAIL PROTECTED]>, O.Petzold wrote:
>I want to convert a double into a sequence of bytes and reconvert
>it later. The bits should be send/recv via network. This should be
>done in a portable way. I guess, the fp representation is very
>hard ware specific. Anyway, how can I do that on i386 plattform.
>For other I have to adapt the bitstream to the target. Does exist
>these here or who can help.
I would recommend converting to/from IEEE double format in
network byte order. The platforms I've used with non-IEEE
floating-point formats all had very efficient routines for
converting to/from IEEE format.
Far more efficient than converting to/from ascii strings.
--
Grant Edwards grante Yow! I think I'll make
at SCRAMBLED EGGS!! They're
visi.com each in LITTLE SHELLS...
------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: 2.4.0 loop device
Date: Mon, 15 Jan 2001 15:32:00 +0000
[EMAIL PROTECTED] wrote:
>
> Hi Everybody!
>
> I have a problem with the loop device under 2.4.0.
> Specifically, I can't write to it:
>
> dd if=/dev/zero of=/tmp/t bs=1M count=100 # ok
> losetup /dev/loop0 /tmp/t # ok
> dd if=/dev/zero of=/dev/loop0 bs=1M count=100 # uninterruptible sleep
> on wakeup_bdflush
>
> (If you have a lot of memory, then run a dd if=/dev/hda of=/dev/null or
> similar in parallel, so that the loop driver has to wake bdflush)
>
> WARNING: After the test nothing can write to the disk anymore, not even
> SysRq emergency sync! Only reboot helps.
>
> I have tested it with 2.4.0test10 - 2.4.0pre.
> If a couple of people could confirm that this is indeed a kernel bug,
> then it should be reported to the developers. (The first kernel version
> with the bug should also be determined)
>
> As always, I might be doing something wrong, so feel free to point it
> out :)
>
> Greets,
> Csaba Hal�sz
>
> Sent via Deja.com
> http://www.deja.com/
It does sound like a kernel bug. Does the same
happen when you test with less than 100M,
something like 1M might be interesting. Perhaps
watching top or /proc/meminfo while repeating
the test with more and more data will show
something interesting. How much physical
memory does the computer have?
--
Kasper Dupont
------------------------------
From: "Brian Wagener" <[EMAIL PROTECTED]>
Subject: Re: What causes these parse errors when compiling kernel module?
Date: Mon, 15 Jan 2001 15:38:07 GMT
I don't know if I need it, though I was able to get rid of a lot of the
errors by not including linux/proc_fs.h even though I am using the proc fs.
But I still get errors like "struct file" declared inside parameter list,
and parse error before size_t. So I proabably need linux/proc_fs.h . If I
include it I get errors like below.
In file included from /usr/include/linux/sched.h:13,
from /usr/include/linux/mm.h:4,
from /usr/include/linux/slab.h:14,
from /usr/include/linux/malloc.h:4,
from /usr/include/linux/proc_fs.h:5,
from brian.c:5:
/usr/include/linux/times.h:5: parse error before `clock_t'
/usr/include/linux/times.h:5: warning: no semicolon at end of struct or
union
/usr/include/linux/times.h:6: warning: data definition has no type or
storage class
/usr/include/linux/times.h:7: parse error before `tms_cutime'
/usr/include/linux/times.h:7: warning: data definition has no type or
storage class
/usr/include/linux/times.h:8: parse error before `tms_cstime'
/usr/include/linux/times.h:8: warning: data definition has no type or
storage class
In file included from /usr/include/linux/timex.h:142,
from /usr/include/linux/sched.h:14,
from /usr/include/linux/mm.h:4,
from /usr/include/linux/slab.h:14,
from /usr/include/linux/malloc.h:4,
from /usr/include/linux/proc_fs.h:5,
from brian.c:5:
/usr/include/linux/time.h:10: parse error before `time_t'
/usr/include/linux/time.h:10: warning: no semicolon at end of struct or
union
/usr/include/linux/time.h:12: parse error before `}'
/usr/include/linux/time.h: In function `timespec_to_jiffies':
/usr/include/linux/time.h:32: dereferencing pointer to incomplete type
/usr/include/linux/time.h:33: dereferencing pointer to incomplete type
/usr/include/linux/time.h: In function `jiffies_to_timespec':
/usr/include/linux/time.h:45: dereferencing pointer to incomplete type
/usr/include/linux/time.h:46: dereferencing pointer to incomplete type
/usr/include/linux/time.h: At top level:
/usr/include/linux/time.h:51: parameter `a' has incomplete type
--
Brian Wagener
ForceConstant
http://force.ath.cx
http://shoptalk.tunacan.net
"Kasper Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Brian Wagener wrote:
> >
> > Well I am getting closer to making some kernel module code, well I made
some
> > code to setup use of input/output of a node in the proc directory. I
> > compile with gcc -D__KERNEL__ -DMODULE -c module.c but I get a whole lot
of
> > errors like "Parse error before time_t" and clock_t, and such. What am
I
> > forgetting?
> > Thanks.
> >
> > --
> > Brian Wagener
> >
> > ForceConstant
> > http://force.ath.cx
> > http://shoptalk.tunacan.net
>
> I think you have forgotten to include some header files
> which is needed, or you have included some header files
> which cannot be used in kernel code.
>
> What is the files and the lines where the errors are
> reported?
>
> --
> Kasper Dupont
------------------------------
From: ratz <[EMAIL PROTECTED]>
Subject: Re: 2.4.0 loop device
Date: Mon, 15 Jan 2001 16:55:34 +0100
[EMAIL PROTECTED] wrote:
>
> Hi Everybody!
>
> I have a problem with the loop device under 2.4.0.
> Specifically, I can't write to it:
>
> dd if=/dev/zero of=/tmp/t bs=1M count=100 # ok
> losetup /dev/loop0 /tmp/t # ok
> dd if=/dev/zero of=/dev/loop0 bs=1M count=100 # uninterruptible sleep
> on wakeup_bdflush
Could you try following patch?
ftp://ftp.kernel.org/pub/linux/kernel/people/axboe/patches/2.4.0-ac9/loop-2.bz2
Report any success or failure to Jens Axboe.
HTH,
Roberto Nibali, ratz
--
mailto: `echo [EMAIL PROTECTED] | sed 's/[NOSPAM]//g'`
------------------------------
From: adwait <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: newbie question: mapping heap to shared memory
Date: Mon, 15 Jan 2001 10:38:09 -0600
Kasper,
I want to create a single data structure in shared memory and use it from
number of processes using semaphores and appropriate access privileges. I
should be able to dynamically cast the heap in different processes and then
use it. I can rephrase my question as follows;
I need to know a way where by I can create a data structure in shared memory
i.e. when I say new to create an object I should be able to create the object
with staring address of shared memory.
Please help....
Adwait
------------------------------
From: Michael Wimmer <[EMAIL PROTECTED]>
Subject: Simple way to display an animation?
Date: Mon, 15 Jan 2001 18:15:29 +0100
Hello!
I hope my question isn�t OT, but i didn�t find another appropriate news
group...
I�ve got the following problem: I want to port a small app I wrote for
my studies to Linux. It is a very basic 3d engine to display the
physical behaviour of objects (for example tops). The only platform
dependent code is the graphics code:
I want to display a 256-color animation in a window with size width x
height. The frame that should be displayed is stored in an array of
bytes (char buffer[width*height]) and each entry ranging from 0 .. 255
represents a color whose R,G,B values are given in a seperate array with
(of course) 256 entries.
Is there an easy way to program this without having to get into X too
much? Is there any tutorial or basic information about programming
graphical apps on the net? Or is there a lib that performs the above
mentioned tasks (it should be open sourced?)
Thank you very much for your help
Regards
Mike Wimmer
------------------------------
From: Spyros Tsiolis <[EMAIL PROTECTED]>
Subject: glibc upgrade - any help would be appreicated
Date: Mon, 15 Jan 2001 17:58:09 +0000
Hello,
I was wondering if anyone has any knowledge on this :
I am trying to upgrade glibc from 2.1.2 to 2.2.9 on a
RedHat 6.1 system.
However , many packages use the current glibc version.
I 've tried "rpm -Uvh --force" and "rpm -Fvh --force"
and "rpm -ivh --force" but nothing works.
One solution is to compile from the .gz source , which
is what I doing now but how do I inform the rpm
software (which is by the way, upgraded from 3.x to
4.x) that a new version of glibc exists on the system ?
The packages are one too many and I cannot be bothered
to uninstall them, install the new glibc version then
reinstall them again.
Does anyone know how to resolve this ?
Thanks,
s.
------------------------------
From: "Thierry Hadey - YZIACT" <[EMAIL PROTECTED]>
Subject: Small probleme of programming system under Linux
Date: Mon, 15 Jan 2001 18:42:03 +0100
How to determine that a process is in wait(expectation) of reading on an io?
The subject:
A process throws(launches) a son by a fork (), if the process son(thread)
crosses(spends) it Wait(expectation) of a reading of type keyboard (read ())
the process father owes he So to cross(spend) in wait(expectation) of
reading then to pass on to the son what he read ( Or not read), how
ressoudre this pb?
1 A process throws(launches) a son (fork ())
The process son(thread) passes in reading on the io (read ())
2 How of the process father to know that the son and in wait(expectation) of
reading? (Use of the functions(offices) poll (), select (), fcntl ()
etc....?)
Thanks to all beforehand!
------------------------------
From: David Vidal Rodriguez <[EMAIL PROTECTED]>
Subject: LVM 0.9.1-beta1 compile error
Date: Mon, 15 Jan 2001 19:21:26 +0100
Hi guys!
I recently have downloaded and compiled the Linux 2.4.0, and due to some
"i/o protocol version error" of the lvm-mod driver with my lvmtools, I
have decided to upgrade them.
Actually, the (only) version of LVM that couples with v2.4.0 is the
0.9.1-beta1, so I have downloaded it, run the ./configure script (which
finished successfully) and executed "make". A screenful of error
messages comes out, the first of them saying:
In file included from basename.c:34:
../../tools/lib/liblvm.h: linux/list.h: No such file or directory.
The rest of errors are derivated from this one: conflicting types, error
declarations...
Has somebody compiled this version of LVM? Could you give me a hint in
compiling the tools and/or addressing me to a direction of pre-compiled
binaries for the i386?
Thanks in advance,
--
------------------------------------------------------------------------
David Vidal R. ([EMAIL PROTECTED])
------------------------------
From: "Guennadi V. Liakhovetski" <[EMAIL PROTECTED]>
Subject: Re: glibc upgrade - any help would be appreicated
Date: Mon, 15 Jan 2001 18:32:23 +0000
On Mon, 15 Jan 2001, Spyros Tsiolis wrote:
> One solution is to compile from the .gz source , which
> is what I doing now but how do I inform the rpm
> software (which is by the way, upgraded from 3.x to
> 4.x) that a new version of glibc exists on the system ?
Oh. In theory you can install 'any' package from source 'under RPM', for
this you need to create a 'spec' file 'using your favourite editor':-) and
run RPM with some option (check man). I didn't try to do this, but had the
same problem - updating glibc and other packages from sources and not
being able to update the rpm-database. But then I decided that this was
too much of a trouble for me at the moment, and gave up, just installing
the package and having rpm -q report false values. Actually I just wasn't
sure how to fill in various descriptibe fields and I didn't want to just
leave them blank or write rubbish. You can try to extract such spec file
from (corresponding) rpm and modify it according to your particular
needs. I would be interested in hearing from you if you get any success in
it.
Good luck
Guennadi
___
Dr. Guennadi V. Liakhovetski
Department of Applied Mathematics
University of Sheffield, U.K.
email: [EMAIL PROTECTED]
------------------------------
From: Clifford Kite <[EMAIL PROTECTED]>
Subject: Re: 2.2.18 & USB Does It or Doesn't It
Date: Mon, 15 Jan 2001 12:32:45 -0600
Jerry Segers, Jr. <[EMAIL PROTECTED]> wrote:
> This is because, as I understand it, USB was developed for 2.4 kernels
> and back ported to 2.2.x in 2.4, they rewrote the scsi bits so the usb
> backport talks with a texas accent which offends the 2.2.18 scsi driver.
> all joking aside, usb is supported, usb filesystems are not. if you want
> to use your zip, either take it out of it's case and hook it in with an
> ide cable or upgrade to 2.4 (I'd chose the former if you're interested.)
Waell now, I opted for 2.4.0 since there seemed to no way for me to
adapt the camera to IDE, but then you must also talk to hardware with
a Georgia peach accent. Everyone knows that's the best accent to use
for hardware. ;)
-- Clifford Kite <kite@inet%port.com> Not a guru. (tm)
/* All the world's a net! And all the data in it merely packets
come to store-and-forward in the queues a while and then are
heard no more. 'Tis a network waiting to be switched!
-Vint Cerf, RFC 1121 */
------------------------------
From: [EMAIL PROTECTED]
Subject: How to set r/w error conditions in a device driver?
Date: Mon, 15 Jan 2001 18:50:25 GMT
How does device driver return error back to caller of fread() and fwrite
()? I know that the user level code should check the return value of
fread() and fwrite(). If the value is 0, then call ferror() to see if
it is an eof or error.
I look into the "file" structure in include/linux/fs.h and found a
field called f_error. The only problem is that it seems not to many
code set that variable. (I would image that a lot of device driver
would be setting it)
My questions are :
Is the f_error is right field to use for report read/write errors
detected by the driver?
Where can I found the definition of f_error()? I like to take a look to
see what variable does it look at to report the error.
Thank You
Sent via Deja.com
http://www.deja.com/
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list by posting to the
comp.os.linux.development.system newsgroup.
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************