From: "roland" <for_spam@gmx.de>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Laurent Vivier <LaurentVivier@wanadoo.fr>
Subject: Re: [uml-devel] [PATCH] host context switch reduction
Date: Sun, 23 May 2004 15:31:59 +0200 [thread overview]
Message-ID: <07f201c440ca$5686c1e0$2000000a@schlepptopp> (raw)
In-Reply-To: 1085057350.1197.2.camel@chartreuse
hi,
i know - i`m an awful bad programmer - but perhaps someone can help me implementing /proc/sysemu ?
that`s somewhat "cosmetic stuff" for turning sysemu (http://perso.wanadoo.fr/laurent.vivier/UML)
on/off at runtime. (yes - this isn`t really important feature - but i would like to have that feature
and i like hacking it for programming exercise purpose) :)
i added the following to arch/um/kernel/process.c (that`s, where most of the sysemu patch goes into):
#include "linux/proc_fs.h"
#include "linux/file.h"
static struct file_operations proc_sysemu_fops;
static int make_proc_sysemu(void)
{
struct proc_dir_entry *ent;
ent = create_proc_entry("sysemu", 0x777, &proc_root);
if(ent == NULL){
printk("Failed to register /proc/sysemu\n");
return(0);
}
ent->proc_fops = &proc_mm_fops;
return(0);
}
compile fails with:
gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -U__i386__ -Ui386 -D__arch_um__ -DSUBARCH=\"i386\" -D
_LARGEFILE64_SOURCE -Iarch/um/include -I/tmp/uml/2.6.6/linux-2.6.6/arch/um/kernel/tt/include -I/tmp/uml/2.6.6/linux-2.6.6/arch/um
/kernel/skas/include -D_GNU_SOURCE -Os -g -c -o arch/um/kernel/process.o arch/um/kernel/process.c
In file included from arch/um/kernel/process.c:47:
/usr/include/linux/proc_fs.h:244: error: field `vfs_inode' has incomplete type
/usr/include/linux/proc_fs.h: In function `PROC_I':
/usr/include/linux/proc_fs.h:249: error: parse error before "struct"
In file included from arch/um/kernel/process.c:48:
/usr/include/linux/file.h: At top level:
/usr/include/linux/file.h:33: error: `BITS_PER_LONG' undeclared here (not in a function)
arch/um/kernel/process.c: In function `make_proc_sysemu':
arch/um/kernel/process.c:61: error: `proc_mm_fops' undeclared (first use in this function)
arch/um/kernel/process.c:61: error: (Each undeclared identifier is reported only once
arch/um/kernel/process.c:61: error: for each function it appears in.)
arch/um/kernel/process.c: At top level:
arch/um/kernel/process.c:313: warning: initialization from incompatible pointer type
arch/um/kernel/process.c:50: error: storage size of `proc_sysemu_fops' isn't known
arch/um/kernel/process.c:50: warning: `proc_sysemu_fops' defined but not used
arch/um/kernel/process.c:53: warning: `make_proc_sysemu' defined but not used
make[1]: *** [arch/um/kernel/process.o] Error 1
make: *** [arch/um/kernel] Error 2
this looks like the wrong header-files being included.
scratching my head now.....
can someone give me a hint ?
regards
roland
ps:
sorry - maybe this is a dumb error and maybe i shouldn`t start with such complex things -
but i don`t like to program the tutorials written down in a c-programming book :)
----- Original Message -----
From: "Laurent Vivier" <LaurentVivier@wanadoo.fr>
To: "roland" <for_spam@gmx.de>
Cc: <user-mode-linux-devel@lists.sourceforge.net>; "Jeff Dike" <jdike@addtoit.com>; <blaisorblade_spam@yahoo.it>
Sent: Thursday, May 20, 2004 2:49 PM
Subject: Re: [uml-devel] [PATCH] host context switch reduction
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2004-05-23 13:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-29 4:35 [uml-devel] [PATCH] host context switch reduction Jeff Dike
2004-02-29 16:48 ` BlaisorBlade
2004-03-15 11:42 ` Sven 'Darkman' Michels
2004-03-15 19:13 ` Jeff Dike
2004-05-17 20:08 ` roland
2004-05-17 22:00 ` Laurent Vivier
2004-05-17 22:22 ` roland
2004-05-18 17:59 ` Jeff Dike
2004-05-19 17:27 ` Laurent Vivier
2004-05-19 18:01 ` roland
2004-05-19 18:17 ` Laurent Vivier
2004-05-19 19:39 ` roland
2004-05-19 19:49 ` Laurent Vivier
2004-05-20 2:30 ` roland
2004-05-20 12:49 ` Laurent Vivier
2004-05-23 0:42 ` [uml-devel] [PATCH] commandline switch for sysemu patch roland
2004-05-23 13:31 ` roland [this message]
2004-05-19 23:54 ` [uml-devel] [PATCH] host context switch reduction Jeff Dike
2004-05-20 1:01 ` roland
2004-05-20 14:12 ` Henrik Nordstrom
2004-05-20 15:27 ` roland
2004-05-20 15:35 ` Henrik Nordstrom
2004-05-19 22:40 ` Nuno Silva
2004-05-20 18:28 ` roland
2004-05-20 18:47 ` Henrik Nordstrom
2004-05-27 6:16 ` Christopher S. Aker
2004-05-27 8:22 ` Laurent Vivier
2004-05-27 9:25 ` Christopher S. Aker
2004-05-27 11:50 ` Laurent Vivier
2004-05-28 4:53 ` [uml-devel] [PATCH] host context switch reduction Benchmarks Christopher S. Aker
-- strict thread matches above, loose matches on Subject: below --
2004-05-20 2:34 [uml-devel] [PATCH] host context switch reduction roland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='07f201c440ca$5686c1e0$2000000a@schlepptopp' \
--to=for_spam@gmx.de \
--cc=LaurentVivier@wanadoo.fr \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox