From: "David Sanán Baena" <davidsanan@teleline.es>
To: <linux-kernel@vger.kernel.org>
Subject: problems creating a driver
Date: Sun, 15 Dec 2002 14:05:47 +0100 [thread overview]
Message-ID: <002901c2a43a$b057d5c0$6e9afea9@anabel> (raw)
Hello and before of all thank you for read this.
First I use kernel 2.4.9
I have made a driver to change data betwen kernel and user space.
but when compiling I got the following message:
[david@localhost samplepackage]# make
c++ -w -Wall -fno-exceptions -fno-rtti -fvtable-thunks -DHAVE_CONFIG_H -I. -
I. -I. -I/usr/local/include -I/usr/local/share/click/src -I/usr/src/linux/in
clude -MD -DCLICK_LINUXMODULE -DCLICK_PACKAGE -O2 -c totcl.cc -o totcl.ko
totcl.cc:60: sorry, not implemented: non-trivial labeled initializers
totcl.cc:60: cannot convert `ssize_t (*) (file *, char *, unsigned int,
loff_t *)' to `module *' in initialization
totcl.cc:60: sorry, not implemented: non-trivial labeled initializers
totcl.cc:60: cannot convert `int (*) (inode *, file *)' to `loff_t (*)
(file *, long long int, int)' in initialization
totcl.cc:60: sorry, not implemented: non-trivial labeled initializers
totcl.cc:60: cannot convert `int (*) (inode *, file *)' to `ssize_t (*)
(file *, char *, unsigned int, loff_t *)' in initialization
make: *** [totcl.ko] Error 1
my file_operations var is:
struct file_operations totcl_fops=
{
read:totcl_read,
open:totcl_open,
release:totcl_release,
};
(I have seen this in many documents, even in linux files...)
when I removed the labels the "sorry, not implementd:non-trivial labeled
initializers" is not shown
And finally looking in "/usr/src/linux/include/linxu/fs.h"
I saw that with the first field is: module * own
so I have changed my file_operations var to:
static struct file_operations totcl_fops=
{ NULL,
NULL, /*seek*/
totcl_read,
NULL, /*write*/
NULL, /* readdir*/
NULL, /* select */
NULL, /* ioctl */
NULL, /*mmap*/
totcl_open,
NULL, /*fflush*/
totcl_release
};
And now it compiles well... I have not test the result, but first I would
want to know why doesn't work the first declaration (when It must be work,
or not?).
Could I have any problems later because that?
Thanks In advance
David
next reply other threads:[~2002-12-15 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-15 13:05 David Sanán Baena [this message]
2002-12-15 15:49 ` David Gómez
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='002901c2a43a$b057d5c0$6e9afea9@anabel' \
--to=davidsanan@teleline.es \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome