Linux-Development-Sys Digest #770, Volume #8      Mon, 4 Jun 01 02:13:09 EDT

Contents:
  Re: fast disk writes (Kai Henningsen)
  memory usage info (Zhiyong Xu)
  How to access argc,argv,envp without glibc (Eric Buddington)
  Re: Linux IO scalability (Erik de Castro Lopo)
  Re: How to access argc,argv,envp without glibc (John Reiser)
  Re: How to access argc,argv,envp without glibc (Pete Zaitcev)
  There's a bug in dump-0.4b22, dump-0.4b21 works though! (Anonymous)
  Re: ext2 performance with large directories (Linus Torvalds)
  problem with compiling as a module (Srinivas Vedula)
  Re: How to access argc,argv,envp without glibc (cLIeNUX user)

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

Date: 03 Jun 2001 21:07:00 +0200
From: [EMAIL PROTECTED] (Kai Henningsen)
Subject: Re: fast disk writes

$}xinix{$@esperi.demon.co.uk (Nix)  wrote on 03.06.01 in 
<[EMAIL PROTECTED]>:

> On 03 Jun 2001, Kai Henningsen stipulated:
> > [1] Getting Win32 to create a link is ... interesting. But possible (see,
>
> s/interesting/insane/
>
> (I mean, the backup API? What *were* they *thinking*?)

Probably that no normal Win32 program would do that, but that backup  
programs needed to handle files created by the POSIX subsystem.

The second half of the sentence is correct.

The first is debatable.

Kai
-- 
http://www.westfalen.de/private/khms/
"... by God I *KNOW* what this network is for, and you can't have it."
  - Russ Allbery ([EMAIL PROTECTED])

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

From: Zhiyong Xu <[EMAIL PROTECTED]>
Subject: memory usage info
Date: Sun, 03 Jun 2001 17:06:23 -0400

Hi,
            I  doing some research on linux kernel, I modified some of
buffer cache system. But it seems some problem occurs , I want to know
how can I get info of current memory usage and display? It seems
I consumed all memory and no process so how can I know current memory
condition?



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

From: [EMAIL PROTECTED] (Eric Buddington)
Subject: How to access argc,argv,envp without glibc
Date: Sun, 03 Jun 2001 21:53:32 GMT

I am trying to write minimalist programs for use on
boot floppies. I have found that by stealing the assembler
syscall macros from glibc, I can write miniscule (about 2k)
and functional programs to do the basics of mount, swapon,
execve, all that.

I can't, however, figure out how to access command-line
arguments or environment without using glibc (which is a beast)
Can someone point me to the relevant sources in glibc or gcc?

(ObDisclaimer: yes, I know this will not be portable)

-Eric
[EMAIL PROTECTED]



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

Date: Mon, 04 Jun 2001 07:55:00 +1000
From: Erik de Castro Lopo <[EMAIL PROTECTED]>
Subject: Re: Linux IO scalability

"Shirish" <[EMAIL PROTECTED]> writes:

> Does Linux have an IO scalability issue. We here have 25 drives
> attached to a server with two fibre controller cards. The max
> thruput we can arrive at is around 40MB/s, thats like 5% PCI
> efficiency. If I have the same configuration under windows, I can
> easily do 250~300MB/s using the same HW configuration. Any clues!!

What are you doing to get the data, read () or mmap ()?

A read () call has at minimum 1 data copy. When you issue the read(),
the data is read into the file buffer and from there it is copied
into you user space program.

Using mmap () means that you bypass the copy and recieve a pointer
directly into the file buffer. This can drastically speed up disk
bound programs.

Using mmap () I was able to go from 15 Mbytes/sec to 37Mbytes a second
from a single LVD SCSI drive with almost no processor load. This was as 
fast as that particular drice was able to go.

Hope this helps,
Erik

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

From: John Reiser <[EMAIL PROTECTED]>
Subject: Re: How to access argc,argv,envp without glibc
Date: Sun, 03 Jun 2001 16:54:20 -0700

> I can't, however, figure out how to access command-line
> arguments or environment without using glibc (which is a beast)
> Can someone point me to the relevant sources in glibc or gcc?

glibc-2.2.3/sysdeps/i386/elf/start.S  # for example
glibc-2.2.3/sysdeps/generic/libc-start.c

-- 
John Reiser, [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: How to access argc,argv,envp without glibc
Date: 4 Jun 2001 02:30:29 GMT

>[...]
> I can't, however, figure out how to access command-line
> arguments or environment without using glibc (which is a beast)
> Can someone point me to the relevant sources in glibc or gcc?
> 
> -Eric
> [EMAIL PROTECTED]

Try to google for SV ABI on x86... Tracking through glibc
is pretty tedious.

-- Pete

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

Date: Mon, 04 Jun 2001 00:37:57 -0400
Subject: There's a bug in dump-0.4b22, dump-0.4b21 works though!
From: Anonymous <[EMAIL PROTECTED]>

Warning:
  I'm using RedHat 7.1 and I encountered
  a very serious bug in dump-0.4b22 that
  causes it to loop forever!

  Be very careful if you're using dump-0.4b22
  to perform backups on critical data!

The test cases are shown below.  Note that
dump-0.4b22.log continues forever until
disk space is exhausted!

::::::::::::::
dump-0.4b21.log
::::::::::::::
backup-poweroff: Started Mon Jun  4 00:24:44 EDT 2001
 
wake: Sending WOL packet to eth0 00:20:78:1D:49:9D (celeron600-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:20:78:1D:49:9D (celeron600-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth0 00:03:6D:00:2C:5F (celeron700-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:03:6D:00:2C:5F (celeron700-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth0 00:03:6D:00:62:EA (celeron700-1.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:03:6D:00:62:EA (celeron700-1.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth0 00:03:6D:00:71:F6 (celeron700-2.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:03:6D:00:71:F6 (celeron700-2.xxxxxxxxx-pn.com)
backup-poweroff: Mon Jun  4 00:24:46 EDT 2001: starting wait for wake
backup-poweroff: Mon Jun  4 00:24:46 EDT 2001: hostcount=      3
backup-poweroff: Mon Jun  4 00:24:48 EDT 2001: counter=3
backup-poweroff: Mon Jun  4 00:24:48 EDT 2001: finished wait for wake
backup-network: running backup-network(7472) in background
backup-network: Started Mon Jun 4 00:24:48 EDT 2001

backup-hosts --time=epoch --source=c600 --target=c700-0 2>&1 | tee c600-c700-0.log
backup-hosts: running backup-hosts(7502) in background
backup-hosts: Started Mon Jun 4 00:24:48 EDT 2001

+ ssh c600 export PATH=/auto/insecure/bin:/bin:/sbin:/usr/bin:/usr/sbin ';' export 
+monitor_logdir=/auto/log/backup-hosts/. ';' backup-remote-dump 
+--dumpdir=/auto/backup-c700-0/dump --time==epoch
7523: old priority 0, new priority 15
backup-remote-dump: running backup-remote-dump(7549) in background
backup-remote-dump: Started Mon Jun 4 00:24:49 EDT 2001

+ sh -c '/auto/sw/dump/symlinks/dump-0.4b21/sbin/dump -T "Wed Dec 31 19:00:00 1969" -B 
+1500000 -M -f 
+/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-24-49--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump
+ /'
DUMP: Date of this level 0 dump: Mon Jun 4 00:24:49 2001
DUMP: Date of last level ? dump: the epoch
DUMP: Dumping /dev/hda1 (/) to 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-24-49--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump001
DUMP: Label: /
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 318616 tape blocks on 0.21 tape(s).
DUMP: Dumping volume 1 on 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-24-49--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump001
DUMP: Volume 1 started at: Mon Jun 4 00:24:53 2001
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: Closing 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-24-49--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump001
DUMP: Volume 1 completed at: Mon Jun 4 00:27:17 2001
DUMP: Volume 1 took 0:02:24
DUMP: Volume 1 transfer rate: 2264 KB/s
DUMP: 326023 tape blocks (318.38MB) on 1 volume(s)
DUMP: finished in 144 seconds, throughput 2264 KBytes/sec
DUMP: Date of this level 0 dump: Mon Jun 4 00:24:49 2001
DUMP: Date this dump completed: Mon Jun 4 00:27:17 2001
DUMP: Average transfer rate: 2264 KB/s
DUMP: DUMP IS DONE
+ '[' 0 -ne 0 ']'
+ set +x
+ sh -c '/auto/sw/dump/symlinks/dump-0.4b21/sbin/dump -T "Wed Dec 31 19:00:00 1969" -B 
+1500000 -M -f 
+/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-24-49--0400/celeron600-0.xxxxxxxxx-pn.com/auto-local.dump
+ /auto-local'
DUMP: Date of this level 0 dump: Mon Jun 4 00:27:17 2001
DUMP: Date of last level ? dump: the epoch
DUMP: Dumping /dev/hdd3 (/auto-local) to 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-24-49--0400/celeron600-0.xxxxxxxxx-pn.com/auto-local.dump001
DUMP: Label: /auto-local
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 5449751 tape blocks on 3.63 tape(s).
DUMP: Dumping volume 1 on 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-24-49--0400/celeron600-0.xxxxxxxxx-pn.com/auto-local.dump001
DUMP: Volume 1 started at: Mon Jun 4 00:27:54 2001
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
::::::::::::::
dump-0.4b22.log
::::::::::::::
backup-poweroff: Started Mon Jun  4 00:05:00 EDT 2001
 
wake: Sending WOL packet to eth0 00:20:78:1D:49:9D (celeron600-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:20:78:1D:49:9D (celeron600-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth0 00:03:6D:00:2C:5F (celeron700-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:03:6D:00:2C:5F (celeron700-0.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth0 00:03:6D:00:62:EA (celeron700-1.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:03:6D:00:62:EA (celeron700-1.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth0 00:03:6D:00:71:F6 (celeron700-2.xxxxxxxxx-pn.com)
wake: Sending WOL packet to eth1 00:03:6D:00:71:F6 (celeron700-2.xxxxxxxxx-pn.com)
backup-poweroff: Mon Jun  4 00:05:02 EDT 2001: starting wait for wake
backup-poweroff: Mon Jun  4 00:05:02 EDT 2001: hostcount=      3
backup-poweroff: Mon Jun  4 00:05:49 EDT 2001: counter=0
backup-poweroff: Mon Jun  4 00:06:19 EDT 2001: counter=0
backup-poweroff: Mon Jun  4 00:06:36 EDT 2001: counter=2
backup-poweroff: Mon Jun  4 00:06:53 EDT 2001: counter=2
backup-poweroff: Mon Jun  4 00:07:08 EDT 2001: counter=2
backup-poweroff: Mon Jun  4 00:07:24 EDT 2001: counter=2
backup-poweroff: Mon Jun  4 00:07:29 EDT 2001: counter=2
backup-poweroff: Mon Jun  4 00:07:33 EDT 2001: counter=3
backup-poweroff: Mon Jun  4 00:07:33 EDT 2001: finished wait for wake
backup-network: running backup-network(3170) in background
backup-network: Started Mon Jun 4 00:07:33 EDT 2001

backup-hosts --time=epoch --source=c600 --target=c700-0 2>&1 | tee c600-c700-0.log
backup-hosts: running backup-hosts(3200) in background
backup-hosts: Started Mon Jun 4 00:07:33 EDT 2001

+ ssh c600 export PATH=/auto/insecure/bin:/bin:/sbin:/usr/bin:/usr/sbin ';' export 
+monitor_logdir=/auto/log/backup-hosts/. ';' backup-remote-dump 
+--dumpdir=/auto/backup-c700-0/dump --time==epoch
3222: old priority 0, new priority 15
backup-remote-dump: running backup-remote-dump(3254) in background
backup-remote-dump: Started Mon Jun 4 00:07:35 EDT 2001

+ sh -c '/auto/sw/dump/symlinks/dump-0.4b22/sbin/dump -T "Wed Dec 31 19:00:00 1969" -B 
+1500000 -M -f 
+/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump
+ /'
DUMP: Date of this level 0 dump: Mon Jun 4 00:07:36 2001
DUMP: Dumping /dev/hda1 (/) to 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump001
DUMP: Label: /
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 318332 tape blocks on 0.21 tape(s).
DUMP: Dumping volume 1 on 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump001
DUMP: Volume 1 started with block 1 at: Mon Jun 4 00:07:39 2001
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: Closing 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump001
DUMP: Volume 1 completed at: Mon Jun 4 00:12:04 2001
DUMP: Volume 1 1500000 tape blocks (1464.84MB)
DUMP: Volume 1 took 0:04:25
DUMP: Volume 1 transfer rate: 5660 kB/s
DUMP: Dumping volume 2 on 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump002
DUMP: Volume 2 started with block 1500001 at: Mon Jun 4 00:12:04 2001
DUMP: Volume 2 begins with blocks from inode 19221
DUMP: 100.00% done at 6559 kB/s, finished in 0:00
DUMP: Closing 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump002
DUMP: Volume 2 completed at: Mon Jun 4 00:15:52 2001
DUMP: Volume 2 1500000 tape blocks (1464.84MB)
DUMP: Volume 2 took 0:03:48
DUMP: Volume 2 transfer rate: 6578 kB/s
DUMP: Dumping volume 3 on 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump003
DUMP: Volume 3 started with block 3000001 at: Mon Jun 4 00:15:52 2001
DUMP: Volume 3 begins with blocks from inode 19221
DUMP: 100.00% done at 6607 kB/s, finished in 0:00
DUMP: Closing 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump003
DUMP: Volume 3 completed at: Mon Jun 4 00:19:41 2001
DUMP: Volume 3 1500000 tape blocks (1464.84MB)
DUMP: Volume 3 took 0:03:49
DUMP: Volume 3 transfer rate: 6550 kB/s
DUMP: Dumping volume 4 on 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump004
DUMP: Volume 4 started with block 4500001 at: Mon Jun 4 00:19:41 2001
DUMP: Volume 4 begins with blocks from inode 19221
DUMP: 100.00% done at 6354 kB/s, finished in 0:00
DUMP: Closing 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump004
DUMP: Volume 4 completed at: Mon Jun 4 00:23:36 2001
DUMP: Volume 4 1500000 tape blocks (1464.84MB)
DUMP: Volume 4 took 0:03:55
DUMP: Volume 4 transfer rate: 6382 kB/s
DUMP: Dumping volume 5 on 
/auto/backup-c700-0/dump/time-range/from-1969-12-31/19-00-00--0500/to-2001-06-04/00-07-35--0400/celeron600-0.xxxxxxxxx-pn.com/root.dump005
DUMP: Volume 5 started with block 6000001 at: Mon Jun 4 00:23:36 2001
DUMP: Volume 5 begins with blocks from inode 19221

  --------== Posted Anonymously via Newsfeeds.Com ==-------
     Featuring the worlds only Anonymous Usenet Server
    -----------== http://www.newsfeeds.com ==----------

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

From: [EMAIL PROTECTED] (Linus Torvalds)
Subject: Re: ext2 performance with large directories
Date: 3 Jun 2001 22:28:58 -0700

In article <[EMAIL PROTECTED]>,
Anonymous  <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote:
>
>> It's a linear lookup, i.e. it gets very slow.
>
>One thing I noticed is that even for as many
>as 60,000 directory entries, the performance
>isn't all that bad.
>
>I wonder why?

Depending on your access patterns, the directory cache will kick in, and
do most of the real work.

And the dcache uses a pretty efficient hashing mechanism, regardless of
what the underlying filesystem is doing.

But you should realize that the dcache is nothing but a cache, and while
very good for most normal loads you can still get into nasty performance
behaviour by having the "wrong" access patterns. 

                Linus

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

From: Srinivas Vedula <[EMAIL PROTECTED]>
Subject: problem with compiling as a module
Date: Mon, 04 Jun 2001 00:37:29 -0500

Hello,

I am trying to write kernel module and am trying to compile the
following code. I am getting some very strange compilation errors. Could
some one tell me where I am wrong. It is a small program which creates a
file
in the /proc directory and supports the read() operation and read()
returns the current system time.
My kernel version is 2.2.17. I am posting the source code and a few
errors I am getting(I am not posting the whole list because it is very
large and I feel that I am getting them because of a small mistake I
might be doing somewhere.)

Thanks ,
VS

If the file name is foo.c I am using the following command line to
compile.

gcc -c Wall -DMODULE -D__KERNEL__ -DLINUX foo.c

/* -----The code. --------*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/proc_fs.h>

#define BUF_LEN 100

int get_info(char* sys_buff, char **my_buff,
      off_t file_pos, int buff_len, int zero);

struct proc_dir_entry my_clock_proc = {
  0,
  8,
  "my_clock",
  S_IFREG | S_IRUGO,
  1,
  0,
  0,
  BUF_LEN,
  NULL,
  get_info,
  NULL,
  0,0,0,
  0
};


int get_info(char* sys_buff, char **my_buff,
      off_t file_pos, int buff_len, int zero)
{

  static char buffer[BUF_LEN];
  static int count = 0;
  struct timeval t;
  int len;

  if(file_pos > 0 )
    return 0;

  t = xtime;

  len = sprintf(buffer, "Call %05d %1d %1d \n",count, t.tv_sec,
t.tv_usec);
  count++;

  *my_buff = buffer;
  return len;
}


int init_module()
{
  return proc_register( &proc_root, &my_clock_proc);
}

void cleanup_module()
{
  proc_unregister(&proc_root, my_clock_proc.low_ino);
}

/*------- */

The following are the errors I am getting.
gcc -Wall -DMODULE -D__KERNEL__ -DLINUX -c addToProc.c
In file included from /usr/include/linux/sched.h:13,
                 from /usr/include/linux/mm.h:4,
                 from /usr/include/linux/slab.h:14,
                 from /usr/include/linux/malloc.h:4,
                 from /usr/include/linux/proc_fs.h:5,
                 from addToProc.c:3:
/usr/include/linux/times.h:5: parse error before `clock_t'
/usr/include/linux/times.h:5: warning: no semicolon at end of struct or
union
/usr/include/linux/times.h:6: warning: data definition has no type or
storage class
/usr/include/linux/times.h:7: parse error before `tms_cutime'
/usr/include/linux/times.h:7: warning: data definition has no type or
storage class
/usr/include/linux/times.h:8: parse error before `tms_cstime'
/usr/include/linux/times.h:8: warning: data definition has no type or
storage class
In file included from /usr/include/linux/timex.h:142,
                 from /usr/include/linux/sched.h:14,
                 from /usr/include/linux/mm.h:4,
                 from /usr/include/linux/slab.h:14,
                 from /usr/include/linux/malloc.h:4,
                 from /usr/include/linux/proc_fs.h:5,
                 from addToProc.c:3:
/usr/include/linux/time.h:10: parse error before `time_t'
/usr/include/linux/time.h:10: warning: no semicolon at end of struct or
union
/usr/include/linux/time.h:12: parse error before `}'
/usr/include/linux/time.h: In function `timespec_to_jiffies':
/usr/include/linux/time.h:32: dereferencing pointer to incomplete type
/usr/include/linux/time.h:33: dereferencing pointer to incomplete type
/usr/include/linux/time.h: In function `jiffies_to_timespec':
/usr/include/linux/time.h:45: dereferencing pointer to incomplete type
/usr/include/linux/time.h:46: dereferencing pointer to incomplete type
/usr/include/linux/time.h: At top level:
/usr/include/linux/time.h:50: parse error before `time_t'
/usr/include/linux/time.h:50: warning: no semicolon at end of struct or
union
/usr/include/linux/time.h:51: warning: data definition has no type or
storage class
/usr/include/linux/time.h:83: field `it_interval' has incomplete type
/usr/include/linux/time.h:84: field `it_value' has incomplete type
/usr/include/linux/time.h:88: field `it_interval' has incomplete type
/usr/include/linux/time.h:89: field `it_value' has incomplete type
In file included from /usr/include/linux/sched.h:14,
                 from /usr/include/linux/mm.h:4,
                 from /usr/include/linux/slab.h:14,
                 from /usr/include/linux/malloc.h:4,
                 from /usr/include/linux/proc_fs.h:5,
                 from addToProc.c:3:
/usr/include/linux/timex.h:163: field `time' has incomplete type
In file included from /usr/include/linux/fs.h:266,
                 from /usr/include/linux/tty.h:20,
                 from /usr/include/linux/sched.h:21,
                 from /usr/include/linux/mm.h:4,
                 from /usr/include/linux/slab.h:14,
                 from /usr/include/linux/malloc.h:4,
                 from /usr/include/linux/proc_fs.h:5,
                 from addToProc.c:3:
/usr/include/linux/hpfs_fs_i.h:5: parse error before `ino_t'
/usr/include/linux/hpfs_fs_i.h:5: warning: no semicolon at end of struct
or union
/usr/include/linux/hpfs_fs_i.h:12: parse error before `:'
In file included from /usr/include/linux/fs.h:268,
                 from /usr/include/linux/tty.h:20,
                 from /usr/include/linux/sched.h:21,
                 from /usr/include/linux/mm.h:4,
                 from /usr/include/linux/slab.h:14,
                 from /usr/include/linux/malloc.h:4,
                 from /usr/include/linux/proc_fs.h:5,
                 from addToProc.c:3:
/usr/include/linux/msdos_fs_i.h:36: parse error before `off_t'
/usr/include/linux/msdos_fs_i.h:36: warning: no semicolon at end of
struct or union
In file included from /usr/include/linux/fs.h:269,
                 from /usr/include/linux/tty.h:20,
                 from /usr/include/linux/sched.h:21,
                 from /usr/include/linux/mm.h:4,
                 from /usr/include/linux/slab.h:14,
                 from /usr/include/linux/malloc.h:4,
                 from /usr/include/linux/proc_fs.h:5,
                 from addToProc.c:3:
/usr/include/linux/umsdos_fs_i.h:62: field `msdos_info' has incomplete
type
/usr/include/linux/umsdos_fs_i.h:69: parse error before `off_t'
/usr/include/linux/umsdos_fs_i.h:69: warning: no semicolon at end of
struct or union

and so on .... I am getting a very big list of errors. Though the
compiler says there are no semi colons etc the
files are perfectly fine.


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

From: r@cLIeNUX. (cLIeNUX user)
Subject: Re: How to access argc,argv,envp without glibc
Date: Mon, 04 Jun 2001 06:04:30 -0000

[EMAIL PROTECTED]
>I am trying to write minimalist programs for use on
>boot floppies. I have found that by stealing the assembler
>syscall macros from glibc, I can write miniscule (about 2k)
>and functional programs to do the basics of mount, swapon,
>execve, all that.
>
>I can't, however, figure out how to access command-line
>arguments or environment without using glibc (which is a beast)
>Can someone point me to the relevant sources in glibc or gcc?
>
>(ObDisclaimer: yes, I know this will not be portable)
>
>-Eric
>[EMAIL PROTECTED]
>
>

Look at H3sm in ftp://linux01.gwdg.de/pub/cLIeNUX/interim

and libsys.a in that dir also. Both of those include a hacked crt0.s which
is the key to severing libc. 

H3sm doesn't use libc. H3sm also gets it's first line of H3sm source
interpreter input from the commandline args, via a tiny little hack to
make argv[] the initial input buffer. 0-bytes are considered whitespace,
so it's business as usual. 

Also in that dir is Le Floppie Minimale, Viralinux_II. This is an
uncompressed LILO-boot 1.44 floppy with a big fat x86 kernel, ash, eforthl
with 160 linux syscalls, my 3-stack language with about 50, and 300k of
free ext2 space on the floppy. Such are the joys of life without libc. The
downside of course is all you can do with Viralinux_II is commence to
rewriting Linux userspace in eforth and/or ash and/or H3sm. Viralinux does
NOT have H3sm in the kernel as a kernel thread. Examples of that are also
in that dir.

Rick Hohensee
http://linux01.gwdg.de/~rhohen

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


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