Linux-Development-Sys Digest #417, Volume #8     Mon, 15 Jan 01 09:13:12 EST

Contents:
  cvcli program source code ("Laurent PELE")
  Printer Not Working - 2.4.0 ("mpierce")
  Re: glibc-2.2 testing problem (Andreas Jaeger)
  Re: Kernel2.4.0 - Unusual panic ("D. Stimits")
  double to byte stream convert ("O.Petzold")
  Re: Ansi C++ forbids implicit conversion from 'void *' in argument  (Arne Driescher)
  Re: Can't boot suse linux 7.0 on a scsi hdd (scsi-controller: ncr 53c8x) (Tahar)
  Re: EPP (Kasper Dupont)
  Re: Ansi C++ forbids implicit conversion from 'void *' in argument passing (Kasper 
Dupont)
  Re: What causes these parse errors when compiling kernel module? (Kasper Dupont)
  Re: Printer Not Working - 2.4.0 (Kasper Dupont)
  Re: can libraries be made to load> 0x40000000 (Wfl)
  Re: EPP (rillet)
  Developing a mouse replacement driver. ("PeZ")
  Re: double to byte stream convert (Andrey Valik)
  Re: double to byte stream convert (Andrey Valik)
  Re: What causes these parse errors when compiling kernel module? (Thomas Petazzoni)
  Pb : printk ignores %f format string ([EMAIL PROTECTED])
  Re: double to byte stream convert (Josef Moellers)
  Re: Pb : printk ignores %f format string (Josef Moellers)
  Re: Kernel -> user mode data tranfer  ???? ("hebre")

----------------------------------------------------------------------------

From: "Laurent PELE" <[EMAIL PROTECTED]>
Subject: cvcli program source code
Date: Mon, 15 Jan 2001 06:34:16 +0100
Reply-To: "Laurent PELE" <[EMAIL PROTECTED]>

Hi,
I'm looking for the source code of cvcli software for Redhat Linux

See manual
http://www.redhat.com/products/software/ecommerce/ccvs/support/docs/cvcli_ma
n.html


--
Laurent PELE 13 rue Lantiez 75017 PARIS
T�l/Fax +33 1 40 25 08 50 mob + 33 6 08 21 96 69
mailto:[EMAIL PROTECTED]  http://www.pele.org
Convertisseur euro et multi-devises sur http://fxtop.com/fr/



------------------------------

From: "mpierce" <[EMAIL PROTECTED]>
Subject: Printer Not Working - 2.4.0
Date: Mon, 15 Jan 2001 07:24:34 GMT

System Mandrake 7.2, kernel 2.4.0, cups1.1.4-7.1

Printer is not printing because the kernel is not ready

[mpierce@localhost mpierce]$ /usr/sbin/lpc status
lp:
        printer is on device 'parallel' speed -1
        queuing is disabled
        printing is disabled
        no entries
        daemon present
[mpierce@localhost mpierce]$ 

Does anyone know how to make the daemon restart?

Marvin

------------------------------

From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: glibc-2.2 testing problem
Date: 15 Jan 2001 08:29:46 +0100

