On (06/26/07 10:01), James Carlson wrote: > > Sowmini.Varadhan at Sun.COM writes: > > On (06/26/07 01:06), Peter Memishian wrote: > > > While I can understand that from an implementation standpoint, from a > > > usability standpoint I don't think a log message goes far enough. The > > > person running the dladm set-linkprop subcommand needs the feedback. > > > > What we could do is to have a distinct error code to > > track this case (EINTR?) that could be caught by dladm to emit > > the information to the user- would that suffice? > > I have trouble with that on two fronts: > > - We shouldn't use errors to report success. Telling the user that > the operation was successful, but that something else needs to be > done is something that the API itself needs to encompass, rather > than overloading an errno. (Partial success is itself a > troublesome concept.) > > - EINTR already has a defined meaning. If this isn't a case where a > potentially long-running operation was stopped and not restartable > due to a UNIX signal, then don't call it EINTR. >
We could fail the operation, but the question of finding the right error code to be returned by the SETPROP ioctl remains: attempts to modunload a used module seem to return EBUSY- we could return that back to dladm and then have dladm react appropriately. --Sowmini
