• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How do I distinguish an NTFS from a FAT 32 file system on a GPT disk?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I distinguish an NTFS from a FAT 32 file system on a GPT disk?


  • Subject: Re: How do I distinguish an NTFS from a FAT 32 file system on a GPT disk?
  • From: Mark Day <email@hidden>
  • Date: Thu, 18 Mar 2010 14:12:44 -0700

If you can mount the partitions on Mac OS X, then you can look at the file system type name (for example, the f_fstypename field returned by statfs).

If you need to do this for a partition that isn't mounted, you'll have to read in the boot sector (sector #0 of the partition) and check the fields.  The sources for the msdos.util and ntfs.util programs from Mac OS X are available.  In particular, check out the code that handles the "-p" (probe) option; this is used by Disk Arbitration to determine which file system types claim to recognize a given disk or partition.  See:
<http://www.opensource.apple.com/source/msdosfs/msdosfs-163/msdos_util.tproj/dosutil.c>
and
<http://www.opensource.apple.com/source/ntfs/ntfs-65.1/util/ntfs.util.c>

Just be sure to read and understand the licenses before you incorporate the code into your own.

-Mark

On Mar 18, 2010, at 1:34 PM, Jim O'Connor wrote:

> If I have a gpt formated disk with a fat 32 partition and a ntfs partition they both have the same content hint.
>
> How do I tell them apart? Different Apple utilities are able to do this, but they aren't applications we can get source code to.
>
>
> Thanks,
> Jim O'Connor _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Filesystem-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How do I distinguish an NTFS from a FAT 32 file system on a GPT disk? (From: Jim O'Connor <email@hidden>)

  • Prev by Date: Re: How do I distinguish an NTFS from a FAT 32 file system on a GPT disk?
  • Next by Date: Mount SMB volume
  • Previous by thread: Re: How do I distinguish an NTFS from a FAT 32 file system on a GPT disk?
  • Next by thread: Mount SMB volume
  • Index(es):
    • Date
    • Thread