GVolumeMonitor refresh after writing to fstab
- From: Amit <amit uttam gmail com>
- To: gtk-app-devel-list gnome org
- Subject: GVolumeMonitor refresh after writing to fstab
- Date: Wed, 18 Apr 2012 07:18:00 +0000 (UTC)
My current application adds an entry to fstab and then uses
GVolumeMonitor to get the list of volumes and then mounts the recently
added volume.
The problem is GVolumeMonitor does not see the recently added fstab
entry right away. Thus, I have to re-run the operation again.
So the operation goes as follows:
Add an entry to fstab (add_entry_to_fstab()):
1. Create a main loop
2. Get the volume monitor
3. Add the entry to fstab (g_output_stream_write_async)
4. Run the main loop.
5. Async callback to finish write to fstab.
6. Quit the main loop.
7. Unref the volume monitor.
Then, immediately after the above function call, mount the volume
(mount_volume()):
1. Get the volume monitor
2. Get the list of volumes
-> Does not see latest addition to fstab
Any ideas of where I might be missing a step?
Thanks,
Amit
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]