Re: [PATCH] Do not segfault because of kernel version

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

 



Luk Claes wrote:

  > So if the version number is not recognised - e.g. it was written in Sanskrit
  > rather than arabic numberals, it is assumed to be a future version, not a
  > past version.
  > 
  >  https://lkml.org/lkml/2011/6/14/293
  
  Ah, not a bad idea. In that case a parse error can be distinguished from
  other errors. Would 'return -1' do the expected or will it give a
  compiler warning/error we should avoid?

You can't return -1 from a function returning unsigned int.  I think you
want to return something like

MAKE_VERSION(9999, 255, 255)
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux