usb_moded 0.86.0+mer64
usb_moded-modesetting.h
Go to the documentation of this file.
1
29
30#ifndef USB_MODED_MODESETTING_H_
31# define USB_MODED_MODESETTING_H_
32
33# include <stdbool.h>
34
35/* ========================================================================= *
36 * Prototypes
37 * ========================================================================= */
38
39/* ------------------------------------------------------------------------- *
40 * MODESETTING
41 * ------------------------------------------------------------------------- */
42
43void modesetting_verify_values (void);
44int modesetting_write_to_file_real(const char *file, int line, const char *func, const char *path, const char *text);
45bool modesetting_is_mounted (const char *mountpoint);
46bool modesetting_mount (const char *mountpoint);
47bool modesetting_unmount (const char *mountpoint);
48bool modesetting_enter_dynamic_mode(void);
49void modesetting_leave_dynamic_mode(void);
50void modesetting_init (void);
51void modesetting_quit (void);
52
53/* ========================================================================= *
54 * Macros
55 * ========================================================================= */
56
57# define write_to_file(path,text)\
58 modesetting_write_to_file_real(__FILE__,__LINE__,__FUNCTION__,(path),(text))
59
60/* Used to retry syscalls that can return EINTR. Taken from bionic unistd.h */
61#ifndef TEMP_FAILURE_RETRY
62#define TEMP_FAILURE_RETRY(exp) ({ \
63 __typeof__(exp) _rc; \
64 do { \
65 _rc = (exp); \
66 } while (_rc == -1 && errno == EINTR); \
67 _rc; })
68#endif
69
70#endif /* USB_MODED_MODESETTING_H_ */
void modesetting_init(void)
void modesetting_quit(void)