• 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: AFPMountURL in OS X?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AFPMountURL in OS X?


  • Subject: Re: AFPMountURL in OS X?
  • From: Eric Peyton <email@hidden>
  • Date: Tue, 3 Jul 2001 11:44:54 -0500

On Monday, July 2, 2001, at 04:30 PM, Steve Herman wrote:

Can anyone provide some info on how to make AFPMountURL work. Or is is
broken in OS X?

I believe that it works fine, however I don't believe it is documented at all.


I've got a valid URL, as I can paste it into Finder's "Connect to
Server..." address field and the volume mounts just fine. But when I call
AFPMountURL it either fails or acts strangely.

- I'm not sure what to provide for the inMountPoint parameter. I've tried
various strings and the only thing that (sort of) works is an empty string.
Everything else seems to fail with an error 1 or 2. An empty string for the
mount point mounts the volume, but the volume cannot be unmounted without
rebooting. Attempting to drag the volume to the Trash or use Finder's
"File/Eject" menu item returns an error that the "action cannot be
completed because the disk is in use".

The inMountPoint parameter should be an empty char * buffer that the AFPMountURL fills with the results of where it mounted the filesystem at.

The reason that the volume is unejectable is probably because you are passing bad flags, and that causes afp to not inform disk arbitration of the state of the mount.


- I've been passing zeros for inMountFlags and inAltFlags... maybe I need
to use something different? And what's the difference between "mount
flags" and "alternate mount flags" anyway?

The mount flags are the same as what you would pass to a system mount() call. man 2 mount for examples. (MNT_RDONLY, MNT_NOATIME, MNT_NOEXEC etc.). I guess the alternate flags would be specific ones for afp, however, those do not appear to be published at this time ...

Since you are doing this as a Cocoa project, why don't you just fork and exec a mount_afp session?

Eric




FWIW, this is primarily a Cocoa app calling into the Carbon APIs.

Thanks,
Steve
--
+------------------------------------------------+
| Steve Herman |
| Macintosh Software Development and Support |
| OAO Corporation / NASA-ODIN |
| 102 Research Blvd, Bldg 2 |
| Madison, AL 35758 (voice) 256 319-2869 |
| email@hidden (fax) 256 319-2984 |
+------------------------------------------------+
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >AFPMountURL in OS X? (From: Steve Herman <email@hidden>)

  • Prev by Date: Re: object ownership question
  • Next by Date: Re: Initializing a string with an NSData
  • Previous by thread: AFPMountURL in OS X?
  • Next by thread: Re: [HELP] How to change Desktop background pic in OSX from Cocoa-Java
  • Index(es):
    • Date
    • Thread