Skip to contentSkip to conversation

Linux should define ENOTSUP

DISCUSSION Samuel Thibault 6 participants 19 messages Dec 6, 2006 – Dec 7, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

ENOTSUP is not used at all by linux (though it is defined for parisc), while as susv3 specifies, ENOTSUP shall be different than EOPNOTSUPP. Is there a reason for doing so? (except history)

Currently, code like

switch(errno) {
	ENOTSUP:
		foo();
		break;
	EOPNOTSUP:
		bar();
		break;
}

just can't compile...

Is there any way to fix this? Glibc people don't seem to want to fix it on their part, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2363

Samuel

#1 lore raw
Quoted 4 lines

Is there any way to fix this? Glibc people don't seem to want to fix it on their part, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2363

Hi,

Ulrich asked you to go to us once your time travel machine was finished.. is it finished yet ? ;=)

this is part of the ABI, so we can't change this in 2006...

Greetings,
Arjan van de Ven

Signature · 2 lines
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
#2 lore raw

Hi,

Quoted 7 lines · Arjan van de Ven, le Wed 06 Dec 2006 15:25:14 +0100, a écrit :
Quoted 4 lines

Is there any way to fix this? Glibc people don't seem to want to fix it on their part, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2363

Ulrich asked you to go to us once your time travel machine was finished.. is it finished yet ? ;=)

;)

Quoted 1 line

this is part of the ABI, so we can't change this in 2006...

Ok, so Linux will never be fully posix compliant.

Samuel

#12 lore raw
In reply to Arjan van de Ven
Quoted 11 lines · Arjan van de Ven
Quoted 3 lines

Is there any way to fix this? Glibc people don't seem to want to fix it on their part, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2363

Hi,

Ulrich asked you to go to us once your time travel machine was finished.. is it finished yet ? ;=)

this is part of the ABI, so we can't change this in 2006...

If ENOTSUP is currently unused and is only there for completeness, then it should be fine to add it.

-hpa

#3 lore raw
In reply to Samuel Thibault
Quoted 5 lines · Samuel Thibault
Quoted 2 lines

this is part of the ABI, so we can't change this in 2006...

Ok, so Linux will never be fully posix compliant.

That's largely already the case, mostly because there is unfortunately still a fair bit of rubber-stamping Solaris going on.

-hpa

#13 lore raw
In reply to H. Peter Anvin
Quoted 7 lines · H. Peter Anvin, le Wed 06 Dec 2006 07:16:39 -0800, a écrit :
Quoted 6 lines · Arjan van de Ven
Quoted 3 lines

Is there any way to fix this? Glibc people don't seem to want to fix it on their part, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2363

Hi,

Quoted 8 lines
Quoted 5 lines

Ulrich asked you to go to us once your time travel machine was finished.. is it finished yet ? ;=)

this is part of the ABI, so we can't change this in 2006...

If ENOTSUP is currently unused and is only there for completeness, then it should be fine to add it.

The functions that should be returning it instead of EOPNOTSUP should be fixed too.

Samuel

#14 lore raw
Quoted 10 lines · Samuel Thibault
Quoted 9 lines · H. Peter Anvin, le Wed 06 Dec 2006 07:16:39 -0800, a écrit :
Quoted 8 lines · Arjan van de Ven
Quoted 3 lines

Is there any way to fix this? Glibc people don't seem to want to fix it on their part, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2363

Hi,

Ulrich asked you to go to us once your time travel machine was finished.. is it finished yet ? ;=)

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

this is part of the ABI, so we can't change this in 2006...

If ENOTSUP is currently unused and is only there for completeness, then it should be fine to add it.

The functions that should be returning it instead of EOPNOTSUP should be fixed too.

The two can't be done at the same time. In fact, the two probably can't be done without a period of quite a few *years* between them.

-hpa

#15 lore raw
Quoted 16 lines · H. Peter Anvin, le Wed 06 Dec 2006 07:26:44 -0800, a écrit :
Quoted 15 lines · Samuel Thibault
Quoted 13 lines · H. Peter Anvin, le Wed 06 Dec 2006 07:16:39 -0800, a écrit :
Quoted 10 lines · Arjan van de Ven
Quoted 3 lines

