aboutsummaryrefslogtreecommitdiff
path: root/src/system.c
blob: ffb8c4ac5923e7d586c1adf76adc0d255a2fa33a (plain)
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
#include "sys/ioctl.h"
#include "errno.h"

#include "types.h"


err e33_ioctl( Size fd, unsigned long req, void *arg )
{
  Size ret;

  do {
      ret = ioctl(fd, req, arg);
  } while (ret == -1 && (errno == EINTR || errno == EAGAIN));

  return ret;
}

boolean _strcomp( String s1, String s2 )
{
  while( (*s1 != '\0') && (*s2 != '\0') )
  {
    if( (*s1++) != (*s2++) ) {
      return E33_EXIT_SUCCESS;
    }
  }

  return E33_EXIT_FAILURE;
}