Linux-Development-Sys Digest #136, Volume #8     Mon, 11 Sep 00 06:13:09 EDT

Contents:
  Re: problem with expression... ("Ross Crawford")
  Re: problem with expression... (Rosimildo da Silva)
  Re: problem with expression... ("Ross Crawford")
  Re: Zip 100 Parallel Port Drive (Peter Rodriguez)
  Re: Shared libs question ([EMAIL PROTECTED])
  Re: problem with expression... (Kaz Kylheku)
  Re: problem with expression... (Kaz Kylheku)
  lilo problems with 19GB IDE drive (Jeremy A Carlson)
  Re: lilo problems with 19GB IDE drive (Peter Mardahl)
  Kernel Beta 2.4.0-test8 Problem ("Emu")
  ioctl-number (Reed Lai)
  Opening a file in a module ("Szeleney Robert")
  Re: Zip 100 Parallel Port Drive (Michel Talon)
  Re: Zip 100 Parallel Port Drive (Michel Talon)
  Re: printk output in X? ("Christer Olofsson")
  Synchronizing bottom-halves with process-context ("Mikko Jaakkola")
  Re: Opening a file in a module (Josef Moellers)
  Kernel programming / docu ("Szeleney Robert")
  Re: buffer_dirty  -  what's the @#$%? (Kasper Dupont)

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

From: "Ross Crawford" <[EMAIL PROTECTED]>
Subject: Re: problem with expression...
Date: Mon, 11 Sep 2000 08:07:19 +1000


root <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>     I am trying to compile an example from the Linux Device Drivers
> book.. the following expression gives me this  compile error
>
>      if (current->signal & ~current->blocked)
>
>
> pipe.c:113: wrong type argument to bit-complement
>

You probably want:

if (current->signal & !(current->blocked))

HTH

ROSCO




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

From: Rosimildo da Silva <[EMAIL PROTECTED]>
Subject: Re: problem with expression...
Date: Sun, 10 Sep 2000 23:36:15 GMT


Ross Crawford wrote:
> 
> root <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]...
> >     I am trying to compile an example from the Linux Device Drivers
> > book.. the following expression gives me this  compile error
> >
> >      if (current->signal & ~current->blocked)
> >
> >
> > pipe.c:113: wrong type argument to bit-complement
> >
> 
> You probably want:
> 
> if (current->signal & !(current->blocked))
> 


I guess it might be:

         if (current->signal && !(current->blocked))


-- 
Rosimildo da Silva            [EMAIL PROTECTED] 
ConnectTel, Inc.              Austin, TX -- USA      
Phone : 512-338-1111          Fax : 512-918-0449     
Mobile: 512-632-7579                                 
Company Page: http://www.connecttel.com              
Home Page: http://members.xoom.com/rosimildo/

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

From: "Ross Crawford" <[EMAIL PROTECTED]>
Subject: Re: problem with expression...
Date: Mon, 11 Sep 2000 09:30:15 +1000


Rosimildo da Silva <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> Ross Crawford wrote:
> >
> > root <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > >     I am trying to compile an example from the Linux Device Drivers
> > > book.. the following expression gives me this  compile error
> > >
> > >      if (current->signal & ~current->blocked)
> > >
> > >
> > > pipe.c:113: wrong type argument to bit-complement
> > >
> >
> > You probably want:
> >
> > if (current->signal & !(current->blocked))
> >
>
>
> I guess it might be:
>
> if (current->signal && !(current->blocked))
>

My bad 8?/

Or maybe it's closer to the original (members may be bit-flags; notice extra
brackets):

if ((current->signal) & ~(current->blocked))

Regards

ROSCO



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

Date: Mon, 11 Sep 2000 12:42:17 +1200
From: Peter Rodriguez <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Zip 100 Parallel Port Drive

Problem solved!

I tweaked the BIOS settings on the new machine (running RH 6.2) and the imm

module loaded immediately - Zip drive AOK.

For the record, I changed the Parallel Port Mode from ECP+EPP to SPP, and

changed the PNP/PCI Config from PNP OS Installed NO to YES.

Once again, thanks for your interest, and apologies to anyone who may have

