Linux-Development-Sys Digest #385, Volume #8      Tue, 2 Jan 01 14:13:15 EST

Contents:
  Re: cpu count (Ronald Cole)
  Re: smp and gcc (Ronald Cole)
  Re: Error compiling gcc 2.95.2 (Ronald Cole)
  Documentation for /proc filesystem support for a driver? (Trevor Hemsley)
  First sector of a partition? (Oliver Dick)
  Re: Error compiling gcc 2.95.2 (Andreas Jaeger)
  paging_init (Alexander Schulz)
  in drivers/block/rd.c, initrd not closed? ([EMAIL PROTECTED])
  Re: Error compiling gcc 2.95.2 ("Fruitbat")
  Re: Error compiling gcc 2.95.2 ("Fruitbat")
  Re: Error compiling gcc 2.95.2 ("Christian Lescuyer")
  Equivalent of DebugBreak? (Thaddeus L Olczyk)
  Re: ramfs root(/) explained ([EMAIL PROTECTED])
  Re: First sector of a partition? ([EMAIL PROTECTED])
  Re: Equivalent of DebugBreak? (Chris)
  How to submit bug reports/fixes (Steve Sycamore)
  Before I go bald... Socket problem! (Jem)
  Re: Equivalent of DebugBreak? (A. =?iso-8859-1?Q?Schr=F6der?=)
  LILO version 21.6.1 released (John in SD)
  kernel init (Ylt007)
  Re: kernel init (ratz)
  Re: Toronto, Kylix is coming! ([EMAIL PROTECTED])

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

From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: cpu count
Date: 01 Jan 2001 16:06:41 -0800

Oleg Levin <[EMAIL PROTECTED]> writes:
> Unfortunely, I have glibc 2.1.2, but, anyway, thanks for your help

sysconf() has been in glibc for quite a while.

-- 
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412
Ronald Cole <[EMAIL PROTECTED]>      Phone: (760) 499-9142
President, CEO                             Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084  4A88 8851 E6C8 69E3 B00B

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

From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: smp and gcc
Date: 01 Jan 2001 16:12:39 -0800

"Japie" <[EMAIL PROTECTED]> writes:
> Yes I saw that in my cpumon. but is that optimal?
> I was wondering if a special smp-compiled version of kde should run
> faster than a non-smp one (on a smp-machine)
> Or should smp-specific funktions already exist in the sources?

I think there is a confusion.  Parallelism is achieved through the use
of threads, which is a library issue and not a compiler issue.  It is
the scheduler in the kernel that places threads on CPUs.

-- 
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412
Ronald Cole <[EMAIL PROTECTED]>      Phone: (760) 499-9142
President, CEO                             Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084  4A88 8851 E6C8 69E3 B00B

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

From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: Error compiling gcc 2.95.2
Date: 01 Jan 2001 16:15:13 -0800

"Christian Lescuyer" <[EMAIL PROTECTED]> writes:
> The compiler is gcc 2.96.69 (or 64, can't remember). I don't think this is
> the problem, though, because the error appears in stage 2 of a 'make
> boostrap'. If I understand correctly, at that time, a first version of
> 2.95.2 is used to recompile itself.

Did you grab the updates to gcc 2.96 from RedHat?

-- 
Forte International, P.O. Box 1412, Ridgecrest, CA  93556-1412
Ronald Cole <[EMAIL PROTECTED]>      Phone: (760) 499-9142
President, CEO                             Fax: (760) 499-9152
My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084  4A88 8851 E6C8 69E3 B00B

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

From: [EMAIL PROTECTED] (Trevor Hemsley)
Subject: Documentation for /proc filesystem support for a driver?
Date: 2 Jan 2001 01:50:29 GMT

I'm looking for documentation in order to add proc-fs support to an 
existing device driver for a SCSI adapter. The adapter in question is 
an Initio INI9100UW and it has a directory in /proc/scsi/INI9100 with 
a file "0" in it. More'ing that file gives me the message "This driver
does not yet support the proc-fs" which appears to get issued out of 
scsi_proc.c when the driver doesn't implement it's own support.

So... 
is there documentation for the various steps needed to add proc-fs 
support to a driver?

I've been reading the source for aix7xxx* to see if I can work out 
what's needed but it would be easier with a nice concise description 
;-) Alternatively, is there a better driver that I could be reading to
understand what's required? Perhaps there's a better newsgroup I could
be using to post?

I'm using Suse Linux 6.3, kernel 2.2.13 and the driver reports itself 
as level 1.03g. I've searched the web for newer versions in case this 
support has already been added but come up with nothing.

-- 
Trevor Hemsley, Brighton, UK.
[EMAIL PROTECTED]

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

From: Oliver Dick <[EMAIL PROTECTED]>
Subject: First sector of a partition?
Date: Tue, 02 Jan 2001 04:02:19 +0100

Hi everyone! And a Happy New Year!

I am writing a tool for Linux and need to know the start of
a partition. The only information I have is the dev-filename,
for example /dev/hda2. How can I determine the first sector
of this partition? Are there any (kernel-)functions available 
for this?

Thanks for your help!

-- 
Best regards
Oliver Dick

[EMAIL PROTECTED]
http://www.evilstorm.de

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

From: Andreas Jaeger <[EMAIL PROTECTED]>
Subject: Re: Error compiling gcc 2.95.2
Date: 02 Jan 2001 08:20:30 +0100

>>>>> Christian Lescuyer writes:

 > I am trying to compile gcc 2.95.2 on linux RedHat 7.0 box. I'm having a
 > compilation error in libio/indstream.cc:

 > in method struct streampos indirectbuf::seekof(long long int, ios::seek_dir,
 > int = 3)

 > line 82: 'struct streampos' used where a 'int' was expected
 > line 85: 'struct streampos' used where a 'int' was expected
 > line 87: 'struct streampos' used where a 'int' was expected
 > line 89: conversion from int to non-scalar type 'streampos' requested.

You can't compile gcc 2.95.2 on a glibc 2.2 based system (RedHat 7.0
uses a prerelease of glibc 2.2).  Read the glibc or GCC FAQ for
workarounds.

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

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

From: Alexander Schulz <[EMAIL PROTECTED]>
Subject: paging_init
Date: 2 Jan 2001 07:42:54 GMT

Hello all,

I am trying to get an old 386 to run Liunx 2.4 but ran into this problem:

The kernel boots only every third attempt or so, most of the times it just
hangs. I tracked it down to "pagetable_init" in arch/i386/mm/init.c. The
problem seems to be this, correct me whereever I'm wrong:

- In head.S, some pagetables are setup in swapper_pg_dir and activated.
- in init.c, the same swapper_pg_dir is reinitialized:
        - a new pte is allocated
        - it is linked into the pgd
        - the pte is initialized

For me, this looks wrong, and if I initialize the pte first and then link it
into the pgd my machine boots fine all the time. Is there some assumption
that makes this work on the PC but not on my machine?

Regards
  Alexander


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

From: [EMAIL PROTECTED]
Subject: in drivers/block/rd.c, initrd not closed?
Date: Tue, 02 Jan 2001 08:21:55 -0000

In function rd_load_image() around line 560 of drivers/block/rd.c
in 2.4.0-test10 I see where the input and output are opened for
copying the initial ramdisk image, and I see where the input is
closed.  But I don't see where the output is closed.

I'm trying to ioctl BLKFLSBUF the initial ramdisk after I'm done
with it having done pivot_root() to use a different root and
unmounted it from where pivot_root() put it.  The unmount works
so I know I have nothing open in there, but the ioctl() still
gives me an error.

For reasons not yet known, I'm getting ERANGE (34) as the error,
even though there is nothing anywhere around there that could
give such an error.  Since I'm doing raw syscalls, I can't rule
out some little bug in picking up the errno value, though I would
think the various _syscallN() macros would have it right.  When
I look in rd_ioctl() case BLKFLSBUF: I see possible errors of
EACCES (doubtful) and EBUSY.  Maybe EBUSY (16) is what I am getting.

