View Single Post
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2007-01-16, 17:25

Quote:
Originally Posted by ShadowOfGed View Post
Here's a better way to do the probe, that mimics how Apple's ntfs.util behaves:

Code:
function Probe() { DEVICE="/dev/$2" LABEL=`/usr/local/sbin/ntfslabel -n ${DEVICE}` RESULT=$? if [ $RESULT -ne 0 ]; then # Reading the label failed, so it's not NTFS exit -2 # FSUR_UNRECOGNIZED else # Reading label succeeded, so it's NTFS echo -n "${LABEL}" exit -1 fi }
Run Apple's ntfs.util on an unmounted, but present NTFS volume, and see how it's output acts.
But what happens if the volume doesn't have a label?

Quote:
This mimics it exactly, and might perhaps get name detection down.
Name detection is fine, actually:
Code:
`/usr/local/sbin/ntfslabel -fq $device 2>/dev/null`
I've had that for a while; I just removed it temporarily while other mounting stuff was in the way.
  quote