Re: [parted-devel] Moving forward on parted development

2013-06-20 Thread Otavio Salvador
On Thu, Jun 20, 2013 at 5:54 AM, Jim Meyering j...@meyering.net wrote:
 Phillip Susi wrote:
 It's now been over 6 months since Jim left redhat and parted
 development has stalled.  I'd like to get it going again.  I think I'm
 going to repost my pending patches in the next days and see if anyone
 has time to review them yet, and either way, I'd like to go ahead and
 push them to savanna and gear up for a new release.  Jim mentioned
 shutting down the git repo at debian and just using savanna going
 forward.  How do we get that one shut down?  Is there a checklist for
 issuing a new release?  I imagine it mostly involves running make
 dist, and uploading the tarball to ftp.gnu.org?

 Hi Phillip,

 Thanks for moving this along.
 I don't know how to shut down the debian repository -- never done that.
 I'll bet Otavio knows or can find out, Cc'd.

Do you guys want to remove it or lock it in? Another alternative would
be to make it a mirror from Savanna one.

...
 I've added bug-par...@gnu.org in Cc.  I've tried to phase out the
 alioth.debian.org list, too.  The bug-parted one is what's mentioned in
 --help, and thus, should be the one we prefer.

I think it would be possible to block new subscriptions and send an
e-mail to the people from mailing list asking to move to the new one.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750



Re: [parted-devel] Moving forward on parted development

2013-06-20 Thread Otavio Salvador
On Thu, Jun 20, 2013 at 10:44 AM, Phillip Susi ps...@ubuntu.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 6/20/2013 8:26 AM, Otavio Salvador wrote:
 Do you guys want to remove it or lock it in? Another alternative
 would be to make it a mirror from Savanna one.

 If you can set it up to automatically sync, and want to keep it there,
 then sure.  What I want to make sure we avoid is an out of date repo
 that people might continue using.

My main concern here is drop something people rely on. I am sure some
people fetch from this repository.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750



Re: [parted-devel] Moving forward on parted development

2013-06-20 Thread Otavio Salvador
On Thu, Jun 20, 2013 at 11:57 AM, Phillip Susi ps...@ubuntu.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 6/20/2013 10:32 AM, Otavio Salvador wrote:
 My main concern here is drop something people rely on. I am sure
 some people fetch from this repository.

 I think Jim had suggested leaving a message pointing people to the
 other repo.  Having a read only auto synced copy is nice, but I'd
 rather not have to manually keep them both in sync, especially since I
 don't have write access to alioth :)

I don't have write access to Savannah ... ;P

I am checking with Alioth people how to handle it but I think we'll
find a solution.

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750



Re: [parted-devel] [PATCH] libparted: add nilfs2 module

2010-07-09 Thread Otavio Salvador
Hello Jiro,

On Fri, Jul 9, 2010 at 6:51 AM, Jiro SEKIBA j...@unicus.jp wrote:
 Hi,

 This is a new fs module to provide following:
 - probe nilfs2 filesystem partition
 - clobber nilfs2 filesystem partition

I think we will need todo the paper work for the assigment for parted
due the size of the contribution; another missing thing is that you do
not provide any test for exercise this code. Can you write one?

Thanks in advance,

-- 
Otavio Salvador                  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] A new test

2010-07-02 Thread Otavio Salvador
Hello,

We have uploaded a parted 2.3 package (with the required changes
backported) to sid and would be nice if you could do a new test using
the daily snapshot of d-i and let us know if it works or not.

Cheers,

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] [PATCH 1/3] tests: add one: try to remove a busy partition

2010-06-29 Thread Otavio Salvador
This test try to reproduce the issue reported in Debian bug #582818[1].

 1. http://bugs.debian.org/582818

Basically it does:

 * create two primary partitions
 * mount the second one
 * remove the first (must works)
 * try to remove the second (must fail)

* tests/t1101-busy-partition.sh: new file.
* tests/Makefile.am: add the new test in check target.
---
 tests/Makefile.am |1 +
 tests/t1101-busy-partition.sh |   86 +
 2 files changed, 87 insertions(+), 0 deletions(-)
 create mode 100755 tests/t1101-busy-partition.sh

diff --git a/tests/Makefile.am b/tests/Makefile.am
index aa67f99..a1ab0d8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,6 +19,7 @@ TESTS = \
   t0400-loop-clobber-infloop.sh \
   t0500-dup-clobber.sh \
   t1100-busy-label.sh \
+  t1101-busy-partition.sh \
   t1700-ext-probe.sh \
   t2100-mkswap.sh \
   t2200-dos-label-recog.sh \
diff --git a/tests/t1101-busy-partition.sh b/tests/t1101-busy-partition.sh
new file mode 100755
index 000..0a1dfa6
--- /dev/null
+++ b/tests/t1101-busy-partition.sh
@@ -0,0 +1,86 @@
+#!/bin/sh
+# test for Debian bug #582818 (http://bugs.debian.org/582818); forbid
+# the removal of a mounted partition.
+
+# Copyright (C) 2010 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 3 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, see http://www.gnu.org/licenses/.
+
+if test $VERBOSE = yes; then
+  set -x
+  parted --version
+fi
+
+: ${srcdir=.}
+. $srcdir/t-lib.sh
+
+require_root_
+require_scsi_debug_module_
+
+# create memory-backed device
+scsi_debug_setup_ dev_size_mb=80  dev-name ||
+  skip_test_ 'failed to create scsi_debug device'
+dev=$(cat dev-name)
+
+cat EOF  exp-warning || framework_failure
+WARNING: you are attempting to use parted to operate on (mkpartfs) a file 
system.
+parted's file system manipulation code is not as robust as what you'll find in
+dedicated, file-system-specific packages like e2fsprogs.  We recommend
+you use parted only to manipulate partition tables, whenever possible.
+Support for performing most operations on most types of file systems
+will be removed in an upcoming release.
+EOF
+
+cat EOF  exp-error || framework_failure
+Error: Partition ${dev}2 is being used. You must unmount it before you modify 
it with Parted.
+EOF
+
+fail=0
+
+parted -s $dev mklabel msdos  out 21 || fail=1
+
+# expect no output
+compare out /dev/null || fail=1
+
+parted -s $dev mkpartfs primary fat32 1 40  out 21 || fail=1
+
+# expect warning
+compare out exp-warning || fail=1
+
+parted -s $dev mkpartfs primary fat32 40 80  out 21 || fail=1 
+
+# wait for new partition device to appear
+wait_for_dev_to_appear_ ${dev}2
+
+# expect warning
+compare out exp-warning || fail=1
+
+# be sure to unmount upon interrupt, failure, etc.
+cleanup_() { umount ${dev}2  /dev/null 21; }
+
+mount_point=`pwd`/mnt
+
+mkdir $mount_point || fail=1
+mount ${dev}2 $mount_point || fail=1
+
+# removal of unmounted partition, must work.
+parted -s $dev rm 1  out 21 || fail=1
+
+parted -s $dev rm 2  out 21  fail=1
+
+# expect error
+compare out exp-error
+
+Exit $fail
+
-- 
1.7.1.569.g6f426


___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] [PATCH 1/2] tests: skip loop-clobber-infloop if mkswap cannot be found

2010-06-28 Thread Otavio Salvador
* tests/t0400-loop-clobber-infloop.sh: Skip the test is case of mkswap
cannot be found.
---
 tests/t0400-loop-clobber-infloop.sh |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/t0400-loop-clobber-infloop.sh 
b/tests/t0400-loop-clobber-infloop.sh
index 10309ec..df99b7a 100644
--- a/tests/t0400-loop-clobber-infloop.sh
+++ b/tests/t0400-loop-clobber-infloop.sh
@@ -24,6 +24,8 @@ fi
 : ${srcdir=.}
 . $srcdir/t-lib.sh
 
+( mkswap -V ) /dev/null 21 || skip_test_ no mkswap program
+
 N=1M
 dev=loop-file
 fail=0
-- 
1.7.1.569.g6f426


___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] [PATCH 2/2] tests: add one: try to remove a busy partition

2010-06-28 Thread Otavio Salvador
This test try to reproduce the issue reported in Debian bug #582818[1].

 1. http://bugs.debian.org/582818

Basically it does:

 * create two primary partitions
 * mount the second one
 * remove the first (must works)
 * try to remove the second (must fail)

* tests/t1101-busy-partition.sh: new file.
* tests/Makefile.am: add the new test in check target.
---
 tests/Makefile.am |1 +
 tests/t1101-busy-partition.sh |   73 +
 2 files changed, 74 insertions(+), 0 deletions(-)
 create mode 100755 tests/t1101-busy-partition.sh

diff --git a/tests/Makefile.am b/tests/Makefile.am
index aa67f99..a1ab0d8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,6 +19,7 @@ TESTS = \
   t0400-loop-clobber-infloop.sh \
   t0500-dup-clobber.sh \
   t1100-busy-label.sh \
+  t1101-busy-partition.sh \
   t1700-ext-probe.sh \
   t2100-mkswap.sh \
   t2200-dos-label-recog.sh \
diff --git a/tests/t1101-busy-partition.sh b/tests/t1101-busy-partition.sh
new file mode 100755
index 000..8d80f7d
--- /dev/null
+++ b/tests/t1101-busy-partition.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Copyright (C) 2010 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 3 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, see http://www.gnu.org/licenses/.
+
+# This is a test for Debian bug #582818 (http://bugs.debian.org/582818).
+
+test_description='partitioning (parted -s DEV rm 2) a busy disk must fail.'
+
+privileges_required_=1
+erasable_device_required_=1
+
+: ${srcdir=.}
+. $srcdir/test-lib.sh
+require_512_byte_sector_size_
+dev=$DEVICE_TO_ERASE
+
+test_expect_success \
+setup: create a fat32 file system on $dev \
+'dd if=/dev/zero of=$dev bs=1k count=1 2 /dev/null 
+ parted -s $dev mklabel msdos out 21 
+ parted -s $dev mkpartfs primary fat32 1 40  out 21 
+ parted -s $dev mkpartfs primary fat32 40 80  out 21'
+test_expect_success 'expect no output' 'compare out /dev/null'
+
+mount_point=`pwd`/mnt
+
+# Be sure to unmount upon interrupt, failure, etc.
+cleanup_() { umount ${dev}2  /dev/null 21; }
+
+# There's a race condition here: on udev-based systems, the partition#1
+# device, ${dev}1 (i.e., /dev/sdd1) is not created immediately, and
+# without some delay, this mount command would fail.  Using a flash card
+# as $dev, the loop below typically iterates 7-20 times.
+test_expect_success \
+'create mount point dir. and mount the just-created partition on it' \
+'mkdir $mount_point 
+ i=0; while :; do test -e ${dev}2  break; test $i = 90  break;
+ i=$(expr $i + 1); done;
+ mount ${dev}2 $mount_point'
+
+test_expect_success \
+'now that a partition 2 is mounted, rm 1 must work' \
+'parted -s $dev rm 1  out 21'
+
+
+test_expect_failure \
+'now that a partition 1 is removed, rm 2 attempt must fail' \
+'parted -s $dev rm 2  out 21'
+
+fail=0
+cat EOF  exp || fail=1
+Error: Partition ${dev}2 is being used. You must unmount it before you modify 
it with Parted.
+EOF
+test_expect_success 'create expected output file' 'test $fail = 0'
+
+test_expect_success \
+'check for expected failure diagnostic' \
+'compare out exp'
+
+test_done
-- 
1.7.1.569.g6f426


