MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / host_gethostname

Function host_gethostname

src/bsdsocket.cpp:2145–2155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2143}
2144
2145uae_u32 host_gethostname(TrapContext *ctx, uae_u32 name, uae_u32 namelen)
2146{
2147 if (!trap_valid_address(ctx, name, namelen))
2148 return -1;
2149 char buf[256];
2150 if (gethostname(buf, sizeof(buf)) != 0)
2151 return -1;
2152 buf[sizeof(buf) - 1] = '\0';
2153 trap_put_string(ctx, (uae_char *)buf, name, namelen);
2154 return 0;
2155}
2156
2157#endif /* ! BSDSOCKET */

Callers 1

bsdsocklib_gethostnameFunction · 0.85

Calls 2

trap_valid_addressFunction · 0.85
trap_put_stringFunction · 0.85

Tested by

no test coverage detected