]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Wed, 20 Jan 2010 21:40:57 +0000 (13:40 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Wed, 20 Jan 2010 21:40:57 +0000 (13:40 -0800)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/include/util.h

index de749ff026a4a05fec2f284db14d65c23238cff3..34a6dcf2bbbff89f67cd801188e7c6d12611f797 100644 (file)
 #include "vm_assert.h"
 #include "unicodeTypes.h"
 
+#ifdef __APPLE__
+   #define SYSTEM_VOL_DIR "/Volumes"
+#endif
+
 /*
  * Define the Util_ThreadID type.
  */
@@ -80,6 +84,30 @@ EXTERN io_service_t Util_IORegGetDeviceObjectByName(const char *deviceName);
 EXTERN char *Util_GetBSDName(const char *deviceName);
 EXTERN char *Util_IORegGetDriveType(const char *deviceName);
 EXTERN char *Util_GetMacOSDefaultVMPath();
+
+/* 
+ * Mac laptops without a cdrom drive (currently only the Air, but maybe
+ * more in the future) provide a way to use a desktop's cdrom drive
+ * remotely over the network.  These functions enumerate all such
+ * remote disks currently mounted as volumes, and return a list of
+ * volume to bsd name mappings.  The bsd device can be considered a
+ * flat-file representation of the disk contents and can be connected
+ * to our cdrom image backend.  We also include the size, since we must
+ * get that from the IO registry as well, and it doesn't change while
+ * the disk is mounted.
+ * 
+ * FYI, Apple calls this "Remote Disc" not "Remote Disk", so we follow
+ * that convention here too.
+ */
+typedef struct RemoteDiscList {
+   char                  *bsdName;
+   char                  *name;
+   uint64                 size; // In bytes
+   struct RemoteDiscList *next;
+} RemoteDiscList;
+
+EXTERN RemoteDiscList *Util_GetRemoteDiscList(void);
+EXTERN void Util_FreeRemoteDiscList(RemoteDiscList *list);
 #endif // __APPLE__