[DTrace-devel] [PATCH 1/2] Support deeper version numbers (e.g. 2.0.4.x)

Kris Van Hees kris.van.hees at oracle.com
Tue Jan 27 16:33:51 UTC 2026


On Mon, Jan 26, 2026 at 08:18:41PM -0500, Kris Van Hees wrote:
> On Mon, Jan 26, 2026 at 06:41:49PM -0500, eugene.loh at oracle.com wrote:
> > From: Eugene Loh <eugene.loh at oracle.com>
> > 
> > Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
> 
> Reviewed-by: Kris Van Hees <kris.van.hees at oracle.com>

Woops, I was too hasty on this.  More changes are needed...  See the following:

        if (current) {
                $0 = versions[idx[n]];
                if ($3 == 0)
                        printf "%s.%s", $1, $2;
                else
                        printf "%s.%s.%s", $1, $2, $3;

                exit(0);
        }

Obviously, we need to account here also for the possibility of 4 digits, and
then again in all the other places where we output version numbers.

> > ---
> >  libdtrace/mkvers | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libdtrace/mkvers b/libdtrace/mkvers
> > index 6f9240320..087c09169 100755
> > --- a/libdtrace/mkvers
> > +++ b/libdtrace/mkvers
> > @@ -10,7 +10,7 @@
> >  NF == 0 { next; }
> >  
> >  {
> > -	if (match($1, /^[1-9][0-9]*(\.[0-9]*){1,2}$/) == 0) {
> > +	if (match($1, /^[1-9][0-9]*(\.[0-9]*){1,3}$/) == 0) {
> >  		print "E: Invalid version string: " $1 >"/dev/stderr";
> >  		exit 1
> >  	}
> > -- 
> > 2.47.3
> > 



More information about the DTrace-devel mailing list