On 10/10/05, Carsten Otte <[EMAIL PROTECTED]> wrote: > No. The Linux kernel should return Linux error codes. This way you get > reasonable messages like "out of memory", localized in the language the user > has chosen. Users don't expect to see CP return values in Linux.
The users who are Linux kernel developers do not expect that... ;-) and you may even claim that you know what the users *should* expect... but the other part was the PLA that Arty brought up. The point I tried to make is that CP command return codes are part of the response and allow the user (programs) to deal with expected errors (as opposed to things like 'out of memory' which is unexpected errors). When the diag8 is issued correctly it returns two responses: 1. The CP return code (a number) 2. The human readable response (in text) Although we're told not to use the text as an API, real life is different. But the CP return code is very useful to deal with expected errors. Looking at how Linux programs work, I believe the logical approach would be for cpint/vmcp to write (2) either to stdout or to stderr, depending on whether (1) is zero or not. But I doubt this would be practical for people to use. And we still would not have the return code to use. That's why I suggested to cheat. Rob -- Rob van der Heij rvdheij @ gmail.com ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390