Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8127 | maxcodehac | 1 | typedef unsigned int uint32_t; |
2 | |||
3 | static inline |
||
4 | int start_app(char *app_name, char *args){ |
||
5 | #pragma pack(push, 1) |
||
6 | struct file_op_t |
||
7 | { |
||
8 | uint32_t fn; |
||
9 | uint32_t flags; |
||
10 | char* args; |
||
11 | uint32_t res1, res2; |
||
12 | char zero; |
||
13 | char* app_name __attribute__((packed)); |
||
14 | } file_op; |
||
15 | #pragma pack(pop) |
||
16 | memset(&file_op, 0, sizeof(file_op)); |
||
17 | file_op.fn = 7; |
||
18 | file_op.args = args; |
||
19 | file_op.app_name = app_name; |
||
20 | |||
21 | register int val; |
||
22 | asm volatile ("int $0x40":"=a"(val):"a"(70), "b"(&file_op)); |
||
23 | |||
24 | return val; |
||
25 | } |
||
26 | |||
27 | void notify(char *text) { |
||
28 | start_app("/sys/@notify", text); |
||
29 | } |