[PATCH 4/4] options: discontinue -xversion=V as a valid option

Kris Van Hees <[email protected]>
Newsgroups dev.linux.lists.dtrace
Message-ID <DS0PR10MB752231FDE310C37F66EEEB83C2ABA@DS0PR10MB7522.namprd10.prod.outlook.com>
DTrace allowed setting a previous version to operate in compatibility
mode.  Unfortunately, it was not fully implemented.  Translators are
not really versioned, and if a translator uses an identifier that does
not exist in the version specified in -xversion=V, data structures end
up corrupted.

Since the usefulness of -xversion=V seems to be less than the effort
needed to rectify the implementation, we are no longer supporting this
option.

Signed-off-by: Kris Van Hees <[email protected]>
---
 libdtrace/dt_options.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/libdtrace/dt_options.c b/libdtrace/dt_options.c
index 97516517..0a35e852 100644
--- a/libdtrace/dt_options.c
+++ b/libdtrace/dt_options.c
@@ -24,6 +24,7 @@
 #include <dt_pcap.h>
 #include <dt_string.h>
 #include <libproc.h>
+#include <port.h>
 
 static int
 dt_opt_agg(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
@@ -676,18 +677,7 @@ dt_opt_invcflags(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 static int
 dt_opt_version(dtrace_hdl_t *dtp, const char *arg, uintptr_t option)
 {
-	dt_version_t v;
-
-	if (arg == NULL)
-		return dt_set_errno(dtp, EDT_BADOPTVAL);
-
-	if (dt_version_str2num(arg, &v) == -1)
-		return dt_set_errno(dtp, EDT_VERSINVAL);
-
-	if (!dt_version_defined(v))
-		return dt_set_errno(dtp, EDT_VERSUNDEF);
-
-	return dt_reduce(dtp, v);
+	return dt_set_errno(dtp, ENOTSUPP);
 }
 
 static int
-- 
2.51.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.