Looking at rd_load_image() makes me concerned that the open count
is too high to let BLKFLSBUF do the job.

The program doing this is running in PID 1 prior to exec'ing init.
The 1st stage ran from the initrd, found the cdrom and mounted it,
and the 2nd stage is running from the cdrom, so it's not a case of
the executeable mapping in the way (besides, unmount worked, so I
know this can't be it).  The filesystem is pre-formatted with a 1K
blocksize, so that aspect should be safe.

Any ideas where to look next?  Any chance rd_load_image() is just
failing to close it?

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: "Fruitbat" <[EMAIL PROTECTED]>
Subject: Re: Error compiling gcc 2.95.2
Date: Tue, 02 Jan 2001 09:28:54 GMT

Andreas,

I was considering upgrading my glibc to 2.2 and see by the FAQ that gcc
2.95.2 series of compilers will compile glibc 2.2, but your comments worry
me slightly. Will my gcc 2.95.2 still function correctly if I do install
glibc 2.2, and do you know if the "maintenance release" gcc 2.95.3 will
comile correctly under a glibc 2.2 based system when released?

Many thanx



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

From: "Fruitbat" <[EMAIL PROTECTED]>
Subject: Re: Error compiling gcc 2.95.2
Date: Tue, 02 Jan 2001 09:49:49 GMT

whoops, just re-read the online bugs and answered my own question <groan>
sorry to bother you all.



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

From: "Christian Lescuyer" <[EMAIL PROTECTED]>
Subject: Re: Error compiling gcc 2.95.2
Date: Tue, 2 Jan 2001 10:52:49 +0100


"Andreas Jaeger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> >>>>> Christian Lescuyer writes:
>
>  > I am trying to compile gcc 2.95.2 on linux RedHat 7.0 box. I'm having a
>  > compilation error in libio/indstream.cc:
>
>  > in method struct streampos indirectbuf::seekof(long long int,
ios::seek_dir,
>  > int = 3)
>
>  > line 82: 'struct streampos' used where a 'int' was expected
>  > line 85: 'struct streampos' used where a 'int' was expected
>  > line 87: 'struct streampos' used where a 'int' was expected
>  > line 89: conversion from int to non-scalar type 'streampos' requested.
>
> You can't compile gcc 2.95.2 on a glibc 2.2 based system (RedHat 7.0
> uses a prerelease of glibc 2.2).  Read the glibc or GCC FAQ for
> workarounds.
>

Thank you very much. I'll have a look.

Christian



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

From: [EMAIL PROTECTED] (Thaddeus L Olczyk)
Crossposted-To: comp.os.linux.development.apps
Subject: Equivalent of DebugBreak?
Date: Tue, 02 Jan 2001 11:17:45 GMT
Reply-To: [EMAIL PROTECTED]

Is there a command that is the equivalent of DebugBreak()?
In case you don't know, DebugBreak is a WinAPI command,
when run normally it has no effect.
If however you are running under a debugger and you hit the call,
then the debugger stops. you can then single step through your code.
Very similar to a breakpoint.
TIA

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

From: [EMAIL PROTECTED]
Subject: Re: ramfs root(/) explained
Date: Tue, 02 Jan 2001 13:04:36 -0000

On Wed, 20 Dec 2000 11:21:00 -0800 Repairlix <[EMAIL PROTECTED]> wrote:

[...]

I tried to reply directly to you, but I got:

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  [EMAIL PROTECTED]:
    unknown local-part "xant" in domain "sourceforge.net"

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: [EMAIL PROTECTED]
Subject: Re: First sector of a partition?
Date: Tue, 02 Jan 2001 13:51:19 -0000

On Tue, 02 Jan 2001 04:02:19 +0100 Oliver Dick <[EMAIL PROTECTED]> wrote:

| I am writing a tool for Linux and need to know the start of
| a partition. The only information I have is the dev-filename,
| for example /dev/hda2. How can I determine the first sector
| of this partition? Are there any (kernel-)functions available 
| for this?

ioctl(,HDIO_GETGEO,)

struct hd_geometry {
      unsigned char heads;
      unsigned char sectors;
      unsigned short cylinders;
      unsigned long start;
};

