xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* xl: improve return codes for more xl comands
@ 2016-03-25 13:53 Paulina Szubarczyk
  2016-03-29 11:14 ` George Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Paulina Szubarczyk @ 2016-03-25 13:53 UTC (permalink / raw)
  To: Roger Pau Monné
  Cc: xen-devel, Dario Faggioli, George Dunlap, Mina Naghshnejad


[-- Attachment #1.1: Type: text/plain, Size: 1322 bytes --]

Hi,

This regards bite-size task for Outreachy program [0].

I followed the patches prepared by Harmandeep [1] where functions in
xl_cmdimpl.c have the pattern:

"*main_foo() is treated somewhat as a regular main(), it is changed to
return EXIT_SUCCESS or EXIT_FAILURE.

*Functions that are not main_foo(), are changed to do 'return 0' or
'return 1', and then 0/1 is taken care in the main_foo() functions
that calls them. "

The changes regard scheduling functions.

But in the preliminary patches [2] there is a notion to change not
main_foo()
to return EXIT_SUCCESS or EXIT_FAILURE, like in [3].

Should not-main functions related to
- mem-set
- cd-insert
- pci-*
return 0/1 or should EXIT_SUCCESS/EXIT_FAILURE be kept?

There is also a patch that change exit code from numeric values or ERROR_*
codes to be either EXIT_SUCCESS or EXIT_FAILURE for migrate related
functions [4].

Could that be applied to those functions too?

Paulina

[0] https://www.mail-archive.com/xen-devel@lists.xen.org/msg61650.html
[1]
http://lists.xenproject.org/archives/html/xen-devel/2015-10/msg02990.html
[2]
http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg02246.html
[3]
http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg02243.html
[4]
http://lists.xenproject.org/archives/html/xen-devel/2016-02/msg03354.html

[-- Attachment #1.2: Type: text/html, Size: 2251 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: xl: improve return codes for more xl comands
  2016-03-25 13:53 xl: improve return codes for more xl comands Paulina Szubarczyk
@ 2016-03-29 11:14 ` George Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: George Dunlap @ 2016-03-29 11:14 UTC (permalink / raw)
  To: Paulina Szubarczyk
  Cc: xen-devel, Dario Faggioli, Mina Naghshnejad, George Dunlap,
	Roger Pau Monné

On Fri, Mar 25, 2016 at 1:53 PM, Paulina Szubarczyk
<paulinaszubarczyk@gmail.com> wrote:
> Hi,
>
> This regards bite-size task for Outreachy program [0].
>
> I followed the patches prepared by Harmandeep [1] where functions in
> xl_cmdimpl.c have the pattern:
>
> "*main_foo() is treated somewhat as a regular main(), it is changed to
> return EXIT_SUCCESS or EXIT_FAILURE.
>
> *Functions that are not main_foo(), are changed to do 'return 0' or
> 'return 1', and then 0/1 is taken care in the main_foo() functions
> that calls them. "
>
> The changes regard scheduling functions.
>
> But in the preliminary patches [2] there is a notion to change not
> main_foo()
> to return EXIT_SUCCESS or EXIT_FAILURE, like in [3].
>
> Should not-main functions related to
> - mem-set
> - cd-insert
> - pci-*
> return 0/1 or should EXIT_SUCCESS/EXIT_FAILURE be kept?
>
> There is also a patch that change exit code from numeric values or ERROR_*
> codes to be either EXIT_SUCCESS or EXIT_FAILURE for migrate related
> functions [4].
>
> Could that be applied to those functions too?

Yes, it looks like Harmandeep's series had more scrutiny and more
careful thought, so please follow the pattern she set. :-)

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-29 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-25 13:53 xl: improve return codes for more xl comands Paulina Szubarczyk
2016-03-29 11:14 ` George Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).