freeipmi-devel
[Top][All Lists]
Advanced

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

[bug #64824] Can't collect data with hostname is more 64 chara


From: Albert Chu
Subject: [bug #64824] Can't collect data with hostname is more 64 chara
Date: Sun, 19 Nov 2023 15:30:23 -0500 (EST)

Follow-up Comment #1, bug #64824 (project freeipmi):

(sorry for late response, was on leave)

Googling around, I guess the issue has been that gethostname() (on almost all
systems) returns a max of 64 bytes (it's a linux kernel definition), so most
people use MAXHOSTNAMELEN as their "max hostname" buffer size (which I did
here).

But technically, that need not be the case, as when you input a hostname on
the command line, that's not related to gethostname() at all.

I agree on a fix, but it will take a little time to peel MAXHOSTNAMELEN away
and ensure things are portable (b/c MAXHOSTNAMELEN is defined in headers on
most systems).




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64824>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]