2011/5/18 Eric Blake <eblake@xxxxxxxxxx>: > The on-the-wire protocol is identical; XDR guarantees that > both 'hyper' and 'unsigned hyper' are transmitted as 8 bytes. > > * src/remote/remote_protocol.x (remote_get_version_ret) > (remote_get_lib_version_ret): Match public API. > * daemon/remote_generator.pl: Drop special case. > * src/remote_protocol-structs: Reflect updated type. > --- > > v2: fix src/remote_protocol-structs > v1: reviewed but no ACK at: > https://www.redhat.com/archives/libvir-list/2011-May/msg00718.html > > Âdaemon/remote_generator.pl  |  23 +++++++++-------------- > Âsrc/remote/remote_protocol.x |  Â4 ++-- > Âsrc/remote_protocol-structs Â|  Â4 ++-- > Â3 files changed, 13 insertions(+), 18 deletions(-) > > diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl > index a3b8421..1fc3b17 100755 > --- a/daemon/remote_generator.pl > +++ b/daemon/remote_generator.pl > @@ -995,19 +988,21 @@ elsif ($opt_k) { >           $single_ret_type = "int"; >         } elsif ($ret_member =~ m/^unsigned hyper (\S+);/) { >           my $arg_name = $1; > -          Âpush(@ret_list, "rv = ret.$arg_name;"); > -          Â$single_ret_var = "unsigned long rv = 0"; > -          Â$single_ret_type = "unsigned long"; > -        Â} elsif ($ret_member =~ m/^hyper (\S+);/) { > -          Âmy $arg_name = $1; > - >           if ($call->{ProcName} =~ m/Get(Lib)?Version/) { >             push(@args_list, "unsigned long *$arg_name"); >             push(@ret_list, "if ($arg_name) *$arg_name = ret.$arg_name;"); >             push(@ret_list, "rv = 0;"); >             $single_ret_var = "int rv = -1"; >             $single_ret_type = "int"; > -          Â} elsif ($call->{ProcName} eq "NodeGetFreeMemory") { > +          Â} else { > +            Âpush(@ret_list, "rv = ret.$arg_name;"); > +            Â$single_ret_var = "unsigned long rv = 0"; > +            Â$single_ret_type = "unsigned long"; > +          Â} > +        Â} elsif ($ret_member =~ m/^hyper (\S+);/) { > +          Âmy $arg_name = $1; > + > +          Âif ($call->{ProcName} eq "NodeGetFreeMemory") { >             push(@ret_list, "rv = ret.$arg_name;"); >             $single_ret_var = "unsigned long long rv = 0"; >             $single_ret_type = "unsigned long long"; I tested that a new virsh connected to an old libvirtd still gives the right version number. ACK. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list