9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Christopher Nielsen <cnielsen@pobox.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] struct problems
Date: Tue,  6 May 2003 22:34:11 -0700	[thread overview]
Message-ID: <20030507053411.GZ36080@cassie.foobarbaz.net> (raw)
In-Reply-To: <20030507043633.GX36080@cassie.foobarbaz.net>

I forgot to add that my guess as to what is happening
is due to alignment issues.

On Tue, May 06, 2003 at 09:36:33PM -0700, Christopher Nielsen wrote:
> I've been working on 48-bit LBA support for ATA, and
> I've run into something peculiar. I decided to rewrite
> the identify array as a struct of bit fields for better
> readability. As it turns out, the struct is 16 bytes
> bigger than expected, which is causing all sorts of
> trouble with accessing the fields properly. I am pretty
> sure I copied all the fields correctly; the struct
> should be 512 bytes, but it's 528 bytes. Below is the
> struct definition for folks to look at. I am in the
> process of rooting out where the extra bytes are
> coming from, but if someone can provide some insight,
> it would save me some time.

--
Christopher Nielsen
"They who can give up essential liberty for temporary
safety, deserve neither liberty nor safety." --Benjamin Franklin


  reply	other threads:[~2003-05-07  5:34 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07  4:36 Christopher Nielsen
2003-05-07  5:34 ` Christopher Nielsen [this message]
2003-05-07  5:36   ` Nigel Roles
2003-05-07  5:41     ` Christopher Nielsen
2003-05-08  7:30       ` boyd, rounin
2003-05-09 20:22         ` ron minnich
2003-05-09 21:09           ` Geoff Collyer
2003-05-09 23:29             ` Scott Schwartz
2003-05-10  2:54           ` boyd, rounin
2003-05-10  5:04             ` northern snowfall
2003-05-10  4:11               ` boyd, rounin
2003-05-12  8:56           ` Douglas A. Gwyn
2003-05-12  9:29             ` boyd, rounin
2003-05-07  7:32 ` northern snowfall
2003-05-07 11:05   ` Bruce Ellis
2003-05-07 13:06     ` northern snowfall
2003-05-07 12:47       ` Bruce Ellis
2003-05-07 13:50         ` northern snowfall
2003-05-07 17:01         ` [9fans] snapshots -> archives rog
2003-05-07 17:02           ` Russ Cox
2003-05-07 15:47 ` [9fans] acme/sam problem ron minnich
2003-05-07 15:59   ` Russ Cox
2003-05-07 16:32     ` ron minnich
2003-05-07 16:00   ` andrey mirtchovski
     [not found] <presotto@closedmind.org>
2003-05-10  0:13 ` [9fans] struct problems David Presotto
2003-05-10  0:22   ` Scott Schwartz
2003-05-10  4:49   ` Skip Tavakkolian
2003-05-10  4:52     ` boyd, rounin
2003-05-10  5:20       ` Skip Tavakkolian
2003-05-10  5:19         ` boyd, rounin
2003-05-10  7:11       ` Dennis Ritchie
2003-05-10 16:53         ` matt
2003-05-10 16:58           ` boyd, rounin
2003-05-10 16:58           ` boyd, rounin
2003-05-10 18:08             ` northern snowfall
2003-05-10 17:12               ` boyd, rounin
2003-05-10 22:34               ` boyd, rounin
2003-05-10 23:09         ` jmk
2003-05-10 23:16           ` boyd, rounin
2003-05-11  2:07             ` rob pike, esq.
2003-05-11  2:26               ` boyd, rounin
2003-05-11  3:48             ` Dennis Ritchie
2003-05-11  3:54               ` boyd, rounin
2003-05-10 23:26           ` boyd, rounin
2003-05-11  2:06           ` rob pike, esq.
2003-05-10 23:54         ` Skip Tavakkolian
2003-05-11  2:08           ` rob pike, esq.
2003-05-11  2:31             ` boyd, rounin
2003-05-11  6:04               ` rob pike, esq.
2003-05-11  7:03                 ` boyd, rounin
2003-05-12  8:56       ` Anthony Mandic
2003-05-12  9:27         ` boyd, rounin

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=20030507053411.GZ36080@cassie.foobarbaz.net \
    --to=cnielsen@pobox.com \
    --cc=9fans@cse.psu.edu \
    /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).