Compare commits

..

33 Commits

Author SHA1 Message Date
Jonas 'Sortie' Termansen 2239ab6271 fixup! Add strptime(3). 2023-03-22 00:04:06 +01:00
Jonas 'Sortie' Termansen 6721b7b7ce Aurora procedural wallpaper. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen d51fbffb97 Work around pty deadlock. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen 4204813d9b Add cdrom mounting live environment. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen c0bd144d66 Parallelize driver initialization. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen 898bdef447 Speed up ata(4) 400 ns waits.
Waiting for any non-zero duration currently waits for at least one timer
cycle (10 ms), which is especially expensive during early boot.

The current workaround of simply reading the status 14 times seems really
suspicious although the osdev wiki documents it, but let's see how well it
works on real hardware, it's probably good enough.

Try to determine the initial selected drive to save one drive selection.
2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen d89fd6a843 Decrease PS/2 timeouts. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen c8f6e3a072 Add uptime(1) -pr options. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen 5464b9a895 Add iso9660 filesystem implementation. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen 412c8f9892 Add kernel virtual address space usage debug information. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen 414153fab5 Revert "Update to bison-3.8.2."
This reverts commit b82fae810b42c5426d21c4dc153b32f086dd7fde.
2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen 162f82329a Update to bison-3.8.2. 2023-03-21 23:59:17 +01:00
Jonas 'Sortie' Termansen 1e82d88906 Debug TCP socket state listing. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen bd7e8f93f9 Add kernel heap allocation tracing debug facility. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen 89ca760722 Add m4, perl, and texinfo to the basic ports set. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen 75dfa634db Trianglix 4. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen c3549dc90b Add tix-check(8). 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen 884a80de75 Add automatic installer and upgrader. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen 29a4d79946 Volatile release. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen 9a3e5ee33a Add tix-upgrade(8). 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen b98d0d1f18 Add display server. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen 7f09c8ff95 Add pty(1). 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen a850e68652 Revert "Debug system calls exiting without interrupts enabled."
This reverts commit c0bc774c9aa8aa3834f40afc7ad5aa909afc61a1.
2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen b47add350e Debug system calls exiting without interrupts enabled. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen 421a074f89 Add signify port. 2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen b008298b0a Add irc(1).
Co-authored-by: Juhani Krekelä <juhani@krekelä.fi>
2023-03-21 23:59:16 +01:00
Jonas 'Sortie' Termansen f6ec5d2bc0 Add getaddrinfo(1). 2023-03-21 23:59:15 +01:00
Jonas 'Sortie' Termansen e3e5458861 Add host(1). 2023-03-21 23:59:15 +01:00
Jonas 'Sortie' Termansen 4f67aa6276 Add nginx port. 2023-03-21 23:59:15 +01:00
Jonas 'Sortie' Termansen ce5587f3a5 Enable stack smash protection by default. 2023-03-21 23:59:15 +01:00
Jonas 'Sortie' Termansen 226383ba9b Enable undefined behavior sanitization by default. 2023-03-21 23:59:15 +01:00
Jonas 'Sortie' Termansen e3ef3cfadd Add ntpd port. 2023-03-21 23:59:15 +01:00
Jonas 'Sortie' Termansen 693f57a0e3 Add strptime(3). 2023-03-21 23:59:15 +01:00
1 changed files with 0 additions and 80 deletions

View File

@ -24,11 +24,6 @@
#include <string.h>
#include <time.h>
#ifdef TEST
#include <stdio.h>
#define strptime mystrptime
#endif
static const char* wdays[] = {"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday", NULL};
static const char* months[] = {"January", "February", "March", "April", "May",
@ -237,78 +232,3 @@ char* strptime(const char* restrict str,
}
return (char*) str;
}
#ifdef TEST
#undef strptime
#include <err.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
if ( argc < 3 )
err(1, "usage");
const char* str = argv[1];
const char* format = argv[2];
struct tm my_tm = {0};
char* my_end = mystrptime(str, format, &my_tm);
struct tm c_tm = {0};
char* c_end = strptime(str, format, &c_tm);
if ( !my_end && c_end )
errx(1, "rejected but c allowed it");
else if ( !my_end )
errx(1, "rejected correctly");
else if ( !c_end )
printf("allowed but c rejected\n");
else if ( my_end != c_end )
errx(1, "mismatch my end \"%s\" vs c end \"%s\"", my_end, c_end);
if ( my_tm.tm_sec == c_tm.tm_sec )
printf("tm_sec=%i\n", my_tm.tm_sec);
else
printf("tm_sec=%i but C is %i\n", my_tm.tm_sec, c_tm.tm_sec);
if ( my_tm.tm_min == c_tm.tm_min )
printf("tm_min=%i\n", my_tm.tm_min);
else
printf("tm_min=%i but C is %i\n", my_tm.tm_min, c_tm.tm_min);
if ( my_tm.tm_hour == c_tm.tm_hour )
printf("tm_hour=%i\n", my_tm.tm_hour);
else
printf("tm_hour=%i but C is %i\n", my_tm.tm_hour, c_tm.tm_hour);
if ( my_tm.tm_mday == c_tm.tm_mday )
printf("tm_mday=%i\n", my_tm.tm_mday);
else
printf("tm_mday=%i but C is %i\n", my_tm.tm_mday, c_tm.tm_mday);
if ( my_tm.tm_mon == c_tm.tm_mon )
printf("tm_mon=%i\n", my_tm.tm_mon);
else
printf("tm_mon=%i but C is %i\n", my_tm.tm_mon, c_tm.tm_mon);
if ( my_tm.tm_year == c_tm.tm_year )
printf("tm_year=%i\n", my_tm.tm_year);
else
printf("tm_year=%i but C is %i\n", my_tm.tm_year, c_tm.tm_year);
if ( my_tm.tm_wday == c_tm.tm_wday )
printf("tm_wday=%i\n", my_tm.tm_wday);
else
printf("tm_wday=%i but C is %i\n", my_tm.tm_wday, c_tm.tm_wday);
if ( my_tm.tm_yday == c_tm.tm_yday )
printf("tm_yday=%i\n", my_tm.tm_yday);
else
printf("tm_yday=%i but C is %i\n", my_tm.tm_yday, c_tm.tm_yday);
if ( my_tm.tm_isdst == c_tm.tm_isdst )
printf("tm_isdst=%i\n", my_tm.tm_isdst);
else
printf("tm_isdst=%i but C is %i\n", my_tm.tm_isdst, c_tm.tm_isdst);
return 0;
}
#endif