___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] next (varios patches)

2009-08-19 Thread Otavio Salvador
All three are OK for my POV.

On Wed, Aug 19, 2009 at 5:42 AM, Joel Granados
Morenojgran...@redhat.com wrote:
 Hello list

 1. some spelling corrections
 2. make the t7000 test work for everyone
 3. errase the dm test that is no longer valid.

 Review greatly appreciated.


 Joel Andres Granados
 Brno, Czech Republic, Red Hat.

 ___
 parted-devel mailing list
 parted-devel@lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/parted-devel




-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Fix for s390 fail to build from source

2009-07-19 Thread Otavio Salvador
Hello Jim,

On Sun, Jul 19, 2009 at 6:50 AM, Jim Meyeringj...@meyering.net wrote:
 Otavio Salvador wrote:
 I've did a fix to get parted building again in s390 (fdasd label).
 Please take a look at:

 http://git.debian.org/?p=parted/debian/parted.git;a=commit;h=d3def58a37fcac156a14c2aea098c90ffd6fea7d

 I think we ought to commit it in master for the release. If people ack
 it I can push it.

 From your commit message I cannot tell that it fixes
 a compilation or link failure (implied by what you say above).
 Please show us how the current code fails on s390 and adjust
 your log message to start with something like this:

    build/fdasd: avoid compilation failure on s390

Will do; I also got a missing change to do together with it to really
allow fdasd to build.

 Also, this part looks like it won't always work:

    -                       arch/$(OS).c
    +                       arch/$(OS).c            \
    +                       arch/$(OS).h

 since there is no .h file when $(OS) is gnu or beos.


Yes; any suggestion how to fix it? Well I can do it conditionally but
it will be ugly. Any smarter way?


-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Fix for s390 fail to build from source

2009-07-19 Thread Otavio Salvador
Hello,

On Sun, Jul 19, 2009 at 7:39 AM, Otavio Salvadorota...@ossystems.com.br wrote:
 build/fdasd: avoid compilation failure on s390

I've done it, please review it again so I can push it.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
From 302517d3ecdda2a1c11218232cde307ae7b6fad8 Mon Sep 17 00:00:00 2001
From: Otavio Salvador ota...@ossystems.com.br
Date: Sun, 19 Jul 2009 09:03:59 -0300
Subject: [PATCH] build/fdasd: avoid compilation failure on s390

To export LinuxSpecific stuff for labels, in this case fdasd, we now
provide arch/linux.h file that has the required code. This allows to
us to avoid duplicating code to refer to it while to not make it
exposed to public usage to avoid dependency on this.
---
 libparted/Makefile.am|5 +
 libparted/arch/linux.c   |   19 +--
 libparted/labels/Makefile.am |4 ++--
 libparted/labels/fdasd.c |1 +
 4 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/libparted/Makefile.am b/libparted/Makefile.am
index c46cbd1..13a0c7d 100644
--- a/libparted/Makefile.am
+++ b/libparted/Makefile.am
@@ -32,7 +32,12 @@ libparted_la_SOURCES  = debug.c			\
 			arch/blkpg.h		\
 			arch/$(OS).c
 
+ifeq ($(OS), linux)
+libparted_la_SOURCES += arch/$(OS).h
+endif
+
 EXTRA_libparted_la_SOURCES= arch/linux.c		\
+arch/linux.h	\
 arch/gnu.c \
 arch/beos.c
 
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 66fdd37..8f220e0 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -18,6 +18,7 @@
 #define PROC_DEVICES_BUFSIZ 16384
 
 #include config.h
+#include arch/linux.h
 
 #include parted/parted.h
 #include parted/debug.h
@@ -75,24 +76,6 @@
 #define RW_MODE (O_RDWR)
 #endif
 
-#if defined(__s390__) || defined(__s390x__)
-#  include parted/fdasd.h
-#endif
-
-#define LINUX_SPECIFIC(dev)	((LinuxSpecific*) (dev)-arch_specific)
-
-typedef	struct _LinuxSpecific	LinuxSpecific;
-
-struct _LinuxSpecific {
-	int	fd;
-	char*	dmtype; /** device map target type */
-#if defined(__s390__) || defined(__s390x__)
-	unsigned int real_sector_size;
-	/* IBM internal dasd structure (i guess ;), required. */
-	struct fdasd_anchor *anchor;
-#endif
-};
-
 struct hd_geometry {
 unsigned char heads;
 unsigned char sectors;
diff --git a/libparted/labels/Makefile.am b/libparted/labels/Makefile.am
index d4fe198..6bbe2bf 100644
--- a/libparted/labels/Makefile.am
+++ b/libparted/labels/Makefile.am
@@ -1,5 +1,5 @@
 # This file is part of GNU Parted
-# Copyright (C) 1999, 2000, 2001, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2007, 2009 Free Software Foundation, Inc.
 #
 # This file may be modified and/or distributed without restriction.
 
@@ -9,7 +9,7 @@ else
 S390_SRCS =
 endif
 
-partedincludedir  =	-I$(top_srcdir)/lib -I$(top_srcdir)/include
+partedincludedir  =	-I$(top_srcdir)/lib -I$(top_srcdir)/include -I$(top_srcdir)/libparted
 noinst_LTLIBRARIES=	liblabels.la
 
 liblabels_la_SOURCES = \
diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
index 40ba8c9..e0ffe2e 100644
--- a/libparted/labels/fdasd.c
+++ b/libparted/labels/fdasd.c
@@ -17,6 +17,7 @@
  */
 
 #include config.h
+#include arch/linux.h
 #include parted/vtoc.h
 #include parted/fdasd.h
 
-- 
1.6.3.3.385.g60647

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Re: [parted-devel] Fix for s390 fail to build from source

2009-07-19 Thread Otavio Salvador
Hello Jim and all,

On Sun, Jul 19, 2009 at 9:12 AM, Otavio Salvadorota...@ossystems.com.br wrote:
 Hello,

 On Sun, Jul 19, 2009 at 7:39 AM, Otavio Salvadorota...@ossystems.com.br 
 wrote:
 build/fdasd: avoid compilation failure on s390

 I've done it, please review it again so I can push it.

After few iterations with Joel at IRC we finally got it all in shape
so I pushed it.

If you wish I can push next rebased against it, it has just a few
trivial conflicts on that and I have tested it and it works with the
rebased code.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] Fix for s390 fail to build from source

2009-07-17 Thread Otavio Salvador
Hello,

I've did a fix to get parted building again in s390 (fdasd label).
Please take a look at:

http://git.debian.org/?p=parted/debian/parted.git;a=commit;h=d3def58a37fcac156a14c2aea098c90ffd6fea7d

I think we ought to commit it in master for the release. If people ack
it I can push it.

Cheers,

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] improvements on next

2009-06-16 Thread Otavio Salvador
Hello Jim,

On Tue, Jun 16, 2009 at 10:56 AM, Jim Meyeringj...@meyering.net wrote:
    make check  PARTED_SECTOR_SIZE=4096 make check

Wouldn't be easy for it to be done in all calls for make check? We
might have a way to skip it but by would be nice to have it to cover
different sector sizes by default.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] TODO for parted 1.9.0

2009-06-11 Thread Otavio Salvador
Hello Joel,

On Thu, Jun 11, 2009 at 9:39 AM, Joel Granadosjgran...@redhat.com wrote:
 I would like to add, that whenever we branch maint, we take care to add
 two bug fixes that did not get added to master because of possible
 conflicts down the road with next.
 * http://lists.alioth.debian.org/pipermail/parted-devel/2009-June/002928.html
 * http://lists.alioth.debian.org/pipermail/parted-devel/2009-June/002925.html

I think those ought to be commited in master right now and, if they
conflict with something in next, we can revert then there and fix
those bugs there in another way but waiting the maint branch is wrong
IMO.

I think that every bugfix that is suppose to be released need to be in
master now so maint and master will be the same in release time.

We'll diverge from maint when we pull next changes into it however
bugfixes that are suppose to be released before 2.0 (1.9.1 for
example) need to be commited in maint and we then merge maint into
master. This way master can be merged back into maint easily (this was
our fault in stable-1.8.x that made it too difficult to merge with).

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] TODO for parted 1.9.0

2009-06-10 Thread Otavio Salvador
Hello Joel,

On Wed, Jun 10, 2009 at 2:22 PM, Joel Granadosjgran...@redhat.com wrote:
[...]
 2. Rename stable-1.8.x to maint
[...]
 5. Release parted 1.9.0 from maint.
[...]

The way we were working at stable-1.8.x makes it quite difficult to
merge with current master (so as conseguence with the future 1.9.0).
Since we have tags pointing to the released versions I think we could
just drop stable-1.8.x branch.

In my opinion we could branch maint from master when we're about to
release 1.9 and then move master to what is next now.

What others think about it?

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH 05/10] Ensure blank cmd-line before ped_exception_throw

2009-06-10 Thread Otavio Salvador
Hello Jim,

On Wed, Jun 10, 2009 at 4:23 PM, Jim Meyeringj...@meyering.net wrote:
 Joel Granados Moreno wrote:
[...]
  - adjust formatting, as below:

 +        if (!command_line_get_disk_type (_(New disk label type?),
 +                    type))

I think we shouldn't take coding style so hard. This is quite ugly and
spliting it just due few chars gives nothing to us. I bet we all use a
terminal to program that can show way more then 80 columns.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] next branch

2009-06-03 Thread Otavio Salvador
Hello Joel,

On Wed, Jun 3, 2009 at 9:15 AM, Joel Granados jgran...@redhat.com wrote:
 In summary, and to clarify my stand on this issue:
 I agree that there might be cons regarding individual function
 comments in the commit log.
  a. Make the developer think that the function doc is already written
  b. The commit comment is not in sync with the commit.
  c. The specific commit function comment repeats stuff that is said in the 
 main
    commit message.
  d. The commit function comment becomes extensive and gives too much info.

 But, if the commit function comments don't fit in (a-d), and they are
 sound, and they actually add some context when reading the log, I would
 accept the patch.

I fully agree. It can be of great value for people finding by
information in log but, as coding standards, we will need to use good
sense as a metric in final decision.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] Creation of a Debian specific tree

2009-05-23 Thread Otavio Salvador
Hello,

To organize the Parted repository a bit I've created a specific tree
for Debian packaging and also cleaned up the upstream tree.

To properly reflect it in your local checkout, please run following commands:

$: git tag -l | grep debian | xargs -n 1 git tag -d # drop tags from Debian
$: git branch -D debian/master # drop local
Debian branch optional

I'm finishing the work on the parted branch and will upload it in a few hours.

Cheers,

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Parted Stuff that needs fixing before 1.8.9

2009-05-21 Thread Otavio Salvador
Hello Joel

On Thu, May 21, 2009 at 6:15 AM, Joel Granados jgran...@redhat.com wrote:
 On Wed, May 20, 2009 at 02:43:16PM -0300, Otavio Salvador wrote:
 Another nice thing to 1.8.9 is the latest patch from Colin to improve
 ext4 support. I think it is also required.

 I looked at this and actually skipped it on purpose.  I'll ask a
 question that Jim asked me for one of my patches.  Does it actually fix
 a bug?  a missbehaviour?.  I think that feature should probably go into
 the next branch.

ext4 support as a whole is new so I think this doesn't fit well for
this case; besides it does fix some corner bases bugs.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Parted Stuff that needs fixing before 1.8.9

2009-05-20 Thread Otavio Salvador
Another nice thing to 1.8.9 is the latest patch from Colin to improve
ext4 support. I think it is also required.

