From: Wolfgang Denk <wd@denx.de>
To: Ralph Blach <rcblach@raleigh.ibm.com>
Cc: Embedded Linux list <linuxppc-embedded@lists.linuxppc.org>
Subject: Re: which errno should I use
Date: Tue, 30 Jan 2001 18:19:33 +0100 [thread overview]
Message-ID: <200101301719.f0UHJXC12111@denx.local.net> (raw)
In-Reply-To: Your message of "Tue, 30 Jan 2001 11:52:51 EST." <3A76F163.406CBFDB@raleigh.ibm.com>
Hi Ralph,
in message <3A76F163.406CBFDB@raleigh.ibm.com> you wrote:
>
> I am writing a character device driver. I want this device driver to
> return an error if the user request less than say 1024 byte of data.
> What errno should I use? Is it legal to return an error if not enouth
EINVAL (Invalid argument) is often used in this situation.
> bytes are requested?
Sure. Many character devices have certain restrictions on the I/O size.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Visit us at Embedded Systems: Feb 14-16 2001, Nuremberg, Halle 12/K01
(with TQ Components); our presentation "Starke Zwerge: Embedded Linux
auf PowerPC-Systemen" on Thursday, Feb 15 2001, 13:30 Forum Halle 11.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2001-01-30 17:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-30 16:52 which errno should I use Ralph Blach
2001-01-30 17:19 ` Wolfgang Denk [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-01-31 18:48 Ian Abbott
2001-01-31 23:45 ` Ron Bianco
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=200101301719.f0UHJXC12111@denx.local.net \
--to=wd@denx.de \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=rcblach@raleigh.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).