Linux-Development-Sys Digest #10, Volume #8 Tue, 11 Jul 00 04:13:16 EDT
Contents:
[ANN] Beta testing of CW for Linux on Intel and PowerPC (MWRon)
Re: pure virtual function. (Kaz Kylheku)
Re: [ANN] Beta testing of CW for Linux on Intel and PowerPC (Kaz Kylheku)
Re: [ANN] Beta testing of CW for Linux on Intel and PowerPC (Warren Nagourney)
RedHat 6.2 Autofs Problem With NIS (David Highley)
Re: Not Quite C (Vic Mulyk)
Re: Serial comms in C/C++/probably anything! (Vic Mulyk)
Why Does Linux Arp All The Time? (David Highley)
Re: Microsoft's new ".NET" (Tim Roberts)
linux: 'insmod sr_mod': no module by that name found (Carlos Villegas)
Re: How to port MSVC++ app to Linux? (Dima Maziuk)
linux:Unresolved symbol using 'insmod sg' (Carlos Villegas)
Re: Why Does Linux Arp All The Time? (Kaz Kylheku)
Re: 2.4.0test2 and pppd ("[EMAIL PROTECTED]")
Re: question about /proc file system ("Quiney, Philip [HAL02:HH00:EXCH]")
Re: sizeof() in gcc (Villy Kruse)
Re: Possible bug in insmod (RH5.2) (Villy Kruse)
Re: Sockets in kernel module (Villy Kruse)
Re: linux: 'insmod sr_mod': no module by that name found (Zoran Cutura)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (MWRon)
Crossposted-To: comp.os.linux.powerpc
Subject: [ANN] Beta testing of CW for Linux on Intel and PowerPC
Date: Mon, 10 Jul 2000 22:33:14 -0400
[ANN] Beta testing of CW for Linux on Intel and PowerPC platforms
Metrowerks is taking applications for Beta testers for the next version of
CodeWarrior for Linux on Intel and PowerPC Platforms. To qualify you
must be familiar with the Linux operating system and are interested in
Beta testing CodeWarrior for Linux. You must be able to download large
files and you will be required to file bug reports.
The following versions of Linux will be supported.
Intel
======
Red Hat 6.2
SuSE 6.4
Caldera OpenLinux 2.4
TurboLinux 6.0
Mandrake 7.1
PowerPC
=======
LinuxPPC 2000
SuSE 6.4
If you are interested please contact me <[EMAIL PROTECTED]> with an
e-mail message that has
Your Name
Your preferred e-mail address
Are you currently a Beta Tester for any Metrowerks Product.
Which distribution of Linux you have on which Platform
Again, only serious testers that understand working with the Linux
operating system should apply.
Thank you for your interest.
Ron
--
Metrowerks, a Motorola Company - Ron Liechty
"Software Starts Here" [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: pure virtual function.
Reply-To: [EMAIL PROTECTED]
Date: Tue, 11 Jul 2000 04:03:25 GMT
On Tue, 11 Jul 2000 02:34:54 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>> On Mon, 10 Jul 2000 22:15:04 GMT, [EMAIL PROTECTED] <samhsieh@my-
>deja.com>
>> wrote:
>> >Hi,
>> >
>> >I just wrote an example to verify a pure virtual function, and it
>just
>> >like as below:
>> >
>> >class MySuperClass
>> >{
>>
>> [ snip ]
>>
>> > virtual void dummy() = 0; // pure virtual function
>> >}
>>
>> [ snip ]
>>
>> >class MyClass
>> >{
>>
>> >After I insmod mytest.o module, I got the following message:
>> >mytest.o: unresolved symbol __pure_virtual
>>
>> Well, yes, the compiler would have to have human intuition to guess
>that a call
>> to the pure virtual in MySuperClass is supposed to be routed to a
>function in
>> My Class.
>>
>> What you have to do this this:
>>
>> class MyClass : public MySuperClass { /* ... */ };
>> ^^^^^^^^^^^^^^^^^^^^^
>>
>This is inheritance. I won't implement some method functions in the
>super class, but in the subclass which uses the same function name and
>with its own behavior implemented.
Inheritance is required in C++ to make polymorphism work. The base
class containing virtual functions serves as the interface to various
implementations in the derived classes.
GNU C++ has an extension known as signatures which provides additional
flexibility in this regard; it allows any class which implements
some functions having certain names and type signatures to be
accessed through the signature, even though it's not derived from it.
It sound as though this is what you are looking for. But it's far from
a standard C++ feature.
>I already solved this problem. I just implemented a dummy function to
>replace it as below:
>
>extern "C" int __pure_virtual()
>{
> /* do nothing */
> return 0;
>}
The way this is implemented, it solves nothing other than the linking problem.
The only way the above function can be called is if the C++ code has a bug---it
calls a pure virtual function. The right thing to do is to printk some
diagnostic message like
printk(KERN_ERR "pure virtual function called\n");
and perhaps panic.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.powerpc
Subject: Re: [ANN] Beta testing of CW for Linux on Intel and PowerPC
Reply-To: [EMAIL PROTECTED]
Date: Tue, 11 Jul 2000 04:04:18 GMT
On Mon, 10 Jul 2000 22:33:14 -0400, MWRon <[EMAIL PROTECTED]> wrote:
>[ANN] Beta testing of CW for Linux on Intel and PowerPC platforms
>
>Metrowerks is taking applications for Beta testers for the next version of
>CodeWarrior for Linux on Intel and PowerPC Platforms. To qualify you
>must be familiar with the Linux operating system and are interested in
>Beta testing CodeWarrior for Linux. You must be able to download large
>files and you will be required to file bug reports.
I consider this spam.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Warren Nagourney)
Crossposted-To: comp.os.linux.powerpc
Subject: Re: [ANN] Beta testing of CW for Linux on Intel and PowerPC
Date: 11 Jul 2000 04:53:56 GMT
[EMAIL PROTECTED] (Kaz Kylheku) writes:
>On Mon, 10 Jul 2000 22:33:14 -0400, MWRon <[EMAIL PROTECTED]> wrote:
>>[ANN] Beta testing of CW for Linux on Intel and PowerPC platforms
>>
>>Metrowerks is taking applications for Beta testers for the next version of
>>CodeWarrior for Linux on Intel and PowerPC Platforms. To qualify you
>>must be familiar with the Linux operating system and are interested in
>>Beta testing CodeWarrior for Linux. You must be able to download large
>>files and you will be required to file bug reports.
>I consider this spam.
I don't - I am delighted that the vendor of the main MacOS development system
has decided to support Linuxppc after supporting intel linux for some time
(one would think that a "Motorola Company" would finally get around to
supporting its own processors, though Motorola's idiotic policies over
in-house computer purchases suggests that they might might still prefer
intel processors, provoking the chagrin of PowerPC users and the laughter of
everyone else familiar with its policy).
Thank you MWRon for informing the linuxppc community of this significant
event.
Warren Nagourney
Univ. of Washington
Physics Dept.
>--
>#exclude <windows.h>
--
==========================================================================
Warren Nagourney <[EMAIL PROTECTED]> Voice: 206-543-9585
------------------------------
From: David Highley <[EMAIL PROTECTED]>
Subject: RedHat 6.2 Autofs Problem With NIS
Date: Mon, 10 Jul 2000 22:31:31 -0700
Has anyone come up with a fix for the broken autofs in RedHat 6.2. In
/var/log/messages:
automount: can not open lookup module auto.home
(/usr/lib/autofs//lookup_auto.home.so: can not open shared object file:
No such file or directory)
Message is correct, file is not there. I did a ln -s to
/usr/lib/autofs/lookup_userhome.so. But when I try and list the home
directory a symbolic link gets created to its self, /home/dhighley ->
/home/dhighley. I see that the path in the log file has a doubled / in
it also.
There were no fixes posted on the RedHat site.
More testing has found that it is only broken if you are using NIS. I
ftpd the NIS master file to
/etc directory and did a ./autofs restart and it now works. I reported
this to RedHat. What is more strange, I check with a friend who has
RedHat 6.2 installed and he tells me that the whole directory
/usr/lib/autofs does not exist on his system. Whats more the
automountd programs seem to report the same version.
--
Regards,
David Highley
Highley Recommended, Inc.
2927 SW 339th Street
Federal Way, WA 98023-7732
Phone: (206) 669-0081
FAX: (253) 838-8509
Email: [EMAIL PROTECTED]
WEB: http://www.highley-recommended.com
------------------------------
From: Vic Mulyk <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Not Quite C
Date: Tue, 11 Jul 2000 05:43:25 GMT
Stephan Beyer wrote:
> Hi,
>
> I'm interested in LEGO Mindstorm's NQC. Has anyone got
> experience in it?
> Or where to find information...?
>
> thanks
> Stephan Beyer
>
> --
> Stephan Beyer
> mailto:[EMAIL PROTECTED]
> http://lightning.prohosting.com/~sbeyer/
LegOS works great. I built a track bot that is loaded with multitasking
firmware for motor control and simultaneously playing a tune. The
coding
style reminds me of vxWorks tasks.
Everything you need, less the Mindstorm kit, is on the LegOS site.
ie. prebuilt rpm's for h8/300 cross development on a Red Hat/Mandrake
host.
Give it a spin. It's a blast!
-Vic
------------------------------
From: Vic Mulyk <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Serial comms in C/C++/probably anything!
Date: Tue, 11 Jul 2000 05:49:25 GMT
Jem wrote:
> Hi guys,
>
> I'm developing an application that takes bytes of a serial port and
> throws them out of a socket interface onto a LAN. All is well and good
> BUT how do I make sure that the bytes are "untampered" with, i.e. \r
> hasn't been removed or changed into \n or \0 and ALL control codes will
> pass through?
>
> There are loads of termios settings I realise but it would appear that
> \r will be affected all the time by things like, what column is the
> cursor in, etc... Am I reading the manuals wrong? Is there a nice
> straightforward way of getting, byte by byte, each /dev/ttyS0 byte?
>
> Currently I'm using open() and read() to get the bytes...Maybe I need to
> go to a lower level somehow? I mean, transferring of binary data over a
> com port must be possible, it's just the books seem to approach it from
> the point of view of talking to headless server devices and the like.
>
> The options I have come up with so far would be:
>
> c_iflag : IGNBRK
> ~ISTRIP
> ~INLCR
> ~IGNCR
> ~ICRNL
>
> c_oflag : OPOST
> ~ONOCR
> ~OCRNL
> ~ONLRET
>
> c_cflag : CLOCAL
> CS8 8 bit
> ~CSTOPB
> ~HUCPL
>
> Do I need ALL of these constants in termios or am I going about it all
> wrong?
>
> Thanks for any help,
>
> Jeremy
A nice piece of code is LogSerial. You can find it in the bowels of the
metalab ftp site. I slightly modified it to use select to block until
incoming activity was present on my serial channel. It works great for
either binary or ascii.
It's a good framework to start with anyhow.
-Vic
------------------------------
From: David Highley <[EMAIL PROTECTED]>
Subject: Why Does Linux Arp All The Time?
Date: Mon, 10 Jul 2000 22:35:22 -0700
Snooping the net has shown that Linux seems to be a noisy network
neighbor ARPing all the time. Is there a way to disable this? Kind
of reminds me of Windows behavior.
--
Regards,
David Highley
Highley Recommended, Inc.
2927 SW 339th Street
Federal Way, WA 98023-7732
Phone: (206) 669-0081
FAX: (253) 838-8509
Email: [EMAIL PROTECTED]
WEB: http://www.highley-recommended.com
------------------------------
From: Tim Roberts <[EMAIL PROTECTED]>
Subject: Re: Microsoft's new ".NET"
Date: Mon, 10 Jul 2000 23:30:18 -0700
[EMAIL PROTECTED] (RealCea) wrote:
>Might as well put Microsoft on your right hand or forehead.
>...
>Whats up with the crappy BIOs/IRQ architecture?
It may be crappy, but it doesn't have anything to do with Microsoft. The
IRQ architecture is thanks to Intel, and the BIOS was derived from CP/M and
cemented into the PC by IBM. Further, there is nothing fundamentally wrong
with the concept of a BIOS. Many architectures have them, they just use
different names.
But this STILL has little to do with Linux system development.
--
- Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
------------------------------
From: Carlos Villegas <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.hardware
Subject: linux: 'insmod sr_mod': no module by that name found
Date: Tue, 11 Jul 2000 06:44:43 GMT
My goal is to have the 'sr_mod module' load automatically.
As root I typed: 'insmod sr_mod'
And I got this:
insmod: sr_mod: no module by that name found
How can I get the sr_mod module to load automatically given the above
obsticle?
======================================
-- Carlos Villegas
-- e-mail: [EMAIL PROTECTED]
======================================
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Dima Maziuk <[EMAIL PROTECTED]>
Subject: Re: How to port MSVC++ app to Linux?
Date: Tue, 11 Jul 2000 01:49:37 -0500
Pjtg0707 wrote:
>
> On Mon, 10 Jul 2000 17:56:41 -0500, Dima Maziuk <[EMAIL PROTECTED]> wrote:
...
> >MSVC++ tends to put app logic code into UI; MFC was not designed with
> >portability in mind (IMO when they designed MFC the mind wasn't there
> >at all). You may well spend the rest of your life just trying to find
> >model, view & controller in MSVC/MFC app.
...
> Can't that be said of pretty much of OOP in general? Unless you have
> the classes on the platforms you intend to port to, the OOP advantage
> just isn't there anymore.
Yeah, well, you can write portable code. M$ doesn't, so the OOP
advantage
just isn't there indeed.
>Perhaps Microsoft may one day decide to port MFC
> to Linux; we will then have all the Microsoft apps we can handle!
Dear God please no. :)
Dima
--
Stress is when you wake up screaming
and you realise you haven't fallen asleep yet
=============================================
BoomTime, 46 Confusion 3166, 0:4:14 (1)
------------------------------
From: Carlos Villegas <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.hardware
Subject: linux:Unresolved symbol using 'insmod sg'
Date: Tue, 11 Jul 2000 06:19:36 GMT
My goal is to have the 'sg module' load automatically.
As root I typed: 'insmod sg'
And I got this:
Using /lib/modules/2.2.14/scsi/sg.o
/lib/modules/2.2.14/scsi/sg.o: unresolved symbol
is_reg_chrdev
How can I get the sg module to load automatically given the above
obsticle?
======================================
-- Carlos Villegas
-- e-mail: [EMAIL PROTECTED]
======================================
--
======================================
-- Carlos Villegas
-- e-mail: [EMAIL PROTECTED]
======================================
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Why Does Linux Arp All The Time?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 11 Jul 2000 06:50:05 GMT
On Mon, 10 Jul 2000 22:35:22 -0700, David Highley
<[EMAIL PROTECTED]> wrote:
>Snooping the net has shown that Linux seems to be a noisy network
>neighbor ARPing all the time. Is there a way to disable this? Kind
>of reminds me of Windows behavior.
You have to substantiate your finding a little more; do you know that
these requests are not necessary? ARP is needed to discover the MAC adress of
a peer. The results of an ARP query are cached for some time to prevent too
much ``arping''. I believe the expiry is 30 seconds?
--
#exclude <windows.h>
------------------------------
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Re: 2.4.0test2 and pppd
Date: Tue, 11 Jul 2000 00:13:55 -0700
No need to act haughty. I keep that in my email fields because some
sites steal the info from your browser and it pisses me off.
John Gluck wrote:
>
> "[EMAIL PROTECTED]" wrote:
>
> > I have installed the newest "stable" devel. kernel. I still cannot get
> > pppd working. ppp.txt which is supposed to be included does not seem to
> > be there (find has not found it). In /var/log/messages I get input/ouput
> > errors and during boot I get ip_always_defrag not found. Can anyone give
> > me the documentation needed? By reading the files included w/ ppp-2.4.0,
> > I think I need to use ppp-on (edited) in conjunction w/
> > ppp-dialing-scripts (or some such, edited as well). Can anyone give me
> > some pointers? Merci beaucoup.
>
> I was going to send you a meaningful reply, however the vulgarity of your
> return address told me not to bother
>
> --
> John Gluck (Passport Kernel Design Group)
>
> (613) 765-8392 ESN 395-8392
>
> Unless otherwise stated, any opinions expressed here are strictly my own
> and do not reflect any official position of Nortel Networks.
------------------------------
From: "Quiney, Philip [HAL02:HH00:EXCH]" <[EMAIL PROTECTED]>
Subject: Re: question about /proc file system
Date: Tue, 11 Jul 2000 08:02:30 +0100
Duke Lee wrote:
>
> but the problem is that my user process is never waken up becuase no process
> tries to read from it. My question is if it is possible to flush the data
> from the kernel side so that /proc files are written out? Or is there some
> other solution? Thank you for your help.
>
> duke
Hi,
I think you have missed the point. When a user process attempts to read
the /proc file the function 'callback' established when the proc file
was created is called - there is no concept of the kernel flushing
anything.
So when you do 'cat /proc/cpuinfo' the function which generates the
output you see is called which basically does a lot of 'sprintf' calls
into a supplied buffer (which you must take care not to write off the
end).
Rubini's book 'Linux Device Drivers' covers this in detail.
HTH
Regards
Phil Q
--
Phil Quiney CSIP Demonstrator
[EMAIL PROTECTED] Nortel Networks,
Telephone: +44 (1279) 402363 London Rd, Harlow,
Fax: +44 (1279) 402885 Essex CM17 9NA,
United Kingdom.
"This message may contain information proprietary to Northern
Telecom so any unauthorised disclosure, copying or distribution
of its contents is strictly prohibited."
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: sizeof() in gcc
Date: 11 Jul 2000 07:24:36 GMT
On Mon, 10 Jul 2000 16:37:15 GMT, Norm Dresner <[EMAIL PROTECTED]> wrote:
>I'm getting a "parse error" on the (simplified) line
> #if ( sizeof(int) ) != 4
>
>Is this really illegal?
>
>Is there any other way to do size comparisons in the pre-processor?
>
> Norm
>
>
You can write it as a proper C conditional statement. Any decent compiler
will recognize the condition is always false/true, whatever the case may
be and eliminate the dead code.
if ( sizeof(int) != 4 ) {
alternative one;
} else {
alternative two;
}
Read "decent compiler" as one that does eliminate dead code.
Villy
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Crossposted-To: comp.arch.embedded,linux.redhat.development
Subject: Re: Possible bug in insmod (RH5.2)
Date: 11 Jul 2000 07:32:22 GMT
On Mon, 10 Jul 2000 14:14:37 GMT, Norm Dresner <[EMAIL PROTECTED]> wrote:
>I�m having a problem because INSMOD is not loading one module correctly.
>Here�s the system:
> RH 5.2 w/Real-Time Linux 0.9J extensions to the kernel
> gcc-2.7.2.3-14
> binutils (ld) 2.9.1.0.15-1
> modutils (insmod) 2.1.85-9
>
>An interface board I�m using has its 64K dual-ported segment located in
>PC-address space at 0x000D0000, so I�m trying to get the module compiled so
>that a particular `segment� falls at that address so I can use direct
>addressing of registers instead of having to dereference pointers for every
>access.
If you need to access memory at a specific physical address you need
to call the appropriate kernel function to give you the equivalent
kernel virtual address, which may or may not be the same.
Read the IO-mapping.txt in the Documentation directory of the linux
source.
Villy
------------------------------
From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: Sockets in kernel module
Date: 11 Jul 2000 07:33:15 GMT
On 10 Jul 2000 13:15:24 +0200, Mathias Waack <[EMAIL PROTECTED]> wrote:
>"Sake" <[EMAIL PROTECTED]> writes:
>
>> What are the set of routines can be used to do socket operations from
>> within a kernel module or a device driver.
>
>First remark you shouldn't do that. If you still want do that:
>
>Open the socket from user space and pass the fd throw an ioctl-call
>to your driver. No you can use it.
>
>Mathias
You could study the kernel NFS code to see how this is done with the
NFS sockets.
Villy
------------------------------
From: Zoran Cutura <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: linux: 'insmod sr_mod': no module by that name found
Date: Tue, 11 Jul 2000 10:05:44 +0200
Carlos Villegas wrote:
>
> My goal is to have the 'sr_mod module' load automatically.
>
> As root I typed: 'insmod sr_mod'
> And I got this:
> insmod: sr_mod: no module by that name found
>
> How can I get the sr_mod module to load automatically given the above
> obsticle?
>
> --------------------------------------
> -- Carlos Villegas
> -- e-mail: [EMAIL PROTECTED]
> --------------------------------------
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Hello Carlos,
automatical loading of modules is done by the kernels
autoload function which needs to be compiled in. But also
your post shows that the module is not available for
loading. This indicaters that there is no file called
sr_mod in the /lib/modules/2.2.15/misc path (this path
is an example an must vary for other kernelversions
or modules that don't reseed in the misc directory.)
Where is this modul from? If it is in the standard kernel
simply construct a new kernel (look up the web for how
to do this, and read the manual of your distribution.)
and don't forget to type make modules modules_install.
Hope this is of any help.
Z
--
LISP is worth learning for the profound enlightenment experience you
will have when you finally get it; that experience will make you a
better programmer for the rest of your days. Eric S. Raymond
------------------------------
** 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 (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
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
******************************