Linux-Development-Sys Digest #139, Volume #8     Tue, 12 Sep 00 10:13:16 EDT

Contents:
  Re: Beta Test 2.4.0-test8 is no longer posted I just noticed! (Mark Davies)
  Re: Is it possible to invoke shell command using java application in  (Guillaume 
Conjat)
  Re: printk output in X? (Tasos Kotaras)
  Re: purify and memory managers (Graeme Roy)
  Kernel Memory Address Question ([EMAIL PROTECTED])
  [HELP] Compile piece of kernel in user mode? (Maurizio Piana)
  reverse indirect membership operator? (Arnaud Westenberg)
  BIOS calls ("Szeleney Robert")
  Sv: Installing Win98, Win2000 and Linux on one PC?! ("Ulrik S. Kofod")
  Re: Zip 100 Parallel Port Drive (Kasper Dupont)
  Re: Imation Superdisk (Kasper Dupont)
  Re: Wish for a writable ISO-9660 compatible filsystem (Kasper Dupont)
  Re: Sv: Installing Win98, Win2000 and Linux on one PC?! (Kasper Dupont)
  Re: Receive timeout (Kasper Dupont)
  A reason NOT to use Borland (Was: Forte, linux and IBM's java.) (Thaddeus L Olczyk)
  Re: Kernel Memory Address Question (Kasper Dupont)

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

From: Mark Davies <[EMAIL PROTECTED]>
Subject: Re: Beta Test 2.4.0-test8 is no longer posted I just noticed!
Date: Tue, 12 Sep 2000 08:05:28 +0000


Hi,

I can still find it here...

http://www.mirror.ac.uk/sites/ftp.kernel.org/pub/linux/kernel/v2.4/


Although I have similar problems to your previous message on
2.4.0-test8.


Regards, Mark.




Emu wrote:
> 
> They are back to the Pre releases.  I have no idea how I got the Beta test 8
> but is was posted last week :(  and no longer psoted.

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

From: Guillaume Conjat <[EMAIL PROTECTED]>
Crossposted-To: 
comp.lang.java,comp.lang.java.gui,comp.lang.java.help,comp.lang.java.programmer,comp.os.linux.development.apps,comp.unix.programmer,linux.redhat
Subject: Re: Is it possible to invoke shell command using java application in 
Date: Tue, 12 Sep 2000 09:17:36 +0200

Richard Lim wrote:
> 
> I am currently programming a GUI java application that run in kde or gnome
> to invoke certain shell command in linux such as chmod, ls, less etc.
> Is it possible to invoke shell command using java application in linux, are
> there any restrictions.
> please advice.
> 
> regards,
> richard lim

You can have a look at:
http://developer.java.sun.com/developer/codesamples/examplets/java.lang/89.html

Gui

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

From: Tasos Kotaras <[EMAIL PROTECTED]>
Subject: Re: printk output in X?
Date: Tue, 12 Sep 2000 12:02:33 +0300

Thank you all for your replies. Unfortuntaly nothing happens still. Here is
what I did:

1. I changed the console_loglevel parameter. (I used a function I found in A.
Rubini's book). I checked in text mode and it works fine for all priorities.
2. I tried xterm -C (as a root of course). Nothing appears to it.
3. I tried xterm -e tail -f /var/log/messages. Again nothing. The reason is
that there is nothing writen
in the /var/log/messages file.

I got desperate, but eventually I found the solution: I used the following
function that prints anything to the
current console. Credits to Ori Pomerantz.

/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

/*********************************************************************\
 *
 * Description: printk.c - send textual output to the tty you're
 *    running on, regardless of whether it's passed
 *    through X11, telnet, etc.
 *    Copyright (C) 1998 by Ori Pomerantz
 *
\*********************************************************************/

#ifndef __KERNEL__
# define __KERNEL__
#endif

/* The necessary header files */
/* Standard in kernel modules */
#include <linux/kernel.h>   /* We're doing kernel work */
#include <linux/module.h>   /* Specifically, a module */

/* Deal with CONFIG_MODVERSIONS */
#if CONFIG_MODVERSIONS==1
# define MODVERSIONS
# include <linux/modversions.h>
#endif

/* Necessary here */
#include <linux/sched.h>    /* For current */
#include <linux/tty.h>      /* For the tty declarations */

/* Print the string to the appropriate tty, the one
 * the current task uses */
void print_string(char *str)
{
  struct tty_struct *my_tty;

  /* The tty for the current task */
  my_tty = current->tty;

  /* If my_tty is NULL, it means that the current task
   * has no tty you can print to (this is possible, for
   * example, if it's a daemon). In this case, there's
   * nothing we can do. */
  if (my_tty != NULL) {

    /* my_tty->driver is a struct which holds the tty's
     * functions, one of which (write) is used to
     * write strings to the tty. It can be used to take
     * a string either from the user's memory segment
     * or the kernel's memory segment.
     *
     * The function's first parameter is the tty to
     * write to, because the  same function would
     * normally be used for all tty's of a certain type.
     * The second parameter controls whether the
     * function receives a string from kernel memory
     * (false, 0) or from user memory (true, non zero).
     * The third parameter is a pointer to a string,
     * and the fourth parameter is the length of
     * the string.
     */
    (*(my_tty->driver).write)(
        my_tty, /* The tty itself */
        0, /* We don't take the string from user space */
        str, /* String */
        strlen(str));  /* Length */

    /* ttys were originally hardware devices, which
     * (usually) adhered strictly to the ASCII standard.
     * According to ASCII, to move to a new line you
     * need two characters, a carriage return and a
     * line feed. In Unix, on the other hand, the
     * ASCII line feed is used for both purposes - so
     * we can't just use \n, because it wouldn't have
     * a carriage return and the next line will
     * start at the column right
     *                          after the line feed.
     *
     * BTW, this is the reason why the text file
     *  is different between Unix and Windows.
     * In CP/M and its derivatives, such as MS-DOS and
     * Windows, the ASCII standard was strictly
     * adhered to, and therefore a new line requires
     * both a line feed and a carriage return.
     */
    (*(my_tty->driver).write)(
      my_tty,
      0,
      "\015\012",
      2);
  }
}


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\



--
     `\|||/
      (@@)
 _ooO_(_)_Ooo________________________________
 ______|_____|_____|_____|_____|_____|_____|_____|
_____|__________|_____|_____|____|_____|____|_____
|________Tasos Kotaras___|_____|____|_____|_____|
___|___|__Telecom Software Engineer_____|____|____
_____|_____Access Net & Wireless Comm Dept
|_______|___INTRACOM___|_____|______|______|____
__|___|______Peania 19002, Greece_|_____|____
___e-mail: [EMAIL PROTECTED]|____|____|____|
|_____Phone: +30 1 6690185_______|_____|______




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

From: Graeme Roy <[EMAIL PROTECTED]>
Subject: Re: purify and memory managers
Date: Tue, 12 Sep 2000 09:59:32 +0100

On Mon, 11 Sep 2000, Greg Herlein wrote:

> Rob Love <[EMAIL PROTECTED]> wrote:
> > might be the case that this is what my school has, I'm not sure. Anyway,
> > anyone know where I can find the free purify or maybe another memory
> > management program that is pretty easy to use.
> 
> I've used ccmalloc - it's simple, easy to use, and it works very well on
> linux.  It's given me problems on Solaris though.  It's on Freshmeat.
> 
> I've been using mpatrol lately - it's MUCH more complete - very solid for
> me, very, very thorough.
> 
> http://www.cbmamiga.demon.co.uk/mpatrol/

mpatrol also contains a memory profiler for monitoring memory usage and
tracing it back to individual functions through call stacks.  It should work
OK with C++ since most implementations of the C++ dynamic memory operators
call malloc() and free().

If mpatrol isn't quite what you are looking for then have a look at some
of the related software available, a lot of which is available for Linux:

http://www.cbmamiga.demon.co.uk/mpatrol/mpatrol_56.html
http://www.cs.colorado.edu/~zorn/MallocDebug.html

Graeme.


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

From: [EMAIL PROTECTED]
Subject: Kernel Memory Address Question
Date: Tue, 12 Sep 2000 08:59:34 GMT

Hi,

   I am just starting to learn programming Linux Kernel Modules. I am
quite confused with how the Linux Kernel Address space is implemented.

   My question is this:

   On page page 20,line 2 of the book 'Linux Kernel' (which can be
downloaded from the Linux Documentation Project website), the author
mentioned the Linux kernel runs in physical address space, and it
requires no page tables. However, in the file /usr/include/asm/page.h,
the comment there states that kernel memory is mapped at 0xC0000000.
This sounds to me that Linux kernel is using virtual memory and that
0xC0000000 is mapped using page tables to physical address 0x0 (shown
by the macros __iovirt and __iophys in /usr/include/asm/io.h). This
does not seem to be consistent with the statement in the book. I am
confused by the actual memory mapping used by both user space and Linux
kernel. Could somebody please give me a clarification on that?

   Thanks!

Yours sincerely,
SC


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: Maurizio Piana <[EMAIL PROTECTED]>
Subject: [HELP] Compile piece of kernel in user mode?
Date: 12 Sep 2000 10:17:41 GMT

Hello, I'm trying to compile a program that uses some functions of 
/usr/src/linux-2.2.16/net/ipv4/udp.c, but I cannot compile (pages of errors!).
I must compile it in user mode (using module is not a valid solution for my
purposes 'cause I must work in user mode not in kernel mode!). The file I try
to compile is named test.c and call the udp.c function:
 
  int udp_sendmsg(struct sock *sk, struct msghdr *msg, int len)

and 'cause it requires sock and msghdr struct I have included the header files
that have the definition of them: <linux/socket.h> and <net/sock.h>. These two
header files are in /usr/src/linux-2.2.16/include/, so I've tried to compile:

  gcc /usr/src/linux-2.2.16/net/ipv4/udp.c test.c -I /usr/src/linux-2.2.16/include/

obtaining pages and pages of errors!! I'm in deep fog! I'd like to compile a test
program that uses udp.c functions and make the program working in user mode.

Can any of you, please, help me in any way to arrive to my goal?

Any help (also little!) is well accepted!

Many thanx in advance.

MAURIZIO

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

Date: Tue, 12 Sep 2000 10:53:53 +0200
From: Arnaud Westenberg <[EMAIL PROTECTED]>
Subject: reverse indirect membership operator?

Hi all,

I'm writing a driver for wich I want to make use of a hierarchical
hardware data structure. I know I can refer to, for example, a hardware
buffer through the indirect membership operator like
ISA_card_nr1->chip_nr3->buffer_nr6. The different hardware cards will
use a different amount of chips with different numbers of buffers. The
buffers are mapped to successive device files so, for example, buffers
0-19 belong to ISA_card_nr1 and buffers 20-15 belong to ISA_card_nr2.

How can I travel up the hierarchical structure to determine the card to
wich the buffer belongs? (Like ISA_card_nr1<-chip_nr3<-buffer_nr6)

Thanks, Arnaud

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

From: "Szeleney Robert" <[EMAIL PROTECTED]>
Subject: BIOS calls
Date: Tue, 12 Sep 2000 12:51:22 +0200

Hi!!

I am writting a kernel module and have to call the BIOS. (32/pm)

I can call the BIOS with the __pa macro. But the BIOS tries than to access
memory at location 0xf850. Have I to map this area before? (How?)

Thanks, Cu, Bertl!!



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

From: "Ulrik S. Kofod" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.setup
Subject: Sv: Installing Win98, Win2000 and Linux on one PC?!
Date: Tue, 12 Sep 2000 12:57:43 +0200

I installed a win98,Linux and a win2000 server on the same computer on 3
HD's
I can't see why it should not work with 3 partitions.

first I installed win98 on the first HD
win2000 I then installed on the 3. HD
Linux must be on the 2. HD because / can't be mounted to the 3. HD  (?)
(don't think that is the case when you use partitions)
LILO must be placed on the HD/ partition where Linux is installed.

I was not able to mount the FAT32 partitions in Linux but I was able to
mount the FAT16 partitions I had created on HD 1 and 3.

win2000 creates a boot manager where you can select to boot win98 and
win2000 and it can be modified so that you can boot Linux also.
A boot disk can also be used.






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

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Zip 100 Parallel Port Drive
Date: Tue, 12 Sep 2000 14:57:24 +0200

[EMAIL PROTECTED] wrote:
> 
> In comp.os.linux.hardware Michel Talon <[EMAIL PROTECTED]> wrote:
> 
> > Sorry, had not seen this one, but i think SPP will be slow. EPP would be
> > better.
> 
> Well, ZIP drives are known not to work well or at all with ECP.

The problem was not that the ZIP drive does not work with ECP.
The problem was that the ParIde system for Linux does not work
with ECP, which is also written in the documentation. However
EPP is faster than ECP, at least with my SparQ drive it is.
The speed for reading is as far as i remember:

SPP: less than 200 kb/sec
ECP under DOS: 300 kb/sec
EPP under DOS: 400 kb/sec
EPP under Linux: 500 kb/sec

For some reasons many new computers come with the BIOS default
set to SPP, does anyone have a very good explanation for that?

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Imation Superdisk
Date: Tue, 12 Sep 2000 15:02:48 +0200

root wrote:
> 
> Is there a driver for the Imation Parallel superdisk drive anywhere?

I think the ParIde system can be used with that drive.
ParIde has been part of the official Linux releases for
the last 1-2 years.

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: Wish for a writable ISO-9660 compatible filsystem
Date: Tue, 12 Sep 2000 15:21:18 +0200

Christopher Browne wrote:
> 
> Centuries ago, Nostradamus foresaw a time when Kasper Dupont would say:
> >brian moore wrote:
> >[...]
> >>
> >> But you haven't looked at the structure of ISO-9660.  If you add a
> >> single block to a file at the start of your 'image' you have to move
> >> EVERYTHING after it (or waste the space -- which is not nice for trying
> >> to fit as much as you can on an 650MB CDR).
> >>
> >[...]
> >
> >It doesn't have to be that way. It would in fact be possible to
> >make the moving part effective. It would however require a few
> >new functions in the filesystem on which the iso image is placed.
> 
> But is the result of this modification still an ISO 9660
> filesystem?

You probably also have to modify the tables locating the files
on the disk. I think in ISO9660 those are located contineously
at the start of the disk, so with a good caching system that
would not be too time consuming. So my idea definetly would
speed up modifications on an ISO9660 system, but it would never
be as fast as filesystems designed for modifications.

> 
> And can this approach be taken to write the data to a CD-RW
> unit?

What I am suggesting is how a image file on an ext2 or fat
filesystem can be modified fast and still be legal ISO9660,
that image file can be written to a CD-R or CD-RW as usual.
Modifying the filesystem directly on the CD-RW would still
be slow, and probably always will with ISO9660.

> 
> There are all sorts of changes that could conceivably be made, but
> not all of them are compatible with either ISO9660 or with the
> hardware itself.

I am primarily suggesting new ways to modify the existing
data structures used by ext2, fat and a lot of other
filesystems. I was not suggesting that the interpretation
of the data structures should be changed thus it will be
compatible with other programs using those structures.
What I am suggesting can be done using simple disk block
reads and writes supported by _all_ harddrives.

> --
> [EMAIL PROTECTED] - <http://www.hex.net/~cbbrowne/>
> A man, a plan, a canoe, pasta, heros, rajahs, a coloratura, maps, snipe,
> percale, macaroni, a gag, a banana bag, a tan, a tag, a banana bag again
> (or a camel), a crepe, pins, Spam, a rut, a Rolo, cash, a jar, sore
> hats, a peon, a canal--Panama!

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.setup
Subject: Re: Sv: Installing Win98, Win2000 and Linux on one PC?!
Date: Tue, 12 Sep 2000 15:31:14 +0200

Ulrik S. Kofod wrote:
> 
> I installed a win98,Linux and a win2000 server on the same computer on 3
> HD's
> I can't see why it should not work with 3 partitions.
> 
> first I installed win98 on the first HD
> win2000 I then installed on the 3. HD
> Linux must be on the 2. HD because / can't be mounted to the 3. HD  (?)
> (don't think that is the case when you use partitions)
> LILO must be placed on the HD/ partition where Linux is installed.
> 
> I was not able to mount the FAT32 partitions in Linux but I was able to
> mount the FAT16 partitions I had created on HD 1 and 3.
> 
> win2000 creates a boot manager where you can select to boot win98 and
> win2000 and it can be modified so that you can boot Linux also.
> A boot disk can also be used.

It should be possible to mount / from the 3. HD, but
having /boot on the 3. HD does not work with all BIOSes.

The location of /boot is critical because at boot time
the files must be loaded using bios calls. If /boot is
part of the root filesystem that must be located in a
place from where you can boot. If /boot is mounted as
a separate filesystem the root filesystem can be located
anywhere on any harddisk. (as long as the driver is in
the kernel.)

Accessing the first 512MB of the first harddisk would
normally always work, depending on BIOS version and
LILO version the rest of the harddiskspace may cause
trouble.

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Receive timeout
Date: Tue, 12 Sep 2000 15:39:16 +0200

Bhavin Shah wrote:
> 
> Is there a way to set a timeout on a recv call?
> I checked the man page for setsockopt, and I see that
> the SO_RECVTIMEO option may only be used for getsockopt,
> not setsockopt.  Are there alternatives, or a way
> around this.
> 
> RH6.0, g++ compiler.
> 
> TIA.
> 
> Bhavin

In many cases you can do what you want by
calling select with a timeout, and only
call recv when data is available.

-- 
Kasper Dupont

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

From: [EMAIL PROTECTED] (Thaddeus L Olczyk)
Crossposted-To: comp.lang.java.softwaretools
Subject: A reason NOT to use Borland (Was: Forte, linux and IBM's java.)
Date: Tue, 12 Sep 2000 13:44:40 GMT
Reply-To: [EMAIL PROTECTED]

Thanks very much for responding to my question WITH SPAM.

On Mon, 11 Sep 2000 22:55:10 -0700, Tony de la Lama
<[EMAIL PROTECTED]> wrote:

>Hi Thaddeus,
>
>In case you haven't Borland JBuilder before, we've licensed IBM's
>Development Kit version 1.3 for Linux and will include it on our JBuilder
>4 CDs.  This press release describes the new relationship:
>http://www.borland.com/about/press/2000/java4linux.html  JBuilder 4 was
>announced on 9/5 and will be widely available later in the month.  It is
>all-Java and runs on Solaris, Linux and Windows.  Check out our web page
>at http://www.borland.com/jbuilder.
>
>Best of Luck,
>Tony
>
>Thaddeus L Olczyk wrote:
>
>> Since using Sun's version of java for linux in a no-no on SMP
>> machines (check the toplevel readme under System Requirements
>> Note to linux users). I've been using IBM's version of java for linux.
>>
>> Recently I've tried out forte, but have a problem with IBM's java and
>> forte. When I get to loading javadoc I get an exception No class
>> definition found: class name sun/tools/javac/BatchEnvironment.
>> The IDE then hangs.
>>
>> Any idea how to fix this?
>>
>> ( PS I haven't tried out blackdowns latest and greatest yet. Does
>> forte work with it?)


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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Kernel Memory Address Question
Date: Tue, 12 Sep 2000 15:48:24 +0200

[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
>    I am just starting to learn programming Linux Kernel Modules. I am
> quite confused with how the Linux Kernel Address space is implemented.
> 
>    My question is this:
> 
>    On page page 20,line 2 of the book 'Linux Kernel' (which can be
> downloaded from the Linux Documentation Project website), the author
> mentioned the Linux kernel runs in physical address space, and it
> requires no page tables. However, in the file /usr/include/asm/page.h,
> the comment there states that kernel memory is mapped at 0xC0000000.
> This sounds to me that Linux kernel is using virtual memory and that
> 0xC0000000 is mapped using page tables to physical address 0x0 (shown
> by the macros __iovirt and __iophys in /usr/include/asm/io.h). This
> does not seem to be consistent with the statement in the book. I am
> confused by the actual memory mapping used by both user space and Linux
> kernel. Could somebody please give me a clarification on that?
> 
>    Thanks!
> 
> Yours sincerely,
> SC
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

The first 3GB of the address space is used for the virual memory
of the current process. The last GB of the address space (starting
at 0xC0000000) is used for the kernels virtual memory, but I don't
think that is mapped directly to physical memory.

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