Linux-Development-Sys Digest #205, Volume #7     Fri, 17 Sep 99 23:14:11 EDT

Contents:
  Re: How to get mylib.so from mylib.a ? ("T.E.Dickey")
  Re: Machine won't utilize swap space ("Drydd")
  Looking for a project ("Rishabh Tandon")
  Re: Stdio.h (Erik de Castro Lopo)
  Re: Looking for a project ("Prasad Boddupalli")
  Re: Booting Linux on Sparc Classic using Null-Modem Connection for Console. ("Ross 
Crawford")
  Re: Adding swap space to drive with data... easy? (Paul Hovnanian)
  Re: Figure Out The MS Source Code Yourself (Fogbank)
  Re: No setup signature found? ([EMAIL PROTECTED])
  kernel calls (Frederic Cazenave)
  What are "do { something } while(0) #defines for??? (ULISES ALONSO CAMARO)
  trying to understand a piece of kernel source... (ULISES ALONSO CAMARO)
  overcommit_memory speeds up??? (ULISES ALONSO CAMARO)
  Using kerneld for demand loading a device driver? (W. Tucker)
  Heads up: Mandrake Linux, bad compiler. (mlw)
  beginning unix programmer, please help ("isaac1")
  Re: write / writev guaranteed autonomous? (Mario Klebsch)

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

From: "T.E.Dickey" <[EMAIL PROTECTED]>
Subject: Re: How to get mylib.so from mylib.a ?
Date: Fri, 17 Sep 1999 16:35:22 GMT

Carsten Prinz <[EMAIL PROTECTED]> wrote:
> Carlos Daniel Orden wrote:
>>   I'll thank you if you can tell me how to create mylib.so from mylib.a

> I think you can't do that from the .a file,
> as far as I know you have to recompile all files with 
> specific code generation flags (see -fpic/-fPIC options in the gcc info)
> If you use automake / autoconf the easiest way to create a 
> shared library is to use the 'libtool' package.

You can still make a static library from objects compiled with -fpic;
it's just less efficient.

-- 
Thomas E. Dickey
[EMAIL PROTECTED]
http://www.clark.net/pub/dickey

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

From: "Drydd" <someone@special>
Crossposted-To: comp.os.linux.misc
Subject: Re: Machine won't utilize swap space
Date: Fri, 17 Sep 1999 13:28:43 -0400

    Odd, and you're sure you did: swapon /dev/hd(sd)xy? Where x is the drive
designation and y is the partion #? Swapon doesn't work by itself:)
Wallace Barnes <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I have PII 233Mhz system (multiple SCSI / IDE drives, 98MB RAM) running
> Slackware kernel 2.0.36. I've allocated a 120MB partition to as swap and
> have it automatically utilized a system bootup via the /etc/fstab entry.
> When my system gets tearing, it can really eat into the system memory.
> Sometimes it freeze or start running slowly because it never utilizes
> the swap space when it's used up the free memory. when I type the "free"
> command, it shows the though memory is used up and still the swap space
> ( which regesters in the output of that same command ) nevers gets used.
> I utilized partitions on other drives, to ensure that the first was not
> bad, to no avail. Is there anything special I need to do get the swap to
> be utilized once physical memory is used up ? I've tried manually
> running the swapon/off commands also to no avail. Has anyone run into
> this ? If so, how did you fix it ? Thanks.
>
> -Wally
> [EMAIL PROTECTED]
>
>



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

From: "Rishabh Tandon" <[EMAIL PROTECTED]>
Subject: Looking for a project
Date: Sat, 18 Sep 1999 01:27:54 +0530

guys I'm looking for an undergrad project in linux. If u have anything in
mind please let me know.



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

From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: Stdio.h
Date: Sat, 18 Sep 1999 06:40:04 +1000

Eddy wrote:
> 
> Does anyone know what is the exact path of stdio.h in linux system?

/usr/include/stdio.h

-- 
+-------------------------------------------------+
     Erik de Castro Lopo     [EMAIL PROTECTED]
+-------------------------------------------------+
Microsoft : Yesterday's software running on today's
hardware tomorrow.

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

From: "Prasad Boddupalli" <[EMAIL PROTECTED]>
Subject: Re: Looking for a project
Date: Fri, 17 Sep 1999 15:44:21 -0500

You might want to write a small experimental operating system. One such is
Nachos. Look at the site
www.cs.berkeley.edu/~tea/nachos/

Good luck,
Prasad.

Rishabh Tandon <[EMAIL PROTECTED]> wrote in message
news:7rvakj$8n2$[EMAIL PROTECTED]...
> guys I'm looking for an undergrad project in linux. If u have anything in
> mind please let me know.
>
>



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

From: "Ross Crawford" <[EMAIL PROTECTED]>
Subject: Re: Booting Linux on Sparc Classic using Null-Modem Connection for Console.
Date: Fri, 17 Sep 1999 09:22:09 +1000


Paul J Collins <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> >>>>> "David" == David Wragg <[EMAIL PROTECTED]> writes:
>
> --snip--
>     David> can telnet into it, but since a telnet login won't accept
>     David> root you are stuck.
> --snip--
>
> You can telnet in as a normal user and use "su -" to become root,
> environment and all.
>
> Paul.
>

After initial installation there are no "normal" users......

ROSCO



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

Crossposted-To: comp.os.linux.misc,alt.os.linux,comp.os.linux.setup
From: Paul Hovnanian <[EMAIL PROTECTED]>
Subject: Re: Adding swap space to drive with data... easy?
Date: Fri, 17 Sep 1999 21:06:44 GMT

Mark D'Ascenzo wrote:
> 
[snip]

Maybe problems, maybe not. Here's what I think might bite you:
> 
> Here is my current setup:
> 
> Device Boot    Start      End   Blocks   Id  System
> /dev/hda1             1      131  1052226    b  Win95 FAT32

You want to convert the above 'wasted space' into linux swap & native. Thats
OK.

> /dev/hda2           132     1232  8843782+   5  Extended

Your extended partition (above) encloses your linux partitions:

> /dev/hda5           132      144   104391   83  Linux native
> /dev/hda6           145      863  5775336   83  Linux native
> /dev/hda7           864     1080  1743021   83  Linux native
> /dev/hda8          1081     1170   722893+  83  Linux native
> /dev/hda9          1171     1190   160618+  83  Linux native
> /dev/hda10         1191     1206   128488+  82  Linux swap
> /dev/hda11         1207     1219   104391   83  Linux native
> /dev/hda12         1220     1232   104391   83  Linux native
> 
>  I want to create something like this:
> 
> Device Boot    Start      End   Blocks   Id  System
> /dev/hda1             1     1232  8843782+   5  Extended      <----- note change

However, here (above) you are re-organizing the extended partition to include
existing linux partitions:


> /dev/hda2             1       15   128488   82  Linux swap    <----- note change
> /dev/hda13           16       31   128488   82  Linux swap    <----- note change
> /dev/hda14           32      131   722893   83  Linux native  <----- note change
> /dev/hda5           132      144   104391   83  Linux native
> /dev/hda6           145      863  5775336   83  Linux native
> /dev/hda7           864     1080  1743021   83  Linux native
> /dev/hda8          1081     1170   722893+  83  Linux native
> /dev/hda9          1171     1190   160618+  83  Linux native
> /dev/hda10         1191     1206   128488+  82  Linux swap
> /dev/hda11         1207     1219   104391   83  Linux native
> /dev/hda12         1220     1232   104391   83  Linux native
I get nervous whenever I have to juggle partition tables around. I'm not sure
what happens to the partitions within the Extended section if you change it but
I wouldn't want to be the guinea-pig for that test.

I would leave the extended partition as-is and and make one native partition out of
the old FAT32. This would not risk bumping any partition numbers around or changing
the partition table entries associated with the extended partition. Then, copy
one (or more) of your exisiting native partition contents into this new space.
Finally, re-mount and/or link your file system and then convert the newly freed
partitions into swap space. No table changes (other than type) and less risk of
a mess. Don't forget to re-run lilo if you mess with anything that might have
a boot record. 
 
-- 
Paul Hovnanian         | (here)  mailto:[EMAIL PROTECTED]
Software Conflagration | (there) mailto:[EMAIL PROTECTED] 
Control                | (spam)  mailto:[EMAIL PROTECTED]
=======================+=============================================
A limerick packs laughs anatomical
Into space that is quite economical.
        But the good ones I've seen
        So seldom are clean,
And the clean ones so seldom are comical.

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

From: [EMAIL PROTECTED] (Fogbank)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Figure Out The MS Source Code Yourself
Date: Fri, 17 Sep 1999 23:37:27 GMT

On 14 Sep 1999 00:55:31 GMT, [EMAIL PROTECTED] (Grahame M.
Kelly) wrote:

>Well, you could migrate to Australia where a federal law was
>passed a couple of weeks ago allowing "reverse engineering" for
>maintenace, development of product compatablilty / interopabilty, 
>and general educational uses.

The last time I checked (i.e. two or three years ago) Europe had a
similar law which allowed reverse engineering AND modifications for
interoperability purposes (at least).


    Ciao,
      Foggy      (foggy(at)flashnet.it)

=====BEGIN GEEK CODE BLOCK=====
GCS/>CM/>SS d-@ s-:-- a25 C++(++++)>$ ULS>++++ P+ L+>+++ E- W(--) N++(+++)
o K w(--) O M- V? P+(+++) PE(-) Y+ PGP t+@ 5 X+ R*(+) tv- b++ DI+>+++ D+
G e>+++ h!>- r*() y+*
=====END GEEK CODE BLOCK=====


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

From: [EMAIL PROTECTED] 
Subject: Re: No setup signature found?
Reply-To: [EMAIL PROTECTED]
Date: 17 Sep 1999 22:52:44 GMT

Julius Longauer <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] schrieb:
>> 

>What is the size of the non booting kernel?

-rw-r--r--   1 root     root       683419 Sep 15 19:46 vmlinuz
-rw-r--r--   1 root     root       622495 Sep 15 19:43 vmlinuz-2.2.9
-rw-r--r--   1 root     root       683419 Sep 15 19:56 vmlinuz-2.3.18
-rw-r--r--   1 root     root       622495 Aug 24 20:11 vmlinuz.old

Hmmm. It is bigger than 2.2.9. But why would booting from floppy
work?


-- 
Fred

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

From: Frederic Cazenave <[EMAIL PROTECTED]>
Subject: kernel calls
Date: Fri, 17 Sep 1999 16:11:28 GMT

Hi,

I'm looking on the web for a description of the
kernel (system) calls of linux. Something like
a tutorial of all the functions included in the
man9.
Is there also a good book ?

Thanks in advance

Fred 
-- 
 _________________________________________________________
|                                                          |
|               Frederic CAZENAVE                          |
|    _/\_  /^=  McGill Radar                               |
| \_/    \//    Box 198, MacDonald College                 |
|   | /-\ |     Ste Anne de Bellevue                       |
|   ||   ||     Quebec, Canada   H9X 3V9                   |
|               Tel (514) 398 7733 fax (514) 398 7755      |
|               mailto:[EMAIL PROTECTED]       |
|               http://www.mpl.orstom.fr/hydrologie/catch/ |
|__________________________________________________________|

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

