Linux-Development-Sys Digest #987, Volume #7 Fri, 30 Jun 00 09:13:13 EDT
Contents:
Re: Serial comms in C/C++/probably anything! (Bryan Hackney)
Re: help in writing device drivers (Chan Chi Lung)
Re: Developing Device Drivers ([EMAIL PROTECTED])
Re: how to bulid .so object file? (Martin Kahlert)
Q: ufs v. e2fs (Andrei Ivanov)
Re: Good Basic compiler for linux? (Josef Moellers)
Re: compiling 2.4-test2 kernel problem ("Morten Liljeberg")
Building Ksamba, version of libqt.so, etc (NotMe)
UDP: how to ..? (Maurizio Piana)
Re: MBR (Josef Moellers)
Re: linux programming help needed ...... (Josef Moellers)
Too many Files Open Error on Redhat 6.2 Server ("Jean-Claude MEILLAND")
Re: Building Ksamba, version of libqt.so, etc (Aravind Sadagopan)
Linux Kernel IP Manipulation (Tim Godfrey)
Re: Good Basic compiler for linux? (Marc SCHAEFER)
Re: Raw disk access on Linux (Marc SCHAEFER)
Closing Socket (=?iso-8859-1?Q?S=E9bastien?= Cottalorda)
R: Bash Script Error Tolerant ("Alberto")
Re: Good Basic compiler for linux? ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: Bryan Hackney <[EMAIL PROTECTED]>
Subject: Re: Serial comms in C/C++/probably anything!
Date: Thu, 29 Jun 2000 21:36:33 -0500
Jem wrote:
>
> Hi guys,
>
> I'm developing an application that takes bytes of a serial port and
> throws them out of a socket interface onto a LAN. All is well and good
> BUT how do I make sure that the bytes are "untampered" with, i.e. \r
> hasn't been removed or changed into \n or \0 and ALL control codes will
> pass through?
>
> There are loads of termios settings I realise but it would appear that
> \r will be affected all the time by things like, what column is the
> cursor in, etc... Am I reading the manuals wrong? Is there a nice
> straightforward way of getting, byte by byte, each /dev/ttyS0 byte?
>
> Currently I'm using open() and read() to get the bytes...Maybe I need to
> go to a lower level somehow? I mean, transferring of binary data over a
> com port must be possible, it's just the books seem to approach it from
> the point of view of talking to headless server devices and the like.
>
> The options I have come up with so far would be:
>
> c_iflag : IGNBRK
> ~ISTRIP
> ~INLCR
> ~IGNCR
> ~ICRNL
>
> c_oflag : OPOST
> ~ONOCR
> ~OCRNL
> ~ONLRET
>
> c_cflag : CLOCAL
> CS8 8 bit
> ~CSTOPB
> ~HUCPL
>
> Do I need ALL of these constants in termios or am I going about it all
> wrong?
>
> Thanks for any help,
>
> Jeremy
The last time I had to futz with this, which was only a month ago, the least
painful solution was as follows:
stty --file /dev/ttyS0 raw
open the device and do a tcgetattr
Look at the whole structure (dump it with printfs).
Duplicate the structure in C code and do a tcsetattr with it.
--
Bryan Hackney / BHC / [EMAIL PROTECTED]
http://www.FreeClassAds.com/
http://bhconsult.com/
http://bhconsult.com/bh/pgp.key
------------------------------
From: Chan Chi Lung <[EMAIL PROTECTED]>
Subject: Re: help in writing device drivers
Date: 30 Jun 2000 02:47:55 GMT
http://howto.tucows.com/LDP/LDP/lkmpg/node1.html
http://howto.tucows.com/otherhowto/mini/IO-Port-Programming
http://howto.tucows.com/LDP/LDP/khg/HyperNews/get/devices/reference.html
http://khg.redhat.com/HyperNews/get/khg.html
Hope these helpful to you
[EMAIL PROTECTED] wrote:
> hi everyone
> i just started learning to write device drivers from
> Rubini's book.but the going is slightly slow
> Can anyone provide sources on net where introductions are provided
> thank u
> Sent via Deja.com http://www.deja.com/
> Before you buy.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Developing Device Drivers
Date: Fri, 30 Jun 2000 05:57:16 GMT
Martin Klingensmith <[EMAIL PROTECTED]> wrote:
: Hello everyone, I am interested in developing device drivers for linux, the
: only reference I have found is the O'Reilley book, is there any
: comprehensive online source for figuring out how to interface hardware to
: the kernel? Yes, I can browse the source with various online 'navigator'
: deals but I am looking for actual information on the subject.
Source code is always the best documentation.
Read Documentation/kernel-docs.txt in the kernel source tree for
references to many kernel-related documents.
--
Jeff Garzik |
Building 1024 | Make my funk the p-funk.
MandrakeSoft, Inc. |
------------------------------
From: [EMAIL PROTECTED] (Martin Kahlert)
Subject: Re: how to bulid .so object file?
Date: 30 Jun 2000 06:56:54 GMT
Reply-To: [EMAIL PROTECTED]
gcc -c -fPIC *.c
gcc -shared -o foo.so.1 -Wl,-soname,foo.so *.o
Hope that help,
Martin.
--
The early bird gets the worm. If you want something else for
breakfast, get up later.
------------------------------
From: [EMAIL PROTECTED] (Andrei Ivanov)
Crossposted-To: comp.unix.solaris,comp.os.linux.advocacy,alt.sys.sun
Subject: Q: ufs v. e2fs
Date: 30 Jun 2000 07:19:25 GMT
Can someone please point me at some web document(s) with
comparison of UFS file system of SunOS vs. Linux FS?
--
andrei
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: Good Basic compiler for linux?
Date: Fri, 30 Jun 2000 09:28:22 +0200
Alexander Viro wrote:
> Excuse me, what the fuck? You are saying "<something> is needed". Wonde=
rful,
> but what makes you think that you've got a right to demand something fr=
om
> anybody? You want it - _you_ go and do it. Or pay somebody for doing th=
e work.
> "For free" means "what _I_ want to do" and if you want something differ=
ent -
> you'd bloody better do it yourself, pay somebody for work or sod off.
Cool down. I always thought that at least Linux people were considerate
and didn't cry "murder" when someone suggested the Linux community were
to be split up in several units, one being responsible for the kernel,
one being responsible for the graphical i/f, one doing the compiler
B-{).
IIRC AndyD wrote:
> I manage a small team of VB programmers and I am looking for a Basic
> Compiler and IDE for Linux. I have seen Xbasic and some others but
> they are
> quite the quality I am looking for. I need a complete commercial
> package
> with available support. Anyone know of such a product?
This hardly looks like a "demand"!
<sarcasm>
Of course, if anyone suggests that Linux might probably need a feature
of Windoze, it's an insult to all Linux developers and the person who
dared to even keep the appropriate synapses connected for "Linux" and
"Windows" both at the same time should get himself a new brain! Windows
needs all features of Linux!
</sarcasm>
I won't even dare to try and think what would happen if a full-blown VB
compiler/interpreter were available for Linux. VB being the prominent
user-level programming language for Windows, a plethora of applications
would suddenly appear on the Linux desktop. The user doesn't want
"Linux", (s)he wants "applications".
My 2 (euro-)cents,
=
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
From: "Morten Liljeberg" <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel,alt.os.linux
Subject: Re: compiling 2.4-test2 kernel problem
Date: Fri, 30 Jun 2000 07:28:35 GMT
John Gluck <[EMAIL PROTECTED]> wrote:
> gcc: Internal compiler error: program cc1 got fatal signal 11
> gcc: Internal compiler error: program cc1 got fatal signal 11
Try to look at http://www.bitwizard.nl/sig11
------------------------------
Date: Fri, 30 Jun 2000 00:52:51 -0700
From: [EMAIL PROTECTED] (NotMe)
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Building Ksamba, version of libqt.so, etc
I have Mandrake v6.1 with libqt.so.1.44; when attempting to build
Ksamba the configure dies with the complaint that the version
of libqt is not at v2 or later.
So - what risk do I face building and installing libqt version
2.1.1 on a system which is quite happy with a libqt version 1.44?
I use KDE whici I assume uses libqt.
Looking through the tutorial with the libqt 2.1.1 indicated a few
differences, hard to tell however how serious.
Thanks for any advice, and all the best to one and all.
--
Jim Howe
I read the group but if you wish to send email, send to jjhowe
-at-
t e l e p o r t -dot- c o m
Thanks!
====== Posted via Newsfeeds.Com, Uncensored Usenet News ======
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
======= Over 80,000 Newsgroups = 16 Different Servers! ======
------------------------------
From: Maurizio Piana <[EMAIL PROTECTED]>
Subject: UDP: how to ..?
Date: 30 Jun 2000 08:14:35 GMT
... make a copy of UDP, that actually works in kernel mode, fully functionally
in user mode? I mean, for study project i have to make an application that uses
directly a copy of the UDP in kernel; this application [user mode] have to get some
input and have to produce an UDP packet; obviously after this step in user mode mine
UDP packet will be wrapped in another UDP packet [the one of the kernel mode] and sent
in the web. The application (obviously!) have to work also in the opposite direction,
i mean: the kernel unwrap the kernel-UDP packet and give to my application my
UDP-packet;
my application unwrap my UDP-packet and return the original input to the user.
In few words: i have to develop a superior level of UDP-wrapping that works in user
mode,
without modifying nothing in his internal structure [that will be another future
step!] and
without modifying any kernel component [i'm not so crazy!!]. My problem is that when
you
make a normal application that works with the web you have to use the socket; in the
socket
you specify what kind of service you desire [TCP or UDP]; you don't have to know
nothing about
TCP and UDP components: they are hidden under "socket" call. Where have i to start my
work?
I will study the files "socket.c" and "udp.c" and "udp.h", trying to understand how it
works,
but you could help me much more telling me something deeper on my problem.
Please excuse my English [i'm Italian].
Any help is welcome.
Many thanx to all you.
MAURIZIO
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: MBR
Date: Fri, 30 Jun 2000 10:42:38 +0200
Andre Gauthier wrote:
> =
> I was wondering if anybody knows where I can get some documentation to
> learn about MBR , and maybe even editing it.
> Just curious...
Quite a good description is in the LILO documentation.
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: linux programming help needed ......
Date: Fri, 30 Jun 2000 10:47:07 +0200
[EMAIL PROTECTED] wrote:
> =
> hello all,
> =
> I am developing a webmail system on linux. I need to add a user into th=
e
> system by cgi(written in GNU C), of course, I executed useradd program
> and passwd, the problem occurred when I tried to send the password to
> passwd using a pipe. my program goes like this
> =
> pipe_out =3D popen ("passwd username", "w");
> fprintf (pipe_out, "password\npassword\n");
> pclose(pipe_out);
> =
> but passwd said "conversation error". anoy way it doesn't work. So
> anyone know how to handle this kind of problem? or in an alternative
> way to work the task out.
Just an educated guess:
Since the passwd program will want to disable printing your password (in
case anyone is looking over your shoulders or happens to drop past while
the input is still visible on your screen), it needs to issue an ioctl
to the standard input. However, the pipe you open between your program
and the passwd program does not allow this.
Barring any other means to set the password, you can use pseudo ttys and
have passwd use the slave side.
-- =
Josef M=F6llers
Fujitsu Siemens Computers
SHV Server DS 1
------------------------------
From: "Jean-Claude MEILLAND" <[EMAIL PROTECTED]>
Subject: Too many Files Open Error on Redhat 6.2 Server
Date: Fri, 30 Jun 2000 09:53:36 GMT
Hello,
I have a Redhat 6.2 installed on as a server on a Athlon 700, 256 Mo RAM and
20 Go USCSI160.
When to many users are connected with to many applications opened I don't
have any problems with the system charge (It still goes very fast) but I get
a message To many files open each time I want to launch a new program. Does
someone know where I could set the MAX_SYSTEMNUMBER_OPEN_FILE or however
it's called ? Are there other parameters I have to modify and how to avoid
such problemes?
Thanks.
mailto:[EMAIL PROTECTED]
------------------------------
From: Aravind Sadagopan <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: Building Ksamba, version of libqt.so, etc
Date: Fri, 30 Jun 2000 05:58:16 +0800
Reply-To: [EMAIL PROTECTED]
NotMe wrote:
> I have Mandrake v6.1 with libqt.so.1.44; when attempting to build
> Ksamba the configure dies with the complaint that the version
> of libqt is not at v2 or later.
>
> So - what risk do I face building and installing libqt version
> 2.1.1 on a system which is quite happy with a libqt version 1.44?
> I use KDE whici I assume uses libqt.
>
> Looking through the tutorial with the libqt 2.1.1 indicated a few
> differences, hard to tell however how serious.
>
> Thanks for any advice, and all the best to one and all.
>
> --
> Jim Howe
> I read the group but if you wish to send email, send to jjhowe
> -at-
> t e l e p o r t -dot- c o m
> Thanks!
>
> -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
> http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
> -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Hi Jim,
This is no problem as qt1.44 and qt2.0 can coexist on the same
system.
I would advise you the following. Since your KDE and other programs use
qt1.44 keep that fixed
Get the qt2.0libraries to some directory and assume they are called
libqt2.so.1 in /usr/local/qt2 directory .
Get the source code for ksamba and build it with -L/usr/local/qt2. -lqt2
in gcc options . Should work fine
aravind
------------------------------
From: Tim Godfrey <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.networking,comp.os.linux.misc,comp.os.linux.development.apps
Subject: Linux Kernel IP Manipulation
Date: Fri, 30 Jun 2000 14:26:36 +1000
We are implementing a project that does not permit the use of a normal
linux network driver.
The configuration we want to implement is a user - server private IP
network that can communicate with the kernel and consequently the
outside world.
Does anyone know of an API that will allow us to do this?
Thanks in advance,
Tim Godfrey
dotWAP.com Inc
------------------------------
From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: Re: Good Basic compiler for linux?
Date: 30 Jun 2000 08:24:07 GMT
AndyD <[EMAIL PROTECTED]> wrote:
: The point I was trying to make is that Linux is increasing being seen as an
: alternative to Windows, yet there are gaps in the programs available.
Good.
: Visual Basic is used by a great number of IT departments to create a quick &
: dirty tool to do a job. As Linux does not have VB those departments keep on
: using Windows.
Personnally, I have found that Perl, if you take the quite steep
learning curve, as long as you use -w and use strict; makes an
excellent and quick-to-learn language.
And it can be interfaced to databases. And it's multiplateform. And it
has a huge collection of packages you can use in your own programs.
I don't know the proprietary software ``Visual Basic'' from the
software editor ``Microsoft'', but if it has anything to do with
standard BASIC (ie 10, 20, 30; PRINT; GOTO; GOSUB), then I
would strongly suggest against implementing anything new in that
language.
------------------------------
From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: Re: Raw disk access on Linux
Date: 30 Jun 2000 08:26:12 GMT
Christopher Browne <[EMAIL PROTECTED]> wrote:
: Stephen Tweedy apparently has a patch to allow creating accesses for
: block devices that _don't_ cache. You may want to look at one of the
I think this is now standard in 2.2.x (and if not, in 2.4.x). You need
a special program to create instances of raw devices (a bit like
loop devices for the file system mount).
E.g.
make_it_appear_raw /dev/raw0 /dev/hda
------------------------------
From: =?iso-8859-1?Q?S=E9bastien?= Cottalorda
Subject: Closing Socket
Date: Fri, 30 Jun 2000 13:35:17 +0200
Hi all,
I'm looking for a way to close a socket using a tool, a call system, a C
routine, ....
Here is my problem :
Some of my software let sometimes sockets in "CLOSE" mode, it's not
very important , but when I run again my software, It cannot use the
socket becaus ethe other party seem to wait something and don't close
his socket.
So I'd like to check if I've "CLOSED" socket before creating a new one.
And if so, close it or delete it.
Thanks in advance.
Sebastien
------------------------------
From: "Alberto" <[EMAIL PROTECTED]>
Subject: R: Bash Script Error Tolerant
Date: Fri, 30 Jun 2000 13:45:40 +0200
Kaz Kylheku <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]
> On Thu, 29 Jun 2000 19:26:16 +0200, Alberto <[EMAIL PROTECTED]>
wrote:
> >Hi Guys!
> >
> >I've got a question about Bash Scripts.
> >I would like to know whether it is possible to set Linux in such a way it
> >won't stop when a syntax error occurs in a script. The ideal behaviour
for
> >the application I've in mind would require Linux just ingnoring the wrong
> >instruction (whatever type of, flow control included) and continuing the
> >execution of the script from the next instruction.
> >Does anyone of you how to do it?
>
> The way you do might do this is to put the suspicious script into its own
> file. Then you detect the failed or abnormal termination of that script
> in a higher level script.
>
I didn't really get the point since I'm a novice programmer under Linux.
What do you mean when you say "to put the script into its own file"?
Do you think that with the method you suggest I could resume the script from
the very next instruction after the wrong instruction?
When I first wrote I was thinking about setting a "special environmental
variable" or deactivating a trap concerning script errors or something like
that...
Do you know whether such variables or traps do exist?
Thank you,
Alberto.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Good Basic compiler for linux?
Date: Fri, 30 Jun 2000 12:41:28 GMT
Marc SCHAEFER <[EMAIL PROTECTED]> wrote:
> I don't know the proprietary software ``Visual Basic'' from the
> software editor ``Microsoft'', but if it has anything to do with
> standard BASIC (ie 10, 20, 30; PRINT; GOTO; GOSUB), then I
> would strongly suggest against implementing anything new in that
> language.
Actually, it doesn't. One of VB's strengths is the huge selection of
third-party objects available. The closest analog you'll find on other
systems are Java Beans. Unfortunatly, the current visual java builders
are quite a bit behind VB right now, and the market for Java Beans
hasn't exploded _yet_.
Before this adds to the language flamewars, let me point out to people
that don't know, that Java Beans are intended for use in visual
building tools. That is, rather than writing code, you open a dialog
box and check off properties from a list. Whatever your personal
feelings about this approach to software development are, it's
somewhat unfair to compare it to unsimilar mechanisms in other
languages.
--
Matt Gauthier <[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
******************************