Patchwork [3/7] qapi: add query-machines command

login
register
mail settings
Submitter Anthony Liguori
Date July 27, 2012, 1:37 p.m.
Message ID <1343396239-19272-4-git-send-email-aliguori@us.ibm.com>
Download mbox | patch
Permalink /patch/173671/
State New
Headers show

Comments

Anthony Liguori - July 27, 2012, 1:37 p.m.
This provides the same output as -M ? but in a structured way.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 qapi-schema.json |   28 ++++++++++++++++++++++++++++
 qmp-commands.hx  |    6 ++++++
 vl.c             |   31 +++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 0 deletions(-)
Luiz Capitulino - July 27, 2012, 4:12 p.m.
On Fri, 27 Jul 2012 08:37:15 -0500
Anthony Liguori <aliguori@us.ibm.com> wrote:

> This provides the same output as -M ? but in a structured way.
> 
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> ---
>  qapi-schema.json |   28 ++++++++++++++++++++++++++++
>  qmp-commands.hx  |    6 ++++++
>  vl.c             |   31 +++++++++++++++++++++++++++++++
>  3 files changed, 65 insertions(+), 0 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 28e9914..5b47026 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -2200,3 +2200,31 @@
>  # Since: 0.14.0
>  ##
>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
> +
> +##
> +# @MachineInfo:
> +#
> +# Information describing a machine.
> +#
> +# @name: the name of the machine
> +#
> +# @alias: #optional an alias for the machine name
> +#
> +# @default: #optional whether the machine is default

Why is default optional?

> +#
> +# Since: 1.2.0
> +##
> +{ 'type': 'MachineInfo',
> +  'data': { 'name': 'str', '*alias': 'str',
> +            '*is-default': 'bool' } }
> +
> +##
> +# @query-machines:
> +#
> +# Return a list of supported machines
> +#
> +# Returns: a list of MachineInfo
> +#
> +# Since: 1.2.0
> +##
> +{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
> diff --git a/qmp-commands.hx b/qmp-commands.hx
> index 5c55528..a6f82fc 100644
> --- a/qmp-commands.hx
> +++ b/qmp-commands.hx
> @@ -2222,3 +2222,9 @@ EQMP
>          .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
>      },
>  
> +    {
> +        .name       = "query-machines",
> +        .args_type  = "",
> +        .mhandler.cmd_new = qmp_marshal_input_query_machines,
> +    },
> +
> diff --git a/vl.c b/vl.c
> index 8904db1..cd900e0 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1209,6 +1209,37 @@ QEMUMachine *find_default_machine(void)
>      return NULL;
>  }
>  
> +MachineInfoList *qmp_query_machines(Error **errp)
> +{
> +    MachineInfoList *mach_list = NULL;
> +    QEMUMachine *m;
> +
> +    for (m = first_machine; m; m = m->next) {
> +        MachineInfoList *entry;
> +        MachineInfo *info;
> +
> +        info = g_malloc0(sizeof(*info));
> +        if (m->is_default) {
> +            info->has_is_default = true;
> +            info->is_default = true;
> +        }
> +
> +        if (m->alias) {
> +            info->has_alias = true;
> +            info->alias = g_strdup(m->alias);
> +        }
> +
> +        info->name = g_strdup(m->name);
> +
> +        entry = g_malloc0(sizeof(*entry));
> +        entry->value = info;
> +        entry->next = mach_list;
> +        mach_list = entry;
> +    }
> +
> +    return mach_list;
> +}
> +
>  /***********************************************************/
>  /* main execution loop */
>
Eric Blake - July 27, 2012, 5:25 p.m.
On 07/27/2012 07:37 AM, Anthony Liguori wrote:
> This provides the same output as -M ? but in a structured way.
> 
> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> ---
>  qapi-schema.json |   28 ++++++++++++++++++++++++++++
>  qmp-commands.hx  |    6 ++++++
>  vl.c             |   31 +++++++++++++++++++++++++++++++
>  3 files changed, 65 insertions(+), 0 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 28e9914..5b47026 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -2200,3 +2200,31 @@
>  # Since: 0.14.0
>  ##
>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
> +
> +##
> +# @MachineInfo:
> +#
> +# Information describing a machine.
> +#
> +# @name: the name of the machine
> +#
> +# @alias: #optional an alias for the machine name

Can a machine have more than one alias?  In that case, it might be
better to have:

@name: the name of the machine
@alias-of: #optional if present, name is an alias, and this lists the
canonical form that it resolves to
Anthony Liguori - July 27, 2012, 6:12 p.m.
Eric Blake <eblake@redhat.com> writes:

> On 07/27/2012 07:37 AM, Anthony Liguori wrote:
>> This provides the same output as -M ? but in a structured way.
>> 
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>> ---
>>  qapi-schema.json |   28 ++++++++++++++++++++++++++++
>>  qmp-commands.hx  |    6 ++++++
>>  vl.c             |   31 +++++++++++++++++++++++++++++++
>>  3 files changed, 65 insertions(+), 0 deletions(-)
>> 
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index 28e9914..5b47026 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -2200,3 +2200,31 @@
>>  # Since: 0.14.0
>>  ##
>>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
>> +
>> +##
>> +# @MachineInfo:
>> +#
>> +# Information describing a machine.
>> +#
>> +# @name: the name of the machine
>> +#
>> +# @alias: #optional an alias for the machine name
>
> Can a machine have more than one alias?

No, it can't.  Really, alias is only used to map 'pc' -> 'pc-1.1'.  It's
never more complicated than that.

Regards,

Anthony Liguori

> In that case, it might be better to have:
>
> @name: the name of the machine
> @alias-of: #optional if present, name is an alias, and this lists the
> canonical form that it resolves to

>
> -- 
> Eric Blake   eblake@redhat.com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
Eric Blake - July 27, 2012, 6:28 p.m.
On 07/27/2012 12:12 PM, Anthony Liguori wrote:
> Eric Blake <eblake@redhat.com> writes:

>>> +# @name: the name of the machine
>>> +#
>>> +# @alias: #optional an alias for the machine name
>>
>> Can a machine have more than one alias?
> 
> No, it can't.  Really, alias is only used to map 'pc' -> 'pc-1.1'.  It's
> never more complicated than that.

Fair enough.  Just making sure that in this case, we would see:

{ "name":"pc-1.1", "alias":"pc" }

and not the other way around, and in a future release, it may change to:

{ "name":"pc-1.1" },
{ "name":"pc-1.2", "alias":"pc" }
Anthony Liguori - Aug. 10, 2012, 2:41 p.m.
Luiz Capitulino <lcapitulino@redhat.com> writes:

> On Fri, 27 Jul 2012 08:37:15 -0500
> Anthony Liguori <aliguori@us.ibm.com> wrote:
>
>> This provides the same output as -M ? but in a structured way.
>> 
>> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>> ---
>>  qapi-schema.json |   28 ++++++++++++++++++++++++++++
>>  qmp-commands.hx  |    6 ++++++
>>  vl.c             |   31 +++++++++++++++++++++++++++++++
>>  3 files changed, 65 insertions(+), 0 deletions(-)
>> 
>> diff --git a/qapi-schema.json b/qapi-schema.json
>> index 28e9914..5b47026 100644
>> --- a/qapi-schema.json
>> +++ b/qapi-schema.json
>> @@ -2200,3 +2200,31 @@
>>  # Since: 0.14.0
>>  ##
>>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
>> +
>> +##
>> +# @MachineInfo:
>> +#
>> +# Information describing a machine.
>> +#
>> +# @name: the name of the machine
>> +#
>> +# @alias: #optional an alias for the machine name
>> +#
>> +# @default: #optional whether the machine is default
>
> Why is default optional?

Brievity.

Regards,

Anthony Liguori

>
>> +#
>> +# Since: 1.2.0
>> +##
>> +{ 'type': 'MachineInfo',
>> +  'data': { 'name': 'str', '*alias': 'str',
>> +            '*is-default': 'bool' } }
>> +
>> +##
>> +# @query-machines:
>> +#
>> +# Return a list of supported machines
>> +#
>> +# Returns: a list of MachineInfo
>> +#
>> +# Since: 1.2.0
>> +##
>> +{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
>> diff --git a/qmp-commands.hx b/qmp-commands.hx
>> index 5c55528..a6f82fc 100644
>> --- a/qmp-commands.hx
>> +++ b/qmp-commands.hx
>> @@ -2222,3 +2222,9 @@ EQMP
>>          .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
>>      },
>>  
>> +    {
>> +        .name       = "query-machines",
>> +        .args_type  = "",
>> +        .mhandler.cmd_new = qmp_marshal_input_query_machines,
>> +    },
>> +
>> diff --git a/vl.c b/vl.c
>> index 8904db1..cd900e0 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -1209,6 +1209,37 @@ QEMUMachine *find_default_machine(void)
>>      return NULL;
>>  }
>>  
>> +MachineInfoList *qmp_query_machines(Error **errp)
>> +{
>> +    MachineInfoList *mach_list = NULL;
>> +    QEMUMachine *m;
>> +
>> +    for (m = first_machine; m; m = m->next) {
>> +        MachineInfoList *entry;
>> +        MachineInfo *info;
>> +
>> +        info = g_malloc0(sizeof(*info));
>> +        if (m->is_default) {
>> +            info->has_is_default = true;
>> +            info->is_default = true;
>> +        }
>> +
>> +        if (m->alias) {
>> +            info->has_alias = true;
>> +            info->alias = g_strdup(m->alias);
>> +        }
>> +
>> +        info->name = g_strdup(m->name);
>> +
>> +        entry = g_malloc0(sizeof(*entry));
>> +        entry->value = info;
>> +        entry->next = mach_list;
>> +        mach_list = entry;
>> +    }
>> +
>> +    return mach_list;
>> +}
>> +
>>  /***********************************************************/
>>  /* main execution loop */
>>
Luiz Capitulino - Aug. 10, 2012, 2:50 p.m.
On Fri, 10 Aug 2012 09:41:20 -0500
Anthony Liguori <aliguori@us.ibm.com> wrote:

> Luiz Capitulino <lcapitulino@redhat.com> writes:
> 
> > On Fri, 27 Jul 2012 08:37:15 -0500
> > Anthony Liguori <aliguori@us.ibm.com> wrote:
> >
> >> This provides the same output as -M ? but in a structured way.
> >> 
> >> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> >> ---
> >>  qapi-schema.json |   28 ++++++++++++++++++++++++++++
> >>  qmp-commands.hx  |    6 ++++++
> >>  vl.c             |   31 +++++++++++++++++++++++++++++++
> >>  3 files changed, 65 insertions(+), 0 deletions(-)
> >> 
> >> diff --git a/qapi-schema.json b/qapi-schema.json
> >> index 28e9914..5b47026 100644
> >> --- a/qapi-schema.json
> >> +++ b/qapi-schema.json
> >> @@ -2200,3 +2200,31 @@
> >>  # Since: 0.14.0
> >>  ##
> >>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
> >> +
> >> +##
> >> +# @MachineInfo:
> >> +#
> >> +# Information describing a machine.
> >> +#
> >> +# @name: the name of the machine
> >> +#
> >> +# @alias: #optional an alias for the machine name
> >> +#
> >> +# @default: #optional whether the machine is default
> >
> > Why is default optional?
> 
> Brievity.

Can you elaborate, please?

> 
> Regards,
> 
> Anthony Liguori
> 
> >
> >> +#
> >> +# Since: 1.2.0
> >> +##
> >> +{ 'type': 'MachineInfo',
> >> +  'data': { 'name': 'str', '*alias': 'str',
> >> +            '*is-default': 'bool' } }
> >> +
> >> +##
> >> +# @query-machines:
> >> +#
> >> +# Return a list of supported machines
> >> +#
> >> +# Returns: a list of MachineInfo
> >> +#
> >> +# Since: 1.2.0
> >> +##
> >> +{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
> >> diff --git a/qmp-commands.hx b/qmp-commands.hx
> >> index 5c55528..a6f82fc 100644
> >> --- a/qmp-commands.hx
> >> +++ b/qmp-commands.hx
> >> @@ -2222,3 +2222,9 @@ EQMP
> >>          .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
> >>      },
> >>  
> >> +    {
> >> +        .name       = "query-machines",
> >> +        .args_type  = "",
> >> +        .mhandler.cmd_new = qmp_marshal_input_query_machines,
> >> +    },
> >> +
> >> diff --git a/vl.c b/vl.c
> >> index 8904db1..cd900e0 100644
> >> --- a/vl.c
> >> +++ b/vl.c
> >> @@ -1209,6 +1209,37 @@ QEMUMachine *find_default_machine(void)
> >>      return NULL;
> >>  }
> >>  
> >> +MachineInfoList *qmp_query_machines(Error **errp)
> >> +{
> >> +    MachineInfoList *mach_list = NULL;
> >> +    QEMUMachine *m;
> >> +
> >> +    for (m = first_machine; m; m = m->next) {
> >> +        MachineInfoList *entry;
> >> +        MachineInfo *info;
> >> +
> >> +        info = g_malloc0(sizeof(*info));
> >> +        if (m->is_default) {
> >> +            info->has_is_default = true;
> >> +            info->is_default = true;
> >> +        }
> >> +
> >> +        if (m->alias) {
> >> +            info->has_alias = true;
> >> +            info->alias = g_strdup(m->alias);
> >> +        }
> >> +
> >> +        info->name = g_strdup(m->name);
> >> +
> >> +        entry = g_malloc0(sizeof(*entry));
> >> +        entry->value = info;
> >> +        entry->next = mach_list;
> >> +        mach_list = entry;
> >> +    }
> >> +
> >> +    return mach_list;
> >> +}
> >> +
> >>  /***********************************************************/
> >>  /* main execution loop */
> >>  
>
Anthony Liguori - Aug. 10, 2012, 4:06 p.m.
Luiz Capitulino <lcapitulino@redhat.com> writes:

> On Fri, 10 Aug 2012 09:41:20 -0500
> Anthony Liguori <aliguori@us.ibm.com> wrote:
>
>> Luiz Capitulino <lcapitulino@redhat.com> writes:
>> 
>> > On Fri, 27 Jul 2012 08:37:15 -0500
>> > Anthony Liguori <aliguori@us.ibm.com> wrote:
>> >
>> >> This provides the same output as -M ? but in a structured way.
>> >> 
>> >> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
>> >> ---
>> >>  qapi-schema.json |   28 ++++++++++++++++++++++++++++
>> >>  qmp-commands.hx  |    6 ++++++
>> >>  vl.c             |   31 +++++++++++++++++++++++++++++++
>> >>  3 files changed, 65 insertions(+), 0 deletions(-)
>> >> 
>> >> diff --git a/qapi-schema.json b/qapi-schema.json
>> >> index 28e9914..5b47026 100644
>> >> --- a/qapi-schema.json
>> >> +++ b/qapi-schema.json
>> >> @@ -2200,3 +2200,31 @@
>> >>  # Since: 0.14.0
>> >>  ##
>> >>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
>> >> +
>> >> +##
>> >> +# @MachineInfo:
>> >> +#
>> >> +# Information describing a machine.
>> >> +#
>> >> +# @name: the name of the machine
>> >> +#
>> >> +# @alias: #optional an alias for the machine name
>> >> +#
>> >> +# @default: #optional whether the machine is default
>> >
>> > Why is default optional?
>> 
>> Brievity.
>
> Can you elaborate, please?

There is only one machine that is default.  Having default=false for all
of the rest just adds a lot of unnecessary information in the response.

Regards,

Anthony Liguori

>
>> 
>> Regards,
>> 
>> Anthony Liguori
>> 
>> >
>> >> +#
>> >> +# Since: 1.2.0
>> >> +##
>> >> +{ 'type': 'MachineInfo',
>> >> +  'data': { 'name': 'str', '*alias': 'str',
>> >> +            '*is-default': 'bool' } }
>> >> +
>> >> +##
>> >> +# @query-machines:
>> >> +#
>> >> +# Return a list of supported machines
>> >> +#
>> >> +# Returns: a list of MachineInfo
>> >> +#
>> >> +# Since: 1.2.0
>> >> +##
>> >> +{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
>> >> diff --git a/qmp-commands.hx b/qmp-commands.hx
>> >> index 5c55528..a6f82fc 100644
>> >> --- a/qmp-commands.hx
>> >> +++ b/qmp-commands.hx
>> >> @@ -2222,3 +2222,9 @@ EQMP
>> >>          .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
>> >>      },
>> >>  
>> >> +    {
>> >> +        .name       = "query-machines",
>> >> +        .args_type  = "",
>> >> +        .mhandler.cmd_new = qmp_marshal_input_query_machines,
>> >> +    },
>> >> +
>> >> diff --git a/vl.c b/vl.c
>> >> index 8904db1..cd900e0 100644
>> >> --- a/vl.c
>> >> +++ b/vl.c
>> >> @@ -1209,6 +1209,37 @@ QEMUMachine *find_default_machine(void)
>> >>      return NULL;
>> >>  }
>> >>  
>> >> +MachineInfoList *qmp_query_machines(Error **errp)
>> >> +{
>> >> +    MachineInfoList *mach_list = NULL;
>> >> +    QEMUMachine *m;
>> >> +
>> >> +    for (m = first_machine; m; m = m->next) {
>> >> +        MachineInfoList *entry;
>> >> +        MachineInfo *info;
>> >> +
>> >> +        info = g_malloc0(sizeof(*info));
>> >> +        if (m->is_default) {
>> >> +            info->has_is_default = true;
>> >> +            info->is_default = true;
>> >> +        }
>> >> +
>> >> +        if (m->alias) {
>> >> +            info->has_alias = true;
>> >> +            info->alias = g_strdup(m->alias);
>> >> +        }
>> >> +
>> >> +        info->name = g_strdup(m->name);
>> >> +
>> >> +        entry = g_malloc0(sizeof(*entry));
>> >> +        entry->value = info;
>> >> +        entry->next = mach_list;
>> >> +        mach_list = entry;
>> >> +    }
>> >> +
>> >> +    return mach_list;
>> >> +}
>> >> +
>> >>  /***********************************************************/
>> >>  /* main execution loop */
>> >>  
>>
Luiz Capitulino - Aug. 10, 2012, 4:15 p.m.
On Fri, 10 Aug 2012 11:06:14 -0500
Anthony Liguori <aliguori@us.ibm.com> wrote:

> Luiz Capitulino <lcapitulino@redhat.com> writes:
> 
> > On Fri, 10 Aug 2012 09:41:20 -0500
> > Anthony Liguori <aliguori@us.ibm.com> wrote:
> >
> >> Luiz Capitulino <lcapitulino@redhat.com> writes:
> >> 
> >> > On Fri, 27 Jul 2012 08:37:15 -0500
> >> > Anthony Liguori <aliguori@us.ibm.com> wrote:
> >> >
> >> >> This provides the same output as -M ? but in a structured way.
> >> >> 
> >> >> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> >> >> ---
> >> >>  qapi-schema.json |   28 ++++++++++++++++++++++++++++
> >> >>  qmp-commands.hx  |    6 ++++++
> >> >>  vl.c             |   31 +++++++++++++++++++++++++++++++
> >> >>  3 files changed, 65 insertions(+), 0 deletions(-)
> >> >> 
> >> >> diff --git a/qapi-schema.json b/qapi-schema.json
> >> >> index 28e9914..5b47026 100644
> >> >> --- a/qapi-schema.json
> >> >> +++ b/qapi-schema.json
> >> >> @@ -2200,3 +2200,31 @@
> >> >>  # Since: 0.14.0
> >> >>  ##
> >> >>  { 'command': 'closefd', 'data': {'fdname': 'str'} }
> >> >> +
> >> >> +##
> >> >> +# @MachineInfo:
> >> >> +#
> >> >> +# Information describing a machine.
> >> >> +#
> >> >> +# @name: the name of the machine
> >> >> +#
> >> >> +# @alias: #optional an alias for the machine name
> >> >> +#
> >> >> +# @default: #optional whether the machine is default
> >> >
> >> > Why is default optional?
> >> 
> >> Brievity.
> >
> > Can you elaborate, please?
> 
> There is only one machine that is default.  Having default=false for all
> of the rest just adds a lot of unnecessary information in the response.

I think it's more consistent to have the key (also, there are better ways
to save bytes on the wire if this is an issue), but I don't mind much though.

Patch

diff --git a/qapi-schema.json b/qapi-schema.json
index 28e9914..5b47026 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2200,3 +2200,31 @@ 
 # Since: 0.14.0
 ##
 { 'command': 'closefd', 'data': {'fdname': 'str'} }
+
+##
+# @MachineInfo:
+#
+# Information describing a machine.
+#
+# @name: the name of the machine
+#
+# @alias: #optional an alias for the machine name
+#
+# @default: #optional whether the machine is default
+#
+# Since: 1.2.0
+##
+{ 'type': 'MachineInfo',
+  'data': { 'name': 'str', '*alias': 'str',
+            '*is-default': 'bool' } }
+
+##
+# @query-machines:
+#
+# Return a list of supported machines
+#
+# Returns: a list of MachineInfo
+#
+# Since: 1.2.0
+##
+{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 5c55528..a6f82fc 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -2222,3 +2222,9 @@  EQMP
         .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
     },
 
+    {
+        .name       = "query-machines",
+        .args_type  = "",
+        .mhandler.cmd_new = qmp_marshal_input_query_machines,
+    },
+
diff --git a/vl.c b/vl.c
index 8904db1..cd900e0 100644
--- a/vl.c
+++ b/vl.c
@@ -1209,6 +1209,37 @@  QEMUMachine *find_default_machine(void)
     return NULL;
 }
 
+MachineInfoList *qmp_query_machines(Error **errp)
+{
+    MachineInfoList *mach_list = NULL;
+    QEMUMachine *m;
+
+    for (m = first_machine; m; m = m->next) {
+        MachineInfoList *entry;
+        MachineInfo *info;
+
+        info = g_malloc0(sizeof(*info));
+        if (m->is_default) {
+            info->has_is_default = true;
+            info->is_default = true;
+        }
+
+        if (m->alias) {
+            info->has_alias = true;
+            info->alias = g_strdup(m->alias);
+        }
+
+        info->name = g_strdup(m->name);
+
+        entry = g_malloc0(sizeof(*entry));
+        entry->value = info;
+        entry->next = mach_list;
+        mach_list = entry;
+    }
+
+    return mach_list;
+}
+
 /***********************************************************/
 /* main execution loop */