Search for these in kernel source for specific details.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: Chris <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Equivalent of DebugBreak?
Date: Tue, 02 Jan 2001 16:31:55 +0000

Thaddeus L Olczyk wrote:
> 
> Is there a command that is the equivalent of DebugBreak()?
> In case you don't know, DebugBreak is a WinAPI command,
> when run normally it has no effect.
> If however you are running under a debugger and you hit the call,
> then the debugger stops. you can then single step through your code.
> Very similar to a breakpoint.

On x86, you could try

    asm("int $0x03");

but this will deliver SIGTRAP to your process.

For that matter, you could raise(SIGTRAP).

Something like:

#include <signal.h>

#ifndef NDEBUG
#    define breakpoint raise(SIGTRAP)
#endif

int main() {
        /* ... */
    signal(SIGTRAP, SIG_IGN);
        /* ... */
    breakpoint();
}    

-- 
Chris Lightfoot -- http://www.ex-parrot.com/~chris/
ignore From: line; try "chris at ex hyphen parrot dot com"
  A half-truth is like half a brick-- you can throw it further

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

From: Steve Sycamore <[EMAIL PROTECTED]>
Subject: How to submit bug reports/fixes
Date: Tue, 02 Jan 2001 17:11:38 +0100

Hello,

Is there a good place to look to find out exactly how to submit a bug report
against a driver?  And, if you have a code fix, how to get that submitted and
included with the builds?

I don't mean documentation on CVS, but developer community aspects of
these questions.

Steve




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

From: Jem <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.redhat,comp.os.linux.development.apps,comp.os.linux.networking,linux.dev.apps,linux.dev.net,linux.redhat.devel
Subject: Before I go bald... Socket problem!
Date: Tue, 2 Jan 2001 16:38:00 -0000

PLEASE PLEASE COULD YOU CC ANY REPLIES TO MY MAIL ADDRESS!!! Too many 
groups and I'm not 100% sure where I should best post this question...

Argh argh argh!

OK, before I lose loads of hair.. I am trying desperately to get the MAC 
address of the PC that my program (C++) is running on. I have some 
source code for it that I found from several locations on the web but I 
can't get it to compile because the constants that it uses don't seem to 
be defined, specifically:
        AF_ROUTE
        AF_LINK
        NET_RT_IFLIST
        RTM_IFINFO
        ETHER_ADDR_LEN

Now I've done searches on this and, as far as I can determine, BSD 
Sockets.h should have these constants in #define statements. I have the 
FreeBSD version of socket.h 

