reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* bug#22113: Initial Reiser4 patch for Parted
@ 2015-12-08  8:00 Jose R R
  2015-12-08  8:03 ` Fwd: " Jose R R
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jose R R @ 2015-12-08  8:00 UTC (permalink / raw)
  To: 22113; +Cc: ReiserFS Development List, cjwatson


[-- Attachment #1.1: Type: text/plain, Size: 481 bytes --]

'patch against git://git.sv.gnu.org/parted.git master that adds the
ability to detect existing reiser4 partitions'

-- 
Jose R R
http://metztli.it
---------------------------------------------------------------------------------------------
Try at no charge http://b2evolution.net for http://OpenShift.com PaaS
---------------------------------------------------------------------------------------------
from our GitHub http://Nepohualtzintzin.com repository. Cloud the easy way!

[-- Attachment #1.2: Type: text/html, Size: 1006 bytes --]

[-- Attachment #2: 0001-Initial-Reiser4-support-based-on-Bart-Hakvoort-2004-.patch --]
[-- Type: application/octet-stream, Size: 4732 bytes --]

From e971ba8342d8fda4bce1918920c7c8c62c81e549 Mon Sep 17 00:00:00 2001
From: Metztli <jose.rodriguez@metztli-it.com>
Date: Mon, 7 Dec 2015 04:07:26 -0800
Subject: [PATCH] Initial Reiser4 support based on Bart Hakvoort 2004 work.

---
 libparted/Makefile.am          |  1 +
 libparted/fs/Makefile.am       |  3 ++
 libparted/fs/reiser4/reiser4.c | 71 ++++++++++++++++++++++++++++++++++++++++++
 libparted/libparted.c          |  4 +++
 4 files changed, 79 insertions(+)
 create mode 100644 libparted/fs/reiser4/reiser4.c

diff --git a/libparted/Makefile.am b/libparted/Makefile.am
index cb58648..49709dc 100644
--- a/libparted/Makefile.am
+++ b/libparted/Makefile.am
@@ -3,6 +3,7 @@
 #
 # This file may be modified and/or distributed without restriction.
 
+AUTOMAKE_OPTIONS = subdir-objects
 SUBDIRS_CHECK =
 if HAVE_CHECK
 SUBDIRS_CHECK += tests
diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am
index d3cc8bc..3d6d325 100644
--- a/libparted/fs/Makefile.am
+++ b/libparted/fs/Makefile.am
@@ -3,6 +3,8 @@
 #
 # This file may be modified and/or distributed without restriction.
 
+AUTOMAKE_OPTIONS = subdir-objects
+
 partedincludedir = -I$(top_builddir)/include -I$(top_srcdir)/include
 
 AM_CFLAGS = $(WARN_CFLAGS)
@@ -44,6 +46,7 @@ libfs_la_SOURCES =		\
   ntfs/ntfs.c			\
   reiserfs/reiserfs.c		\
   reiserfs/reiserfs.h		\
+  reiser4/reiser4.c		\
   ufs/ufs.c			\
   xfs/platform_defs.h		\
   xfs/xfs.c			\
diff --git a/libparted/fs/reiser4/reiser4.c b/libparted/fs/reiser4/reiser4.c
new file mode 100644
index 0000000..0a86e0c
--- /dev/null
+++ b/libparted/fs/reiser4/reiser4.c
@@ -0,0 +1,71 @@
+/*
+    libparted - a library for manipulating disk partitions
+    Copyright (C) 2000 Free Software Foundation, Inc.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+
+#include <config.h>
+
+#include <parted/parted.h>
+#include <parted/endian.h>
+
+#if ENABLE_NLS
+#  include <libintl.h>
+#  define _(String) dgettext (PACKAGE, String)
+#else
+#  define _(String) (String)
+#endif /* ENABLE_NLS */
+
+#include <unistd.h>
+#include <string.h>
+
+static PedGeometry*
+reiser4_probe (PedGeometry* geom)
+{
+	char	buf[512];
+
+	if (!ped_geometry_read (geom, buf, 128, 1))
+		return 0;	
+	
+	if ( strcmp( buf, "ReIsEr4" ) == 0 )
+		return ped_geometry_duplicate( geom ) ;
+
+	else
+		return NULL;
+}
+
+static PedFileSystemOps reiser4_ops = {
+	probe:		reiser4_probe,
+};
+
+static PedFileSystemType reiser4_type = {
+	next:	NULL,
+	ops:	&reiser4_ops,
+	name:	"reiser4"
+};
+
+void
+ped_file_system_reiser4_init ()
+{
+	ped_file_system_type_register (&reiser4_type);
+}
+
+void
+ped_file_system_reiser4_done ()
+{
+	ped_file_system_type_unregister (&reiser4_type);
+}
+
diff --git a/libparted/libparted.c b/libparted/libparted.c
index d5cbb3a..8291b1d 100644
--- a/libparted/libparted.c
+++ b/libparted/libparted.c
@@ -108,6 +108,7 @@ extern void ped_file_system_jfs_init (void);
 extern void ped_file_system_hfs_init (void);
 extern void ped_file_system_fat_init (void);
 extern void ped_file_system_ext2_init (void);
+extern void ped_file_system_reiser4_init (void);
 extern void ped_file_system_nilfs2_init (void);
 extern void ped_file_system_btrfs_init (void);
 
@@ -124,6 +125,7 @@ init_file_system_types ()
 	ped_file_system_hfs_init ();
 	ped_file_system_fat_init ();
 	ped_file_system_ext2_init ();
+	ped_file_system_reiser4_init ();
 	ped_file_system_nilfs2_init ();
 	ped_file_system_btrfs_init ();
 }
@@ -187,6 +189,7 @@ extern void ped_file_system_ntfs_done (void);
 extern void ped_file_system_reiserfs_done (void);
 extern void ped_file_system_ufs_done (void);
 extern void ped_file_system_xfs_done (void);
+extern void ped_file_system_reiser4_done (void);
 extern void ped_file_system_amiga_done (void);
 extern void ped_file_system_btrfs_done (void);
 
@@ -203,6 +206,7 @@ done_file_system_types ()
 	ped_file_system_reiserfs_done ();
 	ped_file_system_ufs_done ();
 	ped_file_system_xfs_done ();
+	ped_file_system_reiser4_done ();
 	ped_file_system_amiga_done ();
 	ped_file_system_btrfs_done ();
 }
-- 
2.6.2


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

end of thread, other threads:[~2019-05-25 20:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08  8:00 bug#22113: Initial Reiser4 patch for Parted Jose R R
2015-12-08  8:03 ` Fwd: " Jose R R
2015-12-08 15:48   ` Edward Shishkin
     [not found] ` <20151208185941.GR2772@lister.brianlane.com>
     [not found]   ` <CAM12Q5Tewr2RgAd_+MdoAVU73v8Lu69asPKuMMzk=ZZNJgNNiw@mail.gmail.com>
     [not found]     ` <5667FBF9.70107@gmail.com>
     [not found]       ` <20151210162146.GC2721@lister.brianlane.com>
     [not found]         ` <CAM12Q5QSVfbTsQH9h6prNvWmge_YRM6zJPS=eGPa9qqKC=LA9w@mail.gmail.com>
2015-12-11  1:35           ` Fwd: bug#22113: " Jose R R
2015-12-11 16:38             ` Edward Shishkin
2019-05-24 22:01 ` bug#22113: PATCH: Updated Reiser4 probe enabled against GNU Parted git://git.sv.gnu.org/parted.git Metztli Information Technology
2019-05-24 23:03   ` Harry Duncan
2019-05-25 20:25   ` Edward Shishkin
2019-05-25  4:56 ` Metztli Information Technology
2019-05-25 10:33   ` Harry Duncan

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 NNTP newsgroup(s).