diff --git a/sysdeps/guile/ChangeLog b/sysdeps/guile/ChangeLog index 16d573bf..c978e144 100644 --- a/sysdeps/guile/ChangeLog +++ b/sysdeps/guile/ChangeLog @@ -2,6 +2,7 @@ * guile.awk (glibtop_get_proc_map): Make a gh_list for each map entry and append all of them to the returned list. + (glibtop_get_mountlist): Likewise. 1998-10-20 Martin Baulig diff --git a/sysdeps/guile/guile.awk b/sysdeps/guile/guile.awk index 15eede05..985c31e1 100644 --- a/sysdeps/guile/guile.awk +++ b/sysdeps/guile/guile.awk @@ -74,7 +74,7 @@ function make_output(line) { output = output"\tglibtop_"feature" "feature";\n"; if (retval != "void") output = output"\t"retval" retval;\n"; - if (feature ~ /^proc(list|_map)$/) + if (feature ~ /^(proc(list|_map))|mountlist$/) output = output"\tunsigned i;\n"; output = output"\tSCM list;\n\n"; @@ -147,6 +147,24 @@ function make_output(line) { print "\tglibtop_free (retval);\n"; }; + if (feature ~ /^mountlist$/) { + print "\tif (retval == NULL)"; + print "\t\treturn list;"; + print ""; + print "\tfor (i = 0; i < mountlist.number; i++) {"; + print "\t\tglibtop_mountentry *entry = &(retval [i]);"; + print "\t\tSCM scm_entry = gh_list"; + print "\t\t\t(gh_ulong2scm ((unsigned long) entry->dev),"; + print "\t\t\t gh_str02scm (entry->devname),"; + print "\t\t\t gh_str02scm (entry->mountdir),"; + print "\t\t\t gh_str02scm (entry->type), SCM_UNDEFINED);"; + print "\t\tSCM entry_list = gh_list (scm_entry, SCM_UNDEFINED);\n"; + + print "\t\tlist = scm_append (gh_list (list, entry_list, SCM_UNDEFINED));"; + print "\t};\n"; + print "\tglibtop_free (retval);\n"; + }; + print "\treturn list;"; print "}"; print "";