public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David Gómez" <david@pleyades.net>
To: "David Sanán Baena" <davidsanan@teleline.es>
Cc: linux-kernel@vger.kernel.org
Subject: Re: problems creating a driver
Date: Sun, 15 Dec 2002 16:49:44 +0100	[thread overview]
Message-ID: <20021215154944.GA1288@fargo> (raw)
In-Reply-To: <002901c2a43a$b057d5c0$6e9afea9@anabel>

Hi David ;);

> 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

I think the problem it's that designated initializers are not implemented in 
the GNU c++ compiler, so you have to initialize all the field in the structure.

> my file_operations var is:
> struct file_operations totcl_fops=
> {
>  read:totcl_read,
>  open:totcl_open,
>  release:totcl_release,
> };

By the way, C99 syntax is better, most of the kernel has been changed to the
new syntax:

struct file_operations totcl_fops=
{
    .read=totcl_read,
    .open=totcl_open,
    .release=toctl_release,
};


--
David Gómez

"The question of whether computers can think is just like the question of
 whether submarines can swim." -- Edsger W. Dijkstra

      reply	other threads:[~2002-12-15 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-15 13:05 problems creating a driver David Sanán Baena
2002-12-15 15:49 ` David Gómez [this message]

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=20021215154944.GA1288@fargo \
    --to=david@pleyades.net \
    --cc=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