usb_moded  0.86.0+mer57
usb_moded-modesetting.h
Go to the documentation of this file.
1 
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 
43 void modesetting_verify_values (void);
44 int modesetting_write_to_file_real(const char *file, int line, const char *func, const char *path, const char *text);
45 bool modesetting_is_mounted (const char *mountpoint);
46 bool modesetting_mount (const char *mountpoint);
47 bool modesetting_unmount (const char *mountpoint);
48 bool modesetting_enter_dynamic_mode(void);
49 void modesetting_leave_dynamic_mode(void);
50 void modesetting_init (void);
51 void 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_ */
modesetting_quit
void modesetting_quit(void)
Definition: usb_moded-modesetting.c:985
modesetting_init
void modesetting_init(void)
Definition: usb_moded-modesetting.c:973