I've inherited some code that examines all available unmounted partitions and tries to determine the correct way to mount them. It checks the partition type ID using sfdisk, then issues the command
mount -t ext2 if it's a Linux partition, or the command
mount -t ntfs -o case_sensitive=true -o umask=0222 if it's an NTFS partition.
Now I'm trying to update this code to work on machines might be partitioned using GPT, where sfdisk doesn't work. I've concluded that I can still use the original logic if the target disk is partitioned using MBR, but I'm at a loss as to how to handle the GPT case, since Linux and Windows apparently both use the same partition type GUID for their data partitions. How can I know whether I need to include the
umask options? Or are they even still necessary at all?