From: ULISES ALONSO CAMARO <[EMAIL PROTECTED]>
Subject: What are "do { something } while(0) #defines for???
Date: Thu, 16 Sep 1999 16:16:50 +0100


Hi all,

This defines appears in many headers of the kernel source, why are
declared in this way???

Please CC: your comments to [EMAIL PROTECTED]

Thanks in advance,

                Ulisses
============================================================================
        Debian/GNU Linux: a dream come true     http://www.debian.org



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

From: ULISES ALONSO CAMARO <[EMAIL PROTECTED]>
Subject: trying to understand a piece of kernel source...
Date: Thu, 16 Sep 1999 16:16:56 +0100

Hi all

static void __wait_on_dquot(struct dquot *dquot)
{
        struct wait_queue wait = { current, NULL };
        add_wait_queue(&dquot->dq_wait, &wait);
repeat:
        current->state = TASK_UNINTERRUPTIBLE;
        if (dquot->dq_flags & DQ_LOCKED) {
                schedule();
                goto repeat;
        }
        remove_wait_queue(&dquot->dq_wait, &wait);
        current->state = TASK_RUNNING;
}
============================================================================
        Debian/GNU Linux: a dream come true     http://www.debian.org



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

From: ULISES ALONSO CAMARO <[EMAIL PROTECTED]>
Subject: overcommit_memory speeds up???
Date: Thu, 16 Sep 1999 16:16:27 +0100


Hi all,

I have been looking in the kernel source and kernel docs for this feature... 

I think this feature doesn't speeds up performance and it only makes 
the system believe It always will have enough memory wich should 
be useful in some cases I'm not aware of (Any ideas?) because this
feature is just tested by vm_enough_memory() in mm/mmap.c and it always has
a constant overhead.

Does am I right??

Any comment will be greatly appreciated 
(please send me a CC: to [EMAIL PROTECTED])

Thanks in advance

                        Ulisses

============================================================================
        Debian/GNU Linux: a dream come true     http://www.debian.org



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

