[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 5/5] xl: Return error codes for pci* commands



George Dunlap writes ("[PATCH v4 5/5] xl: Return error codes for pci* 
commands"):
> Add return codes for pci-detach, pci-attach, pci-asssignable-add, and
> pci-assignable-remove.
> 
> Returning error codes makes it easier for shell scripts to tell if a
> command has failed or succeeded.
> 
> NB this violates the CODING_STYLE preference for not initializing the
> return-value variable at declaration; but in these cases, having a
> "goto out" that jumped over nothing but an "rc = EXIT_SUCCESS" seemed
> a bit pointless.

(You mean `nothing but an "r = EXIT_SUCCESS"'.)

I'm afraid I am going to say that I would prefer the CODING_STYLE
approach.  Most relevantly, while it may seem pointless in this case,
it means that: (a) when another subroutine call is added to one of
these functions, it is not necessary to rework the error handling
again; and (b) everything is the same everywhere so there is less
scope for confusion.

Ian.

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.