tag 14388 + moreinfo notabug thanks vevek venkatesan wrote: > In uname command In feel that there is a bug with -r and -v > options which I describe as follows, > > uname -r -> it should show the release of kernel > uname -v -> it should show the version of kernel as per your manual page, > but it is showing vice-versa of each.
Thank you for the report. However the uname(1) command simply calls the uname(2) system call. It then reports what the kernel has stored there. It is a very old command having been around a very long time. I don't think there is a bug there. But you did not report the information that you are seeing. If you would be so kind as to report what you are seeing then perhaps we would be able to know what is happening for you. Since you didn't tell us what you are seeing there isn't any way for us to know one way or the other. When reporting bugs it is necessary to show us what it is doing for you. In any case, here is a sample from my system. This is the correct output for my system. Note that on other systems the values stored by the kernel can be quite a bit different. Especially on HP-UX and on IBM AIX the output may be quite different! $ uname -r 3.2.0-4-amd64 $ uname -v #1 SMP Debian 3.2.35-2 Really the only portable way to use uname(1) is to call it first to see which system name it returns and then after knowing the system type then call it again with whatever options make sense on that system. Bob