From: [EMAIL PROTECTED] (W. Tucker)
Subject: Using kerneld for demand loading a device driver?
Date: 18 Sep 1999 01:20:48 GMT

I have written a device driver for a data acquisition board and have
a question about loading it on demand rather than manually as I do
now.  I am using the 2.0.36 kernel and the 2.1.85-9 modutils which
are included in the Red Hat 5.2 distribution. 

Currently, I run an install script as root which uses insmod to load
the driver.  This causes the driver's init_module function to run
which reserves IO ports and registers it as a character device with a
dynamic major number.  Next, the install script calls mknod to
associate that major number with a /dev file.  Finally, user programs
use the open, ioctl, and close functions to access the device via
that /dev file.

Because the driver uses both memory and IO ports, I would like to
enable it at boot time but not actually have it load until a user
wants to begin acquisition.  From things I've read, it seems like
kerneld with its autoclean feature could provide this behavior.  But
I am confused about how to use it.

What actions cause the kernel to send a load module request to
kerneld?  Is it possible for a user program without root privileges
to do any of them?  Should I give up on kerneld and instead try to
restructure my driver so it doesn't reserve the memory and IO ports
when it is loaded?  

Any explanations or suggestions will be greatly appreciated.  Thanks.

Wendy Tucker
Symmetric Research
[EMAIL PROTECTED]



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

From: mlw <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
Subject: Heads up: Mandrake Linux, bad compiler.
Date: Sat, 18 Sep 1999 01:47:30 +0000

Just as a heads up for anyone that is interested.

The C/C++ compiler that comes with Mandrake 6.0 does not build XFree
correctly. And it fails in the oddest way.

If you build XFree86 3.3.5 (and both 3.3.4 and 3.3.3) and install it.
The standard X apps seem to work OK. The instant you run a kde app, the
X session gets nuked to a black screen and hangs. You can switch to a
different vconsole and most of the time you can kill it with a -9.

To make a long story short, I removed Mandrake's pgcc and installed
RedHat's build of egcs, rebuilt the code, and had no problems.

Has anyone else seen this problem. I sure hope I am not the only one.

-- 
Mohawk Software
Windows 95, Windows NT, UNIX, Linux. Applications, drivers, support. 
Visit http://www.mohawksoft.com

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

From: "isaac1" <[EMAIL PROTECTED]>
Subject: beginning unix programmer, please help
Date: Sat, 18 Sep 1999 02:30:57 GMT

hi,
    i just started reading adv. programming int the unix enviorment and am
trying to compilie some of the examples but am having troubles. im using
suse6.1 linux w/ gcc i typed in the following (straight fromt the book)

  #include <sys/types.h>
#include <dirent.h>
#include "ourhdr.h"

int main(int argc, char *argv[])
{
DIR  *dp;
struct dirent *dirp;

if(argc != 2)
 err_quit("a single argument (the directory name) is required!");
if((dp = opendir(argv[1])) == NULL)
 err_sys("can't open %s", argv[1]);

while((dirp = readdir(dp)) != NULL)
 printf("%s\n", dirp->d_name);

closedir(dp);

exit(0);

}

/w the header:

/* Our own header, to be included *after* all standard system headers */

#ifndef __ourhdr_h
#define __ourhdr_h

#include <sys/types.h> /* required for some of our prototypes */
#include <stdio.h>  /* for convenience */
#include <stdlib.h>  /* for convenience */
#include <string.h>  /* for convenience */
#include <unistd.h>  /* for convenience */

#define MAXLINE 4096   /* max line length */

#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
     /* default file access permissions for new files */
#define DIR_MODE (FILE_MODE | S_IXUSR | S_IXGRP | S_IXOTH)
     /* default permissions for new directories */

typedef void Sigfunc(int); /* for signal handlers */

     /* 4.3BSD Reno <signal.h> doesn't define SIG_ERR */
#if defined(SIG_IGN) && !defined(SIG_ERR)
#define SIG_ERR ((Sigfunc *)-1)
#endif

#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))

     /* prototypes for our own functions */
char *path_alloc(int *);   /* {Prog pathalloc} */
int   open_max(void);   /* {Prog openmax} */
void  clr_fl(int, int);   /* {Prog setfl} */
void  set_fl(int, int);   /* {Prog setfl} */
void  pr_exit(int);    /* {Prog prexit} */
void  pr_mask(const char *);  /* {Prog prmask} */
Sigfunc *signal_intr(int, Sigfunc *);/* {Prog signal_intr_function} */

