mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
The games now use the error(3) function.
This commit is contained in:
parent
fda16f93ac
commit
d9205a59df
3 changed files with 6 additions and 3 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace Maxsi;
|
||||
|
@ -47,7 +48,7 @@ bool FlushVGA()
|
|||
int Init()
|
||||
{
|
||||
vgafd = open("/dev/vga", O_RDWR);
|
||||
if ( vgafd < 0 ) { printf("Unable to open vga device: %s", strerror(errno)); return 1; }
|
||||
if ( vgafd < 0 ) { error(0, errno, "unable to open vga device /dev/vga"); return 1; }
|
||||
|
||||
Clear();
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace Maxsi;
|
||||
|
@ -61,7 +62,7 @@ bool FlushVGA()
|
|||
int Init()
|
||||
{
|
||||
vgafd = open("/dev/vga", O_RDWR);
|
||||
if ( vgafd < 0 ) { printf("Unable to open vga device: %s", strerror(errno)); return 1; }
|
||||
if ( vgafd < 0 ) { error(0, errno, "unable to open vga device /dev/vga"); return 1; }
|
||||
|
||||
Reset();
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace Maxsi;
|
||||
|
@ -81,7 +82,7 @@ bool FlushVGA()
|
|||
int Init()
|
||||
{
|
||||
vgafd = open("/dev/vga", O_RDWR);
|
||||
if ( vgafd < 0 ) { printf("Unable to open vga device: %s", strerror(errno)); return 1; }
|
||||
if ( vgafd < 0 ) { error(0, errno, "unable to open vga device /dev/vga"); return 1; }
|
||||
|
||||
Reset();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue