From: Artem Bityutskiy <dedekind@infradead.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mkfs.jffs2: fix dir creation in /
Date: Fri, 26 Dec 2008 14:38:02 +0200 [thread overview]
Message-ID: <1230295082.11802.2.camel@sauron> (raw)
In-Reply-To: <1230029664-22328-1-git-send-email-vapier@gentoo.org>
On Tue, 2008-12-23 at 05:54 -0500, Mike Frysinger wrote:
> diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
> index 7255536..a419bb8 100644
> --- a/mkfs.jffs2.c
> +++ b/mkfs.jffs2.c
> @@ -565,7 +565,10 @@ static int interpret_table_entry(struct filesystem_entry *root, char *line)
> * try and find our parent now) */
> tmp = strdup(name);
> dir = dirname(tmp);
> - parent = find_filesystem_entry(root, dir, S_IFDIR);
> + if (!strcmp(dir, "/"))
> + parent = root;
> + else
> + parent = find_filesystem_entry(root, dir, S_IFDIR);
> free(tmp);
> if (parent == NULL) {
> error_msg ("skipping device_table entry '%s': no parent directory!", name);
I think that you should instead modify 'find_filesystem_entry()' and
make it return the root (of the tree you build the image for, AFAIU)
when you call it like 'find_filesystem_entry(root, "/", S_IFDIR)'. Looks
more logical to me.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2008-12-26 12:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 15:28 mkfs.jffs2: creating dirs in / Mike Frysinger
2008-06-20 16:22 ` Grant Erickson
2008-06-20 16:25 ` Mike Frysinger
2008-12-23 10:54 ` [PATCH] mkfs.jffs2: fix dir creation " Mike Frysinger
2008-12-26 12:38 ` Artem Bityutskiy [this message]
2008-12-27 3:35 ` Mike Frysinger
2008-12-27 12:25 ` Artem Bityutskiy
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=1230295082.11802.2.camel@sauron \
--to=dedekind@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier@gentoo.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