>>>>> J�rgen Koslowski writes:

 > J�rgen Koslowski ([EMAIL PROTECTED]) wrote:
 > : Andreas Jaeger ([EMAIL PROTECTED]) wrote:

 > : : This might be a broken make version since there has to be a binary
 > : : called mtrace.

 > : make is version 3.79.1 (from last July).  I re-built gcc-2.95.2 but
 > : haven't had time yet to re-compile glibc-2.2.  Perhaps on Monday I can
 > : report on how that worked.

 > It gave the same problem as before during "make check": mtrace is
 > missing :-(

Please try to investigate why - it should be in the malloc directory.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs [EMAIL PROTECTED]
   private [EMAIL PROTECTED]
    http://www.suse.de/~aj

------------------------------

Date: Mon, 15 Jan 2001 00:57:21 -0700
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Kernel2.4.0 - Unusual panic

Kasper Dupont wrote:
> 
> D. Stimits wrote:
> >
> [...]
> >
> > If the lilo install failed because of BIOS virus or other security
> > options, it'd be a problem. Possibly check your BIOS for anything that
> > might break the boot sector write. Someone else recently mentioned a
> > problem like this, but the error message was more informative.
> 
> I don't think lilo install can fail because of a BIOS
> virus protection, Linux has its own harddiskdriver.
> Does there exist BIOS virus protections working in
> some other absurd way?
> 
> --
> Kasper Dupont

This I don't know. But I am under the impression that the BIOS can
detect, on motherboards equipped with antivirus BIOS, any attempt to
write to boot sectors, and lock it out, or "fix" it back to where it
was. I have no idea how effective it really is, nor whether lilo has
some way around it. I know that once linux is running, it tends to
ignore the BIOS, but normal operation doesn't write to the boot sectors.
Good question.

------------------------------

From: "O.Petzold" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: double to byte stream convert
Date: Mon, 15 Jan 2001 09:59:06 +0100

Hello,

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.

Thanks
Olaf



------------------------------

From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: Ansi C++ forbids implicit conversion from 'void *' in argument 
Date: Mon, 15 Jan 2001 09:43:41 +0100

Hartmann Schaffer wrote:
> 
> In article <DRq86.4564$[EMAIL PROTECTED]>,
> Victor Morales wrote:
> >I'm using C++ with Posix linux threads (lib6). I've a problem when passing
> >(void *) &my_function to pthreads_create function.Compiler (g++) says: "ANSI
> >C++ forbids implicit conversion from 'void *' in argument passing".
> >Does anybody know what is the problem?
> 
> what is (void *) &my-function supposed to mean?  you are trying to pass the
> address of a function, and pthreads_create is expectiong the address of a
> function.  why are you trying to coerce the pointer to some other type?
> 
> hs
Hmm, had the same problem. Guess you forgot to
cast one of the pointers. Use this line as an
example:

 pthread_create(&thread,(pthread_attr_t
*)NULL,&DrawRadarThread,(void*)NULL); 

-Arne

------------------------------

From: Tahar <[EMAIL PROTECTED]>
Subject: Re: Can't boot suse linux 7.0 on a scsi hdd (scsi-controller: ncr 53c8x)
Date: Mon, 15 Jan 2001 10:37:09 +0100
Reply-To: [EMAIL PROTECTED]

"Marcus J�ger" wrote:

> ">         request_module[block-major -3] root fs not mounted
> >         VFS: Cannot open root device "sda4" or xx:xx
> >         Please append a correct "root=" boot option
> >         Kernel panic: VFS: Unable to mount root fs on 03:01"

When configuring your kernel with "make menuconfig" select "SCSI support"
and then in "SCSI low-level drivers" select the scsi card in your system.

> I downloaded the 2.4.0 kernel and tried to compile a kernel with this
> special sccsi-mdoule. at first the make zImage said "system too large,
> error1" and on the second try "error ksym..."

Try "make bzImage" !

Tahar


------------------------------

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: EPP
Date: Mon, 15 Jan 2001 09:32:00 +0000

rillet wrote:
> 
> How can I read datas from the EPP parallel port?
> I will use C to write my program.
> 
> Thanks in advance
> 
> Romaric Rillet
> [EMAIL PROTECTED]

I don't think there is kernel support for EPP.
(Somebody correct me if I'm wrong). You can
use direct port access, but that requires root
privileges and will not work on other architectures.

The port to use is PARBASE+4 where PARBASE is
normally 0x378.

You might find some usefull pieces of code in
linux/drivers/block/paride.

-- 
Kasper Dupont

------------------------------

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Ansi C++ forbids implicit conversion from 'void *' in argument passing
Date: Mon, 15 Jan 2001 09:38:09 +0000

Hartmann Schaffer wrote:
> 
> In article <DRq86.4564$[EMAIL PROTECTED]>,
> Victor Morales wrote:
> >I'm using C++ with Posix linux threads (lib6). I've a problem when passing
> >(void *) &my_function to pthreads_create function.Compiler (g++) says: "ANSI
> >C++ forbids implicit conversion from 'void *' in argument passing".
> >Does anybody know what is the problem?
> 
> what is (void *) &my-function supposed to mean?  you are trying to pass the
> address of a function, and pthreads_create is expectiong the address of a
> function.  why are you trying to coerce the pointer to some other type?
> 
> hs

In some situations a function taking a function as
an argument does not require it to be strictly the
same type. As an example look at the ANSI-C qsort
function.

void qsort(void *base, size_t nmemb, size_t size,
        int (*compar)(const void *, const void *))

Here compar is a function taking two pointers as
argument, but theese are normally never pointers
to void but something else. You can write a cast
to the right type when calling qsort, but writing
the full type is a hell. It is so much easier to
just cast the pointer to (void*) to say I know
what I'm doing.

C++ does not allow this shortcut, you must write
the full type of the function when casting, it
is very anoying and can be much worse than this
example.

-- 
Kasper Dupont

------------------------------

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: What causes these parse errors when compiling kernel module?
Date: Mon, 15 Jan 2001 09:56:26 +0000

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: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Printer Not Working - 2.4.0
Date: Mon, 15 Jan 2001 10:03:30 +0000

mpierce wrote:
> 
> System Mandrake 7.2, kernel 2.4.0, cups1.1.4-7.1
> 
> Printer is not printing because the kernel is not ready
> 
> [mpierce@localhost mpierce]$ /usr/sbin/lpc status
> lp:
>         printer is on device 'parallel' speed -1
>         queuing is disabled
>         printing is disabled
>         no entries
>         daemon present
> [mpierce@localhost mpierce]$
> 
> Does anyone know how to make the daemon restart?
> 
> Marvin

This command should do:
  /etc/rc.d/init.d/lpd restart

For most services the posible arguments are:
start, stop, restart, reaload and status

If /sbin/restart is a symbolic link for
/sbin/service you can just type:
  restart lpd
But for some reason this link normally does
not exist.
-- 
Kasper Dupont

------------------------------

From: Wfl <[EMAIL PROTECTED]>
Subject: Re: can libraries be made to load> 0x40000000
Date: Mon, 15 Jan 2001 12:25:58 +0000

This discussion reminds me of some questions that I wanted to ask re
/proc/statm, specifically re the SHARE (shared memory) and LRS (library
resident size) entries. These are all calculated in proc/fs/array.c.

1. SHARE is the number of resident pages in a process that have a
reference count >1.

2. LRS (up to at least 2.2.18) is the number of resident pages in a
process that are not from the current program, are not on the stack, and
end after address 0x60000000.

I am trying to understand exactly what SHARE means. Naively I would think
that >1 process would have to have mapped a page for it to show up in
SHARE. However, this doesn't seem to be the case. I have done experiments
where I link a program that uses a shareable library, and its SHARE value
is the same regardless of how many copies I run.

As for LRS, I don't understand the significance of 0x60000000. I tried
changing the LRS criterion to be "page is executable and is mapped from a
file other than the current program" and that seems to make more sense.

So, can anyone shed insight on the calculation of these two quantities?
Thanks,

William Lupton


------------------------------

From: rillet <[EMAIL PROTECTED]>
Subject: Re: EPP
Date: Mon, 15 Jan 2001 13:46:31 +0100

Kasper Dupont a �crit :
> 
> rillet wrote:
> >
> > How can I read datas from the EPP parallel port?
> > I will use C to write my program.
> >
> > Thanks in advance
> >
> > Romaric Rillet
> > [EMAIL PROTECTED]
> 
> I don't think there is kernel support for EPP.
> (Somebody correct me if I'm wrong). You can
> use direct port access, but that requires root
> privileges and will not work on other architectures.
> 
> The port to use is PARBASE+4 where PARBASE is
> normally 0x378.
> 
> You might find some usefull pieces of code in
> linux/drivers/block/paride.
> 
> --
> Kasper Dupont

I have found thongs like unsigned char parport_pc_read_epp(struct
parport *p)
in drivers/misc/parport_pc.c (kernel 2.2.17). But I cannot figure how to
use them.

Romaric Rillet

------------------------------

From: "PeZ" <[EMAIL PROTECTED]>
Subject: Developing a mouse replacement driver.
Date: Mon, 15 Jan 2001 14:15:40 +0100

My question is :
can i use highlevel c network routines in my driver function??? and how can
i link them in...???????



------------------------------

From: Andrey Valik <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: double to byte stream convert
Date: Mon, 15 Jan 2001 18:28:14 +0500

"O.Petzold" wrote:
> 
> Hello,
> 
> 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.
> 
> Thanks
> Olaf

double convert to string (sprintf) -> send -> recv -> string conver to double (sscanf 
or other way)

-- 
+----------------------+
|   Andrey V. Valik    |
|  Papillon  Systems   |
|Mailto:[EMAIL PROTECTED]|
+----------------------+

------------------------------

From: Andrey Valik <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: double to byte stream convert
Date: Mon, 15 Jan 2001 18:29:16 +0500

"O.Petzold" wrote:
> 
> Hello,
> 
> 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.
> 
> Thanks
> Olaf

double convert to string (sprintf) -> send -> recv -> string conver to double (sscanf 
or other way)

-- 
+----------------------+
|   Andrey V. Valik    |
|  Papillon  Systems   |
|Mailto:[EMAIL PROTECTED]|
+----------------------+

------------------------------

From: Thomas Petazzoni <[EMAIL PROTECTED]>
Subject: Re: What causes these parse errors when compiling kernel module?
Date: Mon, 15 Jan 2001 09:16:37 +0100
Reply-To: [EMAIL PROTECTED]

> 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.

check the symbolic link

/usr/src/linux ==> /usr/src/kernel-source-2.2.17 (this might not be the
same for you, but the /usr/src/linux must point to your linux sources).

thomas
-- 
PETAZZONI Thomas
[EMAIL PROTECTED]     ICQ : 34937744
[EMAIL PROTECTED]         http://kos.enix.org

------------------------------

From: [EMAIL PROTECTED]
Subject: Pb : printk ignores %f format string
Date: Mon, 15 Jan 2001 13:18:02 GMT

Hi all,
We are developping a loadable module under Linux kernel 2.2.14.
We use a lot of calls to printk for integer values which work fine.
ex : printk("Parameter value = %d\n", 100) ;
We also manipulate float and double variables which can't be displayed
with printk.
ex: printk("Parameter value = %f\n", 10000)
displays
          "Parameter value = %f"

The same behavior happens with "%e" or "%g".
If we recopy the printk instructions in a user application and only
replace printk by printf, the floating-point numbers are correctly
displayed.

Any idea to log messages including float or double numbers with printk ?

Thanks,
Sylvie






Sent via Deja.com
http://www.deja.com/

------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: double to byte stream convert
Date: Mon, 15 Jan 2001 14:35:45 +0100

"O.Petzold" wrote:
> =

> Hello,
> =

> 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.

Get RFC1832 from http://www.ietf.org (or your favourite site). It covers
"XDR (eXternal Data Representation) which does what you want.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T.  Pratchett)

------------------------------

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Pb : printk ignores %f format string
Date: Mon, 15 Jan 2001 14:50:08 +0100

[EMAIL PROTECTED] wrote:
> =

> Hi all,
> We are developping a loadable module under Linux kernel 2.2.14.
> We use a lot of calls to printk for integer values which work fine.
> ex : printk("Parameter value =3D %d\n", 100) ;
> We also manipulate float and double variables which can't be displayed
> with printk.
> ex: printk("Parameter value =3D %f\n", 10000)
> displays
>           "Parameter value =3D %f"
> =

> The same behavior happens with "%e" or "%g".
> If we recopy the printk instructions in a user application and only
> replace printk by printf, the floating-point numbers are correctly
> displayed.
> =

> Any idea to log messages including float or double numbers with printk =
?

The kernel is not prepared to handle floating point numbers.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T.  Pratchett)

------------------------------

From: "hebre" <[EMAIL PROTECTED]>
Subject: Re: Kernel -> user mode data tranfer  ????
Date: Mon, 15 Jan 2001 16:56:37 +0300


> [...]
>
> The sys_socket function is in the file linux/net/socket.c.
> It creates a new socket and it creates a file descriptor
> for the current process and connects the two.

>
> In your case you want to be able to use the socket no
> matter what the current process is.
>
> Instead you can call the sock_create function from your
> module and save a pointer to the struct socket, the pointer
> is valid from any process while inside the kernel.
>
> When using the socket you cannot use the sys_read and
> sys_write functions, because they require a filedescriptor
> and a userspace buffer.
>
> But if you look at the sys_read and sys_write functions in
> linux/fs/read_write.c you will se they are wrappers looking
> up the filedescriptor and verifying the buf pointer. You
> can simply skip that and call the read/write function from
> the socket structure.
>
[...]

I tried to do this. When I insert in module string like "sys_socket(..)"
it compiles OK, but when I talk "insmod this_module" I see "unresolved
symbol sys_socket". (kernel 2.4.0-test10)
What is wrong?
Can You send some examples?

Thanks.
> --
> Kasper Dupont

Paul



------------------------------


** 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
******************************

Reply via email to