public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: prajnoha@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/libdm libdm-common.c ioctl/libdm-iface.c
Date: Tue, 17 Jan 2012 14:37:00 -0000	[thread overview]
Message-ID: <20120117143659.24114.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2012-01-17 14:36:59

Modified files:
	libdm          : libdm-common.c 
	libdm/ioctl    : libdm-iface.c 

Log message:
	Move dm_task_set_newname from libdm-iface.c to libdm-common.c

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.132&r2=1.133
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/ioctl/libdm-iface.c.diff?cvsroot=lvm2&r1=1.131&r2=1.132

--- LVM2/libdm/libdm-common.c	2012/01/11 12:34:45	1.132
+++ LVM2/libdm/libdm-common.c	2012/01/17 14:36:58	1.133
@@ -342,6 +342,27 @@
 	return 1;
 }
 
+int dm_task_set_newname(struct dm_task *dmt, const char *newname)
+{
+	if (strchr(newname, '/')) {
+		log_error("Name \"%s\" invalid. It contains \"/\".", newname);
+		return 0;
+	}
+
+	if (strlen(newname) >= DM_NAME_LEN) {
+		log_error("Name \"%s\" too long", newname);
+		return 0;
+	}
+
+	if (!(dmt->newname = dm_strdup(newname))) {
+		log_error("dm_task_set_newname: strdup(%s) failed", newname);
+		return 0;
+	}
+	dmt->new_uuid = 0;
+
+	return 1;
+}
+
 int dm_task_set_uuid(struct dm_task *dmt, const char *uuid)
 {
 	dm_free(dmt->uuid);
--- LVM2/libdm/ioctl/libdm-iface.c	2012/01/09 12:26:15	1.131
+++ LVM2/libdm/ioctl/libdm-iface.c	2012/01/17 14:36:59	1.132
@@ -747,27 +747,6 @@
 	return 1;
 }
 
-int dm_task_set_newname(struct dm_task *dmt, const char *newname)
-{
-	if (strchr(newname, '/')) {
-		log_error("Name \"%s\" invalid. It contains \"/\".", newname);
-		return 0;
-	}
-
-	if (strlen(newname) >= DM_NAME_LEN) {
-		log_error("Name \"%s\" too long", newname);
-		return 0;
-	}
-
-	if (!(dmt->newname = dm_strdup(newname))) {
-		log_error("dm_task_set_newname: strdup(%s) failed", newname);
-		return 0;
-	}
-	dmt->new_uuid = 0;
-
-	return 1;
-}
-
 int dm_task_set_message(struct dm_task *dmt, const char *message)
 {
 	if (!(dmt->message = dm_strdup(message))) {


             reply	other threads:[~2012-01-17 14:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 14:37 prajnoha [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-05 12:40 prajnoha
2010-05-03 21:06 prajnoha

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=20120117143659.24114.qmail@sourceware.org \
    --to=prajnoha@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).