Linux-Development-Sys Digest #337, Volume #8     Mon, 11 Dec 00 05:13:10 EST

Contents:
  How do I . . . ? ([EMAIL PROTECTED])
  ppp to NT RAS server (Andy)
  Re: How do I . . . ? (E J)
  Accessing device driver from kernel ([EMAIL PROTECTED])
  Re: What is the command to  . . . ? (Josef Moellers)
  Re: What is the command to  . . . ? (Josef Moellers)
  Re: set hot key in single user mode (Josef Moellers)
  Newbie: man page for read() ("Vince")
  Re: changing BASH's path searching (Josef Moellers)
  Re: What is the command to  . . . ? ("deadmeat")
  Re: Loading kernel module debug symbols to gdb (Jean-Francois MOINE)
  Re: What is the command to  . . . ? ("Z")
  Re: Newbie: man page for read() (Josef Moellers)
  SSE patch ("Rini van Zetten")
  c++ in linux kernel (c++ exceptions) ("O.Petzold")
  Re: What is the command to  . . . ? (Paul Colquhoun)
  Re: Is there a TWAIN driver in development for Linux? ([EMAIL PROTECTED])
  help creating procfiles - struct proc_dir_entry (Michael Palme)

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

From: [EMAIL PROTECTED]
Crossposted-To: 
alt.os.linux.mandrake,alt.os.linux.slackware,alt.uu.comp.os.linux.questions,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.hardware,comp.os.linux.setup
Subject: How do I . . . ?
Date: Mon, 11 Dec 2000 05:21:13 GMT
Reply-To: [EMAIL PROTECTED]

I am looking for the command that will help me compare two directory
structures.

I just did a file copy to an NFS drive and I want to make sure that I
got everything.

I used
cp -axv /dev /mnt/vol00
cp -axv /bin /mnt/vol00
cp -axv/usr /mnt/vol00
etc . . .

Doing some sampling, it appears that everything copied okay.

What I am looking for is the equivalent to this
dos command: dir *.* /s 

i.e. I am looking for file counts and directory counts as well as
total sizes.

thanks in advance,
charles

p.s. 
linux 8)
 

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

From: [EMAIL PROTECTED] (Andy)
Subject: ppp to NT RAS server
Date: Mon, 11 Dec 2000 05:33:49 GMT

I need help to login from linux to a NT RAS server.
I keep getting E-691 PAP authroization fail.

The RAS server expect the domain\user, but my linux box seems just
sends the user.

I set the domain in the DNS tab, but does not seem any help.

Any info is appreciated.

Thx. andy

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

From: E J <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.mandrake,alt.os.linux.slackware,alt.uu.comp.os.linux.questions,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.hardware,comp.os.linux.setup
Subject: Re: How do I . . . ?
Date: Mon, 11 Dec 2000 05:53:33 GMT

[EMAIL PROTECTED] wrote:

> I am looking for the command that will help me compare two directory
> structures.
>

$ tree directory1 > directory_structure1
$ tree directory2> directory_structure2
$ diff directory_structure1 directory_structure2

>
> I just did a file copy to an NFS drive and I want to make sure that I
> got everything.
>
> I used
> cp -axv /dev /mnt/vol00
> cp -axv /bin /mnt/vol00
> cp -axv/usr /mnt/vol00
> etc . . .
>
> Doing some sampling, it appears that everything copied okay.
>
> What I am looking for is the equivalent to this
> dos command: dir *.* /s
>
> i.e. I am looking for file counts and directory counts as well as
> total sizes.

$ tree -s  directory #file count and directory counts
$ du -k directory # total size

>
>
> thanks in advance,
> charles
>
> p.s.
> linux 8)
>


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

From: [EMAIL PROTECTED]
Subject: Accessing device driver from kernel
Date: Mon, 11 Dec 2000 06:38:45 GMT

Is it safe to access a device driver from another device driver (ie a
kernel module)?


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

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

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.mandrake,alt.os.linux.slackware,alt.uu.comp.os.linux.questions,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.hardware,comp.os.linux.setup
Subject: Re: What is the command to  . . . ?
Date: Mon, 11 Dec 2000 08:15:34 +0100

Allen Wong wrote:
> =

> In alt.os.linux.slackware Markus Amersdorfer <[EMAIL PROTECTED]> wro=
te:
> > [EMAIL PROTECTED] wrote:

> > find . -name '*.txt' -exec grep "Hello World" {} \;
> =

> This works, but it's alot slower than "find . -type f -name '*.txt' -pr=
int |
> xargs grep "Hello World".

These solutions won't tell where they found the match.
Markus' solution can be enhanced to do that:
        find . -name '*.txt' -exec grep "Hello World" {} \; -print

-- =

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

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

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.mandrake,alt.os.linux.slackware,alt.uu.comp.os.linux.questions,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.hardware,comp.os.linux.setup
Subject: Re: What is the command to  . . . ?
Date: Mon, 11 Dec 2000 08:25:02 +0100

[EMAIL PROTECTED] wrote:
> =

> I am looking for the command that will help me compare two directory
> structures.
> =

> I just did a file copy to an NFS drive and I want to make sure that I
> got everything.
> =

> I used
> cp -axv /dev /mnt/vol00
> cp -axv /bin /mnt/vol00
> cp -axv/usr /mnt/vol00
> etc . . .
> =

> Doing some sampling, it appears that everything copied okay.
> =

> What I am looking for is the equivalent to this
> dos command: dir *.* /s
> =

> i.e. I am looking for file counts and directory counts as well as
> total sizes.

If nobody comes up with a better solution (this works at least under the
bash):

cd olddir
find . -type f -print | while read path
do
    newpath=3D`echo $path | sed "s/olddir/newdir/"`
    # you can now compare the old and new files
    if [ ! -e $newpath ]
    then echo $newpath does not exist
    elif cmp -s $path $newpath
    then :
    else files $path $newpath differ
    fi
done

This reads back all files over the net. As an alternative you can do

cd $olddir
find . -exec cksum {} \; > /tmp/cksums

then move the file cksums over to the new machine and run this script

cd newdir
while read line
do set $line
    n=3D`cksum $file`
    if [ "$line" !=3D "$n" ]
    then echo $line '<->' $n
    fi
done < /tmp/cksums

HTH
-- =

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

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

From: Josef Moellers <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.admin,comp.os.linux.development.apps
Subject: Re: set hot key in single user mode
Date: Mon, 11 Dec 2000 08:27:47 +0100

Brian Hui TT wrote:
> =

> Hi,
> =

> I am using Mandrake 7.0.  After I boot up in using single user mode, in=
it 1,
> I can not use some hot key like "CTRL+C" to terminal program. Can anyon=
e
> give me some idea how to initiate hot key function and where is the rel=
ated
> file. Thank you

The command is "stty intr ^C" (You can type it as a caret (^) followed
by an upper case C, stty will understand this)
I'm not sure if you can put it into any of the rc scripts, but as it's
very short, why not type it?

-- =

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

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

From: "Vince" <[EMAIL PROTECTED]>
Subject: Newbie: man page for read()
Date: Mon, 11 Dec 2000 07:30:06 GMT

Hi all,
    I can not get the information I needed for programming when I type "man
read". Where can I get documentation for C/C++ programming? Where should I
go to look for the read() function?
Could anyone please point me to the right direction?

Thank You!

Vince



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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: changing BASH's path searching
Date: Mon, 11 Dec 2000 08:40:21 +0100

Alex Graf wrote:

> The advantages are:
> New packages can be installed simply by unzipping a properly-packaged
> tarball.  No need for apt, RPM & friends.  Uninstall a package by simpl=
y
> deleting its directory.  No need for apt, RPM & friends.

