All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Asleson <tasleson@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 1/2] lvm2app: Add function to retrieve the origin.
Date: Fri, 12 Apr 2013 10:44:11 -0500	[thread overview]
Message-ID: <51682BCB.6070504@redhat.com> (raw)
In-Reply-To: <5167C42E.4000407@redhat.com>

On 04/12/2013 03:22 AM, Zdenek Kabelac wrote:
> If you need just 'const' pointer - it would be probably better,
> to directly return the name - instead of duplication.

Agreed.

> i.e. lv_origin_dup() ->  rewrite to  'const char *lv_get_origin(.)' ->
> and use it for  lv_name_dup() in lv_origin_dup() which returns char *.
> as well as for  lvm_lv_get_origin().

I ran into at least 2 different implementations of *get_origin.  There
is lv_origin_dup() and _origin_disp.  Both utilize the same logic with
slightly different output.  I haven't looked around it see if there are
others.

To clean this up correctly I would want to write what you are suggesting
and then use it in all the different places.

There is quite a bit of code that could certainly benefit from
decoupling the generation/manipulation of the data from the presentation
of it.

I've added this to a todo list.

Regards,
Tony




  reply	other threads:[~2013-04-12 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 20:58 [PATCH 1/2] lvm2app: Add function to retrieve the origin Tony Asleson
2013-04-11 20:58 ` [PATCH 2/2] python-lvm: Added lv method getOrigin Tony Asleson
2013-04-12  8:22 ` [PATCH 1/2] lvm2app: Add function to retrieve the origin Zdenek Kabelac
2013-04-12 15:44   ` Tony Asleson [this message]
2013-04-12 15:51     ` Zdenek Kabelac

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=51682BCB.6070504@redhat.com \
    --to=tasleson@redhat.com \
    --cc=lvm-devel@redhat.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.