On Wed, May 20, 2009 at 7:00 AM, Petr Uzel petr.u...@suse.cz wrote:
 On Wed, May 20, 2009 at 11:28:15AM +0200, Joel Granados wrote:
 Hello list.

 In my continuing effort to make 1.8.9 happen I have decided to make a
 summary of what needs to be fixed for 1.8.9.  The idea is for 1.8.9 to
 be released when all these issues have been resolved.  If I miss any
 bugs issues that are important to someone, feel free to scream at me :)

 Hi,

 what about this one:

 - parted does not preserve bootcode in extended partition
 http://www.mail-archive.com/parted-devel@lists.alioth.debian.org/msg02139.html

 I know the proposed patch isn't ideal,

 When creating new extended partition (not modifying existing one),
 the bootcode is not filled with zeroes and will contain some random
 stuff instead (not sure if this might cause some kind of problems).

 but on the other hand, no one seems to be aware of any troubles this
 may cause (moreover, parted shipped with SuSE has this patch and is
 seems OK).


 --
 Best regards / s pozdravem

 Petr Uzel, Packages maintainer
 -
 SUSE LINUX, s.r.o.                          e-mail: pu...@suse.cz
 Lihovarská 1060/12                          tel: +420 284 028 964
 190 00 Prague 9                             fax: +420 284 028 951
 Czech Republic                              http://www.suse.cz

 ___
 parted-devel mailing list
 parted-devel@lists.alioth.debian.org
 http://lists.alioth.debian.org/mailman/listinfo/parted-devel




-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Sector of free space partition in msdos labels.

2009-05-09 Thread Otavio Salvador
Hello Joel,

On Thu, May 7, 2009 at 1:47 PM, Joel Granados jgran...@redhat.com wrote:
 And here comes the patch to solve this issue.
 Comments greatly appreciated.

From a fast review I see nothing wrong but would be nice to have few
tests to properly check and make the bug clear to be understand for us
and new devels.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] Merging of Colin ext4 changes into master

2009-04-21 Thread Otavio Salvador
Hello,

I'd like to merge the changes that Colin has proposed to current ext4
code. Is there any objection to it?

Background: 
http://lists.alioth.debian.org/pipermail/parted-devel/2009-January/002503.html

As I read, it still lacks testing. Colin, can you confirm if last try to
use XFS for testing has failed? or did you not try it?

Looking forward to clear it up.

Cheers,

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Parted bootstrap - logic error when comparing version numbers

2009-04-08 Thread Otavio Salvador
On Tue, Apr 7, 2009 at 2:39 PM, Curtis Gedak ged...@gmail.com wrote:
 Recently I acquired the latest GIT repository for parted (1.8.8.1.115-d53a)
 and have discovered a problem with building the program.

 The problem is that an 'automake' version = 1.10a is required.  I am using
 1.10.1, which I believe would be = 1.10a.

I've pushed a change to require 1.10 only since 1.10a was an alpha
version of it.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Parted bootstrap - logic error when comparing version numbers

2009-04-08 Thread Otavio Salvador
On Wed, Apr 8, 2009 at 3:33 PM, Jim Meyering j...@meyering.net wrote:
 Otavio Salvador wrote:
 On Tue, Apr 7, 2009 at 2:39 PM, Curtis Gedak ged...@gmail.com wrote:
 Recently I acquired the latest GIT repository for parted (1.8.8.1.115-d53a)
 and have discovered a problem with building the program.

 The problem is that an 'automake' version = 1.10a is required.  I am using
 1.10.1, which I believe would be = 1.10a.

 No.  1.10.1 is *older* than 1.10a.
 And automake-1.10b was recently released, which I consider to be
 stable enough that I used it to bootstrap the stable release
 of upstream coreutils-7.2.

I see but while I also think we should stay up to date with the development
environment I think we should also avoid bumping a version requirement
without a very good reason.

 I've pushed a change to require 1.10 only since 1.10a was an alpha
 version of it.

 It would be better to encourage developers to use a newer version
 of automake, since what is now called 1.10b appears to be quite
 close to what automake-1.11 will be.

That blocks parted to be build with current distribution versions as
for example the Debian one. Without a very good reason for it, I'm
opposed to it.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Parted bootstrap - logic error when comparing version numbers

2009-04-08 Thread Otavio Salvador
On Wed, Apr 8, 2009 at 4:29 PM, Jim Meyering j...@meyering.net wrote:
 Otavio Salvador wrote:
 IMHO, upstream should not be beholden to distribution versions
 of automake when they're stuck at 1.10.1 which is over a year old.
 By that argument, depending on which distro you choose, we'd never
 be able to use newer tools.

We should not be beholden, agreed but please read bellow.

 Besides, there are several desirable features in automake-1.10b
 for which I intend to switch parted:

  silent-rules
  parallel-tests
  dist-xz support

 and maybe one or two others, not counting all of the bug fixes.

Until we add those, there's no need to bump the _requirement_. As
the name suggest it is the version that is _required_ to build, not a
suggested one.

 If you require to be able to build using some older version of automake,
 you can build from a patched branch or even from a release tarball,
 at which point the version of automake doesn't even matter.

 Developers can be expected to be able to install a recent automake,
 even from git, although that would be exceptional.

Sure but I disagree with requiring it for a gratious reason. Once
we start to use the new features I fully agree but until it is done
I think we ought to stay with the last compatible one.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Correctly name virtio devices.

2009-04-01 Thread Otavio Salvador
On Wed, Apr 1, 2009 at 7:05 AM, Joel Granados jgran...@redhat.com wrote:
 On Tue, Mar 31, 2009 at 09:17:53PM -0300, Otavio Salvador wrote:
   include/parted/device.h |    3 +-
   libparted/arch/linux.c  |  101 
  ---
   parted/parted.c         |    2 +-
   3 files changed, 63 insertions(+), 43 deletions(-)

 I fully agree with it just I think tou should split it in two patches;
 one to organize the code and another to really add it.

 This was a question that I asked myself when I created the patch.  It
 was between move a chunk of the code and avoid two ifdef or create
 another ifdef.  I chose to leave the code with just one ifdef with the
 hope of maintaining readability (put stuff that is related together).  I
 think the order change is necessary in this case, if we want to keep
 just one ifdef.

Yeah; and I agree with it. I just think it could be done in two steps.

One patch that moves the method around; another one that adds
the needed changes.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Correctly name virtio devices.

2009-03-31 Thread Otavio Salvador
  include/parted/device.h |    3 +-
  libparted/arch/linux.c  |  101 
 ---
  parted/parted.c         |    2 +-
  3 files changed, 63 insertions(+), 43 deletions(-)

I fully agree with it just I think tou should split it in two patches;
one to organize the code and another to really add it.

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] --as-needed linker option causes trouble with -lreadline/-ltermcap

