All of lore.kernel.org
 help / color / mirror / Atom feed
From: PUCCETTI Armand <armand.puccetti@cea.fr>
To: xen-devel@lists.xensource.com
Subject: mini-os: C programming
Date: Thu, 15 Mar 2007 14:39:21 +0100	[thread overview]
Message-ID: <45F94C89.4010603@cea.fr> (raw)

2 questions on the code of mini-os (the one in XEN 3.0.3):



1. In xen-3.0.3/extras/mini-os/mm.c:52 is a declaration of stack

extern char *stack;

but in file xen-3.0.3/extras/mini-os/arch/x86/setup.c:48, there is also 
a decl of stack:

char stack[8192];

If one dereferences the variable stack, which is apparently not the case 
yet, it gives surely a segfault!


2. In file xen-3.0.3/extras/mini-os/gnttab.c:140: the const variable 
gnttabop_error_msgs
is declared as

static const char *gnttabop_error_msgs[] = GNTTABOP_error_msgs;

shouldn't that instead be declared:

static const char * const gnttabop_error_msgs[] = GNTTABOP_error_msgs;
?
(BTW, even the first const is useless as there are consts in 
GNTTABOP_error_msgs)

             reply	other threads:[~2007-03-15 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-15 13:39 PUCCETTI Armand [this message]
2007-03-15 13:54 ` mini-os: C programming Keir Fraser
2007-03-15 15:11   ` PUCCETTI Armand
2007-03-15 15:22     ` Petersson, Mats

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=45F94C89.4010603@cea.fr \
    --to=armand.puccetti@cea.fr \
    --cc=xen-devel@lists.xensource.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.