been offended by my suspicion that there was something wrong with the imm.o

file!

--
Peter Rodriguez
136, Kolmar Road, Papatoetoe     LINUX RULES
Auckland, NEW ZEALAND




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

From: [EMAIL PROTECTED]
Subject: Re: Shared libs question
Date: 10 Sep 2000 03:06:36 GMT

**** Post for FREE via your newsreader at post.usenet.com ****

MJ Dainty <[EMAIL PROTECTED]> wrote:
: Hi,

: I'm trying to write some code that uses some shared libs via the
: dlopen/sym/... calls. Currently I'm having problems with making use of
: the _init and _fini functions in the lib code, I get...

: /tmp/ccaBGSQx.o: In function `_init':
: /tmp/ccaBGSQx.o(.text+0x30): multiple definition of `_init'
: /usr/lib/crti.o(.init+0x0): first defined here
: /tmp/ccaBGSQx.o: In function `_fini':
: /tmp/ccaBGSQx.o(.text+0x38): multiple definition of `_fini'
: /usr/lib/crti.o(.fini+0x0): first defined here
: collect2: ld returned 1 exit status

: I'm declaring the functions as void _init() {} and void _fini() {} in
: the lib code and compiling them with:

you should not redefine these (_init & _fini) in your own library, otherwise
it will have conflict with the /usr/lib/crti.o

Dan

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 *** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
                      http://www.usenet.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: problem with expression...
Reply-To: [EMAIL PROTECTED]
Date: Mon, 11 Sep 2000 02:30:22 GMT

On Mon, 11 Sep 2000 08:07:19 +1000, Ross Crawford <[EMAIL PROTECTED]> wrote:
>
>root <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
>>     I am trying to compile an example from the Linux Device Drivers
>> book.. the following expression gives me this  compile error
>>
>>      if (current->signal & ~current->blocked)
>>
>>
>> pipe.c:113: wrong type argument to bit-complement
>>
>
>You probably want:
>
>if (current->signal & !(current->blocked))

No, because current->blocked is a bitmask of the blocked signals.
The idea is to find out whether there are any unblocked pending
signals in current->signal.

The solution is to use the appropriate function; in 2.2 kernels,
one does not use the above expression, but rather

        signal_pending(current)

-- 
Any hyperlinks appearing in this article were inserted by the unscrupulous
operators of a Usenet-to-web gateway, without obtaining the proper permission
of the author, who does not endorse any of the linked-to products or services.

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

From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: problem with expression...
Reply-To: [EMAIL PROTECTED]
Date: Mon, 11 Sep 2000 02:32:51 GMT

On Mon, 11 Sep 2000 09:30:15 +1000, Ross Crawford <[EMAIL PROTECTED]> wrote:
>Or maybe it's closer to the original (members may be bit-flags; notice extra
>brackets):
>
>if ((current->signal) & ~(current->blocked))

This doesn't change a thing. The postfix operator -> has a higher
precedence than the unary operator ~, and the & operator has a lower
precedence than both.

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

From: Jeremy A Carlson <[EMAIL PROTECTED]>
Subject: lilo problems with 19GB IDE drive
Date: 11 Sep 2000 04:06:59 GMT

I have two drives installed on my system, one is IDE, the other SCSI. Linux
runs off of the SCSI drive, while Win98 runs on the IDE drive. I cannot get
lilo to boot Win98 from the IDE drive. I have to tell the bios to boot from
IDE if I want to get into Win98, and switch it to boot from SCSI if I want
to boot into linux. The IDE drive is 20GB and the SCSI drive is 17.5GB. I am
using lilo version 21.5. 
        When I put lilo on the SCSI drive and tell lilo to boot the windows 
partition it says "booting windows" and returns back to the lilo prompt. If 
I put lilo on the IDE drive, I get the two letters "LI" and the computer
halts. I have tried both the large geometries and the LBA geometries for
the lilo configuration and nothing changes. Both values were obtained from the
bios.
        Any help would be appreciated.

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

From: [EMAIL PROTECTED] (Peter Mardahl)
Subject: Re: lilo problems with 19GB IDE drive
Date: 11 Sep 2000 04:58:11 GMT

