graveman-cvs
[Top][All Lists]
Advanced

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

[Graveman-cvs] Changes to graveman/current/src/proc.c


From: sylvain cresto
Subject: [Graveman-cvs] Changes to graveman/current/src/proc.c
Date: Fri, 27 May 2005 21:30:54 -0400

Index: graveman/current/src/proc.c
diff -u graveman/current/src/proc.c:1.1 graveman/current/src/proc.c:1.2
--- graveman/current/src/proc.c:1.1     Tue May 17 01:16:34 2005
+++ graveman/current/src/proc.c Sat May 28 01:30:50 2005
@@ -47,8 +47,9 @@
   gchar *Lcontent;
   gchar **Larrbuf;
   gint i = 0, Lpos = 0;
-  gchar *s, *p;
+  gchar *s, *p, *Lcurdev;
   gboolean Llast = FALSE;
+  gchar Lcommand[_BUF_SIZE];
 
   if (!g_file_get_contents("/proc/sys/dev/cdrom/info", &Lcontent, NULL, 
Aerror)) {
     return FALSE;
@@ -73,7 +74,13 @@
         if (!*s) Llast = TRUE;
         *(s++)=0;
 
-        g_hash_table_insert(Gproccdrominfo, g_strdup_printf("/dev/%s", p), 
g_strdup_printf("%d", Lpos++));
+        Lcurdev = g_strdup_printf("/dev/%s", p);
+        g_hash_table_insert(Gproccdrominfo, Lcurdev, g_strdup_printf("%d", 
Lpos++));
+
+        g_snprintf(Lcommand, sizeof(Lcommand)-1, "/bin/umount %s", Lcurdev);
+        _DEB("try to umount [%s]", Lcommand);
+
+        g_spawn_command_line_async(Lcommand, NULL);
       }
 
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]