Linux-Development-Sys Digest #21, Volume #8 Fri, 14 Jul 00 14:13:14 EDT
Contents:
Re: can't see the kernel calls ("Quiney, Philip [HAL02:HH00:EXCH]")
GetModuleFileName() in linux ("Eric Co")
Re: GetModuleFileName() in linux (Erik de Castro Lopo)
Kernel Panic Recovery (Justo M. Casablanca)
Re: Kernel Panic Recovery (Thomas Steffen)
Re: Problems with modules on 2.2.13 [SMP] ("Rex Dieter")
Re: GetModuleFileName() in linux (Kaz Kylheku)
Re: GetModuleFileName() in linux (Paul Colclough)
Re: Play mpeg without Xwindows (Tim Lyth)
compiling XFree86 on Win32 ("chris G�nther")
compiling XFree86 on win32 ("chris G�nther")
Re: Play mpeg without Xwindows (Krzys Majewski)
Re: compiling XFree86 on Win32 (Kaz Kylheku)
Re: GetModuleFileName() in linux (Kaz Kylheku)
Re: compiling XFree86 on Win32 ("chris G�nther")
Re: compiling XFree86 on win32 (Uwe Bonnes)
Re: GetModuleFileName() in linux ([EMAIL PROTECTED])
Re: keyboard with additional function keys (Tim T.)
Re: problem of little indian to big indian code (Sian Leitch)
----------------------------------------------------------------------------
From: "Quiney, Philip [HAL02:HH00:EXCH]" <[EMAIL PROTECTED]>
Subject: Re: can't see the kernel calls
Date: Fri, 14 Jul 2000 07:56:30 +0100
Peter Huang wrote:
>
> I tried to load the driver using "/sbin/insmod -f pcitest.o" and it is
> telling me that it can't see
> the kernel function calls. However, I check the include files and I make
> sure that I included
> all the files that I need. Does any one have any quick knowledge of the
> problem.
>
> The kernel calls such as printk can't can't be resolved. I included all the
> correct header files
>
Hi,
This problem is usually to do with module versioning. Here is a sample
'hello world' for modules that was compiled on a system running a
different kernel than the final target machine.
================= hello_mod.c ========================
#define __NO_VERSION__
#define MODULE
#include <linux/module.h>
char kernel_version [] = "2.3.51";
int init_module(void)
{
printk("Hello World from modulespace\n");
return(0);
}
void cleanup_module(void)
{
printk("<1>Goodbye....\n");
}
======================================================
Compile with gcc -o hello_mod.o hello_mod.c & then insmod hello_mod.o.
It worked last time I tried it ;-)
HTH
Regards
Phil Q
--
Phil Quiney CSIP Demonstrator
[EMAIL PROTECTED] Nortel Networks,
Telephone: +44 (1279) 402363 London Rd, Harlow,
Fax: +44 (1279) 402885 Essex CM17 9NA,
United Kingdom.
"This message may contain information proprietary to Northern
Telecom so any unauthorised disclosure, copying or distribution
of its contents is strictly prohibited."
------------------------------
From: "Eric Co" <[EMAIL PROTECTED]>
Subject: GetModuleFileName() in linux
Date: Fri, 14 Jul 2000 17:47:02 +0800
hi,
in windows, we can use GetModuleFileName() to retrieve the full path and
filename for the executable file.
how to do it in linux?
thanx,
eric co
------------------------------
From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: GetModuleFileName() in linux
Date: Fri, 14 Jul 2000 12:42:38 +0000
Eric Co wrote:
>
> hi,
> in windows, we can use GetModuleFileName() to retrieve the full path and
> filename for the executable file.
> how to do it in linux?
This is possible but is usually not a good idea and Not The Way Its
Done In Unix (tm). Usually the only reason to do something like this
is to find the location of configuration files, data files or extra
libraries. For these purposes, this is a very bad idea.
Global configurations files should be placed in /etc, per-user
configuration files should be in the user's home directory.
Extra libraries should go in something like /usr/local/lib/
or /usr/local/lib/app-name/.
Application specific data files should be placed in a directory
like /usr/local/share/app-name/.
However, if you don't want to heed my very good advice and you really,
really want to do this, you can, by reading the psuedo file
"/proc/self/maps".
Erik
--
+-------------------------------------------------+
Erik de Castro Lopo [EMAIL PROTECTED]
+-------------------------------------------------+
I hack, therefore I am.
------------------------------
From: Justo M. Casablanca <[EMAIL PROTECTED]>
Subject: Kernel Panic Recovery
Date: Fri, 14 Jul 2000 13:30:07 GMT
Hi all, I recently placed a "mem=128M" option to linux while booting,
and got a kernel panic error message. What I want to know is, it safe
to hit the reset button on my PC at this point ? I did, and it rebooted
into Linux just fine, but I need to know. If it is not OK to hit reset,
what do I do ? I don't seem to have any control over the text console
once the kernel panic happens.
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
From: Thomas Steffen <[EMAIL PROTECTED]>
Subject: Re: Kernel Panic Recovery
Date: 14 Jul 2000 15:41:31 +0200
Justo M. Casablanca <[EMAIL PROTECTED]> writes:
> Hi all, I recently placed a "mem=128M" option to linux while booting,
> and got a kernel panic error message. What I want to know is, it safe
> to hit the reset button on my PC at this point ?
It is your only option. Kernel panic means that the processor has been
stopped. It is (probably) safe as long as the file system is not
mounted.
> I don't seem to have any control over the text console once the
> kernel panic happens.
You are not supposed to :-)
Thomas
--
Internet-Election comming: http://www.democratic-internet.de/
------------------------------
From: "Rex Dieter" <[EMAIL PROTECTED]>
Subject: Re: Problems with modules on 2.2.13 [SMP]
Date: Fri, 14 Jul 2000 08:49:50 -0500
"Chris J/#6" <[EMAIL PROTECTED]> wrote in message
news:8klbnb$kkb$[EMAIL PROTECTED]...
> (*) the silly suffixes may be a controversial point here - but when you've
> been playing with linux for 5 years, and never touched a vendor-kernel,
the
> last thing you expect(+) is for them to modify how the damn thing makes...
I'm sorry you feel this way, but it is also a very good way to install and
use multiple kernel versions without their stomping all over each others'
files.
--
Rex Dieter
Computer System Administrator
Mathematics and Statistics
University of Nebraska Lincoln
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: GetModuleFileName() in linux
Reply-To: [EMAIL PROTECTED]
Date: Fri, 14 Jul 2000 14:20:30 GMT
On Fri, 14 Jul 2000 17:47:02 +0800, Eric Co <[EMAIL PROTECTED]> wrote:
>hi,
>in windows, we can use GetModuleFileName() to retrieve the full path and
>filename for the executable file.
>how to do it in linux?
You can't; the directory entries of executable files are not locked down in
Linux; a program could be moved from one directory to another while it is
running, without being aware of it.
In any case, programs should not store their configuration information relative
to their executable location. In Linux, they should find system wide
configuration info in /etc and user specific info in the user's home directory.
If the software needs to know its installation location, have its install
script store that info into a configuration file. You can then write a function
similar to GetModuleFilename which just queries the program's configuration
database.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Paul Colclough)
Subject: Re: GetModuleFileName() in linux
Date: 14 Jul 2000 13:53:19 GMT
[EMAIL PROTECTED] (Eric Co) wrote in <8kmni6$qi7$[EMAIL PROTECTED]>:
>hi,
>in windows, we can use GetModuleFileName() to retrieve the full path and
>filename for the executable file.
>how to do it in linux?
argv[0]
------------------------------
From: Tim Lyth <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Play mpeg without Xwindows
Date: Fri, 14 Jul 2000 23:58:05 +1000
Reply-To: [EMAIL PROTECTED]
I doubt that it would be possible as the screen resolution in text mode would
make for a huge movie screen or it would be massively pixelated, OR you will
have to find a program that will load a graphics display that you can run the
movies in. Then there are sound considerations that you will need to think
about.
Cheers,
Tim Lyth
Thierry wrote:
>
> Hi,
>
> Is it possible to play a movie (mpeg or quicktime) without using Xwindows,
> only in Shell screen.
>
> Maybe using frame buffer ?
>
> Thanks a lot for your help.
>
> thierry
------------------------------
From: "chris G�nther" <[EMAIL PROTECTED]>
Subject: compiling XFree86 on Win32
Date: Fri, 14 Jul 2000 17:18:35 +0200
Dear gurus,
I'm not sure if this is the right place for thuis posting and if it is not -
please
forgive me and send me a not I will delete it then.
While trying to compile XFree86 4.0 on my Windows 2000 professional
System using Cygnus Bash 2.0 with gcc I receive the following error:
bash-2.04$ gmake World.Win32
:
Building Release 6.4 of the X Window System.
:
:
D:\DOKUMEN~1\cgr\LOKALE~1\Temp\make3366.sh: 2: Syntax error: end of file
unexpected (expected "then")
gmake: [World.Win32] Error 2 (ignored)
cd. /config/imake
gmake -f Makefile.ini clean.Win32
gmake[1]: Makefile.ini No such file or directory
gmake[1]: *** no rule to make target 'Makefile.ini'. Stop.
gmake[1]: Entering directory 'f:/01_Cprg/x86/xc'
gmake[1]: Leaving directory 'f:/01_Cprg/x86/xc'
gmake: *** [World.Win32] Error 2
bash-2.04$ gmake
What is wrong here? Is it possible to compile XFree86 on Win32?
Does anyone has an Idea of how to do it? Or maybe did anyone succesfully
compile XFree86 on Win32?
Any comment is highly appreciated
kind regards
chris
------------------------------
From: "chris G�nther" <[EMAIL PROTECTED]>
Subject: compiling XFree86 on win32
Date: Fri, 14 Jul 2000 17:19:35 +0200
Dear gurus,
While trying to compile XFree86 4.0 on my Windows 2000 professional
System using Cygnus Bash 2.0 with gcc I receive the following error:
bash-2.04$ gmake World.Win32
:
Building Release 6.4 of the X Window System.
:
:
D:\DOKUMEN~1\cgr\LOKALE~1\Temp\make3366.sh: 2: Syntax error: end of file
unexpected (expected "then")
gmake: [World.Win32] Error 2 (ignored)
cd. /config/imake
gmake -f Makefile.ini clean.Win32
gmake[1]: Makefile.ini No such file or directory
gmake[1]: *** no rule to make target 'Makefile.ini'. Stop.
gmake[1]: Entering directory 'f:/01_Cprg/x86/xc'
gmake[1]: Leaving directory 'f:/01_Cprg/x86/xc'
gmake: *** [World.Win32] Error 2
bash-2.04$ gmake
What is wrong here? Is it possible to compile XFree86 on Win32?
Does anyone has an Idea of how to do it? Or maybe did anyone succesfully
compile XFree86 on Win32?
Any comment is highly appreciated
kind regards
chris
------------------------------
From: Krzys Majewski <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc
Subject: Re: Play mpeg without Xwindows
Date: 14 Jul 2000 15:18:08 GMT
What does sound have to do with X? -chris
In comp.os.linux.misc Tim Lyth <[EMAIL PROTECTED]> wrote:
> I doubt that it would be possible as the screen resolution in text mode would
> make for a huge movie screen or it would be massively pixelated, OR you will
> have to find a program that will load a graphics display that you can run the
> movies in. Then there are sound considerations that you will need to think
> about.
> Cheers,
> Tim Lyth
> Thierry wrote:
>>
>> Hi,
>>
>> Is it possible to play a movie (mpeg or quicktime) without using Xwindows,
>> only in Shell screen.
>>
>> Maybe using frame buffer ?
>>
>> Thanks a lot for your help.
>>
>> thierry
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: compiling XFree86 on Win32
Reply-To: [EMAIL PROTECTED]
Date: Fri, 14 Jul 2000 15:28:38 GMT
On Fri, 14 Jul 2000 17:18:35 +0200, chris G�nther <[EMAIL PROTECTED]> wrote:
>Dear gurus,
>
>I'm not sure if this is the right place for thuis posting and if it is not -
>please
>forgive me and send me a not I will delete it then.
You're not sure? Maybe this will help. What is the
return value of:
strstr("comp.os.linux.development.system", "windows2000")
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: GetModuleFileName() in linux
Reply-To: [EMAIL PROTECTED]
Date: Fri, 14 Jul 2000 15:30:07 GMT
On 14 Jul 2000 13:53:19 GMT, Paul Colclough <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Eric Co) wrote in <8kmni6$qi7$[EMAIL PROTECTED]>:
>
>>hi,
>>in windows, we can use GetModuleFileName() to retrieve the full path and
>>filename for the executable file.
>>how to do it in linux?
>
>argv[0]
argv[0] is not necessarily a full path to the executable. It may just be a path
that is relative to the current working directory of the shell that the program
was executed from.
In fact, the invoking shell may stuff anything it wants in there. argv[0] may
even be null (if argc is also 0).
--
#exclude <windows.h>
------------------------------
From: "chris G�nther" <[EMAIL PROTECTED]>
Subject: Re: compiling XFree86 on Win32
Date: Fri, 14 Jul 2000 17:58:13 +0200
Well thanks anyway.
"Kaz Kylheku" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> On Fri, 14 Jul 2000 17:18:35 +0200, chris G�nther <[EMAIL PROTECTED]> wrote:
> >Dear gurus,
> >
> >I'm not sure if this is the right place for thuis posting and if it is
not -
> >please
> >forgive me and send me a not I will delete it then.
>
> You're not sure? Maybe this will help. What is the
> return value of:
>
> strstr("comp.os.linux.development.system", "windows2000")
>
> --
> #exclude <windows.h>
------------------------------
From: Uwe Bonnes <[EMAIL PROTECTED]>
Subject: Re: compiling XFree86 on win32
Date: 14 Jul 2000 15:49:10 GMT
chris G�nther <[EMAIL PROTECTED]> wrote:
: Dear gurus,
: While trying to compile XFree86 4.0 on my Windows 2000 professional
: System using Cygnus Bash 2.0 with gcc I receive the following error:
...
: What is wrong here? Is it possible to compile XFree86 on Win32?
: Does anyone has an Idea of how to do it? Or maybe did anyone succesfully
: compile XFree86 on Win32?
Compiling XFree86 on Win32 is experimental.
There is a mailing list and mailing list archive at
www.sourceware.cygnus.com.
Bye
--
Uwe Bonnes [EMAIL PROTECTED]
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
========= Tel. 06151 162516 ======== Fax. 06151 164321 ==========
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: GetModuleFileName() in linux
Date: 14 Jul 2000 18:09:59 +0200
((beware of antispam device in my reply address - Basile))
>>>>> "Kaz" == Kaz Kylheku <[EMAIL PROTECTED]> writes:
Kaz> On Fri, 14 Jul 2000 17:47:02 +0800, Eric Co <[EMAIL PROTECTED]>
Kaz> wrote:
>> hi, in windows, we can use GetModuleFileName() to retrieve the
>> full path and filename for the executable file. how to do it
>> in linux?
Kaz> You can't; the directory entries of executable files are not
Kaz> locked down in Linux; a program could be moved from one
Kaz> directory to another while it is running, without being aware
Kaz> of it.
Actually, on linux systems (with /proc fs), reading the /proc/self/exe
symbolic link gives the information.
For example the ls command gives
lrwx------ 1 basile parents 0 jui 14 18:08 /proc/self/exe -> /bin/ls
NB please remove antispam device from reply address
--
Basile STARYNKEVITCH - 8 rue de la Faiencerie, 92340 BOURG LA REINE (France)
tel 01.46.65.45.53. email = basile point starynkevitch at wanadoo point fr
http://perso.wanadoo.fr/starynkevitch/basile
antispam: <[EMAIL PROTECTED]>
------------------------------
From: [EMAIL PROTECTED] (Tim T.)
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.development,comp.os.linux.hardware
Subject: Re: keyboard with additional function keys
Date: 14 Jul 2000 17:57:09 GMT
In article <s7nb5.24330$[EMAIL PROTECTED]>,
Paul Fox <[EMAIL PROTECTED]> writes:
> In comp.os.linux.hardware LY <[EMAIL PROTECTED]> wrote:
>: I have a keyboard with about 30 additional function keys. If I press one key
>
> have you looked at the man pages for loadkeys, dumpkeys, showkey, and
> keytables?
>
> have you looked in /var/log/messages (i think) for reports of unknown
> scancodes after using your keyboard?
>
> i was able to load up values for a similar keyboard that i have. (though
> mine wasn't producing doubles like yours is -- mine were simply not
> understood.)
>
> paul
Found the following on linux-kernel, some moons ago:
Hi!
Many `modern' keyboards have additional keys, intended to start certain
functions on the system, such as altering the sound card volume, skipping
tracks on CD playing software, or shutting down the system. Such keys are not
intended to send out any text to the program that currently receives focus. The
FunKey package therefore extends Linux with a kernel patch and a daemon that
processes keycodes to start commands, rather than generate strings.
The FunKey kernel patch that adds a `keycode interpretation type' that says
`send a code out over /dev/funkey'. The `funky' daemon reads this character
device and starts plain Un*x commands in response. The code is independent of
the kbd_mode, so it works under textual mode as well as under XFree86.
The patch applies to Linux 2.2.14 and comes with a simple example daemon.
You can pick both up at
http://home.zonnet.nl/vanrein/linux/funkey
Enjoy,
-Rick.
To respond, please Cc. [EMAIL PROTECTED]
I also saw that Andries Brouwer has a set of keymaps on his
website. Unfortunately, I don't have an URL handy
TimT
============================================================================
[EMAIL PROTECTED] Voodoo Programmer/Keeper of the Rubber Chicken
"Is that one o' them there dang dangling party pistols?"
============================================================================
------------------------------
From: [EMAIL PROTECTED] (Sian Leitch)
Subject: Re: problem of little indian to big indian code
Date: Thu, 13 Jul 2000 08:09:01 +0100
Reply-To: [EMAIL PROTECTED]
Aig Tue, 11 Jul 2000 23:41:42 +0200,
sgriobh bruno.patin <[EMAIL PROTECTED]>:
>I have an application that creates data on another platform than Linux
>and when we read these datas on the linux box, we have to work on the
>order of the bytes by eight block count. Is there a mean to do the work
>automatically by options on the opening of the file ? where can i find
>answers on this subject ?
>
>thank you
(1) It's not "indian", but "endian", the "end" part referring to
those people who open their boiled eggs at a particular end (yes,
really!).
(2) What does "order of the bytes by eight block count" mean?
(3) Generally speaking, reversing endian-ness has to be done by
individual programs. While it is true that X servers cater for
different endianness of the client computer, other programs seem not
to do so. So you are probably on you own in this. However, here is a
procedure to reverse endianness of integers:-
PROC reverse endianness = (INT n)INT:
BEGIN
INT
bits per byte = 8,
bytes per int = 4;
BITS bn=BIN n; #Convert to a mode where bits are accessible#
BITS result:=2r0; #Set to zero#
FOR i TO bytes per int
DO
BITS isolate byte=bn SHR bits per byte*(i-1) AND 16rff;
result:=result OR isolate byte SHL bits per byte*(4-i)
OD;
ABS result
END; #reverse endianness#
A compiler for the above routine may be had merely by downloading the
file mentioned in my sig.
--
Sian Leitch (Software Engineer specialising in Algol 68)
Algol 68 for Linux is available from me or at
<ftp://vestein.arb-phys.uni-dortmund.de/pub>
Look for ctrans_0.1.0.tar.gz
------------------------------
** 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
******************************