From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 7/8] sandbox: Add flags for open() call
Date: Thu, 16 Feb 2012 01:09:05 -0500 [thread overview]
Message-ID: <201202160109.06386.vapier@gentoo.org> (raw)
In-Reply-To: <1329349878-16664-7-git-send-email-sjg@chromium.org>
On Wednesday 15 February 2012 18:51:17 Simon Glass wrote:
> This provides a way for callers to create files for writing. We define
> flags which mirror the POSIX values.
>
> Another approach would be to translate the flags at runtime. Perhaps we can
> leave to whoever wants to port this to another OS?
as i mentioned, this isn't a linux-vs-non-linux issue. even linux ports
themselves disagree on the open() flags.
> +#define OS_O_RDONLY 0
> +#define OS_O_WRONLY 1
> +#define OS_O_RDWR 2
these are "fine" for linux as every port i see uses these values
> +#define OS_O_CREAT 0100
as soon as you get beyond the extreme basics, you start seeing bitfield drift.
not all linux arches define O_CREAT to 0100. so i'd like to see logic similar
to what i did for lseek(). i.e. make you bite the bullet :P.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120216/a2a481bd/attachment.pgp>
next prev parent reply other threads:[~2012-02-16 6:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 23:51 [U-Boot] [PATCH v4 1/8] sandbox: fdt: Add support for CONFIG_OF_CONTROL Simon Glass
2012-02-15 23:51 ` [U-Boot] [PATCH v4 2/8] sandbox: config: Enable fdt and snprintf() options Simon Glass
2012-02-16 6:03 ` Mike Frysinger
2012-02-15 23:51 ` [U-Boot] [PATCH v4 3/8] sandbox: gpio: Add basic driver for simulating GPIOs Simon Glass
2012-02-21 6:11 ` Mike Frysinger
2012-02-21 6:27 ` Simon Glass
2012-02-21 16:04 ` Mike Frysinger
2012-02-21 21:55 ` Simon Glass
2012-02-21 22:13 ` Mike Frysinger
2012-02-21 22:21 ` Simon Glass
2012-02-22 5:08 ` [U-Boot] [PATCH v5] " Mike Frysinger
2012-02-22 5:45 ` Simon Glass
2012-02-22 18:31 ` Mike Frysinger
2012-02-15 23:51 ` [U-Boot] [PATCH v4 4/8] sandbox: Enable GPIO driver Simon Glass
2012-02-15 23:51 ` [U-Boot] [PATCH v4 5/8] sandbox: Add concept of sandbox state Simon Glass
2012-02-15 23:51 ` [U-Boot] [PATCH v4 6/8] sandbox: Allow processing instead of or before main loop Simon Glass
2012-02-15 23:51 ` [U-Boot] [PATCH v4 7/8] sandbox: Add flags for open() call Simon Glass
2012-02-16 6:09 ` Mike Frysinger [this message]
2012-02-21 4:32 ` Simon Glass
2012-02-15 23:51 ` [U-Boot] [PATCH v4 8/8] sandbox: Add basic command line parsing Simon Glass
2012-02-26 21:04 ` Mike Frysinger
2012-02-27 2:50 ` Simon Glass
2012-02-27 4:08 ` Mike Frysinger
2012-02-27 4:33 ` Simon Glass
2012-02-27 4:42 ` Mike Frysinger
2012-02-27 5:43 ` Simon Glass
2012-02-27 18:32 ` Mike Frysinger
2012-02-27 20:55 ` Simon Glass
2012-02-16 6:03 ` [U-Boot] [PATCH v4 1/8] sandbox: fdt: Add support for CONFIG_OF_CONTROL Mike Frysinger
2012-02-16 10:50 ` Marek Vasut
2012-02-16 19:16 ` Simon Glass
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=201202160109.06386.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/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