summaryrefslogtreecommitdiff
path: root/include/user/io/devctl.h
blob: 2b9c96a4267d66feeb4e41dedf394e04effebf22 (plain) (blame)
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
30
31
32
33
34
35
#ifndef _PSP2_IO_DEVCTL_H_
#define _PSP2_IO_DEVCTL_H_

#include <psp2/kernel/iofilemgr.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct SceIoDevInfo {
	SceOff max_size;
	SceOff free_size;
	SceSize cluster_size;
	void *unk;
} SceIoDevInfo;

/**
  * Perform an ioctl on a device. (asynchronous)
  *
  * @param fd - Opened file descriptor to ioctl to
  * @param cmd - The command to send to the device
  * @param indata - A data block to send to the device, if NULL sends no data
  * @param inlen - Length of indata, if 0 sends no data
  * @param outdata - A data block to receive the result of a command, if NULL receives no data
  * @param outlen - Length of outdata, if 0 receives no data
  * @return 0 on success, < 0 on error
  */
int sceIoIoctlAsync(SceUID fd, unsigned int cmd, void *indata, int inlen, void *outdata, int outlen);

#ifdef __cplusplus
}
#endif

#endif /* _PSP2_IO_DEVCTL_H_ */