In windows there is no clear way to distinguish between a
socket fd and a file fd.
We use the function, describe_fd() mostly for debugging.
For now, return a generic statement.
Co-authored-by: Linda Sun <lsun@vmware.com>
Signed-off-by: Linda Sun <lsun@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
struct stat s;
ds_init(&string);
+#ifndef _WIN32
if (fstat(fd, &s)) {
ds_put_format(&string, "fstat failed (%s)", ovs_strerror(errno));
} else if (S_ISSOCK(s.st_mode)) {
put_fd_filename(&string, fd);
#endif
}
+#else
+ ds_put_format(&string,"file descriptor");
+#endif /* _WIN32 */
return ds_steal_cstr(&string);
}