From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: bugfix, hostfs
Date: Sun, 08 Aug 2004 20:47:11 +0200 [thread overview]
Message-ID: <87oelllb68.fsf@marco.marco-g.com> (raw)
In-Reply-To: <20040808181720.GA14939@artax.karlin.mff.cuni.cz> (Tomas Ebenlendr's message of "Sun, 8 Aug 2004 20:17:20 +0200")
ebik@artax.karlin.mff.cuni.cz (Tomas Ebenlendr) writes:
> I don't *need* it, it is just comfortable way to access files from
> grub-emu. I also don't *need* to load modules in grub-emu, but if it
> will be easy and not user-confusing, it will make easier solving some
> problems.
Ok, I just asked out of interest.
>> Most comments are still about the GCS.
>
> Hmm, I wrote the patch for myself, and then I forgot to read it
> carefully. So I'm sory for inconvenient code.
np. I am happy you took the time to do this work. :)
>> > +#ifndef GRUB_UTIL
>> > +#error cannot live outside host fs
>> > +#endif
>>
>> I think there is no need to do this.
>>
>
> Maybe. I'm just used to write in files that shouldn't be ported to other
> "parts" of software that they can't be ported.
If someone would compile this code for usage outside of grub-emu it
won't compile anyway. :)
>> > + if ((signed) device->disk->id != -2) {
>>
>> What is -2?
>>
>
> Oh, sorry. Just a magic constant. Probably there should be better
> identification (e.g. magic device->disk->data (e.g. device->disk ==
> device->disk->data)). This identification is used in hostfs_mount()
Ok. If you can't do it that way it is better to use a macro like
GRUB_HOSTFS_DISK_ID or so.
>>
>> > + grub_strncpy(pathbuf,path,/*FIXME*/2048 - 1);
>>
>> Why do you use pathbuf? Can't you just use path directly? If that is
>> not possible use MAX_PATH_LEN here when it is defined and dynamic
>> memory allocation otherwise (when there is no limit).
>>
>
> I concatenate path of directory and its entries to stat them. I will use
> the MAX_PATH_LEN. I only forgot that I forgot the name of this constant.
> (Uh).
Oh, I thought it wasn't written to. I must have missed something
then. Please be careful with MAX_PATH_LEN, GNU/Hurd does not define
it because there is no limit at all. In that case better use dynamic
allocation.
Thanks,
Marco
next prev parent reply other threads:[~2004-08-08 18:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-08 17:30 bugfix, hostfs Tomas Ebenlendr
2004-08-08 18:00 ` Marco Gerards
2004-08-08 18:17 ` Tomas Ebenlendr
2004-08-08 18:47 ` Marco Gerards [this message]
2004-08-08 19:17 ` Yoshinori K. Okuji
2004-08-12 22:21 ` Tomas Ebenlendr
2004-08-13 10:41 ` Marco Gerards
2004-08-14 8:37 ` Tomas Ebenlendr
2004-08-14 10:18 ` Marco Gerards
2004-08-14 10:38 ` Tomas Ebenlendr
2004-08-21 13:57 ` Yoshinori K. Okuji
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=87oelllb68.fsf@marco.marco-g.com \
--to=metgerards@student.han.nl \
--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 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.