There's more to rpm and friends than just injecting files here and there
into a directory tree, checking dependencies for one and the most
important thing: documenting what's installed.
Rather than doing a "find / -name command -print" (and going to lunch)
to see if a command is installed ("Rats, did I install the help files
with them?" followed by another "find" and another lunch break),
searching the rpm database to decide whether the package is installed
and if it's the right version is a lot easier.
Also, removing a package is a lot easier: No leftovers (err ... not from
lunch), no broken dependencies, documented removal.

> I'm not an expert, but this scheme seems a lot easier to manage than ap=
t
> splattering files all over the /usr tree and trying to keep track of wh=
o
> put what where, and who depends on what.  Beats me why everyone insists=


This is exactly what rpm and friends are doing.
Besides, replacing the "splattering of files all over the /usr tree"
(BTW that should have been "/opt tree") by ... what? ... splattering
files all over the file system, doesn't appeal to me.

> on keeping around crufty old /usr, /var, /etc.  Trying to be old-school=

> I guess.

Compared to one \WINDOWS\SYSTEM directory, the scheme with /usr, /opt,
/var, /etc, /lib sure sounds a little more structured.

> The bash source looks pretty approachable, findcmd.c seems to implement=

> the path searching.  Not sure if I'll have time to work on it, but mayb=
e
> this idea inspires somebody else?

No, I'd rather have a few centralized locations where I (and my shell)
can look for commands. It saves a lot of directory accesses and speeds
up command execution considerably. Symbolic links have been mentioned
already.

-- =

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

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

From: "deadmeat" <root@[127.0.0.1]>
Crossposted-To: 
alt.os.linux.mandrake,alt.os.linux.slackware,alt.uu.comp.os.linux.questions,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.hardware,comp.os.linux.setup
Subject: Re: What is the command to  . . . ?
Date: Mon, 11 Dec 2000 07:56:22 GMT

If nobody comes up with a better solution (this works at least under the
bash):

cd /dev
find . -type f -exec cmp '{}' /mnt/vol00/dev/'{}' \;

repeat for /bin and /usr




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

From: [EMAIL PROTECTED] (Jean-Francois MOINE)
Subject: Re: Loading kernel module debug symbols to gdb
Date: 11 Dec 2000 08:11:37 GMT

amir <[EMAIL PROTECTED]> a skrivas:
>Hi,
>
>How can I load the kernel module debug symbol to gdb?
>
>I am running the kernel under gdb from remote (serial port, kernel-2.2.16
>with patch to enable remote debug).
>
>After loading the kernel symbol I want to load symbols for all the kernel
>modules with were loaded after boot.
>
>What I did was to load the modules like that...
>
>insmod -m modulename.o > filename.map
>
>Then from the information from filename.map I try to load the module symbols
>to gdb
>
>add-symbol-file filename.o section1 = section1 address section2 = section2
>address....
>
>But when I looked at the symbol address in the debugger the address was
>wrong (compered to the address of file created by the insmod)

I have a patch for gdb-5.0 which should fix this problem:

===================8<======================
--- gdb-5.0/gdb/elfread.c.orig  Tue Feb 15 05:48:23 2000
+++ gdb-5.0/gdb/elfread.c       Wed Jun 28 10:14:19 2000
@@ -293,8 +293,10 @@
       if (number_of_symbols < 0)
        error ("Can't read symbols from %s: %s", bfd_get_filename (objfile->obfd),
               bfd_errmsg (bfd_get_error ()));
+#if 0 /*JFM*/
       /* FIXME: Should use section specific offset, not SECT_OFF_TEXT. */
       offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+#endif
       for (i = 0; i < number_of_symbols; i++)
        {
          sym = symbol_table[i];
@@ -305,6 +307,9 @@
              continue;
            }
 
+#if 1 /*JFM*/
+       offset = ANOFFSET (objfile->section_offsets, sym->section->index);
+#endif
          if (dynamic
              && sym->section == &bfd_und_section
              && (sym->flags & BSF_FUNCTION))
===================8<======================

-- 
Ken ar c'henta�         ** Breizh ha Linux atav ! **
                mailto:[EMAIL PROTECTED]
Jef             (home mailto:[EMAIL PROTECTED])
                http://moinejf.free.fr/

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

From: "Z" <[EMAIL PROTECTED]>
Crossposted-To: 
alt.os.linux.mandrake,alt.os.linux.slackware,alt.uu.comp.os.linux.questions,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.hardware,comp.os.linux.setup
Subject: Re: What is the command to  . . . ?
Date: Mon, 11 Dec 2000 09:26:51 +0100

Once upon a while [EMAIL PROTECTED] wrote:

> I am looking for the command that will help me compare two directory
> structures.
> 
> I just did a file copy to an NFS drive and I want to make sure that I
> got everything.
> 
> I used
> cp -axv /dev /mnt/vol00
> cp -axv /bin /mnt/vol00
> cp -axv/usr /mnt/vol00
> etc . . .
> 
> Doing some sampling, it appears that everything copied okay.
> 
> What I am looking for is the equivalent to this
> dos command: dir *.* /s 
> 
> i.e. I am looking for file counts and directory counts as well as
> total sizes.
> 
> thanks in advance,
> charles
> 
> p.s. 
> linux 8)
>  


