[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub2 boot root-on-zfs errors
From: |
Beeblebrox |
Subject: |
Re: grub2 boot root-on-zfs errors |
Date: |
Fri, 22 Nov 2013 19:01:39 +0200 |
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);
- Re: grub2 boot root-on-zfs errors, (continued)
- Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/09
- Re: grub2 boot root-on-zfs errors, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/11/09
- Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/10
- Re: grub2 boot root-on-zfs errors, Andrey Borzenkov, 2013/11/10
- Re: grub2 boot root-on-zfs errors, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/11/10
- Re: grub2 boot root-on-zfs errors, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/11/10
- Re: grub2 boot root-on-zfs errors, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/11/08
Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/10
- Re: grub2 boot root-on-zfs errors, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/11/10
- Message not available
- Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/22
- Re: grub2 boot root-on-zfs errors,
Beeblebrox <=
- Re: grub2 boot root-on-zfs errors, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/11/22
- Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/23
- Re: grub2 boot root-on-zfs errors, Vladimir 'φ-coder/phcoder' Serbinenko, 2013/11/23
- Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/23
- Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/23
Re: grub2 boot root-on-zfs errors, Beeblebrox, 2013/11/22