[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rstatd: does not work with kernel 3.0/3.1 or any other 3.x kernel (s-p-u possible?)



Hi Julien, hi Anibal

On Wed, Jun 06, 2012 at 07:21:18PM +0200, Julien Cristau wrote:
> On Wed, Jun  6, 2012 at 10:34:04 +0200, Salvatore Bonaccorso wrote:
> 
> > diff -u rstatd-4.0.1/getdata.c rstatd-4.0.1/getdata.c
> > --- rstatd-4.0.1/getdata.c
> > +++ rstatd-4.0.1/getdata.c
> > @@ -289,6 +289,10 @@
> >  		getdata.disk = get_disk26;
> >  		getdata.vm = get_vm26;
> >  	}
> > +	if (0 == strncmp(u.release, "3", 1)) {
> > +		getdata.disk = get_disk26;
> > +		getdata.vm = get_vm26;
> > +	}
> >  
> >  	/* prepare the disk patterns */
> >  	for (i = 0; i < PATTERNS; i++) {
> 
> That seems silly.  Make it the default, not yet another broken "if".

Agreed, and thanks for feedback. Indeed the fix was simply taken from
the version in unstable, which maybe should change that too.

Attached is the new debdiff for it.

Regards,
Salvatore
diff -u rstatd-4.0.1/getdata.c rstatd-4.0.1/getdata.c
--- rstatd-4.0.1/getdata.c
+++ rstatd-4.0.1/getdata.c
@@ -285,7 +285,8 @@
 	if (0 == strncmp(u.release, "2.4", 3)) {
 		getdata.disk = get_disk24;
 	}
-	if (0 == strncmp(u.release, "2.6", 3)) {
+	/* defaults to get_*26 for kernel version >= 2.6 */
+	else {
 		getdata.disk = get_disk26;
 		getdata.vm = get_vm26;
 	}
diff -u rstatd-4.0.1/debian/changelog rstatd-4.0.1/debian/changelog
--- rstatd-4.0.1/debian/changelog
+++ rstatd-4.0.1/debian/changelog
@@ -1,3 +1,15 @@
+rstatd (4.0.1-4+squeeze1~local1) stable; urgency=low
+
+  * Non-maintainer upload.
+  * Patch getdata.c. Work with 3.x Linux kernels. A machine running
+    kernel 3.x an the rpc.rstatd does not reply to any rup or rusers
+    request from remote or even from local host. This renders the
+    package unusable.
+    Patch by Thomas Lange
+    Closes: #654276
+
+ -- Salvatore Bonaccorso <carnil@debian.org>  Wed, 06 Jun 2012 09:40:37 +0200
+
 rstatd (4.0.1-4) unstable; urgency=low
 
   * Reduce log verbosity; closes: #418969 
@@ -131 +142,0 @@
-

Attachment: signature.asc
Description: Digital signature


Reply to: