Linux-Development-Sys Digest #140, Volume #8 Tue, 12 Sep 00 17:13:12 EDT
Contents:
Re: [HELP] Compile piece of kernel in user mode? (Kasper Dupont)
Re: Wish for a writable ISO-9660 compatible filsystem (Johan Kullstam)
Re: Is it possible to invoke shell command using java application in linux?
("Stefano")
Re: Wish for a writable ISO-9660 compatible filsystem (Kasper Dupont)
Sv: Sv: Installing Win98, Win2000 and Linux on one PC?! ("Ulrik S. Kofod")
Re: Is it possible to invoke shell command using java application in (Jonathan
Moore)
Re: Kernel Beta 2.4.0-test8 Problem (bill davidsen)
Re: Curious: compiling test8 series: "warning... token" (bill davidsen)
Re: Receive timeout (Kaz Kylheku)
Driver driver peculiarity on process termination ([EMAIL PROTECTED])
Re: Zip 100 Parallel Port Drive (Wouter Verhelst)
Re: Help! (xing li)
Re: Receive timeout (Bhavin Shah)
Re: A reason NOT to use Borland (Was: Forte, linux and IBM's java.) (Dima Maziuk)
Re: Kernel Beta 2.4.0-test8 Problem ("Emu")
----------------------------------------------------------------------------
From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: [HELP] Compile piece of kernel in user mode?
Date: Tue, 12 Sep 2000 16:01:42 +0200
Maurizio Piana wrote:
>
> 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:
>
You _cannot_ call functions in the kernel from usermode.
If the system calls cannot do what you want you have no
choice but to make a kernel module. The kernel module
should supply the interface needed by your usermode
program. You can choose to make an interface through a
file in /proc or by using a block or char special file.
An often adviced solution is to make a misc device and
use ioctls for whatever you need to do.
--
Kasper Dupont
------------------------------
Crossposted-To: comp.os.linux.misc
Subject: Re: Wish for a writable ISO-9660 compatible filsystem
From: Johan Kullstam <[EMAIL PROTECTED]>
Date: 12 Sep 2000 10:12:27 -0400
Jerry Peters <[EMAIL PROTECTED]> writes:
> In comp.os.linux.development.system fred smith <[EMAIL PROTECTED]> wrote:
> > In comp.os.linux.development.system Otto Wyss <[EMAIL PROTECTED]> wrote:
> > : While I was reorganizing my backup (using a CD-writer), I had the idea
> > : of using an ISO-9660 image file mounted through the loopback device. I
> > : soon had to learn it won't work the way I liked since ISO-9660 is simply
> > : readonly.
>
> > But there's no law that says you MUST use an ISO9660 filesystem on a
> > CD! You can write any old filesystem you like, as long as you're willing
> > to live with the hit that you can read it only on systems that understand
> > that type of filesystem. For example, SCO used to distribute old Skunkware
> > CDROMs with one of their own filesystems burned on it.
>
> Yup, just be prepared for _very_ slow access, though. Ext2 is
> optimized for a random access disk, not the slow random access of a
> cdrom.
what about tar? can you make a big tar file and then burn it straight
off to the cd-writer? list with tar tvf /dev/cdrom and extract using
tar xvf /dev/cdrom just like when using a tape. maybe a cpio archive
would be better?
--
J o h a n K u l l s t a m
[[EMAIL PROTECTED]]
sysengr
------------------------------
From: "Stefano" <[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 linux?
Date: Tue, 12 Sep 2000 14:09:23 +0200
use
Runtime.getRuntime().exec("file to be executed");
Richard Lim <[EMAIL PROTECTED]> wrote in message
news:8pketp$ma4$[EMAIL PROTECTED]...
> 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
>
>
------------------------------
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 17:07:32 +0200
Johan Kullstam wrote:
>
[...]
>
> what about tar? can you make a big tar file and then burn it straight
> off to the cd-writer? list with tar tvf /dev/cdrom and extract using
> tar xvf /dev/cdrom just like when using a tape. maybe a cpio archive
> would be better?
>
That would probably work, there just are a few problems about the
end of the file. The filesize must be a multiple of 2048, and there
might be problems reading the last sectors of the disk.
(I think there are more problems with TAO than DAO)
So you would take a .tar or a .tgz file, append an appropriate
number of zero bytes, and then send that to the cd-writer.
Using a .tgz file and pad with at least 100KB of zeros would
absolutely work.
--
Kasper Dupont
------------------------------
From: "Ulrik S. Kofod" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.setup
Subject: Sv: Sv: Installing Win98, Win2000 and Linux on one PC?!
Date: Tue, 12 Sep 2000 17:21:38 +0200
Kasper Dupont <[EMAIL PROTECTED]> skrev i en
nyhedsmeddelelse:[EMAIL PROTECTED]
> 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
1) When I tried to mount / the 3 HD was unchecked when I tried to select it
again I got an error message. RedHat 6.0 does not allow that you mount / to
the 3. HD.
2) What I did was to copy the first 512kb of the Linux HD to a file and
moved it to the first HD. Then the win2000 boot manager can use it to boot
Linux.
------------------------------
From: Jonathan Moore <[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 16:29:16 +0100
Stefano wrote:
>
> use
>
> Runtime.getRuntime().exec("file to be executed");
>
> Richard Lim <[EMAIL PROTECTED]> wrote in message
> news:8pketp$ma4$[EMAIL PROTECTED]...
> > 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.
If you execute the program directly, you won't get any of the
shell-implemented substitutions, such as ~myself -> /home/myself,
or expansion of environment variables such as $PATH. If you want
these to work, you'll have to exec() the shell itself, usually
"/bin/sh", passing the actual program you wish to run as an
option (-e, IIRC).
Jon Moore
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Kernel Beta 2.4.0-test8 Problem
Date: 12 Sep 2000 16:08:10 GMT
In article <8phtud$qfn$[EMAIL PROTECTED]>,
Emu <[EMAIL PROTECTED]> wrote:
| 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 :(
I had zero luck with test8 as well. I got to the login prompt followed
by a register dump which I could only capture by writing it down (I
didn't). Since test7 was up from the day it was released until yesterday
(Mon Sep 11) I have to assume something was seriously broken. Since I
don't need umsdos I can be happy with test7.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Curious: compiling test8 series: "warning... token"
Date: 12 Sep 2000 16:36:06 GMT
In article <[EMAIL PROTECTED]>,
Robert Lynch <[EMAIL PROTECTED]> wrote:
| Hmm; thanks for the observation, but it doesn't seem to do it.
| Adding the space:
|
| $ cat error1.h
| #define BUGMSG2(x,msg,args...) do { BUGLVL(x) printk(msg , ##
| args); } while (0)
|
| BUGMSG2(1,"doobie","feeble","weeble");
|
| $ cpp -E error1.h
| # 1 "error1.h"
|
|
|
| error1.h:4:37: warning: pasting would not give a valid
| preprocessing token
| do { BUGLVL(1) printk("doobie" ,"feeble","weeble"); } while (0);
I have no idea why there are ## in the definition there. As I recall
from X3J11 days, the ## allows jining of substituted arguments. That is,
arguments are substituted into the definition, the ## is removed, and
substitution takes place again.
I tried this:
/* paste test */
#define tok3 token3
#define join(a,b) print a##b partial_##b
join(to,k3);
and got:
print token3 partial_k3 ;
Now the warning that removing the ## and pasting yeilds no token is
correct, there is no valid token on either side of the ##, and after
pasting there still isn't a token. From your example it looks as if the
## is floating in space, certainly not the use intended.
If this is the kernel code, it doesn't look like a valid use of ##, in
that it doesn't do anything. I don't think it hurts anything, but a
warning about a no-op is probably not a bad idea. Since nothing is being
joined I don't think it does anything, useful or not.
There may be some gcc extention to ## functionality I'm missing, but
what I said works on AIX (IBM compiler) and whatever is on an old UNISYS
lying about as well, so I'm not too far off.
--
bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Receive timeout
Reply-To: [EMAIL PROTECTED]
Date: Tue, 12 Sep 2000 16:30:32 GMT
On Mon, 11 Sep 2000 20:11:25 -0700, Bhavin Shah <[EMAIL PROTECTED]> 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.
I believe that you can set the SO_RECVTIMEO option as well. However, it is not
highly portable among socket implementations.
What you can do is make your socket non-blocking and then use select() to
detect whether a subsequent recv() will provide data (or an end-of-data
indication).
This seems like it increases the overhead to two system calls. What you can do
to mitigate that overhead is from each selected socket to keep reading data
until recv returns -1 with EWOULDBLOCK. If you can do multiple reads after a
single select, the overhead of the select call is amortized among them.
(This is particularly useful for datagram sockets, where one recv call is
needed for each message unless you use the less portable recvmsg).
--
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]
Subject: Driver driver peculiarity on process termination
Date: Tue, 12 Sep 2000 16:52:32 GMT
I can't find a better place to ask this, so if someone could suggest a
different forum please e-mail me.
This question relates to device driver development in the 2.0.x and
2.2.x kernels.
I've written a device driver for a home-built interface card. When
the device is opened, it sends a command to the hardware to activate
the device (in the *_open() driver call) and when the device is
released (in the *_release() driver call) it deactivates the device.
When a program which use this driver terminates normally, the device
is deactivated. If a program using this driver is terminated
abnormally (such as with a control-c from the shell), the device is
not deactivated. Using printk() in the _release procedure shows that
it is called in each case; however, the status codes returned from
the hardware after sending the deactivation sequence is different.
I can't figure out what could be different. Could someone suggest
a starting point?
===============
Ken Hughes
[EMAIL PROTECTED]
============
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Wouter Verhelst)
Subject: Re: Zip 100 Parallel Port Drive
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Date: Tue, 12 Sep 2000 17:19:37 GMT
In article <[EMAIL PROTECTED]>,
Kasper Dupont <[EMAIL PROTECTED]> writes:
> 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?
I'm not sure about this, but perhaps because SPP is the oldest (is
it?) so the 'default' that is supported by all OSses, also broken
ones?
Wouldn't make sense, but ya never know ;-)
--
7:18pm up 6:47, 3 users, load average: 1.36, 1.23, 1.15
Voor een vertaling van Documentation/Configure.help naar het Nederlands:
http://users.pandora.be/wouter.verhelst/configure.html
Any false value is gonna be fairly boring in Perl, mathematicians
notwithstanding.
-- Larry Wall in <[EMAIL PROTECTED]>
------------------------------
From: xing li <[EMAIL PROTECTED]>
Subject: Re: Help!
Date: Tue, 12 Sep 2000 13:28:01 -0400
Reply-To: [EMAIL PROTECTED]
Thanks a lot!
As I changed sprintk to sprintf and compiled with -O, it seems fine to
load the module.
Why doesn't the compiler give any error message about the undeclared
function sprintk?
BTW, Message and Message_Ptr are defined as following in the global
scope,
static char Message[80];
static char* Message_Ptr;
> The kernel includes contains some fance macros
> which only work when the code is being optimized.
> The optimizer will see that __put_user__X is in
> fact never called and remove the reference.
>
> I think there is no such thing as a sprintk
> function. You probably want to use sprintf which
> i think is available inside the kernel. But
> where is Message and Message_Ptr defined?
>
> --
> Kasper Dupont
------------------------------
From: Bhavin Shah <[EMAIL PROTECTED]>
Subject: Re: Receive timeout
Date: Tue, 12 Sep 2000 10:54:47 -0700
On Tue, 12 Sep 2000, Kaz Kylheku wrote:
> On Mon, 11 Sep 2000 20:11:25 -0700, Bhavin Shah <[EMAIL PROTECTED]> 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.
>
> I believe that you can set the SO_RECVTIMEO option as well. However, it is not
> highly portable among socket implementations.
I tried to set the option, but I got an error saying the
protocol wasn't available. I don't know what to make of
that. The option was set on the accepted socket.
Also, here's the portion from the man page about using
SO_RCVTIMEO:
"SO_RCVTIMEO is an option to get the timeout value for
input operations. (It can be used with getsockopt only)."
Thanks again.
------------------------------
From: Dima Maziuk <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.java.softwaretools
Subject: Re: A reason NOT to use Borland (Was: Forte, linux and IBM's java.)
Date: Tue, 12 Sep 2000 14:26:53 -0500
Thaddeus L Olczyk wrote:
>
> Thanks very much for responding to my question WITH SPAM.
Java Development Environment is at http://sunsite.auc.dk/jde/
And yeah, I dunno about the latest and greatest BJB but their v.2
got uninstaled after I tried to debug an applet. 5 minutes later
it was still starting up (NT on PPro-200, 160Mb) so I did a
kill; uninstall. I feel much better now.
Dima
--
Smith & Wesson - The original point and click interface...
==========================================================
Setting Orange, day 36 of Bureaucracy YOLD 3166 (triplopia)
------------------------------
From: "Emu" <[EMAIL PROTECTED]>
Subject: Re: Kernel Beta 2.4.0-test8 Problem
Date: Tue, 12 Sep 2000 14:51:03 -0700
Same here, test7 works flawlessly for me. I don't care about 'umsdos'
support as well, just new it was broken in test7 and fixed in test8 :)
"bill davidsen" <[EMAIL PROTECTED]> wrote in message
news:8plkda$4vv$[EMAIL PROTECTED]...
>
> In article <8phtud$qfn$[EMAIL PROTECTED]>,
> Emu <[EMAIL PROTECTED]> wrote:
> | 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 :(
>
> I had zero luck with test8 as well. I got to the login prompt followed
> by a register dump which I could only capture by writing it down (I
> didn't). Since test7 was up from the day it was released until yesterday
> (Mon Sep 11) I have to assume something was seriously broken. Since I
> don't need umsdos I can be happy with test7.
>
> --
> bill davidsen <[EMAIL PROTECTED]> CTO, TMR Associates, Inc
> Make the rules? I don't make the rules. I don't even FOLLOW the rules!
------------------------------
** 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
******************************