My slstatus configuration
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

17 行
246 B

  1. /* See LICENSE file for copyright and license details. */
  2. #include <err.h>
  3. #include <unistd.h>
  4. #include "../util.h"
  5. const char *
  6. hostname(void)
  7. {
  8. if (gethostname(buf, sizeof(buf)) == -1) {
  9. warn("hostname");
  10. return NULL;
  11. }
  12. return buf;
  13. }