From: Avnish Chouhan <avnish@linux.ibm.com>
To: Daniel Kiper <dkiper@net-space.pl>
Cc: grub-devel@gnu.org, brking@linux.ibm.com, meghanaprakash@in.ibm.com
Subject: Re: [PATCH v2] ieee1275: support added for multiple nvme bootpaths
Date: Thu, 29 May 2025 11:59:27 +0530 [thread overview]
Message-ID: <d406cf0e8c37e91e367882659722df22@linux.ibm.com> (raw)
In-Reply-To: <20250528175620.mqiom7twky6gha2f@tomti.i.net-space.pl>
Hi Daniel,
I believe we need this change. We are using this function
"of_path_get_nvme_nsid" in the patch which is defined in other file, and
this "of_path_get_nvme_nsid" calls the function
"block_device_get_sysfs_path_and_link". If we don't define this in the
header file, we get this error below.
Thank you!
*****
In file included from grub-core/osdep/ofpath.c:2:
grub-core/osdep/linux/ofpath.c:228:1: error: no previous prototype for
‘block_device_get_sysfs_path_and_link’ [-Werror=missing-prototypes]
228 | block_device_get_sysfs_path_and_link(const char *devicenode)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:10855: grub-core/osdep/grub_mkrescue-ofpath.o]
Error 1
make[2]: Leaving directory '/root/splitupgrub/grub'
make[1]: *** [Makefile:12412: check-recursive] Error 1
make[1]: Leaving directory '/root/splitupgrub/grub'
make: *** [Makefile:13491: check] Error 2
*****
Regards,
Avnish Chouhan
On 2025-05-28 23:26, Daniel Kiper wrote:
> On Wed, May 28, 2025 at 04:50:00PM +0530, Avnish Chouhan wrote:
>> Hi Daniel,
>>
>> Thank you so much for a review!
>>
>> On 2025-05-27 01:00, Daniel Kiper wrote:
>> > On Mon, May 19, 2025 at 04:34:34PM +0530, Avnish Chouhan wrote:
>
> [...]
>
>> > > diff --git a/grub-core/osdep/linux/ofpath.c
>> > > b/grub-core/osdep/linux/ofpath.c
>> > > index 7158c8c..48f11c9 100644
>> > > --- a/grub-core/osdep/linux/ofpath.c
>> > > +++ b/grub-core/osdep/linux/ofpath.c
>> > > @@ -209,7 +209,7 @@ find_obppath (const char *sysfs_path_orig)
>> > > }
>> > > }
>> > >
>> > > -static char *
>> > > +char *
>> > > xrealpath (const char *in)
>> > > {
>> > > char *out;
>> > > @@ -224,7 +224,7 @@ xrealpath (const char *in)
>> > > return out;
>> > > }
>> > >
>> > > -static char *
>> > > +char *
>> >
>> > You do not need this change.
>>
>> We need this function as this is used by the function
>> "of_path_get_nvme_nsid" we are using.
>
> The block_device_get_sysfs_path_and_link() does not seem called from
> this patch. So, probably this change belongs to another one.
>
>> > > block_device_get_sysfs_path_and_link(const char *devicenode)
>> > > {
>> > > char *rpath;
>> > > @@ -684,7 +684,7 @@ of_path_get_nvme_nsid (const char* devname)
>> > > return nsid;
>> > > }
>> > >
>> > > -static char *
>> > > +char *
>> > > nvme_get_syspath (const char *nvmedev)
>> > > {
>> > > char *sysfs_path;
>> > > diff --git a/include/grub/util/install.h b/include/grub/util/install.h
>> > > index 51f3b13..a67e225 100644
>> > > --- a/include/grub/util/install.h
>> > > +++ b/include/grub/util/install.h
>> > > @@ -235,6 +235,9 @@ grub_install_register_efi (grub_device_t
>> > > efidir_grub_dev,
>> > > const char *efifile_path,
>> > > const char *efi_distributor);
>> > >
>> > > +char *
>> > > +add_multiple_nvme_bootdevices (const char *install_device);
>> > > +
>> > > void
>> > > grub_install_register_ieee1275 (int is_prep, const char
>> > > *install_device,
>> > > int partno, const char *relpath);
>> > > diff --git a/include/grub/util/ofpath.h b/include/grub/util/ofpath.h
>> > > index 5962322..78e78e7 100644
>> > > --- a/include/grub/util/ofpath.h
>> > > +++ b/include/grub/util/ofpath.h
>> > > @@ -30,5 +30,9 @@ int add_filename_to_pile (char *filename, struct
>> > > ofpath_files_list_root* root);
>> > > void find_file (char* filename, char* directory, struct
>> > > ofpath_files_list_root* root, int max_depth, int depth);
>> > > char* of_find_fc_host (char* host_wwpn);
>> > > void free_ofpath_files_list (struct ofpath_files_list_root* root);
>> > > +char* nvme_get_syspath (const char *nvmedev);
>> > > +char* block_device_get_sysfs_path_and_link (const char *devicenode);
>> >
>> > Please drop this declaration.
>>
>> Same as explained above!
>
> As above...
>
> Daniel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2025-05-29 6:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 11:04 [PATCH v2] ieee1275: support added for multiple nvme bootpaths Avnish Chouhan
2025-05-26 19:30 ` Daniel Kiper
2025-05-28 11:20 ` Avnish Chouhan
2025-05-28 17:56 ` Daniel Kiper
2025-05-29 6:29 ` Avnish Chouhan [this message]
2025-05-29 16:22 ` Daniel Kiper
2025-06-03 6:03 ` Avnish Chouhan
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=d406cf0e8c37e91e367882659722df22@linux.ibm.com \
--to=avnish@linux.ibm.com \
--cc=brking@linux.ibm.com \
--cc=dkiper@net-space.pl \
--cc=grub-devel@gnu.org \
--cc=meghanaprakash@in.ibm.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.