| 47 |
gchar *Lcontent; |
gchar *Lcontent; |
| 48 |
gchar **Larrbuf; |
gchar **Larrbuf; |
| 49 |
gint i = 0, Lpos = 0; |
gint i = 0, Lpos = 0; |
| 50 |
gchar *s, *p; |
gchar *s, *p, *Lcurdev; |
| 51 |
gboolean Llast = FALSE; |
gboolean Llast = FALSE; |
| 52 |
|
gchar Lcommand[_BUF_SIZE]; |
| 53 |
|
|
| 54 |
if (!g_file_get_contents("/proc/sys/dev/cdrom/info", &Lcontent, NULL, Aerror)) { |
if (!g_file_get_contents("/proc/sys/dev/cdrom/info", &Lcontent, NULL, Aerror)) { |
| 55 |
return FALSE; |
return FALSE; |
| 74 |
if (!*s) Llast = TRUE; |
if (!*s) Llast = TRUE; |
| 75 |
*(s++)=0; |
*(s++)=0; |
| 76 |
|
|
| 77 |
g_hash_table_insert(Gproccdrominfo, g_strdup_printf("/dev/%s", p), g_strdup_printf("%d", Lpos++)); |
Lcurdev = g_strdup_printf("/dev/%s", p); |
| 78 |
|
g_hash_table_insert(Gproccdrominfo, Lcurdev, g_strdup_printf("%d", Lpos++)); |
| 79 |
|
|
| 80 |
|
g_snprintf(Lcommand, sizeof(Lcommand)-1, "/bin/umount %s", Lcurdev); |
| 81 |
|
_DEB("try to umount [%s]", Lcommand); |
| 82 |
|
|
| 83 |
|
g_spawn_command_line_async(Lcommand, NULL); |
| 84 |
} |
} |
| 85 |
|
|
| 86 |
} |
} |