Linux-Development-Sys Digest #694, Volume #7 Wed, 22 Mar 00 03:13:21 EST
Contents:
Re: VFAT inode numbers change on remount (Daniel Dorau)
Re: beep "color"? ([EMAIL PROTECTED])
Re: linux pthreads problem on dual processor machine (Andreas Rottmann)
Re: linux pthreads problem on dual processor machine (Juergen Kreileder)
Re: How to test a device driver (Ron Reeder)
Re: Diamond MM-16 device driver (Sebastian Kuzminsky)
Re: Gonna build a computer... (Patrick Hagerty)
low level graphics programming (james b lindstrom)
poll()ing TCP sockets - when can I expect a POLLHUP? (Steven Eker)
Re: Implicit declarations... (nilesh patel)
Re: Binary compatibility: what kind of crack are they smoking? (Jim Richardson)
Re: Hayes PCI Accura 56K Internal Modem - Support? (Tim Smith)
undo unmount using magic sysrg-key ?? (Jan-Willem Stroeken)
Re: linux pthreads problem on dual processor machine (Andreas Rottmann)
Re: Help - GCC & libc 6 (2.1.2) compile problems. (Andreas Jaeger)
----------------------------------------------------------------------------
From: Daniel Dorau <[EMAIL PROTECTED]>
Subject: Re: VFAT inode numbers change on remount
Date: 21 Mar 2000 20:41:33 GMT
Anders Larsen <[EMAIL PROTECTED]> wrote:
> The reason is that the VFAT filesystem does not have inodes at all.
[...]
Thanks for the quick reply. I already feared that I may have to live
with it.
--
Daniel Dorau [EMAIL PROTECTED]
<< Linux is like living in a tipi: No windows, no gates, Apache inside >>
PGP key available, send mail with 'Subject: send pgp key'
fingerprint: 8D7E0B2F9E2E5338 DB7B24742E8B2EAE
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: beep "color"?
Date: Tue, 21 Mar 2000 23:24:21 GMT
Here is a small perl program that does the job of beeping little
melodies or warnings. Should be self explanatory. Runs under linux
Mandrake 7.0.
#!/usr/bin/perl
# Usage: beep
$|=1 ;
if ($#ARGV==(-1)) {
for ($i=3; $i<25; ++$i) {
# usage b volume pitch duration
system("xset b 100 " . 100*$i . " 100");
print "\a"; select(undef,undef,undef, 0.1);
}
for ($i=25; $i>3; --$i) {
system("xset b 100 " . 100*$i . " 100");
print "\a"; select(undef,undef,undef, 0.1);
}
}
else {
%notes= ( );
$notes{"C"} = 128;
$notes{"C#"} = 135.6;
$notes{"D"}= 143.68;
$notes{"D#"}= 152.22;
$notes{"E"}= 161.27;
$notes{"F"}= 170.86;
$notes{"F#"}= 181.02;
$notes{"G"}= 191.78;
$notes{"G#"}= 203.19;
$notes{"A"}= 215.27;
$notes{"A#"}= 228.07;
$notes{"B"}= 241.63;
$notes{"O"}= 256;
@chars= split(//, $ARGV[0]);
@cvals = unpack("C*", $ARGV[0]);
for ($i= 0; $i<=$#chars; ++$i) {
if (defined($notes{$chars[$i]})) { $hz= $notes{$chars[$i]}; }
else { $hz= int(exp(0.15*$cvals[$i]-10.0)); print "*"; }
system("xset b 100 " . int($hz) . " 125");
print "\a";
select(undef,undef,undef, 0.3); # sleep
}
}
# return to the standard Unix beep
system("xset b 100 400
100");
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Andreas Rottmann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: linux pthreads problem on dual processor machine
Date: 22 Mar 2000 00:04:20 +0100
[EMAIL PROTECTED] (Kaz Kylheku) writes:
> On Tue, 21 Mar 2000 14:34:22 -0500, Michael Tanenblatt
> <[EMAIL PROTECTED]> wrote:
> >Thanks -- though I am only able to locate glibc -2.1.2. Was that a typo, or am I
> >missing something? I am already using 2.1.2.
>
> Not a typo; get 2.1.3. There are some considerable bugfixes in LinuxThreads
> between 2.1.2 and 2.1.3. Perhaps you are having trouble finding a binary
> package of glibc-2.1.3 for your distro.
>
Getting a distribution-binary should be possible: Debian at least has
released its seventh package of libc6 2.1.3 - libc6_2.1.3-7.deb. (this
applies to the unstable AKA woody version of Debian only)
Andy
--
Andreas Rottmann (Dru@ICQ, 54523380@ICQ)
Pfeilgasse 4-6/725, A-1080 Wien, Austria, Europe
http://www.altern.org/arot/
mailto:[EMAIL PROTECTED]
------------------------------
From: Juergen Kreileder <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: linux pthreads problem on dual processor machine
Date: 22 Mar 2000 01:21:28 +0100
>>>>> Andreas Rottmann writes:
Andreas> [EMAIL PROTECTED] (Kaz Kylheku) writes:
>> On Tue, 21 Mar 2000 14:34:22 -0500, Michael Tanenblatt
>> <[EMAIL PROTECTED]> wrote:
>> >Thanks -- though I am only able to locate glibc -2.1.2. Was
>> >that a typo, or am I missing something? I am already using
>> >2.1.2.
>>
>> Not a typo; get 2.1.3. There are some considerable bugfixes in
>> LinuxThreads between 2.1.2 and 2.1.3. Perhaps you are having
>> trouble finding a binary package of glibc-2.1.3 for your
>> distro.
>>
Andreas> Getting a distribution-binary should be possible: Debian
Andreas> at least has released its seventh package of libc6 2.1.3
Andreas> - libc6_2.1.3-7.deb. (this applies to the unstable AKA
Andreas> woody version of Debian only)
No, it's in potato (frozen) too. Not all of these seven versions were
real glibc-2.1.3 releases, the first four versions were pre-releases.
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html
------------------------------
From: Ron Reeder <[EMAIL PROTECTED]>
Subject: Re: How to test a device driver
Date: Tue, 21 Mar 2000 17:38:26 -0700
Thanks,
I grabbed this and compiled it though:
[root@linus ftp]# make
for n in misc-progs misc-modules sbull snull short pci scull ; do make -C $n ||
exit
1; done
make[1]: Entering directory `/root/ftp/misc-progs'
cc -O2 -fomit-frame-pointer -Wall -I/usr/include asynctest.c -o asynctest
asynctest.c: In function `sighandler':
asynctest.c:18: `SignalHandler' undeclared (first use in this function)
asynctest.c:18: (Each undeclared identifier is reported only once
asynctest.c:18: for each function it appears in.)
asynctest.c:18: parse error before `29'
make[1]: *** [asynctest] Error 1
make[1]: Leaving directory `/root/ftp/misc-progs'
make: *** [subdirs] Error 1
[root@linus ftp]# uname
Linux
[root@linus ftp]# uname -a
Linux linus 2.2.12-20 #1 Thu Feb 10 12:20:25 MST 2000 i486 unknown
I went in a changed aynctest.c line 18 to jive with the origional,
and it compiled.
Thanks again.
John Brockmeyer wrote:
>
> look in http://www.lobo.net/~jab/pub/
> I have rewritten all of rubini's code to work under v2.2
> I teach a class in Linux Device Drivers.
> The code was good as of last May, but I haven't tried it with v2.3 yet.
>
> Ron Reeder wrote: Sample Web Page
>
> > Alan Donovan wrote:
> >
> > > Ron Reeder wrote:
> > >
> > > > I just tried to do a make after downloading the examples from
> > > > www.ora.com website. No got... Lotsa compiler warnings because I guess
> > > > they've moved to using lotsa typdefs (instead of just int) and the
> > > > current struct... is now a macro pointing to a function call. The code
> > > > WAS only tested on 2.1.x kernls and I was attempting to compile under RH
> > > > 6.1 2,2.12-20
> > >
> > > I don't wish to point out the obvious, but I fell into this trap: the
> > > samples from the ORA website are for pre 2.1 kernels, but they contain a
> > > directory called v2.1 which has the updated code in. You need to compile
> > > this, as the old stuff won't work any more.
> > >
> >
> > Actually, I was compiling the V2.1 stuff...
> > Which should have worked - Since 2.2.x is supposed to be the stable code for
> > 2.1 stuff...
> > Unless the V2.1 was early 2.1 and the kernel structures where changed prior to
> > releasing the stable 2.2.x stuff. That must be the case. Since you "fell into
> > that trap" then I assume that you got the V2.1 stuff to compile? What version
> > of kernel was that?
> >
> > Since, It's been a few days and nobodies responded with a link... I guess there
> > is no updated code. I'll e-mail the author. But, it looks like kernel
> > version 2.4 is quite a bit different again. I'm going to try and get that to
> > compile...
> >
--
+-------------------------------+-------------------------------+
| Ron Reeder | [EMAIL PROTECTED] |
| Denver Technical Support | Phone: (303) 389-4408 |
| Western Geophysical Company | Fax: (303) 595-0667 |
+-------------------------------+-------------------------------+
------------------------------
From: [EMAIL PROTECTED] (Sebastian Kuzminsky)
Subject: Re: Diamond MM-16 device driver
Date: 21 Mar 2000 18:34:34 -0800
<[EMAIL PROTECTED]> wrote:
] We are thinking about using a Diamond Systems Corporation
] MM-16 board for an application.
]
] We have searched the internet and the Diamond Systems site,
] but could not find much information, only a user-space application
] accessing the board and Dos/Windows drivers.
]
] Does anybody know if a Linux device-driver exist for this board?
]
] Anybody have any comments on using this board with Linux?
I bet the Diamond-MM-16 is pretty similar to the Diamond-MM. If so,
you might be able to adapt or just use my DMM driver, available at:
http://hugin.highlab.com/software/dmm/
Sebastian
------------------------------
From: Patrick Hagerty <[EMAIL PROTECTED]>
Subject: Re: Gonna build a computer...
Date: Wed, 22 Mar 2000 02:42:41 GMT
Kaz,
What's "RTFM", if you don't mind.
Patrick
Ron Reeder wrote:
> Kaz Kylheku wrote:
>
> > On Mon, 20 Mar 2000 21:49:02 GMT, Patrick Hagerty <[EMAIL PROTECTED]> wrote:
> > >Greeting and salutatations to one and all.
> > >
> > >I'm in the planning stages of setting up a PC exclusively for Linux. I
> >
> > How boring. The subject line enticed me into reading your article suggested
> > to me that you were doing something more than *assembling* a PC.
> >
> > --
> > #exclude <windows.h>
>
> True, but you still could have RTFM'd 'em anyways .
>
> <http://users.bart.nl/~patrickr/hardware-howto/Hardware-HOWTO.html>
>
> --
>
> +-------------------------------+-------------------------------+
> | Ron Reeder | [EMAIL PROTECTED] |
> | Denver Technical Support | Phone: (303) 389-4408 |
> | Western Geophysical Company | Fax: (303) 595-0667 |
> +-------------------------------+-------------------------------+
------------------------------
From: james b lindstrom <[EMAIL PROTECTED]>
Subject: low level graphics programming
Date: Tue, 21 Mar 2000 21:02:47 -0600
Can anyone point me to some information/source about low-level graphics
programming? I don't have an intent to do a serrious program or I'd use
SVGALib or GGI, etc... I just want to toy with making my own library....
any help? (Please reply to my email address instead of on here)
==================
Jim Lindstrom
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Steven Eker)
Crossposted-To: comp.unix.programmer
Subject: poll()ing TCP sockets - when can I expect a POLLHUP?
Date: 22 Mar 2000 03:51:32 GMT
Hi,
I'm managing a collection of TCP sockets with poll() (the fds are
too large for select() to be efficient) and I need to be able to
detect when the other end of a socket is closed.
Suppose one of my connections is closed from the other end.
If I set POLLIN in events I expect to see it set in revents so that I
can get 0 bytes from read() and realize what has happened. Whether
POLLHUP should be set seems unclear.
Having experimented I see:
Linux 2.2.5 fails to set POLLIN but sets POLLHUP.
FreeBSD 3.3 & SunOS 5.7 set POLLIN but not POLLUP (this seems to me to
be the most sensible behaviour).
DEC OSF1 V4.0 set both POLLIN and POLLHUP whether or not there are
still bytes to be read.
My questions:
(1) what _should_ poll() be doing?
(2) how does one use it portably in this situation?
The Linux man page is wonderfully helpful on the subject of POLLHUP:
#define POLLHUP 0x0010 /* Hung up */
I'd appreciate responses via email since I seldom read these groups.
Steven
------------------------------
From: nilesh patel <[EMAIL PROTECTED]>
Subject: Re: Implicit declarations...
Date: Wed, 22 Mar 2000 10:16:05 +0530
"David A. Mair" wrote:
> I admit I am an utter novice when it comes to system programming for
> Linux, but I have more than ten years of system programming experience
> on other platforms, so I hope I have the basic skills. I am writing a
> simple test kernel module to experiment with Linux technology before
> beginning anything bigger. I have to say that I have what appear to
> be some basic problems and hope someone here can point out my obvious
> errors.
>
> My simplest problem relates to a trivial kernel module that has
> nothing more than a call to printk() in the init_module() and
> cleanup_module(). I include kernel.h and module.h, I believe printk()
> is declared in kernel.h. I compile using the command line:
>
> gcc -Wall -DMODULE -D__KERNEL__ -DLINUX -c TestModule.c
>
> The compiler reports the following warning:
>
> Warning: implicit declaration of function 'printk_R1b7d4074'
Warning is becoz you must have included modversions.h
>
>
> The line number is the first instance of my use of printk() in the
> module. I was brave enough to load the module anyway and it behaved
> as I had planned. However, I have never been keen to run code that
> generated compilre warnings. I could give my own thoughts as to
> possible causes, but figure that would only result in my showing more
> naivity of the platform and compiler.
>
> My second problem is more platform related. In a kernel module I can
> allocate memory using kmalloc(). As I understand it this returns a
> physical rather than a linear address on the an x86 v2.2x kernel.
> Despite much reading I could not find an obvious way to generate a
> linear address mapping for this memory. For example, if I want to map
> the memory into the address space of a single process or as shared
> memory among all process how would I go about it (a document reference
> would suffice).
It returns virtual address .
>
> Thanks for any and all help.
>
> Regards,
> David.
>
> ------------------------------------------------------
> In order to avoid the harassment of spam I have
> deliberately included an invalid e-mail address in
> this message. To contact me by mail remove the not.
> after the @ symbol in the enclosed e-mail address. You
> should note that due to the quantity of mail I receive
> I may not answer and I am more likely to respond to
> follow-up messages.
> ------------------------------------------------------
------------------------------
From: [EMAIL PROTECTED] (Jim Richardson)
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.setup
Subject: Re: Binary compatibility: what kind of crack are they smoking?
Reply-To: [EMAIL PROTECTED]
Date: Wed, 22 Mar 2000 07:41:49 GMT
On 25 Feb 2000 16:23:39 GMT,
Donovan Rebbechi, in the persona of <[EMAIL PROTECTED]>,
brought forth the following words...:
>On 25 Feb 2000 14:18:02 GMT, Kari Pahula wrote:
>
>>It is then distribution makers' responsibility to compile newest
>>versions compatible with distribution-specific libraries, if they
>>choose to do so. Either way, the user is always able to compile the
>>programs herself.
>
>This assumes that there exist no third party binary only apps. This in
>the long term is a dangerous assumption.
>
>BTW, it would be kind of cool if the build system were more failsafe
>( like the BSD ports ). BSD ports basically automatically download all
>the compile time dependencies, and install them ( trying multiple ftp
>sites in case one is down ) , and the software is verified using checksums
>that come with the distribution. This way, unattended builds are much simpler.
>
>--
>Donovan
Duplicating this functionality for linux would be Way Cool (TM).
so would the ability to add groups to groups, rather than just UID's.
--
Jim Richardson
Anarchist, pagan and proud of it
WWW.eskimo.com/~warlock
Linux, because life's too short for a buggy OS.
------------------------------
From: Tim Smith <[EMAIL PROTECTED]>
Subject: Re: Hayes PCI Accura 56K Internal Modem - Support?
Date: Tue, 21 Mar 2000 23:48:01 -0800
"Steven J. Hathaway" wrote:
>
> Where can I find, if any, Linux support for the Hayes Accura 56K
> V.90/K56flex PCI Internal Fax Modem?
>
> It uses the Lucent DSP circuitry.
>
> The binary driver image found on "linuxmodem.com" does not work in my
> system.
>
> Sincerely,
> Steven J. Hathaway
> <[EMAIL PROTECTED]>
Not familiar with that particular modem...but it sounds like a
"winmodem". Winmodems are modems that have been built without
brains in an effort to lower the cost and tie you, the customer,
to Windows forever...the makers of these modems refuse to
release the docs for the hardware to developers of any operating
system other than Windows, and they refuse to provide people
with drivers for any OS other than windows.
Sorry, but those devices are one of the curses of the industry IMHO
-Tim
------------------------------
From: Jan-Willem Stroeken <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel,linux.dev.
Subject: undo unmount using magic sysrg-key ??
Date: Wed, 22 Mar 2000 08:53:27 +0100
During development of a driver I sometimes use <alt>+<sysrq>+<u> for a
quick unmount and mount read-only. Is there a way to undo this? A normal
unmount and mount r-w didn't work here
--
Nothing happens.
__________________________________________________________
Oc�-Technologies B.V. name : Jan-Willem Stroeken
P.O. Box 101 department : DVS, R&D
5900 MA Venlo e-mail : [EMAIL PROTECTED]
The Netherlands www : http://www.oce.com
Directdial: +31 (0)77 359 58 89
Fax: +31 (0)77 359 53 37
__________________________________________________________
this signature is automagically generated using 'fortune'
------------------------------
From: Andreas Rottmann <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: linux pthreads problem on dual processor machine
Date: 22 Mar 2000 01:46:44 +0100
Juergen Kreileder <[EMAIL PROTECTED]> writes:
> >>>>> Andreas Rottmann writes:
>
> Andreas> Getting a distribution-binary should be possible: Debian
> Andreas> at least has released its seventh package of libc6 2.1.3
> Andreas> - libc6_2.1.3-7.deb. (this applies to the unstable AKA
> Andreas> woody version of Debian only)
>
> No, it's in potato (frozen) too. Not all of these seven versions were
> real glibc-2.1.3 releases, the first four versions were pre-releases.
>
>
Thanks for the correction.
Andy
--
Andreas Rottmann (Dru@ICQ, 54523380@ICQ)
Pfeilgasse 4-6/725, A-1080 Wien, Austria, Europe
http://www.altern.org/arot/
mailto:[EMAIL PROTECTED]
------------------------------
From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: Help - GCC & libc 6 (2.1.2) compile problems.
Date: 22 Mar 2000 07:59:38 +0100
>>>>> Andy writes:
> Hi I have just installed libc 6 (2.1.2)on my RH 5.2 system, every thing went
> ok, checked ok, insatlled ok (in single user mode). ldd gives the libc as
> beign 2.1.2, I tested it by compling hello world, that worked. now I am
> trying to recompile gcc 2.95.2, but this gives errors (with both 2.7.2 &
> 2.95.2) (see attached log). I complied libc 2.1.2 with gcc 2.95.2.
The log is useless - you get a segmentation fault which can be
everything: A miscompiled glibc or faulty hardware.
> i installed the lib to /lib instead of the default /usr/local/lib - does
> this make any differnce?
Which configure line? The command should include --prefix=/usr .
> please what has gone wrong!
> everything else seems to work.
> all advice greatfully recieved.
> I am using RedHat 5.2 with kernel 2.2.14, gcc (as root 2.7.2) (as other
> login 2.95.2) & glibc 2.1.2.
> BTW with gcc, using multiple versions, as 2.7.2 is installed to /usr/bin
> could 2.95.2 be nstalled to the same place & still beable to use both
> versions?
Check gcc -V.
Andreas
--
Andreas Jaeger
SuSE Labs [EMAIL PROTECTED]
private [EMAIL PROTECTED]
------------------------------
** 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
******************************