What I usually do to verify my copy is
"du" the original and the copy filesystem.
If you want to check every single file it
might be a good idea to write the two dumps
into two temporary files and "diff" these.

-- 
Z ([EMAIL PROTECTED])
"LISP  is worth learning for  the profound enlightenment  experience
you will have when you finally get it; that experience will make you
a better programmer for the rest of your days."   -- Eric S. Raymond

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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Newbie: man page for read()
Date: Mon, 11 Dec 2000 09:28:39 +0100

Vince wrote:
> =

> Hi all,
>     I can not get the information I needed for programming when I type =
"man
> read". Where can I get documentation for C/C++ programming? Where shoul=
d I
> go to look for the read() function?
> Could anyone please point me to the right direction?

If "man read" doesn't show anything at all, you have not installed the
man pages.
If it shows some "read(1)" or "read(n)" man page, then you're led into
the wrong manual section. Try "man 2 read" instead (the read() function
is considered a system call which is covered in section 2 of the
manual).

-- =

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

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

From: "Rini van Zetten" <[EMAIL PROTECTED]>
Subject: SSE patch
Date: Mon, 11 Dec 2000 09:05:51 +0100

There is a SSE patch for kernel 2.2.12 at
http://sources.redhat.com/gdb/papers/linux/linux-sse.html


--
++++++++++++++++++++++++++++++++++++++

Rini van Zetten, [EMAIL PROTECTED]
ARVOO Engineering BV
Tel. +31 - 348 - 413 897
Fax. +31 - 348 - 417 242
P.O. box 439
3440 AK Woerden, The Netherlands

++++++++++++++++++++++++++++++++++++++



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

From: "O.Petzold" <[EMAIL PROTECTED]>
Subject: c++ in linux kernel (c++ exceptions)
Date: Mon, 11 Dec 2000 09:50:26 +0100

Hello,

this is related to one of the last thread "c++ in kernel and linker
problems".
Over teh weekend I studied the libstdc++/gcc sources. There are some
startup
code for calling dtors (__do_global_Xtors_aux) and for stack unwinding
on exceptions (__XXregister_frame_info) at gcc.
Well, from this side here I could use g++ and exceptions inside kernel
but,
there are the terminate function from glibc, which is needed by
libstdc++.
This would be one of the bigger problem. How can I terminate a module?
The best solution would be the call all destructors and "auto
cleanup_module"
for this imo. Or are here better solutions (maybee I'm wrong ?).
The next is the .init section of user space programms. Is there for
kernel space
as well? What did I have forgotten ????

At last, may solution would be to write a wrapper for init_module() and
cleanup_module which does the above task. Writing a wrapper fo
new/delete
isn't a problem (it's interesting to see, that libstdc++ is using
malloc/free intern).
Porting code the other problem, but without exceptions, porting is very
heavy.
Some ideas ?