int   tty_cbreak(int);   /* {Prog raw} */
int   tty_raw(int);    /* {Prog raw} */
int   tty_reset(int);   /* {Prog raw} */
void  tty_atexit(void);   /* {Prog raw} */
#ifdef ECHO /* only if <termios.h> has been included */
struct termios *tty_termios(void); /* {Prog raw} */
#endif

void  sleep_us(unsigned int); /* {Ex sleepus} */
ssize_t  readn(int, void *, size_t);/* {Prog readn} */
ssize_t  writen(int, const void *, size_t);/* {Prog writen} */
int   daemon_init(void);   /* {Prog daemoninit} */

int   s_pipe(int *);    /* {Progs svr4_spipe bsd_spipe} */
int   recv_fd(int, ssize_t (*func)(int, const void *, size_t));
         /* {Progs recvfd_svr4 recvfd_43bsd} */
int   send_fd(int, int);   /* {Progs sendfd_svr4 sendfd_43bsd} */
int   send_err(int, int, const char *);/* {Prog senderr} */
int   serv_listen(const char *); /* {Progs servlisten_svr4 servlisten_44bsd}
*/
int   serv_accept(int, uid_t *); /* {Progs servaccept_svr4 servaccept_44bsd}
*/
int   cli_conn(const char *); /* {Progs cliconn_svr4 cliconn_44bsd} */
int   buf_args(char *, int (*func)(int, char **));
         /* {Prog bufargs} */

int   ptym_open(char *);   /* {Progs ptyopen_svr4 ptyopen_44bsd} */
int   ptys_open(int, char *); /* {Progs ptyopen_svr4 ptyopen_44bsd} */
#ifdef TIOCGWINSZ
pid_t  pty_fork(int *, char *, const struct termios *,
      const struct winsize *); /* {Prog ptyfork} */
#endif

int  lock_reg(int, int, int, off_t, int, off_t);
         /* {Prog lockreg} */
#define read_lock(fd, offset, whence, len) \
   lock_reg(fd, F_SETLK, F_RDLCK, offset, whence, len)
#define readw_lock(fd, offset, whence, len) \
   lock_reg(fd, F_SETLKW, F_RDLCK, offset, whence, len)
#define write_lock(fd, offset, whence, len) \
   lock_reg(fd, F_SETLK, F_WRLCK, offset, whence, len)
#define writew_lock(fd, offset, whence, len) \
   lock_reg(fd, F_SETLKW, F_WRLCK, offset, whence, len)
#define un_lock(fd, offset, whence, len) \
   lock_reg(fd, F_SETLK, F_UNLCK, offset, whence, len)

pid_t lock_test(int, int, off_t, int, off_t);
         /* {Prog locktest} */

#define is_readlock(fd, offset, whence, len) \
   lock_test(fd, F_RDLCK, offset, whence, len)
#define is_writelock(fd, offset, whence, len) \
   lock_test(fd, F_WRLCK, offset, whence, len)

void err_dump(const char *, ...); /* {App misc_source} */
void err_msg(const char *, ...);
void err_quit(const char *, ...);
void err_ret(const char *, ...);
void err_sys(const char *, ...);

void log_msg(const char *, ...);  /* {App misc_source} */
void log_open(const char *, int, int);
void log_quit(const char *, ...);
void log_ret(const char *, ...);
void log_sys(const char *, ...);

void TELL_WAIT(void);  /* parent/child from {Sec race_conditions} */
void TELL_PARENT(pid_t);
void TELL_CHILD(pid_t);
void WAIT_PARENT(void);
void WAIT_CHILD(void);

#endif /* __ourhdr_h */

i downloaded the header from ftp site stated in the book. anwya the errors i
get are:

/tmp/ccPamEpP.o: in function 'main':
/tmp/ccPamEpP.o: (.text+0x12): undefined refrence to 'err_quit'
/tmp/ccPamEpP.o: (.text+0x44):undefined refrence to  'err_sys'
collect2: ld returned 1 exit status

is there another linux header i need to include?

thanks,
isaac



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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: write / writev guaranteed autonomous?
Date: Fri, 17 Sep 1999 20:25:58 +0200

David Schwartz <[EMAIL PROTECTED]> writes:

>       2) Make a process unkillable until it completes a write call,
>regardless of how long that might take. So my process will continue to
>write another 128Mb before it gets stopped.

That is especially interesting when the process gets killed by SIGSEGV
because it did pass the wrong buffer to the system call. :-)

73, Mario
-- 
Mario Klebsch                                           [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