linux hostid 변경하기
#include <stdio.h>
#include <unistd.h>
int main() {
long id,res;
// get real (default) hostid
id = gethostid();
printf(“current hostid is: %x\\n”,id);
// set new hostid if is superuser
res = sethostid(0x007f0100);
if (res == 0) printf(“if result is zero – success! (%d) \\n”,res);
// check if it is changed….
id = gethostid();
printf(“current hostid is: %x ;-PPPppppp\\n”,id);
}
2 Responses
… [Trackback]
[…] There you can find 15683 more Info to that Topic: nblog.syszone.co.kr/archives/2896 […]
… [Trackback]
[…] Here you will find 74632 additional Info to that Topic: nblog.syszone.co.kr/archives/2896 […]