Linux-Development-Sys Digest #211, Volume #8 Thu, 12 Oct 00 23:13:08 EDT
Contents:
need to get MAC addr ("Jeremy Savoy")
host names resolved from /etc/networks!!! (Thomas Drescher)
Re: Driver Loading FPGA Device (Jonathan Buzzard)
Re: Most popular Linux development environment(s)? Graphical? (Nix)
Re: Driver Loading FPGA Device (Rick Ellis)
How does a computer boot? ("GIULIO POZZANA")
storing tabular variables ("Ron")
Re: utime(touch) gives EPERM - Bug in Linux??? (Nix)
Re: LILO version 21.6 released (Rudi Sluijtman)
Re: host names resolved from /etc/networks!!! (Rudi Sluijtman)
Re: Most popular Linux development environment(s)? Graphical? (Larry Ebbitt)
Re: Most popular Linux development environment(s)? Graphical? (Larry Ebbitt)
sockets on RH 7.0 ([EMAIL PROTECTED])
Re: host names resolved from /etc/networks!!! (Thomas Drescher)
Re: A new directory hierarchy standard - need opinions (Todd Knarr)
Re: How does a computer boot? (Robert Redelmeier)
sockets per process (Eclipse mail)
Re: Most popular Linux development environment(s)? Graphical? (Robert Redelmeier)
----------------------------------------------------------------------------
From: "Jeremy Savoy" <[EMAIL PROTECTED]>
Subject: need to get MAC addr
Date: Thu, 12 Oct 2000 12:53:45 +0400
I need to get the MAC address of eth0 in a program. I think using ioctl
would be a way to do this, but the man page doesn't give me much help on
how to use it to get SIOCGHWADDR . Could someone maybe give me an example
or tell me where I can look for more documentation on this?? Thanks
Jeremy Savoy
Linux R&D
IBM - Retail Store Solutions
[EMAIL PROTECTED]
------------------------------
From: Thomas Drescher <[EMAIL PROTECTED]>
Subject: host names resolved from /etc/networks!!!
Date: Thu, 12 Oct 2000 20:22:01 GMT
Reply-To: [EMAIL PROTECTED]
Hi folks,
i have a very strange problem in my SuSE 6.2 system. :-(everyone
must also have that, thou...):
Hosts are not resolved from /etc/hosts! It didn't work at all
but....It opens the /etc/networks so i put the host names in there
just for testing!!!
See for yourself...How does it happen? Is it a major bug??
Many thanks for the explanation and hints how to solve it, since it
bothers me for months, since linux installation.
Kind regards
Thomas
# strace route dump follows....
open("/etc/ld.so.preload", O_RDONLY) =3D -1 ENOENT (No such f...
open("/etc/ld.so.cache", O_RDONLY) =3D 3
open("/lib/libc.so.6", O_RDONLY) =3D 3
open("/proc/net/route", O_RDONLY) =3D 3
write(1, "Kernel IP routing table\n", 24) =3D 24
write(1, "Destination Gateway "..., 78) =3D 78
open("/etc/nsswitch.conf", O_RDONLY) =3D 4
open("/etc/ld.so.cache", O_RDONLY) =3D 4
open("/lib/libnss_files.so.2", O_RDONLY) =3D 4
open("/etc/resolv.conf", O_RDONLY) =3D 4
open("/etc/networks", O_RDONLY) =3D 4
write(1, "isdn-gw-2 * "..., 78) =3D 78
open("/etc/networks", O_RDONLY) =3D 4
write(1, "hst1.thomas.net * "..., 78) =3D 78
open("/etc/networks", O_RDONLY) =3D 4
write(1, "hst2.thomas.net * "..., 78) =3D 78
open("/etc/networks", O_RDONLY) =3D 4
write(1, "isdn-gw-1 * "..., 78) =3D 78
open("/etc/networks", O_RDONLY) =3D 4
write(1, "loopback * "..., 75) =3D 75
write(1, "default isdn-gw-1 "..., 78) =3D 78
------------------------------
From: [EMAIL PROTECTED] (Jonathan Buzzard)
Subject: Re: Driver Loading FPGA Device
Date: Wed, 11 Oct 2000 23:31:05 +0100
In article <8s2jjd$u45$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Jonathan Buzzard) wrote:
[SNIP]
>> Could you not use two modules one to program the FPGA and one for the
>> driver. Alternatively what happens if you include it in the initialization
>> routines as a local variable and mark it with __initfunc? Will the
>> kernel free the memory used by the variable one initialised?
>
> Right now I am designing it with the FPGA programming as part of the
> initialization. I will try marking the routines with __initfunc and see
> what happens, I don't anticipate it behaving unexpectedly.
>
> I hadn't thought of two modules, what would you expect as the advantages
> to this approach?
>
Ideally you want a single kernel module that provides a driver for your
card. The problem is that if you have lots of space taken up in the
driver with information to program the FPGA it will take up kernel
memory space which is not good. Also you want to avoid having to run
user space programs so fire data at the FPGA before it can be used.
Now marking it with __initfunc may cause the memory to be released after
it has been run. That's the idea behind __initfunc at least but I don't
know if it causes variables to be released, but code is for sure.
Alternatively using two modules, the kernel will unload the FPGA upload
module after a couple of minutes freeing the kernel memory space. You
could even have the module upload to the FPGA and then fail initalization
so it never gets properly loaded. A second module the provides the
driver proper.
JAB.
--
Jonathan A. Buzzard Email: [EMAIL PROTECTED]
Northumberland, United Kingdom. Tel: +44(0)1661-832195
------------------------------
From: Nix <$}xinix{[email protected]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Most popular Linux development environment(s)? Graphical?
Date: 12 Oct 2000 19:42:25 +0100
[EMAIL PROTECTED] writes:
> But at the same time, I long for some of the super-slick visualization
> features, and the ability to use the mouse in a meaningful way when I
> choose to.
GNU global provides part of that.
--
`Naturally, a sysadmin's entire person is holy. We have the power to kill
daemons.' --- Mike Sphar
------------------------------
From: [EMAIL PROTECTED] (Rick Ellis)
Subject: Re: Driver Loading FPGA Device
Date: 12 Oct 2000 19:50:55 GMT
In article <8s2k2f$cou$[EMAIL PROTECTED]>,
Jeff Andre <[EMAIL PROTECTED]> wrote:
>: Just call schedule() inside the loop.
>I looked into that. schedule() does release the kernel lock.
Are you loading the FPGA in module_init? If so, just queue a task
(similar to a bottom half) at that time and do the loading in it.
That way you won't be holding a kernel lock during the loading.
--
http://eeek.borgchat.net/linux
------------------------------
From: "GIULIO POZZANA" <[EMAIL PROTECTED]>
Subject: How does a computer boot?
Date: Fri, 13 Oct 2000 14:48:24 +0200
Thanks for opening my mail :D.
I'm studying Informatics in Venice University, at the second year.
Actually I'm studying for an exam about Operating Systems.
Following the documentation given to me from the Institute, I've studied a
lot of theory about designing an OS, but nothing about the basics for
programming an operating system.
Fundamentally, I don't know how does a computer boot -and the basic
operations that have to be executed by the computer in this phase- (Is it a
miracle?).
Please post me solutions, advices, book titles, links for sites...
Everything could help me.
THANXX
Pozzana Mauro
Universit� C� Foscari di Venezia, CdL Informatica.
------------------------------
From: "Ron" <[EMAIL PROTECTED]>
Subject: storing tabular variables
Date: Thu, 12 Oct 2000 16:30:23 -0400
I've been using an array of objects in C++ to store variables that are in a
tabular fashion (ie. columns and rows).
I have to store these same variables in the kernel space, however, this is
done using C. What is the best way to store tabular variables in C.
I'm thinking of something along these lines (struct of struct)
struct bye{
int hi;
struct hello;
}
Any help would be appreciated,
Ron
------------------------------
From: Nix <$}xinix{[email protected]>
Subject: Re: utime(touch) gives EPERM - Bug in Linux???
Date: 12 Oct 2000 20:07:48 +0100
[EMAIL PROTECTED] (Villy Kruse) writes:
> Whether that is mandated by POSIX or other standard I have no idea.
> Somone have the POSIX text available (or unix98)?
Unix98 states, for utime():
,----[ EPERM ]
| The times argument is not a null pointer and the calling
| process' effective user ID has write access to the file but
| does not match the owner of the file and the calling process
| does not have the appropriate privileges.
`----
(`The appropriate privileges' being `root, or CAP_FOWNER' on Linux.)
--
`Naturally, a sysadmin's entire person is holy. We have the power to kill
daemons.' --- Mike Sphar
------------------------------
Crossposted-To: comp.os.linux.misc,comp.os.linux.hardware
Subject: Re: LILO version 21.6 released
From: Rudi Sluijtman <[EMAIL PROTECTED]>
Date: Thu, 12 Oct 2000 20:02:12 GMT
John in SD <[EMAIL PROTECTED]> writes:
> LILO release 21.6 is based upon Werner Almesberger's LILO version 21.
Could you please provide us with, or point to, some documentation about
the usage of the "- Completely new menu-driven user interface."
Regards,
Rudi Sluijtman.
------------------------------
Subject: Re: host names resolved from /etc/networks!!!
From: Rudi Sluijtman <[EMAIL PROTECTED]>
Date: Thu, 12 Oct 2000 20:25:10 GMT
Thomas Drescher <[EMAIL PROTECTED]> writes:
> Hi folks,
>
> i have a very strange problem in my SuSE 6.2 system. :-(everyone
> must also have that, thou...):
>
> Hosts are not resolved from /etc/hosts! It didn't work at all
> but....It opens the /etc/networks so i put the host names in there
> just for testing!!!
>
> See for yourself...How does it happen? Is it a major bug??
When I do "strace route" I also get a line
open("/etc/host.conf", O_RDONLY) = 4
Are you sure it is not in your "strace route" output ?
in /etc/host.conf (man 5 host.conf) the first line should be:
order hosts, bind
which tells the resolver to first have a look in the /etc/hosts file.
Regards,
Rudi Sluijtman.
------------------------------
Date: Thu, 12 Oct 2000 19:30:07 -0400
From: Larry Ebbitt <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Most popular Linux development environment(s)? Graphical?
Nix wrote:
>
>
> GNU global provides part of that.
>
Kdevelop does a good job of providing it all, and is getting
better.
--
Larry Ebbitt - Linux + OS/2 - Atlanta
------------------------------
Date: Thu, 12 Oct 2000 19:33:50 -0400
From: Larry Ebbitt <[EMAIL PROTECTED]>
Subject: Re: Most popular Linux development environment(s)? Graphical?
Robert Redelmeier wrote:
>
> I can't help myself :)
>
> $ vi foo.c ; gcc -O2 foo.c && ./a.out
>
> is my favorite development environment! !! or up arrow
> to repeat. gdb when needed. Use virtual consoles when
> you want to keep source open, or see compiler messages.
>
> But then again, I'm a CLI dinosaur :)
Perhaps there's a 12-step program.
I despise CLI stuff. After 40 years of programming, I have decided
that the computer is supposed to make thing easier.
The poster asked about graphical environments, so I thought I would
mention one.
--
Larry Ebbitt - Linux + OS/2 - Atlanta
------------------------------
From: [EMAIL PROTECTED]
Subject: sockets on RH 7.0
Date: Fri, 13 Oct 2000 00:16:15 GMT
Does anyone know of any changes (or pointers to detailed docs
on changes) made to the linux socket programming interface
from RH6.2 to RH7.0? Or does anyone know of any peculiarities
that arise when you fflush a FILE * fdopen'd on a socket?
(I am using 'socketpair').
Cheers,
Pete Huerter.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: Thomas Drescher <[EMAIL PROTECTED]>
Subject: Re: host names resolved from /etc/networks!!!
Date: Fri, 13 Oct 2000 02:49:13 GMT
Reply-To: [EMAIL PROTECTED]
Hi Rudi,
i verified that it doesn't read the /etc/host.conf although it is=20
there and contains order hosts bind. So where is the knot?
The nsswitch works correctly (nsswitch.conf contains 'hosts: files' to=20=
use only '/etc/hosts' - suppresses the dns query).
Another command straced is 'tcpdmatch in.telnetd hst1' which does open=20=
my host.conf. And it reads the /etc/hosts to resolve 'hst1'. (But it=20=
returns a gethostbyname(=84hst1=93) failed which is another question...)=
Thanks,
Thomas.
>>>>>>>>>>>>>>>>>> Urspr=FCngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 12.10.00, 20:25:10, schrieb Rudi Sluijtman <[EMAIL PROTECTED]> zum=20=
Thema Re: host names resolved from /etc/networks!!!:
> When I do "strace route" I also get a line
> open("/etc/host.conf", O_RDONLY) =3D 4
> Are you sure it is not in your "strace route" output ?
> in /etc/host.conf (man 5 host.conf) the first line should be:
> order hosts, bind
> which tells the resolver to first have a look in the /etc/hosts file.=
> Regards,
> Rudi Sluijtman.
------------------------------
From: Todd Knarr <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.admin,comp.os.linux.networking,comp.os.linux.setup
Subject: Re: A new directory hierarchy standard - need opinions
Date: 13 Oct 2000 01:05:33 GMT
In comp.os.linux.development.system <[EMAIL PROTECTED]> Equinox
<[EMAIL PROTECTED]> wrote:
> The include files for glibc would go in the location where the glibc
> source would reside if it were present. If the glibc source were to
Which is in my book misleading. I don't _have_ the source for glibc
installed, why do I have part of it's source tree laying around? Like
I said, the /usr/src tree contains what's needed to build packages,
you should not be dependent on it to _use_ those packages after they're
built.
> The includes would need to be accessible from a common location, of
> course, for the benefit of the compiler. This is why God gave us
> symlinks. Of course, the result would be similar to /usr/include/ ,
> but it doesn't need to be directly beneath /usr/ . Perhaps this could
> reside in the lib/ directories, as lib/include/ .
All you're doing is adding an entry to the directory path, and not
changing a thing. And what about include files that have no libraries,
all the package contains is header files? Having them under a libraries
directory is again misleading, because there aren't any libraries.
> The main point here is that the hierarchies immediately beneath / ,
> /usr/ , and /usr/local/ should be as similar as possible. Exceptions
> will occur, of course; but avoidable departures should be, well,
> avoided.
They already are similar: /include|/usr/include|/usr/local/include,
/lib|/usr/lib|/usr/local/lib and so on. I've found the convention
eminently sensible: header files go under include, libraries go under
lib, sources if any go in per-package directories under src, and the
three roots are / ( things needed during the boot/startup process ),
/usr ( most system-supplied or package-managed stuff ) and /usr/local
( for locally-supplied or non-package-managed things ).
> Exactly my point. The "front-end" binaries of a package in opt/ would
> be symlinked into the existing bin/ directory appropriate to its role
> in the system. A separate opt/bin/ would be unnecessary.
That's one I haven't seen. All the /opt systems I've run into use
directories of the form /opt/{package}/..., often including bin, lib
and include directories for the package. I've never run into one with
/opt/bin on it's own. Then again, I don't work with Sun much which may
explain that.
> 1) /opt/ would be for large, complex packages that were required by
> the system (not too many of these, if any at all -- hence my earlier
> language suggesting that perhaps /opt/ shouldn't exist). This also
> raises the question, would "opt" be a fitting name for this directory?
> 2) /usr/opt/ would be for large, complex, non-vital packages that were
> provided by the maintainers of the distribution.
> 3) /usr/local/opt/ would house large, complex packages added by the
> local sysadmin.
Immediate thought: /opt/ would be an oxymoron, as any system that depended
on something that complex during startup would be incredibly fragile and
prone to collapsing at inconvenient times. /usr/opt/ might be as well,
as stuff that uses /opt now tends to be not under package management or
provided as part of the system anyway ( again, modulo I think Sun ).
> True. Most of X's problems lie in the scrambled internal structure of
> the package. But it still needs to be located in something like an
> opt/ directory. It just seems like having the X11R6 directory
> directly under /usr/ is messy.
May be, but it makes sense since X11R6 is usually provided as part of
the system, not as an optional outside package added later. It almost
has to be if you think about it, and it is not usually neccesary for
startup, so /usr/X11R6 is a sensible location to put it.
--
If it's a hobby for me and a job for you, why are you doing such a shoddy
job of it?
-- Linus Torvalds
------------------------------
Date: Thu, 12 Oct 2000 21:35:03 -0500
From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: How does a computer boot?
GIULIO POZZANA wrote:
>
> Fundamentally, I don't know how does a computer boot -and the basic
> operations that have to be executed by the computer in this phase-
> (Is it a miracle?).
Normally, we don't do people's homework around here, but Venice
is a very beautiful city, so I'll make a small exception.
Booting is a very complicated, multi-stage process. It is very
dependant on CPU architecture and system hardware. In general:
1) When powered on, and after receiving a power-good signal,
modern CPUs will start a built-in self test (BIST) and then
within a very short, prescribed time, will start executing
instructions from a specific memory address FFFF:0000 for x86.
2) Normally, ROM BIOS chips are mapped into this address, and
the CPU starts executing BIOS routines. These program the
various hardware chips on the mobo (particularly the north
and south bridges) and any adapter cards will also be given a
chance to execute their own setup routines from their own ROMs.
3) After this, the BIOS will go looking to boot an OS from
disks (in whichever order it's programmed). It will load the
first 512 byte sector into 0:7C00 and start executing it.
4) What this Master-Boot Record does is entirely up to it.
MS-DOS/Win, *BSD, Linux (LILO) and OS/2 have their own MBRs.
Often, because it is so small, it cannot do much, and will
only load a second-stage boot loader.
5) This boot loader will load the kernel image, perhaps
decompressing it, and transfer control to it
6) The kernel will then take control and start it's own
setup of VM, page tables, IDTs, kernel data structures,
and also do further hardware initialization.
8) *IX kernels will then call `init` which will do yet
more initialization.
9) When all is finished, you may be presented with a login
prompt. Or not :)
-- Robert
------------------------------
Date: Thu, 12 Oct 2000 22:41:07 -0400
From: Eclipse mail <[EMAIL PROTECTED]>
Subject: sockets per process
i have realized that we can have only 255 file descriptors open per
process ( including sockets).
is it possible to have more than 255 file descriptors per process so
that we can have a lot more tcp/ip connections per process ?
------------------------------
Date: Thu, 12 Oct 2000 21:56:07 -0500
From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: Most popular Linux development environment(s)? Graphical?
Larry Ebbitt wrote:
>
> Robert Redelmeier wrote:
> > $ vi foo.c ; gcc -O2 foo.c && ./a.out
> I despise CLI stuff. After 40 years of programming, I have decided
> that the computer is supposed to make thing easier.
That makes me a newbie with only 32 years of programming ;(
I don't expect computers to do anything except follow instructions.
They won't make anything easier because they can only do that with
programs that make things less flexible and powerful. Usually,
I avoid such tools.
I also don't find GUIs easier, because they are all menuing
systems, and you have to find where they hid the widget, if
they have it at all. At least in *IX you know they have
certain widgets, and how to use'em. But I type well and
fast, and fear I will catch carpal-tunnel from the mouse.
That's not to say there haven't been ease-of-use improvements.
Borland TurboPascal 2.0 was a nice environment in it's day.
But you can certainly have too much of this because it makes
large multi-module programs _too_ easy to build. These spider
webs are full of bugs. The integration is too tight.
> The poster asked about graphical environments, so I thought
> I would mention one.
He asked about both, at least per the Subject above.
Not a nitpick, just IMHO.
-- Robert
------------------------------
** 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
******************************