[maemo-users] Re: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet

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

 



  Hi, 

I fixed the stupid 'swapname == NULL' bug of 0.2.7-1, that happened 
when the icon was clicked the 1st time on any device, which did not 
have 0.2.6-1 installed previously:

http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.7-2_arm.deb
http://www.arminwarda.mynetcologne.de/load-plugin-aw_0.2.7-2.tar.gz
http://www.arminwarda.mynetcologne.de/patch5

  Armin.

On Tuesday 28 February 2006 10:48, Armin M. Warda wrote:
>   Hi,
>
> sorry for this problem. I will integrate your patch asap and build
> a new package. Thanks!
>
>   Armin.
>
> On Monday 27 February 2006 23:20, you wrote:
> > Hi,
> >
> > I tried your version of the Load-Plugin applet. Unfortunately it
> > makes de device reboot everytime I click on the applet. I could
> > repeat the problem inside scratchbox. After going through the
> > source, I found out that the problem is swapname not being
> > initialized the first time. Here's a small patch to make it work.
> >
> > diff -Naur loadapplet-aw/load-plugin.c
> > loadapplet-henry/load-plugin.c --- loadapplet-aw/load-plugin.c
> > 2006-02-28 00:32:41.000000000 +0100 +++
> > loadapplet-henry/load-plugin.c      2006-02-27 22:50:01.000000000
> > +0100 @@ -536,7 +536,7 @@
> >          gtk_menu_shell_append(GTK_MENU_SHELL(info->menu),
> >                          info->menu_separator);
> >         /* Swap */
> > -       if (strncmp(swapname, "", 1) != 0) {
> > +       if (swapname && strncmp(swapname, "", 1) != 0) {
> >           if (swapisactive())
> >             sprintf(label, "swapoff %s (%d MB used)", swapname,
> > (swapused+512)/1024);
> >           else
> >
> > Regards,
> >
> > Henry
On Tuesday 28 February 2006 11:11, Stefan Kost wrote:
> hi,
>
> instead of
>
> if (swapname && strncmp(swapname, "", 1) != 0) {
>
> just write
>
> if (swapname && *swapname) {
>
> Stefan

-- 
   --- May the Source be with you! Linux. ---
   --- http://www.arminwarda.mynetcologne.de/
   --- secure eMail: http://www.gnupg.de/ ---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.maemo.org/pipermail/maemo-users/attachments/20060228/f6b9d78f/attachment.pgp 


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]    

  Powered by Linux