Linux-Development-Sys Digest #71, Volume #7 Thu, 19 Aug 99 09:14:12 EDT
Contents:
Re: [Q] Parallel port access program permission (YANAGIHARA)
Re: [Q] Parallel port access program permission (YANAGIHARA)
Re: How do you revert from Afterstep to KDE? (Robert McGwier)
Talking to floppy and hard drive controllers under Linux ([EMAIL PROTECTED])
WFQ inside linux (Anshul Kothari)
Re: Why so inefficient source RPM's ?? (Peter Mutsaers)
Re: C++ templates: More than Turing Complete? (Stephan Houben)
Re: Custon Device Drivers (Mark Tranchant)
WFQ inside linux (Anshul Kothari)
Re: Troll (was: why not C++?) (Stephan Houben)
Custon Device Drivers (Robin Imrie)
Driver to map PCI memory space ("S.Ramaswamy")
Re: RedHat 5.1 / 5.2 / 6.0 (Dr H. T. Leung)
Re: Calling a BIOS interrupt (Bartosz Klimek)
Question about segments (Bartosz Klimek)
Re: Custon Device Drivers (Brent R Brian)
Re: Question about segments (Erwin S. Andreasen)
----------------------------------------------------------------------------
From: YANAGIHARA <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.questions
Subject: Re: [Q] Parallel port access program permission
Date: Thu, 19 Aug 1999 14:24:39 +0900
Hello, everybody.
In article <[EMAIL PROTECTED]>,
William Burrow wrote
>Why not trying to read and write from /dev/lp0? Is your parallel port
>not supported?
The device which is connected to parallel port is not
printer. It is a original electronic circuit board of my
own making, so transaction protocol is different to printer.
So I thought that inb/outb oparation is easier than opening
/dev/lp0.
--
Thank you for reading.
Yanagihara
------------------------------
From: YANAGIHARA <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.questions
Subject: Re: [Q] Parallel port access program permission
Date: Thu, 19 Aug 1999 14:12:13 +0900
Thank you for your answers.
In article <7pf08m$8vd$[EMAIL PROTECTED]>,
Victor Wagner wrote
>Trying to manage some strange parallel port device, aren't you?
Yes. My parallel port device is a board of my own making to
control other experimental hardware. I want to use this
board quickly, and I don't have many hours to learn device
driver programming. So I chose dirty but quickly way.
(But I'm interested in device driver programming. So, some
time, I want to rebuild this program as driver module.)
>2. The quick and dirty way
>
> Read a section about "Changing process persona" in info libc
>
> Make your program setuid root and make call to seteuid(getuid())
> just after calling ioperm.
> Than make your program owned by root and chmod u+s it.
Thanks. I tried chmod command. Other users became to use my
program successfully.
> Of course, having yet another suid-root prog is not good, but
> it would do the job.
I'm understanding this way is dirtier than making kernel
driver module. But, I think chmod oparation is better than
getuid(). Because root can administer permission without
rebuild the program. What do you think about this point ?
--
Thank you for reading.
Yanagihara
------------------------------
From: Robert McGwier <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.alpha,comp.os.linux.development.apps
Subject: Re: How do you revert from Afterstep to KDE?
Date: Thu, 19 Aug 1999 06:07:26 GMT
Sigh. At a shell prompt in X windows type
switchdesk.
It will ask you the appriopriate questions, tell you that you need to restart X
(log out). Your
default desktop will then be KDE. Afterstep BYTES ;-).
Bob
Xiaozhou Qiu wrote:
> Modify /etc/X11/xinit/xinitrc
>
> Xiaozhou Qiu
>
> Linux Consortium
> Interoperability Lab
> UNH
>
> Mal wrote:
>
> > How do you revert from Afterstep to KDE? I initially had KDE running on
> > RedHat6, however i swithed to Afterstep. How does one revert back to
> > KDE. I have tried a switch too, but for some reason there is no option to
> > go back to KDE.
> >
> > ------------------ Posted via CNET Linux Help ------------------
> > http://www.searchlinux.com
------------------------------
From: [EMAIL PROTECTED]
Subject: Talking to floppy and hard drive controllers under Linux
Date: Thu, 19 Aug 1999 05:36:54 GMT
I need to command the floppy and hard drive controllers of the system.
(i.e. Directly command the floppy controller to format a track, read,
write and verify sectors). Does Linux have system calls or routines
for doing something like this? If so, where would I find them? What
header are they defined in?
Should I just use the controller directly, via I/O ports? Is there
perhaps a character-based device I can open and use ioctl() with to
accomplish this?
Thank you for your response.
-- Daniel Medeiros
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
------------------------------
From: Anshul Kothari <[EMAIL PROTECTED]>
Subject: WFQ inside linux
Date: Thu, 19 Aug 1999 04:56:43 GMT
------------------------------
From: Peter Mutsaers <[EMAIL PROTECTED]>
Crossposted-To: linux.redhat.misc,linux.redhat.rpm
Subject: Re: Why so inefficient source RPM's ??
Date: 18 Aug 1999 23:33:57 +0200
>> "ST" == Suchandra Thapa <[EMAIL PROTECTED]> writes:
ST> If you do a rpm -Uvh or rpm -ivh to the source rpm then you
ST> should get the tar.gz'ed source in the /usr/src/redhat/SOURCE
ST> directory and the spec in /usr/src/redhat/SPEC directory.
ST> Just download the patch and place it in the SOURCE directory
ST> and add the proper lines to the spec files (Patch[n]:
ST> patch.tar.gz where n is some integer at the top of the spec
ST> file and a corresponding %patch[n] -your_options_to_patch
ST> before the
ST> %build). Then after a rpm -bb your.spec or rpm -ba your.spec
ST> %the binary
ST> rpm should appear in /usr/src/redhat/RPM hierarchy and the
ST> source rpm in /usr/src/redhat/SRPMS.
I know, but to do that you have first to download the whole updated
RPM. My problem is that the source RPM's aren't distributed as
separate orig-tarball, spec file, and patches. Thus, for every minor
update to the patches and/or specfile, you have to download the whole
SRPM again, which is terribly inefficient and wasteful.
--
Peter Mutsaers | Abcoude (Utrecht), | Trust me, I know
[EMAIL PROTECTED] | the Netherlands | what I'm doing.
------------------------------
From: Stephan Houben <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: C++ templates: More than Turing Complete?
Date: 19 Aug 1999 09:28:09 +0200
[EMAIL PROTECTED] (Davin McCall) writes:
>
> Incidentally, if a C++ compiler couldn't compile the example given to
> demonstrate "why not all C++ programs can be compiled to finite
> assembly code" (although some that can't could be run as a script), it
> is a problem with the compiler design rather than any logical
> impossibility.
>
> eg
>
> ==== begin ====
>
> template <class t> func(T x, int i)
> {
> if( i > 0 ) func(&x, i - 1);
> }
>
> main()
> {
> int i;
> func(i, 10);
> }
>
> ===== end ====
>
> This ought to be compilable, as it is algorithmically identical to the
> following C program:
>
> func2(void *x, int i)
> {
> if(i > 0) func2((void *)&x, i - 1);
>
> func1(int x, int i)
> {
> if( i > 0 ) func2((void *)&x, i - 1);
> }
>
> main()
> {
> int i;
> func1(i, 10);
> }
>
> ==== end ====
>
>
> The key is that func2 handles all the cases where 'x' is a pointer
> sufficiently. As it never dereferences a pointer, and int * and an int
> ****** can be treated the same way.
What you have described is essentially a "homogenous mapping" for
the template, i.e. all instances of the template are implemented
by the same code. C++ compilers generally implment templates in
a "heterogenous" way (i.e. create new code for every instance of
the template). This is the cause of the well-known critique that
C++ templates creates ""code bloat".
Heterogenous templates lead to a lot of other problems, too,
because it makes separate compilation of templates difficult.
Depending on how the templates are used (i.e. which instances
are required), different code has to be generated. This problem
is solved in different ways in different C++ compilers, which means
that code for a C++ compiler that uses a "template repository"
to solve the problem might not work on a C++ compiler that
takes the naive view that every template should have a definition
in the current compilation unit.
So far for a "standard" language...
Although it is, I think, theoretically possible to implement a C++
compiler with homogenous templates, the way templates are defined
in C++ makes this difficult. Personally, that's my main problem with
the C++ template mechanism.
Greetings,
Stephan
------------------------------
From: Mark Tranchant <[EMAIL PROTECTED]>
Subject: Re: Custon Device Drivers
Date: Thu, 19 Aug 1999 09:48:18 +0100
Reply-To: [EMAIL PROTECTED]
No, you can do a binary-only module. You'll have to support many
different versions, though, and everyone will hate you for it.
An easier way may be to publish the driver source, but make the driver a
simple interface. It sounds as though you have some complex stuff going
on in it that you'd rather keep closed. Move all of that stuff to a
binary-only statically linked user-space application, which are much
more robust to kernel version change. People will like you a bit more,
too.
Robin Imrie wrote:
>
> Hi,
>
> We have developed an ISA card that is only avalable from us. If I was
> to write a device driver for this card would I have to publish the
> source for the device driver? or can we maintain that the binary is
> only available from us when the customer purchases a system from us.
------------------------------
Crossposted-To: comp.os.linux.networking
From: Anshul Kothari <[EMAIL PROTECTED]>
Subject: WFQ inside linux
Date: Thu, 19 Aug 1999 05:00:52 GMT
hi,
I am suppose to incorporate WFQ packet scheduling algorithm in the linux
os. Can any one point me to the documentation of networking
stuff in linux. I read the lhg & some tutorial but they doesn't
seems to be of much help as i want to know the implementation of
the networking protocol and prevailing scheduler.
TIW,
anshul
------------------------------
From: Stephan Houben <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Troll (was: why not C++?)
Date: 19 Aug 1999 09:42:06 +0200
[EMAIL PROTECTED] (Rainer Joswig) writes:
> A Lisp users says: I don't care what language the kernel
> is written in, as long as it is Lisp.
IMHO, a supposedly "general purpose OS" should do more than
just please the Lisp users. (Any estimates of the precentage
of the programming community which consider themselves
Lisp users?)
> The difference between a Lisp machine and a Linux
> system is huge. The Lisp Machine has an open, incrementally
> changeable and dynamic OS. The OS is written in a
> pure OOP style. That means that things like
> IP-Packets or Processes are objects. And operations
> on them are implemented as methods.
But all this could be provided by a Lisp library which interfaces
with the underlying OS. Have the Linux kernel start up a Lisp
interpreter directly after booting and presto: your Lisp OS is
ready to run. You can then write a GUI or whatever in Lisp and
have *that* executed on startup.
Of course, the advantage that this gives you from just running
a Lisp interpreter from the shell is debatable. At least, you can
pretend you're not using Linux...
Now I think of it, there's also a C++ interpreter floating around
somewhere. So the same technique could be used to create a "C++ OS",
thereby answering the question of the original poster.
(And a Java OS, and a Perl OS, and a... Python OS. Mmm, perhaps
this is a cool idea after all.)
Greetings,
Stephan
------------------------------
From: [EMAIL PROTECTED] (Robin Imrie)
Subject: Custon Device Drivers
Date: Thu, 19 Aug 1999 08:09:00 GMT
Hi,
We have developed an ISA card that is only avalable from us. If I was
to write a device driver for this card would I have to publish the
source for the device driver? or can we maintain that the binary is
only available from us when the customer purchases a system from us.
thanks in advance
Robin Imrie
============
Robin Imrie
Software Engineer
SysMedia Ltd
email: [EMAIL PROTECTED]
url: http:://www.sysmedia.co.uk
------------------------------
Crossposted-To: linux.redhat.development
Date: Thu, 19 Aug 1999 09:16:22 +0200
From: "S.Ramaswamy" <[EMAIL PROTECTED]>
Subject: Driver to map PCI memory space
Hi,
I am looking for a Linux-specific driver ( I am using RH 6.0 , intel )
to map PCI memory space. On Solaris 2.6 I used the "xsvc" driver and did
a mmap to map the PCI memory. Any information will be appreciated.
Thanks
Ramaswamy
------------------------------
From: [EMAIL PROTECTED] (Dr H. T. Leung)
Subject: Re: RedHat 5.1 / 5.2 / 6.0
Date: 19 Aug 1999 09:28:23 GMT
1. 6.0 came with kernel 2.2.5; 5.2 came with 2.0.36, I believe. But then, you
should always use the latest if you are worried about latest SMP/network devices
developments. It doesn't really matter anyway, as you can always graft a newer
kernel on top of any distribution.
2. 3. 4. you probably have to get onto the kernel mailing list, if you really
want to know.
5. Donald Becker is the guru for network device drivers (he wrote most of them, I
believe). His web site is as follows.
http://cesdis.gsfc.nasa.gov/linux/drivers/
In article <0fpu3.4273$001.2083434@WReNphoon3>, [EMAIL PROTECTED] (babu
krishnamurthy) writes:
|> Hi,
|>
|> I am new to Linux. Please help me
|> with the following queries:
|>
|> 1. what is the kernel version in
|> RedHat 5.1 / 5.2 / 6.0 ?
|>
|> 2. what is the extent of SMP support
|> in these kernel versions ?
|>
|> 3. how much does it affect the Network
|> Device Driver Development ?
|>
|> 4. where can I find the details of these
|> internals ?
|>
|> 5. could you suggest the best possible
|> books / resources for Network Device
|> Driver development
|>
|> Thank you in advance.
|>
|> - Babu -
--
--------------------------------------------------
"What you don't care cannot hurt you." Chap. 7a, AMS-NS
------------------------------
From: Bartosz Klimek <[EMAIL PROTECTED]>
Subject: Re: Calling a BIOS interrupt
Date: Thu, 19 Aug 1999 11:46:24 GMT
Hi, Gregory.
Gregory Hayrapetian wrote:
>
> Can I call a BIOS interrupt, like int 0x10 or something, in Linux?
Bad news: No, it isn't possible. The problem is that the BIOS code is
written to run in the real mode of the processor while Linux runs in the
protected mode.
What exactly do you want to do? 0x10 is about graphics. You can use
svgalib to do graphics in Linux.
> I heard that Linux saves informations of the BIOS at boottime.
What kind of information do you mean? Never heard of it anyway.
Take care,
--
Bartosz Klimek
mailto:[EMAIL PROTECTED]
------------------------------
From: Bartosz Klimek <[EMAIL PROTECTED]>
Subject: Question about segments
Date: Thu, 19 Aug 1999 11:46:30 GMT
Hello.
There's something I don't understand about process segments. I suppose
every process in Linux has a code segment, data segment, const data
segment, stack segment. And now, if I have a pointer, e.g. char *p, it
is a 32b offset. Look at this:
/* global stuff */
char *a = "aaa"; /* string "aaa" should be in const data seg. */
char b[] = "bbb"; /* string "bbb" should be in data seg. */
void f() {
char c[] = "ccc"; /* string "ccc" should in stack seg. */
char *p;
p = a;
puts(p); /* (1) */
p = b;
puts(p); /* (2) */
p = c;
puts(p); /* (3) */
}
Question: how does the compiler (or whatever) know how to interpret the
32b offsets in lines (1), (2), (3)? In each line p points to data in a
different segment. Maybe the offsets are something more than just
offsets in flat segments?
AFAIR, you need an offset and a segment register to reach data in
memory. But if you have the offset only, how do you know which segment
register to use? Maybe the segments overlap? No, it can't be...
I tried to dissasemble this code but I still don't get it.
I hope I've managed to put it clear. Thanks in advance for any answers.
Best regards,
--
Bartosz Klimek
mailto:[EMAIL PROTECTED]
------------------------------
From: Brent R Brian <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: Custon Device Drivers
Date: Thu, 19 Aug 1999 08:42:33 -0400
Hi,
If you are the ONLY group making this ISA card, why care about
publishing the
source ... you may get help debugging and IMPROVING if you publish the
source.
It certainly raises the TRUST factor, and GOOD WILL between vendor and
customer could sell more cards.
I just had a customer send me an 8255 ISA card, parallel i/o. They
asked me to write a Linux driver. I found one that worked GREAT on the
web for free, source and all. I tested it and charged them a small fee
for my time. They are VERY HAPPY that I did not charge them to reinvent
the wheel, and LINUX got a big boost in their eyes from this.
Not to mention, the driver has worked on ALL the 8255's I have tested it
against, (No particular vendor) and even a board that EMULATES an 8255.
Brent
==================
Robin Imrie wrote:
>
> Hi,
>
> We have developed an ISA card that is only avalable from us. If I was
> to write a device driver for this card would I have to publish the
> source for the device driver? or can we maintain that the binary is
> only available from us when the customer purchases a system from us.
>
> thanks in advance
>
> Robin Imrie
> ------------
> Robin Imrie
> Software Engineer
> SysMedia Ltd
>
> email: [EMAIL PROTECTED]
> url: http:://www.sysmedia.co.uk
------------------------------
From: [EMAIL PROTECTED] (Erwin S. Andreasen)
Subject: Re: Question about segments
Date: 19 Aug 1999 12:59:26 GMT
Reply-To: [EMAIL PROTECTED]
On Thu, 19 Aug 1999 11:46:30 GMT, Bartosz Klimek wrote:
>There's something I don't understand about process segments. I suppose
>every process in Linux has a code segment, data segment, const data
>segment, stack segment. And now, if I have a pointer, e.g. char *p, it
>is a 32b offset. Look at this:
Nope, everything looks like just a one big 32-bit address space to the user
process (and this flat address space is true for just about all Unices I
think). Some of that virtual address space is then mapped to physical pages,
but the processes know nothing about that and don't really care whether this
page really resides in memory or in swap.
Data, text, constants are page of the virtual address space which have
different protection. For example the code segment is mapped
read-only/executable from a file and thus automatically shared between
several copies of that same program running.
Stack is slightly special, since it has to automatically grown downwards.
AFAIR the kernel traps illegal access (i.e. access to a virtual address
which is not mapped) and if that would fall within the stack's size, it
expands the stack accordingly.
Check it out for yourself, try catting a file like: /proc/ProcessID/maps.
You will see all the pages that are mapped, if they come from a file and if
then, what device and inode number on that device (you will probably see a
lot of shared libraries), and what protection they have.
On disk however, in the ELF type executable, there are sections which each
have flags that tell the ELF code in the kernel how to load each section and
what protection to give it. If you try using "objdump -h" on a program, you
can see those sections, how big they are, what flags they have (e.g. some
are read-only, some are not).
--
==============================================================================
Erwin Andreasen Herlev, Denmark <[EMAIL PROTECTED]> UNIX System Programmer
<URL:http://www.andreasen.org> <*> (not speaking for) DDE
==============================================================================
------------------------------
** 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
******************************