Hi Darren,
This is good to know about - thanks for pointing it out. I will make changes to
use os.sysconf for logname and password max.
I am a bit uncomfortable about hardcoding the 735 to get the max hostname.
Though maybe unlikely to change, the define still could change. I am leaning
towards leaving that particular MAX as 255. If the maximum hostname length ever
increases (I doubt it will ever decrease), then the result would be that the
text installer would need to change before accepting the larger length. Whereas
if the define were to change, then there could be a less desirable result.
Sue
On 09/08/10 10:31, Darren Kenny wrote:
Hi Sue,
A quick comment on the use of *_MAX constants.
Python has the os.sysconf() call that allows you to retrieve some of these
values, e.g.:
print os.sysconf('SC_LOGNAME_MAX')
8
print os.sysconf('SC_PASS_MAX')
256
See the sysconf manpage for details on what these values are meant to represent.
I think we should be using these where possible, unfortunately, for reasons I
can't discover, there isn't possible to use the string parameter for the
hostname :( - but it can be fetched using the numeric value of the
SC_HOST_NAME_MAX from /usr/include/sys/unistd.h:
print os.sysconf(735)
255
Thanks,
Darren.
On 09/ 8/10 05:12 PM, Sue Sohn wrote:
Could I please get a review of the changes for:
15166 Text Installer EditFields need to support horizontal scrolling
Webrev:
http://cr.opensolaris.org/~sohn/15166
Thanks,
Sue
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss