grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Beeblebrox <zaphod@berentweb.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: grub2 boot root-on-zfs errors
Date: Fri, 22 Nov 2013 19:01:39 +0200	[thread overview]
Message-ID: <CAPSTsksdrJGFik68s-GrHPdPyCqo5xPPkn9HMOQPVa67S+-dMw@mail.gmail.com> (raw)
In-Reply-To: <CAPSTskthox0_u0FUsMFZiazwf9MhBBFkgXmK031uOgf+hD6HVA@mail.gmail.com>

The patched file is giving me an error. I tried patching several
times, but keep getting same error. Most likely some stupid error on
my part:
grub-core/osdep/unix/platform.c:43:4: error: expected expression
   FILE *fp = fdopen (fd, "r");
   ^
grub-core/osdep/unix/platform.c:44:20: error: expected expression
   get_ofpathname (const char *dev)
                   ^
grub-core/osdep/unix/platform.c:48:18: error: use of undeclared identifier
      'fp'
   while (!feof (fp))
                 ^
/usr/include/stdio.h:489:43: note: expanded from macro 'feof'
#define feof(p)         (!__isthreaded ? __sfeof(p) : (feof)(p))
                                                 ^
/usr/include/stdio.h:483:23: note: expanded from macro '__sfeof'
#define __sfeof(p)      (((p)->_flags & __SEOF) != 0)
                           ^
In file included from grub-core/osdep/platform_unix.c:2:
grub-core/osdep/unix/platform.c:48:18: error: use of undeclared identifier
      'fp'
/usr/include/stdio.h:489:55: note: expanded from macro 'feof'
#define feof(p)         (!__isthreaded ? __sfeof(p) : (feof)(p))
                                                             ^
In file included from grub-core/osdep/platform_unix.c:2:
grub-core/osdep/unix/platform.c:56:53: error: use of undeclared identifier
      'fp'
      r = fread (ret + offset, 1, alloced - offset, fp);
                                                    ^
grub-core/osdep/unix/platform.c:60:12: error: use of undeclared identifier
      'fp'
   fclose (fp);


Patched section currently looks like:
31   static char *
32   get_ofpathname (const char *dev)
33   {
34    size_t alloced = 4096;
35   char *ret = xmalloc (alloced);
36   size_t offset = 0;
37    int fd;
38   pid_t pid;
39
40   pid = grub_util_exec_pipe ((const char * []){ "ofpathname", dev,
NULL }, &fd);
41   if (!pid)
42
43   FILE *fp = fdopen (fd, "r");
44   get_ofpathname (const char *dev)
45   if (!fp)
46     goto fail;
47
48   while (!feof (fp))
49     {
50       size_t r;
51    if (alloced == offset)
52       {
53         alloced *= 2;
54         ret = xrealloc (ret, alloced);
55       }
56      r = fread (ret + offset, 1, alloced - offset, fp);
57      offset += r;
58    }
59
60   fclose (fp);


  reply	other threads:[~2013-11-22 17:01 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 17:50 grub2 boot root-on-zfs errors Beeblebrox
2013-11-10 19:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
     [not found] ` <CAPSTskuZ2nHt6iKHfgFfWeBxpRyuqPmyXHd3AYCr1muaua+H7w@mail.gmail.com>
2013-11-22 15:22   ` Beeblebrox
2013-11-22 17:01     ` Beeblebrox [this message]
2013-11-23  1:09       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-23 12:54       ` Beeblebrox
2013-11-23 13:10         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-23 13:50         ` Beeblebrox
2013-11-23 17:58           ` Beeblebrox
  -- strict thread matches above, loose matches on Subject: below --
2013-11-24  9:14 Beeblebrox
2013-11-24 15:08 ` Andrey Borzenkov
2013-11-25 11:08   ` Beeblebrox
2013-11-25 11:14     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-25 17:29     ` Andrey Borzenkov
2013-11-25 22:12     ` Vladimir 'phcoder' Serbinenko
2013-11-22  7:09 Beeblebrox
2013-11-22  7:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-22  7:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-22 13:16   ` Colin Watson
2013-11-22 13:30     ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-25 16:54       ` Colin Watson
2013-11-04  6:13 Beeblebrox
2013-11-05  7:35 ` Beeblebrox
2013-11-05  8:49   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-05  9:43   ` Beeblebrox
2013-11-09 15:31     ` Beeblebrox
2013-11-09 15:37       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 10:28       ` Beeblebrox
2013-11-10 10:41         ` Andrey Borzenkov
2013-11-10 14:47           ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 12:08         ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-08 14:12   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-31 10:37 Beeblebrox
2013-10-31 11:40 ` Beeblebrox
2013-10-31 16:24 ` Andrey Borzenkov
2013-10-31 16:36   ` Beeblebrox
2013-10-31 17:32 ` Andrey Borzenkov
2013-10-31 18:04   ` Beeblebrox
2013-11-02  7:58     ` Beeblebrox
2013-11-02 14:55       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-10-31 19:06 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-28 11:56 Beeblebrox
2013-09-28 14:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-28  8:48 Beeblebrox
2013-09-28 11:06 ` Andrey Borzenkov
2013-09-25  6:58 Beeblebrox
2013-09-25  8:06 ` Andrey Borzenkov
2013-09-25 10:33   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-23 18:59 Beeblebrox
2013-09-23 19:24 ` Massimo Maggi
2013-09-23 19:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-24  3:56   ` Andrey Borzenkov
2013-09-24 11:01     ` Andrey Borzenkov
2013-09-24 11:12       ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-09-24 15:49 ` Beeblebrox
2013-09-24 16:01   ` Andrey Borzenkov
2013-09-24 16:11   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-08-30  7:23 Raif S. Berent
2013-09-05  7:31 ` Beeblebrox
2013-09-23  9:09 ` Vladimir 'φ-coder/phcoder' Serbinenko

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=CAPSTsksdrJGFik68s-GrHPdPyCqo5xPPkn9HMOQPVa67S+-dMw@mail.gmail.com \
    --to=zaphod@berentweb.com \
    --cc=grub-devel@gnu.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;
as well as URLs for NNTP newsgroup(s).