Is there any way to fix this? Glibc people don't seem to want to fix it on their part, see
http://sources.redhat.com/bugzilla/show_bug.cgi?id=2363

Hi,

Ulrich asked you to go to us once your time travel machine was finished.. is it finished yet ? ;=)

this is part of the ABI, so we can't change this in 2006...

If ENOTSUP is currently unused and is only there for completeness, then it should be fine to add it.

Quoted 6 lines
Quoted 3 lines

The functions that should be returning it instead of EOPNOTSUP should be fixed too.

The two can't be done at the same time. In fact, the two probably can't be done without a period of quite a few *years* between them.

Not a reason for not doing it ;)

Samuel

#16 lore raw
Quoted 3 lines · Samuel Thibault
Quoted 1 line

The two can't be done at the same time. In fact, the two probably can't be done without a period of quite a few *years* between them.

Not a reason for not doing it ;)

No, but breakage is. There has to be a major benefit to justify the cost, and you, at least, have not provided such a justification.

-hpa

#17 lore raw
Quoted 8 lines · H. Peter Anvin, le Wed 06 Dec 2006 07:35:49 -0800, a écrit :
Quoted 4 lines · Samuel Thibault
Quoted 2 lines

The two can't be done at the same time. In fact, the two probably can't be done without a period of quite a few *years* between them.

Not a reason for not doing it ;)

No, but breakage is. There has to be a major benefit to justify the cost, and you, at least, have not provided such a justification.

Well, as I said, existing code like

switch(errno) {
	case ENOTSUP:
		foo();
		break;
	case EOPNOTSUP:
		bar();
		break;
}

Samuel

#18 lore raw
Quoted 8 lines · Samuel Thibault
Quoted 4 lines · H. Peter Anvin, le Wed 06 Dec 2006 07:35:49 -0800, a écrit :
Quoted 2 lines · Samuel Thibault
Quoted 1 line

The two can't be done at the same time. In fact, the two probably can't be done without a period of quite a few *years* between them.

Not a reason for not doing it ;)

No, but breakage is. There has to be a major benefit to justify the cost, and you, at least, have not provided such a justification.

Well, as I said, existing code like

Quoted 9 lines
switch(errno) {
	case ENOTSUP:
		foo();
		break;
	case EOPNOTSUP:
		bar();
		break;
}

That's pretty weak, though.

-hpa

#4 lore raw
In reply to H. Peter Anvin
Quoted 2 lines · H. Peter Anvin

That's largely already the case, mostly because there is unfortunately still a fair bit of rubber-stamping Solaris going on.

Don't say that, Peter.

I'm working on the committee now for many years and got most changes I (and those telling me their wishes) wanted through. This is very much a technically oriented working group, not political. In fact, of the regular members there are more with stakes in Linux than any of the other OSes combined. If there are problems people perceive they can file bugs on the OpenGroup's site
(http://www.opengroup.org/austin/defectform.html) or tell me about it.

About the issue at hand: if the original poster would have taken the time to investigate the issue he would have seen that this topic was discussed (I think we handled it in September in Reading). See

http://www.opengroup.org/austin/aardvark/latest/xbdbug2.txt

The statement about the interpretations track means that the change will be made to the current standard, not only the next revision.

There is no need to change anything in kernel or libc. Code using both values in a switch statement is out of luck but a) this is really really rare (nobody should reimplement strerror) and b) can be easily fixed.

#5 lore raw
Quoted 6 lines · Ulrich Drepper
Quoted 2 lines · H. Peter Anvin

That's largely already the case, mostly because there is unfortunately still a fair bit of rubber-stamping Solaris going on.

Don't say that, Peter.

Quoted 8 lines

I'm working on the committee now for many years and got most changes I (and those telling me their wishes) wanted through. This is very much a technically oriented working group, not political. In fact, of the regular members there are more with stakes in Linux than any of the other OSes combined. If there are problems people perceive they can file bugs on the OpenGroup's site
(http://www.opengroup.org/austin/defectform.html) or tell me about it.

I'm quite aware of that, but I still think Sun has more resources to get their particular viewpoint through the committee -- it's just a matter of resources at hand. I myself had to largely drop out due to other pressures, for example.

Now, I'm much happier with Solaris being rubber-stamped than some other possibilities. However, it's very easy to sweep concerns under the rug by saying "legacy, out of scope."

-hpa

#6 lore raw
Quoted 4 lines · H. Peter Anvin

I'm quite aware of that, but I still think Sun has more resources to get their particular viewpoint through the committee -- it's just a matter of resources at hand. I myself had to largely drop out due to other pressures, for example.

But I'm still there, as are IBM, HP people and various other organizations. Sun is represented by one person and all the direct influence the company has is in the OpenGroup vote (one of three). And here the field is even wider, many more companies have a vote (including Red Hat). The other two organizations are IEEE (where the members of the balloting group make the decisions, individuals but also implementer votes) and ISO (which is entirely country based).

It is simply not true that any OS manufacturer has any power like this. At least not in the last 8 years or so. And as I said before, if you can potentially say this about any OS then it is Linux. The ENOTSUP issue is a good example. There is no need for this change in any of the certified Unixes (since they got there errno assingments from SysV or at least tested against the Unix test suite early on). The pressure from the growing number of Linux users made this an issue and so it got changed.

And take a look at the next revision. This is mostly an "align with Linux" edition since Linux already has all the proposed new functionality. Solaris has only a small subset and none of the other OS have anything like it.

#7 lore raw
In reply to Samuel Thibault
Quoted 2 lines · Samuel Thibault

Ok, so Linux will never be fully posix compliant.

?

Can you please quote chapter and verse (in POSIX) where it states that ENOTSUP and EOPNOTSUP have to be numerically distinct? If you are reading Unix 98 you might be able to make a claim that there is an implication that they be assigned unique error numbers, but it's at best an implication, not an explicitly specified requirement in any of the standards documents that I'm aware of.

To folks who are participating in the committee doing work on the upcoming POSIX revisions (which might make this a requirement to be imposed on us in a year or two) --- will that likely impose such a requirement? In that case we might want to start thinking about separating the two, but it really is a question of is the benefits are worth the effort.

- Ted

#8 lore raw
Quoted 2 lines · Theodore Tso

Can you please quote chapter and verse (in POSIX) where it states that ENOTSUP and EOPNOTSUP have to be numerically distinct?

<http://www.opengroup.org/onlinepubs/009695399/basedefs/errno.h.html>
"Their values shall be unique except as noted below." (And there is no exception for ENOTSUP/EOPNOTSUP yet.)

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#9 lore raw
Quoted 8 lines · Andreas Schwab
Quoted 2 lines · Theodore Tso

Can you please quote chapter and verse (in POSIX) where it states that ENOTSUP and EOPNOTSUP have to be numerically distinct?

<http://www.opengroup.org/onlinepubs/009695399/basedefs/errno.h.html>
"Their values shall be unique except as noted below." (And there is no exception for ENOTSUP/EOPNOTSUP yet.)

Ah, but you're quoting from SuS, not POSIX. (Yes, I'm splitting hairs, but that's what standards are all about. :-)

- Ted

#10 lore raw
Quoted 6 lines · Theodore Tso
Quoted 5 lines · Andreas Schwab
Quoted 2 lines · Theodore Tso

Can you please quote chapter and verse (in POSIX) where it states that ENOTSUP and EOPNOTSUP have to be numerically distinct?

Quoted 6 lines
Quoted 3 lines

<http://www.opengroup.org/onlinepubs/009695399/basedefs/errno.h.html>
"Their values shall be unique except as noted below." (And there is no exception for ENOTSUP/EOPNOTSUP yet.)

Ah, but you're quoting from SuS, not POSIX. (Yes, I'm splitting hairs, but that's what standards are all about. :-)

The quoted sentence is not shaded as an XSI extension, thus it is part of POSIX-1:2001.

Andreas.

Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#11 lore raw
Quoted 2 lines · Andreas Schwab

The quoted sentence is not shaded as an XSI extension, thus it is part of POSIX-1:2001.

Perhaps I didn't make myself clear. The change I pointed at was accepted to the interpretations track which means that if we would create a Technical Corrigendum 3 for the 2001 standard (which we are not) the relaxation for the error values would be added. The current situation is just as good, it's just as binding. There is no need to reissue the standard to make such changes.

So, put this issue to rest. There is not issue. The whole premise for the original post is wrong these days. There is no compliance problem.