[parted-devel] [PATCH] libparted: Add support for MBR id and GPT GUID of UDF filesystem

Phillip Susi psusi at ubuntu.com
Tue Aug 21 19:30:16 BST 2018


On 8/19/2018 4:26 PM, Pali Rohár wrote:
> UDF detection is not simple when you want to do it correctly. But later
> I can implement it. What probe function needs to return? Just true/false
> if device is a UDF filesystem? Or it needs to return also some metadata?

It doesn't just have some magic number at some offset you can look for
to say yep, that looks like UDF?  IIRC, yes, it is just true/false.

>> Also could you add a NEWS entry and a test case?
> 
> NEW entry is there:

It wasn't in the patch you posted, did you forget to stage it for the
commit?

> About test case, I looked into repository and I'm really not sure what
> and how to write.
> 
> I just compiled and manually tested that when I create a new partition
> of udf type it has correct MBR id.

When you run make check, the various test scripts in tests/ are run.
They exercise parted in various ways and verify that it does what it's
supposed to.  Take a look at t2400-dos-hfs-partition-type.sh.  It looks
like almost exactly what you need to verify UDF on MBR ( just change the
partition ID ).  I thought we had some tests checking the other type
codes, but I don't see any that test GPT right now.  It should only need
a little more tweaking to that script to check the right bytes in GPT to
make sure they are using the right type code.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/parted-devel/attachments/20180821/624e6b3f/attachment.sig>


More information about the parted-devel mailing list