All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/13] Replicator: export out_ function for modules
@ 2009-10-05 14:00 Zdenek Kabelac
  2009-10-05 14:00 ` [PATCH 02/13] Replicator: add libdm support Zdenek Kabelac
  2009-10-07 15:05 ` [PATCH 01/13] Replicator: export out_ function for modules Alasdair G Kergon
  0 siblings, 2 replies; 23+ messages in thread
From: Zdenek Kabelac @ 2009-10-05 14:00 UTC (permalink / raw)
  To: lvm-devel

Exporting functions out_inc_indent(), out_dec_indent(), out_newline()
for creating indented metadata lines.

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
---
 lib/format_text/export.c      |   19 +++++++++++++++++++
 lib/format_text/text_export.h |    4 ++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/lib/format_text/export.c b/lib/format_text/export.c
index 482eea9..49cf785 100644
--- a/lib/format_text/export.c
+++ b/lib/format_text/export.c
@@ -235,6 +235,25 @@ static int _sectors_to_units(uint64_t sectors, char *buffer, size_t s)
 	return dm_snprintf(buffer, s, "# %g %s", d, _units[i]) > 0;
 }
 
+/* increment indention level */
+void out_inc_indent(struct formatter *f)
+{
+	_inc_indent(f);
+}
+
+/* decrement indention level */
+void out_dec_indent(struct formatter *f)
+{
+	_dec_indent(f);
+}
+
+/* insert new line */
+int out_newline(struct formatter *f)
+{
+	outnl(f);
+	return 0;
+}
+
 /*
  * Appends a comment giving a size in more easily
  * readable form (eg, 4M instead of 8096).
diff --git a/lib/format_text/text_export.h b/lib/format_text/text_export.h
index 2f2b531..12a8691 100644
--- a/lib/format_text/text_export.h
+++ b/lib/format_text/text_export.h
@@ -34,4 +34,8 @@ int out_text(struct formatter *f, const char *fmt, ...)
 int out_areas(struct formatter *f, const struct lv_segment *seg,
 	      const char *type);
 
+void out_inc_indent(struct formatter *f);
+void out_dec_indent(struct formatter *f);
+int out_newline(struct formatter *f);
+
 #endif
-- 
1.6.5.rc2



^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-10-09 12:59 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-05 14:00 [PATCH 01/13] Replicator: export out_ function for modules Zdenek Kabelac
2009-10-05 14:00 ` [PATCH 02/13] Replicator: add libdm support Zdenek Kabelac
2009-10-05 14:00   ` [PATCH 03/13] Replicator: add lvm support Zdenek Kabelac
2009-10-05 14:00     ` [PATCH 04/13] Replicator: new variable in generated file Zdenek Kabelac
2009-10-05 14:00       ` [PATCH 05/13] Replicator: use dm_tree_suspend_children Zdenek Kabelac
2009-10-05 14:00         ` [PATCH 06/13] Replicator: extend _lv_each_dependency() rep. deps Zdenek Kabelac
2009-10-05 14:00           ` [PATCH 07/13] Replicator: update _create_partial_dtree() Zdenek Kabelac
2009-10-05 14:00             ` [PATCH 08/13] Replicator: add replicator/_dev to dtree Zdenek Kabelac
2009-10-05 14:00               ` [PATCH 09/13] Replicator: do not remove of replicators' LVs Zdenek Kabelac
2009-10-05 14:00                 ` [PATCH 10/13] Replicator: activate change for vgchange Zdenek Kabelac
2009-10-05 14:00                   ` [PATCH 11/13] Replicator: add new options for replicator Zdenek Kabelac
2009-10-05 14:00                     ` [PATCH 12/13] Replicator: update copyright dates Zdenek Kabelac
2009-10-05 14:00                       ` [PATCH 13/13] Replicator: update of generated configure file Zdenek Kabelac
2009-10-07 15:07     ` [PATCH 03/13] Replicator: add lvm support Alasdair G Kergon
2009-10-08  8:56       ` Zdenek Kabelac
2009-10-07 14:39   ` [PATCH 02/13] Replicator: add libdm support Alasdair G Kergon
2009-10-08  9:42     ` Petr Rockai
2009-10-09 12:42       ` Zdenek Kabelac
2009-10-08  9:32   ` Petr Rockai
2009-10-07 15:05 ` [PATCH 01/13] Replicator: export out_ function for modules Alasdair G Kergon
2009-10-08 11:02   ` Zdenek Kabelac
2009-10-09 12:47     ` Zdenek Kabelac
2009-10-09 12:59       ` Alasdair G Kergon

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.