Thanks Olaf




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

From: [EMAIL PROTECTED] (Paul Colquhoun)
Crossposted-To: 
alt.os.linux.mandrake,alt.os.linux.slackware,alt.uu.comp.os.linux.questions,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.hardware,comp.os.linux.setup
Subject: Re: What is the command to  . . . ?
Reply-To: <[EMAIL PROTECTED]>
Date: Mon, 11 Dec 2000 08:47:02 GMT

On Mon, 11 Dec 2000 04:30:09 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
|I am looking for the command that will help me compare two directory
|structures.
|
|I just did a file copy to an NFS drive and I want to make sure that I
|got everything.
|
|I used
|cp -axv /dev /mnt/vol00
|cp -axv /bin /mnt/vol00
|cp -axv/usr /mnt/vol00
|etc . . .
|
|Doing some sampling, it appears that everything copied okay.
|
|What I am looking for is the equivalent to this
|dos command: dir *.* /s 
|
|i.e. I am looking for file counts and directory counts as well as
|total sizes.


'diff' will do this.

diff -r --brief /dev /mnt/vol00/dev
etc.


-- 
Reverend Paul Colquhoun,      [EMAIL PROTECTED]
Universal Life Church    http://andor.dropbear.id.au/~paulcol
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
xenaphobia: The fear of being beaten to a pulp by
            a leather-clad, New Zealand woman.

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

From: [EMAIL PROTECTED]
Subject: Re: Is there a TWAIN driver in development for Linux?
Date: Mon, 11 Dec 2000 09:24:32 -0000

On Sun, 10 Dec 2000 18:11:55 -0500 jtnews <[EMAIL PROTECTED]> wrote:

| twain isn't just for scanners it's for a lot of different
| digital devices.  see www.twain.org

However, TWAIN is not really a driver, but a way to access a device
from an application.  Windows/DOS didn't have a standard way to do
that because of the DOS legacy of letting device drivers do whatever
they wanted (before TWAIN).  Unix (and therefore Linux) already have
a standard way to access ALL devices.  Applications for Unix use
this standard universally.  This standard is that each device has
a special filename, and this name is opened like a file, and calls
to read, write, and ioctl will manipulate the device driver.

It doesn't make sense to make a TWAIN driver for Linux because what
TWAIN does is neither needed, nor even workable.  It could be possible
to make a library that emulated the TWAIN driver.  But if you're going
to port a scanner application to Linux from Windows, you have more to
worry about than accessing the scanner.

Whatever else TWAIN supports, the same issues apply, because Unix
already has a standard way to support accessing devices.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: Michael Palme <[EMAIL PROTECTED]>
Subject: help creating procfiles - struct proc_dir_entry
Date: Mon, 11 Dec 2000 09:34:45 GMT

Hello....

I use the kernels 2.2.16 and 2.2.14.
For debugging purposes (driver modules) i want to put some files to
procfs. I want to read and write these files. Ive looked into
<linux/proc_fs.h> and found there are several different ways to do that
(so many fields in struct proc_dir_entry). So i wrote some modules (as
explained in ldd and lkmpg) that do it via fops and inode and also a
module that use the "get_info" field for this. I find 2 other fields in
struct proc_dir_entry "read_proc" and "write_proc". I played around
with this and it also works.

But im unsure with the parameters "*page" and "*eof" in "read_proc".
What are they for ? Im also interested whats the preferred (best) way
for creating procfiles. What are the differences (apart from coding
affort) between the ways "(*get_info)" -- "(*read_proc);(*write_proc)" -
- " implementation using inode and file ops" ? There are some sources
in the kernel that implement both for one proc file: "get_info" and
also a function for reading the procfile in their fops. What is this
for ?

Would be very nice if somebody can explain that vast number of things
to me.

Thanks in advance ...Michael Palme


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

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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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