HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- confstr truncate's model string on some platforms.
Operating System - HP-UX
1826123
Members
4487
Online
109690
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2004 10:59 PM
12-12-2004 10:59 PM
confstr truncate's model string on some platforms.
I have used the following code snippet to
determine model on HP-UX. In 99% of the
cases this works fine but in a minority
of cases the model string returned is truncated
by one character.
len=confstr(_CS_MACHINE_MODEL,NULL,(size_t)0);
buf2 = new char[len];
confstr(_CS_MACHINE_MODEL,buf2,len);
Should we be using len+1 instead. What are the
implications of doing this ? The 11.00 man
page for confstr seems to indicate this
but not for 11.11.
Thanks for any help
determine model on HP-UX. In 99% of the
cases this works fine but in a minority
of cases the model string returned is truncated
by one character.
len=confstr(_CS_MACHINE_MODEL,NULL,(size_t)0);
buf2 = new char[len];
confstr(_CS_MACHINE_MODEL,buf2,len);
Should we be using len+1 instead. What are the
implications of doing this ? The 11.00 man
page for confstr seems to indicate this
but not for 11.11.
Thanks for any help
- Tags:
- confstr
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2004 07:21 AM
12-15-2004 07:21 AM
Re: confstr truncate's model string on some platforms.
Hi, John.
Have you checked if the patch level of the boxes that provide truncated output is the same as the ones that show correctly?
Also, it could be related to the diagnostics version...
Most probably linked with the revision of the HWEnablement Bundle that is installed on the box...
Hope this helps,
Javier.
Have you checked if the patch level of the boxes that provide truncated output is the same as the ones that show correctly?
Also, it could be related to the diagnostics version...
Most probably linked with the revision of the HWEnablement Bundle that is installed on the box...
Hope this helps,
Javier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2004 07:25 PM
12-19-2004 07:25 PM
Re: confstr truncate's model string on some platforms.
Hi
it turns out that ..
* All patched versions of /usr/lib/libc.2 prior to and including PHCO_19491
(posted Aug 20 1999) exhibit the problem
* All patched versions after and including the subsequent patch PHCO_19691
(posted Oct 10 1999) do NOT exhibit the problem.
so once the latest libc cumulative patch was applied all was fine..
John
it turns out that ..
* All patched versions of /usr/lib/libc.2 prior to and including PHCO_19491
(posted Aug 20 1999) exhibit the problem
* All patched versions after and including the subsequent patch PHCO_19691
(posted Oct 10 1999) do NOT exhibit the problem.
so once the latest libc cumulative patch was applied all was fine..
John
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP