Linux-Development-Sys Digest #239, Volume #8     Sat, 28 Oct 00 00:13:14 EDT

Contents:
  www.deblin.org (Vicente Aurelio Esteve Lloret)
  mount cdrom problem ("Christos Karayiannis")
  Re: mount cdrom problem (CDM)
  Re: _findfirst, _findnext from win32? (Lew Pitcher)
  How to intercept packets from the kernel (Qiong Li)
  "Not in ELF format" message?????? ([EMAIL PROTECTED])
  udp bind and sendto problem ([EMAIL PROTECTED])
  Re: "Not in ELF format" message??????
  Re: udp bind and sendto problem
  Re: unexpected sorting order? (Ronald Cole)
  Re: unexpected sorting order? (Ronald Cole)
  Re: Multiple groups per file (Jeff Walters)
  Linux and PXE ([EMAIL PROTECTED])
  Re: msgsnd seems to be corrupting memory. (Juergen Heinzl)
  Help! Async I/O problem (Timothy Stark)
  Re: using /linuxrc ([EMAIL PROTECTED])
  Re: Multiple groups per file (Robert Redelmeier)
  Re: Linux and PXE ([EMAIL PROTECTED])

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

From: [EMAIL PROTECTED] (Vicente Aurelio Esteve Lloret)
Subject: www.deblin.org
Date: 27 Oct 2000 09:29:37 GMT

www.deblin.org

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

From: "Christos Karayiannis" <[EMAIL PROTECTED]>
Subject: mount cdrom problem
Date: Fri, 27 Oct 2000 14:08:40 +0300

When I try to:

 mount  /dev/cdrom

I take the message

mount: iso 9660 not sypported by kernel

 What did I miss. I have to confess that I played with the kernel recently.
How can I restore things back?

                Thank you




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

From: [EMAIL PROTECTED] (CDM)
Subject: Re: mount cdrom problem
Date: Fri, 27 Oct 2000 13:31:43 +0200

Check your kernel configuration (missing ISO9660 filesystem?), switch it on
and rebuild.

"Christos Karayiannis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> When I try to:
>
>  mount  /dev/cdrom
>
> I take the message
>
> mount: iso 9660 not sypported by kernel
>
>  What did I miss. I have to confess that I played with the kernel
recently.
> How can I restore things back?
>
>                 Thank you
>
>
>




Opinions expressed herein are my own and may not represent those of my employer.


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

From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: _findfirst, _findnext from win32?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 27 Oct 2000 12:27:41 GMT

On Wed, 25 Oct 2000 13:42:20 -0700, "Norman Black"
<[EMAIL PROTECTED]> wrote:

>> For instance, because MSDOS derivatives do not glob in the shell,
>> MSDOS programs have taken on the effort of performing the globbing
>> within their own code (i.e. TYPE *.TXT would result in TYPE.EXE
>> invoking the findfirst()/findnext() API). On Linux (as in Unix),
>> filename globbing is (typically) performed at the shell, and is
>> (usually) unnecessary within the program (i.e. cat *.txt would result
>
>
>All fine and well as long as the wildcard match (glob) comes via the command
>line, via the shell. What if the wild card is given some other way.
>From a file, from a prompt in a dialog, or anything other than the shell
>command line.
>
>My own application has directory lists, and I search those. It is not worth
>mentioning the details. I just use opendir...readdir_r...fnmatch...closedir.

Which is why my _first_ suggestion was to use those exact functions.

What I was also advocating was that the OP re-examine the need for a
findfirst()-like function, based on (a) the potential that it was
unnecessary in his Linux/Unix implementation, and (b) that Unix (and
Linux) programmers probably already had addressed this need in other
manners. 

Porting code isn't just about "how do I get it to compile properly?".
It's also about "how do I ensure that the program is doing what it
should, in the manner it should?". I fully expect that the OP will
next ask what the Linux equivalent of the Windows Registry functions
are, without understanding that Linux does it differently.

>Implementing a findfirst, findnext, findclose is a simple and portable way
>to have code that runs on Unix and Microsoft platforms with no code changes,
>other than obviously the implementation of the find API calls themselves. My
>own code follows this approach. Nothing ever calls the operating system
>directly,  since all such activity goes through an encapsulation.
>File/directory access, sockets, threads, exec, redirection exec, memory
>mapped files, shared memory, debugger interface, and even all GUI all go
>through encapsulations. No operating system types, constants or procedures
>exist in the encapsulation interface. Most encapsulations are very thin and
>trivial, some are not. Such encapsulations can also help in Unix <-> Unix
>ports, since some differences can exist.
>
>I personally would rather encapsulate than recode for each system.

Sure, I agree.

Personally, I would rather design a platform-independant approach,
implemented by encapsulation rather than retrofit the design approach
of one platform to facilities of another. 

>--
>Norman Black
>Stony Brook Software
>the reply, fubar => ix.netcom
>
>"Lew Pitcher" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
>> On Wed, 25 Oct 2000 18:46:02 GMT, [EMAIL PROTECTED] (Kaz
>> Kylheku) wrote:
>>
>> >On Wed, 25 Oct 2000 18:43:38 GMT, Lew Pitcher <[EMAIL PROTECTED]>
>wrote:
>> >>On Wed, 25 Oct 2000 19:18:37 -0000, "Igor Bobalo"
>> >><[EMAIL PROTECTED]> wrote:
>> >>
>> >>>Hi.
>> >>>
>> >>>I'm porting some system routlines from win32 platform to linux. Is
>there are
>> >>>some replacement for _findfirst, _findnext function?
>> >>Not directly. opendir(), readdir() and family are the directory
>> >>functions (one flavour at least), but they don't support globing.
>> >
>> >Note that readdir() returns a pointer to static storage, so it is not
>thread
>> >safe.  I recommend readdir_r() or getdents() in code that may need to be
>thread
>> >safe in the future.
>>
>> I qualified readdir() as "one flavour of directory functions" because
>> I didn't have my references handy, and am in a CYA mode today <g>.
>>
>> I'm pleased to learn that my memory isn't completely faulty, as I
>> would have hoped that you would correct me if I had misstated things.
>>
>> I still maintain that, if a porting exercise becomes a task of
>> rewriting the environment from which the program is derived (i.e.
>> building a findfirst() equivalent), then there's something
>> questionable with the design or implementation of the program being
>> ported. Rather than "look for the equivalent" of a platform-specific
>> API, porting should "look for how" other implementations on the
>> platform usually solve the problem.
>>
>> For instance, because MSDOS derivatives do not glob in the shell,
>> MSDOS programs have taken on the effort of performing the globbing
>> within their own code (i.e. TYPE *.TXT would result in TYPE.EXE
>> invoking the findfirst()/findnext() API). On Linux (as in Unix),
>> filename globbing is (typically) performed at the shell, and is
>> (usually) unnecessary within the program (i.e. cat *.txt would result
>> in the shell globbing *.txt into a list of filenames into the
>> commandstring before the program is executed, and 'cat' just looks
>> through a list of completed filenames). If someone were to port an
>> MSDOS program that used findfirst()/findnext() in this manner, then
>> the effort of emulating findfirst()/findnext() in Linux would be of
>> minimal benefit (I'd say no benefit at all) to the program.
>>
>>
>>
>> Lew Pitcher
>> Information Technology Consultant
>> Toronto Dominion Bank Financial Group
>>
>> ([EMAIL PROTECTED])
>>
>>
>> (Opinions expressed are my own, not my employer's.)
>


Lew Pitcher
Information Technology Consultant
Toronto Dominion Bank Financial Group

([EMAIL PROTECTED])


(Opinions expressed are my own, not my employer's.)

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

From: Qiong Li <[EMAIL PROTECTED]>
Subject: How to intercept packets from the kernel
Date: Fri, 27 Oct 2000 10:03:33 -0400

Is there a type of socket in Linux kernel which allows an application to
intercept all the packet the kernel received (assuming the kernel is
configured as a router) and then re-inject the packets back to the
kernel without breaking the pipe?


Thank you in advance!
Quiohn

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

From: [EMAIL PROTECTED]
Subject: "Not in ELF format" message??????
Date: Fri, 27 Oct 2000 16:36:19 GMT

I copied a module test.o from a linux box running SuSe 6.4 , kernel
2.2.13 to another box running the same thing and when I try to
insert the module I get " test.o not in ELF format"

I copied from a floppy and using ftp in binary with equally bad
success.

This module inserts fine in every other linux box I have except this
one.


Any explanations?

Thanks


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

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

From: [EMAIL PROTECTED]
Subject: udp bind and sendto problem
Date: Fri, 27 Oct 2000 16:53:42 GMT

i am trying to program a little udp application on a red hat 6.2 linux
machine.  when i try to call sendto after successfully binding to an
address and port it returns an error (-1).  what am i doing wrong?
cant i bind then call sendto?!

thanks in advance.

here is a code snippet: (this works if i remove the call to bind().)

struct sockaddr_in saddr;
memset(&saddr, 0, sizeof(saddr));
saddr.sin_family = AF_INET;
saddr.sin_port = htons(13492);
inet_pton(AF_INET, "10.100.132.18", &saddr.sin_addr);

fd = socket(AF_INET, SOCK_DGRAM, 0);

success = bind(fd, (struct sockaddr *) &saddr, sizeof(saddr));
//  success returns 0

success = sendto(fd, message, message_length, 0,
                 &saddr, sizeof(saddr);
// success returns -1.




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

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

From: [EMAIL PROTECTED] ()
Subject: Re: "Not in ELF format" message??????
Date: Fri, 27 Oct 2000 19:03:13 -0000

In article <8tcau3$rt6$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:
>I copied a module test.o from a linux box running SuSe 6.4 , kernel
>2.2.13 to another box running the same thing and when I try to
>insert the module I get " test.o not in ELF format"
>
>I copied from a floppy and using ftp in binary with equally bad
>success.
>
>This module inserts fine in every other linux box I have except this
>one.
>
>
>Any explanations?

What does "file test.o" say?

--
http://www.spinics.net/linux

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

From: [EMAIL PROTECTED] ()
Subject: Re: udp bind and sendto problem
Date: Fri, 27 Oct 2000 19:14:37 -0000

In article <8tcbuj$ssf$[EMAIL PROTECTED]>,  <[EMAIL PROTECTED]> wrote:

>success = sendto(fd, message, message_length, 0,
>                 &saddr, sizeof(saddr);
>// success returns -1.

What is errno set to at this point?

--
http://www.spinics.net/linux

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

From: Ronald Cole <[EMAIL PROTECTED]>
Subject: Re: unexpected sorting order?
Date: 27 Oct 2000 13:40:39 -0700

Juha Laiho <[EMAIL PROTECTED]> writes:
> Yep, it's locales. Why 'ls' works, I don't know -- perhaps it's not compiled
> with locale support. I think one of the worst effects is:
> - what happens with 'rm [a-z]*'?
> 
> As known, typically, that'd have removed only files starting with
> a lowercase letter. In present RHs this would remove anything
> staring with a letter other than 'Z' (uppercase). This already happened
> with RH 6.2 if you were using bash2 as your shell. bash 1.x apparently
> wasn't locale-aware.

I haven't seen that...  globbing seems to work ok, it's just the sort
order is wrong (again, as if lowercase is folded into uppercase before
sorting).

Finally found out what has been going on in Bugzilla: see bug #17749.

-- 
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: unexpected sorting order?
Date: 27 Oct 2000 14:06:44 -0700

I've filed bug #19942 in Bugzilla.

-- 
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: Jeff Walters <[EMAIL PROTECTED]>
Subject: Re: Multiple groups per file
Date: 27 Oct 2000 21:45:25 GMT

Christopher Browne <[EMAIL PROTECTED]> wrote:
> In our last episode (27 Oct 2000 01:21:15 GMT),
> the artist formerly known as Jeff Walters said:
>>I have been searching but have not been able to find any tools or
>>patches for Linux to enable supporting multiple groups per file. Are
>>there any such tools?

> You might wish to avail yourself of the kernel sources, at least
> so far as looking at:
>   /usr/include/linux/ext2_fs.h

> - Look at the contents of struct ext2_inode.

> - Ask yourself how many group ID values (i_gid) it attaches to
>   each inode.

Actually already looked not there but at the permission checking logic
in the kernel.  While it will scan multiple (supplementary) groups for
the process, it only compares it to one from the file.

Just thought maybe, rather than implementing the somewhat strange and
discarded posix spec for ACL's, someone possibly had extended the
group paradigm on files the way it was done for processes.  After all,
we're only talking three permission bits here, and in 5 words or less
"1 group per file" is the limitation it all is trying to work around.

Perhaps doing it is no less complicated than doing ACL's though.
-- 
Message of the Message:
NOBODY EXPECTS THE SPANISH INQUISITION!

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

From: [EMAIL PROTECTED]
Subject: Linux and PXE
Date: Fri, 27 Oct 2000 23:27:09 GMT

Hello All,

 I have a requirement to use PXE to download linux kernel, do some work,
and then boot to the os on the disk.

 The problems that I am having is that I am unable to program the reboot
code to switch to the next boot device. The plug and play bios
specification says that int 18h could be sent to the bios to boot to
next device. I have verified this by sending the interrup in Setup.s,
and the next boot device gets control.

 However, when I program the reboot code to send interrupt 18h seems to
hang the machine. I am sending that interrup after the linux code
switches itself to the real mode (modified the process.c code).  I guess
linux when loading destroys the bios data area, which might be causing
the machine to hang? Any clues? Is it possible to access bios services
when running under linux. If not, what kind of cleanup I need to do to
achieve the same functionality?

  Any pointers/help would be really appreciated.

Thanks,
nitu


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

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

From: [EMAIL PROTECTED] (Juergen Heinzl)
Subject: Re: msgsnd seems to be corrupting memory.
Date: 27 Oct 2000 23:41:39 GMT

In article <[EMAIL PROTECTED]>, Marc Schneider wrote:
>msgsnd seems to be corrupting memory around the msgbuf pointer.
>
>for example I have the following code:
>
>pMsgBuf = malloc(iPacketLen + 4 + 8);
>bzero(pMsgBuf, iPacketLen + 4 + 8);
>pMsgBuf += 4; /* Build a guard band */
>
>printf("PMQ:pMsgBuf: %p\n",pMsgBuf);
>printf("PMQ:-4: %p\n", *(pMsgBuf-4));
[-]
%p and *(...) ?

>rc = msgsnd(iMsgQueueID, pMsgBuf, iPacketLen, 0); 
[-]
msgsnd() expects a pointer to a struct msgbuf so this
code is wrong already as the first member of struct
msgbuf is a long you assume a certain size for it.

Secondly mtype must be a non-zero positive value so
you seem to ignore the return value.

>printf("AMQ:pMsgBuf: %p\n",pMsgBuf);
>printf("AMQ:-4: %p\n", *(pMsgBuf-4));
>
>results in the following output:
>
>PMQ:pMsgBuf: 0x8067424
PMQ:-4: (nil)
>AMQ:pMsgBuf: 0x8067424
>AMQ:-4: 0x3
>
>clearly, AMQ:-4 should print (nil).
[-]
Firstly you specified %p which means a pointer but then
you pass *(pMsgBuf - 4) which is, probably, a char, so
while printf() expects sizeof( void * ) valid bytes you
pass just one char.

Secondly at least the Unix98 specification does not say
anything about whether msgsnd() may or may not modify
mtype.
[-]

Cheers,
Juergen

-- 
\ Real name     : J�rgen Heinzl         \       no flames      /
 \ EMail Private : [EMAIL PROTECTED] \ send money instead /

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

From: Timothy Stark <[EMAIL PROTECTED]>
Subject: Help! Async I/O problem
Date: Sat, 28 Oct 2000 03:19:16 GMT

Hello folks:

Help! Help!

I am developing my emulator and discovered that keyboard poll every
instruction killed its performance alot.  When I removed the poll, it
went 2.5 times faster.  Now, I tried to implement SIGIO interrupts for
keyboard but it did not work. (I tried to press some keys but it happened
nothing.)  Yes, Async I/O is new to me for Linux system.  Look at
my init routine:

void ks10fe_Initialize(void)
{
   emu_IOTrap = ks10fe_ctyInput;
   if (fcntl(fileno(stdin), F_SETOWN) < 0) 
      perror("STDIN 1");
   if (fcntl(fileno(stdin), F_SETFL, O_ASYNC) < 0) 
      perror("STDIN 2");
}

That was executed successfully with no error reports.  Also, I set
"signal(SIGIO, emu_IO);" to interrupt for keyboard input processes.
When I pressed some keys, it happened nothing!

Does anyone have any experience with that?

Thank you!

-- Tim Stark

-- 
Timothy Stark   <><     Inet: [EMAIL PROTECTED]
==========================================================================
"For God so loved the world, that he gave his only begotten Son, that 
whosoever believeth in him should not perish, but have everlasting life.
Amen." -- John 3:16 (King James Version Bible)

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

From: [EMAIL PROTECTED]
Subject: Re: using /linuxrc
Date: Sat, 28 Oct 2000 03:45:06 -0000

On 26 Oct 2000 23:40:02 +0200 Peter Pointner <[EMAIL PROTECTED]> wrote:

|> Why do you need to have inetd start before init starts?  Just curious.
|> IWSTM that you can just start everything from init if you are already
|> mounted on the final / filesystem.  I'll be using /linuxrc to build
|> that / filesystem.
|
| Because init never starts. :-)
| It is an embedded system, I use the initial ramdisk as final file system,
| and linuxrc never ends. I don't need init, but I do need inetd.

The /linuxrc doesn't start as PID 1.  The kernel starts a new process to
run /linuxrc from, with PID 1 waiting for it to end.  If /linuxrc then
executes init, won't init be running as some other PID?


| Btw, what does "IWSTM" mean?

It Would Seem To Me.

-- 
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil  (at)  ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]

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

Date: Fri, 27 Oct 2000 22:52:09 -0500
From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: Multiple groups per file

Jeff Walters wrote:
> Christopher Browne <[EMAIL PROTECTED]> wrote:
> > the artist formerly known as Jeff Walters said:
> >>I have been searching but have not been able to find any tools or
> >>patches for Linux to enable supporting multiple groups per file. Are
> >>there any such tools?
> Just thought maybe, rather than implementing the somewhat strange and
> discarded posix spec for ACL's, someone possibly had extended the
> group paradigm on files the way it was done for processes.  After all,
> we're only talking three permission bits here, and in 5 words or less
> "1 group per file" is the limitation it all is trying to work around.

'Scuse my ignorance, but why would you want multiple groups
per file?  Can't you just create new groups that are the
appropriate union sets of users?  I don't know if /etc/group
will accept group names to make this easier. (groups of groups)

-- Robert

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

From: [EMAIL PROTECTED]
Subject: Re: Linux and PXE
Date: Sat, 28 Oct 2000 04:01:28 -0000

On Fri, 27 Oct 2000 23:27:09 GMT [EMAIL PROTECTED] wrote:

|  I have a requirement to use PXE to download linux kernel, do some work,
| and then boot to the os on the disk.
|
|  The problems that I am having is that I am unable to program the reboot
| code to switch to the next boot device. The plug and play bios
| specification says that int 18h could be sent to the bios to boot to
| next device. I have verified this by sending the interrup in Setup.s,
| and the next boot device gets control.
|
|  However, when I program the reboot code to send interrupt 18h seems to
| hang the machine. I am sending that interrup after the linux code
| switches itself to the real mode (modified the process.c code).  I guess
| linux when loading destroys the bios data area, which might be causing
| the machine to hang? Any clues? Is it possible to access bios services
| when running under linux. If not, what kind of cleanup I need to do to
| achieve the same functionality?

I do believe the BIOS will have to be restarted from reset once Linux has
been running in protected mode.  So many things besides the CPU mode can
be "out of whack" that the reset sequence is the only way to do this.

I, too, have wanted to do this with PXE to do things like reload a fresh
system over the network, possibly selected differently each time based on
the current services provisioning.

If the first stage OS boot were to always take place using PXE, then that
OS run code could install a modified LILO or other boot loader onto the
hard drive and eventually do a full reset.  That modified boot loader
would, just before actually loading the second stage OS, wipe itself off
the hard drive by rewriting the MBR with zeros for the bootable code
(but leaving the partition table intsact).  Then the boot loader would
load the OS of choice from the partition boot record.  That way you could
run the BIOS through a full reset reboot, using the MBR as the toggling
state memory.

I'm working with an Intel ISP1100 box to experiment (haven't got to the
stage of doing the boot loader thing yet).

-- 
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil  (at)  ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]

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


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