aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include/sys
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2023-04-05 01:30:55 +0200
committerspicyjpeg <thatspicyjpeg@gmail.com>2023-04-05 01:30:55 +0200
commitb4242acc35c522bd4d4a951a84933ba6f80d2015 (patch)
tree02cdff7a11329a7445baae489dd2b38225b12d96 /libpsn00b/include/sys
parent651415f5b549b363dec971e2ef589cce098ee1f2 (diff)
downloadpsn00bsdk-b4242acc35c522bd4d4a951a84933ba6f80d2015.tar.gz
Clean up all headers, add and rename some BIOS APIs
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