bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need for a unique Linux GPT GUID type code (PATCH included)


From: Jim Meyering
Subject: Re: Need for a unique Linux GPT GUID type code (PATCH included)
Date: Mon, 27 Jun 2011 22:41:09 +0200

Rod Smith wrote:
> I'm attaching another patch that should be applied INSTEAD OF my
> earlier patch in order to support a new Linux-only GUID type code. The
> new patch is intended to address concerns about breaking programs that
> might assume the Microsoft Basic Data partition type code on Linux
> partitions by giving the option of setting that type code on Linux
> partitions. What this patch does is:
>
> - It creates a new Linux-only filesystem type code
>   (0FC63DAF-8483-4772-8E79-3D69D8477DE4)
>
> - It sets the new Linux type code on new partitions by default.
>
> - As in the current 3.0 code, non-Linux filesystems (FAT, NTFS,
>   HFS+, etc.), and some other partition types (Linux swap, LVM,
>   etc.) get codes that override the default.
>
> These three features are as in my earlier patch. The new changes are:
>
> - My patch creates a new flag, "msftdata", to explicitly represent the
>   Microsoft Basic Data type code. This flag is automatically set
>   on new FAT and NTFS partitions.
>
> - The msftdata flag may be added to any partition, thus changing
>   its type code GUID.
...

Thanks for the improved patch.
If you include the following, the result will then pass "make check":

diff --git a/tests/t0220-gpt-msftres.sh b/tests/t0220-gpt-msftres.sh
index 1247ee0..8ff9515 100755
--- a/tests/t0220-gpt-msftres.sh
+++ b/tests/t0220-gpt-msftres.sh
@@ -56,7 +56,8 @@ printf "BYT;\n$dev:${n_sectors}s:file:$ss:$ss:gpt:;\n" > exp
 i=1
 for type in $fs_types; do
   end=$(expr $start + $part_size - 1)
-  echo "$i:${start}s:${end}s:${part_size}s::$type:;" >> exp || fail=1
+  case $type in fat*|NTFS) flag=msftdata;; *) flag=;; esac
+  echo "$i:${start}s:${end}s:${part_size}s::$type:$flag;" >> exp || fail=1
   parted -s $dev mkpart primary $type ${start}s ${end}s > err 2>&1 || fail=1
   compare err /dev/null || fail=1
   parted -s $dev name $i $type > err 2>&1 || fail=1

Your change is large enough that in order for us to be able
to use it, we'll need a copyright assignment.
See the "Copyright assignment" section of the HACKING file
for details.  Can you do that?

If so, would you please also update the documentation
(doc/parted.texi) to reflect this change?

It'd be even better if you would also add a brief description in NEWS
and a test suite addition or two to exercise it.

If you post more patches to the list, please follow the procedure
outlined in HACKING so that text something like your prose above ends
up being included the commit log. (i.e., you'd generate your patch file
with a command like "git format-patch --stdout -1 > DIFF").

Thanks for contributing,

Jim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]