public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: Richard Titmuss <richard_titmuss@logitech.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Adding -N volume name to ubi utils
Date: Tue, 02 Dec 2008 10:56:02 +0200	[thread overview]
Message-ID: <1228208162.5029.27.camel@sauron> (raw)
In-Reply-To: <492ADF69.8060602@logitech.com>

Hi,

On Mon, 2008-11-24 at 17:07 +0000, Richard Titmuss wrote:
> I am trying to modify the ubi tools in mtd_utils to allow the ubi volume 
> name to be specified on the command line, the relevant commands are 
> ubinfo, ubirmvol and ubiupdatevol. The idea is that you could use any of 
> the following command arguments to specify a ubi volume:
> 
>    ubirmvol /dev/ubi0 -N rootfs    # ubi device node and volume name
>    ubirmvol /dev/ubi0 -n 1    # ubi device node and volume id

Looks OK.

>    ubirmvol /dev/ubi0_1    # ubi volume node

Probably also fine.

> Other than consistency the main feature this adds is support for using 
> -N to specify the volume by name to all the commands.

Right.

> The problem is these commands need different information to work:
> - ubinfo loads information from the /sys file system, it's easy to 
> support for all the above command arguments.

Yes.

> - ubirmvol needs a ubi device node and a volume id, how can this work if 
> a volume node is specified?

sysfs contains all the information. Character device gives you
major:minor. UBI _devices_ always have minor=0. So you can distinguish
between UBI volume/device chdev nodes. And you may look into all

/sys/class/ubi/ubiX/ubiX_Y/dev

and find the volume. Then you have all the information.

> - ubiupdatevol needs a ubi volume node, how can this work if a device 
> node is specified?

Similarly. Add corresponding scanning functions to libubi
(mtd-utils/ubi-utils/new-utils/src/libubi.c).

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

      parent reply	other threads:[~2008-12-02  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 17:07 Adding -N volume name to ubi utils Richard Titmuss
2008-11-25  8:53 ` Adrian Hunter
2008-12-02  8:56 ` Artem Bityutskiy [this message]

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=1228208162.5029.27.camel@sauron \
    --to=dedekind@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=richard_titmuss@logitech.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox