Ensure file is closed.
2006-06-24 Benoît Dejean <benoit@placenet.org> * mountlist.c: (read_filesystem_list): Ensure file is closed. (glibtop_get_mountlist_s): Fixed .flags. Patch by hua.zhang@sun.com. Closes #345812.
This commit is contained in:
committed by
Benoît Dejean
parent
8c7e0e6f2e
commit
739e9cac4a
@@ -1,3 +1,16 @@
|
||||
2006-06-24 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* mountlist.c: (read_filesystem_list):
|
||||
|
||||
Ensure file is closed.
|
||||
|
||||
(glibtop_get_mountlist_s):
|
||||
|
||||
Fixed .flags.
|
||||
|
||||
Patch by hua.zhang@sun.com.
|
||||
Closes #345812.
|
||||
|
||||
2006-04-09 Benoît Dejean <benoit@placenet.org>
|
||||
|
||||
* Makefile.am: Fixed trivial warning.
|
||||
|
@@ -475,10 +475,10 @@ read_filesystem_list (void)
|
||||
mtail = me;
|
||||
}
|
||||
|
||||
if (ret > 0)
|
||||
return NULL;
|
||||
if (fclose (fp) == EOF)
|
||||
return NULL;
|
||||
if (ret > 0)
|
||||
return NULL;
|
||||
}
|
||||
#endif /* MOUNTED_GETMNTENT2. */
|
||||
|
||||
@@ -610,7 +610,7 @@ glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs)
|
||||
buf->total = buf->number * buf->size;
|
||||
|
||||
buf->flags = (1 << GLIBTOP_MOUNTLIST_SIZE)
|
||||
| (1 << GLIBTOP_MOUNTLIST_SIZE)
|
||||
| (1 << GLIBTOP_MOUNTLIST_NUMBER)
|
||||
| (1 << GLIBTOP_MOUNTLIST_TOTAL);
|
||||
|
||||
return (glibtop_mountentry*) g_array_free(mount_array, FALSE);
|
||||
|
Reference in New Issue
Block a user