🙃The world is full of pain, but we can fix it with love!

Hurd


| 354 words Last updated:

TODOS
namelink
kernel-list-archivehttps://lists.gnu.org/archive/html/bug-hurd/
debian-list-archivehttps://lists.debian.org/debian-hurd/
irc-archivehttps://logs.guix.gnu.org/hurd/
kernel-homehttps://www.gnu.org/software/hurd/index.html
debian-homehttps://www.debian.org/ports/hurd/

refs:

namelink
chttps://en.cppreference.com/w/c
posix latesthttps://pubs.opengroup.org/onlinepubs/9799919799/
posix 2013https://pubs.opengroup.org/onlinepubs/9699919799.2013edition/
posix 2008https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/
glibchttps://sourceware.org/glibc/manual/2.41/html_mono/libc.html

*_MAX patch

TODO: Move to separate page.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>

static inline char *xreadlink(const char *restrict path) {
  char *buffer;
  size_t allocated = 128;
  ssize_t len;

  while (1) {
    buffer = (char *)malloc(allocated);
    if (!buffer) {
      return NULL;
    }
    len = readlink(path, buffer, allocated);
    if (len < (ssize_t)allocated) {
      return buffer;
    }
    free(buffer);
    if (len >= (ssize_t)allocated) {
      allocated *= 2;
      continue;
    }
    return NULL;
  }
}

static inline char *xgethostname() {
  long max_host_name;
  char *buffer;

  max_host_name = sysconf(_SC_HOST_NAME_MAX);
  buffer = malloc(max_host_name + 1);

  if (gethostname(buffer, max_host_name + 1)) {
    free(buffer);
    return NULL;
  }

  buffer[max_host_name] = '\0';
  return buffer;
}

static inline char *xgetcwd() {
  char *buffer;
  size_t allocated = 128;

  while (1) {
    buffer = (char *)malloc(allocated);
    if (!buffer) {
      return NULL;
    }
    getcwd(buffer, allocated);
    if (buffer)
      return buffer;
    free(buffer);
    if (errno == ERANGE) {
      allocated *= 2;
      continue;
    }
    return NULL;
  }
}

git repos

cheatsheet

Start qemu

1
qemu-system-x86_64 -enable-kvm -m 4G -net nic -net user,hostfwd=tcp::3222-:22 -vga vmware -drive cache=writeback,file=[...]

Configure/Setup network

1
2
3
settrans -fgap /servers/socket/2 /hurd/pfinet -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
fsysopts /servers/socket/2 /hurd/pfinet -i /dev/eth0 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0
fsysopts /server/socket/2 -a 10.0.2.15 -g 10.0.2.2 -m 255.255.255.0

Setup apt

1
2
apt-get --allow-unauthenticated --allow-insecure-repositories update
apt-get --allow-unauthenticated upgrade

mailing lists / irc

nameaddress
hurdbug-hurd@gnu.org
debiandebian-hurd@lists.debian.org
irclibrechat #hurd