aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include/sys
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2023-05-11 23:42:43 +0200
committerGitHub <noreply@github.com>2023-05-11 23:42:43 +0200
commit04d7728350cbd04dd86cd894e906c98673e3f9a7 (patch)
tree08e8c7dd495d1c4c6fcf5f7ba6b4b10693dc42f6 /libpsn00b/include/sys
parenteaec942f56ceec9c14de5c4185a02602abadd50a (diff)
parent58a8306d24fe29d965aa8b40ddc37c3163c0a2f9 (diff)
downloadpsn00bsdk-04d7728350cbd04dd86cd894e906c98673e3f9a7.tar.gz
Merge pull request #70 from Lameguy64/v0.23-wip
Header cleanups, PCDRV, more safety checks, libc and mkpsxiso fixes (v0.23)
Diffstat (limited to 'libpsn00b/include/sys')
-rw-r--r--libpsn00b/include/sys/fcntl.h12
-rw-r--r--libpsn00b/include/sys/ioctl.h13
-rw-r--r--libpsn00b/include/sys/types.h12
3 files changed, 25 insertions, 12 deletions
diff --git a/libpsn00b/include/sys/fcntl.h b/libpsn00b/include/sys/fcntl.h
index dfbf5b2..54c2d05 100644
--- a/libpsn00b/include/sys/fcntl.h
+++ b/libpsn00b/include/sys/fcntl.h
@@ -1,8 +1,10 @@
-#ifndef _SYS_FCNTL_H
-#define _SYS_FCNTL_H
+/*
+ * PSn00bSDK kernel API library
+ * (C) 2019-2023 Lameguy64, spicyjpeg - MPL licensed
+ */
+
+#pragma once
-// File control mode flags for BIOS file functions
-// (many weren't documented in nocash docs)
#define FREAD 0x1 // Read
#define FWRITE 0x2 // Write
#define FNBLOCK 0x4 // Non-blocking read access
@@ -16,5 +18,3 @@
#define FNBUF 0x4000 // No ring buffer and terminal interrupt
#define FASYNC 0x8000 // Asynchronous I/O
#define FNBLOCKS(a) (a<<16) // Number of blocks? (from nocash docs)
-
-#endif \ No newline at end of file
diff --git a/libpsn00b/include/sys/ioctl.h b/libpsn00b/include/sys/ioctl.h
new file mode 100644
index 0000000..af65e5d
--- /dev/null
+++ b/libpsn00b/include/sys/ioctl.h
@@ -0,0 +1,13 @@
+/*
+ * PSn00bSDK kernel API library
+ * (C) 2019-2023 Lameguy64, spicyjpeg - MPL licensed
+ */
+
+#pragma once
+
+#define EOF -1
+
+#define FIONBLOCK (('f'<<8)|1)
+#define FIOCSCAN (('f'<<8)|2)
+
+#define DIOFORMAT (('d'<<8)|1)
diff --git a/libpsn00b/include/sys/types.h b/libpsn00b/include/sys/types.h
index da43590..9075b5e 100644
--- a/libpsn00b/include/sys/types.h
+++ b/libpsn00b/include/sys/types.h
@@ -1,13 +1,13 @@
-#ifndef _TYPES_H
-#define _TYPES_H
+/*
+ * PSn00bSDK standard library
+ * (C) 2019-2023 Lameguy64, spicyjpeg - MPL licensed
+ */
-//#warning "<sys/types.h> and u_* types are deprecated, include <stdint.h> instead"
+#pragma once
-//#include <stdint.h>
+//#warning "<sys/types.h> and u_* types are deprecated, use <stdint.h> instead"
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
-
-#endif // _TYPES_H \ No newline at end of file