Aesthetic changes to conf panel; minor fix to libpnd that no one but mmenu will notice.
[pandora-libraries.git] / lib / pnd_utility.c
index 4c1a6a3..9647f20 100644 (file)
@@ -167,6 +167,9 @@ void pnd_exec_no_wait_1 ( char *fullpath, char *arg1 ) {
     execl ( fullpath, fullpath, (char*) NULL );
   }
 
+  // error invoking something, and we're the child process, so just die before all hell breaks lose with us thinking we're the (second!) parent on return!
+  exit ( -1 );
+
   // getting here is an error
   //printf ( "Error attempting to run %s\n", fullpath );
 
@@ -226,7 +229,7 @@ pnd_pxml_handle *pnd_pxml_get_by_path ( char *fullpath ) {
   return ( pxmlapps );
 }
 
-unsigned char pnd_determine_mountpoint ( char *fullpath, char *r_mountpoint, unsigned char mountpoint_len ) {
+unsigned char pnd_determine_mountpoint ( char *fullpath, char *r_mountpoint, unsigned int mountpoint_len ) {
 
   // just cheap it, and call df like an idiot.
 
@@ -251,9 +254,8 @@ unsigned char pnd_determine_mountpoint ( char *fullpath, char *r_mountpoint, uns
     pclose ( p );
 
     // by now, good
-    char crap [ PATH_MAX ];
     char mount [ PATH_MAX ];
-    if ( sscanf ( inbuf, "%s %s %s %s %s %s", crap, crap, crap, crap, crap, mount ) != 6 ) {
+    if ( sscanf ( inbuf, "%*s %*s %*s %*s %*s %s", mount ) != 1 ) {
       return ( 0 );
     }