mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
Updates
Tue Dec 20 16:03:29 2005 Soeren Sandmann <sandmann@redhat.com> * TODO: Updates * sysprof-text.c (main): Make it try and load the module before complaining.
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
ad5ffd749b
commit
c5172c58e6
25
collector.c
25
collector.c
@ -176,9 +176,28 @@ open_fd (Collector *collector,
|
||||
fd = open (SYSPROF_FILE, O_RDONLY);
|
||||
if (fd < 0)
|
||||
{
|
||||
load_module();
|
||||
|
||||
fd = open (SYSPROF_FILE, O_RDONLY);
|
||||
if (load_module())
|
||||
{
|
||||
GTimer *timer = g_timer_new ();
|
||||
|
||||
while (fd < 0 && g_timer_elapsed (timer, NULL) < 0.5)
|
||||
{
|
||||
usleep (100000);
|
||||
|
||||
g_print ("open\n");
|
||||
|
||||
fd = open (SYSPROF_FILE, O_RDONLY);
|
||||
}
|
||||
|
||||
g_timer_destroy (timer);
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
/* FIXME: set "module is loaded but no file error" */
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for udev to discover the new device */
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user