2009-03-28 Thread Otavio Salvador
Jim Meyering j...@meyering.net writes:

 When testing for the readline library, this works fine:

 echo 'char readline (); int main () { return readline (); }'  k.c
 gcc k.c -lreadline -ltermcap

 but in order to work around portability problems years ago, gnulib's
 lib-ignore.m4 makes it so the linker uses the --as-needed option:

 gcc k.c -Wl,--as-needed -lreadline -ltermcap

 and that fails on RHEL 5.3
 (with binutils-2.17.50.0.6-9.el5.x86_64 and gcc-4.1.2-44.el5.x86_64):

 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `PC'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `tgetflag'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `tgetent'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `UP'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `tputs'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `tgoto'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `tgetnum'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `BC'
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/libreadline.so: 
 undefined reference to `tgetstr'
 collect2: ld returned 1 exit status
 [Exit 1]

 And that makes parted's configure script fail to detect readline,
 which in turn resulted in some test failures.

 I'll look into it more, eventually.

Do you belive it is a bug in binutils? I tested it in Debian and it
works fine here.

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] nuke trailing blanks *without* inducing conflicts

2009-03-06 Thread Otavio Salvador
Jim Meyering j...@meyering.net writes:

 If anyone complains that their patches no longer apply,
 remember this:

 However, if you
 have an existing change, patch, branch etc. against the old TB-afflicted
 sources, you can easily adjust it to apply to the new, TB-cleaned
 sources.  Just filter it through this:

 perl -pe 's/[ \t]+$//'

 then it will apply just as well to the post-cleanup code as the
 original applied to the pre-cleanup code.

When you say filter it you mean pass it thorugh git filter-branch or
any other way?

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] When comparing use the same type of formats.

2009-02-20 Thread Otavio Salvador
Petr Uzel petr.u...@suse.cz writes:

 On Fri, Feb 20, 2009 at 01:54:14PM +0100, Joel Granados wrote:
  
  Is there a problem report?
  
  I'm wary of any patch that comes without a problem report
  and without a recipe for reproducing some failure.
 The url is
 http://lists.alioth.debian.org/pipermail/parted-devel/2008-October/thread.html.
 I don't see any additional relevant info.  As for a reprodusable
 issue... well I don't see one either.  I just did a thorough study of
 the code and it seems that we are making a mistake here.
 
 Petr: is there additional info on how to hit this?

 Yes, in Novell bugzilla, but for some reason not publicly available :(
 I can't do much with this, sorry.

Can't you try to make a reproducable case for this one from the
information you have?

That would be nice.

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] When comparing use the same type of formats.

2009-02-19 Thread Otavio Salvador
Joel Granados Moreno jgran...@redhat.com writes:

 * libparted/labels/gpt.c (_parse_header()) : The problem is that
 last_usable_if_grown and last_usable_min_default should be both CPU
 format, but last_usable_if_grown is converted to LE64.  Patch taken from
 parted mailing list, author (petr.uzel at suse.cz).

I'd rather suggest you to use git commit --author for this case; this
gives him the credit and makes easier to track who did each change.

Otherwise we could ask him to resend it.

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Add an error message for dasd.

2009-02-19 Thread Otavio Salvador
Joel Granados Moreno jgran...@redhat.com writes:

 * libparted/labels/dasd.c (dasd_probe) : Inform the user when no dasd
 volumes are present in a device.
 ---
  libparted/labels/dasd.c |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

[...]

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Dont try to stat stuff that we know does not exist.

2009-02-19 Thread Otavio Salvador
Joel Granados Moreno jgran...@redhat.com writes:

 modified:   libparted/arch/linux.c:  When we look for stuff in
 /proc/mounts, /proc/swaps and /etc/mtab, there is a possibility to
 receive none path elements.  Like none or tmpfs.  We are making
 a system call for each of these strings when it can be easily
 avoided.  This is most noticeable in situations that heavily use
 libparted, like the fedora installer.

[...]

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Initial btrfs support, only recognize it for now

2009-02-13 Thread Otavio Salvador
Joel Granados jgran...@redhat.com writes:

 Still a lot of work to be done I guess.  Its a very good idea implment
 this early, this will increase btrfs testing and such.  Guess this is
 a good candidate for the master branch

I agree but I also belive is it not yet ready for master or next yet;
I'd like to give it a try and would be also nice to cook a small set of
tests to cover it. After that we need to get the copyright assigment so
we can merge it.

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] [RFC] Do not automatically update GPT label in interactive mode

2009-02-13 Thread Otavio Salvador
Petr Uzel petr.u...@suse.cz writes:

 Hi,

 On Fri, Feb 13, 2009 at 08:15:54AM -0500, Joel Granados wrote:
 Hi Peter.
 
 I agree with you on this.  This patch is part of the set of patches I will 
 propose for parted for version 1.8.9.

 Nice to hear that. But please note that I have not tested the patch
 much as I do not have access to the affected fakeraid controller.
 However, synthetic tests with linear DM seemed to work fine.

In this case could you try to cook a test case for it?

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] [RFC] Do not automatically update GPT label in interactive mode.

2009-02-13 Thread Otavio Salvador
Joel Granados jgran...@redhat.com writes:

 Hi Peter.

 I agree with you on this.  This patch is part of the set of patches I
 will propose for parted for version 1.8.9.

Is it difficult to produce a test for this? Besides that, is it worth a
copyright assigment or not?

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Initial btrfs support, only recognize it for now

2009-02-12 Thread Otavio Salvador
Luca Bruno lu...@debian.org writes:

 Luca Bruno scrisse:

 Initial btrfs support, only recognize it for now
 
 Add initial btrfs support to libparted; just discovering
 the declared magic entry at the right place to recognize
 filesystem type, for the moment.
  
 As described by commit log, this is the initial effort for btrfs.
 Format was declared stable in 0.18 and code initially merged into linus'
 tree, so it should be safe to start deploying it.
 I hooked this patch together as I was working on gparted, and both seem
 to work[1]. 
 Still much room for improvements and many sharp edges, but I won't
 have time to work on it in the next future, so I'd liked to send it
 as-is.

I fear we'd need a copyright assigment to accept it since it is big enough.

From a fast looking I failed to understand why the copyright says 2000,
2009. This file is new so only 2009 looks enough.

I've not yet tested neither reviewed the patch and code.

TIA,

-- 
O T A V I OS A L V A D O R
-
 E-mail: ota...@debian.org  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH 3/3] don't try to translate 'lib/xstrtol-error.c'

2009-02-07 Thread Otavio Salvador
Jim Meyering j...@meyering.net writes:

 Since the gnulib xstrtol module (of which that is a part)
 will eventually come in with changes from next, I've gone
 ahead and found a use for it by fixing a small infelicity
 in clearfat.  It would fail to diagnose a bogus device number.

heh ok ok!

Nice catch!

-- 
Otavio Salvador  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] [PATCH 3/3] don't try to translate 'lib/xstrtol-error.c'

2009-01-31 Thread Otavio Salvador
---
 po/POTFILES.in |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8b2a9e2..96b43f2 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -13,7 +13,6 @@ lib/regcomp.c
 lib/rpmatch.c
 lib/version-etc.c
 lib/xalloc-die.c
-lib/xstrtol-error.c
 libparted/arch/beos.c
 
 debug/clearfat/clearfat.c
-- 
1.6.1.284.g5dc13


___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] [PATCH 1/3] remove architecture headers since they're not used around the code

2009-01-31 Thread Otavio Salvador
All architecture headers (linux.h, gnu.h and beos.h) are now removed
since they weren't being use on the rest of code and then looks
logical to simplify it.
---
 include/parted/Makefile.am |4 +---
 include/parted/beos.h  |   34 --
 include/parted/gnu.h   |   42 --
 include/parted/linux.h |   44 
 libparted/arch/beos.c  |9 -
 libparted/arch/gnu.c   |   16 +++-
 libparted/arch/linux.c |   19 ++-
 7 files changed, 42 insertions(+), 126 deletions(-)
 delete mode 100644 include/parted/beos.h
 delete mode 100644 include/parted/gnu.h
 delete mode 100644 include/parted/linux.h

diff --git a/include/parted/Makefile.am b/include/parted/Makefile.am
index dd0e1d4..a1ba960 100644
--- a/include/parted/Makefile.am
+++ b/include/parted/Makefile.am
@@ -6,9 +6,7 @@ endif
 
 partedincludedir  =$(includedir)/parted
 
-partedinclude_HEADERS = gnu.h  \
-   linux.h \
-   constraint.h\
+partedinclude_HEADERS = constraint.h   \
debug.h \
device.h\
disk.h  \
diff --git a/include/parted/beos.h b/include/parted/beos.h
deleted file mode 100644
index b4d692c..000
--- a/include/parted/beos.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-libparted - a library for manipulating disk partitions
-Copyright (C) 2006, 2007 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 3 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, see http://www.gnu.org/licenses/.
-*/
-
-#ifndef PED_BEOS_H_INCLUDED
-#define PED_BEOS_H_INCLUDED
-
-#include parted/parted.h
-#include parted/device.h
-
-#define BEOS_SPECIFIC(dev) ((BEOSSpecific*) (dev)-arch_specific)
-
-typedefstruct _BEOSSpecificBEOSSpecific;
-
-struct _BEOSSpecific {
-   int fd;
-};
-
-#endif /* PED_LINUX_H_INCLUDED */
-
diff --git a/include/parted/gnu.h b/include/parted/gnu.h
deleted file mode 100644
index a47b026..000
--- a/include/parted/gnu.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-libparted - a library for manipulating disk partitions
-Copyright (C) 2001, 2007 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 3 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, see http://www.gnu.org/licenses/.
-*/
-
-#ifndef PED_GNU_H_INCLUDED
-#define PED_GNU_H_INCLUDED
-
-#include parted/parted.h
-
-#include hurd/store.h
-
-#define GNU_SPECIFIC(dev)  ((GNUSpecific*) (dev)-arch_specific)
-
-typedefstruct _GNUSpecific GNUSpecific;
-
-struct _GNUSpecific {
-   struct store*   store;
-   int consume;
-};
-
-/* Initialize a PedDevice using SOURCE.  The SOURCE will NOT be destroyed;
-   the caller created it, it is the caller's responsilbility to free it
-   after it calls ped_device_destory.  SOURCE is not registered in Parted's
-   list of devices.  */
-PedDevice* ped_device_new_from_store (struct store *source);
-
-#endif /* PED_GNU_H_INCLUDED */
-
diff --git a/include/parted/linux.h b/include/parted/linux.h
deleted file mode 100644
index 1a4171d..000
--- a/include/parted/linux.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-libparted - a library for manipulating disk partitions
-Copyright (C) 2001, 2007 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 3 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 

Re: [parted-devel] [PATCH] Fix device-mapper partition path detection

2008-06-04 Thread Otavio Salvador
Guido Günther [EMAIL PROTECTED] writes:

 On Tue, May 27, 2008 at 09:43:37PM -0300, Otavio Salvador wrote:
 We copy dev-path to result since it doesn't has a partition number.
 In general device mapper devices can be partitioned, you'd have to
 decide by map type what to do (which is basically what the patches I
 sent do).

Could you check this patch and look if it is still needed (or if it's
wrong) in case using your patch?

-- 
Otavio Salvador  O.S. Systems
E-mail: [EMAIL PROTECTED]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Re: [parted-devel] leaks and errors, oh-my!

2008-05-30 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
 index 8bb9554..5be0235 100644
 --- a/libparted/labels/gpt.c
 +++ b/libparted/labels/gpt.c
 @@ -924,6 +924,7 @@ gpt_read (PedDisk * disk)
   ped_disk_commit_to_dev (disk);
  #endif

 +pth_free (gpt);
   return 1;

  error_delete_all:
 -- 
 1.5.6.rc0.30.g7c3f3

Bad indent.

 diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c
 index 0d8357b..148eea3 100644
 --- a/libparted/labels/gpt.c
 +++ b/libparted/labels/gpt.c
 @@ -1033,7 +1033,7 @@ gpt_write(const PedDisk * disk)
   GPTDiskData* gpt_disk_data;
   GuidPartitionEntry_t* ptes;
   uint32_t ptes_crc;
 -uint8_t* pth_raw = ped_malloc (pth_get_size (disk-dev));
 +uint8_t* pth_raw;
   GuidPartitionTableHeader_t* gpt;
   PedPartition* part;
   int ptes_size;
 -- 
 1.5.6.rc0.30.g7c3f3

I think you might fix this indenting (it looks that it was already
wrong before).

Please go ahead.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] test for improved DOS-partition-table recognition

2008-05-29 Thread Otavio Salvador
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Meyering [EMAIL PROTECTED] writes:

 Here's a test for the just-pushed bug fix.
 Easier than I thought it'd be.

From 2fb0836622aafcdcb7da511c3890a28887a36754 Mon Sep 17 00:00:00 2001
 From: Jim Meyering [EMAIL PROTECTED]
 Date: Thu, 29 May 2008 11:21:05 +0200
 Subject: [PATCH] test for improved DOS-partition-table recognition

 * tests/t2200-dos-label-recog.sh: New file.
 * tests/Makefile.am (TESTS): Add t2200-dos-label-recog.sh.

Ack

- -- 
O T A V I OS A L V A D O R
- -
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
- -
Microsoft sells you Windows ... Linux gives
 you the whole house.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ http://mailcrypt.sourceforge.net/

iD8DBQFIPqiOLqiZQEml+FURAutOAJ4kpExh/EaoOeaRGdSpbc9oJYl7JACeIb+C
0aikmHtb9l7Qv0kNWoJaSe8=
=tahO
-END PGP SIGNATURE-

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] avoid const-related compiler warnings

2008-05-29 Thread Otavio Salvador
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Meyering [EMAIL PROTECTED] writes:

 I noticed a bunch of const-related warnings.
 This fixes them.

 avoid const-related compiler warnings
 * libparted/arch/linux.c (init_dasd, init_generic): Likewise.
 * libparted/exception.c (type_strings, option_strings): Likewise.
 (ped_exception_get_type_string, ped_exception_get_option_string):
 * libparted/fs/ext2/ext2_block_relocator.c (ext2_block_relocator_flush):
 * libparted/fs/ext2/ext2_mkfs.c (_set_dirent): Likewise.
 * libparted/fs/fat/resize.c (ask_type): Likewise.
 * libparted/fs/fat/traverse.c (fat_traverse_begin): Likewise.
 * libparted/fs/fat/traverse.h (buffer_size): Likewise.
 * libparted/labels/mac.c (_rawpart_cmp_type, _rawpart_cmp_name):
 (_rawpart_is_partition_map, _rawpart_is_boot, _rawpart_is_driver):
 (_rawpart_has_driver): Likewise.
 * parted/parted.c (options, options_help, number_msg): Likewise.
 (label_type_msg_start, flag_msg_start, unit_msg_start): Likewise.
 (part_type_msg, fs_type_msg_start, start_end_msg, state_msg): Likewise.
 (device_msg, name_msg, resize_msg_start, copyright_msg, do_print):
 * parted/ui.c (prog_name, banner_msg, usage_msg, bug_msg): Likewise.
 (screen_width): Likewise.
 * parted/ui.h (prog_name): Likewise.

Ack

- -- 
O T A V I OS A L V A D O R
- -
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
- -
Microsoft sells you Windows ... Linux gives
 you the whole house.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ http://mailcrypt.sourceforge.net/

iD8DBQFIPqiiLqiZQEml+FURAoiGAJ9tyFfFVcXzlDpFzSicRPWZ2JL/RwCgvGp4
FEUdboOk6nf9lfEAXAAk1dw=
=pcSp
-END PGP SIGNATURE-

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] Progress about ipod issue (https://bugzilla.redhat.com/show_bug.cgi?id=212066)

2008-05-28 Thread Otavio Salvador
Hello,

I think I did some progress about the ipod issue.

Adding the bug patch or the current proposed Colin's patch it fixes
the label detection but fails due a bad geom. Looking at code, I found
where it was doing a wrong thing...

diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index e513a05..0b11867 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -378,9 +378,7 @@ linear_start (const PedDisk* disk, const DosRawPartition* 
raw_part,
PED_ASSERT (disk != NULL, return 0);
PED_ASSERT (raw_part != NULL, return 0);
 
-   return offset
-  + PED_LE32_TO_CPU (raw_part-start)
-   * (disk-dev-sector_size / 512);
+   return offset + PED_LE32_TO_CPU (raw_part-start);
 }
 
 static PedSector
@@ -391,8 +389,7 @@ linear_end (const PedDisk* disk, const DosRawPartition* 
raw_part,
PED_ASSERT (raw_part != NULL, return 0);
 
return linear_start (disk, raw_part, offset)
-  + (PED_LE32_TO_CPU (raw_part-length) - 1)
-   * (disk-dev-sector_size / 512);
+  + (PED_LE32_TO_CPU (raw_part-length) - 1);
 }
 
 #ifndef DISCOVER_ONLY

This provides right geom; code now has a segfault that I was unable to
find. Any hint?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] [PATCH] Fix device-mapper partition path detection

2008-05-27 Thread Otavio Salvador
We copy dev-path to result since it doesn't has a partition number.
---
 libparted/arch/linux.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index c332cf8..2f4c368 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -1970,12 +1970,13 @@ _device_get_part_path (PedDevice* dev, int num)
 /* replace /disc with /path%d */
 strcpy (result, dev-path);
 snprintf (result + path_len - 5, 16, /part%d, num);
+#ifdef ENABLE_DEVICE_MAPPER
+} else if (dev-type == PED_DEVICE_DM) {
+strcpy(result, dev-path);
+#endif
 } else if (dev-type == PED_DEVICE_DAC960
 || dev-type == PED_DEVICE_CPQARRAY
 || dev-type == PED_DEVICE_ATARAID
-#ifdef ENABLE_DEVICE_MAPPER
-|| dev-type == PED_DEVICE_DM
-#endif
 || isdigit (dev-path[path_len - 1]))
 snprintf (result, result_len, %sp%d, dev-path, num);
 else
-- 
1.5.5.1


___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Fix device-mapper partition path detection

2008-05-27 Thread Otavio Salvador
Otavio Salvador [EMAIL PROTECTED] writes:

 We copy dev-path to result since it doesn't has a partition number.

I'd like to push it but:

 - unsure if someone can spot anything wrong with that
 - usnure how to write a test case for that

Comments?

-- 
Otavio Salvador  O.S. Systems
E-mail: [EMAIL PROTECTED]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] detect device map type

2008-05-13 Thread Otavio Salvador
Guido Günther [EMAIL PROTECTED] writes:

 On Fri, May 09, 2008 at 01:51:04PM -0300, Otavio Salvador wrote:
 I've not tested the patch yet but for that be commited we'll need to
 do a paperwork to give the copyright to Free Software Fundation. Are
 you willing to sign it?
 This last hunk is debatable. Debian want's it for sure but I'm not sure
 other distros want it - it makes sure we return the correct partition
 names for the linear mapping partitions on multipath devices. We can
 keep this hunk Debian only though.

What is suitable for others needs the paper work. Can I ask people to
contact you?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Re: [parted-devel] [PATCH] detect device map type

2008-05-09 Thread Otavio Salvador
Guido Günther [EMAIL PROTECTED] writes:

 Hi,
 the attached patch (against current git) adds device mapper map type
 detection to parted. The gathered information is displayed within
 parted. 

Hello Guido,

I've not tested the patch yet but for that be commited we'll need to
do a paperwork to give the copyright to Free Software Fundation. Are
you willing to sign it?

Besides that, it would be nice to write a test case for that so we can
make sure to not broke it in future. Can you take a look on that too?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Re: [parted-devel] [PATCH] fix for 'parted --list' option -- does not generate an exception in non superuser mode

2008-05-05 Thread Otavio Salvador
Rakesh Pandit [EMAIL PROTECTED] writes:

 2008/5/5 Rakesh Pandit [EMAIL PROTECTED]:
 There where two convention errors in spacing.  Corrected.

   Attached is the patch.

  -
  Rakesh Pandit


 Sorry for trouble, I mistakenly attached my patch and was scrubbed.
 So, correct patch is below:

 diff --git a/parted/parted.c b/parted/parted.c
 index 0f6768b..15c2d23 100644
 --- a/parted/parted.c
 +++ b/parted/parted.c
 @@ -181,6 +181,17 @@ _timer_handler (PedTimer* timer, void* context)
  }
  }

 +static void
 +_superuser_warn ()
 +{
 +#ifdef HAVE_GETUID
 +if (getuid() != 0  !opt_script_mode) {
 +puts (_(WARNING: You are not superuser.  Watch out for 
 +permissions.));
 +}
 +#endif
 +}
 +
  static int
  _partition_warn_busy (PedPartition* part)
  {
 @@ -1573,11 +1584,23 @@ _print_list ()
  {
  PedDevice *current_dev = NULL;

 -ped_device_probe_all();
 + _superuser_warn ();
  ^ bad indent

 +retry:
 +ped_device_probe_all ();
 +current_dev = ped_device_get_next (NULL);
 +
 +if (!current_dev) {
 +if (ped_exception_throw (PED_EXCEPTION_ERROR,
 +PED_EXCEPTION_RETRY_CANCEL,
 +_(No device found))
 +== PED_EXCEPTION_RETRY)
 +goto retry;
 +}

 -while ((current_dev = ped_device_get_next(current_dev))) {
 +while (current_dev) {
  do_print (current_dev);
  putchar ('\n');
 +current_dev = ped_device_get_next (current_dev);
  }

  return 1;
 @@ -2429,12 +2452,7 @@ _init_commands ();
  if (!_parse_options (argc_ptr, argv_ptr))
  goto error_done_commands;

 -#ifdef HAVE_GETUID
 -if (getuid() != 0  !opt_script_mode) {
 -puts (_(WARNING: You are not superuser.  Watch out for 
 -permissions.));
 -}
 -#endif
 +_superuser_warn ();
  ^^ same here

  dev = _choose_device (argc_ptr, argv_ptr);
  if (!dev)

Could you try to make a test case for this problem?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] FYI: infrastructure update pushed

2008-04-30 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Hi,

 I've just pushed a few patches.
 They don't change the way parted itself works,
 but rather update the build and distcheck-related
 infrastructure with changes from gnulib and coreutils
 over the last few months.  Here are their one-line summaries:

 use gnulib's gnumakefile module
 more updates from gnulib and coreutils
 * doc/parted.texi: Update copyright dates.
 * bootstrap.conf (gnulib_modules): Add useless-if-before-free.
 Turn off strcmp/STREQ check.
 Exempt a build-related script from the copyright check.
 Pass NEWS-checking part of make syntax-check.
 Remove useless if tests before free.

 Of course, I did ensure that make distcheck passes.

Thanks a lot! :-)

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] History patchset

2008-02-23 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 libparted/history.c:
 Implements routines useful in managing parted disk history.
  wrong path?
  static int
 -_print_list ()
 +_print_list (void)
   ^ unrelated please undo, look for others.

From a code looking, looks ok. Will test it tomorrow or so.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] GPT BIOS Boot partition

2008-02-21 Thread Otavio Salvador
Robert Millan [EMAIL PROTECTED] writes:

 Besides that, we'd need to contact GNU people to see if your papers
 for GRUB also works for Parted or not. So we can get it in.

 Just checked; I'm not in the list for Parted.  But I'm willing to sign the
 paper, of course.

Could you please do that then? I guess it's easier when you're member
of other projects.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] History patchset

2008-02-08 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 The following 3 patches implement history/undo/redo behavior for parted.

 This change captures potential disk modifications based on what commands a 
 user
 issues.  The list of disk modifications can be displayed/queried, undone, or
 redone.  Eventually the changes can be commited to disk.  This prevents the 
 user
 from performing unwanted modifications to disk before they are ready.  Also, 
 the
 user can view the disk as if the modifications were taking place, even before
 the save their changes.

 These patches were based against the master this evening.

I think they're OK, just change the first line log. Use a short
description of the patch there instead of History patchset X of 3.

If noone objects, I'll apply them once you send those again.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [parted 1.8.8] msdos label and file system corruption issues with 2TB disk

2007-12-27 Thread Otavio Salvador
Michael Reed [EMAIL PROTECTED] writes:

 This problem has been confirmed to be present in both the parted provided
 by two major distros as well as version 1.8.8 downloaded from gnu.org.

Right. I'll take a look at it.

 I should mention at this point that we no longer have the system available
 for debugging.  I can probably improvise a configuration using md if
 you don't have adequate hardware at your disposal.

It would be nice if you could test the patch after it has been cooked
before we apply it. I do not have adequate hardware for this testing
and then your improvised configuration would rock! :-)

 Let me know if I can be of help in resolving this issue.

I'll get back to you.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Make inter-release --version output more useful.

2007-12-18 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 This is the same approach to version-numbering that started
 with git.git.  Most of the infrastructure comes verbatim from
 coreutils, and is now also used in the upstream autoconf repo.

 The idea is to get the version string directly from git.
 This eliminates the pre/post-release requirement to manually
 sync configure.ac with the latest tag.

 One detail: it'd be relatively expensive to regenerate a new
 version string after every commit, since doing that now requires
 to run autoconf (see the new GNUmakefile rules).  I've compromised
 in making it so when you run e.g., make dist or make beta,
 that triggers an autoconf run to regenerated the version string.

 I'll push this later today if no one objects.

No objection from my side. :-)

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] MBR Conversion and Preservation

2007-11-23 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 -Idea 0x00- Save/Load an MBR to file

 This would allow users, who toast their MBR to safely restore it.  Its nothing
 more than ` dd bs=512 count=1 if=dev of=user-file-name` merely implemented as 
 a
 read 512B and write to a user specified file.  Likewise, ability to 
 load/restore a previously saved MBR from this file would be convenient too.

I'd need to check but I think it's not 512B for all labels or arches.

 -Idea 0x01- Convert from one label to another label
 This could be useful, I've never had to do such, and I actually wonder if it
 would be useful to anyone else?

MBR to GPT would be nice :-)

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] cloning partition tables

2007-11-08 Thread Otavio Salvador
Bernd Schubert [EMAIL PROTECTED] writes:

 dd if=/dev/some_disk of=master_partition_table bs=1 count=17408
 dd if=/dev/master_partition_table of=/dev/another_disk bs=1 count=17408

ped_disk_duplicate IIRC.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Trivial patch to libparted/fs/ext2/ext2.c regarding incompatible feature message text

2007-10-29 Thread Otavio Salvador
Mark Neyhart [EMAIL PROTECTED] writes:

 Thanks for the instructions.  Here is the git generated patch file in its 
 entirety.

Great. I've commited it to both branches, master and stable-1.8.x

Thanks for the patch

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Trivial patch to libparted/fs/ext2/ext2.c regarding incompatible feature message text

2007-10-26 Thread Otavio Salvador
Mark Neyhart [EMAIL PROTECTED] writes:

 After finally having to go to the source to find out what the message

 File system has an incompatible feature installed

 really meant to me, I thought it might save time for others using
 ext2/3 to know what the compatible features are.  I made changes to
 the 1.8.8 version I obtained from the tarball but I don't know how to
 build a patch file in the format which you require.  Here's what I
 have now:

The easier way is to use our GIT repository.

Do:

git clone git://git.debian.org/git/parted/parted.git

Then apply your patch and use:

git commit -a

Properly document the change. Use a small description, one empty line,
long description.

Use git-format-patch origin/master.. -o patches-to-send

Send the generated file as attached for us.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] What should I work on?

2007-10-16 Thread Otavio Salvador
Debarshi 'Rishi' Ray [EMAIL PROTECTED] writes:

 I think I could help you with the vfs development.  What I think would
 be useful is to essentially treat each filesystem type, and
 corresponding library as a plugin to parted.  This would allow for the
 addition and extension for new filesystems relatively easy.  Merely
 attach/bind the desired parted function to a set of routines these
 outside libraries have.

 Yes, that was the idea when I wrote the SoC proposal some months back.
 David Cantrell was supposed to be my mentor then. Let's see if he has
 anything to add. :-)

Perfect :-)

I'd say that start converting most obvious filesystems to use
libraries will be of great help to draw the need interfaces for it.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] e2fsprogs license issue [ was: Re: What should I work on? ]

2007-10-16 Thread Otavio Salvador
David Cantrell [EMAIL PROTECTED] writes:

 On Tue, 16 Oct 2007 15:39:05 -0200
 Otavio Salvador [EMAIL PROTECTED] wrote:

 David Cantrell [EMAIL PROTECTED] writes:
 
  However, we have a snag now.  Specifically with e2fsprogs.  Someone
  needs to talk to e2fsprogs and make sure their license will work
  with parted (which is now GPL v3).  Last I checked, e2fsprogs was
  GPLv2 only.
 
 Right. This is a serious issue to us since this could block us to use
 their libraries in this case.
 
 Does someone here knows e2fsprogs upstream? If yes, could we start to
 try to contact them and see if we can sort it out?

 I might be the best contact.  I know Stephen Tweedie (author of
 ext2/ext3 filesystems) and he works at Red Hat too.  I will talk to
 him and Ted T'so and see where we get.

 I'll keep everyone informed.

Thank you very much! We'll be waiting for the news.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Lossless partition resizing

2007-10-15 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 Would you be motivated too to work on library usage for fs code?

 Would you mind elaborating, I am not truly sure what you mean by
 library usage for fs code

We'd like to drop most of hand-made code for filesystems and use
libraries where possible to reduce the amount of code we need to
maintain and make it simple to follow fs improvements (new features
and like).

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [Parted-edge] [PATCH] Enable full memory dump

2007-09-15 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Frodo Baggins [EMAIL PROTECTED] wrote:
 Any thoughts on this?

 On 9/12/07, Frodo Baggins [EMAIL PROTECTED] wrote:
 From b8866155b7b9aed4c3035f3aeff8662e4c785e92 Mon Sep 17 00:00:00 2001
 From: Frodo Baggins [EMAIL PROTECTED]
 Date: Wed, 12 Sep 2007 00:11:37 +0530
 Subject: [PATCH] Enable full memory dump

 If user is root, we can remove the limit on core dump size. This may
 make it easier to debug dumps.
 The old limit is saved and restored at exit via atexit(3).

 Tools should not override settings I make in my shell.
 I.e., if I say I never want a core dump larger than X bytes,
 I'd be very upset if parted were to override that and
 create one regardless.

I ack on it. This is an option set by the admin and ought to be
respected.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [Parted-edge] [RFC][PATCH] Remove alloca from libparted/arch/linux.c

2007-09-06 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 IMHO, when something exceptional happens in a library, the
 affected function should simply return with an indication of
 what went wrong.  Unfortunately, making this particular
 library clean would be a big and risky task.

Yes, I now agree with you.

But Jim, if this is the right thing to do we ought start doing it now
since we can break API (on master).

Obviously that we're going to need a lot of testing and like but I
can't think in a better time for it.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [Parted-edge] [RFC][PATCH] Remove alloca from libparted/arch/linux.c

2007-09-06 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Otavio Salvador [EMAIL PROTECTED] wrote:
 But Jim, if this is the right thing to do we ought start doing it now
 since we can break API (on master).

 Obviously that we're going to need a lot of testing and like but I
 can't think in a better time for it.

 Most volunteers aren't interested in working on fixing an interface or
 an entire library/application just because it's ugly and unmaintainable --
 besides, as people tend to say, it already works, so why bother?.
 Of course, I think it's worth fixing, but I don't have much time for
 parted these days.

 Doing such clean-up work is hard, not sexy, and largely thankless.
 It'd be great to find qualified people to work on it.

Yes but we're starting to get more people sending patches and we might
get them involved at it.

You, me and others could help and coordinate it all together.

Frodo, ping?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [Parted-edge] [RFC][PATCH] Remove alloca from libparted/arch/linux.c

2007-09-05 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 I think it would be worthwhile (long term) to convert the other way,
 e.g., ped_free - free, ped_malloc - malloc, etc.

But wouldn't the exception handling be a good thing in this case?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] trivial typo fixes

2007-09-01 Thread Otavio Salvador
Frodo Baggins [EMAIL PROTECTED] writes:

From 5c355cf5faa9a16b46ff7ed40a480aa9e913 Mon Sep 17 00:00:00 2001
 From: Frodo Baggins [EMAIL PROTECTED]
 Date: Sat, 1 Sep 2007 16:45:16 +0530
 Subject: [PATCH] trivial typo fixes

I've tried to apply it and it failed. Like it's corrupted.

Can you export the patch and attach the file?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Cannot reproduce the problem

2007-08-31 Thread Otavio Salvador
Samuel Thibault [EMAIL PROTECTED] writes:

 Hi,

 Otavio Salvador, le Thu 30 Aug 2007 16:55:08 -0300, a écrit :
 I've produced [...] a test that was suppose to fail without the
 libparted/disk.c change (included on the patch and that you need to
 revert for testing) but I cannot make it to fail.

 Because it only tests primary partitions.  The bug happens only for
 extended partitions.

No. I've wrote the test to use extended partitions too and it passes
too, I've removed it since the code to write primary partitions is
smaller.

Can you try to make it to fail properly?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Re: [parted-devel] [PATCH] add malloc debugging using MALLOC_CHECK_

2007-08-31 Thread Otavio Salvador
Frodo Baggins [EMAIL PROTECTED] writes:

From 9beec03970ed9b4877b67e93a48eaf1e09b1ac9e Mon Sep 17 00:00:00 2001
 From: Frodo Baggins [EMAIL PROTECTED]
 Date: Fri, 31 Aug 2007 07:45:50 +0530
 Subject: [PATCH] add malloc debugging using MALLOC_CHECK_

 Set environment variable MALLOC_CHECK_ to 2 so that abort() is
 called when libc detects a heap problem. This way we get a memory dump
 to analyse in such conditions.

I'd like to hear from others about this patch but it looks OK to me.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Really duplicate the disk instead of readd every partition

2007-08-30 Thread Otavio Salvador
Otavio Salvador [EMAIL PROTECTED] writes:

 To avoid possible differences between the original disk layout and the
 duplicated one, a raw copy is done. Has been identified a case[1] where
 extended partitions had their positions changed due this.

  1. http://bugs.debian.org/294520

 This patch has been produced by Samuel Thibault [EMAIL PROTECTED]

I've runned all regressions tests and they all passes.

-- 
Otavio Salvador  O.S. Systems
E-mail: [EMAIL PROTECTED]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Really duplicate the disk instead of readd every partition

2007-08-30 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Otavio Salvador [EMAIL PROTECTED] wrote:
 Otavio Salvador [EMAIL PROTECTED] writes:

 To avoid possible differences between the original disk layout and the
 duplicated one, a raw copy is done. Has been identified a case[1] where
 extended partitions had their positions changed due this.

  1. http://bugs.debian.org/294520

 This patch has been produced by Samuel Thibault [EMAIL PROTECTED]

 I've runned all regressions tests and they all passes.

 Hi Otavio,

 As usual, when fixing bugs, you should add a test to exercise the fix.

Yes, I'll try to cook up something once I have time to commit it.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


[parted-devel] Cannot reproduce the problem

2007-08-30 Thread Otavio Salvador
Hello,

I've produced a patch for commit and a test that was suppose to fail
without the libparted/disk.c change (included on the patch and that
you need to revert for testing) but I cannot make it to fail.

I've tryed to use extended partitions and they also are cloned
properly so I think the problem is at QTParted. Can you check the test
and see if you can make it fail, reverting libparted/disk.c part?

From 45a6703fc9b65335862522b0c3223f2d5070011a Mon Sep 17 00:00:00 2001
From: Otavio Salvador [EMAIL PROTECTED]
Date: Thu, 30 Aug 2007 09:52:03 -0300
Subject: [PATCH] Really duplicate the disk instead of readd every partition

To avoid possible differences between the original disk layout and the
duplicated one, a raw copy is done. Has been identified a case[1]
where extended partitions had their positions changed due this.

 1. http://bugs.debian.org/294520

The recipe[2] to reproduce the problem, on the provided URI, has been
used to produced a test and hence be sure it's not forgotten anymore.

 2. http://bugs.debian.org/294520#34

The fix has been produced by Samuel Thibault [EMAIL PROTECTED]
---
 libparted/disk.c  |   17 ---
 libparted/tests/Makefile.am   |6 ++-
 libparted/tests/disk.c|  103 +
 libparted/tests/t2000-disk.sh |   27 +++
 4 files changed, 144 insertions(+), 9 deletions(-)
 create mode 100644 libparted/tests/disk.c
 create mode 100644 libparted/tests/t2000-disk.sh

diff --git a/libparted/disk.c b/libparted/disk.c
index e2e55c3..34b1677 100644
--- a/libparted/disk.c
+++ b/libparted/disk.c
@@ -223,23 +223,24 @@ static int
 _add_duplicate_part (PedDisk* disk, PedPartition* old_part)
 {
 	PedPartition*	new_part;
-	PedConstraint*	constraint_exact;
+	int ret;
 
 	new_part = disk-type-ops-partition_duplicate (old_part);
 	if (!new_part)
 		goto error;
 	new_part-disk = disk;
 
-	constraint_exact = ped_constraint_exact (new_part-geom);
-	if (!constraint_exact)
+	_disk_push_update_mode (disk);
+	ret = _disk_raw_add (disk, new_part);
+	_disk_pop_update_mode (disk);
+	if (!ret)
 		goto error_destroy_new_part;
-	if (!ped_disk_add_partition (disk, new_part, constraint_exact))
-   		goto error_destroy_constraint_exact;
-	ped_constraint_destroy (constraint_exact);
+#ifdef DEBUG
+	if (!_disk_check_sanity (disk))
+		goto error_destroy_new_part;
+#endif
 	return 1;
 
-error_destroy_constraint_exact:
-	ped_constraint_destroy (constraint_exact);
 error_destroy_new_part:
 	ped_partition_destroy (new_part);
 error:
diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am
index 12ad29f..851dcd5 100644
--- a/libparted/tests/Makefile.am
+++ b/libparted/tests/Makefile.am
@@ -5,11 +5,15 @@
 
 TESTS = t1000-label.sh
 EXTRA_DIST = $(TESTS)
-bin_PROGRAMS = label
+bin_PROGRAMS = label disk
 label_CFLAGS= $(CHECK_CFLAGS) -I$(top_srcdir)/include
 label_LDADD = $(CHECK_LIBS) $(top_builddir)/libparted/libparted.la
 label_SOURCES   = common.h common.c label.c
 
+disk_CFLAGS= $(CHECK_CFLAGS) -I$(top_srcdir)/include
+disk_LDADD = $(CHECK_LIBS) $(top_builddir)/libparted/libparted.la
+disk_SOURCES   = common.h common.c disk.c
+
 MAINTAINERCLEANFILES = Makefile.in
 
 CLEANFILES = init.sh
diff --git a/libparted/tests/disk.c b/libparted/tests/disk.c
new file mode 100644
index 000..25ec82a
--- /dev/null
+++ b/libparted/tests/disk.c
@@ -0,0 +1,103 @@
+#include config.h
+#include unistd.h
+
+#include check.h
+
+#include parted/parted.h
+
+#include common.h
+
+static char* temporary_disk;
+
+static void
+create_disk (void)
+{
+temporary_disk = _create_disk (20);
+fail_if (temporary_disk == NULL, Failed to create temporary disk);
+}
+
+static void
+destroy_disk (void)
+{
+unlink (temporary_disk);
+free (temporary_disk);
+}
+
+/* TEST: Create a disklabel on a simple disk image */
+START_TEST (test_duplicate)
+{
+PedDevice* dev = ped_device_get (temporary_disk);
+if (dev == NULL)
+return;
+
+PedDiskType* type;
+PedDisk* disk;
+		PedDisk* disk_dup;
+		PedPartition *part;
+		PedPartition *part_dup;
+		PedConstraint *constraint;
+
+		disk = _create_disk_label (dev, ped_disk_type_get (msdos));
+		
+		constraint = ped_constraint_any (dev);
+
+		/* Primary partition from 10MB to 15MB */
+		part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+  ped_file_system_type_get (ext2),
+  19584, 29311);
+		ped_disk_add_partition (disk, part, constraint);
+		
+		/* Primary partition from 16,4kB to 4981kB */
+		part = ped_partition_new (disk, PED_PARTITION_NORMAL,
+  ped_file_system_type_get (ext2),
+  32, 9727);
+		ped_disk_add_partition (disk, part, constraint);
+
+		ped_disk_commit (disk);
+
+		ped_constraint_destroy (constraint);
+
+		disk_dup = ped_disk_duplicate (disk);
+
+		/* Checks if both partitions match */
+		for (int i = 1; i = 2; i++) {
+			part = ped_disk_get_partition (disk, i);
+			part_dup

Re: [parted-devel] [PATCH] Enable malloc error checking

2007-08-27 Thread Otavio Salvador
Frodo Baggins [EMAIL PROTECTED] writes:

 Hi all,
 Below patch sets MALLOC_CHECK_ when DEBUG is defined to enable malloc
 error checking. There are some other minor cleanups too.
 I think we need to unset MALLOC_CHECK_ when exiting. I will try doing that 
 next.

I think that your patch ought to be splited in two. One for cleanups
and other for MALLOC_CHECK implemention.

Is it doable by you?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] History patch and test

2007-08-25 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 Just wondering if anyone has had time to play with the history patch,
 and/or its associated test set.  If so I am open for suggestions to
 modifications.

I looked and it looks OK I just hadn't yet time to test it to commit.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Fix mkpart linux-swap bug: would use 0x83 rather than 0x82

2007-08-14 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 As a follow-up to the thread on bug-parted,
   http://thread.gmane.org/gmane.comp.gnu.parted.bugs/9275
 here's the patch I outlined there:

 Fix mkpart linux-swap bug: would use 0x83 rather than 0x82

 * libparted/labels/bsd.c (bsd_partition_set_system): Include misc.h.
 Use is_linux_swap to test whether the type string matches.
 * libparted/labels/dasd.c (dasd_read, dasd_partition_set_system): Likewise.
 * libparted/labels/dos.c (msdos_partition_set_system): Likewise.
 * libparted/labels/mac.c (mac_partition_set_system): Likewise.
 * libparted/labels/rdb.c (amiga_partition_set_system): Likewise.
 * libparted/labels/sun.c (sun_partition_set_system): Likewise.
 Based on a patch by Kenneth MacDonald, from
 http://lists.gnu.org/archive/html/bug-parted/2007-07/msg00012.html.
 * libparted/labels/misc.h (is_linux_swap): New function/file.
 * libparted/labels/Makefile.am (liblabels_la_SOURCES): Add misc.h.
 * tests/t2100-mkswap.sh: New file, test for the above fix.
 * tests/Makefile.am (TESTS): Add t2100-mkswap.sh.

 Signed-off-by: Jim Meyering [EMAIL PROTECTED]

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Sanity check for dev, safety checks on diobuf.

2007-08-08 Thread Otavio Salvador
David Cantrell [EMAIL PROTECTED] writes:

 For stable and master.

 Make sure diobuf is NULL before we begin and make sure it isn't NULL when
 we try to free it.  Throw an exception if dev is NULL and we enter this
 function.

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] History patch pt2 (modifications to other files)

2007-08-08 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 Here is a fresh patch with the appropriate GPLv3 statement.
 This, as I mentioned earlier, was to be the patch I submitted on the
 14th of July, but that patch got botched somewhere on my side.  My
 apologies for that.

Just few comments about the patch.

First I think is good to split patch description on multiple lines so
it's easier to read. Besides that, I think we need, at least few tests
to make sure we don't break things after it gets merged.

Can you write some simple tests to try this new feature?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Ignore devices where we can't create a new PedDisk

2007-07-31 Thread Otavio Salvador
David Cantrell [EMAIL PROTECTED] writes:

 Patch for stable.

Ack but the shortlog could be shorter ;-)

 -- 
 David Cantrell [EMAIL PROTECTED]
 Red Hat / Westford, MA

 From 865ea3d3f2eb7918b64a00825dfa44e05651e2ad Mon Sep 17 00:00:00 2001
 From: David Cantrell [EMAIL PROTECTED]
 Date: Tue, 31 Jul 2007 13:59:27 -0400
 Subject: [PATCH] If we cannot create a new PedDisk for the device we're 
 looking at, return NULL rather than the device path.

Maybe: ped_device_get needs to return NULL if ped_disk_new fails
?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] add Xen virtual block device type

2007-07-31 Thread Otavio Salvador
David Cantrell [EMAIL PROTECTED] writes:

 Patch for stable.

Ack. Shouldn't it go to master too?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Detect Xen block devices

2007-07-31 Thread Otavio Salvador
David Cantrell [EMAIL PROTECTED] writes:

 Patch for stable.

Ack. Shouldn't it go to master too?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Remove unused label

2007-07-31 Thread Otavio Salvador
David Cantrell [EMAIL PROTECTED] writes:

 Patch for stable.

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] More correct handling of the HeaderSize field in GPT labels

2007-07-08 Thread Otavio Salvador
Matthew S. Harris [EMAIL PROTECTED] writes:

 On 7/8/07, Otavio Salvador [EMAIL PROTECTED] wrote:
 Matthew S. Harris [EMAIL PROTECTED] writes:

  In general, if there end up being multiple, backwards-compatible
  versions of the EFI spec, then Parted should be able to operate on the
  set of headers it knows about and ignore the rest.

 That's the major issue. I personally dislike to believe on that.

 I see.  Is your concern that changes to the EFI spec won't be
 backwards-compatible, or that Parted will not be careful enough in its
 handling of the part of the header it doesn't understand?

I think if there're things we're not aware of we ought to abort
instead of continue the work and _guess_ it'll work properly. Think if
something would be need to be changed on those new headers to the
system work properly and due it we might break a user system.

  In this case, the EFI spec shows a table of the fields in the header,
  and it includes as the last field all the remaining space in the
  block.  OpenSolaris interprets this to mean that HeaderSize is the
  size of the block; Parted obviously does not.  This is significant
  because the CRC of the header is supposed to be of HeaderSize bytes.
  That's why this change is needed.

 Sorry but I didn't get what you mean by the way of OpenSolaris to
 work.

 You mean that OpenSolaris cannot check the CRC since it interprets the
 size wrongly, is it?

 No, I mean that Parted cannot check the CRC of an OpenSolaris
 partition because Parted uses a constant rather than the value of
 HeaderSize in the disk label to determine how many bytes to compute
 the CRC over.

Isn't it a bug then?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Failure with O_DIRECT

2007-07-05 Thread Otavio Salvador
Michael Brennan [EMAIL PROTECTED] writes:

 Sorry I accidentally mailed you instead of the list first,
 I've CC'd this one.

 On Thu, Jul 05, 2007 at 01:59:28PM -0300, Otavio Salvador wrote:
 Michael Brennan [EMAIL PROTECTED] writes:
 
 On 7/4/07, Otavio Salvador [EMAIL PROTECTED] wrote:
Have you tested with lastest 2.4 series too?
 
 Yes, I have tried the latest kernels from both 2.4 and 2.6 now and
 I found that 2.4 does not work while 2.6 works fine.
 
 Ok, right.
 
   I did some research about it and looks like we're not suppose to use
   O_DIRECT but madvice or posix_fadvice.
 
 What is the main reason this non-buffering mechanism is used in parted?
 Is it for performance?  Or something other, like reducing the risk of
 corrupting data?
 
 Probably to avoid possible corruption due a poweroff and like.

 I'm probably missing something, but, if a power failure happens in the
 middle of an unbuffered write, wouldn't that do more damage than if
 the write is still in the buffers and haven't been synced yet?

More or less. If we are moving data, I think is better to be unbuffered.

 
 The other partitioning tools I've used seem to use normal write
 operations and then sync the disks right afterwards, on the other
 hand, they only write the partition table to disk and does not
 have the advanced features parted has.
 
 The only risk I can think is when a freeze or a poweroff happens but
 we might output an warning on those cases and then move to
 posix_fadvice.

 Output a warning on which cases?

If the posix_fadvice will do what we need and warn when it's disabled.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Don't include config.h from internal headers

2007-07-03 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Bob Proulx reported the new build failures at
 http://buildbot.proulx.com:9001/.  They arise from
 changes in GnuLib that are pulled in automatically
 via bootstrap.  Those changes exposed the unnecessary
 multiple inclusion of config.h.

No problem ... I saw you're already commited it. Good :-D

I've been busy these days, sorry.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] History with undo redo

2007-07-03 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 On 7/3/07, Otavio Salvador [EMAIL PROTECTED] wrote:
 Or maybe just returns and exeptions that could be handled by the
 application?

 Good point.  I think I have a solution for this.  I'll try to dabble
 up something and submit by the weekend if I have time.

Good. I'm looking forward to see this :-D

Very good work :-D

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] Failure with O_DIRECT

2007-07-03 Thread Otavio Salvador
Otavio Salvador [EMAIL PROTECTED] writes:

 Michael Brennan [EMAIL PROTECTED] writes:

 2. How should the problem with O_DIRECT on my computer be solved?
 Open without O_DIRECT or find out the correct alignment in some way?

 Hello Michael,

 Is you able to reproduce it using lastest kernels or just with 2.4?
 Have you tested with lastest 2.4 series too?

I did some research about it and looks like we're not suppose to use
O_DIRECT but madvice or posix_fadvice. 

One example of it is GNOME-VFS where they do:

#v+
static GnomeVFSResult
do_forget_cache (GnomeVFSMethod *method,
 GnomeVFSMethodHandle *method_handle,
 GnomeVFSFileOffset offset,
 GnomeVFSFileSize size)
{
FileHandle *file_handle;

g_return_val_if_fail (method_handle != NULL, GNOME_VFS_ERROR_INTERNAL);

file_handle = (FileHandle *) method_handle;

#ifdef HAVE_POSIX_FADVISE
posix_fadvise (file_handle-fd, offset, size, POSIX_FADV_DONTNEED);
#endif

return GNOME_VFS_OK;
}
#v-

Once I have time I'll see if I can prepare a patch for testing using
this idea.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] bfs.c weirdness

2007-07-02 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 The way to find out is to look in the logs.
 If anyone can point to an old CVS or svn repository, please do.
 I too have wanted to be able to look up the answer to questions
 like this one, but the git repository has very little history.

 If I get a reasonably complete set of deltas, I might even
 take the time to rebuild the repository, grafting in the old ones.

The SVN is on Alioth.

svn://svn.debian.org/svn/parted/

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] bfs.c weirdness

2007-07-02 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Leslie P. Polzer [EMAIL PROTECTED] wrote:
 I was hoping to get a copy of the *repository* (aka repo).
 Having it locally would make the conversion to git an order of
 magnitude faster, and I'll have to do that a few times.

 IIRC you can ssh to Alioth.  Otavio might be able to tell you more.

 Thanks.  It didn't take *that* long, after all.

 FWIW, I now have a conversion of svn://svn.debian.org/svn/parted's
 upstream/trunk, but it covers only 2005-09-17 thru 2006-11-17.
 Does anyone know of an older repository?

IIRC it was located on other dir of svn repository. You'll probably
need to check the dump to see it.

You can get a full dump using ssh on alioth.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] bfs.c weirdness

2007-07-02 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Otavio Salvador [EMAIL PROTECTED] wrote:
 Jim Meyering [EMAIL PROTECTED] writes:
 ...
 FWIW, I now have a conversion of svn://svn.debian.org/svn/parted's
 upstream/trunk, but it covers only 2005-09-17 thru 2006-11-17.
 Does anyone know of an older repository?

 IIRC it was located on other dir of svn repository.

 Thanks for the suggestion, but I've already looked under parted,
 parted/upstream, and parted/upstream/branches.  No luck.

Yes. I've done some greping and also didn't locate anything else.

 You'll probably need to check the dump to see it.

 What do you mean by check the dump?

http://alioth.debian.org/~otavio/parted-old-svn.dump.bz2

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] bfs.c weirdness

2007-06-30 Thread Otavio Salvador
Debarshi 'Rishi' Ray [EMAIL PROTECTED] writes:

 I was running indent on the Parted sources, when I noticed a couple of
 issues. One of them being at ./libparted/fs/bfs/bfs.c:65

   if (!ped_geometry_read (geom, buf, 0, 1))
   return 0;

 //if ( PED_CPU_TO_LE32((uint32_t)buf) == BFS_MAGIC )
   return ped_geometry_new (geom-dev, geom-start,
  ped_div_round_up (
  PED_CPU_TO_LE32((uint32_t)(buf+8)),

 Any idea what this was supposed to be?

#v+
if (!ped_geometry_read (geom, buf, 0, 1))
return 0;

return ped_geometry_new (geom-dev, geom-start,
 ped_div_round_up 
(PED_CPU_TO_LE32((uint32_t)(buf+8)),
#v-

Maybe?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] History with undo redo

2007-06-29 Thread Otavio Salvador
Matt Davis [EMAIL PROTECTED] writes:

 Otavio,
 I deeply appreciate your suggestions and comments.  I agree with your
 suggestions as annotated below.

No problem :-) Let's continue with the discussion ;-)

 On 6/28/07, Otavio Salvador [EMAIL PROTECTED] wrote:
 I prefer ped_disk_commit_to_history on disk.h like others...

 I avoided placing the ped_disk_commit_to_history() in disk.h since
 knowledge of the struct Command was necessary, and that would require
 the use of publishing Command.h in parted/include.

I see the technical reason now but again we need to improve it.

If we're adding it on the library we ought to have it completely there
or we ought provide just the basis for it and leave to the UI the code
that uses that.

  --- /dev/null
  +++ b/parted/history.c
  @@ -0,0 +1,193 @@
 ...
  +void ped_disk_commit_to_history(const PedDisk *disk)
  +{
  +PedHistMgr.end-disk = ped_disk_duplicate(disk);
  +}

 Please, move it to disk.{c,h}

Where it uses the Command.h?

  +static void history_pr(PedHistObj *obj)
  +{
  +/* Only print disk changes */
  +if (!obj-disk)
  +  return;
  +
  +printf([History %d]\t, obj-id);
  +str_list_print_wrap(obj-cmd.names, screen_width(), 8, 8);
  +if (obj-ignore)
  +  printf( (UNDONE));
  +fputs(\n, stdout);
  +}
  +
  +
  +/* Print range (or specific if start == end) */
  +void history_print(int start, int end)
  +{
  +int i;
  +PedHistObj *ii;
  +
  +for (i=0, ii=PedHistMgr.begin;
  + ii  i=start  iend;
  + ii=ii-next, i++)
  +{
  +history_pr(ii);
  +}
  +}

 history_pr could be written inside of history_print. I see no reason
 for the spliting.

 Just wanted some flexability in printing, one interface to print a
 single 'history' so that a single, all, or range of histories can all
 be printed.  But I do not see much utility in printing a range or
 single entry, since the only use is to view what history has been
 collected (print all should be fine).

I agree and that's why I suggested you to merge it.

 One thing I do think is important here is to have tests for it. It's a
 quite big change and would be good to be sure we don't keep stupid
 bugs on it.

 Yep, having automated tests is of course very important.  I just
 wanted to provide an initial checkin so that the community know whats
 up, and obtaining feed back is good too :-).

Yes, I understand it.

I think that before start to refactory your proposed patch you should
write the tests to avoid breaking things without notice.

Another thing is that your patch could be splited in a patchset.

I personally see the following patch:

 - history.[ch], Makefile.am: Add history support
 - commands.c: Add every ran command on the history
 - parted.c: Uses the new history support to allow do and undo functionality

Probably it can be improved but doing a brief look on it, those
are easy to identify.

I'm wondering if parted or libparted is the right place to support
it. I'm starting to think that it should be done on libparted and
parted itself just use this support.

Doing it on libparted  makes easy to others to use it too and also
avoid code duplication for them.

Thoughts?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Work around test failures caused by inadequate libreadline.

2007-06-25 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 * configure.ac: Reject an inadequate libreadline5.0.
 * parted/ui.c (_readline) [!HAVE_LIBREADLINE]: Echo each
 just-read line, to be consistent with libreadline5.2.

 Signed-off-by: Jim Meyering [EMAIL PROTECTED]

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Avoid mklabel test failure with very small file on Linux-2.6.8.

2007-06-25 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Here are two patches.  Together, since they address the
 same underlying portability problem.

 Signed-off-by: Jim Meyering [EMAIL PROTECTED]

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Fix two make check-as-root failures.

2007-06-12 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Filtered through cat -A, so the ^M-infested lines are readable.

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Avoid unnecessary writes in test scripts.

2007-06-11 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 This changes the tests to create sparse files for some test inputs
 rather than zero-filled non-sparse ones.  Doing this cuts more than 50% off
 the run time of make check in the tests/ directory.

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH] Fix inconsistent prompt for file system type.

2007-06-11 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Barely worth posting about, but...

 * parted/parted.c (do_mkfs): Use a consistent prompt when asking
 for a file system type.

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] [PATCH included] EXT2 FS code in parted

2007-06-11 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 FYI, I spent some time looking at the resize bug for which Matt provided a
 test case a couple weeks ago.  Along the way, I found that the ext2
 FS-*creation* code is not up to snuff.  For example, creating an EXT2
 partition of certain unfortunate sizes fails unnecessarily.  For example,
 here's a demonstration using one of the smallest sizes:

 Run this:

 dev=F
 dd if=/dev/null of=$dev bs=1 seek=20M
 ./parted -s $dev mklabel gpt
 ./parted -s $dev mkpartfs primary ext2 0 16796160B

 It fails with this diagnostic:

 Error: Attempt to write sectors 32772-32773 outside of partition on /t/F.

 But if you choose a size that's one byte smaller, it works:

 ./parted -s $dev mkpartfs primary ext2 0 16796159B

 The difference is in how ext2_mkfs_write_meta computes
 the number of block groups.  In the former case, it computes
 numgroups = 3.  In the latter, numgroups = 2.
 The trouble with the first case is that there isn't enough
 space for 3 full block groups in a file system of that size.
 Hence the eventual attempt to write beyond the initially-
 established end-of-file-system mark.

 Not too keen on the state of parted's bit-rotting FS code
 in the first place, now I'm looking at e2fsprogs with an eye
 to replacing all ext2-related code right away.  e2fsprogs is
 obviously well maintained, with an extensive test suite and
 an existing library/API, so it looks like it'd be a fine
 replacement for what's in parted.

 Is anyone already working on this?

Not that I know.

From f0cbb9129a2a9af6d282963f2d072719273915e9 Mon Sep 17 00:00:00 2001
 From: Jim Meyering [EMAIL PROTECTED]
 Date: Mon, 11 Jun 2007 14:34:39 +0200
 Subject: [PATCH] Add a test to record the current EXT2 mkpartfs failure for 
 some sizes.

 Run this:

 dev=F
 dd if=/dev/null of=$dev bs=1 seek=20M
 ./parted -s $dev mklabel gpt
 ./parted -s $dev mkpartfs primary ext2 0 16796160B

 It fails with this diagnostic:

 Error: Attempt to write sectors 32772-32773 outside of partition on /t/F.

 But if you choose a size that's one byte smaller, it works:

 ./parted -s $dev mkpartfs primary ext2 0 16796159B

 The difference is in how ext2_mkfs_write_meta computes
 the number of block groups.  In the former case, it computes
 numgroups = 3.  In the latter, numgroups = 2.
 The trouble with the first case is that there isn't enough
 space for 3 full block groups in a file system of that size.
 Hence the eventual attempt to write beyond the initially-
 established end-of-file-system mark.

 Signed-off-by: Jim Meyering [EMAIL PROTECTED]

Ack.

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


Re: [parted-devel] FYI, preparation for 2048-byte sector sizes across the board

2007-06-01 Thread Otavio Salvador
Jim Meyering [EMAIL PROTECTED] writes:

 Otavio Salvador [EMAIL PROTECTED] wrote:

 Jim Meyering [EMAIL PROTECTED] writes:

 diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c
 index 747a9c5..26a8b60 100644
 --- a/libparted/labels/bsd.c
 +++ b/libparted/labels/bsd.c
 @@ -141,30 +142,45 @@ alpha_bootblock_checksum (char *boot) {
 ...
  static int
  bsd_probe (const PedDevice *dev)
  {
 -   charboot[512];
 -   BSDRawLabel *label;
 +   BSDRawLabel *partition;

 PED_ASSERT (dev != NULL, return 0);

 -if (dev-sector_size != 512)
 +if (dev-sector_size  512)
  return 0;

 Shouldn't it be:
if (dev-sector_size%512 != 0)
return 0;

 Thanks for looking at it, but no.

 First, your replacement would mistakenly allow a dev-sector_size value
 of 0 through.  More importantly, there is already plenty of code (e.g.,
 in linux.c) that ensures it is a multiple of 512, so it would be redundant
 to check for that in each label/*.c's *_probe function.

Well but then we should trust the sector_size and continue. Maybe we
ought to have a static method to check it and use it in all code to
avoid mistakes?

-- 
O T A V I OS A L V A D O R
-
 E-mail: [EMAIL PROTECTED]  UIN: 5906116
 GNU/Linux User: 239058 GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
-
Microsoft sells you Windows ... Linux gives
 you the whole house.

___
parted-devel mailing list
parted-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/parted-devel


  1   2   3   4   >