[maemo-developers] [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
From: Henry Tang henryykt at gmail.comDate: Tue Feb 28 00:20:15 EET 2006
- Previous message: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
- Next message: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20060227/55ffc6e2/attachment.htm
- Previous message: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
- Next message: [maemo-developers] Adding swapon/off to Jakub's Load-Plugin applet
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