I have 3 suggestions.
1)  Make sure you have the latest version of lilo.
2)  Use "linear" mode.  (and put it on the IDE drive.)

I.e., put "linear" in lilo.conf near the top and run lilo again.

3)  Use a boot floppy or a "lilo floppy" for Linux.  For Linux, push the
floppy in.  For Windows, let it boot.

Luck,

PeterM



In article <8phlp3$16q$[EMAIL PROTECTED]>,
Jeremy A Carlson  <[EMAIL PROTECTED]> wrote:
>I have two drives installed on my system, one is IDE, the other SCSI. Linux
>runs off of the SCSI drive, while Win98 runs on the IDE drive. I cannot get
>lilo to boot Win98 from the IDE drive. I have to tell the bios to boot from
>IDE if I want to get into Win98, and switch it to boot from SCSI if I want
>to boot into linux. The IDE drive is 20GB and the SCSI drive is 17.5GB. I am
>using lilo version 21.5. 
>       When I put lilo on the SCSI drive and tell lilo to boot the windows 
>partition it says "booting windows" and returns back to the lilo prompt. If 
>I put lilo on the IDE drive, I get the two letters "LI" and the computer
>halts. I have tried both the large geometries and the LBA geometries for
>the lilo configuration and nothing changes. Both values were obtained from the
>bios.
>       Any help would be appreciated.



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

From: "Emu" <[EMAIL PROTECTED]>
Subject: Kernel Beta 2.4.0-test8 Problem
Date: Mon, 11 Sep 2000 00:29:35 -0700

The 'umsdos' issue has finally been resolved.  But now after compiling and
installing test8, it will only get a login script, no password script is
generated and then the system hangs.  At this point I have no idea how to
reboot other then powering down the incorrect way, power switch on PC :(

After doing that and rebooting back to Test7 which works flawlessly for me
other than the 'umsdos' issue, I filesys gets corrupted and fsck that is run
is unable to repair the corrupted files.  So i have to reboot with
init=/bin/bash root=/dev'hda6 ro, in order to run fsck, then I am able to
repair the filesys withan interactive session.  I just answered yes to all
the questions which are default.  My filesys is repared.

But I cannot keep trying to boot up test 8 if there is a problem with the
password script.


Anyone else see this issue?  If not maybe I have configures my kernel
different from yours and thus you do not see it.  All my other kernels are
configured the same each time and they all work test7 and down.

I have updated all my modutils, and all the other necessary updated that are
needed that are in the DOCS of test8.

Red HAt 6.2
Brand new Dell Laptop Inspirion 600/750 Intel Speed Step.
256 megs ram
20 gig hard drive
Dual boot win98/red hat 6.2



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

From: [EMAIL PROTECTED] (Reed Lai)
Subject: ioctl-number
Date: 11 Sep 2000 06:39:07 GMT
Reply-To: [EMAIL PROTECTED]

Seniors,

I am now developing a device driver for linux.  I read documents
but confused the policy of the ioctl number.

In kernel document "ioctl-number.txt" say "Some devices use their
major number as the identifier; this is not recommended."

But in Ori Pomerantz's html book "Linux Kernel Module Programming
Guide" say "The major device number.  We can't rely on dynamic
registration any more, because ioctls need to know it."  Then use
major device number as the identifier (type.)

Which policy should I comply?  Please help!  Thanks!

Brgds
-- 
Reed Lai http://w3.icpdas.com/reed/ | ICPDAS http://www.icpdas.com
GnuPG (DSA/ElGamal) 0x7199EAD3 Reed Lai (key #1) <[EMAIL PROTECTED]>
KeyServer: search.keyserver.net |  HAM: BV4QO | NIC-handle: RL7000
ICQ 64518529


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

From: "Szeleney Robert" <[EMAIL PROTECTED]>
Subject: Opening a file in a module
Date: Mon, 11 Sep 2000 09:18:32 +0200

Hi!!

I'm writting a kernel-module, which should be a device driver for a
key-controller.
In my init-function I have to read the BIOS to determine wheter my
key-controller is installed.
How can i do that?

I tried to mmap the BIOS area.
For this operating I need to open the /dev/mem device. But I can't do a
open(). (unresolved symbol)

Is there a way to do that?

Thanks, Cu, Bertl!!
Sky Operating System V2.0
Take a look at:
http://skyos.8m.com




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

From: Michel Talon <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Zip 100 Parallel Port Drive
Date: Mon, 11 Sep 2000 09:35:09 +0200

In comp.os.linux.development.system Peter Rodriguez <[EMAIL PROTECTED]> wrote:
> I am running RedHat 6.2 on one machine and 6.0 on another. Both machines
> have Zip 100 parallel port drives connected. The RH 6.2 machine has Win
> 98 on another partition and the RH 6.0 machine has NT 4.0 Workstation on
> the other partition.

> My problem is that the Zip drives work fine with Win 98, NT 4.0 and
> RedHat 6.0, and I have tried swapping the drives from one machine to the
> other and the result is the same. Module imm refuses to load on RedHat
> 6.2 ( Linux Kernel 2.2.14-5.0). I get the same error message whether I
> use insmod or modprobe, i.e.:-

Perhaps we don't have the same // port zip, but for me the command to get the
zip recognized is
modprobe ppa
It works 100%

Note that the // port is configured ECP+EPP in the BIOS and you may tweak
that.

> "imm: Version 2.03 (for Linux 2.0.0)
>  scsi: 0 hosts
>  /lib/modules/2.2.14-5.0/scsi/imm.o: init_module: Device or resource
> busy"

> This is all strange territory to me, but does it mean that the wrong
> version of imm.o is provided with RedHat 6.2? If so, how do I obtain the
> correct version?

> Then maybe I have got hold of the wrong end of the stick altogether.

> Any help would be very much appreciated.

> Peter Rodriguez
> Auckland, New Zealand

> "Give me the bazaar every time"




-- 
Michel Talon

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

From: Michel Talon <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Zip 100 Parallel Port Drive
Date: Mon, 11 Sep 2000 09:37:33 +0200

In comp.os.linux.development.system Peter Rodriguez <[EMAIL PROTECTED]> wrote:
> Problem solved!

> I tweaked the BIOS settings on the new machine (running RH 6.2) and the imm

> module loaded immediately - Zip drive AOK.

> For the record, I changed the Parallel Port Mode from ECP+EPP to SPP, and

Sorry, had not seen this one, but i think SPP will be slow. EPP would be
better.

> changed the PNP/PCI Config from PNP OS Installed NO to YES.

This is in principle BAD. For OS such as Linux FreeBSD and even WinNT i think
the correct setting is PNP OS NO, so that the BIOS initializes as much cards
as it can.

> Once again, thanks for your interest, and apologies to anyone who may have

> been offended by my suspicion that there was something wrong with the imm.o

> file!

> --
> Peter Rodriguez
> 136, Kolmar Road, Papatoetoe     LINUX RULES
> Auckland, NEW ZEALAND




-- 
Michel Talon

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

From: "Christer Olofsson" <[EMAIL PROTECTED]>
Subject: Re: printk output in X?
Date: Mon, 11 Sep 2000 09:54:10 +0200
Reply-To: "Christer Olofsson" <[EMAIL PROTECTED]>

Hi,
You can use xterm -c to display all console messages on a xterm window.

regards,
/Christer Olofsson

"Tasos Kotaras" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hello everybody,
>
>    This is a newbie question, as I have just started meddling with Linux
>
> device drivers: I have a problem getting output from printk while I'm
> in KDE. Of course, while I'm in in text mode everything works OK.
>
>     I know that X 'covers' the virtual terminal which displays the
> messages,
> but I wonder why even the good-old 'xterm -C' doesn't do the trick...
>
> Is there anything I can do to get the printk output displayed while I'm
> in X?
>



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

From: "Mikko Jaakkola" <[EMAIL PROTECTED]>
Subject: Synchronizing bottom-halves with process-context
Date: Mon, 11 Sep 2000 08:07:18 GMT

Hello,

I'm using kernel 2.2.16 and I would like to disable all bottom-halves in
some point when processing "write"-request from user-mode. What is the
proper way of doing this? In kernel 2.4.x, the proper way would probably be
spin_lock_bh() & spin_unlock_bh(). Is there anything similar in 2.2.x?

BR, Mikko



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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Opening a file in a module
Date: Mon, 11 Sep 2000 10:12:45 +0200

Szeleney Robert wrote:
> =

> Hi!!
> =

> I'm writting a kernel-module, which should be a device driver for a
> key-controller.
> In my init-function I have to read the BIOS to determine wheter my
> key-controller is installed.
> How can i do that?
> =

> I tried to mmap the BIOS area.
> For this operating I need to open the /dev/mem device. But I can't do a=

> open(). (unresolved symbol)

Your kernel modules is already inside the kernel, so you don't need to
open /dev/mem.
If you look at the code in drivers/char/mem.c, you will see that it uses
the __pa and __va macros to map a virtual kernel address into a physical
memory address and vice versa.


-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T. Pratchett)

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

From: "Szeleney Robert" <[EMAIL PROTECTED]>
Subject: Kernel programming / docu
Date: Mon, 11 Sep 2000 10:32:29 +0200

Hi!!

Is there a good docu or online-help for linux kernel programming?

Function overview, Structure definition,.....

I know, the source is the best docu, but is there anything other?
(HTML kernel-browser or so...)

Thanks, Cu, bertl!!

Sky Operating System V2.0
Take a look at
http://skyos.8m.com



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

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.questions
Subject: Re: buffer_dirty  -  what's the @#$%?
Date: Mon, 11 Sep 2000 11:50:28 +0200

Lurch wrote:
> 
> Hello,
> 
> to make sure the umount is done after the copy, you can use the "&&" instead
> of ";" (the second instruction won't start executing before the first one
> has terminated successfully
> 
> i.e. mount /mnt/fd && cp /mnt/fd/* /prj && umount /mnt/fd
> 

With ; commands are not executed in parallel.

seperating with & gives parallel execution
separating with ; gives serial execution, and continues on errors
separating with && gives serial execution, and stops on errors

[EMAIL PROTECTED] wrote:
> 
> was accessed) (if you interrupt it while it is writing to the fat
> sector(s) on the floppy, it will probably not just be a bad time stamp)
> and if you interrupt while it is writing to the floppy the record on the
> floppy may be faulty.

FAT does not have read time stamps, so reading from a FAT disk will
not result in any write opperations. Ext2 timestamps readings and
also mounts, so mounting an ext2 filesystem rw will always result
in write opperations, on my system the write opperations will be
finished before umount returns. (The same is true when remounting ro.
I'm using Red Hat 6.0, there might be systems with other behaviours.)

Ken Walter wrote:
> 
> In a properly designed file system, caches should be written out
> to removable media as quickly as possible.  If the user manages
> to remove the media before everything is written, the system should
> request the media be reinserted and then finish.
> Otherwise the removal should be an automatic dismount.
> Anything else is user unfriendly.

I agree. Unfortunately the only OS i know where this is properly
implemented is Amiga OS. From multiple sources I have heard that
the PC floppy controller is not good enought to do that kind of
things.

Brian V. Smith wrote:
> 
> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (William 
>Burrow) writes:
> 
> |> This would be nice, but under certain weird circumstances the user
> |> copying to the media may not be in control of the media.  Technically,
> |> removable media should be lockable such that someone with access to the
> |> media cannot remove it while it is mounted.
> 
> You mean like the floppy drive on the Mac?  I've always hated it's fascistic policy
> of not being to pop out the floppy by pushing a button, but for *nixes it makes
> sense because of the caching.

IMHO the right solution is that the OS can lock the disk in the drive,
but
when the eject button is pressed the OS should be informed. The OS
should
then umount and eject the disk as soon as possible. On single user
systems
the user can be requested to reinsert the disk if needed again.

The only problem is how to make sure the eject button will eject the
disk
when there is no power on the system. But some cleverly designed
mechanics
should do the job.

-- 
Kasper Dupont

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


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

Reply via email to