(http://minnie.cs.adfa.edu.au/FreeBSD-srctree/newsrc/sys/socket.h.html)

and it has just about everything I need neatly laid out - or at least 
some of the constants anyway and I'm hoping other related files will 
have the rest of them.

Now I don't understand this. I am running RedHat 6.2 and the Socket.h 
file has NONE of this stuff defined. I have done a search on my system 
for any ".h" files with ANY of these constants defined and there is 
nothing, zilch. Should the FreeBSD and Linux versions of Socket.h not be 
extremely similar??

Has anyone ANY ideas where these constants could possibly be defined or 
why my Socket.h seems to be missing these definitions?

Alternatively, has anyone got a bit of C source for MAC determination 
that does compile under RedHat?

Thanks guys,

Jeremy

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

From: A. =?iso-8859-1?Q?Schr=F6der?= <[EMAIL PROTECTED]>
Subject: Re: Equivalent of DebugBreak?
Reply-To: [EMAIL PROTECTED]
Date: Tue, 2 Jan 2001 18:05:02 +0100
Crossposted-To: comp.os.linux.development.apps

Hi, 

Thaddeus L Olczyk wrote:

> Is there a command that is the equivalent of DebugBreak()?

If you develop on a PC (i.e. Intel) you might simply insert
a 

 __asm__ ( "int3" );

into your code (of course you may beautify this using a macro, for instance)
and you will get the same results as with DebugBreak.
Beware that this is machine specific, and thus non-portable to other 
architectures.

Hope it helps

A. Schr�der




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

From: John in SD <[EMAIL PROTECTED]>
Subject: LILO version 21.6.1 released
Reply-To: [EMAIL PROTECTED]
Date: Tue, 02 Jan 2001 17:38:56 GMT

LILO release 21.6.1 is based upon Werner Almesberger's LILO version 21.

Version 21.6.1 is a maintenance release, fixing a few minor problems.

Version 21.6 is an upgrade for users of the Reiser File System, and adds
new diagnostic capabilities.  Internal changes allow booting kernels with
larger real-mode setup codes (2.4.0 and later).  This version is fully
backward compatible with version 21.5, which added the customizable boot
menu interface, and versions back to 21.2, which allowed booting beyond
the 1024 cylinder limit on disks >8Gb.

Source code is available for download from:

   ftp://brun.dyndns.org/pub/linux/lilo          (developer's site)

Or from the main distribution site:

   ftp://metalab.unc.edu/pub/Linux/system/boot/lilo    (please use)


See the distribution file 'CHANGES' for details of the differences between
21.6.1 and prior releases.


--John Coffman <[EMAIL PROTECTED]>


LILO version 21.6 (04-Oct-2000) source at
http://www.ibiblio.org/pub/Linux/system/boot/lilo
patches at ftp://brun.dyndns.org/pub/linux/lilo

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

From: [EMAIL PROTECTED] (Ylt007)
Date: 02 Jan 2001 17:59:33 GMT
Subject: kernel init

I use a mandrake 7 distribution with � kernel 2.2.15 at the end of the init
time it says :
 Starting kheader succeeded.
I'm trying to work with a kernel 2.2.16 that I compiled with USB driver and at
the end of init time it says :
 Starting kheader failed.
Does anybody can explain  the meaning of these messages.
Thanks
Yves LE TILLY

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

From: ratz <[EMAIL PROTECTED]>
Subject: Re: kernel init
Date: Tue, 02 Jan 2001 19:32:49 +0100

Hi Ylt007,

Ylt007 wrote:
> =

> I use a mandrake 7 distribution with =E0 kernel 2.2.15 at the end of th=
e init
> time it says :
>  Starting kheader succeeded.

As I don't have yet used the Mandrake distro I guess this is some enhance=
ment
to the standard kernel. Must be some kernel_thread. But wait, kernel thre=
ads
are not started in the runlevel but with the init() from ../linux/init/ma=
in.c

> I'm trying to work with a kernel 2.2.16 that I compiled with USB driver=
 and at
> the end of init time it says :
>  Starting kheader failed.

Mhh, it must be something with some kernel sources changed. Let's see wha=
t
google
thinks about it:

Aha (http://www.uwsg.iu.edu/hypermail/linux/kernel/0004.2/0818.html)

 FWIW, the coming-very-soon Linux-Mandrake 7.1 beta will include a system=
 =

 service "kheader", which is run at boot time to make sure that the =

 kernel source/include symlinks are correct for the kernel version =

 currently running. =


So you might check out /etc/somewhere/kheader and change accordingly or d=
isable
the service or read the man page or search in google for advice.

> Does anybody can explain  the meaning of these messages.

The message is the output of a failed start of a runlevel script. It says=
 that
it couldn't perform that action it wanted to described in
/etc/somewhere/kheader.

> Thanks
> Yves LE TILLY

Oh, you might check out:
http://www.hklpg.com/RPM/mandrake/initscripts-5.27-37mdk.i586.html

Regards,
Roberto Nibali, ratz

-- =

mailto: `echo [EMAIL PROTECTED] | sed 's/[NOSPAM]//g'`

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: Toronto, Kylix is coming!
Date: Tue, 02 Jan 2001 18:36:45 GMT

If you want an open source RAD tool on linux today you could use POSSL
( http://www.possl.org ).  You can write your code in C on UNIX or use
a scripting language. This supplies a platform independent RAD
infrastructure for the creation for Motif client apps, Reports, Web
apps, and EJB apps.  This framework has been around for many years.

-James
http://www.prolifics.com


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

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


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