- The change implements File_GetMountPath() for POSIX,
using realpath(3) and readlink(2).
Changes to common header files; not applicable to open-vm-tools.
socklen_t inBufLen);
/*
* A setOption() implementation must have a symmetrical getOption()
- * counterpart.
+ * counterpart. The converse is not true -- a getOption()
+ * implementation need not have a setOption() counterpart. (One
+ * way to look at this is that an option may be read-only, but it
+ * must not be write-only.)
*/
int (*getOption)(AsyncSocket *asyncSocket,
AsyncSocketOpts_Layer layer,
File_GetMountPath(const char *pathName, // IN:
Bool checkEntirePath) // IN:
{
- NOT_IMPLEMENTED();
+ char *mountPath;
+
+ if (pathName == NULL) {
+ return NULL;
+ }
+
+ if (checkEntirePath) {
+ return Posix_RealPath(pathName);
+ }
+
+ mountPath = Posix_ReadLink(pathName);
+ if (mountPath != NULL) {
+ return mountPath;
+ }
+
+ if (!Posix_Access(pathName, F_OK)) {
+ return Util_SafeStrdup(pathName);
+ }
+
return NULL;
}
* ASYNC_SOCKET_OPTS_LAYER_<layer name 1>,
* ASYNC_SOCKET_OPTS_LAYER_<layer name 2>, ...
*/
+
+ ASYNC_SOCKET_OPTS_LAYER_BLAST_PROXY,
+
} AsyncSocketOpts_Layer;
/*